Entry and exit of kernel schedule() function -


i know kernel scheduler run periodically. period determined timer. however, have been unable find irq timer interrupt , entire flow beginning end of scheduler code.

i understand schedule() function may potentially have several entry , exit points.. point me towards these?

from kernel source, i've gathered __schedule() main schedule function seems called schedule().. calls schedule()..and calls function calls schedule.. ..

there 2 schedulers, or rather 2 scheduling codes in linux kernel. there core scheduler, mentioned called schedule() calls __schedule(). schedule() called many points in kernel:

  1. explicit blocking, in case of semaphores, mutexes etc.
  2. a flag tif_need_resched checked on interrupts , on return userspace, if set schedule called.
  3. a process wakes up.

there scheduler code name scheduler_tick()[this resides in core.c], periodic scheduler , called timer code(timer.c) via interrupt frequency of hz, i.e. scheduler_tick() called hz times in 1 second. hz hardware dependent , value varies between 100-1024. scheduler_tick() calls task_tick() of scheduling class current task on processor belongs.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -