Lecture 7 - Mutual Exclusion in C++ Flashcards

1
Q

What does mutual exclusion mean?

A

2 threads cannot simultanously enter a critical section

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

Wht is mutual exclusion managed with?

A

Locks / Mutexes

We need to lock and unlock when accessing a critical section

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

In C++ do we need to unlock? Why?

A

No

Unlocking is done automatically when block is finished, this is due to the RAll concept, as parent finishes execution.

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