Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is
ID: 3702294 • Letter: S
Question
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 2,150, and the previous request was at cylinder 1,805. The queue of pending requests, in FIFO order is as below: 2069, 1212, 2296, 2800, 544, 1618, 356, 1523, 4965, 3681 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) LOOK
b) C-LOOK
Explanation / Answer
Answer---
a) LOOK disk-scheduling algorithms:--- It is similar to the SCAN disk scheduling algorithm except the difference that the disk arm in spite of going to the end of the disk goes only to the last request to be serviced in front of the head and then reverses its direction from there only.
So,
The LOOK schedule is 2150, 2296, 2800, 3681, 4965, 2069, 1618, 1523, 1212, 544, 356 .
The total seek distance is 146 + 504 + 881 + 1284 + 2896 + 451 + 95 + 311 + 668 + 188 = 7424 .
b). C-LOOK disk-scheduling algorithms:---- As LOOK is similar to SCAN algorithm, in similar way, CLOOK is similar to CSCAN disk scheduling algorithm. In CLOOK, the disk arm inspite of going to the end goes only to the last request to be serviced in front of the head and then from there goes to the other end’s last request.
So,
The C- LOOK schedule is 2150, 2296, 2800, 3681, 4965, 356, 544, 1212, 1523, 1618, 2069..
The total seek distance is 146 + 504 + 881 + 1284 + 4609 + 188 + 668 + 311 + 95 + 451 = 9137.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.