kong 90b077f9d3
Sched rt doc (#163)
* update

* 完善调度器文档

* 更新RT调度器文档

* 更新实时调度文档
2023-02-09 15:24:37 +08:00

15 lines
839 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 进程调度器相关的api
   定义了DragonOS的进程调度相关的api是系统进行进程调度的接口。同时也抽象出了Scheduler的trait以供具体的调度器实现
## 1. 调度器介绍
   一般来说,一个系统会同时处理多个请求,但是其资源是优先的,调度就是用来协调每个请求对资源的使用的方法。
### 1.1 主要函数
1. cpu_executing(): 获取指定的cpu上正在执行的进程的pcb
2. sched_enqueue(): 将进程加入调度队列
3. sched_init(): 初始化进程调度器模块
4. sched_update_jiffies(): 当时钟中断到达时,更新时间片。*请注意,该函数只能被时钟中断处理程序调用*
5. sys_sched(): 让系统立即运行调度器的系统调用。*请注意该系统调用不能由ring3的程序发起*