CSE 120: Homework #4
Out: Tuesday December 2
Due: Thursday December 11 at the start of class
(No late homeworks after Saturday December 13)
- On a Unix-style file system, how many disk read operations are
required to read the first block of the file "/usr/include/stdio.h"?
Assume that the master block is in memory, but nothing else. Also
assume that all directories and inodes are one block in size.
- Consider a UNIX-style inode with 10 direct pointers, one single-
indirect pointer, and one double-indirect pointer only. Assume that
the block size is 4K bytes, and that the size of a pointer is 4
bytes. How large a file can be indexed using such an inode?
Consider a file archival system, like the programs zip or tar. Such
systems copy files into a backup file and restore files from the
backup. For example, from the zip documentation:
The zip program puts one or more compressed files into a single zip
archive, along with information about the files (name, path, date,
time of last modification, protection, and check information to verify
When a file is restored, it is given the same name, time of last
modification, protection, and so on. If desired, it can even be put
into the same directory in which it was originally located.
Can zip restore the file into the same inode as well? Briefly
explain your answer.
- [Silberschatz] Consider a system that supports 5000
users. Suppose that you want to allow 4990 of these users to be able
to access one file.
- How would you specify this protection scheme in Unix?
- Could you suggest another protection scheme that can be used more
effectively for this purpose than the scheme provided by Unix?
- [Silberschatz] How does a file cache help improve performance?
Why do systems not use much larger caches if they are so useful?