PID – Process ID
Each process in unix has a parent process. When a system is booted, a special process called the swapper or scheduler is created with PID = 0.
Swapper creates three children using the etc/init file: 1. Process Dispatcher 2. vhand & 3. bdflush (1,2,3 being the process id respectively).
Process dispatcher in turn creates shell. All user processes are children of the shell.
Thus:
Swapper/scheduler
- Process Dispatcher
- Shell
- All user processes
- vhand
- bdflush
getpid() – Gets process id
getppid() – Gets parent process id

0 Comments:
Post a Comment
<< Home