In Linux at Kernel level we have threads/tasks (belonging to Kernel and user), e.g.,
swapper: is a kernel thread (process 0), the ancestor of all processes, created from scratch during the initialization phase of Linux by the start_kernel() function. Also
init: an additional kernel thread, process 1 (init process)
HelloWorld: A thread for user program
My question is about the Kernel scheduler, that performs the following jobs:
-Schedule tasks within a fixed amount of time (i.e. context-switching)
-Calculate the timeslices dynamically (short/long vs priority based)
-Assigns process priorities dynamically (when needed)
-Monitoring the processes to its jobs (does this include any further?)
More specifically my questions becomes: Which thread/task(s) at Kernel level correspond to the scheduler? Should it be 'scheduler' etc or Does any other task from kernel do its job?
P.S.:
"swapper" in kernel is an idle thread/task with lowest priority (halt) [1]. Does this do anything other than "step-down"?
Does Linux create a dedicated instance of scheduler for each core in multi-core system? If no, then how it does on multicore?