Quiz 3 Flashcards

1
Q

The value of semaphore S is 9.

What is the value of the semaphore after wait(S) is issued?

A

8

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

Which synchronization hardware is described by the pseudocode below?

A

test-and-set()

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

If there are five philosophers sitting at the table in the classic synchronization problem called the Dining Philosophers Problem, how many chopsticks are there?

A

5

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

What is an abstract data type that presents a set of programmer-defined operations that provide mutual exclusion among multiple procedures or methods and uses condition variables called?

A

monitor

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

The bounded-buffer problem solution uses the semaphore full, the semaphore empty, and a mutex. In the consumer, what is applied to the semaphore full?

A

wait()

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

What requires that the operating system be given additional information in advance concerning which resources a problem will request and use during its lifetime so that deadlock does NOT occur?

A

deadlock avoidance

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

What necessary condition for deadlock describes the condition in which at least one resource is being used by Process A, and Process B is using a resource that Process A needs immediately?

A

hold and wait

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

What is a group of instructions that need to be execute atomically called?

A

critical section

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

What is a flaw in concurrent programming that occurs when the timing or the ordering of events leads to erroneous program behavior?

A

race condition

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

What is the term to describe when a lower priority process has indirectly affected how long a higher priority process has to wait?

A

priority inversion

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