Homework-2 Version 0 |
|
👤 Author: by 59739640qqcom 2019-09-14 03:37:44 |
Describe the life circle of process and why each process must have one PCB
A process always begin with a state called 'new' ,this represent that one process was being created .After being created ,it send a message to the computer which remind computer that it's waiting to be assigned to a processor .Then during the executing time,
if the customer suppose to do some inputs,The process will wait for users till users finished their work.finally the process finish execution and this phase called 'terminated'.
A PCB(Process Control Block) is significant. Each process is represented in the operating system by a PCB,it contains many pieces of information associated with a specific process , including these:
Process state:The state may be new , ready, running ,waiting , halted, and so on
Program counter:The counter indicates the address of the next instruction to be executed for this process.
CPU registers: The registers vary in number and type, depending on the computer architecture. The include accumulators, index registers,stack pointers, and general-purpose registers ,plus any condition-code information.
CPU-scheduling information: This information include such information as the value of the base of the base and limit registers, the page tables, or the segment tables, depending on the memory system used by the operating system.
Memory-management information: This information may include such information as the value of the base and limit registers, the page tables, or the segment tables, depending on the memory system used by the operating system.
Accounting information : This information includes the list of I/O devices allocated to the process, a list of open files, and so on.
In brief, the PCB simply serves as the repository for any information that may vary from process to process.
Based on the context , PCB play a very important role in manage those information generated by process ,anyway without PCB,The process can't be executed properly.