An efficient implementation of Ada delay
Larry Gearhart · IEEE Conference on Aerospace and Electronics · 2002
A preemption-oriented implementation of Ada delay which guarantees a response to a high-priority task within a period of time proportional to the logarithm of the number of delayed tasks is developed. Two versions are proposed. Both versions avoid the usual execution overhead of balanced tree algorithms (such as AVL trees) or the linear time-complexity growth associated with linked lists. A static version is proposed which is optimized for execution efficiency and a dynamic version is optimized for flexibility. Both versions are an adaptation of the standard heap sort algorithm, with extensions designed to allow efficient delay cancellation.>