Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is c

ID: 3555570 • Letter: S

Question

Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 103. The queue of pending requests is:

182, 137, 910, 1707, 848, 1309, 432, 1021, 20, 1720, 135.

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 algorithms:

1. FCFS
2. SSTF
3. SCAN

4. LOOK

Please provide detailed calculations, not just the final answer.

For some algorithms (SCAN, LOOK) there are two solutions not just one. Please provide both solutions for these algorithms.

Explanation / Answer

1. FCFS = first come first serve.

So, starting from 103, it would go to 182 & moves 79 units.

next, it moves to 137, so another 45.

going in this manner, the result is 79+45 +773 + 797 + 859 + 461 + 877 + 589 + 1001 + 1700 + 1585 = 8766 units

2. SSTF is shortest seek time first.

Thus the order followed is 103,135,137,182,20,432,848,910,1021,1309,1707,1720

Total distance = 32+2+45+162+412+416+62+111+686+13 = 1941 units

3. During SCAN, the disk moves in one direction till the end of the cylinder and then visits the left-out ones.

Assuming it goes up to 4999, the sequence of visited cylinders are

103,135,137,182,432,848,910,1021,1309,1707,1720,4999,20

The distance travelled is= 4896+4979= 9875 units

Assuming it goes down and then goes up, the sequence is

103,20,0,135,137,182,432,848,910,1021,1309,1707,1720

Distance travelled=103+1720=1823 units

4. LOOK is like SCAN but it doesn't go to the end but reverses if no more cylinders are present.

The sequence for the first case taken in SCAN is

103,135,137,182,432,848,910,1021,1309,1707,1720,20

The distance is 1617+1700=3317 units

The sequence in the second case is

103,20,135,137,182,432,848,910,1021,1309,1707,1720

The distance is 83+1700=1783 units

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote