0% found this document useful (0 votes)
17 views4 pages

DISK SCHEDULING - Numerical

The document outlines various disk scheduling algorithms including FCFS, SSTF, SCAN, C-SCAN, and C-LOOK, detailing their request servicing order and total head movement in tracks. The total head movements for each algorithm are as follows: FCFS - 700 tracks, SSTF - 245 tracks, SCAN - 255 tracks, C-SCAN - 335 tracks, and C-LOOK - 295 tracks. The SSTF algorithm resulted in the least head movement, while FCFS had the highest.

Uploaded by

iamtahereditz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

DISK SCHEDULING - Numerical

The document outlines various disk scheduling algorithms including FCFS, SSTF, SCAN, C-SCAN, and C-LOOK, detailing their request servicing order and total head movement in tracks. The total head movements for each algorithm are as follows: FCFS - 700 tracks, SSTF - 245 tracks, SCAN - 255 tracks, C-SCAN - 335 tracks, and C-LOOK - 295 tracks. The SSTF algorithm resulted in the least head movement, while FCFS had the highest.

Uploaded by

iamtahereditz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DISK SCHEDULING

Given:

• Request queue: 15, 27, 137, 18, 150, 65, 194

• Disk tracks: 0 to 199

• Starting head position: 128

1️)FCFS (First Come First Serve)

Order of servicing = As given:

Movement:

• 128 → 15 → 27 → 137 → 18 → 150 → 65 → 194

Calculations:

• |128 - 15| = 113

• |15 - 27| = 12

• |27 - 137| = 110

• |137 - 18| = 119

• |18 - 150| = 132

• |150 - 65| = 85

• |65 - 194| = 129

Total Head Movement = 113 + 12 + 110 + 119 + 132 + 85 + 129 = 700 tracks

2️) SSTF (Shortest Seek Time First)

Serve nearest request first.

Sorted requests for checking: 15, 18, 27, 65, 137, 150, 194

Step-by-step:

• From 128 → nearest = 137 (|137-128| = 9)

• From 137 → nearest = 150 (|150-137| = 13)

• From 150 → nearest = 194 (|194-150| = 44)

• From 194 → nearest = 65 (|194-65| = 129)

• From 65 → nearest = 27 (|65-27| = 38)

• From 27 → nearest = 18 (|27-18| = 9)


• From 18 → nearest = 15 (|18-15| = 3)

Movement:

• 128 → 137 → 150 → 194 → 65 → 27 → 18 → 15

Calculations:

• 9 + 13 + 44 + 129 + 38 + 9 + 3 = 245 tracks

Total Head Movement = 245 tracks

3️) SCAN (Elevator Algorithm)

Move right, serve all requests, reach end (199), reverse direction.

First find greater and closest to current head


for reverse find smaller and closest

Movement:

• 128 → 137 → 150 → 194 → 199 (end) reverse 65 → 27 → 18 → 15

Calculations:

• |128-137| = 9

• |137-150| = 13

• |150-194| = 44

• |194-199| = 5

• |199-65| = 134

• |65-27| = 38

• |27-18| = 9

• |18-15| = 3

Total = 9 + 13 + 44 + 5 + 134 + 38 + 9 + 3 = 255 tracks

Total Head Movement = 255 tracks

4️) C-SCAN (Circular SCAN)

Move right till end (199), jump to 0, continue serving.

Movement:
• 128 → 137 → 150 → 194 → 199 Jump to 0 15 → 18 → 27 → 65

Calculations:

• |128-137| = 9

• |137-150| = 13

• |150-194| = 44

• |194-199| = 5

• Jump 1️99 → 0 = 199

• |0-15| = 15

• |15-18| = 3

• |18-27| = 9

• |27-65| = 38

Total = 9 + 13 + 44 + 5 + 199 + 15 + 3 + 9 + 38 = 335 tracks

Total Head Movement = 335 tracks

5️) C-LOOK

Move right till highest request (194), jump to lowest (15), continue.

Movement:

• 128 → 137 → 150 → 194 Jump to 15 18 → 27 → 65

Calculations:

• |128-137| = 9

• |137-150| = 13

• |150-194| = 44

• Jump 1️94️ → 1️5️ = 179

• |15-18| = 3

• |18-27| = 9

• |27-65| = 38

Total = 9 + 13 + 44 + 179 + 3 + 9 + 38 = 295 tracks


Total Head Movement = 295 tracks

Final Summary Table:

Algorithm Total Head Movement (tracks)

FCFS 700

SSTF 245

SCAN 255

C-SCAN 335

C-LOOK 295

You might also like