CSC264 · 2081 · 10 marks
Find the seek time using SCAN, C-SCAN, Look and C-Look disk scheduling algorithms for processing the following request queue: 35, 70, 45, 15, 65, 20, 80, 90, 75, 130. Suppose the disk has tracks numbered from 0 to 150 and assume the disk arm to be at 30 and moving outward.
Find the seek time using SCAN, C-SCAN, Look and C-Look disk scheduling algorithms for processing the following request queue: 35, 70, 45, 15, 65, 20, 80, 90, 75, 130. Suppose the disk has tracks numbered from 0 to 150 and assume the disk arm to be at 30 and moving outward.[10]
Disk Scheduling Algorithms - Verified Solution
Given Data
- Request Queue: 35, 70, 45, 15, 65, 20, 80, 90, 75, 130
- Track range: 0 to 150
- Initial head position: 30
- Direction: Outward (toward higher tracks)
Sorted requests: 15, 20, 35, 45, 65, 70, 75, 80, 90, 130
1. SCAN
Head moves outward to 150, then reverses to service lower requests.
Order: 30 → 35 → 45 → 65 → 70 → 75 → 80 → 90 → 130 → 150 → 20 → 15
Total distance = (150 − 30) + (150 − 15) = 120 + 135 = 255 tracks
2. C-SCAN
Head moves outward to 150, jumps to 0, then continues servicing.
Order: 30 → 35 → ... → 130 → 150 → 0 → 15 → 20
Total = (150 − 30) + (150 − 0) + (20 − 0) = 120 + 150 + 20 = 290 tracks
(Equivalently, summing the individual steps: 5+10+20+5+5+5+10+40+20+150+15+5 = 290.)
3. LOOK
Head moves outward only to the last request (130), then reverses.
Order: 30 → 35 → ... → 130 → 20 → 15
Total = (130 − 30) + (130 − 15) = 100 + 115 = 215 tracks
4. C-LOOK
Head moves outward to last request (130), jumps to lowest request (15), continues outward.
Order: 30 → 35 → ... → 130 → 15 → 20
| Movement | From | To | Distance |
|---|---|---|---|
| 1 | 30 | 35 | 5 |
| 2 | 35 | 45 | 10 |
| 3 | 45 | 65 | 20 |
| 4 | 65 | 70 | 5 |
| 5 | 70 | 75 | 5 |
| 6 | 75 | 80 | 5 |
| 7 | 80 | 90 | 10 |
| 8 | 90 | 130 | 40 |
| 9 | 130 | 15 | 115 |
| 10 | 15 | 20 | 5 |
Total = (130 − 30) + (130 − 15) + (20 − 15) = 100 + 115 + 5 = 220 tracks
Summary
| Algorithm | Seek Time (tracks) |
|---|---|
| SCAN | 255 |
| C-SCAN | 290 |
| LOOK | 215 |
| C-LOOK | 220 |
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.