OS Part 3 (Inter Process Communication) Flashcards
1
Q
How does the kernel facilitate communication between processes?
A
Kernel sets up shared memory (distinct location from processes own memory) so that processes can both read input/output from each other.
2
Q
What is the “critical region”?
A
Any time a process is actively accessing shared memory.
3
Q
What are the 4 conditions needed to allow processes to communicate with one another correctly and efficiently?
A
- No two processes simultaneously in their critical
regions. - No assumptions made about number or speed of
CPU(s) - No process outside a critical region may block
another process. - No process should wait forever to enter its critical
region.
4
Q
What is the “critical region”?
A
Any time a process is actively accessing shared memory.
5
Q
What is “busy waiting”?
A
When a process takes up CPU resources by constantly checking (e.g infinite while loop) if it can access shared data.
6
Q
What three values are tracked with Dijkstra’s Semaphores?
A
- “Full”, which counts the number of slots that are in use.
- “Empty”, which counts the number of slots that are free.
- “Mutex”, which guards the buffer ensuring mutual exclusion.