Home Common Problem What are the currently commonly used disk scheduling algorithms?

What are the currently commonly used disk scheduling algorithms?

Jun 25, 2021 pm 02:46 PM
Disk scheduling algorithm

Currently commonly used disk scheduling algorithms are: 1. First come first served algorithm (FCFS); 2. Shortest seek time first algorithm (SSTF); 3. Scan algorithm (SCAN); 4. Loop scan algorithm (CSCAN).

What are the currently commonly used disk scheduling algorithms?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

Disk Scheduling In a multi-programmed computer system, each process may continuously make different requests for read/write operations on the disk. Since sometimes these processes send requests faster than the disk can respond, it is necessary for us to establish a waiting queue for each disk device. There are four commonly used disk scheduling algorithms:

First come First serve algorithm (FCFS),

Shortest seek time first algorithm (SSTF),

Scan algorithm (SCAN),

Cycle scan algorithm (CSCAN)

Example: Assume that a disk has a total of 200 cylinders, numbered 0-199. After serving the requester accessing cylinder No. 143, it is currently serving the request to access cylinder No. 125, and there are several requests at the same time. The users are waiting for service. The cylinder numbers they want to access each time are 86, 147, 91, 177, 94, 150, 102, 175, 130

1. First come first served algorithm (FCFS) First Come First Service

This is a relatively simple disk scheduling algorithm. It is scheduled based on the order in which processes request access to the disk. The advantages of this algorithm are that it is fair and simple, and the requests of each process can be processed in turn, and there will be no situation where the request of a certain process cannot be satisfied for a long time. Since this algorithm does not optimize seek, when there are many disk access requests, this algorithm will reduce the throughput of the device service, resulting in the average seek time being longer, but the response time of each process getting the service is less than The changes are smaller.

First come, first served (125) 86.147.91.177.94.150.102.175.130

2. Shortest Seek Time First Algorithm (SSTF) Shortest Seek Time First

The The algorithm selects a process that requires the accessed track to be closest to the track where the current head is located, so that each seek time is the shortest. This algorithm can obtain better throughput, but it cannot guarantee the shortest average seek time. The disadvantage is that the response opportunities to users' service requests are not equal, resulting in large changes in response time. When there are many service requests, requests to internal and external edge tracks will be delayed indefinitely, and the response time of some requests will be unpredictable.

Shortest seek time first (125) 130.147.150.175.177.102.94.91.86

3. Scanning algorithm (SCAN) elevator scheduling

The scanning algorithm not only takes into account the desired The distance between the accessed track and the current track is more prioritized by the current moving direction of the magnetic head. For example, when the magnetic head is moving from the inside out, the next access object selected by the scanning algorithm should be the track it wants to access that is both outside the current track and the closest. In this way, access is performed from the inside out, and the magnetic arm is reversed and moved from the outside to the inside until no more external tracks need to be accessed. At this time, a process is also selected for scheduling every time, that is, the track it wants to access is within the current track, thus avoiding the occurrence of starvation. Because the law of head movement in this algorithm is quite similar to the operation of an elevator, it is also called an elevator scheduling algorithm. This algorithm basically overcomes the shortcomings of the shortest seek time first algorithm that the service is concentrated on the middle track and the response time varies greatly. It has the advantages of the shortest seek time first algorithm, that is, larger throughput and smaller average response time, but Due to the swing scanning method, the tracks on both sides are still accessed less often than the middle track.

Elevator dispatching (125) 102.94.91.86.130.147.150.175.177

4. Cyclic scanning algorithm (CSCAN)

The cyclic scanning algorithm is an improvement on the scanning algorithm. If access requests to a track are evenly distributed, relatively few access requests will fall behind the head when it reaches one end of the disk and moves in the opposite direction. This is because these tracks have just been processed, and the request density at the other end of the disk is quite high, and these access requests wait for a long time. In order to solve this situation, the circular scan algorithm stipulates that the head moves in one direction. For example, if it only moves from the inside out, when the magnetic head moves to the outermost accessed track, the magnetic head immediately returns to the innermost track to be accessed, that is, the smallest track number is followed by the largest track number to form a cycle for scanning.

Cycle scan (125) 130.147.150.175.177.86.91.94.102

For more computer-related knowledge, please visit the FAQ column!

The above is the detailed content of What are the currently commonly used disk scheduling algorithms?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to reset a Lenovo laptop? How to reset a Lenovo laptop? Aug 22, 2025 pm 02:02 PM

ToresetyourLenovolaptop,useWindowsRecoveryforasoftwarereset,AdvancedStartupforunstablesystems,ahardresettoresolvepowerissues,ortheLenovoRecoveryPartitiontorestorefactorysettings.Choosebasedonyourneedsandsystemcondition.

The computer's system tray icon is messy, how to organize it? The computer's system tray icon is messy, how to organize it? Aug 21, 2025 pm 08:12 PM

Hide the system tray icon without affecting the program operation, only removes the visual display; 2. Completely clean up and disable non-essential startup items through the task manager; 3. Resolve the mess and uninstall the software and develop the habit of canceling the bundling and checking during installation, so as to achieve the dual goals of visual refreshing and resource optimization.

Phone not ringing for incoming calls Phone not ringing for incoming calls Aug 08, 2025 am 10:43 AM

Checkifsilentmodeisenabled—flipthering/silentswitchoniPhoneoradjustvolumesettingsonAndroidtoensuretheringerison.2.VerifyDoNotDisturborFocusModeisn’tactiveandreviewsettingstoallowcallsfromcontacts.3.Confirmthecallerisn’tblockedandcallforwardingisdisab

What's wrong with the phone calling without sound What's wrong with the phone calling without sound Aug 13, 2025 pm 06:09 PM

The reasons why there is no sound on the phone call include: hardware problems (damaged speakers, blocked earpiece holes, poor connector contact), software problems (volume setting too low, silent mode is turned on, system failure), network problems (weak signal strength, network congestion), and other reasons (Bluetooth headsets are connected, application interference). Solutions include: checking the hardware, adjusting the volume settings, turning off the silent mode, restarting the phone, updating the system, disconnecting the Bluetooth headset, and uninstalling the problematic application. If it still cannot be solved, please contact technical support.

How to Search for a Word in a PDF Document? How to Search for a Word in a PDF Document? Aug 06, 2025 am 08:29 AM

TosearchforawordinaPDF,firstensurethePDFistext-based;ifnot,useOCRtoconvertit.1.OnWindows,openthePDFandpressCtrl Ftoopenthesearchbar,typetheword,andviewhighlightedresults.2.OnMac,pressCmd FinappslikePrevieworAdobeAcrobattosearch.3.InAdobeAcrobatReader

Haitang Literature City Official Website 2025 Latest Entrance/Haitang Culture Online Entrance Free Summary Haitang Literature City Official Website 2025 Latest Entrance/Haitang Culture Online Entrance Free Summary Aug 12, 2025 pm 09:42 PM

The official entrance of Haitang Literature City, a must-have for novel lovers! Still looking for the entrance to Haitang Literature City? This article brings together the official website of Haitang Literature City and multiple alternate addresses for your quick access. Official and alternate entrance of Haitang Literature City: Official website: https://www.haitbook.com Alternate address 1: https://www.htlvbooks.com Alternate address 2: https://www.longmabookcn.com Alternate address 3: https://www.myhtebook.com More Haitang Literature City Sites: The following lists multiple Haitang Literature City sites for you to choose from: Haitang Site 10: https

What's wrong with calling on a mobile phone without sound? What's wrong with calling on a mobile phone without sound? Aug 13, 2025 pm 06:06 PM

The reasons why Huawei phone calls without sound are: earpiece failure, software failure, network problems and physical damage. For earpiece failures, you can try cleaning the earpiece or contact after-sales repair; for software failures, you can update the system or uninstall suspicious applications; for network problems, you can move to a good signal area or contact the network supplier; for physical damage, you need to contact after-sales repair or replace components.

How to Add Headers and Footers to a PDF? How to Add Headers and Footers to a PDF? Aug 11, 2025 am 11:04 AM

UseAdobeAcrobatProforprecisecontrolbynavigatingtoTools>EditPDF>Header&Footer>Add,insertingtextorplaceholderslike&[Page]and&[Pages],customizingappearance,andapplyingtospecificpages.2.Forquickresults,usefreeonlinetoolssuchasSejdaby