Chapter 5 & 7 (Quiz 5 Portion) Flashcards
What is the “Critical section” problem?
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.
What are the solutions to Critical-Section problem?
1- Mutual Exclusion.
2- Progress.
3- Bounded Waiting.
What is “Progress” ?
If no process is executing in its critical section and there exist some processes that wish to enter then cannot be postponed indefinitely.
What is “Mutual Exclusion” ?
If process Pi is executing in its critical section, then no other processes can be executing in their critical sections.
What is the difference between Preemptive & Non-preemptive kernel in Critical-Section Handling in OS?
1- Preemptive : allows preemption of process when running in kernel mode.
2- Non-preemptive : runs until exits kernel mode, blocks, or voluntarily yields CPU.
Is there Critical-Section in Hardware? and why?
No, because of using locking.
What is the difference between “Uniprocessors” & “Modern machines” ?
Uniprocessors : could disable interrupts.
Modern machines : Atomic = non-interruptible.
What is “Semaphore”?
Synchronization tool that provides more sophisticated ways (than Mutex locks) for process to synchronize their activities.
What is “Starvation” in Process Synchronization?
A process may never be removed from the semaphore queue in which it is suspended.
What is “Priority Inversion”?
Scheduling problem when lower-priority process holds a lock needed by higher-priority process.
What are the Classical Problems of Synchronization?
1- Bounded-Buffer Problem.
2- Readers and Writers Problem.
3- Dining-Philosophers Problem.
What is the Readers and Writers Problem?
Allow multiple readers to read at the same time.
What is the Solution to the Readers and Writers Problem?
Using Priorities.