2019329621077唐晓莲homework-2 Version 0 |
|
👤 Author: by 1097682897qqcom 2021-09-21 13:25:34 |
Process is a program in execution; process execution must progress in sequential fashion
A process includes:program counter,stack,data section
1.A process is an execution of a program, and a process always corresponds to at least one specific program. A program can correspond to multiple processes, and the same program can run on different data sets, thus forming several different processes. Several processes can execute the same program code concurrently, while the same process can execute several programs sequentially.
The program is static, the process is dynamic, and the program is binary code stored on a certain medium. The process corresponds to the execution process of the program. The system does not need to create a process for a non executing program. Once the process is created, it is in a changing dynamic process, corresponding to a changing context.
The program is permanent and the process exists temporarily. The permanence of the program is relative to the process. As long as it is not deleted, it can be permanently stored in the media.
2.Other processes in concurrent execution have a mutually restrictive relationship. Sometimes they are in the running state, sometimes they are suspended for some reason, and they are in the waiting state. When the reason for their suspension disappears, they enter the ready to run state again. So we must distinguish these states.
As a process executes:
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
3.process control block:Process state,Program counter,CPU registers,CPU scheduling information,Memory-management information,Accounting information,I/O status information