Posts

Showing posts from August, 2025

Week 32 - CST334 Final Week

 CST 334 - Week 8 This is our eighth and final week in CST334, also known as Operating Systems. In this class we learned about virtualization, concurrency, and persistence. Virtualization The OS gives each process the illusion of having the CPU to itself, when in reality it is sharing it with the OS and other processes. The OS does this through a variety of ways: Processes are executed directly on the CPU. The CPU uses interrupts and voluntary yields to regularly switch between different processes. The OS saves the current 'context' of each process when it is paused, and loads it when the process is ran again. Many scheduling policies, such as FIFO, Round Robin, or Multi-level Feedback, exist to give different processes a fair amount of CPU time. The OS also gives each process the illusion of having all memory to itself, when it is likewise sharing memory with other processes. Each process is presented virtual address, which the CPU translates to a physical address. The CPU use...

Week 31

Image
CST334 Week 7 This week was our seventh week in CST-334, also known as Operating Systems Operating Systems: Three Easy Pieces Chapter 36: I/O Devices Chapter 36 discusses the basics of I/O devices. Key Takeaways: Interrupts are used to tell the CPU when a I/O request is complete. A Direct Memory Access (DMA) engine is a specialized device for handling I/O requests. Explicit I/O instructions and memory-mapped I/O are two ways to interact with I/O devices. Device Drivers is a piece of software that knows how a device works, and abstracts that device to the system. A basic protocol for an I/O device might be: Wait for drive to be ready. Write parameters to command registers. Start the I/O. Data transfer (for writes). Handle interrupts. Error handling.  Chapter 37: Hard Disk Drives Chapter 37 discusses hard disk drives. Key Takeaways: Data in HDDs is partitioned in blocks.  A platter is a circular, hard surface within a HDD that stores data. Each platter has two sides, and HDDs ma...