Control process

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.

  1. 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)

  1. Organization (linking, indexing)

2.3 Control Process

OS kernel support functions : 1. interrupt handling 2. Clock Management 3. primitive operations

  1. Interrupt processing: the CPU handling of abnormal events (interrupt source).
  2. Hardware discovery interrupt, software interrupt.

First, the process of creation

  1. Process Tree
  2. Create conditions

Process scheduling, user login, application requests, service

  1. Process : application blank the PCB , applying the necessary resources to initialize the PCB , is inserted into the ready queue.

Second, the process is terminated

  1. Events (normal end, abnormal interrupt, external interrupt)
  2. 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

Guess you like

Origin www.cnblogs.com/giaogiaogiao/p/12524295.html