DOC PREVIEW
Harvey Mudd CS 105 - File Systems

This preview shows page 1-2-3-4-5 out of 15 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

File SystemsFile Systems: Disk OrganizationDesign ProblemsImportant File SystemsTypical Similarities Among File SystemsTypical Differences Between File SystemsCase Study: Berkeley Fast File System (FFS)FFS HeadersFFS File TrackingFFS InodesFFS Free-Space ManagementFFS FragmentationFile Systems and Data StructuresEffect of File Systems on ProgramsSummary: Goals of Unix File SystemsFile SystemsFile SystemsTopicsTopicsDesign criteriaHistory of file systemsBerkeley Fast File SystemEffect of file systems on programsfs.pptCS 105“Tour of the Black Holes of Computing”– 2 –CS 105File Systems: Disk OrganizationFile Systems: Disk OrganizationA disk is a sequence of 512-byte sectorsA disk is a sequence of 512-byte sectorsUnfortunate historical fact; now we’re stuck with itFirst comes First comes boot blockboot block and and partition tablepartition tablePartition table divides the rest of disk into partitionsPartition table divides the rest of disk into partitionsMay appear to operating system as logical “disks”Useful for multiple OSes, etc.Otherwise bad idea; hangover from earlier daysFile systemFile system: partition structured to hold : partition structured to hold filesfiles (data) (data)Usually aggregates sectors into blocks or clustersTypical size: 2-16 sectors (1K-8K bytes)Increases efficiency by reducing overhead– 3 –CS 105Design ProblemsDesign ProblemsAs seen before, disks have mechanical delaysAs seen before, disks have mechanical delaysSeek time: move heads to where data is (2-20 ms)Rotational delay: wait for data to get under heads (2-8 ms)Transfer time: move data into memory (1-15 μs)Fundamental problem in file-system design: how to Fundamental problem in file-system design: how to hide (or at least minimize) these delays?hide (or at least minimize) these delays?Side problems also important:Side problems also important:Making things reliable (in face of s/w and h/w crashes)Organizing data (e.g., in directories or databases)Enforcing security– 4 –CS 105Important File SystemsImportant File SystemsFAT: old Windows and MSDOS standardFAT: old Windows and MSDOS standardNTFS: Windows current standardNTFS: Windows current standardFFS: Unix standard since 80’sFFS: Unix standard since 80’sAFS: distributed system developed at CMUAFS: distributed system developed at CMULFS: Berkeley redesign for high performanceLFS: Berkeley redesign for high performanceZFS: redesigned Unix system, recently released by SunZFS: redesigned Unix system, recently released by SunISO 9660: CD-ROM standardISO 9660: CD-ROM standardEXT2/EXT3: Linux standards, variants of FFSEXT2/EXT3: Linux standards, variants of FFSReiserFS: redesigned Linux systemReiserFS: redesigned Linux systemOther OS’s have own file organization: VMS, MVS, Other OS’s have own file organization: VMS, MVS, – 5 –CS 105Typical SimilaritiesAmong File SystemsTypical SimilaritiesAmong File SystemsA (secondary) boot recordA (secondary) boot recordA top-level directoryA top-level directorySupport for hierarchical directoriesSupport for hierarchical directoriesManagement of free and used spaceManagement of free and used spaceMetadata about files (e.g., creation date)Metadata about files (e.g., creation date)Protection and securityProtection and security– 6 –CS 105Typical DifferencesBetween File SystemsTypical DifferencesBetween File SystemsNaming conventions: case, length, special symbolsNaming conventions: case, length, special symbolsFile size and placementFile size and placementSpeedSpeedError recoveryError recoveryMetadata detailsMetadata detailsSupport for special filesSupport for special files– 7 –CS 105Case Study: Berkeley Fast File System (FFS)Case Study: Berkeley Fast File System (FFS)First public Unix (Unix V7) introduced many important First public Unix (Unix V7) introduced many important concepts in Unix File System (UFS)concepts in Unix File System (UFS)I-nodesIndirect blocksUnix directory structure and permissions systemUFS was simple, elegant, and slowUFS was simple, elegant, and slowBerkeley initiated project to solve the slownessBerkeley initiated project to solve the slownessMany modern file systems are direct or indirect Many modern file systems are direct or indirect descendants of FFSdescendants of FFSIn particular, EXT2 and EXT3– 8 –CS 105FFS HeadersFFS HeadersBoot block: first few sectorsBoot block: first few sectorsTypically all of cylinder 0 is reserved for boot blocks, partition tables, etc.Superblock: file system parameters, includingSuperblock: file system parameters, includingSize of partition (note that this is dangerously redundant)Location of root directoryBlock sizeCylinder groups, includingCylinder groups, includingData blocksList of inodesBitmap of used blocks and fragments in the groupReplica of superblock (not always at start of group)– 9 –CS 105FFS File TrackingFFS File TrackingDirectory: file containing variable-length recordsDirectory: file containing variable-length recordsFile nameI-node numberInode: holds metadata for one fileInode: holds metadata for one fileLocated by number, using info from superblockIntegral number of inodes in a blockIncludesOwner and groupFile type (regular, directory, pipe, symbolic link, …)Access permissionsTime of last i-node change, last modification, last accessNumber of links (reference count)Size of file (for directories and regular files)Pointers to data blocks– 10 –CS 105FFS InodesFFS InodesInode has 15 pointers to data blocksInode has 15 pointers to data blocks12 point directly to data blocks13th points to an indirect block, containing pointers to data blocks14th points to a double indirect block15th points to a triple indirect blockWith 4K blocks and 4-byte pointers, triple indirect With 4K blocks and 4-byte pointers, triple indirect block can address 4 terabytes (2block can address 4 terabytes (24242 bytes) of data bytes) of dataData blocks might not be contiguous on diskData blocks might not be contiguous on diskBut OS tries to But OS tries to clustercluster related items in cylinder group: related items in cylinder group:Directory entriesCorresponding inodesTheir data blocks– 11 –CS 105FFS Free-Space ManagementFFS Free-Space ManagementFree space managed by bitmapsFree space managed by bitmapsOne bit per blockMakes it easy to find groups of contiguous


View Full Document

Harvey Mudd CS 105 - File Systems

Documents in this Course
Processes

Processes

25 pages

Processes

Processes

27 pages

Load more
Download File Systems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view File Systems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view File Systems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?