Summary of common scheduling algorithms in computer operation system

Source: Internet
Author: User

First, the common batch processing job scheduling algorithm
1. First come first service scheduling algorithm (FCFS): is according to each job into the system's natural order to dispatch the job. The advantage of this scheduling algorithm is to achieve simple, fair. The disadvantage is that it does not take into account the comprehensive use of various resources in the system, often makes the short job users dissatisfied, because the short job waiting for processing time may be much longer than the actual running time.
2. Short job priority scheduling algorithm (SPF): Is the priority of scheduling and processing of short jobs, so-called short refers to the operation of short-run time. When the job is not running, it does not know how long it actually runs, and therefore requires the user to submit an estimate of the job's run time at the time of the job submission.
3. Maximum response ratio priority algorithm (HRN): FCFS may cause short-term job users dissatisfaction, SPF may make long-term job users dissatisfied, so proposed HRN, select the response than the highest job run. Response than =1+ job wait time/job processing time.
4. Priority-based scheduling algorithm (HPF): Each job specifies an integer that represents the priority of the job, and the job with the highest priority is chosen when a new job needs to be transferred from the input well into memory processing.
5. Equalization scheduling algorithm, that is, multi-level queue scheduling algorithm
Basic concepts:
Job turnaround time (Ti) = Finish Time (Tei)-Submission time (TSI)
Job average turnaround time (T) = turnaround time/number of jobs
Job with right turnaround time (Wi) = turnaround time/Run time
Response ratio = (wait time + run time)/run time
Second, process scheduling algorithm
1. FIFO algorithm: Select according to the order in which the process enters the ready queue. That is, whenever the process is dispatched, the first team of the ready queue is always put into operation.
2. Time slice rotation algorithm (RR): A scheduling algorithm for timeshare systems. The basic idea of rotation is to divide the processing time of the CPU into a time slice, in which the processes in the ready queue run a time slice in turn. When the time slice is over, the process is forced to give up the CPU, the process goes into the ready queue, waits for the next schedule, and the process is dispatched to select a process in the ready queue, assigning it a time slice to put into operation.
3. Highest-priority algorithm (HPF): Process scheduling assigns a processor to a ready process with the highest priority each time. The highest-priority algorithm can be combined with different CPUs to form a preemptive highest-priority algorithm and a non-preemptive highest-priority algorithm.
4. Multi-level Queue feedback method: Several scheduling algorithms of the combined form of multi-level queue mode.
Three, free partition allocation algorithm
1. First adapt the algorithm: when receiving a memory request, find the partition description table, find the first free area to satisfy the request length, divide and allocate it. This algorithm is simple and can make allocation decisions quickly.
2. Best Fit algorithm: When the memory request is received, find the partition description table, find the first minimum idle area that can satisfy the request length, divide and allocate it. This algorithm is the most space-saving, because it tries not to split into large idle areas, the disadvantage is that it may form a lot of small free partitions, called "Fragments."
3. Worst-fit algorithm: When receiving a memory request, look for the partition description table and find the largest free area that can satisfy the request. The advantage of this algorithm is to avoid the formation of fragments, and the disadvantage is that after splitting the large idle area, when encountering a large program to request memory, the possibility of not satisfied.
Iv. page replacement algorithm in virtual page storage Management
1. Ideal page replacement algorithm (OPT): This is an ideal algorithm that cannot be implemented in practice. The idea of this algorithm is: When a page fault occurs, select the memory pages that will never be used or are no longer accessed in the longest time.
2. FIFO page replacement algorithm: Select the first page to enter the memory to be eliminated.
3. The most recent unused algorithm (LRU): Choose a page that has been unused for the longest time in a recent period and retire it.
4. Least-use Algorithm (LFU): Select the page conversion that is least visited by the current time.
Five, disk scheduling
1. First come first served (FCFS): The disk drives are started in the order in which they are requested, regardless of the physical location they want to access
2. Shortest seek time First (SSTF): Let the most recent request from the current track to start the disk drive, that is, the shortest time to find the job to execute first, regardless of the order of arrival of the requesting visitor, so that the first-come-first service scheduling algorithm in the magnetic arm moved too large problem
3. Scanning algorithm (scan) or elevator scheduling algorithm: Always start from the current position of the magnetic arm, along the direction of the magnetic arm to select the nearest cylinder of the current magnetic arm visitors. If no access is requested along the direction of the magnetic arm, the direction of movement of the magnetic arm is changed. In this scheduling method, the movement of the magnetic arm is similar to the dispatch of an elevator, so it is also called the elevator scheduling algorithm.
4. Cyclic scanning algorithm (Cscan): The cyclic scanning scheduling algorithm is improved on the basis of scanning algorithm. The magnetic arm changes to a single movement, by the outward. The current position begins to select the visitor of which cylinder is closest to the current one, along the direction of the magnetic arm movement. If there is no request to access along the direction of the magnetic arm, then back to the most, the job request to access the minimum cylinder number.

Summary of common scheduling algorithms in computer operation system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.