public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* need help: scheduling
@ 2005-04-18 13:00 Gunter
  2005-04-18 13:21 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Gunter @ 2005-04-18 13:00 UTC (permalink / raw)
  To: linux-kernel

Hello

I need help about scheduling. I hope i understand the basics for my
question: An active prozess counts the remaining cpu time in jifies. By
every timer interrupt the scheduler decrements the variable time_slice.

Where is the scheduler initializing the interrupt timer (init_timer).
And where gets the struct timer_list the next interrupt (expires). At
last i want know where the scheduler calls add_timer. Or is there an
other way?

Thank You
Gunter


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: need help: scheduling
  2005-04-18 13:00 need help: scheduling Gunter
@ 2005-04-18 13:21 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2005-04-18 13:21 UTC (permalink / raw)
  To: Gunter; +Cc: linux-kernel

On Mon, 2005-04-18 at 15:00 +0200, Gunter wrote:
> Hello
> 
> I need help about scheduling. I hope i understand the basics for my
> question: An active prozess counts the remaining cpu time in jifies. By
> every timer interrupt the scheduler decrements the variable time_slice.
> 

Yes, this is correct.

> Where is the scheduler initializing the interrupt timer (init_timer).
> And where gets the struct timer_list the next interrupt (expires). At
> last i want know where the scheduler calls add_timer. Or is there an
> other way?
> 

The timer_list you are mentioning is used for events that need to go off
at a certain jiffy. This is not what the scheduler uses.  The
schedule_tick (which keeps track of the time_slices of processes) goes
off at a timer interrupt once a jiffy. This is architecture dependent,
and for x86 you can take a look at arch/i386/kernel/time.c
timer_interrupt.  This is (usually) setup in
arch/i386/mach-default/setup.c. Search for timer_interrupt for the
details, and then follow the trail there.

-- Steve



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-18 13:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 13:00 need help: scheduling Gunter
2005-04-18 13:21 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox