Boost logo

Boost :

Subject: Re: [boost] Boost.Fiber mini-review September 4-13
From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2015-09-06 16:23:52


On Sun, Sep 6, 2015 at 9:12 PM, Peter Dimov <lists_at_[hidden]> wrote:
> Giovanni Piero Deretta wrote:
>
>> Waiters are waken up in FIFO order (at least under realtime FIFO
>> scheduling), but if the signaling is done outside the critical section, a late thread might acquire the critical
>> section (and consume a resource) after the condition as become true, but before older waiters had a
>> chance to acquire it. This might be particularly important with realtime systems.
>
> That's typically what one wants for performance though (absent special FIFO
> requirements), as that late thread is running (has a CPU) and has its cache
> hot.
>

Yes of course, on a normal application, for performance normally you
want that, but on a realtime system the constraints are different.
For example the late thread might have lower priority than the
currently blocked threads.

-- gpd


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk