Process Synchronization Flashcards

1
Q

Processes can execute concurrently and may be interrupted at any time, partially completing execution

A

Process synchronization

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

A solution to the Producer Consumer problem

A

Have a counter initially set to zero
counter++ whenever producer produces new buffer
counter- - whenever consumer consumes the buffer

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

A scenario wherein there is data inconsistencies because of accessing the counter at the same time

A

Race condition

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

A scenario wherein a process must ask permission to enter the critical section in ___, and may follow critical section with__, then ___

A

Critical section problem

Entry section, exit section, remainder section

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

A solution to the critical section problem wherein if process p is executing in the critical section, no other processes can execute in their critical sections

A

Mutual exclusion

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

A solution to critical section problem wherein if no process is in the critical section and a process wants to enter the critical section, then the selection of that process to enter cannot be postponed

A

Progress

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

A solution to the critical section problem wherein a bound must exist on the number of times other processes can enter the critical section after a request has been made to enter the critical process and before the request is granted

A

bounded waiting

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

A critical section handling approach wherein preemption is allowed when running inkernel mode

A

Preemptive approach

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

A critical section handling approach wherein running is allowed until EXIT KERNEL MODE, BLOCK OR VOLUNTARILY YIELD CPU

  • free of RACE CONDITIONS
A

Non-preemptive approach

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

A two process solution which assumes that load and store are atomic and cannot be interrupted

What are the two variables used by this solution?

A

Peterson’s solution

int turn (indicated whose turn it is)
Boolean flag array (indicates if process is READY [true] to enter critical section)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Hardware support for implementing critical section code via locks

A

Locking

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

A processor that could disable interrupts

A

Uniprocessors

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

Atomic / non-interruptable instruction wherein it is
-executed atomically
-returns ORIGINAL VALUE of passed parameter
-set new value of passed parameter to TRUE
SHARED BOOLEAN LOCK INITIALIZED TO FALSE

A

Test and set instruction

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

Atomic/non-interruptable instruction wherein
-executed atomically
-return ORIGINAL VALUE of passed parameter
-if value == expected, value = new value (swap only if value is equa; to the expected)
SHARED LOCK INITIALIZED TO 0

A

Compare and swap instruction

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

Simplest solution to critical section problem

System calls associated with this solution are?

A

Mutex locks

Acquire() , release()

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

Since mutex locks require ___, this lock is called ___

A

Busy waiting, spinlock

17
Q

Synchronization tool that provides more sophisticated ways for process to synchronize their activities

What operations are associated with this?

A

Semaphore

Wait() , signal()

18
Q

A type of semaphore usage wherein int value can range over unrestricted domain

A

Counting semaphore

19
Q

Atype of semaphore usage wherein int value can range only between 0 and 1 which is the counterpart of mutex locks

A

Binary semaphore

20
Q

An implementation ofnthe semaphore wherein each semaphore has an assocated waiting queue

What are the data items in a waiting queue

A

Semaphore implementation without busy waiting

Value (int)
Pointer to next record on list

21
Q

An operation in semaphore w/ no busy waiting wherein you place the process invoking the operation on the appropriate waiting queue

A

Block

22
Q

An operation in semaphore w/ no busy waiting where you remove one process in the waiting queue and place it in the ready queue

A

Wakeup

23
Q

Two or more processes WAITING INDEFINITELY for an event caused by ONLY ONE of the waiting processes

A

Deadlock

24
Q

INDEFINITE BLOCKING wherein a process may NEVER BE REMOVED from the semaphore queue in which it is suspended

A

Starvation

25
Q

A scheduling problem where LOWER PRIORITY PROCESS holds a lock needed by a HIGHER PRIORITY PROCESS

What is a solution for this?

A

Priority inversion

Priority inheritance protocol

26
Q

High level abstraction that provides a convenient and effective mechanism for process synchronization

A

Monitor