Add Book to My BookshelfPurchase This Book Online

Chapter 11 - Processes

UNIX Systems Programming for SVR4
David A. Curry
 Copyright © 1996 O'Reilly & Associates, Inc.

Chapter 11: Processes
Overview
The UNIX operating system, unlike the operating systems on most personal computers, is a multiuser, multitasking operating system. The first term, multiuser, means that more than one person can use the system at the same time to get work done. The second term, multitasking, means that the system as a whole, and each user individually, can do more than one thing at a time. Contrast this with a personal computer, which supports one user at a time, using one program at a time.
But, this is all an illusion. On most computers, there is only one processor, and that processor can only do one thing at a time. (Some newer systems have more than one processor, but each processor can still do only one thing at a time.) The UNIX system creates the illusion that the computer is doing several things at once by timesharing the processor. The processor spends a few microseconds doing one task, and then switches to another. It spends a few microseconds there, and then switches to yet another task. Since microseconds are too short for most humans to deal with, it appears that all these tasks are taking place simultaneously. This scheme usually works well, because while some tasks are blocked (for example, waiting for the user to type something), other tasks can be processed. The illusion only breaks down when there are so many tasks waiting to be serviced that the system seems slow, and everyone starts to complain.
Processes are what the UNIX system uses to split work up into tasks. Each task is placed into a separate process, and the operating system timeshares the processor among all currently active processes. When a new task is started (by a user executing a command, for example), a new process is created. When the task is finished, the process associated with that task is destroyed. Many processes stand alone as individual tasks. Other processes may be interrelated, being subtasks of a larger task. In this chapter, we describe processes—how to create them, how to destroy them, and how to control them. We also examine the interrelationships among processes, and ways to use them.

Previous SectionNext Section
Books24x7.com, Inc © 2000 –  Feedback