[理工] 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