Open In App

N-Step-SCAN disk scheduling

The input-output requests that are coming from the disk are scheduled by the operating system and that scheduling of the disk is known as disk scheduling. Disk scheduling is important since multiple requests come from processes for disk but only one disk is assigned to process at a time. Seek time is one of the crucial parameters in the operating system. Requests are linked in queues henceforth seek time gets increased due to which the system becomes slow. The algorithm which is used for disk scheduling is known as Disk Scheduling Algorithm whose purpose is to reduce total seek time.

N-Step-SCAN also called N-Step-Look is actually a Disk Scheduling Algorithm. It helps in determining the motion of the 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 is done they can not be allocated into N-size sub-queues since they are full by the elevator algorithm. Therefore starvation is completely eliminated and the service within N requests is guaranteed.



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.

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 the scanning direction. This can be particularly beneficial in systems with high disk I/O loads.



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.

Algorithm for N-Step-SCAN Disk Scheduling

Step 1: A buffer is created for N requests.

Step 2: All the requests that are kept in this buffer are serviced in any specific wipe.

Step 3: During this time all the new incoming requests can not be added to this buffer, these new requests will be kept in a separate buffer.

Step 4: Now here comes the role of the I/O (Input Output) scheduler because when these top N requests are serviced, I/O (Input Output) scheduler chooses the next N requests and this process goes on and on.

Step 5: By doing this N-Step-SCAN allows better throughput and it is devoid of thrust.

Advantages of the N-Step-SCAN Disk Scheduling Algorithm

Disadvantages of the N-Step-SCAN Disk Scheduling Algorithm

Important Points to Keep in Mind About the N-Step-SCAN Disk Scheduling Algorithm

FAQs on N-Step Disk Scheduling Algorithms

1. Can N-Step Scan Scheduling be suitable for all types of systems?

Answer:

N-Step Scan Scheduling is effective for almost all types of systems with a large number of tasks or processes that can be divided into distinct steps.

2. Can N-Step handle dynamic tasks?

Answer:

Yes, N-Step Scan can easily handle dynamic tasks having varying workloads.

Article Tags :