hw2

1. Consider the following page reference string:

1, 2, 3, 4, 5, 3, 4, 5, 4, 5

The system has space for 4 pages in memory.  Show which pages are in memory after each reference, using FIFO/FCFS, LRU, and the optimal page-replacement algorithms.  Show where each page fault occurs.

2. Explain the difference between a file allocation table (FAT) and a file index table.  Explain how they are useful for linked-list allocation schemes.

3. Draw and label the following aspects of a hard drive: platters, cylinders, blocks, tracks, sectors.

4. Consider a hard drive that has 4 cylinders such that the 1st cylinder is close to the spindle and the 4th is at the edge.  Say a sequence of blocks must be read as follows:

block 1, cylinder 1
block 31, cylinder 4
block 21, cylinder 3
block 15, cylinder 2
block 25, cylinder 3
block 35, cylinder 4

Assume the drive head is initially positioned on cylinder 0.  Show the order in which the blocks are visited according to the following algorithms:
a) FCFS
b) SSTF
c) SCAN
d) LOOK
e) C-LOOK
Comments