Second Year Course

Operating Systems & C Programming

A comprehensive systems programming course covering processes, signals, inter-process communication, sockets, threads, and synchronization — all in C on Linux. Progresses from C fundamentals through fork/exec, pipes, shared memory, and pthreads, culminating in real-world concurrent systems like chat servers, bank simulations, and the dining philosophers problem.

16 lessons114 code examplesCLanguageInstructor: Yaniv Gabay
Your Progress0 / 16 completed
2

Processes

6 lessons

02

Process Creation with fork()

intermediate

Introduction to process creation using fork(). Demonstrates parent/child relationships, zombie processes, the classic fork-in-a-loop mistake, the fix with wait/exit, and process timing with gettimeofday.

forkwaitzombie+2
6
03

Introduction to Signals

intermediate

Basic signal handling using the signal() function. Covers catching SIGINT, ignoring signals with SIG_IGN, setting alarms with SIGALRM, one-shot handlers, and the differences between signal() and sigaction() behavior.

signalSIGINTSIGALRM+2
6
04

Program Execution with exec()

intermediate

Replacing a process image with exec(). Covers the exec family (execl, execlp, execv, execvp), the fork+exec pattern for running child programs, and a practical calculator example split across parent and child.

execexeclexecvp+2
4
05

Windows Process Spawning

intermediate

Windows-specific process creation with _spawnl, _spawnlp, and _spawnv. Compares Windows spawn with Linux fork+exec and demonstrates quirky Windows argv parsing. Note: these examples require Windows (process.h) and won't compile on Linux — view the code for reference.

spawnWindows_spawnl+1
4
06

Advanced Signals with sigaction

intermediate

Deep dive into sigaction() — the robust, portable replacement for signal(). Covers the sigaction struct anatomy, sa_mask for blocking signals during handling, SA_RESTART and SA_RESETHAND flags, and SA_SIGINFO for accessing detailed signal metadata.

sigactionsa_maskSA_SIGINFO+2
7
07

Signal Coordination

advanced

Applied signal programming bringing together fork, exec, and signals. Includes a two-program alarm management system, parent-child coordination using signals, and multiplexing signals across four child processes.

coordinationalarmmulti-process+2
4