Have your brain ready, thanks.


Wednesday, October 19, 2005

Queuing Systems

posted on the 19th day of October, 2005

Some of my friends can be categorised by using terminology in queuing systems.

JHKChan has a first-in-first-out queue. Interrupt is available to the following persons only: 1) Sprite; 2) the woman of the fourth month of the year; 3) "SkyBlue" members. Once interrupted your message has to wait until the interrupt is processed. In the case that his brain utilisation is intense, all messages are discarded immediately upon arrival.

John Chan's queue is a queue with expedited service. Before a message makes its way to the queue, it has to pass through a filter. There are three types of message that are allowed to the queue: 1) iSN business; 2) (there is no number two); 3) more businesses. Service is only available on a hot (or cold) day. The service is expedited because only one and quick reply is given: 赲.

The queue that holds messages to Brian operates on a round-robin basis. Each message enjoys a small faction of processing time before it is moved to the end of queue again, no matter if the message is completely processed or not.

The queue that Nash has is not of our concern here. The messages are treated in the same way as that by others anyway. The problem is if one sends a repeated message, he explodes with anger and one has to cancel it (not voluntarily). After the message is processed, it is moved to a storage of infinite capacity so that he can detect duplication of a message.

To send a message to Justin, one has to send three. The first one is always discarded as he has his headphone plugged deep into his ears. A please-remove-your-damned-headphone message must be sent before one can resend the original message. His queue is a priority one, indeed, but all messages are assigned the same priority because, to him, everyone is equally unimportant. Thanks to his obsession of making algorithm to run faster, he almost made the speed of his responses in O(1) time.

Sprite has a priority queue. A message's priority is based on the importance of the person who sent it. Importance are ranked in the following order: 1) JHKChan; 2) the woman of the fourth month of the year; 3) all the people he likes. He is not interruptable, however, and a low priority message may end up in starvation. When the queue is empty, he initiates messages session with janitors, security guards, and staff of all sorts.

#  #  #

If you think any of the above is unfair, please send your objections to /dev/null.

0 comments: