Linux Process
A Process is one of the most important fundamental concepts of the Linux operating system. This article focuses on the basics of Linux processes.
A Linux process is a program running in the Linux system. The process can be called service or daemon in Linux community
Processes carry out tasks within the operating system.
A program is a set of machine code instructions and data stored in an executable
image on disk and is, as
such, a passive entity;
a process can be thought of as a computer program in action.
Process Identifier (PID)
Each process has a unique identifier associated with it known as process ID. This ID remains unique across the system.In order to manage Linux process , we need to identify some process information , such as who is responsible for the process., which terminal the process is running from and what command used to run the process.
let's type the top command on the terminal
systemd process is the mother (parent) of all processes on the system, it’s the first program that is executed when the Linux system boots up; it manages all other processes on the system. It is started by the kernel itself, so in principle it does not have a parent process. The systemd process always has process ID of 1.
Systemd is now used by default in most Linux distributions,The systemctl command allows you to get information about systemd’s status and control running services.
Creation of a Processes in Linux
new process is normally created when an existing process makes an exact copy of itself in memory. The child process will have the same environment as its parent, but only the process ID number is different.
There are two conventional ways used for creating a new process in Linux:
- Using The System() Function – this method is relatively simple, however, it’s inefficient and has significantly certain security risks.
- Using fork() and exec() Function – this technique is a little advanced but offers greater flexibility, speed, together with security.
How Does Linux Identify Processes?
Because Linux is a multi-user system, meaning different users can be running various programs on the system, each running instance of a program must be identified uniquely by the kernel.
And a program is identified by its process ID (PID) as well as it’s parent processes ID (PPID), therefore processes can further be categorized into:
- Parent processes – these are processes that create other processes during run-time.
- Child processes – these processes are created by other processes during run-time.
Linux Process
Reviewed by ohhhvictor
on
August 31, 2018
Rating:
No comments: