> Whenever the queue is empty, the queue emptier WAITs.  But if the
> queue is storage constrained, it can fill up.  What does the
> queue filler do then?

There are at least two types of queues; static queues, where all of the
elements are pre-allocated/formatted by the queue owner and dynamic
queues where the queue elements are provided by the caller. 

The former case is notoriously inflexible and difficult to size
adequately to avoid full queues and service denial. The latter case adds
a little complexity in the termination and cleanup cases, but in most
other respects is more flexible and a better design choice.

In terms of performance it's a wash. They both typically use Compare and
Stop :-) to add/remove queue items so neither one is going to be blazing
fast, but then again there's no free lunch with serialization. 

My own choice is PLO which is certainly a slooooow instruction, but it
is flexible enough to use to manage singly linked and doubly linked
queues in both 31 and 64 bit forms. It's the only thing (other than a
lock/latch/enq) that will allow you to add or remove an entry from
anywhere in the queue atomically. CS and CDS can't do that.

CC

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to