COS 126: Fall 1996 Exercise
Set 9 |
Answers |
These exercises are intended help review the material on virtual memory and
file systems. Do
not turn in solutions.
- Which of the following must be true about virtual memory:
- a. A virtual address must have at least as many bits as a physical address.
- b. A physical address must have at least as many bits as a virtual address.
- c. Both of the above.
- d. None of the above.
- Suppose that a disk has 224 blocks, 212 bytes per
block. All files are defined by a block with 26 bytes of
descriptive information, followed by a list of data block numbers. How big a
file can be accommodated?
- The same disk is configured with 216 blocks, 220
bytes per block. How big a file can be accommodated?
As always, try to solve the problems before looking at the suggested
solutions.
- d.
- Data block numbers must be 3 bytes to accommodate 24-bit addresses. Thus,
(212 - 26) / 3 = 1344 block numbers can fit in the
descriptive information block, so the file size is 1344×212 =
5505024.
- ((220 - 26) / 2)×220 =
549722259456.
Copyright © 1996 David R. Hanson / drh@cs.princeton.edu
$Revision: 1.2 $ $Date: 1996/11/26 18:58:38 $