Operating system--process scheduling short process priority

Source: Internet
Author: User

1. What is process scheduling

In both batch and time-sharing systems, the number of user processes is generally greater than the number of processors, which will cause them to compete with each other for the processor. In addition, the system process also needs to use the processor. This requires the process scheduler to dynamically assign the processor to a process in the ready queue for execution, according to a certain strategy.    

2, processor scheduling classification

Advanced, intermediate, and low-level dispatch jobs are often experienced in the following three-level schedules from the start of submission to completion:

    • Advanced Scheduling: (high-level scheduling), also known as job scheduling , it decides to transfer the backup process into memory operation;

    • Low-level scheduling: (low-level scheduling), also known as process scheduling , it determines the ready queue of a process to obtain the CPU;

    • Intermediate scheduling: (Intermediate-level scheduling) is also known as the introduction of virtual memory, including, external memory in the swap area for process swap .

3, short process first

The shortest CPU running time priority scheduling algorithm (Scbf--shortest CPU Burst first)

The algorithm selects the next "CPU execution period shortest" process from the ready queue and assigns the processor to it.

For example, there are four processes P1, P2, P3, and P4 in the ready queue, and their next execution

The period is 16, 12, 4 and 3 units of time, the implementation of such as:

The turnaround times for P1, P2, P3 and P4 were 35, 19, 7, 3, and the average turnaround time was 16.

Although the algorithm can obtain better scheduling performance, it is difficult to know exactly the next CPU execution period, but can only be predicted according to the execution history of each process.


Operating system--process scheduling short process priority

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.