Skip to content

Commit d8148fb

Browse files
committed
Merge remote-tracking branch 'os/main' into main
2 parents f5cf295 + 1a0c2f3 commit d8148fb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/chapter5/6answer.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,22 @@
6363
return total
6464
6565
4. `**` 在本章操作系统中实现本章提出的某一种调度算法(RR调度除外)。
66+
67+
先来先服务调度算法FCFS:它与 RR 调度的区别在于没有时钟中断导致的任务切换,其他细节上相似。
68+
因此基于已有的 RR 调度,删除对 Timer 中断的相关处理即可得到一个 FCFS 调度。
69+
70+
以 ucore 本章节代码为例,一种处理方式是将 `trap.c` 的 `usertrap` 函数中 `case SupervisorTimer` 部分的 `yield();` 一句删除
71+
即可去掉 RR 特性,得到一个 FCFS 调度。
72+
73+
代码略。
74+
6675
5. `***` 扩展操作系统内核,支持多核处理器。
76+
77+
题目编程内容过于复杂,不建议作为练习题。
6778
6. `***` 扩展操作系统内核,支持在内核态响应并处理中断。
79+
80+
题目编程内容过于复杂,不建议作为练习题。
81+
6882

6983
问答题
7084
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)