0
0
Operating Systemsknowledge~5 mins

Inter-process communication (pipes, shared memory) in Operating Systems - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Inter-process Communication (IPC)?
IPC is a way for different processes running on the same or different computers to exchange data and signals to coordinate their actions.
Click to reveal answer
beginner
How do pipes facilitate communication between processes?
Pipes allow one process to send data to another in a unidirectional flow, like a pipe carrying water from one place to another.
Click to reveal answer
beginner
What is shared memory in IPC?
Shared memory is a method where multiple processes access the same memory space to read and write data quickly without copying it between processes.
Click to reveal answer
intermediate
What is the main difference between pipes and shared memory?
Pipes send data in a stream from one process to another, while shared memory allows multiple processes to access the same memory area directly.
Click to reveal answer
intermediate
Why is synchronization important in shared memory IPC?
Because multiple processes can access the same memory at the same time, synchronization prevents conflicts and ensures data is consistent and not corrupted.
Click to reveal answer
Which IPC method allows data to flow in one direction between processes?
AMessage queue
BPipe
CShared memory
DSemaphore
What is a key advantage of shared memory over pipes?
AOnly works between parent and child processes
BData is copied multiple times
CFaster data exchange by direct memory access
DData flows only one way
Why do processes using shared memory need synchronization?
ATo prevent data corruption from simultaneous access
BTo increase data copying speed
CTo allow unidirectional data flow
DTo create separate memory spaces
Which IPC method is typically simpler to use but slower for large data?
AShared memory
BSignals
CSockets
DPipes
In which scenario is shared memory most useful?
AWhen processes need to share large amounts of data efficiently
BWhen processes need to send small messages quickly
CWhen processes run on different machines
DWhen only one process is running
Explain how pipes work for inter-process communication and give a real-life example.
Think about how water flows through a pipe from one place to another.
You got /3 concepts.
    Describe shared memory IPC and why synchronization is necessary.
    Imagine several people writing on the same whiteboard at once.
    You got /4 concepts.