🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix
Article #141

a question of priority

#141
From: Pete "The Invisible Man" Gregory
Date: Fri, 13 Jul 1990 20:49
56 lines
3114 bytes
Hi -

I have been struggling with a set of transaction processing programs that
need to run at different priorities, as follows (simple explanation below):

      

          ----------
          |        |
          |   A    |-------
          |        |      |
          ----------      |
                          |
                          | 
                          |
          ----------      |           ----------         ----------
          |        |      ----------> |        |         |        |
          |   A    |----------------> |    B   | ------> |    C   |
          |        |      ----------> |        |         |        |
          ----------      |           ----------         ----------
                          |                                   |
                          |                                   |
                          |                                   |
          ----------      |                                   V
          |        |      |                              ----------
          |   A    |-------                              |        |
          |        |                                     |database|
          ----------                                     ----------

Explanation: multiple copies of process "A" send transactions to process "B",
which in turn sends transactions to process "C", which updates relational
database (Unify).  All messages sent via "messages".  Process "A" runs at
"nice" (called in its "C" code) value 15, "B" at nice 10, and "C" at nice 0.

THE PROBLEM IS, even with "C" being at lowest nice (highest priority), 
processes "A" are still given runtime by the scheduler so that process
"C" falls behind (messages stack up in its queue).

In this system, processes "A" could receive transactions far faster than
"B" or "C" could process them, so we thought that by giving "C" the highest
priority, this would guarantee that "C" would always be "caught up", and
"C" would in essence 'throttle' the "A" processes.  This apparently is
not the case.

'ps' shows that all processes are actually at the 'nice' value specified.

Why is this?  Is there some way to guarantee that process "C" will be able
to run all he wants to, before "A" and "B" have a chance to run?

Any hints/ideas/answers will be GREATLY appreciated.

Pete Gregory   : uucp:   uunet!bally!pete            | 
Software Engr. : domain: pete@bally.bally.com     ---|---
Bally Systems  : phone:  702-323-6156 x882           |         John 3:16
255 Bell St.   : FAX:    702-323-5997                |     (think about it!)
Reno, NV 89503                                       |
Technical Details
Message-ID: <3674@zorba.Tynan.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!zorba!dtynan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!zorba!dtynan
From: pete@bally.Bally.COM (Pete "The Invisible Man" Gregory)
Newsgroups: comp.unix
Subject: a question of priority
Message-ID: <3674@zorba.Tynan.COM>
Date: 13 Jul 90 20:49:35 GMT
Sender: dtynan@zorba.Tynan.COM
Organization: Bally Systems, Reno, NV
Lines: 56
Approved: dtynan@zorba.Tynan.COM