1 / 8

CS 415 Operating Systems Principles File System Implementation

CS 415 Operating Systems Principles File System Implementation. Dr. Edward C. Cheng. File System. File system layering architecture File Control Block (FCB) Directory. Files. Logical File System. File management modules. Basic File System. I/O functions. Devices.

baird
Download Presentation

CS 415 Operating Systems Principles File System Implementation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 415 Operating Systems Principles File System Implementation Dr. Edward C. Cheng

  2. File System • File system layering architecture • File Control Block (FCB) • Directory

  3. Files Logical File System File management modules Basic File System I/O functions Devices File System Layering Architecture

  4. File System Basic Structure • FS: volume directory, file and block • Disk: platter, track and sector (512 bytes) • Formatted vs. unformatted • Boot sector (boot block) • Contains necessary info for the OS to boot up • Volume control block • Contains info of the volume • File control block (FCB) • Contains attribute info of each file • Open-file table • Keep an entry for each opened file

  5. File Control Block • Location (file path) • Owner • Permission (rwx) • Size • Space allocation (block) info

  6. Directory Implementation • Performance consideration • Search by filename frequently when creating, deleting, accessing or searching of a file • Create a hash table to contain all directory entries • At boot time, read the directory hash table into memory • Create a hash table for each of the directory to contain all files within the directory (name and pointer to FCB) • When a directory is open, read the file hash into memory and also cache up the relevant FCB’s

  7. Space Allocation for Files • Contiguous allocation • File location is simply beginning block# + length • +ve: fast access • -ve: external fragmentation; extending file size is costly • Linked allocation • The file initially only points to the first block of the file • +ve: no external fragmentation • -ve: slow for direct access to certain block of a file • Solution: FAT • Indexed allocation • Use an index block to keep pointers to all blocks • +ve: fast direct access • -ve: index block may not be in memory

  8. Next Class Disk I/O and Performance

More Related