A method used to establish IPC between processes of the parent and child.

  1. Children share the same pipe. Allows for child-parent process communication
  2. Pipes are unidirectional. You can read and write from the same pipe

Pipe Communication Types

Self Communication

  1. Create a pipe
  2. Send a message to the pipe
  3. Retrieve message from pipe, write it to stdout
  4. Send another message to pipe
  5. Retrieve message from pipe and write to stdout

Parent Child Communication

  1. Create a pipe
  2. Create a child process
  3. Parent process writes to pipe
  4. Child process retrieves message from pipe and writes to stdout

Two-way Communication

  1. Create two pipes:
    1. Pipe1: parent to write and child to read
    2. Pip2: child to write and parent to read
  2. Create child process
  3. Close unwanted ends not needed for process communication
  4. Close unwanted ends in parent process: read end of pipe1, write end of pipe2
  5. Close unwanted ends in child process: write end of pipe1, read end of pipe2
  6. Perform communication as required

Syscalls