Blog

  • As mentioned previously, there are different types of synchronization primitives that us operating system designers offer.  If as an application designer you nee to ensure only one thread can access a piece of shared memory at a time, use a mutual exclusion synchronization primitive. But what about a different scenario in which you need all…

    Barrier Synchronization (Part 1/2)
  • With working remote and establishing a (somewhat) daily routine (that has become pretty monotonous), it’s sometimes easy to forget that we’re in the midst of a global pandemic. But that reality is amplified because of the recent wild fires, forcing those of us living in the pacific north west (PNW) — and those living in…

  • What’s the deal with a sense reversing barrier? Even after watching the lectures on the topic, I was still confused as to how a single flag could toggle between two values (true and false) can communicate whether or not all processes (or threads) are running in the same critical section. This concept completely baffled me.…

    Making sense of the “sense reversing barrier” (synchronization)
  • I had mentioned yesterday that I slept horribly, waking up early and starting day off at around 03:45 AM. That wake up time was brutal and as a result, I crashed and burned in the afternoon, leveraging those precious 30 minutes of my lunch to nap in my wife’s / daughter’s bedroom (a room with…

    Crashing and burning during lunch & Daily Review – Day ending in 2020/09/16
  • In part 1 of synchronization, I talked about the more naive spin locks and other naive approaches that offer only marginally better performance by adding delays or reading cached caches (i.e. avoiding bus traffic) and so on. Of all the locks discussed thus far, the array based queuing lock offers low latency, low contention and…

    Synchronization notes (part 2/2) – Linked Based Queuing lock
  • Today is going to be rough. I slept horribly, waking up multiple times throughout the night. Ultimately, I rolled out of my tri-folding foam mattress (a temporary bed while my daughter and wife sleep on the mattress in a separate room as to not wake me up: that parent life) at 03:45 AM this morning.…

    Tired like a zombie & Daily Review – Day ending in 2020/09/15
  • I broke down the synchronization topic into two parts and this will cover material up to and including the array based queuing lock. I’ll follow up with part 2 tomorrow, which will include the linked list based queuing lock. There a couple different types of synchronization primitives: mutual exclusion and barrier synchronization. Mutual exclusion ensures…

    Synchronization (Notes) – Part 1
  • This morning my body woke me up later than usual. After a few blinks, I squeezed the corner of my Casio G-Shock watch, the green background lighting up and shining the time: 05:55 AM. Ugh. About an hour later than I wanted to wake up. On one hand, I’m bummed because I won’t be able…

    Honoring my body’s internal alarm clock & Daily Review – Day ending in 2020/09/14
  • You need to take away the following two themes for shared memory machine model: Difference and relationship between cache coherence (dealt with in hardware) and cache consistency (handled by the operating system) The different memory machine models (e.g. dance hall, symmetric multiprocessing, and distributed shared memory architecture) Cache coherence is the promise delivered by the…

    Shared Memory Machine Model (notes)
  • My weekly review that normally takes place first thing in the morning on Sundays was completely derailed this time around, all because I could find the URL to a website that I had sworn I bookmarked for my wife’s birthday present. I ended up coughing up two hours of searching: searching directly on Reddit’s website…

    Losing 2 hours searching for a website bookmark & Weekly Review: week ending in 2020/09/06