看板 Grad-ProbAsk 關於我們 聯絡資訊
(1)Can busy-waiting be eliminated in such implementation? 答案是NO 因為確保Semaphore值之存取視為C.S.設計 而C.S.之entry section是利用Busy-waiting方法設計 我的疑問是 Semaphore不是也有Non Busy-waiting的方法嗎 如此不就可以避免了? (2) Consider a system consisting of types A and B being shared by n processes P1,P2....Pn,Resources can be requested and released by processes only one process at a time.A process Pi(1<=i<=n) may request at most Maxi,A and Maxi,B>=1,However a process Pi cannot be allocated any instance of resources of type B until it has been allocated Maxi,A instances of types A What is the minimum number of instances of resources of typeA and typeB to guarantee that the system is deadlock free? Ans: m>=Maxi ,1<=i<=n m>sigma(1 to n)Maxi-n 這兩點可以deadlock free A:max{Maxi,A for 1<=i<=n,Sigma(1 to n)Maxi,A -n+1 B:同上A換B 這題我懂上面兩個條件是定理來的 但A和B我就不懂為什麼 且這個答案有B要等A分派完嗎? (3)In a pure demand paging,some pages of a process are kept in the main memory prior to the process execution 為什麼答案是錯呢 demand paging不就是載入一部分到memory 另一部分還留在DISK 發生了page fault後再去Disk裡面找來置換嗎? 問題很多 希望幫忙解答 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.227.224.164 ※ 文章網址: http://www.ptt.cc/bbs/Grad-ProbAsk/M.1418799309.A.D7B.html
A4P8T6X9: 1.思考看看為什麼V()跟P()不會一起執行 3.他有 prior 12/17 15:15
j897495: 謝謝第一題懂了!所以第三題是之後才load進去嗎 12/17 20:05
qoojordon: 第三題的敘述可能要有prepaging機制的demand paging 12/17 20:12
qoojordon: 會比較好 ? 12/17 20:12