Re: who schedules the schedular

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 5/13/06, pradeep singh <2500.pradeep@xxxxxxxxx> wrote:
On 5/13/06, Ohad Ben-Cohen <ohadbc@xxxxxxxxx> wrote:
>
> the scheduler is an asynchronous kernel code.
> it is *not* a process. it is not always running.
> it is invoked (specifically, scheduler_tick() is) HZ times in a second
Can you give me a link of the source which shows on how it is invoked
so many time per sec?
sure.
this is very much architecture specific, so i'll show this in, for instance,
the PowerPC architecture:
start_kernel is called once at boot time. it calls time_init, which calibrates
the needed delay according to the HZ and sets up the hardware decrementer
clock (32-bit down counter that activates an interrupt at its terminal count).
unlike x86, in PPC there is no installation of the timer interrupt,
the handler call is hard coded at head.S.

func                                src
===                                ===
HZ definition           http://lxr.linux.no/source/include/asm-ppc/param.h?a=ppc
start_kernel            http://lxr.linux.no/source/init/main.c?a=ppc#L416
time_init
http://lxr.linux.no/source/arch/ppc/kernel/time.c?a=ppc#L286
registration
http://lxr.linux.no/source/arch/ppc/kernel/head.S?a=ppc#L473
timer_interrupt
http://lxr.linux.no/source/arch/ppc/kernel/time.c#L129
update_process_times      http://lxr.linux.no/source/kernel/timer.c#L813

HTH,
Ohad.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux