This is not the current version of the class.

Processes 2: Inter-process communication

Overview

In this lecture, we discuss inter-process communication in general, concentrating on two kinds: termination notification and stream communication.

Draft lecture notesTextbook readings

Inter-process communication

Metrics for communication

Termination notification question

Voluntary termination: Exit

Involuntary termination

Collecting a termination notification

Example: waitmyecho

What’s weird about Unix termination notification

Speed of exit notification

Streaming communication question

The pipe system call

pipe illustration

Before pipe
After pipe

selfpipe

About pipes

Pipe buffering

childpipe

Pipe end-of-file

Pipes and the shell

Full pipeline

Problem: How to move file descriptors around?

Initial shell
After pipe system call
Full pipeline

dup2

Pipe dance

Full pipeline

Pipe dance explained