Linux Introduction
VI-EDITOR
Process Management
Linux Installation
Disk Partitions & File System Management
Logical Volume Management - LVM
User & Group Administration
Package Management
Network File System - NFS
Domain Naming System - DNS
Apache HTTP Web Server
KickStart Installations
FTP server
BOOT PROCESS
Dynamic Host Configuration Protocol - DHCP
Job Scheduling
File Links
Swap Management
Log Management
Performance Management
Linux Troubleshooting
Linux Summary
116 Followers
In Linux, When user execute a command on the Shell the command related instance will be created in the real memory to process the command for execution. Instance created for the command is called as Process.
In Linux, Every instruction or task is carried out as process. Processes will be created and schedule for CPU turn for execution. Once the process is executed and the output is generated then that process will be exits or terminated.
A Process may have different states from the time it is created and then terminates due to various conditions and behavior of the execution life cycle.
Process States:
Every process will go through the life cycle as described below, Process state determines what is the status of the process initiated by the user. Once the process is completed its execution it will be terminated and remove from the process table.
Process States
Process Types:
There are fundamentally two types of processes in Linux:
How to run Process in Foreground
[kloudways@ ~]$./script # Running script in Foreground
[kloudway@ ~]$ls -l # Running command in Foreground
total 4
drwxr-xr-x 2 root root 6 Jun 26 14:59 dir1
-rwxr-xr-x 1 root root 11 Jun 26 14:59 script
[kloudway@ ~]$How to run Process in Background
[kloudway@ ~]$./script & #Running script in Background
[1] 32722 #Shows Process ID
[kloudway@ ~]$ls -l & #Running command in Background
[2] 32737
[1] Done ./script #Process Completed
[kloudway@ ~]$total 4
drwxr-xr-x 2 root root 6 Jun 26 15:00 dir1
-rwxr-xr-x 1 root root 11 Jun 26 14:59 script
[2]+ Done ls --color=auto -l
[kloudway@ ~]$