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.

https://en.wikipedia.org/wiki/Process_control_block

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.

http://www.informit.com/articles/article.aspx?p=368650
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.

https://elixir.free-electrons.com/linux/v4.15/source/include/linux/plist.h

Process management (oldie??) - http://cs-pub.bu.edu/fac/richwest/cs591_w1/notes/linux_process_mgt.PDF
Scheduling - https://en.wikipedia.org/wiki/Scheduling_(computing)
Preemption - https://en.wikipedia.org/wiki/Preemption_(computing)#Time_slice
The flow of time - http://cs-pub.bu.edu/fac/richwest/cs591_w1/notes/WK3.PDF#page=8
Linux time slice - https://stackoverflow.com/questions/16401294/how-to-know-linux-scheduler-time-slice
https://stackoverflow.com/a/31051375/8516247
Inside the Linux scheduler - https://www.ibm.com/developerworks/linux/library/l-scheduler/
What is the linux process table ? What does it consist of? - https://stackoverflow.com/questions/4880555/what-is-the-linux-process-table-what-does-it-consist-of
Introduction. The process table - http://sop.upv.es/gii-dso/en/t3-procesos-en-linux/gen-t3-procesos-en-linux.html
Index de UPV (procesos, scheduling, etc. - http://sop.upv.es/gii-dso/en/teoria.html
Process and Interrupt Management - http://www.tldp.org/LDP/lki/lki-2.html
Anatomy of Linux process management - https://www.ibm.com/developerworks/library/l-linux-process-management/index.html
A complete guide to process scheduling - https://tampub.uta.fi/bitstream/handle/10024/96864/GRADU-1428493916.pdf

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

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

https://blog.acolyer.org/2016/04/26/the-linux-scheduler-a-decade-of-wasted-cores/
https://www.ibm.com/developerworks/library/l-completely-fair-scheduler/
https://en.m.wikipedia.org/wiki/Red%E2%80%93black_tree