The Internet Encyclopedia (Volume 3)

(coco) #1

P1: JDW


UNIX WL040/Bidgoli-Vol III-Ch-41 August 13, 2003 17:26 Char Count= 0


506 UNIXOPERATINGSYSTEM

Figure 3: Job control.
Summary of Popular Commands
There are a number of commonly used commands on a
typical Unix operating system. For a detailed list of avail-
able commands, users should visit any number of stan-
dard texts on Unix (most notably Gilly, 1986; Hahn, 1994;
Peek, Todino, & Strang, 1998; Sobell, 1995). Online re-
sources include The Unix Reference Desk (n.d.) and Dig-
ital Unix Online Documentation., which details Digital
Unix (a BSD-flavor) but is highly useful for the standard
commands and syntax. Table 4 summarizes some of the
most popular commands.

OPERATING SYSTEM STRUCTURE
Kernel Structure
The job of an operating system is to provide an interface
between the user of the system and the hardware of the
computer. This interface is provided, at the lowest level, by
the part of the Unix operating system known as thekernel.
The kernel is a file that exists on the file system like any
other file but is read into memory when the computer is
first turned on (a process known as “booting”). When the
computer is booted, the kernel file (usually called some-
thing like “vmunix” or simply “unix”) is loaded into mem-
ory and begins executing.
The kernel provides low-level services and runs on the
computer in a protected mode, which tries to ensure that

Table 3Job Control Commands

Ctrl-z Suspend the job in the foreground
Ctrl-c Terminate (kill) the job in the foreground
fg%n Change the background job numbern
to run in the foreground
bg%n Change the stopped job numbernso that
it begins executing in the background
kill%n Terminate the job numbern
jobs Print out a list of all current jobs known to the
current shell

Table 4Popular Unix Commands

cat A filter program that prints out a file to
standard output.
cd A utility to change the current directory to
some other directory in the file system
chmod A command to change the permissions of
afile
cp A utility that copies one file to another
lp, lpr Commands to print files to a printer
ls A utility for listing the contents of a directory
on the file system
man Access the help system for information on
commands and functions
mkdir A utility for creating new directories
mv A utility to move a file from one location to
another or to rename a file
rm A utility that removes a file from the file
system.

that the operating system itself will always be available
and in a “sane” mode for users to use. Included among
these low-level services provided by the Unix kernel are
terminal handling services, signal handling, user man-
agement, process management and scheduling, memory
management, file system services, hardware interrupt ser-
vices, and interprocess communication.
These low-level services are provided to both the ker-
nel itself and to user processes by a defined set of func-
tion calls known as an API (application programming
interface). The API provided by the kernel offers func-
tions called “system calls” that can be called by a user’s
program, and these calls provide fundamental access to
services such as memory management, file system access,
and so on. Figure 4 shows an abstract view of a typical
Unix kernel layered architecture.
Free download pdf