- The program sparsefile creates a file, seeks to location 1G -1, and
writes a single byte. On a Unix system, the size of the resulting file
is one gigabyte as reported by ls -l. How much disk space does the file
consume? If a program opens the file and reads the locations that were
never written, what happens? What if the file is copied with cp? How
much disk space does the copy consume?
- The Seagate Cheetah disc
drives have a spindle speed of 10,000 rotations per minute, while most
disks on the market today spin at 3600 or 7200 RPM. The Cheetah 9LP has
an average of 208 512-byte sectors per track on each of six platters,
with a separate head for both surfaces on each platter. There are about
7000 tracks per surface, for an aggregate capacity of 9 GB, and the
average seek time is about 6 milliseconds. What is the average access
time for a randomly chosen 8K block? What would the access time be for a
disk with the same geometry rotating at 7200 RPM? How much does the
faster rotation speed improve access time?
- Suppose a process is
sequentially reading a file that is an array of 128-byte records,
issuing a separate 128-byte read system call for each record. Most
systems will deliver disk bandwidth for this application, assuming the
CPU is able to process each record in less than the time it takes to
access each record on average. Explain the key technique used to handle
this application, and regurgitate the buzzword that best summarizes why
the technique is effective.
- (a) Suppose the process vmhog generates a constate rate of 180 4K page
faults per second, with each page fault consuming 50 microseconds of
system overhead and 5 milliseconds of disk access time. What is the user
CPU utilization? If I double the speed of the CPU, how much does this
improve application performance? What is the new paging rate?
(b) Now
suppose all faults are satisfied using remote paging from remote memory
across a fast network, with the same overhead and 100 microseconds of
network latency. What bandwidth will vmhog drive on the network? What
is the user CPU utilization? Why is user CPU utilization a useful
measure of performance in this case? If I double the speed of the CPU,
how much does this improve application performance? What is the new
bandwidth demand on the network?
- A computer with 32-bit virtual addresses uses a two-level page
table similar to NT. Virtual addresses are split into a 9-bit top-level
page table field, an 11-bit second-level page table field, and an
offset. How large are the pages and how many are there in the address
space? (Tanenbaum)
Describe the actions that the CPU takes to complete a
load or store instruction on a resident page, for the architecture
described above. Explain any additional assumptions you make about the
architecture.
Describe the actions taken by the CPU and
OS to complete a load or store instruction on a non-resident page, for
the architecture described above. Explain any additional assumptions
you make about the architecture and the operating system.
- A machine has 48-bit virtual addresses and 32-bit physical
addresses. Pages are 8K. How many entries are needed for a
conventional page table? For an inverted page table?
- In some systems, each page table entry includes a reference bit and
a dirty bit. Does each TLB entry need these bits as well? Why or why
not? In most systems, each TLB entry includes a virtual page number.
Does each page table entry need to include a virtual page number as
well? Why or why not?
- What is fragmentation? Explain the difference between internal
and external fragmentation. Explain how each occurs, if at all, in memory
management systems using: (a) fixed partitioning, (b) variable
partitioning, and (c) paging.
- It has been suggested that the first part of each Unix file be kept
in the same disk block as its inode. What good would this do?
(Tanenbaum)
- A key issue in the design of any naming system is the handling of
dangling references. A dangling reference is a name for an object that
no longer exists. One way to handle dan-gling references is to prevent
them from occurring at all. A second approach is to allow dangling
references to occur but to detect them and deliver an error message when
they are used. Another common but somewhat less useful approach is to
allow dangling references to exist, and exhibit random or unexpected
behavior when they are used.
Explain how dangling references are handled
for the following kinds of names: (1) C++ object pointers, (2) vnode
pointers inside a Unix kernel, (3) Unix file names (hard links), (4)
Unix symbolic links, (5) Unix file descriptors, and (6) NFS file
handles.
- What is the cache consistency problem? Illustrate with an example.
Outline one solution to the cache consistency problem.
- Contiguous allocation of files leads to disk fragmentation. Is
this internal fragmentation or external fragmentation?
- Free disk space can be kept track of using a free list or a bit
map. Disk addresses require D bits. For a disk with
B blocks, F of which are free, state the condition
under which the free list uses less space than the bit map. For
D having the value 16 bits, express your answer as a percentage
of the disk space that must be free.
- Some operating systems provide a rename system call to
give a file a new name. Is there any difference at all between using
this call to rename a file and just copying the file to a new file with
the new name, followed by deleting the old one?
- Consider a system in which computer games can be played by
students only
between 10 pm and 6 am, by faculty members between 5 pm and 8
am, and by
labstaff at all times. Suggest a protection scheme for
efficiently implementing this policy.
- Why can file caches use "true" LRU replacement whereas paged virtual memory generally can not?
- Consider a distributed file system that does client caching
using the write-through algorithm. Individual blocks, rather than
entire files, are cached. Suppose that a client is about to read an
entire file sequentially and some of the blocks are in the cache but
others are not. What problems may occur and what can be done about
them?
- What is page coloring?
- Nutt, chapter 12, problem 8, page 373.
- Nutt, chapter 12, problem 10, page 373.
- Nutt, chapter 13, problem 4, page 417.
- Nutt, chapter 13, problem 9, page 418.
- Nutt, chapter 14, problem 8, page 451