[理工] [OS] 關於Privileged指令
想問一下
change mode to monitor mode是屬於特權指令嗎
我看補習班的筆記說是
當初想他的想法應該是
user mode在執行到特權時,會發出trap
於是控制權就轉移到monitor了
但今天在看恐龍
習題1.13 下列哪項指令該有特權
a 設定timer的value
b 讀取clock
c 清除memory
d 發出trap
e turn off interrupt
f 修改device status table的進入權
g 切換使用者到核心模式
h 存取I/O設備
(抱歉我是借來的中文版...只好打這樣= =")
查答案是
The following operations need to be privileged:
Set value of timer,
clear memory,
turn off interrupts,
modify entries in device-status table, access
I/O device.
The rest can be performed in user mode.
然後這我又想到我當初讀補習班的想法...
照理說如果change到monitor是特權指令
那不是永遠都無法從user轉到monitor嗎?
但是如果從trap角度好像又說得過去...
懇請各位幫忙解惑 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.27.250.91
→
11/03 02:25, , 1F
11/03 02:25, 1F
→
11/03 02:26, , 2F
11/03 02:26, 2F
推
11/03 08:50, , 3F
11/03 08:50, 3F
→
11/03 08:51, , 4F
11/03 08:51, 4F
→
11/03 08:51, , 5F
11/03 08:51, 5F
→
11/03 19:08, , 6F
11/03 19:08, 6F
→
11/03 19:10, , 7F
11/03 19:10, 7F
→
11/03 19:11, , 8F
11/03 19:11, 8F
→
11/03 19:12, , 9F
11/03 19:12, 9F
→
11/04 00:17, , 10F
11/04 00:17, 10F
→
11/04 00:18, , 11F
11/04 00:18, 11F
補充一下
那幾個選項,把答案列出來是
acefh
g選項並沒有...所以我才很疑惑= ="
※ 編輯: genius945 來自: 114.27.233.111 (11/04 00:21)
→
09/11 14:34, , 12F
09/11 14:34, 12F