COMP 409 Lecture Notes - Lecture 14: Null Pointer, Linked List, Busy Waiting

26 views6 pages

Document Summary

Any other ll/sc clears things as well since there is only a single reservation slot . If we make our redoit loop too long, we may end up with many failures. Ll/sc is found in hardware such as powerpc, arm and mips (possibly with different names). Intel does not and java does not expose it the same way it exposes other primitives. We can solve this with cas as well. Now, we can solve the aba problem with ll/sc, but in fact, we do not necessarily need it. Cas can actually solve the problem as well by using it on twice as many bits. Variables are now treated as a pair. Examples: x = (17, 100) x = (17, 101) Every update updates the version number, even if it is the same value and cas checks both. Most architecture provide a double-wide cas specifically for this purpose.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents