0
0
Operating Systemsknowledge~10 mins

C-SCAN (circular SCAN) in Operating Systems - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to describe the direction of the disk arm in C-SCAN.

Operating Systems
The disk arm moves in one direction until it reaches the end, then it [1] to the beginning.
Drag options to blanks, or click blank then click option'
Ajumps
Breverses
Cstops
Dslows
Attempts:
3 left
💡 Hint
Common Mistakes
Thinking the arm reverses direction like in SCAN.
Assuming the arm stops at the end.
2fill in blank
medium

Complete the code to explain the main advantage of C-SCAN over SCAN.

Operating Systems
C-SCAN provides a more uniform wait time by servicing requests in a [1] direction only.
Drag options to blanks, or click blank then click option'
Asingle
Brandom
Cboth
Dreverse
Attempts:
3 left
💡 Hint
Common Mistakes
Thinking C-SCAN services requests in both directions.
Confusing C-SCAN with SCAN.
3fill in blank
hard

Fix the error in the description of C-SCAN's movement.

Operating Systems
In C-SCAN, the disk arm moves from the start to the end and then [1] back servicing requests on the return.
Drag options to blanks, or click blank then click option'
Areverses
Bstops
Cjumps
Dpauses
Attempts:
3 left
💡 Hint
Common Mistakes
Saying the arm reverses and services requests on the return.
Assuming the arm stops at the end.
4fill in blank
hard

Fill both blanks to complete the C-SCAN algorithm description.

Operating Systems
C-SCAN moves the disk arm from [1] to [2], servicing requests only in this direction.
Drag options to blanks, or click blank then click option'
Astart
Bmiddle
Cend
Drandom
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing middle or random as start or end points.
Confusing the direction of movement.
5fill in blank
hard

Fill all three blanks to complete the C-SCAN scheduling code snippet.

Operating Systems
requests = sorted(requests)
current_pos = [1]
for req in requests:
    if req >= current_pos:
        service(req)
current_pos = [2]
for req in requests:
    if req < current_pos:
        service(req)
current_pos = [3]
Drag options to blanks, or click blank then click option'
A0
Bmax_track
Dmiddle
Attempts:
3 left
💡 Hint
Common Mistakes
Using middle or random values instead of 0 or max_track.
Not resetting current_pos correctly.