Chapter Summary

   

A process in an instance of a running program. In a multitasking system like HP-UX, many processes are running simultaneously . A record of these processes is kept in a kernel data structure known as a process table. The HP-UX kernel implements a scheduling policy to run these processes by allocating time slices to them. Every process in the process table is identified by a process ID number and carries other attributes that show process statistics. The size of the process table is limited by the nproc kernel parameter.

When the HP-UX kernel is loaded into memory, it starts the init process, which has a PID of 1. The init process then creates other processes that are its children processes. During its life cycle, a process changes its state many times. Processes in the process table can be listed using the ps command. This command shows a number of process attributes, such as the PID, owner and group , parent process ID or PPID, and time used by the process.

Signals can be sent to a process using the kill command or keyboard shortcuts. Every signal has a signal name and a numeric value associated with it. If no signal is specified with the kill command, it sends SIGTERM to a specified process by default. A process may ignore some signals such as SIGTERM . However, there are some signals that can't be ignored by a process. SIGKILL is one of these signals and is used to kill a process that is not responding to any other signal.

When you start a process, it is usually attached to your terminal. If you log out while a process is still running, it loses the connection with its controlling terminal and is terminated . The nohup command is used to disable hangup and quit signals so that the process continues to run even if you log out. This command is used for those processes that take a long time to complete, where you don't want to keep a terminal busy.

Every process has a nice level that is used by the kernel for scheduling purposes. The default nice value is 20. The nice and renice commands are used to change this value for new and running processes, respectively. The timex command is used to calculate the time utilization by a process. The trap command in used to capture a signal and carry out a task when a particular signal is received.


   
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