Re: Simple question about pingpong roottask
Espen Skoglund <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.l4ka.general |
|---|---|
| Message-ID | <[email protected]> |
[Luke A Guest] > On Wed, 2006-06-28 at 18:57 +0200, Espen Skoglund wrote: >> [Disclaimer: Your example doesn't seem to be a complete pingpong, so >> what I say here depends on the rest of the stuff you do.] >> >> The pager of the initial root task thread is sigma0. When sigma0 >> receives a pagefault it "translates" this into a regular sigma0 >> memory request. Sigma0 will only hand out the same memory twice if >> it is the exact same thread that requested it the first time. >> Touching all the memory in the root task as such ensures that all >> the memory in the root task is requested by the initial thread. >> This ensures that you don't get conflicts in sigma0 about who owns >> which memory. > But as far as I could see in the source to sigma0, it flags any > memory occupied by any boot module (s0, s1, kernel, root task) as > being of L4_BootLoaderSpecificMemoryType so that s0 doesn't allocate > the memory to anyone else. Hence the question on my site "Does the > root task need to cause page faults on it's image in memory?" Sigma0 also detects which parts of physical memory sigma0, sigma1, and the root task requires and allocates this memory specifically to the respective thread. As such, even *if* another thread in the root task requested memory (explicitly or via a pagefault) that had not been already requested by the initial thread, sigma0 would still deny the request. This initial detect-and-allocate by sigma0 is not strictly necessary. It is useful as a safeguard, though. But no, the root task does not need to cause page faults to request its memory. It can do so explicitly. Of course, in order to start running and explicitly request memory, the initial root task thread will raise some pagefaults that must be handled by sigma0. eSk