Subject: Re: Restricted contexts

From: Tony Skjellum <[email-masked]>
Date: Tue, 2 Feb 93 12:51:25 CST

Jim,

I do not think it is better to keep it a 8 or 10 bits, rather than 32,
for the following reasons

1) alignment
2) comparison cost (8 v. 32) on modern architectures

Yes, we are going to use more than 256.  Libraries that use processes
in multiple configurations, and with multiple sub-groupings generate a
number of contexts.  I will send you the Zipcode 1.0 tech. doc. later
(when finished) and you can see for yourself that many contexts can
reasonably be used.

For each different library in a system, one could imagine using about
twenty of these message contexts.  It could be up to the implementor to
use more/less, depending on how services are being provided, and how
service priorities are set.  

Tags are an unstructured field.  32 bits for the tag may be too much,
but when it is all the programmer has to control selectivity, 32 is a good
quantity to choose.  Context suggests structuring part of the selectivity.
In this case, 32 bits may be more than enough.

Real software will use contexts.  People who don't use them are the people
who will be writing their own codes, using no one else's libraries or codes,
and basically not doing the same type of top-down design we expect from
good software development.  I would argue that people who want to save
these incremental test costs will also be unwilling to do anything but
drive the hardware from the most primitive system calls.  

- Tony

---

From: [email-masked] (James Cownie)
Date: Wed, 3 Feb 93 10:34:38 GMT

Tony,

> 2) comparison cost (8 v. 32) on modern architectures

Alignment may or may not be an issue. I have no objection to you
sending the context as an aligned quadword in the message header if
that is faster on your hardware. I'm only interested in the
restricting range of valid values.

My point is that if I have only a few (8 or 10 bits) then I can use a
qualitatively different implementation [an array] than if I have to
deal with random 32 bit values.

Of course the cost of comparison is the same, but if I only have a few
contexts I can remove the comparisons from the loop entirely.

> service priorities are set.  

I agree with this, BUT this doesn't mean you need that many contexts
all at once. The analogy with unix file descriptors is very close.
Each library might use 20 open files, but you can still get by with a
limit of 64 or 128 on the number of files open at one time. Similarly
with contexts.

-- Jim
James Cownie 
Meiko Limited			Meiko Inc.
650 Aztec West			Reservoir Place
Bristol BS12 4SD		1601 Trapelo Road
England				Waltham
				MA 02154

Phone : +44 454 616171		+1 617 890 7676
FAX   : +44 454 618188		+1 617 890 5042
E-Mail: [email-masked]   or    [email-masked]