Thursday, April 20, 2023

Operating Systems: Journal 8

At last, these 8 weeks have gone by so fast!

In this operating system class, I learned that in computer science, data persistence is crucial for ensuring that important files are still accessible in a reliable fashion. I realized how important and valuable these advancements are to society. The world is literally built on top of these concepts. I now understand that this persistence is made possible through the use of a hard disk drive and, to a greater extent, solid-state media. In terms of traditional hard drives, the data is physically stored on a hard drive platter.

Overall, I believe that this class has been incredibly valuable to my future in terms of laying a good foundation for my understanding of computation. Although this class is a computer science class, I think that many of the concepts that make hard drive persistence possible can be applied to real life as well. For example, staying persistent with the goal of completing a computer science degree has gotten me to where I am now - 8 weeks closer to achieving that goal.

Tuesday, April 18, 2023

Operating Systems: Journal 7

This past week, I gained knowledge in my computer systems course regarding the concept of a Canonical Device, which involves following specific guidelines to ensure compatibility with other devices in a given system. We also covered the topic of Canonical Protocol, which establishes a set of standard communication rules for devices connected over a network. I furthered my understanding on Single-track Latency, a delay in reading or writing data due to the time it takes for a hard disk's platter to rotate. We delved into Disk Scheduling techniques like SPTF that help minimize this latency.

Furthermore, RAID, a technology utilizing multiple disks for faster recovery and data redundancy was discussed. We examined the significance of Files and Directories for organizing computer data and the crucial role played by Inode, a data structure used in Unix-based file systems for storing file metadata to optimize file access efficiency.

Tuesday, April 11, 2023

Operating Systems: Journal 6

This week in my operating system class, we learned about Semaphores and the common concurrency problems that can occur in programs. We discussed three types of bugs that can arise: Non-Deadlock Bugs, Order-Violation Bugs, and Deadlock Bugs. Non-Deadlock Bugs occur when there is no deadlock, but the program does not behave as expected due to a synchronization error. Order-Violation Bugs occur when the order of execution is not what was intended, causing the program to behave incorrectly. Deadlock Bugs occur when two or more threads or processes are blocked, waiting for each other to release resources, causing the program to stop.

To mitigate these issues, we learned how Semaphores can be used to manage the access to shared resources by multiple threads or processes. Semaphores are synchronization primitives that can be used to control access to shared resources by enforcing mutual exclusion. They work by controlling access to a shared resource using a counter variable. We learned that Semaphores can be used to implement various synchronization mechanisms such as locks, condition variables, and barriers. Overall, understanding the use of Semaphores can help prevent these common concurrency bugs and ensure the correct behavior of programs that run concurrently.

Tuesday, April 4, 2023

Operating Systems: Journal 5

My learning this week focused on multi-threaded programming, where a program with multiple threads can be viewed as having multiple processes that share the same address space and data. I also learned that indeterminate results can occur when different threads access the same shared variables. Because of this, mutual exclusion is important to prevent data races, which can be achieved using locks. Locks must provide fairness, performance, and mutual exclusion.

I also learned that concurrency through multiple threads is referred to as multithreading. When a CPU is assigned a unique thread, the program being executed can run faster. Additionally, the advantage of multithreading is that memory maps do not need to be updated when switching between threads.

This week, I gained hands-on experience with lab number 5, which allowed me to see in real-time how threads are created and joined. I also worked on implementing a bug fix that was found within lab 5.

Overall, this week's topics helped me understand the importance of mutual exclusion and concurrency in developing efficient and effective multi-threaded programs.