Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
N-Step-SCAN disk scheduling
Next article icon

N-Step-SCAN disk scheduling

Last Updated : 29 Aug, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

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

  • 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 the 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.

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.

Next Article
N-Step-SCAN disk scheduling

S

snigdha_yambadwar
Improve
Article Tags :
  • Operating Systems
  • Write From Home

Similar Reads

    SCAN - EDF Scheduling in OS
    SCAN-EDF is a disk scheduling algorithm that is the same as the EDF algorithm but utilizes the seek optimization technique of the 'SCAN' algorithm when similar deadlines occur. It is a hybrid algorithm. To understand the importance of this algorithm, let us first look at the drawbacks of strictly fo
    4 min read
    FScan disk scheduling algorithm
    Fixed period SCAN (FSCAN) disk scheduling algorithm mainly focuses on handling high variance in shortest seek time first (SSTF). SCAN algorithm is also proposed to handle above mentioned situation but using SCAN algorithm causes long delay while handling requests which are at extremes of disk. FSCAN
    3 min read
    C-SCAN Disk Scheduling Algorithm
    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 a C-SCAN Disk Scheduling algorithm is used.The Circular SCAN (C-SCAN) Scheduling Algorithm is a modified version of the SCAN Disk Scheduling A
    12 min read
    I/O scheduling in Operating Systems
    Input/Output (I/O) operations are how a computer communicates with external devices such as hard drives, keyboards, printers, and network interfaces. These operations involve transferring data into and out of the system whether it’s reading a file, saving a document, printing, or sending data over a
    6 min read
    SCAN (Elevator) Disk Scheduling Algorithms
    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 by one and reaching the other end. Then the direction of the head is reversed and the process continues as the head continuously scans back and forth to
    12 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences