Hi,
I want to do something really precise with 2 processors: the first should sort
en event-list while the second should execute the events. Let's say that it take 6
microsec to sort one event, and about 4 microsec to execute one event. Let's say that
the two actions can run concurrently (not true in the general case).
As I know that a context switching between 2 threads can take more than 20
microsec, I will obviously lose a lot of CPU time if any context switching occurs when
my program blocks to wait for the concurrent computation completion. I cannot allow
context-switching caused by the synchronization.
My first idea is to execute a pthread_trylock and retry it until I get the
mutex, or to simply use a common variable.
I don't have this much experience with SMP systems, does anyone have an idea
about the safe synchronization of such programs??
Thank you for your attention
ben
________________________________________________________________________
Benjamin Forgeau Raum 3032, Denickestr 17, 21073 Hamburg
Technische Universitaet Tel. +4940 42878 3485 Fax 42878 2941
Hamburg-Harburg mailto:[EMAIL PROTECTED]
Elektrotechnik VI http://www.tu-harburg.de/et6
Digitale Kommunikationssysteme
FSP 4-06, 21071 Hamburg, Germany
________________________________________________________________________
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]