*BSD News Article 72218


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.sdsmt.edu!news.mid.net!news.dra.com!news.starnet.net!spool.mu.edu!howland.reston.ans.net!swrinde!gatech!news.mathworks.com!uunet!inXS.uu.net!news.artisoft.com!usenet
From: Terry Lambert <terry@lambert.org>
Newsgroups: comp.unix.bsd.misc
Subject: Re: Queuing Question
Date: Thu, 27 Jun 1996 21:31:46 -0700
Organization: Me
Lines: 56
Message-ID: <31D36032.688CEF55@lambert.org>
References: <4qn5nu$svs@pulp.ucs.ualberta.ca> <31D09F31.6DB0F89A@lambert.org> <4qsacn$l7@anorak.coverform.lan>
NNTP-Posting-Host: hecate.artisoft.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.1.76 i486)

Brian Somers wrote:
] Terry Lambert (terry@lambert.org) wrote:
] : Nadine Leenders wrote:
] : ] I've set up a couple of queues under SunOS Release 4.1.  One
] : ] the of queues processes large jobs that take about 1.5 to
] : ] 3 hours to complete and the other small jobs that take
] : ] about 2 minutes to complete.
] :
] : How can you tell a job will be a small job?  Or rather, how
] : can the queue ordering software tell to provide the ordering
] : you want?
] 
] I think you're missing the point - it's much highter level.
] Nadine is saying that ipcs -q shows two queues owned by two
] different processes (say A & B).  I post to queue A with
] process X, and before the reply comes back, post to queue
] B with process Y.  The suggestion is that if the turnaround
] of process B is 2 seconds and the turnaround of process A
] is two hours, the B reply has to wait until the A reply has
] been sent.
] 
] This is clearly not the way independent queues work.

You think it's *Message* queues, not *Job* queues?

This was unclear, and the use of the phrase "queues processes
large jobs" made me think it was the RJE queueing software
which was just announced.


The clear answer to the message queueing problem is that the
write to the queue is near instantaneous and they aren't
bidirectional.

So it should not be an issue unless the queue fills up.

Since the queue records should be a known size, it should
be possible to prevent the queueing to a full queue.

Alternately, a record locked file should be used, with a
slot notification record.  If you had 256 or less clients,
this should allow you at least 4096 entries.

Alternately, you could use named pipes or real pipes passed
via UNIX domain socket for the IPC, and use select instead
of depending on a blocking, non-multiplexed call, to do
the IPC.


I still think it was a job queue, though.  8-).

                                        Terry Lambert
                                        terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.