a question of priority

Pete "The Invisible Man" Gregory pete at bally.Bally.COM
Sat Jul 14 06:49:35 AEST 1990


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 at 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                                       |



More information about the Comp.unix mailing list