Process management involves computing and distributing CPU time as well as other resources. Most operating systems allow a process to be assigned a priority which affects its allocation of CPU time. Interactive operating systems also employ some level of feedback in which the task with which the user is working receives higher priority. Interrupt driven processes will normally run at a very high priority. In many systems there is a background process, such as the
System Idle Process in Windows, which will run when no other process is waiting for the CPU.
Esstential Reading:
Chapter 4: Processes (Introduction to Linux)A process in Linux has a series of characteristics, which can be viewed with the
ps command:
-
The process ID or PID: a unique identification number used to refer to the process.
-
The parent process ID or PPID: the number of the process (PID) that started this process.
-
Nice number: the degree of friendliness of this process toward other processes (not to be confused with process priority, which is calculated based on this nice number and recent CPU usage of the process).
-
Terminal or TTY: terminal to which the process is connected.
-
User name of the real and effective user (RUID and EUID): the owner of the process
-
Real and effective group owner (RGID and EGID)
Linux is a multi-user, multi-tasking operating system that has a UNIX-like way of handling processes. Execution speed of commands can depend on a thousand tiny things.
Here is a script that will let you search for a given process by name. It is currently saved as 'pswho' in /usr/local/bin on the virtual servers from MDK, Inc.:
ps auxw --width 240 | grep $1 | grep -v "grep $1" | grep -v "pswho $1"
The command 'top' is also useful in viewing the running processes.