Free Processes and threads lessonsProcesses and threads · Stage 2 · Processes talking to each other · Step 2
Pipes and signals
See how a pipe connects two programs with a bounded buffer, and how signals interrupt a process. About 12 minutes.
A writer is writing to a pipe whose buffer is full. What happens?
- AThe writer blocks until the reader has taken some data out
- BThe data is discarded
- CThe buffer grows without limit
Show the answer
The writer blocks until the reader has taken some data out. The kernel makes the writer wait; that is how a pipe keeps a fast producer from overrunning a slow consumer.
4 questions on this idea
Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.
Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve