[理工] OS interrupt

看板Grad-ProbAsk作者 (Desperate Houseboy)時間9年前 (2015/05/29 23:20), 9年前編輯推噓3(306)
留言9則, 3人參與, 最新討論串1/2 (看更多)
1. Which of the following statements are correct for the “interrupts” ? (a) When an interrupt occurs, the OS transfers control to the corresponding interrupt service routine (ISR) (b) The interrupt vector contains the addresses of all the service routines (c) When an interrupt occurs, the OS preserves the state of the CPU by storing registers and the program counter (PC) (d) The codes of ISR for different interrupts are of the same length for better management (e) When an interrupt is being processed, the incoming interrupts should be enabled to prevent a lost interrupt 答案是b, c 想請問a是錯在哪裡呢? 2. 原本的資料路徑是 keyboard ---(I/O 負責)--->USB controller local buffer---(CPU負責)--->memory DMA不須經過CPU參與監督,是直接從I/O device(例如keyboard)直接到memory嗎? 看有些是寫從buffer到memory 實在搞不太懂 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.230.125.122 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1432912838.A.682.html

05/30 10:15, , 1F
是不是要先查interrupt vector,才去找對應的ISR add
05/30 10:15, 1F

05/30 10:15, , 2F
ress然後才執行? 而不是直接執行ISR?
05/30 10:15, 2F
※ 編輯: AquaEnergy (61.230.125.122), 05/30/2015 12:44:30

05/30 13:17, , 3F
DMA就是不需要CPU的參與.我想有buffer只是為了在下
05/30 13:17, 3F

05/30 13:17, , 4F
次需要時直接看buffer是否存在,然後就可以直接存取
05/30 13:17, 4F

05/30 13:17, , 5F
了.我也不太清楚...還沒唸OS
05/30 13:17, 5F

06/14 22:41, , 6F
1F正解
06/14 22:41, 6F

07/02 23:22, , 7F
請問有大大可以解釋一下e選項的觀念嗎><
07/02 23:22, 7F

07/02 23:22, , 8F
看得不是很懂
07/02 23:22, 8F

07/20 17:18, , 9F
interrupt會去找對應的ISR 所以後面的機制並非需要
07/20 17:18, 9F
文章代碼(AID): #1LQ8F6Q2 (Grad-ProbAsk)
討論串 (同標題文章)
文章代碼(AID): #1LQ8F6Q2 (Grad-ProbAsk)