2076 3

CSC264 · 2076 · 10 marks

What is the main objective of disk scheduling algorithms? Why SSTF is not practically feasible? Assume that we have disk with 100 tracks and currently head is at track number 35. What will be the seek time for the algorithms SCAN and LOOK for processing IO requests queue: 52, 67, 21, 11, 43, 85, 18,

What is the main objective of disk scheduling algorithms? Why SSTF is not practically feasible? Assume that we have disk with 100 tracks and currently head is at track number 35. What will be the seek time for the algorithms SCAN and LOOK for processing IO requests queue: 52, 67, 21, 11, 43, 85, 18, 75, 92, 8?[10]

Operating SystemsChapter 6: Device ManagementDisk SchedulingNumerical: Disk scheduling SCAN LOOKVideo solution

Disk Scheduling: Objectives, SSTF Feasibility, SCAN and LOOK

1. Main Objective of Disk Scheduling Algorithms

The primary objective of disk scheduling is to minimize the total seek time (the time the disk arm spends moving between tracks), because seek time dominates disk access latency and the disk is one of the slowest components of a system.

Related objectives:

  • Maximize throughput (requests served per unit time)
  • Minimize disk arm movement by ordering requests intelligently
  • Ensure fairness so no request starves
  • Minimize average response and waiting time

2. Why SSTF Is Not Practically Feasible

SSTF (Shortest Seek Time First) always services the request nearest to the current head position.

  • Starvation: Requests far from the head may wait indefinitely if closer requests keep arriving. This is the main reason it is not practically feasible.
  • Unfairness: Requests to the innermost/outermost tracks are consistently delayed.
  • Not globally optimal: Minimizing each local step does not minimize total head movement.
  • Unpredictable response time: Hard to guarantee bounded waiting.

Because of starvation and unfairness, SSTF is attractive theoretically but unsuitable in practice.

3. Numerical Solution

Given data:

  • Total tracks: 100 (tracks $0$ to $99$)
  • Current head position: 35
  • Request queue: 52, 67, 21, 11, 43, 85, 18, 75, 92, 8
  • Assumed initial direction: toward higher track numbers (standard assumption)

Sorted requests: 8, 11, 18, 21, 43, 52, 67, 75, 85, 92


SCAN (Elevator)

Head moves up, servicing all requests, reaches end track 99, then reverses to service lower requests.

Order: $35 \to 43 \to 52 \to 67 \to 75 \to 85 \to 92 \to 99 \to 21 \to 18 \to 11 \to 8$

FromToDistance
35438
43529
526715
67758
758510
85927
92997
992178
21183
18117
1183

Alternatively, total movement = (up: $99-35=64$) + (down: $99-8=91$) = $155$.

$$\text{Total Seek (SCAN)} = 8+9+15+8+10+7+7+78+3+7+3 = \mathbf{155 \text{ tracks}}$$


LOOK

Same as SCAN but the head only goes as far as the last request (92) in the upward direction, not to track 99.

Order: $35 \to 43 \to 52 \to 67 \to 75 \to 85 \to 92 \to 21 \to 18 \to 11 \to 8$

FromToDistance
35438
43529
526715
67758
758510
85927
922171
21183
18117
1183

Alternatively, total movement = (up: $92-35=57$) + (down: $92-8=84$) = $141$.

$$\text{Total Seek (LOOK)} = 8+9+15+8+10+7+71+3+7+3 = \mathbf{141 \text{ tracks}}$$


Summary

AlgorithmTotal Seek Time
SCAN155 tracks
LOOK141 tracks

(If seek time per track is $t$ ms, multiply by $t$: SCAN $=155t$, LOOK $=141t$.)

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.