next up previous
Next: Disk Partitions Up: Basic GNU/Linux Internals Previous: Files and Filesystems

Processes

As with its filesystem, GNU/Linux manages processes as a tree. When a GNU/Linux system starts up, the first program to run (analogous to the root filesystem) is called init; its function is to initialize hardware and virtual devices, start other programs that perform system services ( daemons), and wait for user input. When a GNU/Linux system shuts down, init takes care of stopping all other running processes before exiting itself. During operation, every process (running program) is known to the kernel by its ``process identifier'' (PID). Process 1 is always init. When a user logs on, a process called a ``login shell'' is started; a shell waits for input from the keyboard, then executes the command given to it. In a graphical environment, a login initiates a ``desktop manager''. New processes are always ``spawned'' by processes that are already running. For instance, if you enter a command to start a text editor, the editor is spawned by the login shell. Processes can continue to spawn other processes, but the entire structure is always a tree, with its root at init. There are graphical utilities, ktop and gtop, for viewing the process tree.


next up previous
Next: Disk Partitions Up: Basic GNU/Linux Internals Previous: Files and Filesystems
hwang
2001-10-31