PPT Slide
Producer-Consumer IPC pattern
- Most basic pattern of IPC; combines signaling with data exchange.
- Easily visualized as a pipeline (Figure 7.10)
- Note that the producer can “get ahead” of the consumer by generating more output than the consumer can consume (vice versa); the O/S must perform buffering.
- The O/S does not have access to infinite disk and/or memory, so buffering is limited; the producer- consumer code should be written with this in mind. This also helps keep “slack on the line” if process scheduling is “bursty”.