Process scheduling

Still under construction

In Linux, the system timer (or clock) is programmed to generate a hardware interrupt 100 times a second (as defined by the HZ system parameter). The interrupt is accomplished by sending a signal to a special chip on the motherboard called an interrupt controller. The interrupt controller then sends an interrupt to the CPU. When the CPU receives this signal, it knows that the clock tick has occurred and it jumps to a special part of the kernel that handles the clock interrupt. Scheduling priorities are also recalculated within this same section of code.

In Linux the PCB is named Task structure and is defined in the scheduler code

The responsibility of the operating system is to manage resources and provide services to applications to access these resources.

The primary resource managed by the operating system is the CPU. Management of process access to the CPU is managed by the kernel scheduler using priority-based, time-slice allocation. [REVISAR] On a single-CPU machine, the appearance of parallelism is achieved by quickly switching between process contexts. There is CPU overhead associated with this operation. It is important for the operating system to minimize this overhead, particularly during high system load.
The kernel stores the list of processes in a circular doubly linked list called the task list. Each element in the task list is a process descriptor of the type struct task_struct, which is defined in “init_task.c”. The process descriptor contains all the information about a specific process.

Process management (oldie??) -
Scheduling -
Preemption -
The flow of time -
Linux time slice -
Inside the Linux scheduler -
What is the linux process table ? What does it consist of? -
Introduction. The process table -
Index de UPV (procesos, scheduling, etc. -
Process and Interrupt Management -
Anatomy of Linux process management -
A complete guide to process scheduling -

Current Linux kernels use e CFS (Completely Fair Scheduler) scheduler

CFS uses a Red-Black Tree data estrucuture to to maintain fainess among proceses