RE: How does pistachio deal with the priority inversion?

Bob <[email protected]> Thu, 16 Oct 2008 13:50:31 +0800
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
> The woken thread will> be dispatched no later than on the next timer interrupt (see above case 2).> It might be run earlier (case 1 above), but then it can run for a complete> timeslice (which is typically much longer than the timer period).
Yeah,that's what i want. Thanks a lot.
What's more,does time donation(you said which is typically much longer than the timer period) happened here?
if so ,could you explain it(time donation) a little more for me? 
> The L4 kernel is not preemptible (interrupts are disabled while inside> the kernel) except during string IPC and possibly during the recursive> unmap operation: Here we explicitly enable interrupts to reduce IRQ handler> latency.
> All other code paths through the kernel are rather short, so that making> the kernel preemptible would not pay.
I known that for IA32 when entering kernel space, it's must through the int gate(or call gate) whether interrupt or system call.
And the after through the gate ,all interrupts will be disabled(set IF flag).
But, I didn't find where these interrupts be enabled again?.  Enabled when the interrupted thread(or any thread?) return back to user level? 
 
Thank you for your time!
---Best regardsBo Liu> Date: Wed, 15 Oct 2008 13:32:04 +0200> From: [email protected]> To: [email protected]> CC: [email protected]> Subject: Re: How does pistachio deal with the priority inversion?> > > > IPC won't start at all as B will never run.> > So thread A will Blocked for a very long time untill B gets to run?> > Yes. However, you can use timeouts in A's IPC operation to avoid/recover> from such situations.> > > > L4 leaves this problem to the OS on top, it does not deal with> > > starvation/priority inversion at all. Scheduling on L4 is still not> > > solved satisfactorily.> > > > NOw, I am messed by L4's schedule mechanism. It' based on static priority and> > timeslice. When a very high priority thread being wakeup. It will be> > scheduled untill a time interrupt happen?> > How c
 an a high priority thread wake up?> 1. receive IPC> 2. timeout, detected at some timer interrupt> > In the first case, either a user thread or an interrupt thread explicitly> calls the high priority thread, immediately scheduling it for execution.> > In the second case, I assume, the scheduler is invoked after having detected> that a (high priority) thread has reached a timeout.> But even if I am wrong and we do not immediately schedule the timed-out thread,> it will be scheduled after the end of the current timeslice (given no thread> with a still higher priority becomes ready in the meantime).> > I am not sure about the 'until' in your question: The woken thread will> be dispatched no later than on the next timer interrupt (see above case 2).> It might be run earlier (case 1 above), bu
 t then it can run for a complete> timeslice (which is typically much longer than the timer period).> > > And does Pistachio support kernel preempt like the linux kernel 2.6?> > The L4 kernel is not preemptible (interrupts are disabled while inside> the kernel) except during string IPC and possibly during the recursive> unmap operation: Here we explicitly enable interrupts to reduce IRQ handler> latency.> All other code paths through the kernel are rather short, so that making> the kernel preemptible would not pay.> > Hope that helped,> Raphael> 
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx