Algorithm for "operating system" job scheduling

Source: Internet
Author: User
First come first service scheduling algorithm (FCFS)

FCFS is the simplest scheduling algorithm, which can be used for job scheduling as well as for process scheduling.
The length of the job wait is its priority

  • Dispatch according to the order in which the job arrives successively
  • It could be the longest waiting job in the system.
Short Job priority scheduling algorithm (SJF)

Due to the fact that the short work process accounted for a large proportion, in order to enable them to perform longer than the long operation, and produced a short job scheduling algorithm
The length of the job is its priority

  • The shorter the job, the higher the priority
  • Dispatch short job first, wait for short job dispatch, then dispatch long operation

Disadvantages:

  • Must know the running time of the predicted job
  • Very bad for long work
  • Human-machine cannot achieve interaction
  • Do not fully consider the urgency of the operation, there is no guarantee that urgent work can be timely treatment
Priority scheduling algorithm (PSA)

Scheduling based on priority, externally assigned to job priority

Priority scheduling algorithm with high response ratio (HRRN)

The priority scheduling algorithm for high response ratio is to consider both the running time of the job and the waiting time of the job.

Realize:
Set a dynamic priority for each job, so that he increases with the waiting time, wait for a certain time, there must be time to get the processor
Priority = (wait time + service time required)/(time required for service)

Priority ratio:
R (P) = (response time)/time required for service

Algorithm for "operating system" job scheduling

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.