Tasks for process scheduling
- Save Processor Information
- Select a process by an algorithm
- Assigning the processor to a process
Process scheduling mechanism
- The queueing device. Arrange the ready process into one or several queues
- Dispatcher. Take the process out of the ready queue and give him the processor.
- Context switcher. Save information for the previous process, assigning information for the next process
How the process is scheduled
- Non-preemptive type
- 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
- Static priority (constant)
- 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
- Set multiple queues, assigning each queue a different priority, the first highest, the second son,, and the rest individually lowered
- The execution time given by the processes in different queues is also different, the higher the priority queue, the smaller the time slice
- 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.
- 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