One of the many jobs assigned to system administrators is making sure the programs of users are running properly. This task is made more complex by the presence of other programs running concurrently on the system. For various reasons, these programs might fail, hang up, or otherwise misbehave. Understanding how the UNIX® environment creates, manages, and destroys these jobs is a crucial step in building a more reliable system.
Developers also have a motivation to learn how the kernel manages processes, because applications that behave well with the rest of the system take fewer resources and don’t anger the system administrators as frequently. An application that restarts constantly because it creates zombie processes (described later) is obviously not desirable. An understanding of the UNIX system calls that govern processes allows developers to write software that can run silently in the background, rather than needing a terminal session that must be kept on someone’s screen.
The fundamental building block of managing these programs is the process. A process is a name given to a program being executed by the operating system. If you’re familiar with the
ps command, then you’re familiar with a process listing, such as the one shown in Listing 1.null