COSC240 • Operating Systems

Week 2: Processes & Threads

Examine process address space anatomy, Process Control Blocks (PCB), Linux task_struct internals, lifecycle state transitions, and kernel threading models.

📚 What You Will Learn
  • Core architectural mechanics and low-level data structures.
  • Kernel operational states, hardware interrupts, and protection boundaries.
  • Theoretical trade-offs, performance implications, and industry standards.
✅ What You Should Do
  • Review lecture notes and assigned textbook chapters.
  • Explore interactive pedagogical steppers and simulation modules.
  • Complete weekly tutorials, practical lab assignments, and review quizzes.
📂 Course Modules & Deep-Dive Texts
Module 01

The Process Model & Memory Layout

Dissect process memory segments (text, data, bss, heap, stack) and Process Control Block structures.

Address SpacePCBtask_structContext Switch
Module Overview →
Module 02

Process Lifecycle & State Transitions

Trace process creation (fork, exec), termination, zombie states, orphan processes, and waitpid synchronization.

fork()execve()Zombie ProcessSignals
Module Overview →
Module 03

Classical Thread Concepts

Understand lightweight concurrency, shared address spaces, thread control blocks, and concurrency benefits.

ConcurrencyTCBShared MemoryLightweight
Module Overview →
Module 04

Thread Implementation & POSIX APIs

Master user-space threads vs. kernel-supported threads and POSIX pthread creation and synchronization.

pthread_createMutexesJoin/DetachTLS
Module Overview →