0
我寫了2個進程,以滿足相互排斥,但OM不知道這是否是.. 我最初的標誌值是0沒有我的解決方案滿足要求的互斥
process 1
while(1){
while flag=1 do{-nothing-}
flag=1
-enter critical section-
flag=0
}
process 2
while(1){
while flag=1 do{-nothing-}
flag=1
-enter critical section-
flag=0
}
事實上
他們完全一樣。 這兩個過程是否滿足互斥? 我看不到被違反什麼規定..
感謝lot.so易於在我eyes..my值的前面必須是相反的... – Dchris 2011-02-28 17:41:01