CST-334 Week 2

The topics we covered this week are processes, how the OS manages them, and the different schedulers that decide which processes should run at a given time. A process is essentially a running program that executes on the CPU. Processes run in user mode and do not have access to privileged instructions. When a process needs to perform a restricted operation, it makes a system call that triggers a trap, allowing the OS to take control in kernel mode and safely execute the requested task before returning to user mode. The different scheduling algorithms that we studied this week include FIFO, a scheduling program that runs the first process in a queue, SJF, a schedular which run the process with the shortest execution time, and Round Robin, a scheduler that switches between processes based on a time splice.

I think one of the more difficult topics for me this week was how to schedule process using the Round Robin scheduler. I was able to understand this conceptually but had some difficulty applying this in practice.

For our programming assignment this week, we practiced writing different schedulers. One of the key pieces of writing these functions was using a function named get_minimum(). This function took a process and a pointer to a function as parameters. I thought this was interesting to see as it reminded me of using lambdas as function parameters in other programming languages. I am comfortable working with them but I never really understood how they worked internally. I think it makes sense that their really just pointers that reference some memory address where a function is stored.


Comments

Popular posts from this blog

Week 4

Week 5

Week 2