Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Operating Systems Suppose that a disk drive has 500 cylinders, numbered 0 to 499

ID: 3855292 • Letter: O

Question

Operating Systems

Suppose that a disk drive has 500 cylinders, numbered 0 to 499. The drive is currently serving a request at cylinder 140, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is 10, 470, 90, 170, 90, 150, 100, 250, 160 Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following disk-scheduling algorithms?

a. FCFS    =

b. SSTF     =

c. SCAN     =   

d. C-LOOK     =

e. C-SCAN    =

Explanation / Answer

Details of every request in each algorithm is given below. Based on this total distance is calculated.


a. FCFS = 1480

b. SSTF = 650

c. SCAN = 819

d. C-LOOK = 449

e. C-SCAN = 420

RequestQ 10, 470, 90, 170, 90, 150, 100, 250, 160 FCFS First Come First Served Starting at 140 Next Track Tracks traversed 10 130 470 460 90 380 170 80 90 80 150 60 100 50 250 150 160 90 Total tracks traversed 1480 SSTF Shortest Seek Time First Starting at 140 Next Track Tracks traversed 150 10 160 10 170 10 100 70 It has to select between 100 and 250. 250-170=80, hence it selects 100 as 70 tracks are to be traversed. 90 10 90 0 10 80 250 240 470 220 Total tracks traversed 650 SCAN 125,140.. Going up like an escalator Next Track Tracks traversed 150 10 160 10 170 10 250 80 470 220 499 29 Goes all the way to top 90 380 90 0 10 80 Total tracks traversed 819 C-SCAN Circular SCAN 125,140.. Next Track Tracks traversed 150 10 160 10 170 10 250 80 470 220 499 29 0 Time to return to beginning is shorter than traversing 500 tracks 10 10 Start in the same direction again unlike SCAN which is like an elevator 90 80 90 0 Total tracks traversed 449 C-LOOK 125,140.. Next Track Tracks traversed 150 10 160 10 170 10 250 80 470 220 Does not go to the top if there are no service requests above 470 0 10 10 Start in the same direction again unlike SCAN which is like an elevator 90 80 90 0 Total tracks traversed 420


a. FCFS = 1480

b. SSTF = 650

c. SCAN = 819

d. C-LOOK = 449

e. C-SCAN = 420