Ch. 5 PPT Flashcards

1
Q

What is OS design concerned with in terms of multiple processes?

A

The management of processes and threads

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

What is multiple applications?

A

Processing time is shared among active applications

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

What are structured applications?

A

An extension of modular design and structured programming

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

What is operating system structure?

A

The OS implemented as a set of processes and threads

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

What are interleaving and overlapping?

A

Concurrent processing

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

What is uniprocessor?

A

The relative speed of execution of processes cannot be predicted

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

What makes concurrency difficult?

A

Sharing/allocating resources, programming errors

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

What is a race condition?

A

When multiple threads are reading and writing data items

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

How should the OS deal with concurrency?

A

Try to allocate/deallocate resources, protect against race conditions

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

What is resource competition?

A

When concurrent processes are fighting over same resource, such as IO devices and memory and such

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

What is a critical resource?

A

One that is non-sharable. Used by a critical section of a process

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

What is deadlock?

A

Concurrent programs are completing for a critical resource that one might need at the same time as another resource

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

What is starvation?

A

When things need periodic access to the same resource

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

What is mutual exclusion?

A

When a process halts, it cannot interfere with other processes. No deadlock, and no denial to critical resources that are not in use

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

How can you guarantee mutual exclusion in a hardware level?

A

Disable interrupts. Does not work in multiprocessor environments. Lower efficiency

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

How can the ISA enable mutual exclusion?

A

Including a compare/swap. Instructions are swapped if the memory address and the instruction are the same

17
Q

What is busy waiting?

A

When a process executes something else while it waits to go into a critical section

18
Q

What is an atomic instruction?

A

One that is non-interruptable

19
Q

What is bad about special instructions?

A

Starvation and deadlock are possible, and processor time is used due to busy waiting

20
Q

What is a semaphore?

A

An integer used for signaling among processes

21
Q

What does semWait do?

A

Decrement the value

22
Q

What does semSignal do?

A

Increment the value

23
Q

What is a strong semaphore?

A

The process that has been blocked the longest is released from the queue first (FIFO)

24
Q

What is a weak semaphore?

A

The order in which processes are removed from a queue is not specified

25
What are drawbacks of semaphores?
There is no way to know if a process will be blocked when it decrements, no way to know which process will continue to run, and if the number of unblocked processes is zero or one
26
What is producer/consumer?
The issue I was running into with the queue forwarder
27
What is monitoring?
An easier implementation to semaphores. Operated with a single wait/signal function
28
What is message synchronization for?
Enforcing mutual exclusion
29
What is message communication for?
Exchanging information
30
How does message passing do blocks?
If there is no message received, the process is blocked until one is received
31
What is a rendezvous?
When both the sender and receiver are blocked until the message is delivered
32
What is direct messaging?
There is a specific identifier of the destination process
33
What is indirect messaging?
Messages are sent to a shared queue data structure