Posts

Showing posts from December, 2024

CST 334 Week 8

     This final week in CST 334, we covered persistence and its importance both in the context of operating systems and as a student. For operating systems, persistence is crucial for maintaining data and state beyond the life of a process. It is achieved by storing data in non-volatile memory, like hard drives or SSDs, ensuring that information survives even after a system shuts down or restarts.      As an online student, persistence is not just about data storage; it’s also about staying committed to completing the course and navigating the challenges that come with balancing my responsibilities at school and work. Managing deadlines and projects in both areas can be overwhelming, but I’ve learned that I can handle it if I stay focused. I’ve also realized that I can sometimes be too hard on myself. In the past, and honestly still today, I tend to be unforgiving when I miss a task or forget an assignment. However, I’m slowly learning that occasional setba...

CST 334 Week 7

     This week, we covered topics including I/O devices, disk drives, files and directories, file systems, and RAIDs. RAID is a storage technology that combines multiple physical disks into one logical unit to enhance performance, data redundancy, or both. RAID 1, also known as mirroring, duplicates data across two or more disks, ensuring that if one disk fails, the data remains intact on the other. This provides high data reliability but requires twice the storage capacity. RAID 4, on the other hand, uses a dedicated disk for parity, with parity information calculated using XOR, and distributed across the array. This parity allows for data recovery in the event of a disk failure. While RAID 4 offers better storage efficiency than RAID 1, it may suffer from performance bottlenecks, as the parity calculations are handled by a single disk.

CST 334 Week 6

     This week, we explored common concurrency issues, focusing on deadlock and how to manage it. Deadlock occurs when threads block each other by holding resources that others need, and four conditions must be met for it to happen: mutual exclusion, hold-and-wait, no preemption, and circular wait. We discussed techniques to prevent deadlock, such as enforcing strict lock ordering and using atomic lock acquisition. A practical approach to avoid circular wait is to always acquire locks in a consistent order, which can be managed through lock address ordering. Additionally, hold-and-wait can be avoided by acquiring all necessary locks at once, although this can reduce concurrency.      In addition to prevention, we also looked at methods like deadlock avoidance through intelligent scheduling, where the system ensures that conflicting threads never run simultaneously, and detecting and recovering from deadlock when it occurs. While deadlock detection and recov...