11-08-2012, 02:23 PM
PROCESS RELATIONSHIPS
PROCESS RELATIONSHIPS.pptx (Size: 333.73 KB / Downloads: 21)
Introduction
There are relationships between processes.
First, every process has a parent process
The parent is notified when the child terminates, and the parent can obtain the child's exit status.
wait for any process in a process group to terminate.
relationship between the login shell and all the processes that from login shell.
Terminal Logins
Let's start by looking at the programs that are executed when we log in to a UNIX system.
The procedure is similar regardless of the type of terminal we use ,
it could be a character-based terminal,
a graphical terminal emulating a simple character-based terminal,
or a graphical terminal running a windowing system.
BSD Terminal Logins
The system administrator creates a file, usually /etc/ttys,
that has one line per terminal device.
Each line specifies the name of the device and other parameters that are passed to the getty program.
When the system is bootstrapped, the kernel creates process ID 1, the init process, and it is init that brings the system up multiuser.
The init process reads the file /etc/ttys and, for every terminal device that allows a login, does a fork followed by an exec of the program getty
Network Logins
The main (physical) difference between logging in to a system through a serial terminal
and logging in to a system through a network is that the connection between the terminal and the computer isn't point-to-point.
With the terminal logins , init knows which terminal devices are enabled for logins and spawns a getty process for each device.
In the case of network logins, all the logins come through the kernel's network interface drivers (e.g., the Ethernet driver),
and we don't know ahead of time how many of these will occur.
Instead of having a process waiting for each possible login, we now have to wait for a network connection request to arrive.