1 Mark Question Four Suppose that a disk drive has 5,000 cylinders, numbered 0 t
ID: 3700148 • Letter: 1
Question
1 Mark Question Four 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 Answer: [0.5 markl b) C-LOOK 0.5 mark] AnswerExplanation / Answer
LOOK:
In Look Algorithm the next cylinder that will be served is the nearest on to the current cylinder. The nearst one to the current cylinder(2150) is 2069. And It moves till the end of the queue i.e 356 and servers in between each requests and again it get to the other end of the queue which is 4965.
The total distance covered id (2150 – 356)+(4965-356) = 6403.
C-LOOK:
The C-Look is similar Look Algorithm, but it will start executing the end and comes towads the middle.
For the above givn problem the Disk head is currently at 2150 and the nearst request is 2069, so it moves towards 0 untill 356 and comes back to 4965 and starts towards 0 and stops at 2296
The total distance is (2150 - 356) + (4965-365) + (4965-2296) = 9123
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.