A process is, essentially, an instance of a running program.
A process includes two components: program and state. The program
is simply an image of a program that is often stored in the hard disk.
The state, on the other hand, is often maintained by memory resources.
It is possible for most modern operating systems to start up and have
multiple concurrent processes. Once a process is created, it can be in
one of the following states:
- Running: this means the process is currently using processor
time, and code of the corresponding program is being
executed.
- Ready: this means the process is ready to run, but it has to
share processor resources with other processes, and is currently
suspended so that other processes have a chance to run.
- Stopped: this means the process has been stopped by some external
triggers. A stopped process can be resumed.
- Waiting/Sleeping: this means the process is waiting for something
(usually some kind of resources).
Note that when you ``run a program'', you are actually ``instantiating
a process from a program''. In other words, the system takes the
static program, loads it into memory, and lets the processor run it.
Copyright © 2006-07-12 by Tak Auyeung