作者AquaEnergy (Desperate Houseboy)
看板Grad-ProbAsk
標題[理工] OS interrupt, DMA
時間Fri May 29 23:20:34 2015
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
→ fightforlive: 是不是要先查interrupt vector,才去找對應的ISR add 05/30 10:15
→ fightforlive: ress然後才執行? 而不是直接執行ISR? 05/30 10:15
※ 編輯: AquaEnergy (61.230.125.122), 05/30/2015 12:44:30
→ fightforlive: DMA就是不需要CPU的參與.我想有buffer只是為了在下 05/30 13:17
→ fightforlive: 次需要時直接看buffer是否存在,然後就可以直接存取 05/30 13:17
→ fightforlive: 了.我也不太清楚...還沒唸OS 05/30 13:17
推 jb679123: 1F正解 06/14 22:41
推 jackfantasy: 請問有大大可以解釋一下e選項的觀念嗎>< 07/02 23:22
→ jackfantasy: 看得不是很懂 07/02 23:22
推 jb679123: interrupt會去找對應的ISR 所以後面的機制並非需要 07/20 17:18