Synchronisation Flashcards

1
Q

What is the critical section problem?

A

Ensuring that when multiple processes access shared data, only one is in its critical section at a time.

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

What are the three requirements of a critical section solution?

A

Mutual exclusion, Progress, Bounded waiting.

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

What is Peterson’s algorithm used for?

A

A software solution to the critical section problem for two processes.

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

What is a mutex lock?

A

A synchronization primitive used to enforce mutual exclusion.

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

What is busy waiting?

A

A situation where a process continually checks for a condition instead of sleeping.

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

What is a semaphore?

A

An integer variable used for signaling among processes with atomic wait() and signal() operations.

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

Difference between counting and binary semaphores?

A

Counting semaphores have unrestricted value; binary semaphores are 0 or 1.

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

What is deadlock?

A

A situation where two or more processes wait indefinitely for each other to release resources.

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

What is starvation?

A

When a process waits indefinitely to access a resource because other processes are constantly prioritized.

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

What is a monitor?

A

A high-level abstraction that provides a convenient and safe mechanism for process synchronization.

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