On Thu, Sep 07, 2000 at 02:28:36PM +0100, David Howells wrote:
> > I looked a bit over the code. Your Mutex classes do not look very SMP safe,
> > have they been tested with SMP ?
> 
> Look carefully... It uses the atomic bit set/clear functions to modify the
> state, and the wait-queue carries its own lock.

I did not see the lock. Where is it ?

> 
> And yes, they have been SMP tested... I have a dual Pentium-II box at home. I
> ran my five-thread test programs on it and they ran extremely fast without
> crashing (faster than Win2000 on the same box with the same test).
> 
> > Also I guess it would be better to implement Mutexes in user space as far as
> > possible and only use kernel help for inter process mutexes.
> 
> What's the difference? And how do you tell that a mutex is going to be used
> only between threads and not between processes? Anonymous mutexes don't
> actually help - think of DuplicateHandle!

I don't know too much about Win32, but I assume you could always share it 
lazily on demand (assuming the most mutexes are only used by threads, not
between processes) 
> 
> Plus it only greatly complicates your WaitFor* functions.
> 
> > For the object name management I did not found any limits that would prevent
> > an user from allocating all memory. Are there any?
> 
> getname() implies MAXPATHLEN (the VFS name to kernel-space function).

But the number of objects is not restricted, no ?


-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to