Tuesday, April 22, 2025

CST334 - Week 7

I learned how operating systems handle persistence, which means keeping data safe even after the computer is turned off. I learned that devices like hard drives and SSDs are used for this, and the OS manages how data is read, written, and stored.

One important topic was how the OS talks to I/O devices. There are two main ways: polling and interrupts. Polling checks the device over and over, which wastes CPU time. Interrupts are better in many cases because they let the CPU work on other things and only respond when the device is ready. I also learned about DMA (Direct Memory Access), which helps transfer data between memory and devices without using too much CPU.

We also studied disk scheduling, which is how the OS decides which data to read or write first. Algorithms like SSTF (Shortest Seek Time First) or SCAN (Elevator Algorithm) help reduce wait time by moving the disk head more efficiently. I thought it was interesting how the OS doesn’t always use the first-come-first-serve method for better speed.

Another big topic was RAID, which uses multiple disks together to improve speed or make data safer. For example, RAID-0 stripes data across disks for better performance, but RAID-1 makes copies for safety.

We also covered how the file system organizes files using inodes, directories, and bitmaps. Files are stored in blocks, and the OS keeps track of them using data structures like superblocks and inode tables. System calls like
open(), read(), write(), and fsync() are used to manage files. 
I'm still trying to understand more about the file system implementation, inode structure, block pointers, and how multi-level indexing works for large files. I feel I need more time to review these details to fully understand how the file system organizes and accesses data.

No comments:

Post a Comment

CST 334 - Week 8

I spent most of my time reviewing the materials to get ready for the final exam. The final covers two big topics, concurrency and persistenc...