[okl4-developer] thread spaceid

Carl van Schaik carl at ok-labs.com
Tue Jul 10 12:45:56 EST 2007


Jorge Torres wrote:
> HI Carl,
>
> YOur experiment sounds like a very good idea, there is one thing I 
> don't understand entierly, it is about faking the space-id, under 
> which situation could this happen?
Sorry, that was referring to some other designs in which the space-id is 
passed in certain message types. This idea was dropped a long time ago, 
and I don't think it was discussed on the list. Anyway, having a system 
call to get the space-id is should also work, but is much slower in the 
cases where you want to use the space-id, eg in iguana.

regards,
Carl
>
> Thanks,
>
> Jorge
>
>
> On 7/9/07, *Carl van Schaik* <carl at ok-labs.com 
> <mailto:carl at ok-labs.com>> wrote:
>
>     Hi Jorge / Harry,
>
>     We have encountered this problem as well recently, although for very
>     different reasons. I'm experimenting with adding a "Sender's Space"
>     field in the UTCB, which is updated on every IPC to reflect the
>     space-id
>     of the sender. This would means that the roottask for example need not
>     lookup the space-id of the thread, and the kernel guarantees that the
>     value cannot be faked.
>
>     regards,
>     Carl
>
>     Jorge Torres wrote:
>     > Yeap,
>     >
>     > A syscall such as pagerof would be great in some situations,
>     >
>     > Thanks,
>     >
>     > JOrge
>     >
>     > On 7/9/07, *Harry Vennik* < htvennik at zonnet.nl
>     <mailto:htvennik at zonnet.nl>
>     > <mailto:htvennik at zonnet.nl <mailto:htvennik at zonnet.nl>>> wrote:
>     >
>     >     I have run into the same thing recently. Not often a thread
>     needs to
>     >     know its own space-id, but when implementing some memory
>     management
>     >     server it would be very nice to be able to map the thread-id
>     where
>     >     the IPC request is coming from to a space-id to apply the memory
>     >     mapping to. I think the microkernel simply has to keep track
>     of the
>     >     thread to space relations, so why require a memory manager
>     server to
>     >     do the same thing? I think it would be better to keep that
>     info in
>     >     the micro kernel only, and provide a way for the memory
>     manager to
>     >     request that information through a (privileged) syscall.
>     >
>     >     Regards,
>     >
>     >     Harry
>     >
>     >     Op 9-jul-2007, om 9:04 heeft Carl van Schaik het volgende
>     geschreven:
>     >
>     >     > Are you asking about finding a thread's space-id? Currently it
>     >     is not
>     >     > possible, the OS environment should tell the thread, eg on its
>     >     > stack. In
>     >     > general, threads don't need to know their space-id and can't
>     >     call make
>     >     > any L4 calls that require it.
>     >     >
>     >     > regards,
>     >     > Carl
>     >     >
>     >     > Jorge Torres wrote:
>     >     >> HI,
>     >     >>
>     >     >>
>     >     >> Does somebody know how can one find a thread spaceid?
>     >     >>
>     >     >> Thanks,
>     >     >>
>     >     >> Jorge
>     >     >>
>     >    
>     ---------------------------------------------------------------------
>     >     >> ---
>     >     >>
>     >     >> _______________________________________________
>     >     >> Developer mailing list
>     >     >> Developer at okl4.org <mailto:Developer at okl4.org>
>     <mailto:Developer at okl4.org <mailto:Developer at okl4.org>>
>     >     >> https://lists.okl4.org/mailman/listinfo/developer
>     >     >>
>     >     >
>     >     >
>     >     > _______________________________________________
>     >     > Developer mailing list
>     >     > Developer at okl4.org <mailto:Developer at okl4.org> <mailto:
>     Developer at okl4.org <mailto:Developer at okl4.org>>
>     >     > https://lists.okl4.org/mailman/listinfo/developer
>     >
>     >
>
>




More information about the Developer mailing list