Write what you learned this second week in CST 334
Topic: Processes
This week we had a lot of assigned reading and learned about processes, and how they interact with the CPU. A process is essentially a program in execution, actively using the CPU to perform tasks. The program itself remains inactive until it is run as a process. We also learned about voluntary and involuntary context switches. A voluntary context switch occurs when a process willingly yields the CPU to another process, often because it’s waiting for an event, such as reading data from a disk. In contrast, an involuntary context switch happens when the operating system forcefully removes a process from the CPU, typically to redistribute resources or because the process has exceeded its allotted time.In addition, we completed our second lab, which involved programming in C and using the fork() call to create a child process by cloning the parent process. We also worked with other system calls, such as execlp(), to replace the process image and overwrite the current execution of the program with a new one.
No comments:
Post a Comment