CST 334 - Week 2
This week in the book, I learned about processes, which are instructions waiting for an action. For the CPU to function efficiently, it’s beneficial to have more than one process working concurrently, such as running a web browser and a video game at the same time. To enable this, the operating system uses virtualization to simulate multiple CPUs. In the process API, UNIX systems contain methods like fork(), exec(), and wait() that allow process management. The fork() system call creates a new process for the parent process. The wait() system call allows the processes to be scheduled to run in order. As for the exec() system call, I didn’t fully understand it from the book, but according to Google, it replaces the current process with a new one. I’m still not sure how this works.
Then comes my new nightmare: CPU scheduling, specifically the metric Response Time. The challenge for me was understanding where to find the T first run in order to calculate the T response. I’m still having a hard time figuring it out. However, the scheduling algorithms like FIFO, Shortest Job First, STCF, and Round Robin are straightforward to learn. Round Robin was the most difficult for me to understand because I don’t like the assumptions in the book, such as every task starting at the same time. But in the end, I was able to understand it. One thing I may have missed is learning the best situations to use each algorithm, but the book does mention that Round Robin is good for response time, and SJF and STCF are better for turnaround time.
Comments
Post a Comment