A process is a fundamental part of any operating system - irrespective of whether they are proprietary or Free. And all Operating systems usually have a lot of processes running at any given time. This begs the question, what exactly is a process ?
A process can be considered to be a container, bundling a running application, its environment variables, the state of the application's input and output, and the state of the process, including its priority and accumulated resource usage. In short, every single application that you run on your machine will have its own unique process allocated to it for the duration of the time it runs.
In Unix based OSes, each of that unique process has a parent process from which it is forked (cloned, spawned) initially. The very first process that is created by the OS when you turn on the machine is init process. This process will always have a process id of 1. All processes are ultimately descended from the one process called init. Try running the ps command to find the process id of init.
$ ps axj
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
0 1 0 0 ? -1 S 0 0:04 init [4]
Martin Streicher has written an enlightening article throwing more light on the concept of a Unix process. He explains the semantics of a process, some very useful commands which give information about the running processes as well as talks about forks and daemons (a special kind of process which continuously runs in the background waiting for some application to connect to it).
No comments:
Post a Comment