Content deleted Content added
Citation bot (talk | contribs) Add: publisher, date, authors 1-3. | Use this bot. Report bugs. | Suggested by Dominic3203 | Category:Concurrency (computer science) | #UCB_Category 19/44 |
Homshnogen (talk | contribs) m →Spinlock: Changed heading to match other headings in the section, and tweaked the grammar for readability. This section is still loosely worded and can use more clarity. |
||
Line 64:
==Implementation==
===
{{Main article|Spinlock}}
Another effective way of implementing synchronization is by using spinlocks. Before accessing any shared resource or piece of code, every processor checks a flag. If the flag is reset, then the processor sets the flag and continues executing the thread. But, if the flag is set (locked), the threads would keep spinning in a loop and keep checking if the flag is set or not.
===Barriers===
|