A disk head is currently at cylinder 50. The pending requests, in the order they arrived, are for cylinders: 4, 34, 10, 7, 19, 73, 2, 15, 6, 20. Using the Shortest-Seek-Time-First (SSTF) disk scheduling policy, and given that it takes 1 ms to move the head between two adjacent cylinders, what is the total time needed to service all the requests?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. 119 ms
Explanation
SSTF always services whichever pending request is nearest to the head's current position. From 50 the service order works out to 34 (seek 16), 20 (14), 19 (1), 15 (4), 10 (5), 7 (3), 6 (1), 4 (2), 2 (2), and finally 73, which is the only request left and requires a long jump of 71 cylinders. Summing the individual seek distances — 16+14+1+4+5+3+1+2+2+71 — gives a total head movement of 119 cylinders, i.e. 119 ms at 1 ms/cylinder, option (i). The large final seek out to 73 (left for last because every nearer request kept winning) is a classic illustration of SSTF's tendency to starve outlying requests.More Database Management Systems questions
- What is called journaling in a Linux operating system?
- In a file allocation system, the following allocation schemes are used: (A) Contiguous allocation, (B) Indexed allocation, (C) Linked alloc…
- Suppose a Linux file system has a block size of 2K bytes, a disk address is 32 bits, and an i-node contains the disk addresses of the first…
- 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 tha…
- 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…