Announcements
- Today's lecture
- Review the first multithreading example from this past Wednesday's lecture, highlighting similarities between multprocessing and multithreading, pointing out differences.
- Work through two versions of a multithreaded program where the main thread of execution shares data with each of the baby threads it creates.
- Version 1 is intentionally broken to illustrate the most obvious of race conditions.
- Version 2 provides a very simple fix so that the race condition is no longer present.
- Motivate my decision to move from C to C++ for its more robust and error-resistant treatment of threads.
- Work through two or three C++ threading examples.
- Assigned Reading
- You're reading all of Section 12.1 and Sections 12.3 through Sections 12.8 right now, skipping those subsections that refer to networking and servers.
- Chapter 12 is actually the fourth chapter of the reader.
- Code examples are in C, but the concepts are largely the same regardless of language.
- Once we learn networking, we'll come back and hit on some of these excluded sections.
Announcements
- Other announcements
- Assignment 3 is due tonight, just before midnight.
- Assignment 4 is out as well, due a week from tomorrow (Tuesday) night.
- Midterm is on Friday, November 3rd during normal class time in CEMEX Auditorium.