I found FreeRTOS to be a good real OS that can help me learn those implementation detail.
It also help that FreeRTOS is documented as part of "The Architecture of Open Source Applications" Book II.
"...The heartbeat of a FreeRTOS system is called the system tick. FreeRTOS configures the system to generate a periodic tick interrupt. The user can configure the tick interrupt frequency, which is typically in the millisecond range. Every time the tick interrupt fires, the vTaskSwitchContext() function is called. vTaskSwitchContext() selects the highest-priority ready task and puts it in the pxCurrentTCB variable like this..."