2. A process is a program in execution .
Eg:- In C or C++ the compiler creates the
binary code when we actually run the
binary it becomes a process.
3. If a command issued , then it creates or
starts a new process.
Eg:- pwd ,issued it used to list the current
directory location the user starts the
proess
4. 5 Digit id ,It keeps account of process.
This id called process id or pid.
Each process have unique pid.
Used up process id again used.
For newer process
If all possible combinations are used.
5. No two process have same process id.
System keeps track of each process
6. A process can be in two ways
foreground process
Background process
7. Every process when started runs in
foreground by default, receives input from
the keyboard and sends output to the
screen.
When issuing pwd command
$ ls pwd
Output:
$ /home/prgmname/root
8. It takes lots of time.
No other process can start.
9. It runs in the background without keyboard
input .
Waits till keyboard input is required.
Other processes can be done in parallel
with the process running in background .
No need to wait for the previous process to
be completed.
10. ps (Process status) can be used to see/list
all the running processes.
Eg:- $ ps
PID TTY TIME
CMD
19 pts/1 00:00:00 sh
24 pts/1 00:00:00 ps
-f for full information about the process
11. UID: User ID
PID: Process ID
PPID: Parent process ID
C: CPU utilization of process
STIME: Process start time
TTY: Terminal type associated with the
process
TIME: CPU time taken by the process
CMD: The command that started this
process
12. When running in foreground, hitting Ctrl + c
(interrupt character) will exit the command.
For processes running in background kill
command can be used if it’s pid is known.
Eg:- $ kill 19 ;19 PID
Terminated
If a process ignores a regular kill
command, you can use kill -9 followed by
the process ID .