1 / 21

File Systems - V

CS423UG Operating Systems. File Systems - V. Indranil Gupta Lecture 27 10/28/2005. Content. File systems Space management Performance Reliability. Implementing Files. UNIX inode. Implementing Directories (1). (a) A simple directory Fixed-size entries (e.g., MS-DOS)

juan
Download Presentation

File Systems - V

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. CS423UG Operating Systems File Systems - V Indranil Gupta Lecture 27 10/28/2005

  2. Content File systems • Space management • Performance • Reliability CS 423UG Operating Systems. Indranil Gupta

  3. Implementing Files UNIX inode CS 423UG Operating Systems. Indranil Gupta

  4. Implementing Directories (1) (a) A simple directory Fixed-size entries (e.g., MS-DOS) Disk addresses and attributes in directory entry (b) Directory in which each entry just refers to an i-node CS 423UG Operating Systems. Indranil Gupta

  5. Implementing Directories (2) • Two ways of handling long file names in directory (a) In-line or (b) In a heap CS 423UG Operating Systems. Indranil Gupta

  6. Shared Files (1) How? • Linking • Opening CS 423UG Operating Systems. Indranil Gupta

  7. Shared Files (2) (a) Situation prior to linking (b) After the link is created (c) After the original owner removes the file CS 423UG Operating Systems. Indranil Gupta

  8. Free Space Management • Bit vector • A bit map is kept of free blocks • Each bit in a vector represents one block • If the block is free, the bit is zero • Simple to find n consecutive free blocks • Overhead is bit map • Example: BSD file system CS 423UG Operating Systems. Indranil Gupta

  9. Free Space Management • Free list • Keep a linked list of free blocks • Not very efficient because linked list needs traversal • Example: V R1 system CS 423UG Operating Systems. Indranil Gupta

  10. Free Space Management • Linked list of indices • A linked list of index blocks is kept • Each index block contains addresses of free blocks and • A pointer to the next index block • A large number of free blocks can be found quickly CS 423UG Operating Systems. Indranil Gupta

  11. Free Space Management • Linked list of contiguous blocks that are free • The free list node consists of a pointer and the number of free blocks starting from that address • Blocks are joined together into larger blocks as necessary CS 423UG Operating Systems. Indranil Gupta

  12. Disk Space Management (1) • Dark line (left hand scale) gives effective data rate of a disk • Dotted line (right hand scale) gives disk space efficiency • All files 2KB Block size CS 423UG Operating Systems. Indranil Gupta

  13. Disk Space Management (2) CS 423UG Operating Systems. Indranil Gupta

  14. Disk Space Management (3) Quotas for keeping track of each user’s disk use CS 423UG Operating Systems. Indranil Gupta

  15. File System Reliability (1) • A file system to be dumped (stored as a whole, perhaps for backup) • squares are directories, circles are files • shaded items modified since last dump • each directory & file labeled by i-node number File that has not changed CS 423UG Operating Systems. Indranil Gupta

  16. File System Reliability (2) • (above) Logical dump - Bit maps used for (all passes start at root) • (alternative) Physical dump would simply backup entire disk • first pass of tree to mark modified files and dirs • second pass to unmark some dirs • mark inodes that need to be dumped, dump marked dirs • dump marked files CS 423UG Operating Systems. Indranil Gupta

  17. File System Reliability (3) • File system states • (a) consistent • (b) missing block • (c) duplicate block in free list • (d) duplicate data block (c) (d) CS 423UG Operating Systems. Indranil Gupta

  18. File System Performance (1) • The buffer cache – speeding up disk access CS 423UG Operating Systems. Indranil Gupta

  19. File System Performance (2) (a) I-nodes placed at the start of the disk (b) Disk divided into cylinder groups • each with its own blocks and i-nodes CS 423UG Operating Systems. Indranil Gupta

  20. Log-Structured File Systems • With CPUs faster, memory larger • disk caches can also be larger • increasing number of read requests can come from cache • thus, most disk accesses will be writes • Writes are frequent, and are done in small chunks • LFS Strategy structures entire disk as a log • have all writes initially buffered in memory • periodically write these to the end of the disk log (append) • when file opened and read, locate i-node, then find blocks, return resultant file (processed) to application CS 423UG Operating Systems. Indranil Gupta

  21. Summary • File concepts - file attributes, operations, structures • Firectory systems - single-level, two-level, tree structure, acyclic structure, general structure • Access and storage methods • Reading for File Systems: relevant parts of Chapter 6. • Reading for next week: Chapter 8. • HW4 due next Wednesday (Nov 2) CS 423UG Operating Systems. Indranil Gupta

More Related