EDF Scheduler and Priority Queues

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Mar 21 13:32:43 UTC 2014


Hello,

I changed the objects allocate/free to use the allocator mutex.  This change is 
very important since otherwise the thread dispatch latency depends on the heap 
fragmentation.  I noticed now a problem with the thread priority queues and the 
EDF scheduler.  The EDF scheduler uses priority values greater than 255.  Now 
we have a problem in _Thread_queue_Enqueue_priority():

Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
   Thread_queue_Control *the_thread_queue,
   Thread_Control       *the_thread,
   ISR_Level            *level_p
)
{
[...]
   _Chain_Initialize_empty( &the_thread->Wait.Block2n );

   priority     = the_thread->current_priority;
   header_index = _Thread_queue_Header_number( priority );
   header       = &the_thread_queue->Queues.Priority[ header_index ];

The header_index is now out of range.

Should the EDF scheduler work with thread priority queues?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list