[理工] OS Peterson's Solution

作者: mozzan (mozzan)   2014-03-12 23:16:35
大家好,我在讀原文書的時候這一段看不懂
Next, we illustrate a classic software-based solution to the critical-section
problem known as Peterson’s solution. Because of the way modern computer
architectures perform basic machine-language instructions, such as load and
store, there are no guarantees that Peterson’s solution will work correctly
on such architectures.
這是原文書上Process Synchronization第三節
它應該是說 Peterson’s solution 不適用在 Load/store architecture
想請問實際的原因是??
作者: A4P8T6X9 (殘廢的名偵探)   2014-03-13 00:01:00
思考看看dynamical scheduling.processor會重排指令已減少hazard,而release lock,就是sw,很可能被重排,導致太晚進入CS或太早出來。

Links booklink

Contact Us: admin [ a t ] ucptt.com