CST334 Week 2
This week, we learned about processes. A process is essentially a program running in a protected environment managed by the operating system. This environment includes memory for the process’s code, data, and stack, as well as CPU registers for fast computations. To prevent interference between processes, they run in user mode, which limits access to hardware and certain instructions. To interact with the outside world, processes use system calls, which the operating system handles through a special TRAP instruction. The OS also manages process states and performs context switching, allowing multiple processes to share the CPU efficiently.
We also learned how processes interact with the operating system to perform tasks and manage resources. For example, when a process needs I/O, it may be blocked until the operation is finished, allowing the CPU to handle other tasks. The operating system tracks everything using a data structure called the Process Control Block (PCB), which holds information about the process’s state, memory, priority, and I/O operations. This helps the OS make smart decisions about when to switch between processes.
Comments
Post a Comment