Week 26: CST 334 - Operating Systems
WK02: Processes, Scheduling, and CPU Management
This week's topics deepened my understanding of how operating systems handle processes and CPU scheduling. We covered OSTEP chapters 4–8, focusing on Processes, the C Process API, Limited Direct Execution, CPU Scheduling, and Multilevel Feedback Queues (MLFQ).
Starting with Processes, I learned that a process is more than just a running program - it's an isolated execution environment with its own address space, registers, and program counter. This made me appreciate how the OS provides both protection and controlled sharing among processes. The C Process API helped bridge theory and practice by introducing system calls like fork(), exec(), and wait(). These calls illustrate how new processes are created and managed. Seeing how fork() duplicates the current process and exec() replaces it with a new program clarified how shells and multitasking work under the hood.
The idea of Limited Direct Execution was harder to grasp at first. It describes how user programs run directly on the CPU for efficiency but must rely on system calls and traps to switch back to the OS for privileged operations. My confusion mainly lies in fully visualizing how the CPU switches between user mode and kernel mode safely, but I'm beginning to understand the importance of this design in preventing user programs from crashing or taking over the system.
CPU Scheduling and MLFQ were my "aha" moments. I liked how scheduling policies balance fairness and performance. The MLFQ algorithm especially stood out because it dynamically adjusts priorities based on process behavior - rewarding interactive jobs and preventing starvation. It connects well with concepts from computer architecture and performance optimization.
Next, as I have not used these concepts before, but based on the required exercises performed, I imagine seeing these scheduling principles tie into modern virtualization or container systems. Understanding how the OS decides who runs next feels like a key step toward understanding how resources are shared efficiently in all computing systems.
Comments
Post a Comment