作者dingfun (頂方)
看板Grad-ProbAsk
標題[理工] [os]交大資工99
時間Tue Feb 14 21:44:16 2012
Consider a two-processor system running three processes P1,P2,and P3.
The processes P1 & P2 run on first CPU, the P3 run on the second CPU.
All these three processes share one mutually exclusive resource.
Suppose that processes never migrate from a CPU to the other one.
In terms of CPU utilization and hardware cost, whitch one option is improper?
(A) Using interrupt disabling to synchronize P1 and P2
(B) Using interrupt disabling to synchronize P2 and P3
(C) Using spin-lock to synchronize P1 and P3
(D) None of the above
正確答案是(B)
剛剛再複習自己做過的考古題,
不知道為什麼,這題感覺應該不難
但是我卡了好久...一直想不出來
卡住的點是,
disable interrupt 不是適用於 uni processor
而crtical section 是適用於 multi processor 嗎??
可是這題怎麼會用disable interrupt 怎麼會用來解決 P2 和 P3呢??
不知道是哪個環節出了錯了@@
越到考試,感覺腦袋越來越會當機...
另外還有一題,前幾篇有人在討論的交大100的OS,
第16題的(C),也是令我很苦惱~"~
不知道有人能否把式子列出來呢??
感謝!!
還有一天,希望大家都能考上,不過要留個位置給小弟我阿XDD
※ 編輯: dingfun 來自: 203.67.180.144 (02/14 21:47)
推 liataian:你是不是看錯題目了@@ 題目是說improper 不是proper.. 02/14 21:50
→ s9088:上面那題是improper..是找出不洽當的選項 02/14 21:50
→ dingfun:WT....F 我錯了= = 感謝各位點醒我... 02/14 21:57
推 qqoil:P2 P3在不同處理器上 dis\enable interrupt不適合用在多處理 02/15 15:49
→ qqoil:器上 因為會造成OS額外的負擔 02/15 15:50
→ qqoil:16 題的C選項我也有問題耶 有大大能幫忙嗎????????????????? 02/15 15:52