Hi Herman and Jan,

thanks for your replies.
I agree that is the best to do an approach that avoids critical sections.
However, we have here the typical "historical heritage". Parts of this code have
been ported from another system (where they worked with cli/sti).
Other parts are generated from a third party code generator.
This code generator (which is not in my hand) is designed primarily
for offline simulation within a single task.
Thus, the guys that programmed that, did not care about multi thread 
programming.
The programs write the results into output variables.
To avoid critical section I have now to do either
an additional copy (also quite expensive) of the output data to a location 
where I can work without any risk of being interrupted or I lock the access
 to the data.
That means either I do lots of additional copy actions (also quite expensive) 
or I work
with the critical region.

Thus for me it is not an either - or - option.
I can not optimize the code to be 100% free of critical sections (however it 
can be done in
some parts..). That means I still have to count on the IPC provided by the OS.

Regards

Mathias

> > The critical region in the simulation are at locations when a lower prio
> > thread and a higher prio thread access the same data. This happens at a
> > couple of times within a simulation step (within that critical region
> > there are typically some copy operations).
> 
> I agree with Jan Kiszka (in another reply in this thread) that it's
> probably better to improve the design of your application than to shift the
> problem to asking for "yet another feature" of the RTOS!
> 
> In our robot control framework (orocos.org) that works as a user space
> application on top of Xenomai we have implemented lock-free data exchange,
> which does'nt require involvement of the scheduler at all, and which
> improves the timing performance of the highest priority thread. It might be
> useful for you to discuss this implementation aspect on the orocos
> developers mailinglist...
> 
> Herman Bruyninckx
> 


-- 
Mathias Koehrer
[EMAIL PROTECTED]


Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur  39,85 €  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to