13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Process creation and naming 2951 PROCESS CREATION AND NAMING<strong>Operating</strong> systems differ widely in how frequently they start new processes. A spoolingsystem has only one process, which repetitively selects a job and runs it. Multiprogrammedoperating systems introduced simultaneous execution of several jobs. Typicalbatch multiprogramming operating systems initialize themselves to have a fixed numberof processes. Each process runs one job, or one job step, until completion, and then looksfor another job or job step to run. Alternatively, each job step can be treated as a newprocess, created by the job controller at the conclusion of the previous step.Interactive multiprogramming started with a similar philosophy. Each interactiveterminal is initialized with one process, which serves any user of that terminal from logonto logoff. As the user cycles among editing, compiling, running a program, and debugging,the process that serves that user loads new programs into virtual store and executesthem.Users tend to be impatient, however, and often want to do other work while waitingfor a long compilation, execution, or text formatting to finish. Some interactiveoperating systems retain a batch facility for this purpose, allowing the user to submit thelong operation as a job to that facility and continue to use the interactive process forsomething else.A fundamentally different approach is seen in Unix and related operating systems.Instead of initializing the operating system to have a fixed number of processes based onthe number of terminals or the maximum allowed level of multiprogramming, we canallow processes to be created at any time. If process creation is fairly inexpensive, computationcan be organized naturally into relatively small pieces, each of which is performedby a new process. If several processes are working simultaneously for a singleuser, they compete with each other and the other processes currently requesting service.This cheap-process philosophy affects the way users view the operating systemand the way individual programs work. A user who wants to execute a long compilationand also edit a file might start two processes, one for each operation. The compilationprogram itself might be built of several passes, each of which is implemented in aseparate process. These processes can execute sequentially. Such separation of functionis a form of modularity, which can make programming and maintenance easier. <strong>An</strong>extreme example of this philosophy is seen in the Thoth operating system, in which thetext editor creates a new process to service every editing command.One effect of the cheap-process philosophy is seen in the structure of the commandinterpreter. It is itself a process, and it creates a new process for every command. Whenthat new process terminates, the command interpreter prompts for a new command. Ifthe user doesn’t want to wait for the previous command to finish, the command interpretercan be told to prompt immediately for the next command.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!