Chapter 5 & 7 (Quiz 5 Portion) Flashcards

1
Q

What is the “Critical section” problem?

A

1- Process may be changing common variables, updating table, writing file, etc.
2- When one process in critical section, no other may be in its critical section.

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

What are the solutions to Critical-Section problem?

A

1- Mutual Exclusion.
2- Progress.
3- Bounded Waiting.

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

What is “Progress” ?

A

If no process is executing in its critical section and there exist some processes that wish to enter then cannot be postponed indefinitely.

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

What is “Mutual Exclusion” ?

A

If process Pi 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
5
Q

What is the difference between Preemptive & Non-preemptive kernel in Critical-Section Handling in OS?

A

1- Preemptive : allows preemption of process when running in kernel mode.

2- Non-preemptive : runs until exits kernel mode, blocks, or voluntarily yields CPU.

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

Is there Critical-Section in Hardware? and why?

A

No, because of using locking.

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

What is the difference between “Uniprocessors” & “Modern machines” ?

A

Uniprocessors : could disable interrupts.
Modern machines : Atomic = non-interruptible.

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

What is “Semaphore”?

A

Synchronization tool that provides more sophisticated ways (than Mutex locks) for process to synchronize their activities.

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

What is “Starvation” in Process Synchronization?

A

A process may never be removed from the semaphore queue in which it is suspended.

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

What is “Priority Inversion”?

A

Scheduling problem when lower-priority process holds a lock needed by higher-priority process.

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

What are the Classical Problems of Synchronization?

A

1- Bounded-Buffer Problem.
2- Readers and Writers Problem.
3- Dining-Philosophers Problem.

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

What is the Readers and Writers Problem?

A

Allow multiple readers to read at the same time.

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

What is the Solution to the Readers and Writers Problem?

A

Using Priorities.

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