Chapter 9 Flashcards
What is the basic idea of Fine-Grained Synchronization?
Instead of using a single lock, split it into objects. (instead of locking list as a whole lock each entry) Methods calls interfere only when they access the same component at the same time
What is the basic idea of Optimistic Synchronization?
Search without locking. if you find it, lock and check that locked nodes are correct if not start again also check if can be accessed from head. Usually cheaper than locking but mistakes are expensive
What does a thread do as it traverses a list in Fine-grained synchronization
It locks each entry with its 1st visit and unlocks it later
Can Concurrent threads traverse a Fine-grained controlled list
Yes
What does hand-over-hand locking mean?
acquire next lock while holding previous lock
Is Fine-grained blocking?
yes
Is there any contention on traversal in Optimistic List. are they wait free?
No. yes