April 13th, 2026 Journal Entry Week 6

 April 13th, 2026

Journal Entry Week 6 (30 minutes)


This week we studied synchronization and how the threads coordinate their access to the shared resources. Our main topics were semaphores, locks, condition variables, and barrier synchronization. We also covered the Anderson Dahlin method that gives a more structured way to build a thread safe class using locks and condition variables. 

Semaphores are pretty cool counters that control the access to resources. They are like these things that make threads wait or signal depending on the availability. Locks are way more simpler and act like a binary gate. They say if a thread has access or not. Condition variables are a cool part that allows threads to wait until a certain condition is true. This can be useful when you have to coordinate many threads. Barrier synchronization is about making sure all your threads reach a certain point before they can continue. This is like a checkpoint system. 

The hardest topic this week was Anderson Dahlin. I get the pieces that it uses like the locks and condition variables. It is just the putting them together in the correct order. It is still confusing for me. I get that I need to use while loops but for waits and that signaling wakes up the threads i guess but I don't get entirely how to add the condition variables or what order stuff goes in. I'm trying to figure out the recipe but I might just have to memorize for now and try to figure out why it works later. 

My aha moment was clicking why wait calls need to be inside the while loops instead of the if statements. It clicked for me that threads can wake even when the condition variables aren't true anymore. 

One question I still have is how this scales in real systems. How do developers decide between using a semaphore versus locks and how they are implemented in real programming languages like Java. Also, how much of it is handled in the background like behind the scenes of the libraries? 

I see a lot of connections from programming projects and anything involving shared data or concurrency. It also connects back to computer architecture courses with topics like processes vs threads. I feel like I'm getting the concepts but really need a lot more polishing. This courses has been a lot more difficult to grasp than previous courses. 


=======================================================================

Write a reflection on your learning in this week of class. 


It is okay if you summarize the main topics covered during the week, but the purpose of the log is reflection.  What questions do you have?  What ideas do you have?   Are there any concepts that you're finding hard to get your head around?  If so, take this opportunity to explain exactly what's not clear.


A way to approach this is to think about how the things we learned this week fit together, both with each other and with things from previous lectures and from other topics.  The basic steps are below.


Identify the topics we covered in class -- you can start by listing them

Explain what each of the topics were in your own terms -- take the identified topics and add a sentence or two describing them

Identify least-understood topics -- of these topics, which was the hardest for you to write the descriptions?

Explain the nature of your confusion -- for these difficult topics, what pieces of them make sense and what pieces are difficult to describe?

Identify "aha" moments -- which topic did you find it easiest to write about, and why did it make sense?

Ask questions -- what do you think will come next?  Are there any gaps that don't seem to be explained yet?

What connections did you see to other classes and applications -- have you used/heard/thought about these topics before?

 


I'd recommend treating these like steps.  First do step one and list out the topics.  Next, describe them.  After that, think about how those two steps went and what it seems to mean.  Finally, think about how these topics are tied together -- will they be helpful in other classes, do they relate to things we learned previously, or are you thinking about how they might fit into the larger topic of virtualization?


 


Note: your reflection should be at least 250 words, and will be capped at ~2k words.

Comments