Explore BrainMass

Calculating Distance for Algorithms

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

You will calculate the total distance that a disk arm moves to satisfy pending requests, for different disk scheduling algorithms.


1. Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in first-in-first-out (FIFO) order, is as follows:

92; 1,320; 879; 1,984; 1,023; 1,690; 1,123; 2,002; and 93

2. Calculate the total distance in cylinders starting from the current head position that the disk arm moves to satisfy all the pending requests for each of the following disk scheduling algorithms:


© BrainMass Inc. brainmass.com October 16, 2018, 9:37 pm ad1c9bdddf

Solution Preview

If you do not already have it, I recommend an excellent book called "Operating System Concepts" by Silberschatz, Galvin, and Gagne.

FCFS: First Come First Serve
The simplest and easiest to implement, you just process the requests in the order that they came in: 92 1320 879 1984 1023 1690 1123 2002 93
Total movement: from 143 to 92, to 1320, to 879, to 1984... = 51 + 1228 + 441 + 1105 + 961 + 667 + 879 + 1909 = 7241

SSTF: Shortest Seek Time First
Always process the request that requires moving the head the least from the current position. ...

Solution Summary

This solution discusses calculations of distance for algorithms.

Similar Posting

Disk Tracks Traversed Using Algorithms

Calculate and compare the number of disk tracks traversed using FCFS, SSTF, SCAN, and LOOK algorithms for the series of disk track service requests given below. At the time the first request arrives in the disk request queue, the read/write head is at track 50, moving toward the outer (lower-numbered) tracks. (Hint: Each track over which the disk arm passes counts in the total, whether or not the track is read).

82, 97, 35, 75, 53, 47, 17, 11.

View Full Posting Details