CST 334 - Week 6
Week 6 Overview:
This week in CST 334 felt like everything I’ve been learning about threads and synchronization finally came together. We didn’t have actual coding assignments for the lectures on the Bounded Buffer (OSTEP 30a), Semaphores (OSTEP 31), and Synchronization Barriers (OSTEP 31a), but we dove deep into how all these concepts work behind the scenes. It was honestly helpful to slow down a bit and focus more on understanding the patterns and problems before jumping straight into code.
The lectures on the Bounded Buffer really helped clarify how semaphores control access between producers and consumers, and how you can use just a few semaphores to avoid race conditions and deadlocks. It made me realize how important the order of operations is when multiple threads are sharing data. The semaphore lecture helped things click a bit more for me. I’ve come across wait() and signal() before, but I always kind of just accepted them without fully grasping why they were used the way they were. This time, it made sense how they’re used to control access when multiple threads are trying to do things at once. It’s not just about throwing them in; it’s about using them with intention.
The concept of synchronization barriers was new to me. I’d never thought about how you make threads wait for each other before continuing. That lecture was pretty cool. I had no idea you could coordinate threads like that without totally halting everything else.
Even though the main programming assignment this week was tough, especially debugging condition variables in the reader-writer logic, I can say I walked away with a much stronger grip on how concurrency really works. It’s starting to click.
Comments
Post a Comment