Celebrated Elliott’s 1 year birthday. Jess and I are two weeks late but to be fair, the two of us were in the midst of moving the entire house, making it difficult to celebrate properly. And now that we moved in — but not quite fully unpacked — it’s easy to let that celebration slide and slip away so I’m glad that yesterday Jess pushed to have us celebrate, even if we were two weeks late.
Ordered equipment to take care of the yard. I ordered a EGO 21″ self-propelled mower and an EGO Handheld Leaf Blower Kit, the two items totaling roughly $1,000.00. But I’ve done my research, watched several YouTube videos and ready enough reviews to determine that both pieces of equipment are are designed to last many years.
Video chatted with friend for 10 minutes over Zoom. Just played catch up since the two of us have not seen each other much (only once, during black live matters protest in downtown Seattle) one COVID-19 kicked in.
Dropped by my sisters house so Elliott and can hang out with her cousin. Again, a good reminder that moving to Renton makes these little pop overs feasible, now that it only takes 10 minutes (instead of 40) to drive to my sister’s house.
Cleaning
Scrubbing down couch with oxiclean, Metric chilling
Mixed up an oxiclean solution and scrubbed down our couch. I’ll post the outcome in a future blog but so far, results look promising.
Graduate School
Lectures
Finished global memory systems lectures and made it half way through distributed shared memory. I’m still behind a bit behind on the lectures (I would say about one to two days) but I think I should be fairly caught up pretty soon.
What did I learn
Learned about release consistency memory model. Unlike sequential consistency, we can unlock parallelism by waiting for the coherence action to trigger just before a lock is released: this is known as release consistency. We can further optimize this by only generating coherence traffic at the time of (the other) lock acquisition(s), known as lazy release consistency.
Feel like I’m getting deeper and deeper into operating systems (exactly what I want). Learning about how to optimize the memory consistency model is amazing: going from sequential consistency to release consistency (i.e. eager release consistency) to lazy release consistency. My head … it’s spinning. But in a good way. And the theory reminds me of work. Eager vs Lazy means push versus pull.
How do you take care of the tools that you use for cleaning? This is a question I’ve been curious about over the last couple days since currently going through a cleaning phase. To up my cleaning skills, I’ve been searching online for tutorials and discovered an amazing YouTube channel called Clean My Space that published a video titled “7 Expert Cleaning Tips You Need to be Using”. After watching the video, I’m now applying the cleaning techniques to maintain and take care of my home cleaning tools.
Brushes (with Oxiclean) Mix oxiclean and hot water (check manual for right ratio) and then toss your brushes (e.g. toothbrush, bottle brush) in the mixture and allow the bristles to soak anywhere between 30 to 60 minutes.
Sponges Apply the same method as above (or microwave the sponge). Keep in mind that the sponge should be cleaned weekly and replaced monthly
Cleaning Cloths. For cleaning clothes, just toss them in the washer and sprinkle with baking soda. But for microfiber, make sure to first rise them alone then place them in delicate bag. Add a little detergent, thats it. Dry them as you would (gentle cycle). Also, never use micro fiber for greasy, since it ruins the microfiber
Mop Head. Wash and then to dry. Wash monthly.
Broom. Remove broom from broom stick, place in bucket (with Oxiclean). Perform this maintenance every 3 months.
Vacuum. Refer to user guide (or manual), but few good general tips for maintaining include: empty on the regular basis, wash the filter (especially for HEPA vacuum), and lay the entire vacuum flat for 24 hours and cut up stuff that gets tangled in the brush, using warm soap and water and allowing let them rest for 24 hours to let them dry
Went on a cleaning binge. Not sure why sometimes I get totally obsessed with cleaning but yesterday was one of those spurts. I had watched about a dozen YouTube videos (from Clean My Space) on cleaning tutorials, followed by vigorouly scrubbing down stove tops with baking soda and vinegar, buying cleaning supplies (e.g. micro fiber, empty bottles for home made cleaning supplies) from both Ace Hardware and Big Lots, and ending the day with wiping down the entire marble kitchen counter
Got into an argument with Jess around finances. Seems like talking about finances triggers me, the topic putting me in a bad mood almost every time. Although I have some ideas on why this is the case, I cannot exactly pinpoint why I go into fight or flight mode.But if I’m honest, I do find the idea of splitting the money down the middle uncomfortable. But I know that’s ridiculous. I do want to sort out these feelings but I think they run deep and stem from my awful past experiences with money between me and my family members.
Graduate School
Project Work
Chatted over the phone with my project partner. After working together on the previous assignment (i.e. Project 2 on Synchronization Barriers), my project partner (Will) and I have decided to work together again for project 3 (using gRPC and building a multi-threaded, asynchronous web server). We’re approaching the division of work a bit differently than last time, when I took on majority of the development and he took on the performance testing and benchmarking. This time around, we’re going to try and parallelize the work and split down the development (and design) right down the middle.
Lectures
Completed lectures on distributed shared memory and started on distributed shared memory. The biggest take away for me (so far) for the distributed shared memory lectures is that from a sequential consistency perspective, the system does not distinguish a read/write for a normal memory data access from a read/write of a synchronization read/write variable. Why does this even matter? At first, I could not my wrap my head around the significance of this idea and how/why this related to distributed shared memory. But the more I thought about, the more it makes sense: if a thread locks a critical section and updates one (or more) variable(s), why generate cache coherence while inside the critical section — why not wait until an unlock happens? Actually, as I type this out, there might be a good reason: for readers of that variable to make forward progress on their (non critical) section.
Questions I have
Why do we have a GCD (global cache directory) and how does this “one level of indirection” help as part of building the larger global memory system?
Watched several YouTube videos on mowing grass. I found an awesome YouTube channel called the The Lawn Care Nut. I had been searching around online on good content that will teach me how to maintain and care for my front (and back) yard. Now, although the owner of the YouTube channel tailors most of his videos for more intermediate or advanced lawn enthusiast, he’s recorded a quite a few videos for people like me: people who know nothing about lawn care and are trying to learn how to maintain their first lawn.
Family
Elliott and I walked the dogs at cedar river trails. Jess needed an extra 30 minutes of sleep so during that time, which actually turned into almost 2 hours, Elliott and I walked the dogs at cedar river trails, a trail that also has an off-leash dog park (would not recommend for playing fetch, the field practically filled with rocks and dirt)
Ran errands for 2 hours, driving from Renton to North Seattle. I picked up two (1/2) gallon bottles of home made Chai from Cloud City, what used to be our local cafe that I had walked to almost every day. Then I drove over to the Grateful bread, picking up Jess (3) loaves of Challah and a baker’s dozen of cinnamon raisin. Then, I ended the trip with stocking up on raw pet food from DD Meats located in Mount Lake Terrace.
Roamed around Ikea in Renton. Jess and I bought a couple household items while shopping at Ikea but mainly we spent time walking the show room to collect ideas for our house.
Difficult time comforting Jess when she’s upset. It’s insane but it’s so easy for me to gently console other people (like friends or even strangers) when they are upset but I find it incredibly difficult to do the same for Jess. The words just don’t come out. It’s difficult to put into words why I cannot comfort her but I just feel much more vulnerable and my throat chokes when I see her upset, making it difficult for me to even utter any words of comfort.
Watched Elliott on my day off work and brought her over to her cousins house for a little play date. Jess needed time to herself to get some work done so I too Elliott over to her cousins house (10 minutes away, now that we live in Renton) and I totally get why parents have play dates now. It’s so much easier to watch the kids when they are engaged with one another and you don’t have to be the single source of entertainment.
What I learned
The term anonymous pages. In virtual memory management (VMM), an anonymous page is a page not backed by any particular file1 and is used for things like the stack, or the heap, or copy-on-write pages. The term (anonoymous pages) was brought in the video lectures on global memory systems (see section below: graduate school).
Graduate School
Project 3
Set up my local development environment using CMake and something called vcpkg. I’m curious why we are using CMake instead of Make: what are the advantages of using the former? And what does vcpkg do?
Successfully imported protobuf header in my “store.cc” code. Just like in professional development, the best way to build momentum for a new development project is by committing as small pieces of code that push the project forward, even if its an inch.
Lectures
Watched half the on global memory systems. This is an interesting topic, paging out not directly to disk but to other node’s memory systems using the local area network (LAN) instead. I’m assuming here that the time to spin the head of a physical hard disk exceeds the time to generate a packet and for the packet to traverse the network. Otherwise, what’s the point?
Relearning from my own notes
Unified buffer cache. This term seemed eerily familiar so I searched through my previous blog posts and found the actual post where I learned this concept. It’s always a nice feelings to rediscover your own learning.
Music
[fvplayer id=”5″]
Played around with different chord options on the guitar. My guitar instructor (Jared Borkowski) shared a beta PDF guide called “Chords with colors” so I spent a few minutes noodling with my guitar and recorded a quick little clip (above).
Never heard of or used gRPC. According to their website, it’s a high performance open source RPC framework. I’m wondering if this package is used outside of academia. Probably is and probably is actually used within Amazon.
What I do know
Google Protobuf. Fortunately, I have some experience with Google Protobufs since we use message serialization format within our stack (and the technology itself is quite ubiquitous)
Multi-threading. Prior to joining the OMSCS program, I had little to no understanding how threads worked and how they differed from processes. But since then, I have a much more intimate understanding of threads and even written several multi-threaded applications, both in graduate school and in a professional work setting. So I actually feel quite comfortable and prepared for project 3.
Questions I Have
What does the gRPC framework offer? What advantage does using this framework have over just a simple HTTP framework? What problem does gRPC solve? Is it similar to an OS’s RPC framework but extended so that it works across hosts?
What does the wire protocol look like for gRPC? Does gRPC dictate the wire format or not?
What I’m hoping to learn
Best practices for thread pools. Seems pretty straight forward to create a pool of threads and design the system in such a way that each thread will grab work from a (bounded) buffer. But what else should I consider?
How I might use gRPC for future projects. In the previous project (i.e. Project 2), I learned about OpenMP and MPI and convinced that if I ever need to write parallel software, I would use those libraries and runtime engines. Maybe the same will be true once I start fiddling with gRPC?
Swinging on the swings with Elliott. She was sitting on my lap, facing my direction, as swung us on the swing back and forth. The entire time she was smiling and when her cold chubby cheeks brushed up against mine, some dad love feelings ran through my body.
Eating a kick ass lunch. My wife whipped up a delicious Vietnamese dish with bean sprouts and pickled cucumbers and fermented tofu.
Therapy Session
Vented about on call the past week. I shared the handful of times that I was paged out of bed at 03:30 AM and the operational issues that lasted until 10:00 pm on the evenings and being tied to the computer.
Shared the sense of betrayal I felt at work. How someone who I thought was in my corner, rooting for me, actually no longer advocates for me after I declined their “opportunity” to lead a project.
Declining the project that “sets me back for a promotion” allows me to bring my best self to work. Although one could argue that me not accepting the “opportunity” to lead a project (that would’ve easily tacked on additional 5-10 hours per week) sets me back for my promotion, I did it so maintain a balance between my professional and personal life, which quite frankly is what I am all about: living a balanced life, not one where I am endlessly pursuing the next thing.
Realized that I need to build a stronger community of supporters. Take away from this sense of betrayal is that I need to widen my network of supporters and not to put all my eggs in one basket, so to speak.
Random
Cool Quotes
“Academia is ripe for pursuing ideas on the lunacy fringe”.
Graduate School
Skipping Java and Spring (for now) and jumping into Distributed System lectures. I almost always follow the curriculum in the order prescribed by the syllabus. But I’ve decided to skip (for now) some video lectures on Java and Spring… and this makes me a little bit anxious. Honestly, I find the Java and Spring lectures a bit boring (to be fair, I might actually enjoy them once I start watching the lectures). Right now, I’m interested in learning more about the fundamentals and theories of constructing distributed systems so I’ll jump to those videos.
Music
Dusted off and played the ukulele for Jess and Elliott. I feel like I abandoned the ukulele after picking up the guitar. And strumming my beautiful Soprano ukulele yesterday reminded me that the instrumental has its own vibe and own personality, the strings sounding much more … bright.
Family
Fell asleep at 06:30 pm. I normally fall asleep between 08:30 and 09:30, on both weekdays and weekends. But yesterday I was shattered after my sleep was interrupted several times throughout the night, the most notable when Jess had a coughing fit at around 03:00 AM, at which point I was pretty much unable to fall back asleep.
Slept in the same bed as Elliott and Jess last night. This was pretty sweet actually. Although I woke up multiple times throughout the night, I loved having Elliott and Jess in the same bed since I’ve been sleeping alone — well, with the dogs — for the last six months or so.
Wrapped a baby net around stair railings. Installing the net (my sister’s idea) prevents little Elliott from slipping through the rails. Although I do not think her head could possibly squeeze through, the net gives Jess piece of mind and that’s important since she’s the one watching her throughout the day.
Took Elliott shopping at Safeway while Jess took her work call. We picked up some avocados for our morning smoothies and some blackberries and blueberries (side note: why does a palm sized box of blueberries cost $6.00). While paying for our goods, our cashier awkwardly pulled down her mask for Elliott to see her face. Outside the context of COVID-19, this would be totally normal and even appreciated. But given we are in the midst of the pandemic, I felt awkward but didn’t feel compelled to ask her to put her mask back on given there was a glass screen positioned between us.
Graduate School
Lectures
Did not read any lectures but did download all the videos for Spring Operating systems. I normally do not download the videos to my laptop however wind was hitting us pretty hard and our lights were flickering so I was preparing for the situation in which our internet disconnected.
Project Work
Completed writing documentation for project 2 submission. This included an analysis of the algorithms that I wrote (i.e. centralized barrier with sense reversal, dissemination and tournament) and why some barriers performed better (or worse) than other barriers.
Skimmed through requirements for project 3i.e. build a distributed service using grpc). This project got announced Monday evening and will be due in about 3-4 weeks and I like to get started early to avoid last minute cramming, which leads to unnecessary stress.
Now that we talked about happened before events, we can talk about lamport clocks
Lamport’s Logical Clock
Summary
A logical clock that each process has and that clock monotonically increases as events unfold. For example, if event A happens before event B, then the event A’s clock (or counter value) must be less than that of B’s clock (or counter). The same applies between “happened before” events. To achieve this, a process will increase its own clock monotonically by setting the counter to the maximum of “receipt of the other process’s clock or its own local counter”. But what happens with concurrent events? Will hopefully learn soon
Events Quiz
Summary
C(a) < C(b) means one of two things. A happened before B in the same process. Or B is the recipient and chose the max between its local clock.
Logical Clock Conditions
Lamport’s logical clock conditions
Summary
Key Words: partial order, converse of condition
Lamport clocks give us a partial order of all the events in the distributed system. Key idea: Converse of condition 1 is not true. That is, just because timestamp of x is less than timestamp of y does not necessarily mean that x happened before y. Also, is partial order sufficient for us distributed system designers?
Need For A Total Order
Need for total order
Summary
Imagine a situation in which there’s a shared resource and individual people want access to that resource. They can send each other a text message (or any message) with a timestamp. The sender with the earliest timestamp wins. But what happens if two (or more) timestamps are the same. Then each individual person (or node) must make a local decision (in this case, oldest age of person wins)
Lamport’s Total Order
Lamport’s total order
Summary
Use timestamps to order events and break the time with some arbitrary function (e.g. oldest age wins).
Total Order Quiz
Total order quiz
Summary
Identify the concurrency events and then figure out how to order those concurrent events to break the ties
Distributed Mutual Exclusion Lock Algorithm
Distributed mutual exclusion lock
Summary
Essentially, this algorithm basically requires each process to send their lock requests via messages and these messages need to be confirmed by the other processes. Each request contains a timestamp and each host will make its own local decision, queueing (and sorting) the lock request in their local process and breaking ties by preferring lowest process ID. What’s interesting to me is that this algorithm makes a ton of assumptions like no broken network links or split brain or unidirectional communication: so many failure modes that haven’t been taken into consideration. Wondering if this will be discussed in next video lectures
Lots of assumptions of distributed mutual exclusion lock algorithm including 1) All messages are received in the order they are sent and 2) no messages are lost (this is definitely not robust enough for me at least)
Messages Quiz
Messages Quiz
Summary
With Lamport’s distributed mutual exclusion lock, we need to send 3(N-1) messages. First round that includes timestamp, second for acknowledge, third for release of lock.
Message Complexity
Message Complexity
Summary
A process can defer its acknowledgement by sending it during the unlock, reducing the message complexity from 3(N-1) to 2(N-1).
Real World Scenario
Real world scenario
Summary
Logical clocks may not good be enough in real world scenarios. What happens if a system clock (like the banks clock) drifts? What should we be doing instead?
Two conditions must be met in order to achieve Lamport’s physical clock. First is that the individual clock drift for any given node must be relatively small. Second, the mutual clock drift (i.e. between two nodes) must be negligible as well. We shall see soon but the clock drift must be negligible when compared to intercommunication process time
IPC time and clock drift
IPC and Clock Drift
Summary
Clock drift must be negligible when compared to the IPC time. Collectively, this is captured in the equation M >= Epsilon ( 1 – k) where E is the mutual clock drift and where K is individual clock drift.
Real World Example (continued)
Real world example
Summary
Mutual clock drift must be lower than IPC time. Or put differently, the IPC time must be greater than the clock drift. So the key take away is this: the IPC time (M) must be greater than the mutual clock drift (i.e. E), where k is the individual clock drift. So we want a individual clock drift to be low and to eliminate anomalies, we need IPC time to be greater than the mutual clock drift.
Conclusion
Summary
We can use Lamport’s clocks to stipulate conditions to ensure deterministic behavior and avoid anomalous behaviors
Wrote up my analysis on the various barrier synchronization algorithms that I implemented. I had to describe the various algorithms (e.g. dissemination barrier, tournament barrier, centralized sense reversal barrier) for the documentation that will accompany our code and experiments as part of Project 2 for advanced operating systems.
Finished watching lectures on Active Networks. Didn’t find the material too interesting however I realized there are certainly concepts (like overlay networks) applied to our (AWS) networks.
What I learned
Quote from Donald Knuth “Beware of bugs in the above code. I’ve only proved it correct — not tried it.“
Work
Represented my team (Blackfoot Edge Applications) at weekly org wide operations meeting. Every week, our senior manager runs a organization (Blackfoot) wide operations meeting where each team reviews their their high severity events and dashboards from the previous week. During the meeting, I shared three particular interesting events that took place.