Adding local spin to mutual exclusion algorithms: principles and experience

碩士 === 國立交通大學 === 資訊科學與工程研究所 === 98 === Busy waiting is common in shared memory mutual exclusion algorithms. To reduce memory contention incurred by busy waiting, we follow the concept of local spin made popular by Mellor-Crummey and Scott and propose a generic approach for adding local spin to mutu...

Full description

Bibliographic Details
Main Authors: Chien, Cheng-Ming, 簡正明
Other Authors: Huang, Ting-Lu
Format: Others
Language:en_US
Published: 2009
Online Access:http://ndltd.ncl.edu.tw/handle/57800699719849114011
Description
Summary:碩士 === 國立交通大學 === 資訊科學與工程研究所 === 98 === Busy waiting is common in shared memory mutual exclusion algorithms. To reduce memory contention incurred by busy waiting, we follow the concept of local spin made popular by Mellor-Crummey and Scott and propose a generic approach for adding local spin to mutual exclusion algorithms of the atomic read/write model. Taking Dijkstra’s, Knuth’s, Eisenburg-McGuire’s, Lamport’s bakery and Burns’ mutual exclusion algorithm as examples, two levels of local spin version were obtained. The first is an easy product of the generic approach. The second, with better inter-process communication made possible by an in-depth understanding of the algorithm, e.g. bounded waiting, significantly reduces the number of remote memory accesses. There is another approach used in Gadi Taubenfeld’s local-spinning bakery mutual exclusion algorithm by adding 2-dimensional permitted bits. We try this approach to add local spin to the other mutual exclusion algorithms of the atomic read/write model. We find out the difference between the generic approach and this approach by the tree structure. And this approach is not suitable for all mutual exclusion algorithms. According to the experience of adding local spin, we divide mutual exclusion algorithms into two parts: the algorithms with starvation are suitable for using 2-dimensional permitted bits to add local spin; the algorithms with bounded waiting are suitable for the generic approach plus focused release to add local spin.