The Wayback Machine - https://web.archive.org/web/20240811142802/https://www.geeksforgeeks.org/difference-between-scan-and-look-disk-scheduling-algorithms/
Open In App

Difference between SCAN and LOOK Disk scheduling algorithms

Last Updated : 24 Apr, 2023
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

SCAN disk scheduling algorithm: In SCAN disk scheduling algorithm, head starts from one end of the disk and moves towards the other end, servicing requests in between one by one and reach the other end. Then the direction of the head is reversed and the process continues as head continuously scan back and forth to access the disk. So, this algorithm works as an elevator and hence also known as the elevator algorithm. As a result, the requests at the mid range are serviced more and those arriving behind the disk arm will have to wait. LOOK disk scheduling algorithm: The LOOK algorithm services request similarly as SCAN algorithm meanwhile it also “looks” ahead as if there are more tracks that are needed to be serviced in the same direction. If there are no pending requests in the moving direction the head reverses the direction and start servicing requests in the opposite direction. The main reason behind the better performance of LOOK algorithm in comparison to SCAN is because in this algorithm the head is not allowed to move till the end of the disk. Difference between SCAN and LOOK Disk scheduling algorithms:

SR. NO. SCAN SCHEDULING LOOK SCHEDULING
1. This algorithm scans all the cylinder of the disk back and forth. This is the improved version of SCAN algorithm.
2. Head starts from one end of the disc and move towards the other processing all the requests coming in between. After it reaches the end, The head then reverses it’s direction and move towards the start again processing all the requests arising in between, the same process repeats itself. Head starts from the first request and moves to the other end processing all the requests arising in between. Once it reaches the last requests at the other end, head reversing it’s direction and returns to the first request processing all the requests in between.
3. It scans all the cylinders from one end to other even if there are no requests at the end. It scans all the cylinders from first request at the start point to the last request.
4. It causes the head to move till the last section of the disc even when there are no requests. It does not cause the head to move till the last section of the disc when there is no requests.
5. Less efficient. Compared to SCAN, LOOK is more efficient.
6. Assume we are going inwards (i.e.towards 0). Reduce variance compared to SCAN.

SCAN and LOOK are both disk scheduling algorithms that work by servicing requests in a predictable order. However, there are some key differences between the two algorithms:

Behavior at endpoint:
The SCAN algorithm always moves the head to the endpoint of the disk and then immediately reverses direction, while the LOOK algorithm only goes as far as the last request in the current direction and then reverses direction.

Servicing Order:
SCAN algorithm services all requests in its path, while LOOK algorithm only services requests in the current direction. It avoids servicing requests that are in the opposite direction, which can save some time.

Handling of empty disk areas:
The SCAN algorithm may waste time moving the head back and forth across empty regions of the disk, while the LOOK algorithm skips over empty regions, thereby reducing the total amount of time spent seeking.

Efficiency:
The LOOK algorithm is generally considered to be more efficient than the SCAN algorithm because it avoids servicing empty regions and can more quickly service requests that are close to the head.

In summary, the main difference between SCAN and LOOK disk scheduling algorithms is that the SCAN algorithm always moves the head to the endpoint of the disk and reverses direction, while the LOOK algorithm reverses direction only when it reaches the last request in the current direction. Additionally, LOOK is generally considered more efficient than SCAN, especially when there are long stretches of empty disk space.



Similar Reads

Difference between LOOK and C-LOOK Disk scheduling algorithms
1. LOOK disk scheduling algorithm : Look Algorithm is actually an improves version of SCAN Algorithm. In this algorithm, the head starts from first request at one side of disk and moves towards the other end by serving all requests in between. After reaching the last request of one end, the head reverse its direction and returns to first request, s
3 min read
Difference between C-LOOK and C-SCAN Disk Scheduling Algorithm
C-LOOK Disk Scheduling Algorithm C-LOOK is the modified version of both LOOK and C-scan algorithms. In this algorithm, the head starts from the first request in one direction and moves towards the last request at another end, serving all request in between. After reaching the last request in one end, the head jumps in another direction and move tow
3 min read
Difference between FCFS and SCAN disk scheduling algorithms
FCFS disk scheduling algorithm: As the name suggests, the FCFS Scheduling Algorithm processes requests in the sequential order in which they arrive in the disk queue. Even if a higher priority request arrives in the schedule later, FCFS will process the request in the order that they have arrived and hence we can say that FCFS has a fair policy. Ex
3 min read
Difference between SCAN and CSCAN Disk scheduling algorithms
Prerequisite - Disk Scheduling Algorithms 1. SCAN Disk Scheduling Algorithm : SCAN Disk Scheduling Algorithm is also known as Elevator algorithm. In this, head or pointer can move in both the direction i.e., disk arm starts to move from one end of the disk to the other end servicing all the requests until it reaches to the other end of the disk. Af
3 min read
SCAN (Elevator) Disk Scheduling Algorithms
Given an array of disk track numbers and initial head position, our task is to find the total number of seek operations to access all the requested tracks if the SCAN disk scheduling algorithm is used. In the SCAN Disk Scheduling Algorithm, the head starts from one end of the disk and moves towards the other end, servicing requests in between one b
11 min read
Difference between SSTF and LOOK disk scheduling algorithm
1. SSTF disk scheduling algorithm : SSTF stands for Shortest Seek Time First. As the name specify, this algorithm serves the task request which is closest to current position of head or pointer. Here, the direction of head plays an vital role in determining total head movement. If there occurs a tie between requests then the head will serve the req
3 min read
Difference between FCFS and C-LOOK disk scheduling algorithm
1. FCFS Disk Scheduling Algorithm FCFS stands for First Come First Serve, this algorithm entertains the task in the order they arrived in the disk queue. It is the simplest and easy to understand disk scheduling algorithm. In this, the head or pointer moves in the direction in which the task arrives and moves till all request is served. However, th
3 min read
Difference Between SSTF and C-LOOK Disk Scheduling Algorithm
The secondary storage scheduling algorithm known as SSTF decides how the disk's head and arm will move in response to read and write requests while in C-SCAN the head services request only in one direction(either left or right) until all the requests in this direction are not serviced and then jumps back to the farthest request in the other directi
7 min read
Difference between FCFS and C-SCAN disk scheduling algorithm
1. FCFS Disk Scheduling Algorithm : FCFS stands for First come first serve, this algorithm entertains the task in the order they arrived in the disk queue. It is the simplest and easy to understand disk scheduling algorithm. In this the head or pointer moves in the direction in which the task arrives and moves till all request is served. However, F
3 min read
Difference Between C-SCAN and SSTF Disk Scheduling Algorithm
In C-SCAN Algorithm it is necessary to take into account the direction, i.e., larger or smaller value. This algorithm serves disk requests by moving towards their conclusion while SSTF is a secondary storage scheduling method that decides how the disk's head and arm will move to fulfil read and write requests. In this article, you will discover the
5 min read
three90RightbarBannerImg