Chapter 5 (Concurrency) Flashcards

1
Q

What does concurrent mean?

A

Happening at the same time

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

What kinds of systems does concurrency arise in?

A

Multiprogramming

Multiprocessing

Distributed processing

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

What’s the term for “Multiple processes on a uniprocessor system”?

A

Multiprogramming

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

What’s the term for multiple processes on a multiprocessor system?

A

Multiprocessing

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

What contexts does concurrency occur in?

A

Multiple applications

Structured applications

OS Structure

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

T/F The relative order of execution of concurrent processes is unpredictable

A

T

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

What is it called when the outcome of two processes accessing the same variable depends on their relative order of execution?

A

Race condition

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

When does a race condition occur?

A

When multiple processes or threads read and write data items so that the final results depends on the order of execution

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

What is the term for “A process competing for a resource never receives it due to scheduling of other processes”?

A

Starvation

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

If you have no mutual exclusion issue, can you have a deadlock?

A

Yes, a pair may be deadlocked waiting for the other to send a message

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

What are the three general approaches for achieving mutual exclusion?

A

Software

Hardware

Operating system or language

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

What is a coroutine?

A

Pass control back and forth

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

What are the problems with competition-style process interaction?

A

Mutual exclusion

Deadlock

Starvation

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

What are the problems with sharing-style process interaction?

A

Mutual exclusion

Deadlock

Starvation

Data coherence

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

What are the problems with communication-style process interaction?

A

Deadlock

Starvation

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

What are the problems with interrupt disabling?

A

Degraded multitasking performance

Doesn’t work on a multiprocessor system

17
Q

What does interrupt disabling prevent?

A

Interleaving

18
Q

What are the advantages of special machine instruction?

A

Works on uniprocessor or shared-memory multiprocessor

Simple and easy to verify

Permits multiple critical sections, each with its own variable

19
Q

What are the disadvantages of special machine instruction?

A

Busy-waiting consumes processor time

Starvation possible since the process that runs next is arbitrary.

Deadlock

20
Q

How is a deadlock possible when using special machine instructions?

A

p1 enters the critical section and is interrupted by a higher priority process p2. p2 cannot enter due to p1, and p1 will not be scheduled due to p2.

21
Q

What is a strong semaphore?

A

Queue uses FIFO order and no starvation

22
Q

What is a weak semaphore?

A

Queue has no ordering, could have starvation

23
Q

T/F Binary semaphores are equally as powerful as a general semaphore

A

T

24
Q

What happens when a counting semaphore is 0?

A

Blocking

25
Q

What does a -5 semaphore value represent?

A

5 blocked threads

26
Q

What does a semaphore value of 10 that has a wait/signal?

A

Lets a max of 10 threads pass

27
Q

What does a counting semaphore value of 0 mean?

A

No processes waiting

28
Q

What are the characteristics of a monitor?

A

Local data variables

Process enters monitor by invoking one of its procedures

Only one process may execute in the monitor at a time.

29
Q

What are the two requirements for processes that interact?

A

Synchronization

Communication

30
Q

T/F Message passing does not meet the requirements for processes that interact

A

F, messaging passing meets the requirements

31
Q

T/F Message passing works in a distributed environment

A

T

32
Q

What are the three combinations of message passing?>

A

Blocking send, blocking receive

Nonblocking send, blocking receive

Nonblocking send, nonblocking receive

33
Q

What are the two types of message addressing?

A

Direct

Indirect

34
Q

T/F Direct messaging allows for flexibility

A

F, Indirect