N-Step-SCAN disk scheduling
Prerequisite – Disk Scheduling Algorithms The input output requests that is coming for the disk is scheduled by operating system and that scheduling of disk is known as disk scheduling. Disk scheduling is important since multiple requests comes from processes for disk but only one disk assigned to process at a time. Seek time is one of the crucial parameter in operating system. Requests are linked in queues henceforth seek time gets increased due to which system becomes slow. Algorithm which is used for disk scheduling is known as Disk Scheduling Algorithm whose purpose is to reduce total seek time. N-Step-SCAN Disk Scheduling : N-Step-SCAN also called as N-Step-Look which is actually a Disk Scheduling Algorithm. It helps in determining motion of Disk’s arm and also helps in servicing read and write requests. It divides the request queue into sub queues of length N. By doing this it ensures that the service guarantee objective is achieved. After this subsequent request are done they can not be allocated into N size sub queues since they are full by elevator algorithm. Therefore starvation is completely eliminated and the service within N requests is guaranteed. Algorithm for N-Step-SCAN Disk Scheduling :
- A buffer is created for N requests.
- All the requests that are kept in this buffer is serviced in any specific wipe.
- During this time all the new incoming requests can not be added to this buffer, this new requests will be kept in a separate buffer.
- Now here comes the role of I/O (Input Output) scheduler because when these top N requests are serviced, I/O (Input Output) scheduler chooses next N requests and this process goes on and on.
By doing this N-Step-SCAN allows better throughput and its devoid of thrust.
The N-Step-SCAN disk scheduling algorithm is a variation of the SCAN disk scheduling algorithm. Like SCAN, it works by scanning the disk surface in one direction and servicing requests along the way. However, instead of reversing direction at the end of the disk and servicing requests in the opposite direction, N-Step-SCAN divides the disk into N zones and scans each zone separately before moving on to the next zone.
The steps of the N-Step-SCAN disk scheduling algorithm are as follows:
- Divide the disk into N zones.
- Service all requests in the first zone in the scanning direction.
- Move to the next zone and repeat step 2 until all zones have been serviced.
- When the last zone has been serviced, restart the scanning direction and repeat steps 2 and 3 until all requests have been serviced.
By dividing the disk into zones and scanning each zone separately, N-Step-SCAN can improve disk scheduling performance by reducing the amount of time required to change scanning direction. This can be particularly beneficial in systems with high disk I/O loads.
One potential disadvantage of N-Step-SCAN is that the zone size must be carefully chosen to balance the competing goals of reducing head movement and ensuring a reasonably uniform distribution of requests across zones. If the zone size is too small, there may be excessive head movement as the disk seeks between zones. If the zone size is too large, some zones may be over- or underutilized, leading to suboptimal performance.
Overall, N-Step-SCAN is a useful disk scheduling algorithm that can improve performance in certain circumstances, particularly in systems with high disk I/O loads. However, it requires careful tuning to achieve optimal performance and may not be the best choice for all systems.
Advantages of N-Step-SCAN disk scheduling algorithm:
- Reduces head movement: By dividing the disk into zones and scanning each zone separately, N-Step-SCAN can reduce the amount of head movement required to service requests, which can improve overall disk I/O performance.
- Improves throughput: By reducing head movement and improving disk I/O performance, N-Step-SCAN can improve overall system throughput, particularly in systems with high disk I/O loads.
- Allows for fine-tuning: The zone size in N-Step-SCAN can be adjusted to balance the competing goals of reducing head movement and ensuring a reasonably uniform distribution of requests across zones, allowing for fine-tuning to achieve optimal performance.
Disadvantages of N-Step-SCAN disk scheduling algorithm:
- Complexity: N-Step-SCAN is more complex than some other disk scheduling algorithms, which can make it more difficult to implement and maintain.
- Requires careful tuning: The zone size in N-Step-SCAN must be carefully chosen to achieve optimal performance, which can require additional effort and expertise.
- May not be optimal for all systems: The benefits of N-Step-SCAN may not be realized in all systems, particularly those with low disk I/O loads or very large disk sizes.
- Overall, N-Step-SCAN is a useful disk scheduling algorithm that can improve performance in certain circumstances, particularly in systems with high disk I/O loads. However, it requires careful tuning and may not be the best choice for all systems.
Here are some important points to keep in mind about the N-Step-SCAN disk scheduling algorithm:
- The N-Step-SCAN algorithm is a variation of the SCAN algorithm that divides the disk into N sections and services requests in each section before moving on to the next section.
- The value of N can be adjusted to suit different disk configurations and workload patterns.
- N-Step-SCAN may not be optimal in situations with a large amount of data to be read or written in one direction, as it may lead to a large
- number of requests being queued up in the opposite direction.
- The algorithm may not be suitable for real-time systems where fast response times are critical.
- N-Step-SCAN is relatively simple to implement and does not require a large amount of memory or processing power.
Some books that cover the topic of disk scheduling algorithms and operating systems in general include:
- Operating System Concepts by Abraham Silberschatz, Peter B. Galvin, and Greg Gagne
- Modern Operating Systems by Andrew S. Tanenbaum and Herbert Bos
- Operating Systems: Three Easy Pieces by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau
- Understanding the Linux Kernel by Daniel P. Bovet and Marco Cesati
- These books provide a comprehensive introduction to operating systems and cover a wide range of topics, including disk scheduling algorithms, process scheduling, memory management, file systems, and more.



Please Login to comment...