Suppose that a disk drive has 6,000 cylinders, numbered 0 to 5, 999. The drive i
ID: 3847600 • Letter: S
Question
Suppose that a disk drive has 6,000 cylinders, numbered 0 to 5, 999. The drive is currently serving a request at cylinder 3, 250, and the previous request was at cylinder 4, 805. The queue of pending requests, in FIFO order, is: 1515, 1212, 1296, 3800, 544, 618, 356, 2523, 5965, 4681 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? FCFS SSTF SCAN LOOKExplanation / Answer
a)FCFS(First come First Serve)
Solution:
Queue : 1515,1212,1296,3800,544,618,356,2523,5965,4681
Head: 3250
Seek order: 1515,1212,1296,3800,544,618,356,2523,5965,4681
Seek distance: (1212-3250)+(1212-3800)+(544-3800)+(544-618)+(356-618)+(356-5965)+(4681-5965)
= -2038-2588-3256-74-262-5906-1284
= -15111
b)SSTF(Shortest Seek Time First)
Solution:
Queue : 1515,1212,1296,3800,544,618,356,2523,5965,4681
Head: 3250
Seek order: 3800,4681,5965,2523,1515,1296,1212,618,544,356
Seek distance: (5965-3250)+(5965-356)
= 2715+5609
= 8324
c)SCAN
Solution:
Queue : 1515,1212,1296,3800,544,618,356,2523,5965,4681
Head: 3250
Seek order: 2523,1515,1296,1212,618,544,356,0,3800,4681,5965
Seek distance: (3250-0)+(5965-0)
= 3250 + 5965
= 9215
d) LOOK
Solution:
Queue : 1515,1212,1296,3800,544,618,356,2523,5965,4681
Head: 3250
Seek order: 2523,1515,1296,1212,618,544,356,3800,4681,5965
Seek distance: (3250-356)+(5965-356)
= 2894 + 5609
= 8503
= 8324
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.