Re: Simple question about pingpong roottask

Espen Skoglund <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
[Gabriel Gonzalez]
> Hi,
>   I have modified the pingpong root task, which come along the
> Pistachio distribution, making it as simple as posible (file pasted
> at the end). I have just kept creating a thread and starting it but
> there is a point which I don't get at all.
>   Why should the memory be touch by the root task before starting
> the thread? I mean, why should any page fault been thrown when the
> new thread is started?

>   Thank you very much for your time.

[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.

	eSk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.