Race conditions Flashcards

1
Q

Explain Disabling Interrupts

A

Prevents the CPU from switching to another process while a process is in its critical region.

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

Explain Locks

A

Processes use locks to prevent others from accessing shared variables until the lock is released.

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

Explain Strict Alternation and Peterson’s Solution

A

These methods use shared variables or flags to control which process can enter its critical region. Peterson’s Solution allows processes to signal intent and take turns in entering their critical regions.

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

Explain TSL (Test and Set Lock)

A

A hardware-based solution that ensures only one process can access shared memory at a time, by locking the memory bus.

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

Explain Semaphores

A

A counting mechanism that allows processes to sleep while waiting for access, reducing CPU waste. Semaphores can ensure mutual exclusion (mutex) or event synchronization.

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