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.

The command interpreter 235operating system because they dictate how the user can interact with the computer.Optional utilities also loom large in the user’s view, not because they are forced on theuser but because the functions they provide are often not duplicated by alternative programs,so anyone who wants to use the operating system must learn the interface to manyoptional utilities as well.1 THE COMMAND INTERPRETERA command language lets the user tell the operating system what to do. It is built of anumber of commands. The language can be interpreted by a utility process that convertscommands into appropriate service calls. Instead of a utility process, a module in thekernel may interpret the commands and directly call routines to accomplish whatever theuser requests. Whichever way command languages are interpreted, we will call thesoftware that interprets commands the command interpreter. <strong>Operating</strong> systems mayuse other names for the command interpreter, such as ‘‘monitor’’ and ‘‘shell.’’User requests to the operating system usually have two components: what programsto invoke and what their environment should be. A program is a set of instructionspackaged in such a way that a process can be started to run them. Programs, as wehave seen, are often stored in files as load images. They become processes when they areinvoked either directly through service calls or indirectly by commands. Many invocationsof a single program may exist at the same time, each in a different process. Heavilyused optional utilities such as the text editor, text formatter, and compilers often haveseveral invocations simultaneously active.The environment of a process is what distinguishes it from other invocations ofthe same program. The environment includes where input data will come from (whichfile or which device), where output data are to be placed, and parameters that give extrainformation to programs and enable optional features.For example, assume that the user wants to compile a Pascal program. The commandor set of commands might specify the following:Which compiler to useWhere the Pascal source program is storedWhere to store the resulting load imageWhether or not to run the resulting programWhether to generate a listingWhether to issue warnings for non-standard usages.Only the first of these specifications describes the program to be run. The others alldescribe the environment for the program.Whether the operating system is used in a batch mode or an interactive mode, commandsspecify exactly what the user wishes. The advantage of the interactive mode isthat mistakes are easy to repair immediately. For example, a malformed command producesan error message in either mode, but in interactive mode the next command usuallyhas not yet been entered, so a revised version of the previous command can be entered

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

Saved successfully!

Ooh no, something went wrong!