DSA Factory
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.

Quick check

A writer is writing to a pipe whose buffer is full. What happens?

  1. AThe writer blocks until the reader has taken some data out
  2. BThe data is discarded
  3. 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.

Lock it in

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