CST 334 Week 2

I learned more about processes this week. Processes are instances of running applications that are controlled by the operating system (OS). Process creation, scheduling, and management are handled by the operating system (OS), which also ensures effective multitasking through time-sharing and CPU virtualization. The OS quickly switches between processes because there are frequently more than there are CPUs available, giving the appearance of simultaneous execution. The execution status of each process is determined by its lifetime, which consists of many states: running, ready, and stalled. The OS can effectively monitor and manage processes thanks to the process control block (PCB), which houses crucial data such the process ID, registers, memory allocation, and open files.

Along with studying how system methods like fork(), exec(), and wait() help with process management, I also investigated the creation and termination of processes. Wait() makes sure a parent process stops until its child completes execution, exec() swaps out the process's memory for a new program, and fork() generates a new child process. I also learnt about context switching, which permits the CPU to move between processes but comes with a performance cost. The OS divides CPU time across processes according to scheduling rules including First-Come, First-Served (FCFS), Round-Robin, and Priority Scheduling, which strike a balance between efficiency and fairness. One important lesson was the difference between mechanisms and policies: mechanisms are low-level implementations, such as context switching, and rules specify how decisions are made for scheduling processes.

Comments

Popular posts from this blog

Week 2

Week 1

Week 4