Chapter 5 - Process Synchronization Flashcards

1
Q

What causes a race condition?

A

When several processes access and manipulate the same data concurrently

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

What determines the outcome of a race condition?

A

Which order each process access the data

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

What is the critical section of a process?

A

The part of the process’ code where it is manipulating data

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

How do you solve the critical section problem?

A

Each process must ask permission to enter critical section in entry section, follow critical section with exit section, and then execute the remainder section

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

Where is it especially difficult to solve critical section problem?

A

Preemptive kernels

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

What is an atomic instruction?

A

Non-interruptible instruction used on modern machines to avoid critical section problem

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

How do you solve the critical section problem with locks?

A

Acquire a lock, do critical section, release lock, do remainder section

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

What is Test-And-Set

A

Solution to critical section process using shared boolean variable lock, initialized to false

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

Other than the critical section problem, what are some process synchronization problems?

A

Bounded-Buffer Problem and Readers-Writers Problem

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