A UNIX process is created by the operating system. It typically contains the following:
- A process ID, process group ID, user ID, or group ID
- An environment and working directory
- Program instructions
- Registers, a stack, and a heap
- File descriptors
- Signal actions
- Shared libraries
- Inter-process communication tools (pipes, message queues, semaphores, or shared memory)
If you are curious about processes, open up a shell and type $ top. This command displays and updates sorted information about the processes that are running in your system. When I run it on my machine, the first line tells me the following:
$ top
Processes: 477 total, 4 running, 473 sleeping, 2234 threads
...
This gives you an idea about how much work our computers are doing without us being really aware of it.