1. process
An instance of a running program is called a process. Every time you run a shell command, a program is run and a process is created for it.
In any modern operating system there can be more than one instance of a program loaded in memory at the same time.
2. Linux process management
Operating systems need some ways to create processes.
-
In a very simple system designed for running only a single application (e.g., the controller in a microwave oven), it may be possible to have all the processes that will ever be needed be present when the system comes up.
-
In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation.
There are four principal events that cause a process to be created:
|
Process creation in UNIX and Linux are done through fork() or clone() system calls.
There are several steps involved in process creation.
-
process scheduling,
-
interrupt handling,
-
signaling,
-
process prioritization,
-
process switching,
-
process state,
-
process memory
2.1. Life cycle of a process
1→ creation 2→ execution 3→ termination 4→ removal |