1. LPU MCA Semester 1
  2. CAP366
  3. Unit 8

CAP366 · Unit 8: Protection and disk management

Disk structure and disk scheduling (FCFS, SSTF, SCAN, C-SCAN)

10 practice questions · in the ETE syllabus

Key points

  • Access time = seek + rotational latency + transfer
  • SSTF can cause starvation
  • SCAN goes to the disk end; LOOK stops at the last request
  • C-SCAN gives more uniform waiting

A disk consists of platters with tracks; the same track on all platters forms a cylinder. Access time = seek time (moving the head to the cylinder) + rotational latency (waiting for the sector to rotate under the head) + transfer time. Scheduling mainly reduces seek time.

PolicyRuleNotes
FCFSServe in arrival orderFair but long movement
SSTFNearest cylinder firstCan starve far requests
SCANSweep to one end, then reverseElevator algorithm
C-SCANSweep one way, jump back to startMore uniform waits
LOOK / C-LOOKTurn at the last request, not the disk endLess movement

Worked example: head at 53, queue 98, 183, 37, 122, 14, 124, 65, 67, cylinders 0-199: FCFS travels 640 cylinders, SSTF 236 (order 65, 67, 37, 14, 98, 122, 124, 183), SCAN going toward 0 first also 236, C-SCAN going up and counting the return jump 382, and LOOK going up 299.

Exam trap: state whether the return trip of C-SCAN is counted; and SCAN goes to the physical end of the disk, whereas LOOK stops at the last request.

Try two questions

Question 1 · Tier 2, Understand

How does C-SCAN differ from SCAN?

  1. It returns from one end to the start without serving requests, giving more uniform waits
  2. It serves requests while sweeping in both directions, giving equal waits to every cylinder
  3. It always serves the nearest pending request first, wherever the head is
  4. It reverses direction at the last request in the queue, not at the disk end
Show the answer

A. C-SCAN treats the cylinders as circular, serving in one direction only.

Why not B: Serving in both directions is SCAN.

Why not C: That is SSTF.

Why not D: That is the LOOK variant.

Question 2 · Tier 4, Analyse

With the same queue (head at 53; 98, 183, 37, 122, 14, 124, 65, 67; cylinders 0 to 199), SCAN, initially moving toward cylinder 0 and going to the end, travels how many cylinders?

  1. 183 cylinders
  2. 331 cylinders
  3. 299 cylinders
  4. 236 cylinders
Show the answer

D. The head goes 53 down to 0 (53) and then up to 183 (183), giving 236.

Why not A: 183 is the distance from 0 to the farthest request only.

Why not B: 331 is SCAN moving up first.

Why not C: 299 is LOOK moving up first.