Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4, 999. The drive i
ID: 3823379 • 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: 286, 1570, 933, 1785, 953, 1545, 1022, 1735, 136 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. LOOK e. C-SCAN f. C-LOOK.Explanation / Answer
Pending queue requests:
286, 1570, 933, 1785, 953, 1545, 1022, 1735, 136
1. FCFS- For First come first server, the request will be scheduled in arrival FIFO order
so since current is serving 2150, so for first
= (2150-286) + (1570-286) + (1570-933) + (1785-933) + (1785-953) + (1545-953) + (1545-1022) + (1735-1022) + (1735-136)
= 1864 + 1284 + 637 + 852 + 832 + 592 + 523 + 713 + 1599
= 8896
2. SSTF- This is an improvement upon a first-come first-served (FCFS) algorithm.
The drive maintains an incoming buffer of requests, and tied with each request is a cylinder number of the request.
The shortest seek first algorithm is the one which determines which request is closest to the current position of the head, and then services that request next.
Do calculation self as explained above.
3. SCAN- in this algorithm, disc arm moves in one direction and services all the requests coming in its path and when it reaches the end, it reverses the direction and again services request coming in path. It gives high throughput, but sometimes gives long waiting time for some locations who have been visited by disc arm recently.
4. LOOK- It is very similar to scan algorithm but instead of going to end, it reverses from the last request instead of going till end. So, it prevents the extra delay it causes due to unnecessary traversal to the end of the disk
5. C-SCAN- Just like SCAN but instead of reversing from other end, it goes back to the front of the head and then goes to the other end again.This could be considered as a circular fashion of processing requests.
6. C-LOOK - Similar to C-Scan algorithm. In CLOOK, the disk arm inspite of going to end goes only till the last request to be serviced in front of head and then from there goes to the other end's last request.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.