On method numbers [djg10]

David Garfield david@davgar.arlington.va.us
Fri, 26 Mar 1993 21:28:36 EST


On Fri, 26 Mar 93 16:48:17 EST, "Michael David WINIKOFF"
<winikoff@mulga.cs.mu.OZ.AU> wrote:
> I'm mailing this to you rather then the mailing list 'cause all I want to say
> is that I agree with what you've said.

He says he agrees, but I'm not sure Michael even understood, so I will
try to explain further.

> > OIDs have already been described as unique system-wide.  I am arguing
> > that method numbers should also be SYSTEM-WIDE.  This gives us:
> > OBJECTNUMBER, METHODNUMBER.
>
> Agree.
> >
> > This gives us two categories of method numbers.
> >
> > The first is a set of predefined numbers.  These numbers are defined
> > by the gods of moose (us), once set will never (after first public
> > release) be changed, and will be usable by all objects.  Amongst these
> > predefined numbers will be things like
> >         Inquire_Subobjects(?),
> >         write(void *buffer, int length)
> >         read(void *buffer, int length)
> >         DisplayOn(?)
> > Simply, anything very common or basic could wind up here.  In fact,
>
> Yup. Part of our job in providing a good system is defining a lot of
> services and implementing as many of 'em as possible.

A lot of COMMON services.

> NOTE: I think though that we should reserve a range of IDs for future expansion
>
> Another thing that could be done is having a central co-ordinator (ie a person)
> that assigns numbers.
>
> Eg. I'm a programmer out there. I've written an application that introduces
> some new calls which I think should be added to the list.
> I send off mail and get assigned numbers for my use.

NO APPLICATION GETS PREDEFINED NUMBERS.  For an application to use new
numbers, it uses the second category of numbers.  The first category
is very small (I hope <300 at initial release, <1000 ever!), and, as I
said below, is at least partly for efficiency.

In fact, if we implement what I'm proposing correctly, someone wanting
to change things could define a new list of assigned numbers, or even
empty it, and only require relinking of anything he plans to run!  We
don't need (shouldn't need) a central co-ordinator.

As for needing a reserved range, that too is unneeded, because the
second category dynamic allocation doesn't happen until after boot
time.

I would say number 0 is reserved as invalid,
numbers 1 to N are the predefined ones,
numbers N+1 to MAXINT are for dynamic allocation.

> > The second category of method numbers is numbers allocated while the
> > system is running.  My thought is that, when a program is loaded, the
> > list of methods in the header is passed to a kernel routine that
> > manages name to number translation.  Any name that isn't found is
> > added as a new number.  The numbers thus obtained could then be used
> > to modify the loaded image so that, once the program is running, it
>
> I'm not too sure about modifying code ...

This modifying of code I am proposing is of the same sort as load-time
relocation of an execuable.  It is well understood and easy.

> > does know it wasn't a constant.  If a program needs to, for one reason
> > or another, it could invoke kernel routines for name to number or
> > number to name.
> >
> > The truth of the matter is that the first category could be eliminated
> > completely, but, I think that by having it and by putting the right
> > methods into it, we can eliminate at least 95% of the translations.
> > This would be a good thing if just for the sake of efficiency.
> >
> >
> > > In a networking system we will also have MACHINENUMBER.
> > > With these four numbers you can identify everything down to a simple
> > > method.
> > > Machine number will be fixed (for long periods), the task number will be its
> > > launching number and each object will get a sub-number. The method number
> > > and the object number could now be distributed at compile-time. I could
> > > address an object in your machine with this scheme via internet.
> >
> > In a network forwarder, I would prefer that the forwarder handle
> > translation of OIDs and Method numbers from one machine to the other.
> > In this case, the local alias of the object can include the remote
> > machine identification and object identification.
> >
> > You can't address an object on my machine via internet.  I'm not on
> > internet, just usenet.  It will interesting to see you address objects
> > on my machine via MAIL.  :-)  Actually, I want to try it!
> >
> > > Arff
> > David
> Michael Winikoff
-- 
David Garfield/2250 Clarendon Blvd/Arlington, VA 22201   (703)522-9416
Email: david%davgar@uunet.uu.net or garfield@snoopy.sra.com