Disk Scheduling · Operating System
10 questions · asked in 8 of 27 years (2000–2026)
MCQ 6 · NAT 41-mark 5 · 2-mark 5
2000Questions per year2026
Questions 6–10 of 10
Consider a disk system with 100 cylinders. The requests to access the cylinders
occur in following sequence:
4, 34, 10, 7, 19, 73, 2, 15, 6, 20
Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1ms to move from one cylinder to adjacent one and shortest seek time first policy is used?
4, 34, 10, 7, 19, 73, 2, 15, 6, 20
Assuming that the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1ms to move from one cylinder to adjacent one and shortest seek time first policy is used?
Answer: (B)
With SSTF the head always serves the nearest pending request. Start at 50, with requests at 2, 4, 6, 7, 10, 15, 19, 20, 34, 73.
- From 50: 34 is 16 away and 73 is 23 away, so go to 34 (16).
- From 34: 20 is 14 away, 73 is 39 away, so go to 20 (14).
- Then 19 (1), 15 (4), 10 (5), 7 (3), 6 (1), 4 (2) and 2 (2). Each time the nearest request is the next one on the left.
- Only 73 is left, so go from 2 to 73 (71).
Total movement cylinders. At 1 ms per cylinder the time is 119 ms.
Answer: (B)
- From 50: 34 is 16 away and 73 is 23 away, so go to 34 (16).
- From 34: 20 is 14 away, 73 is 39 away, so go to 20 (14).
- Then 19 (1), 15 (4), 10 (5), 7 (3), 6 (1), 4 (2) and 2 (2). Each time the nearest request is the next one on the left.
- Only 73 is left, so go from 2 to 73 (71).
Total movement cylinders. At 1 ms per cylinder the time is 119 ms.
Answer: (B)
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy.
What is the maximum cardinality of the request set, so that the head changes its direction after servicing every request if the total number of tracks are 2048 and the head can start from any track?
What is the maximum cardinality of the request set, so that the head changes its direction after servicing every request if the total number of tracks are 2048 and the head can start from any track?
Answer: (C)
We want the largest set of requests in which the head turns back after every request under SSTF. This needs two things. The next request must be on the opposite side of the head, and it must be strictly nearer than every unserved request on the head's own side (a tie would keep the head moving the same way).
Let be the seek length of the -th request. To pack as many requests as possible, keep them as close as possible.
- The first seek can be 1 track, so .
- When the head moves from to (distance ), the request on the other side must be farther from than is, so at least away. The seek from to is then at least .
So , which gives 1, 3, 7, 15, ..., that is .
In the figure, the head starts at 0 and the seeks have length 1, 3, 7, 15. The black X marks show positions where a request would tie, so no request is placed there.
There are 2048 tracks, so the longest possible seek is . The -th seek needs , so . The largest set therefore has 11 requests.
Answer: (C)
Let be the seek length of the -th request. To pack as many requests as possible, keep them as close as possible.
- The first seek can be 1 track, so .
- When the head moves from to (distance ), the request on the other side must be farther from than is, so at least away. The seek from to is then at least .
So , which gives 1, 3, 7, 15, ..., that is .
In the figure, the head starts at 0 and the seeks have length 1, 3, 7, 15. The black X marks show positions where a request would tie, so no request is placed there.
There are 2048 tracks, so the longest possible seek is . The -th seek needs , so . The largest set therefore has 11 requests.
Answer: (C)
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy. The head is initially positioned at track number 180.
Which of the request sets will cause the head to change its direction after servicing every request assuming that the head does not change direction if there is a tie in SSTF and all the requests arrive before the servicing starts?
Which of the request sets will cause the head to change its direction after servicing every request assuming that the head does not change direction if there is a tie in SSTF and all the requests arrive before the servicing starts?
Answer: (B)
The head must turn back after every request. A tie never turns the head, because on a tie it keeps going the same way. So at every step the nearer request must be on the opposite side, with no tie.
The head starts at 180. The nearest request is 181, so it moves up. From 181 the tracks 178 and 184 are both 3 away. The head continues its direction (up) on a tie, so it would go to 184 with no turn. This breaks options (A) and (C), which both have 184 and 178 together.
Options (B) and (D) share the start 180, 181, 178, 185. Now the head is at 185 having moved up. In (D), 170 and 200 are both 15 away, a tie, so the head continues up to 200 with no turn. This breaks (D).
Check (B), with requests 10, 138, 170, 178, 181, 185, 201, 265, one step at a time:
- 180 to 181 (1), up.
- 181: 178 is 3 away, 185 is 4 away, so go to 178, down.
- 178: 185 is 7 away, 170 is 8 away, so go to 185, up.
- 185: 170 is 15 away, 201 is 16 away, so go to 170, down.
- 170: 201 is 31 away, 138 is 32 away, so go to 201, up.
- 201: 138 is 63 away, 265 is 64 away, so go to 138, down.
- 138: 265 is 127 away, 10 is 128 away, so go to 265, up.
- 265: only 10 is left, so go down.
The direction alternates every time.
Answer: (B)
The head starts at 180. The nearest request is 181, so it moves up. From 181 the tracks 178 and 184 are both 3 away. The head continues its direction (up) on a tie, so it would go to 184 with no turn. This breaks options (A) and (C), which both have 184 and 178 together.
Options (B) and (D) share the start 180, 181, 178, 185. Now the head is at 185 having moved up. In (D), 170 and 200 are both 15 away, a tie, so the head continues up to 200 with no turn. This breaks (D).
Check (B), with requests 10, 138, 170, 178, 181, 185, 201, 265, one step at a time:
- 180 to 181 (1), up.
- 181: 178 is 3 away, 185 is 4 away, so go to 178, down.
- 178: 185 is 7 away, 170 is 8 away, so go to 185, up.
- 185: 170 is 15 away, 201 is 16 away, so go to 170, down.
- 170: 201 is 31 away, 138 is 32 away, so go to 201, up.
- 201: 138 is 63 away, 265 is 64 away, so go to 138, down.
- 138: 265 is 127 away, 10 is 128 away, so go to 265, up.
- 265: only 10 is left, so go down.
The direction alternates every time.
Answer: (B)
A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers.
30 70 115 130 110 80 20 25.
How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come First Serve)?
30 70 115 130 110 80 20 25.
How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come First Serve)?
Answer: (C)
The head arrives at 120 from 90, so it is moving up. The pending requests are 30, 70, 115, 130, 110, 80, 20, 25.
SSTF (nearest first):
- From 120: 115 is 5 away, 130 is 10 away, so go to 115. The head turns here (up, then down).
- From 115: 110 is 5 away, so go to 110.
- From 110: 130 is 20 away, 80 is 30 away, so go to 130. The head turns here (down, then up).
- From 130: 80 is 50 away and it is the nearest, so go to 80. The head turns here (up, then down).
- From 80: 70 (10), then 30 (40), then 25 (5), then 20 (5). All of these are downwards.
Order: . Direction changes at 120, 110 and 130, so 3 changes.
FCFS (in the order of arrival):
Up to 120, down to 30, up to 130, down to 20, up to 25. The direction changes at 120, 30, 130 and 20, so 4 changes.
So SSTF has 3 changes and FCFS has 4.
Answer: (C)
SSTF (nearest first):
- From 120: 115 is 5 away, 130 is 10 away, so go to 115. The head turns here (up, then down).
- From 115: 110 is 5 away, so go to 110.
- From 110: 130 is 20 away, 80 is 30 away, so go to 130. The head turns here (down, then up).
- From 130: 80 is 50 away and it is the nearest, so go to 80. The head turns here (up, then down).
- From 80: 70 (10), then 30 (40), then 25 (5), then 20 (5). All of these are downwards.
Order: . Direction changes at 120, 110 and 130, so 3 changes.
FCFS (in the order of arrival):
Up to 120, down to 30, up to 130, down to 20, up to 25. The direction changes at 120, 30, 130 and 20, so 4 changes.
So SSTF has 3 changes and FCFS has 4.
Answer: (C)
Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is First Come First Served (FCFS). If FCFS is replaced by Shortest Seek Time First (SSTF), claimed by the vendor to give 50% better benchmark results, what is the expected improvement in the I/O performance of user programs?
Answer: (D)
The question says there is a "single sequential user process". So every request reaches the disk scheduler one after another, and each request blocks the process until it finishes. This means a disk scheduling algorithm makes no difference. Any algorithm gets the same input sequence. So the improvement of SSTF over FCFS will be .
Correct Answer:
Correct Answer:
Keep practising
Topics in Operating System
System CallProcessThreadProcess SynchronizationDeadlockCPU Scheduling
Disk SchedulingYou are here
Memory ManagementFile Systems