CPU Scheduling: Understanding Processes and Threads
Posted by miko_rodri and classified in Computers
Written on in English with a size of 5.07 KB
1. Processes
A process is a program in execution. It is a unit of work within the system. A program is a passive entity, while a process is an active one. A process needs resources to accomplish its task (CPU, memory, I/O, files). Process termination requires the reclamation of any reusable resources. A single-threaded process has one program counter, specifying the location of the next instruction to execute. The process executes instructions sequentially, one at a time, until completion. A multithreaded process has one program counter per thread. Concurrency is achieved by multiplexing the CPUs among the processes or threads.
2. Process States
As a process executes, it changes its state:
- New: The process is being created.
- Running: Instructions