Posts

Showing posts from April, 2026

Learning Journal - Week 33

Overview We are now on Week 7 of my studies at CST-334, which looks to be my final module barring the Final Exam. In addition to recapping the final week, I also want to take a moment and begin by reflecting back on the course overall. Going into the course, back when I first saw the name of the course was 'Operating Systems', I must be honest and say that I was expecting a course focused on navigating Linux as an operating system, learning shell commands, and how to interface with the Operating System. What I learned instead, however, ended being way more intriguing than what I was originally anticipating. While we didn't necessarily tackle the user-oriented side of operating systems that I was expecting, I ended up with a new-found appreciation and deep understanding of the kernel, memory management, process scheduling, and I/O interfacing that operates under the hood.  Something else that I wasn't expecting was that learning about how kernels power our machines expla...

Learning Journal - Week 32

During this past week in CST-334, we continued talking about thread locks and we explored condition variables, got introduced to semaphores and flagging, and dove into some common concurrency problems.  Recap  We begin by digging into condition variables. They aim to solve one of the biggest problems of "spinning", which is wasting thread efficiency. The naive approach for waiting on a thread to be finished is by simply creating a global flag variable (int done = 0 or = 1 for example), and performing a while loop until done is set to 1. The downside of this approach being that having the thread constantly check this is wasted time and checks, so it'd be much more efficient to simply notify the thread when it's ready to proceed.  Condition variables  are the solution: they can  signal  and notify waiting threads that a processed has completed and a thread has freed, or they can be used to initiate a wait on a thread. We were also introduced to the Anderson/D...

Learning Journal - Week 31

 This past week from CST-334 focused on understanding threads and locks. As someone who was self-taught C++ as a first programming language, threads were something I stumbled across but never got to fully understand. Now learning about how threads work in the context of Operating Systems, it's a lot easier to digest and I feel much more comfortable using and understanding threads. Recap  Something we learned off the bat was that processes, in the way we've been understanding them up to this point, are essentially threads. A thread is a run of execution, and the operating system splits up time segments for these threads in the scheduling we've been used to seeing. Every process has at least one thread, and more threads can be created manually in a program like C to take better advantage of multi-programming. This means that within a specific program, we can create a separate thread to essentially run "at the same time" as other parts of our program which could help...