Leverage Notes #9: The Actor Model Helped My Concurrency 

Back in my operating systems class, I remember going over concurrency. It’s the operating system’s job to allow for applications and programs to be able to do tasks and computations in parallel. Reading Modern Operating Systems, 4th Edition and doing the class labs was a good way to dip my toes in atomic operations, threads, processes, race conditions, etc. But professionally, my work in embedded software engineering has mainly led to using event-driven concurrency, specifically using QP Active Objects (Actors). This week, I started refamiliarizing myself with multithreading concurrency to learn more about modern C++ features. In hindsight, QP gave some good guardrails that helped my software development process. The Actor model of computation is great when your microcontroller’s utilization is nowhere near 100%, you need concurrency, and you want encapsulation that helps minimize the risk of concurrency bugs. It can also be easier to reason about. Returning to threads after a couple of years reminds me of the cost of abstraction. While performance can often be a tradeoff, good abstractions can help reduce development time. QP made working with concurrent programs feel more manageable at a time when I was still growing as an engineer. Now, I am at the point where I have a lot more appreciation for all of the threading support that C++ 11 brought about as well as the battle tested architecture patterns that help younger professionals onboard. #LeverageNotes #Concurrency #QP #CPP #SoftwareEngineering #SmallLeverLabs