Bird
Raised Fist0
Operating Systemsknowledge~20 mins

C-SCAN (circular SCAN) in Operating Systems - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
C-SCAN Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does C-SCAN differ from SCAN in disk scheduling?

Which statement best describes the difference between C-SCAN and SCAN disk scheduling algorithms?

AC-SCAN moves the disk arm in one direction only and jumps back to the start without servicing requests on the return, while SCAN moves back and forth servicing requests in both directions.
BC-SCAN moves the disk arm back and forth servicing requests in both directions, while SCAN moves in one direction only and jumps back to the start.
CBoth C-SCAN and SCAN move the disk arm randomly to service requests without any fixed direction.
DC-SCAN services requests only at the start and end of the disk, while SCAN services requests only in the middle tracks.
Attempts:
2 left
💡 Hint

Think about how the disk arm moves and whether it services requests on the return trip.

🚀 Application
intermediate
2:00remaining
Calculate total head movement using C-SCAN

Given a disk with 200 tracks (0 to 199), the disk arm is currently at track 50, and the request queue is [95, 180, 34, 119, 11]. Using C-SCAN, what is the total head movement to service all requests?

A389 tracks
B339 tracks
C299 tracks
D391 tracks
Attempts:
2 left
💡 Hint

Remember C-SCAN moves in one direction servicing requests, then jumps back to the start track without servicing requests on the return.

🔍 Analysis
advanced
2:00remaining
Analyze the advantage of C-SCAN over SCAN

Why is C-SCAN considered to provide a more uniform wait time compared to SCAN?

ABecause C-SCAN jumps back to the start without servicing requests, it treats all requests equally regardless of their position on the disk.
BBecause C-SCAN services requests only in one direction, it prevents starvation of requests at the start of the disk.
CBecause C-SCAN moves the arm back and forth, it services requests faster than SCAN.
DBecause C-SCAN services requests randomly, it balances the load better than SCAN.
Attempts:
2 left
💡 Hint

Think about how the jump back to the start affects request waiting times.

❓ Comparison
advanced
2:00remaining
Compare C-SCAN and LOOK algorithms

Which of the following correctly compares C-SCAN and LOOK disk scheduling algorithms?

ABoth C-SCAN and LOOK move the arm to the end of the disk before reversing direction.
BC-SCAN moves the arm only as far as the last request in each direction, while LOOK always moves to the end of the disk before reversing.
CLOOK moves the arm only as far as the last request in each direction, while C-SCAN always moves to the end of the disk before jumping back.
DLOOK and C-SCAN both service requests randomly without any fixed direction.
Attempts:
2 left
💡 Hint

Consider how far the disk arm moves in each algorithm relative to the requests.

❓ Reasoning
expert
2:00remaining
Identify the impact of C-SCAN on disk arm movement in heavy load

In a system with heavy disk request load uniformly distributed across all tracks, what is the main impact of using C-SCAN on disk arm movement compared to FCFS (First-Come, First-Served)?

AC-SCAN causes starvation of requests near the start of the disk under heavy load, increasing overall movement.
BC-SCAN reduces the total disk arm movement by servicing requests in a fixed direction, avoiding random jumps typical in FCFS.
CC-SCAN and FCFS have the same disk arm movement under heavy load because all requests must be serviced anyway.
DC-SCAN increases disk arm movement because it always moves to the end of the disk even if no requests are there, unlike FCFS which moves directly to requested tracks.
Attempts:
2 left
💡 Hint

Think about how the order of servicing requests affects arm movement.

Practice

(1/5)
1. What is the main characteristic of the C-SCAN disk scheduling algorithm?
easy
A. The disk arm moves back and forth serving requests in both directions.
B. The disk arm moves in one direction and jumps back to the start without serving requests on return.
C. The disk arm serves requests randomly without any specific order.
D. The disk arm serves only the nearest request to its current position.

Solution

  1. Step 1: Understand C-SCAN movement

    C-SCAN moves the disk arm in one direction only, serving requests along the way.
  2. Step 2: Identify behavior at the end of the disk

    After reaching the last track, it jumps back to the first track without serving requests during the return.
  3. Final Answer:

    The disk arm moves in one direction and jumps back to the start without serving requests on return. -> Option B
  4. Quick Check:

    C-SCAN moves one way and jumps back = A [OK]
Hint: Remember: C-SCAN moves one way, then jumps back [OK]
Common Mistakes:
  • Thinking C-SCAN moves back and forth like SCAN
  • Assuming requests are served during the return jump
  • Confusing C-SCAN with random or nearest request scheduling
2. Which of the following is the correct way to describe the jump in C-SCAN?
easy
A. The disk arm jumps back to the first track without serving any requests during the jump.
B. The disk arm stops and waits for new requests before moving.
C. The disk arm reverses direction and serves requests immediately.
D. The disk arm jumps back to the first track and serves requests on the way.

Solution

  1. Step 1: Analyze the jump behavior in C-SCAN

    C-SCAN jumps back to the first track after reaching the last track.
  2. Step 2: Check if requests are served during the jump

    Requests are not served during this jump; the arm moves quickly without processing.
  3. Final Answer:

    The disk arm jumps back to the first track without serving any requests during the jump. -> Option A
  4. Quick Check:

    Jump without serving requests = D [OK]
Hint: Jump skips requests, no service during return [OK]
Common Mistakes:
  • Assuming requests are served during the jump
  • Confusing jump with reversing direction
  • Thinking the arm waits before jumping
3. Consider a disk with tracks numbered 0 to 199. The disk arm is currently at track 50 and requests are at tracks 95, 180, 34, and 119. Using C-SCAN, which track will the arm serve immediately after 50?
medium
A. 95
B. 34
C. 119
D. 180

Solution

  1. Step 1: Identify requests ahead of current position

    Requests are at 34, 95, 119, 180. Current position is 50. C-SCAN moves forward only, so it serves requests with track numbers greater than 50 first: 95, 119, 180.
  2. Step 2: Find the nearest request ahead

    The nearest request ahead is at track 95, so it will be served immediately after 50.
  3. Final Answer:

    95 -> Option A
  4. Quick Check:

    Next request after 50 going forward = 95 [OK]
Hint: Serve next higher track number after current position [OK]
Common Mistakes:
  • Serving requests behind current position before forward ones
  • Choosing the closest track number regardless of direction
  • Confusing C-SCAN with SCAN which moves back and forth
4. A student wrote that in C-SCAN, the disk arm serves requests while moving back to the first track after reaching the last track. What is wrong with this statement?
medium
A. C-SCAN does not move back to the first track; it reverses direction instead.
B. C-SCAN serves requests randomly, so direction does not matter.
C. C-SCAN serves requests only while moving forward, not during the jump back.
D. C-SCAN serves requests only at the last track.

Solution

  1. Step 1: Review C-SCAN jump behavior

    C-SCAN moves forward serving requests, then jumps back to the first track without serving requests during the jump.
  2. Step 2: Identify the error in the student's statement

    The student incorrectly said requests are served during the jump back, which is false.
  3. Final Answer:

    C-SCAN serves requests only while moving forward, not during the jump back. -> Option C
  4. Quick Check:

    Requests served only forward, not on jump = C [OK]
Hint: Requests served only forward, jump is skip [OK]
Common Mistakes:
  • Thinking C-SCAN reverses direction instead of jumping
  • Assuming requests are served during the jump
  • Confusing C-SCAN with SCAN algorithm
5. Given a disk with tracks 0 to 199, the disk arm is at track 150. Requests are at tracks 10, 170, 15, 190, and 30. Using C-SCAN, what is the order in which the disk arm will serve these requests?
hard
A. 30, 15, 10, 190, 170
B. 10, 15, 30, 170, 190
C. 190, 170, 30, 15, 10
D. 170, 190, 10, 15, 30

Solution

  1. Step 1: Identify requests ahead of current position 150

    Requests ahead are 170 and 190. C-SCAN serves these first moving forward.
  2. Step 2: After reaching last track, jump to start and serve remaining requests

    After 190, the arm jumps to track 0 and serves requests at 10, 15, and 30 in ascending order.
  3. Final Answer:

    170, 190, 10, 15, 30 -> Option D
  4. Quick Check:

    Serve forward requests, jump, then serve from start = A [OK]
Hint: Serve forward requests first, then jump and serve from start [OK]
Common Mistakes:
  • Serving requests behind current position before forward ones
  • Serving requests in descending order
  • Ignoring the jump and serving requests in wrong order
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard