---
title: "Disk scheduling with 5000 cylinders"
subject: "Operating System"
chapter: 6
key: "semester_6/operating_system:disk-5000-cyl-fcfs-scan-look-cscan-sstf"
source: https://www.bctengineer.com/q/semester_6/operating_system/disk-5000-cyl-fcfs-scan-look-cscan-sstf
site: BCT Engineering
---

# Disk scheduling with 5000 cylinders

Operating System · Chapter 6: I/O Management and Disk Scheduling

- Asked in: 2072 Magh, 10 marks
- Video: [FCFS SSTF SCAN CSCAN LOOK CLOOK Solved Example in Hindi | Disk Scheduling Sums | OS Lectures](https://www.youtube.com/watch?v=dEt7mr9R_Z8) — Last moment tuitions
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/disk-5000-cyl-fcfs-scan-look-cscan-sstf
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-6

## Question

Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order is:
56, 1470, 913, 1774, 948, 1509, 1022, 1750, 130
Starting from the current head position, what is the total distance (in cylinder) that the disk arm moves to satisfy all the pending requests, for each of the following algorithms: FCFS, SCAN, LOOK, CSCAN, SSTF

## Short answer

For head at 143 moving upward, FCFS gives 7141 cylinders, SCAN to 4999 then reverse gives 9799, LOOK to 1774 then reverse gives 3349, C-SCAN with return jump counted gives 9985, SSTF gives 1805 cylinders.

## Answer

Disk: 5000 cylinders (0 to 4999), head at 143, previous request 125, so the head is moving **upward**. Queue (FIFO): 56, 1470, 913, 1774, 948, 1509, 1022, 1750, 130.

#### FCFS
**FCFS**: service order (head at 143): 56, 1470, 913, 1774, 948, 1509, 1022, 1750, 130
```text
  143 -> 56    = 87
   56 -> 1470  = 1414
 1470 -> 913   = 557
  913 -> 1774  = 861
 1774 -> 948   = 826
  948 -> 1509  = 561
 1509 -> 1022  = 487
 1022 -> 1750  = 728
 1750 -> 130   = 1620
Total = 87 + 1414 + 557 + 861 + 826 + 561 + 487 + 728 + 1620 = 7141
```

#### SCAN (up to 4999, then reverse)
**SCAN**: service order (head at 143): 913, 948, 1022, 1470, 1509, 1750, 1774, 130, 56
```text
  143 -> 913   = 770
  913 -> 948   = 35
  948 -> 1022  = 74
 1022 -> 1470  = 448
 1470 -> 1509  = 39
 1509 -> 1750  = 241
 1750 -> 1774  = 24
 1774 -> 4999  = 3225
 4999 -> 130   = 4869
  130 -> 56    = 74
Total = 770 + 35 + 74 + 448 + 39 + 241 + 24 + 3225 + 4869 + 74 = 9799
```

#### LOOK (up to 1774, then reverse)
**LOOK**: service order (head at 143): 913, 948, 1022, 1470, 1509, 1750, 1774, 130, 56
```text
  143 -> 913   = 770
  913 -> 948   = 35
  948 -> 1022  = 74
 1022 -> 1470  = 448
 1470 -> 1509  = 39
 1509 -> 1750  = 241
 1750 -> 1774  = 24
 1774 -> 130   = 1644
  130 -> 56    = 74
Total = 770 + 35 + 74 + 448 + 39 + 241 + 24 + 1644 + 74 = 3349
```

#### C-SCAN (up to 4999, jump to 0, continue upward)
**C-SCAN**: service order (head at 143): 913, 948, 1022, 1470, 1509, 1750, 1774, 56, 130
```text
  143 -> 913   = 770
  913 -> 948   = 35
  948 -> 1022  = 74
 1022 -> 1470  = 448
 1470 -> 1509  = 39
 1509 -> 1750  = 241
 1750 -> 1774  = 24
 1774 -> 4999  = 3225
 4999 -> 0     = 4999  (return jump)
    0 -> 56    = 56
   56 -> 130   = 74
Total = 770 + 35 + 74 + 448 + 39 + 241 + 24 + 3225 + 4999 + 56 + 74 = 9985
```

#### SSTF
**SSTF**: service order (head at 143): 130, 56, 913, 948, 1022, 1470, 1509, 1750, 1774
```text
  143 -> 130   = 13
  130 -> 56    = 74
   56 -> 913   = 857
  913 -> 948   = 35
  948 -> 1022  = 74
 1022 -> 1470  = 448
 1470 -> 1509  = 39
 1509 -> 1750  = 241
 1750 -> 1774  = 24
Total = 13 + 74 + 857 + 35 + 74 + 448 + 39 + 241 + 24 = 1805
```

#### Summary
| Algorithm | Total head movement (cylinders) |
|---|---|
| FCFS | 7141 |
| SCAN | 9799 |
| LOOK | 3349 |
| C-SCAN | 9985 (4986 if the return sweep is not counted) |
| SSTF | 1805 |

**Answer: FCFS 7141, SCAN 9799, LOOK 3349, C-SCAN 9985, SSTF 1805 cylinders.**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Head is at 143 and the previous request was at 125. Which way is the head moving?
   A. Upward (towards higher cylinders)
   B. Downward (towards 0)
   C. It is stationary
   D. Direction cannot be inferred
   Answer: A. The head moved from 125 to 143, so it is moving towards higher cylinders. (Key point: Direction of head)

2. How is the FCFS total computed here?
   A. Sum of distances in sorted cylinder order
   B. Distance from 0 to the highest request
   C. Sum of absolute differences between successive requests in FIFO order, starting from 143 (7141)
   D. Sum of distances to the nearest pending request each time
   Answer: C. FCFS does not reorder: 87+1414+557+861+826+561+487+728+1620 = 7141. (Key point: FCFS method)

3. Why is SCAN (9799) so much larger than LOOK (3349) here?
   A. LOOK serves fewer requests than SCAN
   B. SCAN goes all the way to cylinder 4999 before reversing, while LOOK turns at the last request 1774
   C. SCAN moves downward first
   D. LOOK ignores cylinders below the head
   Answer: B. SCAN travels 1774 to 4999 and back, adding about 6450 cylinders that LOOK avoids. (Key point: SCAN vs LOOK)

4. In C-SCAN the 9985 total includes which extra movement compared with SCAN-style sweep?
   A. A second reversal at 1774
   B. Serving 130 and 56 on the way down
   C. Nothing; it is the same as SCAN
   D. The return jump 4999 to 0 (4999) and then 0 to 56
   Answer: D. C-SCAN serves only upward, so after 4999 it returns to 0 and continues up: 3225+4999+56+74 for the last part. (Key point: C-SCAN return jump)

## Close variants set in other exams

- [Disk scheduling with 100 cylinders](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-100-cyl-fcfs-sstf-look-cscan-scan) — Operating System, chapter 6, asked 2×

## Related in Operating System

- [Disk scheduling with 50 cylinders](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-50-cyl-fcfs-sstf-scan-look-cscan) — Operating System, chapter 6
- [Disk scheduling with 150 cylinders](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-150-cyl-sstf-scan-cscan-look-fcfs) — Operating System, chapter 6, asked 2×
- [Disk scheduling, 1000 cylinders, head at 345](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-1000-cyl-fifo-sstf-scan) — Operating System, chapter 6
- [Disk scheduling: FCFS, SSF, SCAN at 53](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-200-cyl-fcfs-ssf-scan-53) — Operating System, chapter 6, asked 3×
- [Disk scheduling: FCFS, SSTF, SCAN, LOOK, C-SCAN](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-200-cyl-head-moving-60) — Operating System, chapter 6
- [Device driver; FCFS, SSF, SCAN numerical](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adevice-driver-disk-fcfs-ssf-scan) — Operating System, chapter 6, asked 2×
