Summary


The notion of a process is one of the most important aspects of the UNIX system. In this chapter you learned how to monitor the processes you are running by using the ps command, and how to terminate a process using the kill command.

User-level commands allow you to specify when you would like processes to be run. You can specify when commands should be executed by using the at command. The batch command lets you defer the execution of a command, but without controlling when it is run.

Daemons (or demons) are processes that are not connected to a terminal; they may run in the background and they do useful work for a user. Several daemons are normally found on UNIX Systems. Many of these daemons are controlled by cron, which is itself run by init (PID 1). The cron command is a system daemon that executes commands at specific times.

Processes on a UNIX system are sequentially assigned resources for execution. System processes have a higher priority than all user processes. UNIX does not allow much user control of time-shared process scheduling. You can, however, influence scheduling with the nice command. Another simple way to affect scheduling is with the sleep command, which creates a process that does nothing for a specified time.

Signals are used to notify a process that an event has occurred. Each process may specify an action to be taken in response to any signal. The kernel balances the demand of multiple, concurrent processes for its resources through semaphores, which act as a traffic cop to ensure processes minimize contention among themselves.

You can control what will happen after you hang up or log off. To ensure that a process stays alive after you log off, use the nohup command.

UNIX supports real-time processes. You can use the priocntl command to change the scheduling parameters of a process to real-time.

The /proc file system is a virtual file system that provides a wealth of information about processes that are currently running on your system as well as other system parameters.




UNIX. The Complete Reference
UNIX: The Complete Reference, Second Edition (Complete Reference Series)
ISBN: 0072263369
EAN: 2147483647
Year: 2006
Pages: 316

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