ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU class(2019-2020-1) > student directories > 2017329621012-曹秋斌 >
homework 2 Version 0
👤 Author: by 283385508qqcom 2019-09-18 14:26:27
1.

The process life cycle can be defined by a state diagram which has states representing the execution status of process at various time and transitions that shows the changes in the execution status. To maintain the management information about a process the operating system uses the process control block (PCB).

process control block (PCB)

The process control block is also known as task control block. PCB contains various kind of information about a particular process such as.

  • Process state

  • Program counter

  • CPU registers

  • CPU scheduling information

  • Memory management information

  • Accounting information

  • I/O status information


A process is normally more than just program code which is often called as text section. It also contains the current activity which is implied by the value of program counter and the contents of the processor’s register. A process generally includes process stake and data section. Stack and data section contains the temporary data and global variables. Process also includes a heap which is basically a memory space what is dynamically allocated during the process run time.

process in memory

A process changes its state during its execution which is called as the process life cycle. A process life cycle consists of five stages which are:

  • New

  • Running

  • Waiting

  • Ready

  • Terminated


process life cycle



























Sate Descr iption
New The process which is being created
Running Instructions being executed
Waiting The process is waiting for an event to get occur
Ready The process is waiting to be assigned to a processor
Terminated The process completed its execution

These names of the states are uninformed and they vary across operating system. These stats are mostly found on all systems but some operating systems also more finely define process states. Processer can hold only one process at a time simply it can be running one process at a time. However, many processes may be ready or waiting.

2.Since PCB contains the critical information for the process, it must be kept in an area of memory protected from normal user access. In some operating systems the PCB is placed in the beginning of the kernel stack of the process as it is a convenient protected location.

 

Please login to reply. Login

Reversion History

Loading...
No reversions found.