Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/08/00 12:53
Read: times


 
#3110 - Priority Queue
Scan some computer science books for:
"PRIORITY QUEUE"

If you have several sensor alarms of assignable priority and need to make sure important alarms are reported and cleared first... this is what you need but it can be difficult.

The construct in computer science is called a "priority queue." Its a very efficient structure and runs in binary tree ascension sort time. However, its quite complex to understand and implement.

There is hardly a project I've done, embedded or PC, that doesn't include a priority queue in one form or another. What it does is maintain a queue of events that have a priority attribute.

When you insert an event into the queue, it reorders the queue in binary tree ascension time.

When you extract from the queue, unlike a FIFO or LIFO, you always get the highest sorted priority event.

If you attempt to code this, you may wish you had waited for a simpler suggestion. :-)

-Jay C. Box


List of 2 messages in thread
TopicAuthorDate
Rearrange & Access data to LCD            01/01/70 00:00      
Priority Queue            01/01/70 00:00      

Back to Subject List