Homework #5: I/O Devices & File Systems
CMSC 421, Section 0101 (Fall 1999)
Assigned: 18 Nov 1999
Due: 30 Nov 1999 at 2:30 PM
Late homeworks will not be accepted.
- What are the advantages and disadvantages of recording a file's creator and type with the file, as is done on the Macintosh? Is it better to record this information in the file name, as is often done in Unix?
- Problem 10.13 from the text.
- Problem 11.8 from the text.
- Consider a Unix file system with 8 direct pointers in each inode and 8 KB file blocks.
- How much overhead would be needed to store index blocks for a 60 MB file, not including the inode itself? What percentage of total file size would the overhead be? Remember that blocks must be allocated in their entirety if any part of the block is needed.
- On average, how many 8 KB blocks would have to be read to get a random block from the file? Again, assume the inode is already in memory and doesn't need to be read from disk. HINT: figure out how many blocks can be read for each of direct, single, double, triple indirect and compute the average from this information.
- Under what conditions will extents perform better than the "standard" Unix file system mechanism? Assume that each extent consists of a 4-byte starting block number and a 4-byte length. What condition must hold for extents to be more efficient (require less space) than individual block pointers for a given file? Given this constraint, would you use extents in a file system? Why or why not?
- Suppose we have a disk with 8000 cylinders, numbered 0 to 7999. The disk is currently serving a request at track 482, and the previous request served by the disk was at track 421. The queue of pending requests (in order of time arrival, oldest request first) is:
301, 2001, 7197, 1984, 2102, 86, 155, 6533, 6480
Starting from the current head position, what is the total seek distance (in cylinders) that the disk head has to travel using each of the following disk scheduling algorithms:
- Often, a disk drive doesn't experience requests uniformly distributed across the disk. In particular, cylinders containing directories or file block pointers (inodes) will be accessed more frequently than cylinders with just file blocks. How can you deal with this uneven request distribution?
- Would any of the disk scheduling algorithms mentioned in question 6 be helpful? Why or why not?
- Where on the disk could you put the "hot" cylinders to improve performance using a standard scheduling algorithm?
- Since many file systems find blocks via indirection (block pointers), how could you design the file system to improve performance and reduce the number of accesses to the "hot" cylinders with directory & block pointer information?
Syllabus | Schedule | News & Notes | Grades | Feedback
Submit | Homework: 1 2 3 4 5 6 | Project: 1 2 3 4
3 Dec 1999
by Ethan Miller (email@example.com)