当前位置:网站首页>12. Timing, switching, process and mode of process scheduling
12. Timing, switching, process and mode of process scheduling
2022-07-20 17:14:00 【Friend a ㅤ】
1. Timing of process scheduling
Be careful :
- Processes cannot be scheduled and switched in the critical area of the operating system kernel program .(√)
- Processor scheduling cannot be performed when the process is in a critical area .(×)
Critical resources : Resources that only one process is allowed to use in a time period . Processes need mutually exclusive access to critical resources .
A critical region : The code to access critical resources .
2. The way processes are scheduled
2.1 Non deprivation scheduling mode ( Non preemptive way )
Only processes are allowed to voluntarily abandon the processor . During operation, even if more urgent tasks arrive , The current process will continue to use the processor , Until the process terminates or actively requests to enter the blocking state .
- Implement a simple
- Low system overhead, but unable to handle urgent tasks in time
- Suitable for early batch processing systems
2.2 Deprive scheduling mode ( Way of seizing )
When a process is executing on the processor , If a more important or urgent process requires the use of a processor , The executing process is immediately suspended , Allocate processors to more important and urgent processes .
- Priority can be given to more urgent processes
- It can also realize the function of allowing each process to execute in turn according to the time slice ( Interrupt by clock )
- Suitable for time-sharing operating system 、 Real-time operating system
3. Process switch and process
“ Process scheduling in a narrow sense ” and “ Process switching ” The difference between :
- Process scheduling in a narrow sense : Select a process to run from the ready queue .( This process can be a process that has just been suspended , It can also be another process , In the latter case, process switching is required )
- Process switching : A process gives up the processor , A process in which a processor is occupied by another process
- Generalized process scheduling : It includes two steps: selecting a process and process switching
Process switching is mainly completed :
- Save all kinds of data of the original running process
- Recovery of various data of the new process
Be careful : Process switching comes at a cost , If you schedule processes too often 、 Switch , It will inevitably reduce the efficiency of the whole system , So that the system spends most of its time on process switching , The time really spent executing the process is reduced .
边栏推荐
- Import changes and enable auto import of idea
- How many rows of data can b+ tree algorithm store in MySQL?
- Human cell research: prosci LAG-3 recombinant protein scheme
- Union and union all operators in SQL
- Leetcode thought notes for questions
- Conservative Novelty Synthesizing Network forMalware Recognition in an Open-Set Scenario
- Explain output analysis of MySQL
- Google Chrome cannot be installed successfully after uninstallation
- Improve the mirror station configuration information - mirror station experience Officer
- 振动信号的采集与预处理
猜你喜欢
随机推荐
Push rejected: Push to origin/master was rejected
用vscode+express创建一个微型WEB服务器
Applet learning notes - other knowledge points
用REM/VW单位进行移动端适配的最佳实现
12. 进程调度的时机、切换与过程、方式
review第1遍,220617,数据仓库DWD层,dwb层,视频,
tasker+server酱转发未接来电到公号
力扣——1046. 最后一块石头的重量
Addressing Visual Search in Open and Closed Set Settings
小程序的FLEX的垂直布局弹性压缩
Oom memory overflow is a classic that we have to watch in actual combat
IDEA的Import changes 和enable auto-import
Deep cnn-based multi-task learning for open-set recognition解读
The best realization of mobile end adaptation with rem/vw units
mysql.user表权限字段说明全介绍
The advantages and disadvantages of the implementation of ID generator and the principle analysis of the optimal ID generator
Redis和mysql数据怎么保持数据一致的?
[CVA valuation training camp] share with previous excellent students
Import changes and enable auto import of idea
Apifox quick survey