IBM REDP-4285-00 User Manual

Page of 170
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. Figure 1-2 shows the 
outline of structures related to process information.
Figure 1-2   task_struct structure
user
User management
:
group_info
Group management
:
:
signal
Signal information
sighand
Signal handler
:
flies
File descripter
fs
Working directory
Root directory
:
pid
Process ID
:
mm
Process address space
:
run_list, array
For process scheduling
:
thread_info
Process information and 
kernel stack
state
Process state
user
User management
:
group_info
Group management
:
:
signal
Signal information
sighand
Signal handler
:
flies
File descripter
fs
Working directory
Root directory
:
pid
Process ID
:
mm
Process address space
:
run_list, array
For process scheduling
:
thread_info
Process information and 
kernel stack
state
Process 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