process Flashcards

(14 cards)

1
Q

What’s Mutual Exclusion?

A

If process P1 is executing in its critical section then no other processes can be executing in their critical sections

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

Progress?

A

If no processes are in their critical section and other processes wish to enter their critical section then the processes that are queued to enter can not be postponed

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

What is Bounded Waiting?

A

A bound must exist on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section before that request is granted.

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

What is Preemptive?

A

Allows preemption of process when running in kernel mode

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

What is Non Preemptive?

A

Runs until exits kernel mode, blocks or voluntarily yields CPU. Essentially free of race conditions in kernel mode

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

What is Bounded Buffer Problem?

A
  • Buffers can only hold one item each
  • semaphore mutex initialized to 1
  • semaphore full intialized to 0
  • semaphore empty initialized to the value n
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Readers Writers Problem?

A
  • A data set is shared among a number of concurrent processes
  • Readers: can only read that data set. they dont perform any updates
  • Writers: Can bot read and write

Problem: Allow multiple readers to read at the same time. Only one single writer can access the shared data at the same time

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

Variations?

A
  • First Variation: No reader kept waiting unless writer has permission to use shared object
  • Second Variation: Once writer is ready, it performs the write asap
  • Both may have starvation leading to even more variations
  • Problem is solved on some systems by kernel providing reader writer locks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a Counting Semaphore?

A
  • Integer value can range over an unrestricted domain
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a Binary Semaphore?

A
  • Integer value can range between only 0 and 1. same as a mutex lock
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Semaphore Implementation with no busy waiting

A
  • Block : place the process invoking the operation on the appropriate waiting queue
  • Wakeup: remove one of the processes in the waiting queue and place it in the ready queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a deadlock?

A

Two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes

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

Starvation - Indefinite blocking

A
  • A process may never be removed from the semaphore queue when it is suspended
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Priority Inversion

A
  • Scheduling problem when lower- priority process holds a lock needed by higher priority process
  • Solved via priority inheritance protocall
How well did you know this?
1
Not at all
2
3
4
5
Perfectly