This week introduces the process abstraction, process states, parent-child process relationships, process creation, process termination, and the Linux process API using fork(), exec(), wait(), and exit().
Week 2 moves from the general idea of an operating system to one of its most important abstractions: the process. Students study how a running program is represented, how processes are created, and how the OS switches between them.
| Time | Activity | What Students Do | Link |
|---|---|---|---|
| Before Lecture | Preparation Reading | Read OSTEP Chapters 4–6 and write two questions about processes. | Book → |
| Lecture 1 | Process Abstraction | Program vs process, address space, PCB, process states, and context switch. | Slides → |
| Lecture 2 | Linux Process API | fork(), exec(), wait(), exit(), parent process, child process, and zombies. | Slides → |
| Lab Session | Process Creation | Compile C programs, create child processes, and inspect process trees. | Lab → |
| After Lecture | Assignment 2 | Write a C program that creates five child processes and waits for them. | Assignment → |
| End of Week | Quiz 2 | Complete short quiz on processes, states, fork(), exec(), and wait(). | Quiz → |
Explain the difference between a program and a process, describe process states, identify the role of the PCB, create processes using fork(), replace a process image using exec(), wait for child processes, and inspect processes using Linux tools.
Slides for process abstraction, program vs process, process states, context switching, process creation, and the Linux process API.
Instructor notes and class summary for reviewing process states, fork behavior, parent-child relationships, and common process commands.
Placeholder for Week 2 lecture recording. Replace this href with YouTube, Blackboard, Google Drive, or the local recording URL.
Starter files for fork_example.c, wait_example.c, exec_example.c, process_tree.c, and a simple Makefile.
Read Chapters 4, 5, and 6. Focus on the process abstraction, the process API, fork(), exec(), wait(), and the idea of limited direct execution.
Use the Linux manual pages to review the exact behavior and return values of fork(), exec-family calls, wait(), waitpid(), and exit().
Students write C programs that create child processes, print PIDs, use wait() for synchronization, and verify process structure using pstree and ps.
Write a C program that creates five child processes. Each child prints its PID and parent PID. The parent must wait for all children before printing a final completion message.
Short quiz covering program vs process, process states, PCB, context switching, fork(), exec(), wait(), zombies, and Linux process commands.
Use this section as the central download area for students. Replace the placeholder paths after you upload the actual slides, notes, lab manual, assignment, and starter code.
Next week focuses on threads and concurrency. Students should be comfortable with process creation, process IDs, parent-child process relationships, and basic Linux process commands before Week 3 begins.