Concurrency Flashcards

1
Q

Atomic Operation

A

A function or action that cannot be interrupted under any circumstances

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

Critical Section

A

A section of code with shared resources that cannot be executed when another process is using the shared resources

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

Deadlock

A

When 2 or more processes cannot run as they are waiting for each other to run

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

Livelock

A

When 2 or more processes continuously change their state in response to the other processes, without doing any meaningful work

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

Mutual Exclusion

A

The requirement that only one process can have access to shared resources at at time

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

Race Condition

A

Multiple processes access a shared data file and the final result depends on the timing of the process

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

Starvation

A

A process is overlooked indefinitely by the scheduler, it is ready to run but is never run

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

How to prevent race conditions?

A

Create critical sections with mutual exclusion. Processes can only access shared resources after another process has finished accessing the same resources

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

Problem with mutual exclusion?

A

Enforcing mutual exclusions creates deadlocks and starvation

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

Solutions to critical section problem?

A

Software Solution - shared lock variables, busy waiting
Hardware Solution - disabling interrupts, special instructions
Higher Level OS Constructs - semaphores, monitors, message passing

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

Shared lock problem

A

The lock itself is a shared variable so it is possible 2 processes could have a race condition on it

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