Process Control Subsystem

Explain process control subsystem.

Process subsystem describes the structure of a process and some process data structures used for memory management. A process is the execution of a program and consists of a pattern of bytes that the CPU interprets as machine instructions (called "text"), data, and stack. 

Many processes appear to execute simultaneously as the kernel schedules them for execution, and several processes may be instances of one program. a process on a UNIX system is the entity that is created by the fork system call. Every process except process 0 is created when another process executes the fork system call. The process that invoked the fork system call is the parent process, and the newly created process is the child process. 

Every process has one parent process, but a process can have many child processes. The kernel identifies each process by its process number, called the process ID (PID). Process 0 is a special process that is created "by hand" when the system boots; after /orbing a child process (process 1), process 0 becomes the swapper process. Process 1, known as init, is the ancestor of every other process in the system.

A user compiles the source code of a program to create an executable file, which consists of several parts:

  • a set of "headers" that describe the attributes of the file,
  • the program text,
  • a machine language representation of data that has initial values when the program starts execution, and an indication of how much space the kernel should allocate for uninitialized data, called bss2 (the kernel initializes it to 0 at run time),
  • other sections, such as symbol table information.
A process in the UNIX system can execute in two modes, kernel or user, it uses a separate stack for each mode. The user stack contains the arguments, local variables, and other data for functions executing in user mode. The kernel stack contains the stack frames for functions executing in kernel mode. Every process has an entry in the kernel process table, and each process is allocated a u area3 that contains private data manipulated only by the kernel.

Data Structures for Processes

The process table entry and the u area contain control and status information about the process. The u area is an extension of the process table entry.

Read Also
Block Diagram of System Kernel

Have a Unix Problem
Do you have a UNIX Question?

Unix Books :-
UNIX Programming, Certification, System Administration, Performance Tuning Reference Books

Return to : - Unix System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.