1CSC 4103 - Operating SystemsSpring 2007Tevfik KoşarLouisiana State UniversityMarch 20th, 2007Lecture - XVFile Systems - IFile-System Structure• Provides organized and efficient access to data onsecondary storage, E.g.:– Organizing data into files and directories– Improve I/O efficiency between disk and memory (perform I/Oin units of blocks rather than bytes)– Contains file structure via a File Control Block (FCB)– Ownership, permissions, location..A Typical File Control BlockLayered File SystemIn-Memory File System StructuresVirtual File Systems• Virtual File Systems (VFS) provide an object-orientedway of implementing file systems.• VFS allows the same system call interface (the API) tobe used for different types of file systems.• The API is to the VFS interface, rather than any specifictype of file system.Schematic View of Virtual File SystemDirectory Implementation• Linear list of file names with pointer to the datablocks.– simple to program– time-consuming to execute• Hash Table – linear list with hash data structure.– decreases directory search time– collisions – situations where two file names hash to the samelocation– fixed sizeAllocation Methods• An allocation method refers to how disk blocks areallocated for files:• Contiguous allocation• Linked allocation• Indexed allocationContiguous Allocation• Each file occupies a set of contiguous blocks onthe disk• Simple – only starting location (block #) andlength (number of blocks) are required• Wasteful of space (dynamic storage-allocationproblem)• Files cannot growContiguous Allocation of Disk SpaceLinked Allocation• Each file is a linked list of disk blocks: blocks may be scatteredanywhere on the disk.pointerblock =+ Simple – need only starting address+ Free-space management system – no waste of space - No random access- Extra space required for pointers- Reliability: what if a pointer gets corrupted?Linked AllocationFile-Allocation TableIndexed Allocation• Brings all pointers together into the index block, to allow randomaccess to file blocks.• Logical view.index table+ Supports direct access+ Prevents external fragmentation- High pointer overhead --> wasted spaceExample of Indexed Allocation17Any Questions?Hmm..18Reading Assignment• Read chapter 11 from Silberschatz.19Acknowledgements• “Operating Systems Concepts” book and supplementarymaterial by Silberschatz, Galvin and
View Full Document