Content deleted Content added
No edit summary |
m Repairing link to disambiguation page - You can help! |
||
Line 3:
To lower the overhead a more elaborate locking protocol ''Test and Test-and-set''
is used. The main idea is '''not''' to [[Busy waiting|spin]] in [[test-and-set]] but increase the likelihood of successful [[test-and-set]] by using following entry protocol to the lock:
''boolean'' locked := false ''// shared lock variable''
Line 17:
}
The entry protocol uses normal memory reads to
If the [[programming language]] used supports [[Lazy evaluation#Minimal evaluation|minimal evaluation]], the entry protocol could be implemented as:
|