Chapter 20. Dealing with HP-UX Processes

   

Chapter Syllabus

20.1 Process Table

20.2 Process States

20.3 Listing Processes

20.4 Sending Signals to Processes

20.5 Process Nice Values

20.6 Some Useful Commands

Every time you start a command or a program, a process is created in memory. A process is an instance of a running program. On an abstract level, it contains text, data, and stack parts . Text is the code that is being executed and the data are acted on by the code. A process is either in a user or kernel state. In either of these two states, a process uses temporary space for storing data. This temporary space in memory is called the stack. If a process is in user mode, it is using the user stack, and if it is in kernel mode, it uses the kernel stack. A process is in kernel mode when it is accessing system calls. The HP-UX kernel maintains a data structure known as the process table. As soon as a process starts, its entry is created in the process table. It remains in the process table until it finishes its execution and is terminated . The process table keeps a record of process attributes, for example, the owner and group of the process, its start time, and priority. However, the actual process table data structure is quite complex. The total number of processes that can be stored in the process table is determined by the nproc variable value used in the kernel reconfiguration process, as discussed in Chapter 16. Every process is assigned a unique identification number called the process ID ( PID ). A process that creates another process is the parent of that process. The process ID associated with the parent process is the parent process ID ( PPID ). If a parent process dies while any of its children are still active, the init process becomes its parent process. The init process is started at boot time and has the PID of 1.

A process is in one of many states at every moment. It may be running, waiting to run, stopped , waiting for some other process or resource, or in the zombie state. Every process has a priority number associated with it. The kernel uses this priority number when scheduling processes.

Processes run in the foreground or the background. All foreground and background processes may be listed at any time. A user can also send different signals to processes that affect their execution progress. A signal is like an interrupt that communicates some information.

In this chapter, you will learn how to list the process table and the state of processes. You will be able to send signals to running processes. You will also see what process nice values are and how these can be changed.


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net