Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Elevator algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Example == The following is an example of how to calculate average disk seek times for both the SCAN and C-SCAN algorithms. * Example list of pending disk requests (listed by track number): 100, 50, 10, 20, 75. * The starting track number for the examples will be 35. * The list will need to be sorted in ascending order: 10, 20, 50, 75, 100. Both SCAN and C-SCAN behave in the same manner until they reach the last track queued. For the sake of this example let us assume that the SCAN algorithm is currently going from a lower track number to a higher track number (like the C-SCAN is doing). For both methods, one takes the difference in magnitude (i.e. absolute value) between the next track request and the current track. * '''Seek 1:''' 50 β 35 = 15 * '''Seek 2:''' 75 β 50 = 25 * '''Seek 3:''' 100 β 75 = 25 At this point both have reached the highest (end) track request. SCAN will just reverse direction and service the next closest disk request (in this example, 20) and C-SCAN will always go back to track 0 and start going to higher track requests. * '''Seek 4 (SCAN):''' 20 β 100 = 80 * '''Seek 5 (SCAN):''' 10 β 20 = 10 * '''Total (SCAN):''' 155 * '''Average (SCAN):''' 155 Γ· 5 = 31 * '''Seek 4 (C-SCAN):''' 0 β 100 = 0 head movement as cylinders are treated as a circular list (C-SCAN always goes back to the first track) * '''Seek 5 (C-SCAN):''' 10 β 0 = 10 * '''Seek 6 (C-SCAN):''' 20 β 10 = 10 * '''Total (C-SCAN):''' 85 * '''Average (C-SCAN):''' 85 Γ· 5 = 17 Even though six seeks were performed using the C-SCAN algorithm, only five I/Os were actually done.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)