ECE344-Lecture23-FileSystems

ECE344-Lecture23-FileSystems - Lecture 23: File Systems...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Lecture 23: File Systems David Lie ECE344 University of Toronto
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 ECE344: Operating Systems Outline File Systems – Overview of file system – Disk Basics File system design – Consistency and crash recovery – Sharing files – Unix file system Disks – Disk scheduling algorithms – Redundancy in storage systems
Background image of page 2
3 ECE344: Operating Systems File System Design A file system performs four main tasks Free block management – Allocates blocks to a file, manages free blocks • Uses bitmaps or linked list • Issues similar to memory, swap management Block lookup, allocation and placement – Maps (potentially non-contiguous) blocks to the file • Issues similar to virtual memory, but placement problem is unique to disks Directory management – Maps file names to location of starting block of file Buffer cache management – Caches disk blocks in memory to minimize I/O
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 ECE344: Operating Systems Free Block Management - Bitmaps Keep a bitmap in a separate area on disk – 1 bit per disk block Suppose block size = 1 KB, disk size = 16 GB – Nr. of blocks = 16 M – Need 16 Mbits = 2 MB disk space => 2K bitmap blocks Advantages – Allows allocating contiguous blocks to a file easily – Need only one bitmap block in memory at a time Disadvantages – Need extra space for bitmap – However, bitmap could be stored in free block
Background image of page 4
5 ECE344: Operating Systems Free Block Management – Linked Lists Keep a linked list of free blocks – Each element keeps location of several other free blocks and pointer to next list element – Each list element is itself a free block! Advantages – Need no extra space needed – Need to keep only one element in memory at a time Disadvantages – Hard to allocate contiguous blocks to a file, have to search the whole list List element
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 ECE344: Operating Systems Block Allocation and Placement Block allocation – Maps, potentially non-contiguous, blocks to the file – Options
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 22

ECE344-Lecture23-FileSystems - Lecture 23: File Systems...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online