Join Whatsapp Channel for Ignou latest updates JOIN NOW

On a disk with 1000 cylinders, numbers 0 to 999, compute the number of tracks the disk arm must move to satisfy all the requests in the disk queue. Assume that the head is initially at cylinder 123. Suppose the requests have arrived, forming the following disk queue:123, 874, 692, 475, 105, 376, 499, 542, 789, 645, 12, 923 (i) Perform the computation for the following disk scheduling algorithms: (a) FCFS (b) SSTF (c) SCAN (d) LOOK (ii) Depict the corresponding schemes in the form of a diagram

To compute the number of tracks the disk arm must move for each disk scheduling algorithm, we’ll follow these steps:

  1. FCFS (First-Come, First-Served):
  • The disk arm moves linearly through the requests in the order they arrived.
  1. SSTF (Shortest Seek Time First):
  • The disk arm moves to the request that is closest to its current position.
  1. SCAN:
  • The disk arm scans in one direction until it reaches the end of the disk and then reverses direction, serving requests along the way.
  1. LOOK:
  • Similar to SCAN, but the disk arm only scans as far as necessary in each direction, without going all the way to the end of the disk.

Let’s compute the number of tracks for each algorithm:

(i) FCFS (First-Come, First-Served):

  1. Start at cylinder 123.
  2. Move to cylinder 874 (751 tracks).
  3. Move to cylinder 692 (182 tracks).
  4. Move to cylinder 475 (217 tracks).
  5. Move to cylinder 105 (370 tracks).
  6. Move to cylinder 376 (271 tracks).
  7. Move to cylinder 499 (123 tracks).
  8. Move to cylinder 542 (43 tracks).
  9. Move to cylinder 789 (247 tracks).
  10. Move to cylinder 645 (144 tracks).
  11. Move to cylinder 12 (633 tracks).
  12. Move to cylinder 923 (911 tracks).

Total tracks moved: 3894 tracks

(ii) SSTF (Shortest Seek Time First):

  1. Start at cylinder 123.
  2. Move to cylinder 105 (18 tracks).
  3. Move to cylinder 12 (93 tracks).
  4. Move to cylinder 376 (364 tracks).
  5. Move to cylinder 475 (99 tracks).
  6. Move to cylinder 499 (24 tracks).
  7. Move to cylinder 542 (43 tracks).
  8. Move to cylinder 645 (103 tracks).
  9. Move to cylinder 692 (47 tracks).
  10. Move to cylinder 789 (97 tracks).
  11. Move to cylinder 874 (85 tracks).
  12. Move to cylinder 923 (49 tracks).

Total tracks moved: 1022 tracks

(iii) SCAN:

Assuming the head moves from left to right:

  1. Start at cylinder 123.
  2. Move to cylinder 0 (123 tracks).
  3. Move to cylinder 12 (12 tracks).
  4. Move to cylinder 105 (93 tracks).
  5. Move to cylinder 376 (271 tracks).
  6. Move to cylinder 475 (99 tracks).
  7. Move to cylinder 499 (24 tracks).
  8. Move to cylinder 542 (43 tracks).
  9. Move to cylinder 645 (103 tracks).
  10. Move to cylinder 692 (47 tracks).
  11. Move to cylinder 789 (97 tracks).
  12. Move to cylinder 874 (85 tracks).
  13. Move to cylinder 923 (49 tracks).
  14. Move to cylinder 999 (76 tracks).

Total tracks moved: 1209 tracks

(iv) LOOK:

Assuming the head moves from left to right:

  1. Start at cylinder 123.
  2. Move to cylinder 12 (111 tracks).
  3. Move to cylinder 105 (93 tracks).
  4. Move to cylinder 376 (271 tracks).
  5. Move to cylinder 475 (99 tracks).
  6. Move to cylinder 499 (24 tracks).
  7. Move to cylinder 542 (43 tracks).
  8. Move to cylinder 645 (103 tracks).
  9. Move to cylinder 692 (47 tracks).
  10. Move to cylinder 789 (97 tracks).
  11. Move to cylinder 874 (85 tracks).
  12. Move to cylinder 923 (49 tracks).

Total tracks moved: 1002 tracks

(ii) Depiction of the Schemes:

FCFS: 123 -> 874 -> 692 -> 475 -> 105 -> 376 -> 499 -> 542 -> 789 -> 645 -> 12 -> 923
SSTF: 123 -> 105 -> 12 -> 376 -> 475 -> 499 -> 542 -> 645 -> 692 -> 789 -> 874 -> 923
SCAN: 123 -> 0 -> 12 -> 105 -> 376 -> 475 -> 499 -> 542 -> 645 -> 692 -> 789 -> 874 -> 923 -> 999
LOOK: 123 -> 12 -> 105 -> 376 -> 475 -> 499 -> 542 -> 645 -> 692 -> 789 -> 874 -> 923
error: Content is protected !!