Amruta,

While I can't say anything about the problem in question, I'd like to
say that I also am starting porting a multithreaded application to
Linux, so a discussion might be useful.

Do you use MMU-based Linux or the noMMU Architecture ?

Which kind of "posix semaphores" do you use ?

I found that with my architecture (NIOS2) the FUTEX fastpath is not
decently provided. As I saw in the Kernel sources, same seems to be true
for Microblaze.

Do you use a glibc that provides the FUTEX fastpath ?

I found that, if no FUTEX fastpath is provided for an ARCH, the
pthread_mutex... code automatically falls back to using inter-process
semaphores (instead of fastpath userland inter-thread semaphores), which
(on such a CPU) produces a 100 times more overhead in the (very likely)
case that a semaphore is not already taken by another thread.

So I suppose I'll do the Futex for the NIOS some day soon which very
likely includes doing as well software as some HDL code.

I did a testing program that times several implementations of semaphores
and thus very heavily uses them. I never got any "shell exits".

>From the standard libraries, I uses pthread_mutex... and System V "sema"
in my testing program.

-Michael
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to