CST334 Week 2
During this week's class, the operating system's capability of managing multiple programs simultaneously was the main point of our discussion. The key point was the process concept, which can simply be defined as an executing program. I was not aware of the number of programs that my computer was "running" simultaneously, and thus it was fun to find out that the OS creates the illusion of having several CPUs through the continuous process switching. Physically, there may exist only one CPU, however, the impression is that everything is happening at the same time.
The Process API was also a topic of discussion, mainly the fork(), exec(), and wait() functions. The fork() function, to be honest, was the most confusing to me in the beginning, as it creates a duplicate of the program and the parent and child process go on executing from the same point. This concept was a bit difficult for me to comprehend but when I saw examples, it became clearer. On the contrary, exec() was a simple concept, it just terminates the current program and lets a new one take over.
Another topic was Limited Direct Execution, which is where the OS lets a program run directly on the CPU for better performance, but still has to keep control so the program doesn’t run forever or break something. It was interesting to see how hardware and software have to work together for this. Learning about context switching helped me picture how the OS keeps track of what it’s doing when it jumps between tasks.
Toward the end of the week, we talked about CPU scheduling and different approaches to deciding which process gets to run next. The MLFQ scheduler stood out because it tries to guess how long jobs might take based on behavior, even though it doesn’t actually know ahead of time. That felt like one of the clearer moments for me.
Something I’m still wondering about is how modern systems like Windows or Linux use these scheduling ideas, and how similar the concepts are for GPUs or virtual machines. Overall, this week helped connect a lot of pieces about how computers multitask without totally melting down.
Comments
Post a Comment