FOR FREE YEAR SOLVED

Process Context

 

The process context consists of the following:

1. Address space of the process: The code, data, and stack components of the process (See Fig: 8)

 

2. Memory allocation information: Information concerning memory areas allocated to a process. This information is used by the memory management unit (MMU) during the operation of the process.

 

3. Status of file processing activities: Information about files being used, such as current positions in the files.

 

4. Process interaction information: Information necessary to control the interaction of the process with other processes, e.g., ids of parent and child processes, and inter-process messages sent to it that have not yet been delivered to it.

 

5. Resource information: Information concerning resources allocated to the process.

 

6. Miscellaneous information: Miscellaneous information needed for the operation of a process.

 

Difference Between Process Context and Process Control Block:

The kernel allocates resources to a process and schedules it for use of the CPU. Accordingly, the kernel’s view of a process consists of two parts: 

 

a) Code, data, and a stack of the process, and information concerning memory and other resources, such as files, allocated to it.

 

b) Information concerning the execution of a program, such as the process state, the CPU state including the stack pointer, and some other items of information described later in this section.

These two parts of the kernel’s view are contained in the process context and the process control block (PCB)respectively.

 

Fig: 16