This week introduces threads, shared address spaces, concurrency, race conditions, and the POSIX threads programming model used to build multi-threaded systems.
Week 3 moves from processes to threads. Students learn why operating systems support multiple threads inside one process and how shared memory creates both performance benefits and correctness problems.
| Time | Activity | What Students Do | Link |
|---|---|---|---|
| Before Lecture | Preparation Reading | Read OSTEP Chapters 26–27 and write two questions about threads and concurrency. | Book → |
| Lecture 1 | Thread Abstraction | Process vs thread, thread control block, stack per thread, shared address space, and context switch. | Slides → |
| Lecture 2 | POSIX Threads | pthread_create(), pthread_join(), thread arguments, return values, and simple race examples. | Slides → |
| Lab Session | Thread Creation | Compile pthread programs, create multiple threads, and observe interleaving output. | Lab → |
| After Lecture | Assignment 3 | Write a C program that creates multiple worker threads and computes partial sums. | Assignment → |
| End of Week | Quiz 3 | Complete short quiz on threads, shared memory, pthread_create(), pthread_join(), and race conditions. | Quiz → |
Explain the difference between processes and threads, describe shared address space, create POSIX threads, identify race conditions, and explain why synchronization is necessary.
Slides for threads and concurrency. Replace this placeholder with your final PDF or Google Slides link.
Instructor notes and class summary for review after lecture and before assessment.
Placeholder for lecture recording or external video link. Replace this href with YouTube, Blackboard, or local recording URL.
Starter files, examples, and templates for the Week 3 lab and assignment.
Complete the assigned reading before lecture. Focus on definitions, mechanisms, tradeoffs, and examples that connect to the lab.
Use this reference to look up commands, system calls, library calls, and Linux behavior related to this week.
Compile pthread programs, create multiple threads, and observe interleaving output.
Write a C program that creates multiple worker threads and computes partial sums. Submit source code, screenshots, and a short explanation.
Short quiz covering threads, shared memory, pthread_create(), pthread_join(), and race conditions.
Central download area for slides, notes, lab, assignment, starter code, and reference files. Replace placeholder paths after uploading final files.
Week 4 focuses on CPU scheduling. Students should be comfortable with processes and threads before studying how the OS chooses what runs next.