Consider a disk system having 60 cylinders. Disk requests are received by the disk drive for cylinders 10, 22, 20, 2, 40, 6, and 38, in that order. Assuming the disk head is currently at cylinder 20, what is the time taken to satisfy all the requests if it takes 2 milliseconds to move from one cylinder to an adjacent one and the Shortest Seek Time First (SSTF) algorithm is used?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. 120 milliseconds
Explanation
Starting from cylinder 20 with pending requests {10, 22, 20, 2, 40, 6, 38}, SSTF always services whichever pending request is nearest to the head's current position. The request for cylinder 20 needs 0 movement (head is already there); the nearest remaining request is then 22 (distance 2), then from 22 the nearest is 10 (distance 12), then 6 (distance 4), then 2 (distance 4), then from 2 the nearest remaining is 38 (distance 36), and finally 40 (distance 2). The movement sequence is 20→22→10→6→2→38→40, totalling 2+12+4+4+36+2 = 60 cylinders. At 2 ms per cylinder, total time = 60 × 2 = 120 ms, matching option (iii).More Database Management Systems questions
- A disk queue has requests for I/O on cylinders 98, 183, 37, 122, 14, 124, 65, 67, with the disk head currently at cylinder 53. Using the sh…
- Consider the following statements about UNIX file permissions: (A) UNIX provides three permission types — Read, Write and Execute. (B) UNIX…
- In the ________ disk scheduling algorithm, the disk head moves from one end of the disk to the other, servicing requests along the way. Whe…
- Suppose there are six files F1, F2, F3, F4, F5, F6 with corresponding sizes 150 KB, 225 KB, 75 KB, 60 KB, 275 KB and 65 KB respectively. Th…
- Match the following for the UNIX file system: List I: (A) Boot block (B) Super block (C) Inode block (D) Data block List II: (I) Contains i…
- Which of the following statements about the UNIX file system is NOT correct?