This is not the current version of the class.

Processes 1: Basics

Overview

This lecture introduces the process control unit. We discuss the goals of process control and the basic system calls used to create and manage processes.

Textbook readings

About process control

Shell question 1

Shell question 2

Process control system calls

Process = program image + identity + environment

Process hierarchy

Question

pid_t p1 = getpid();
pid_t p2 = getppid();
pid_t p3 = fork();
pid_t p4 = getpid();
pid_t p5 = getppid();
assert(???);

Some answers

fork: Which runs first?

fork vs. exec

Echo programs

waitmyecho.cc