"Operating system" process scheduling and its algorithm

Source: Internet
Author: User

Tasks for process scheduling
    1. Save Processor Information
    2. Select a process by an algorithm
    3. Assigning the processor to a process
Process scheduling mechanism
    1. The queueing device. Arrange the ready process into one or several queues
    2. Dispatcher. Take the process out of the ready queue and give him the processor.
    3. Context switcher. Save information for the previous process, assigning information for the next process
How the process is scheduled
    1. Non-preemptive type
    2. Preemptive type
The algorithm of scheduling algorithm rotation in the process

Arrange the ready process into a queue, assign the CPU to the team's first process, execute a certain amount of time, run it, assign it to another new team first process, and execute a process every time.

Priority scheduling algorithm for non-preemptive priority scheduling algorithm

Once the processor is assigned to a higher-priority process in a ready queue, the process will continue to execute, or the processor will be assigned to another process because of something

Preemptive-Priority scheduling algorithm

Once the processor is assigned to a high-priority process in a ready queue, another higher-priority process occurs, and the processor is assigned to another higher-priority process

Priority type
    1. Static priority (constant)
    2. Dynamic priority (as the wait time changes)
Multi-Queue scheduling algorithm
    • Set up multiple Ready queues
    • Processes of different types or natures are assigned in different ready queues
    • Different ready queues with unused scheduling algorithms
    • A process in readiness can set different priorities
    • The different readiness queues themselves can also be set priority
Multilevel Feedback Queue scheduling algorithm
    1. Set multiple queues, assigning each queue a different priority, the first highest, the second son,, and the rest individually lowered
    2. The execution time given by the processes in different queues is also different, the higher the priority queue, the smaller the time slice
    3. Each queue is preceded by a first-come-first-serve algorithm, which, when it is executed by a process, removes the process if it is completed within the time slice, otherwise it is placed in the second queue, and so on.
    4. Scheduled by queue priority, scheduling a second queue only when the first queue is idle. If the first queue has a process when the second queue is dispatched, the processor immediately returns to the first queue
A scheduling algorithm based on fairness principle to ensure the fair sharing scheduling algorithm of scheduling algorithm

User 1 has 4 processes a B C D, user 2 has 1 processes E
Scheduling is performed to ensure that two users have the same processing time
A e B e C e D E
If you let 1 be 2, twice times
EXECUTE AS:
A B e C D E

"Operating system" process scheduling and its algorithm

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.