Disk Scheduling Algorithm
(LOOK , C-SCAN and C-LOOK Algorithm)
LOOK Disk Scheduling Algorithm
The LOOK Algorithm is one of the disk scheduling algorithms used in
operating systems. It is designed to reduce the average seek time and
improve the overall performance of the system .
Steps Involved in the LOOK Algorithm
Determine the initial direction of disk head movement.
Sort the pending disk requests in the order in which they will be
serviced.
Scan the disk in the chosen direction, servicing requests as they are
encountered.
When the last request in the current direction has been serviced,
reverse the direction and continue scanning until all requests have been
serviced.
05/28/2024 2
Example:
Suppose, a disk contains 200 tracks(0-199).Request queue contains track no.-
{176,79,34,60,92,11,41,114}.Current position of Read-Write head is 50.
Direction = towards larger value .Find total seek time.
Total seek time =(176-50) + (176-11)
=291 unit time
05/28/2024 3
C-SCAN Disk Scheduling Algorithm
The C-SCAN (Circular SCAN) algorithm is a disk scheduling algorithm that is
a variant of the SCAN algorithm. Like SCAN, it moves the disk arm across the
surface of the disk to service requests, but with some differences in behavior.
Steps Involved in the C-SCAN Algorithm
The disk arm is initially positioned at some known location, typically at one
end of the disk.
The disk arm starts moving in the predetermined direction and service until
the arm reaches the end of the disk in that direction.
When the arm reaches the end of the disk, it jumps to the other end of the
disk without servicing requests along the way.
Once the arm jumps to the other end of the disk, it resumes servicing
requests in the same way.
Example:
Suppose, a disk contains 200 tracks(0-199).Request queue contains track no.-
{176,79,34,60,92,11,41,114}.Current position of Read-Write head is 50.
Direction = towards larger value .Find total seek time.
Total seek time=(199-50) + (199-0) + (41-0)
=389 unit time
C-LOOK Disk Scheduling Algorithm
The C-LOOK (Circular LOOK) algorithm is a disk scheduling algorithm that
is a variant of the LOOK algorithm. We know that C-SCAN is used to avoid
starvation but the seek time of C-LOOK is better than the C-SCAN algorithm.
Steps Involved in the C-SCAN Algorithm
• Determine the initial position of the disk head.
• Sort the pending disk requests in the order in which they will be serviced.
• Scan the disk in the chosen direction, servicing requests as they are
encountered.
• When the last request in the current direction has been serviced,
immediately return to the beginning of the disk and repeat the process.
Example:
Suppose, a disk contains 200 tracks(0-199).Request queue contains track no.-
{176,79,34,60,92,11,41,114}.Current position of Read-Write head is 50.
Direction = towards larger value .Find total seek time
Total seek time =(176-50) +(176-11) +(41-11)
=321 unit time
How to choose when which disk
scheduling algorithm we should use
• When choosing a disk scheduling algorithm, it is important to consider factors
such as seek time, rotational latency, head movements, and the presence of
multiple queues.
• There is no one-size-fits-all disk scheduling algorithm that works optimally
for every scenario.
• The efficiency of a disk scheduling algorithm depends on factors such as
workload characteristics