about Ready Task lists

nobody wrote on Saturday, July 02, 2005:

could anyone tell me why we use several pxReadyTasksLists which are created  for each priority instead of using a single pxReadyTasksList for all priroities.

rtel wrote on Saturday, July 02, 2005:

It is done for speed and determinism - at the cost of RAM.

Maintaining a single queue of tasks in priority order would use less RAM, but inserting a task into a sorted queue within the RTOS tick would require searching the queue to find the correct position which is slow and non deterministic. 

Maintaining a queue for each priority means the queues do not need to be sorted into priority order.  Adding and removing tasks to the front and back of queues is quick and deterministic. 

Bit of a rushed answer as Im short of time at the moment  but hopefully ok?

Regards.