Process is a program in execution.
- Program: usually binary program, which is placed in the storage medium (such as hard disk, optical disc, magnetic tape, etc.) and exists in the form of physical file;
- Process: after the program is triggered, the permissions and attributes of the executor and the data required by the program code will be loaded into the memory. The operating system gives these memory units an identification code (PID). It can be said that a process is a running program.
As a process executes, it changes state
new: The process is being created
running: Instructions are being executed
waiting: The process is waiting for some event to occur
ready: The process is waiting to be assigned to a process
terminated: The process has finished execution
Because the whole process can be clearly summarized into five states.
Information associated with each process
Process state
Program counter
CPU registers
CPU scheduling information
Memory-management information
Accounting information
I/O status information
