[Barrelfish-users] Timed wait on condition variable
Chothia Zaheer
zchothia at student.ethz.ch
Wed Dec 19 13:53:18 CET 2012
Hello,
Crescando has a synchronized queue with the typical get/put operations, which wait on a condition variable if the queue is either empty or full.
These operations can optionally be passed a timeout. Barrelfish's concurrency primitives don't currently support timeouts, so I am writing to enquire how this may be ported.
Conceptually it isn't too difficult to implement thread_cond_timedwait: extend the wait queues with a timeout and use an alarm to unblock the thread. In practice though it seems this would involve quite some effort (single-shot timer mechanism, spinlocks with bounded wait). Any thoughts or ideas on a simpler approach?
Thanks and kind regards,
--Zaheer
More information about the Barrelfish-users
mailing list