| United States-English |
|
|
|
![]() |
Shells: User's Guide: HP 9000 Computers > Chapter 2 The Bourne ShellUNIX System Structure |
|
HP-UX is a fully compatible, enhanced version of UNIX™ System V. The structure of the system consists of several parts which work together to bring you the HP-UX operating system. The kernel is the core of the HP-UX operating system. It controls the computer's resources and allots time to different users and tasks. The kernel keeps track of the programs being run and is in charge of starting each user on the system. However, the kernel does not interact with the user to interpret the commands. The shell is a program that the kernel runs for each user which sets up commands for execution. By having several shells and one kernel, HP-UX is able to support many users at the same time (the user's requests are not actually processed at the same time, but the kernel schedules processing time in a way which simulates concurrent processing). By having the kernel in control, it is also possible for one user to run several shells. The kernel remains in control of all shells and programs. When you log on to the system, the kernel checks if your login identifier and password are correct. It then runs a shell program for you to interact with it (you never see this, only the shell after successful login). Most systems will start the POSIX Shell (/bin/posix/sh) as a default, but it is possible to run the Bourne Shell (/bin/sh), the C Shell (/bin/csh), or the Korn Shell (/bin/ksh). instead. To give you an idea of processes and how the kernel schedules them, let's look at the ps command which lists the processes the kernel is currently coordinating. Type: ps -ef and receive a list similar to the following:
The UID column refers to the user identifier (the person who executed this process). PID refers to the process identifier. There are several commands which use the PID, such as kill. For example,
will kill (terminate) process 28125 (the first entry in the above list). PPID is the process identifier of the parent process (the process that calls this process). The first row shows 28124 as the parent process. Look in the PID column for 28124 to see what the parent process is (shown on the second row). The C column shows processor utilization for scheduling. STIME is the starting time of the process. TTY is the controlling terminal for the process. TIME is the cumulative execution time for the process, and COMMAND is the command name. For more details on the ps command, see the HP-UX Reference. Before we begin the discussion on the Bourne Shell, let us first define some terms. The following are some definitions which will be used in this tutorial.
This tutorial contains several different types of text displays:
|
|||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||