M. Koehrer wrote:
> Hi Jan,
>  
> primarily I want to execute my simulation models as fast as possible. This 
> is, I want 
> to optimize the average execution time. As there are a series of critical 
> sections to
> be passed this should also have an impact on the worst execution time.
> 
> 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).
> However, once the higher prio thread has entered one critical region it is 
> sure (at least if
> both threads run on the same CPU core) that it will be able to enter the next 
> critical region without
> waiting.
> That means, that improving the average runtime should also help to improve 
> the worst case
> runtime of the highest prio thread.

Not saying that the futex idea itself is not worth pursuing, but I would
first of all think about if there aren't other, far simpler
optimisations available at application level: lock-less algorithms e.g.
that flip some current-buffer pointers instead of locking the access to
a single shared buffer. Or a locking scheme that reduces the number of
locks the highest prio thread has to take in a row. Specifically when
you say that taking lock A implies to succeed in taking B as well, I
wonder if there is a need for A!=B.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to