Search Google

Sunday, June 24, 2007

換湯不換藥?

因為最近似乎有需要接觸windows CE,於是趁這個周末上網看看CE的相關文件,就在這個網頁中我看到了以下的敘述:

Priority inversion. Refers to a situation in which the use of a mutex, critical section, or semaphore resource by a lower-priority thread delays the execution of a higher-priority thread, when both are contending for the same resources. To correct this situation and free the higher-priority thread, Windows CE allows the lower-priority thread to inherit the more critical thread's priority and run at the higher priority until it releases its use of the resource.

最後一句話透露出換湯不換藥的意思。。。問題還是沒有解決,因為lock還是在low priority thread的手上啊!

只要lock存在的一天priority inversion就不可避免,換個方式講會比較高明嗎?
或許吧?!畢竟鄉民到處都是~

No comments: