Re: L4_ThreadSwitch behaviour
Ben Leslie <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.l4ka.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu Feb 15, 2007 at 17:27:41 +0100, Christian, Martin, OPEE45 wrote: >My question is related to both L4Ka::Pistachio and >NICTA::Pistachio-embedded, thus I'm mailing to both lists. > >Consider the following test cases: > >Case A >====== >1. The root thread creates a new thread in a new address space (AS): > L4_ThreadControl( ping_tid, ping_tid, master_tid, L4_nilthread, > L4_anythread, L4_anythread, NOUTCB ) > L4_SpaceControl( ping_tid, 0, kip_area, utcb_area, &control ) > L4_ThreadControl( ping_tid, ping_tid, master_tid, pager_tid, > L4_anythread, L4_anythread, UTCB(0) ) > L4_Start( ping_tid, (L4_Word_t)ping_stack + sizeof(ping_stack) - 32, > START_ADDR(testing_thread) ) > >2. The root thread "refills" it's time slice (maybe that's bogus, but it >is meant to ensure a full time slice is donated): L4_Yield(); > >3. The root thread donates the rest of it's time slice to the new >thread: > L4_ThreadSwitch( ping_tid ); > >Case B >====== >1. The root thread creates a new thread in a new AS >2. The root thread waits for a startup IPC from the new thread (of >course, the new thread has to be altered to send such an IPC) >3. The root thread "refills" it's time slice >4. The root thread donates the rest of it's time slice to the new thread > >Problem: >Case A won't work, but Case B does. For Case A the new thread won't run, >even though it's active and in the ready queue. The only difference is >that in Case B the pages which hold the code are already mapped in the >new threads AS. > >I think this is a generic issue, however I'm working with a "homemade" >PowerPC Version of NICTA::Pistachio-embedded based on the Karlsruhe >version. > >Questions: >1.) Why does Case A fail (or at least don't do anything)? >2.) Is there are difference between the semantics used in >L4Ka::Pistachio and NICTA::Pistachio-embedded (or between X2 and N1)? > >Any opinions, experiences, fairy tales would be appreciated! :-) OK, some guesses: 1/ What are the relative priorities of the thread in both cases? 2/ What is the pager doing in case A? 3/ What is the exact state of ping thread in case A (e.g: break into kdb and dump thread state) Cheers, Benno