Chapter 9 Flashcards

1
Q

What is the basic idea of Fine-Grained Synchronization?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the basic idea of Optimistic Synchronization?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a thread do as it traverses a list in Fine-grained synchronization

A

It locks each entry with its 1st visit and unlocks it later

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Can Concurrent threads traverse a Fine-grained controlled list

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does hand-over-hand locking mean?

A

acquire next lock while holding previous lock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Is Fine-grained blocking?

A

yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Is there any contention on traversal in Optimistic List. are they wait free?

A

No. yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly