In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "what are the disk scheduling algorithms in the computer?" the content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn the article "what are the disk scheduling algorithms in the computer?"
At present, the commonly used disk scheduling algorithms are: 1, first-come, first-served algorithm (FCFS); 2, shortest seek time first algorithm (SSTF); 3, scanning algorithm (SCAN); 4, circular scanning algorithm (CSCAN).
The operating environment of this tutorial: windows7 system, Dell G3 computer.
Disk scheduling in a multiprogramming computer system, each process may constantly make different requests for read / write operations on the disk. Because sometimes these processes send requests faster than disks respond, it is necessary to establish a waiting queue for each disk device. There are four commonly used disk scheduling algorithms:
First come first served algorithm (FCFS)
Shortest seek time first algorithm (SSTF)
Scanning algorithm (SCAN)
Cyclic scan algorithm (CSCAN)
For example, suppose a disk has 200 cylinders numbered 0-199. If, after serving the requestor accessing cylinder 143, the request for access to column 125 is currently being served, and several requestors are waiting for service, the column number they want to visit each time is 86147Bing 91Jing 94150102175130.
1. FCFS (first come, first served) First Come First Service
This is a relatively simple disk scheduling algorithm. It is scheduled according to the order in which the process requests to access the disk. The advantage of this algorithm is that it is fair and simple, and the requests of each process can be processed in turn, so that the requests of a certain process will not be satisfied for a long time. Because this algorithm does not optimize the seek, in the case of a large number of access requests to the disk, this algorithm will reduce the throughput of the device service, so that the average seek time may be longer, but the change of the response time of each process is small.
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 algorithm selects such a process, which requires that the track accessed is the closest to the track where the current head is located, so that each seek time is the shortest. The algorithm can get better throughput, but it can not guarantee the shortest average seek time. The disadvantage is that the opportunity to respond to the user's service request is not equal, which leads to a great change in response time. In the case of a large number of service requests, requests for inner and outer edge tracks will be delayed indefinitely, and the response time of some requests will be unpredictable.
Shortest seek time priority (125) 130.147.150.175.177.102.94.91.86
3. Scanning algorithm (SCAN) elevator dispatching
The scanning algorithm not only considers the distance between the track to be accessed and the current track, but also gives priority to the current moving direction of the magnetic head. For example, when the head is moving from the inside to the outside, the next access object selected by the scanning algorithm should be the track it wants to access, which is both outside the current track and the nearest. In this way, the magnetic arm will not change direction and move from the outside to the inside until no more tracks need to be accessed. At this time, it is also every time to choose such a process to schedule, that is, the track it wants to access is within the current track, so as to avoid the occurrence of hunger. Because the law of magnetic head movement in this algorithm is quite similar to the operation of elevator, it is also called elevator scheduling algorithm. This algorithm basically overcomes the disadvantage that the service of the shortest seek time first algorithm focuses on the intermediate track and the response time varies greatly, but it has the advantages of the shortest seek time first algorithm, that is, the throughput is larger and the average response time is small. however, because of the swing scanning method, the frequency of access on both sides of the track is still lower than that of the middle track.
Elevator dispatching (125) 102.94.91.86.130.147.150.175.177
4. Cyclic scan algorithm (CSCAN)
The cyclic scanning algorithm is an improvement of the scanning algorithm. If the access requests to the tracks are evenly distributed, there are relatively few access requests that fall behind the head when it reaches one end of the disk and moves in reverse. 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 take a long time to wait. in order to solve this situation, the circular scanning algorithm requires the head to move one-way. For example, moving only from the inside to the outside, when the head is moved to the outermost visited track, the head immediately returns to the innermost desired track, that is, the minimum track number is followed by the maximum track number to form a loop for scanning.
Cyclic scan (125) 130.147.150.175.177.86.91.94.102
These are all the contents of this article entitled "what are the disk scheduling algorithms in computers?" Thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.