Third, the suspended state
Pending the essence of the process can not continue, even after the process hangs belong to a ready state, it can not participate CPU competition, therefore, suspend belong to a standstill, only activate or awaken to return to an active state.
Fourth, the process control block ( the PCB )
PCB has a unique action identifier, the data structure of a recordable type.
- Content :
① identification (internal PID , external)
② site processor (general purpose registers PSW )
③ management information ( P , D , address, resource list)
④ scheduling information (priority, occupies CPU time, state)
- Organization (linking, indexing)
2.3 Control Process
OS kernel support functions : 1. interrupt handling 2. Clock Management 3. primitive operations
- Interrupt processing: the CPU handling of abnormal events (interrupt source).
- Hardware discovery interrupt, software interrupt.
First, the process of creation
- Process Tree
- Create conditions
Process scheduling, user login, application requests, service
- Process : application blank the PCB , applying the necessary resources to initialize the PCB , is inserted into the ready queue.
Second, the process is terminated
- Events (normal end, abnormal interrupt, external interrupt)
- Process : the process execution state, a next scheduling -> process other state, the queue is removed -> terminate descendant processes -> return Resources -> return PCB
Third, the process of blocking and wake
The implementation of state - blocked -> blocking state - wake up -> ready state
Fourth, suspend and activation process
Activities -------> still -------> Suspend
2.4 thread
Lightweight processes, threads can execute concurrently, aims to improve concurrency. But the cost will increase