Processes and threads in the linux 2.6 kernel

Páginas: 11 (2607 palabras) Publicado: 4 de marzo de 2011
Processes and Threads in the Linux 2.6 kernel

Table of Contents

Introduction: Threads and processes 3

What is new in the 2.6. 4

What is O(1)? 5

Schedulers and its processes 5

The Scheduler in Linux 2.6 6

Run Queues and Load Balancing 7

Timeslices and Niceness 8

Conclusion 10

Notes of the Autor10

Bibliography and References 11

Introduction: Threads and processes

Linux uses the same data structure (task_struct) to represent a process and to represent a thread. This represents an important advantage for planning: each thread is scheduled like a process. Sometimes this is called a lightweight process (LWP-Light Weight Process). The strange thing is that thisstructure has some fields that are pointers to the address space of a process.
What is the difference between a child process and a thread? By creating a child process that is done is to copy the parent's memory in another adress and make these pointers point to the new, to create a thread that is done is to copy the pointers, so that the strands of the same share exactly the same process addressspace. Synchronization and mutual exclusion of concurrent threads access to the memory of the process is the responsibility of the programmer who uses them.

What is new in the 2.6.

The new scheduler executes a core thread on each CPU. This thread is responsible for planning processes run queue of the CPU on which it runs. This thread is called by timer, system call or when it have finished therun queue for load balancing with other CPUs. In addition, it keeps track of the behavior of the process, is dedicated to input / output or is CPU load and can dynamically change the scheduling policy and priority of the process.

Some of the new things that have the new kernel 2.6 version:
O(1): Few loops that recalculate data routines wakeup(), schedule()and the interruption time wereremoved. Now it be make with algorithms that take a constant time, regardless of the circumstances surrounding the execution.
Symmetric multiprocessing scalability. Two processes at two different CPUs run completely independently. Previously used a single queue for all and a semaphore runqueue_lock for all processes of all CPUs.
Higher affinity for the processor. A process tends to run on the sameprocessor after a bloqued or suspension. No processor is changed for no reason. The time intervals are distributed in each CPU separately.
Batch planning. SCHED_BATCH has been added to the possible values of policy planning. Batch processes using the CPU when no other processes are ready: they have lower priority than any other process but their time quanta are much higher.
Ability tohandle heavy loads without collapsing planning.
For the planning in real time (RT), which used FIFO queue, the algorithm is also O (1).
Run the children before the parent process. Improves efficiency.

The list of changes in the new 2.6 version from the last versions is extended. There are a hard job in the new kernel. One of the most important and visible change is the "O" schedulerincorporation. The scheduler is the kernel part that asign time lapses to individual programs that be executed in the computer. That possibilite that only one CPU can execute multiple programs at the same time allowing that a program can be executed for a especific time, then change to other program, allow executing it for other time lapse, and so on. However, a good scheduler that good managing the CPU timecan provide to the user a highest speed answer sensation.

What is O(1)?

"O(1)" is an example of the notation "Big-Oh", used in cumputing science for descrisluggish the executing time of an algorithm. An Algorithm is a method "step by step" defined for do a particular computing matter. The notation "Big-O" not exactly measure the miliseconds that spend an algorithms for be executed. It...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Indoctrination and resistance in the colca valley
  • Chaos And Creations In The Backyard
  • Trade and Markets in the Early Empires
  • Teacher And Learner Language In The Classroom
  • American values, now and in the future.
  • Capitalism And Socialism In The Cold War
  • Advisability And Obligation In The Past
  • Beliefs and values, a raisin in the sun

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS