Chapter 1. Understanding the Linux operating system 3
Draft Document for Review May 4, 2007 11:35 am 4285ch01.fm
1.1 Linux process management
Process management is one of the most important roles of any operating system. Effective
process management enables an application to operate steadily and effectively.
Linux process management implementation is similar to UNIX® implementation. It includes
process scheduling, interrupt handling, signaling, process prioritization, process switching,
process state, process memory and so on.
In this section, we discuss the fundamentals of the Linux process management
implementation. It helps to understand how the Linux kernel deals with processes that will
have an effect on system performance.

1.1.1 What is a process?

A process is an instance of execution that runs on a processor. The process uses any
resources Linux kernel can handle to complete its task.
All processes running on Linux operating system are managed by the task_struct structure,
which is also called process descriptor. A process descriptor contains all the information
necessary for a single process to run such as process identification, attributes of the process,
resources which construct the process. If you know the structure of the process, you can
understand what is important for process execution and performance. Figure1-2 shows the
outline of structures related to process information.
Figure 1-2 task_struct structure
userUser management
:
group_infoGroup management
:
:
signalSignal information
sighandSignal handler
:
fliesFile descripter
fsWorking directory
Root directory
:
pidProcess ID
:
mmProcess address space
:
run_list, arrayFor process scheduling
:
thread_infoProcess information and
kernel stack
stateProcess state
userUser management
:
group_infoGroup management
:
:
signalSignal information
sighandSignal handler
:
fliesFile descripter
fsWorking directory
Root directory
:
pidProcess ID
:
mmProcess address space
:
run_list, arrayFor process scheduling
:
thread_infoProcess information and
kernel stack
stateProcess state
exec_domain
Kernel stack
status
flags
task
exec_domain
Kernel stack
status
flags
task
task_struct structure thread_info structure
runqueue
mm_struct
group_info
user_struct
fs_struct
files_struct
signal_struct
sighand_struct
the other structures