(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里面找来置换吗?
问题很多 希望帮忙解答 谢谢