System/Process States
The system gives a process a state when it is created. The process’s current state is described in the state section of the process description.
The two states described below are what most processes are in:
- an activity executing on the CPU (a running process)
- a task not using the CPU (a not-running process)
On a single CPU, always one process can be active at once. All other processes must pause or transition to another state. Because of this, a process that isn’t active shows in a distinct state. There are the following states:
- Runnable state
- Sleeping state
- Uninterruptable sleep state
- Defunct state
Running Processes:
The CPU is the most valuable resource in the entire system. A running process is a process that is currently consuming the CPU while it is running. To view the status of each process, use the “ps” and “top” commands. When a process is active, the state field displays R, which stands for Running.
How to Find Top Running Processes by Memory and CPU Usage
Every current (running) instance of a program is referred to as a process in Linux. There are running processes on every instance of the Linux operating system. , SSHd, SSH processes, and cron jobs are a few examples. A process is started by any application that has to be used. These processes frequently produce new processes.
In Unix, each command you issue initiates or starts a new process. You initiated a process when you used the df command to display the amount of disc space available.
- UID – Associated user ID for this process.
- PID – ID of the process.
- PPID – ID of the parent process.
- %CPU – CPU utilized by the process.
- %MEM – Memory utilized by the process.
- STIME – Start time of the process.
- TIME – Time is taken by the process.
- COMMAND – The command that started this process.
In a Linux system, various types of processes exist. User processes, daemon processes, & kernel processes are some examples of these categories.