|
Computer Science 322 Operating Systems Mount Holyoke College Spring 2008
|
|
Lecture 29: File Systems: Implementations
Date: Friday, April 25, 2008
- Announcements
- Lecture assignment recap
- Disks and partitions
- a system may have multiple disks, each of which contains
multiple partitions
- we create a file system (more later) in each partition
- mounting: drive letters in Windows, paths in Unix
- In Unix, a virtual file system layer translates generic
paths to the correct partitions (local of varying types,
network-accessible)
- partitioning: why and how?
- File System Implementations
- want to provide: convenience, protection, efficiency
- issues:
- allocation of disk blocks to files/directories
- track available blocks
- do this efficiently
- Disk block allocation methods
- contiguous allocation
- extents
- linked allocation
- variation on linked: file allocation table (FAT)
- indexed allocation
- straightforward implementation:
- linked indexed allocation
- two-level index
- Unix inodes
- a combination of the best features of many of the
above
- set aside special disk blocks called inodes (index
nodes)
- inode has entries pointing to direct file blocks, a
single indirect block, a double indirect block, and a
triple indirect block
- a superblock keeps track of inodes and data blocks
- see /usr/src/sys/ufs/ufs/dinode.h in FreeBSD
- Concerns: file size limits, fragmentation, overhead,
performance
Due at the start of class, Monday, April 28.
Turn in short answers to these questions. Please turn in a hard
copy (typeset or handwritten are OK). We will discuss these questions
during class, so no late submissions are accepted.
- SG&G 11.2
- What is the largest file that can be represented in the usual
Unix inode scheme when the inode includes 12 direct blocks, 1 single
indirect block, 1 double indirect block, and 1 triple indirect
block? Assume a data block is 4KB and a block is identified and
located on the disk using a 4-byte address.