Posts

Showing posts from August, 2025

CST334 - Week 8

 Wow, this is the final week for this course in Operating Systems! I have learned a lot this week and over the course of eight weeks. Concepts that did not really make sense to me during the week it was a topic, was revisited with the opportunity to make up programming assignments. I am pleased to know I was able to make some changes to my code to pass all the tests for it. If I can succeed in attempting another programming assignment to get full points, I will feel some sense of accomplishment. I was excited to learn about operating systems and came in with no real understanding of it besides the basics. I had no idea how in depth it would go and how much I would struggle to grasp the concepts. Perhaps if there was more time. However, when I started this class, I was also given a special project assignment to take live data and use it to point an antenna. Although I only had to focus on the mathematical portions while my partner set up everything else using C, I was puzzled about ...

CST 334 - Week 7

This week I learned about Persistence, with a focus on hard drives and IO devices. The first half of the lessons taught how to calculate variables like rotational delays and calculating the time it takes to read or write data. Running the calculations show that sequential reading of data performs much better than random reads and is the preferred strategy. Disk schedulers decide the order that disk requests are processed. I also learned about how the main goals for persistent storage is to be high performing, reliable, protected, and follow a naming scheme where it makes sense. At the lowest level, the name of a file is called the "inode number" and for now, we are to assume that every file has an inode number associated with it. While directories are also associated with an inode number, the contents within it are more specific, such as the user-readable name that it would have to map to the inode number. I also finished researching with my team about how IO scheduling might...

CST 334 - Week 6

This week I learned about condition variables. Condition variables is a queue that allows threads to wait on a condition to become true, before proceeding to execute. It is another alternative to spinning locks, which is rather inefficient. Condition variables can be declared with pthread_cond_t c and offers two operations: wait() , which puts the thread to sleep, and executes with a call to  signal() .  wait()  has mutex as a parameter so it is able to release the lock and put a thread to sleep when signaled, with the ability to reacquire the lock. I also learned the importance of using while statements over if with condition variables to ensure the thread re-checks the condition after waking up. Good practice with use of condition variables is to always hold the lock while signaling. I also learned about semaphore, a synchronization primitive. In this, it is important to consider the execution path, as it affects what value will be printed when there are multiple thr...