Sometimes the most productive thing you can do is relax.
Mark Black
Week 5 is here! Can’t believe that we’re more than halfway through this course. Seems like time has flown. This week I felt really behind and really lost in the material. I had to spend a ton of time reading over and over again before I felt like I finally had a grasp on what we were learning.
One of the things we learned about was locks. A lock ensures that any critical section executes as if it were a single atomic instruction. There are different types of locks such as simple spin locks and ticket locks. Ticket locks are fair, meaning that waiting threads are processed on a first-in first-out order as the dequeue ticket integer increases which prevents resource starvation. However, spin locks do not care about request time. Whichever thread grab first then that thread get to go next.
That’s all for now. Still need to finish up this week’s lab so cutting this short this week.
