Course Hero Logo

FILE SYSTEM IMPLEMENTATION.docx - FILE SYSTEM...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 3 out of 15 pages.

FILE SYSTEM IMPLEMENTATION12.1 File-System StructureHard disks have two important properties that make them suitable forsecondary storage of files in file systems: (1) Blocks of data can be rewrittenin place, and (2) they are direct access, allowing any block of data to beaccessed with only ( relatively ) minor movements of the disk heads androtational latency. ( See Chapter 12 )Disks are usually accessed in physical blocks, rather than a byte at a time.Block sizes may range from 512 bytes to 4K or larger.File systems organize storage on disk drives, and can be viewed as a layereddesign:oAt the lowest layer are the physical devices, consisting of themagnetic media, motors & controls, and the electronics connected tothem and controlling them. Modern disk put more and more of theelectronic controls directly on the disk drive itself, leaving relativelylittle work for the disk controller card to perform.oI/O Controlconsists ofdevice drivers, special software programs( often written in assembly ) which communicate with the devices byreading and writing special codes directly to and from memoryaddresses corresponding to the controller card's registers. Eachcontroller card ( device ) on a system has a different set of addresses( registers, a.k.a.ports) that it listens to, and a unique set ofcommand codes and results codes that it understands.oThebasic file systemlevel works directly with the device drivers interms of retrieving and storing raw blocks of data, without anyconsideration for what is in each block. Depending on the system,blocks may be referred to with a single block number, ( e.g. block #234234 ), or with head-sector-cylinder combinations.oThefile organization moduleknows about files and their logicalblocks, and how they map to physical blocks on the disk. In additionto translating from logical to physical blocks, the file organizationmodule also maintains the list of free blocks, and allocates free blocksto files as needed.oThelogical file systemdeals with all of the meta data associated witha file ( UID, GID, mode, dates, etc ), i.e. everything about the fileexcept the data itself. This level manages the directory structure andthe mapping of file names tofile control blocks, FCBs, whichcontain all of the meta data as well as block number information forfinding the data on the disk.The layered approach to file systems means that much of the code can beused uniformly for a wide variety of different file systems, and only certain
layers need to be filesystem specific. Common file systems in use includethe UNIX file system, UFS, the Berkeley Fast File System, FFS, Windowssystems FAT, FAT32, NTFS, CD-ROM systems ISO 9660, and for Linux theextended file systems ext2 and ext3 ( among 40 others supported. )Figure 12.1 - Layered file system.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 15 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
N/A
Tags
File System Implementation

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture