[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What would it take....

From: Samuel Thibault
Subject: Re: What would it take....
Date: Tue, 22 Dec 2009 15:34:43 +0100
User-agent: Mutt/1.5.12-2006-07-14

Da Zheng, le Tue 22 Dec 2009 22:24:33 +0800, a écrit :
> Samuel Thibault wrote:
> >> 5. What would it take to implement task #7050? (process-shared
> >> semaphores and mutexes)
> > 
> > Good understanding of both the Posix norm and Hurd's RPCs, and careful
> > implementation.
> Do Hurd's RPCs have to be used in order to provide process-shared semaphores?

They need to somehow synchronize.  Only shared memory is not enough to
do that efficiently, you need some inter-process wait/signal mecanism.

> I thought we could use shared memory between network drivers and pfinet in 
> order to improve their performance.

Yes, Xen actually works that way, but it still needs wait/signal mecanisms.

> If Hurd's RPCs have to be used when we synchronize relevant operations, we 
> might not get any benefit by using shared memory.

You do not need RPCs all the time, just when starting/finishing
processing items. While processing others can arrive and will get
processed without the need for another RPC, but when work is done,
everybody needs to somehow wait for next signal. You should probably
read about Xen's ring mecanism.

> When process-shared semaphores and mutexes themselves are in the shared 
> memory, can we not use the similar implementation as the ones in the same 
> process?

The implementation uses Mach messages, so it's basically the same thing.
With different tasks, you need to add the task name along the port name.
And you need that to be done securely, including for a semaphore between
a root process and a user process. In a process of a single user, much
less issues happen.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]