Libraries
Dennis Marer
dmarer@td2cad.intel.com
Wed, 17 Mar 93 10:13:54 PDT
> You're more or less assuming a comventional file-system that doesn't like
> small files -- this is not a good thing to assume automatically.
Are you saying that every object exists in its own file? Is there no grouping?
No, I'm not assuming any file size problems, just that in, for example, a GUI
I can already envision several hundred objects. (thousand?) You'd be stupid
to place each in its own file, so some grouping is necessary.
> i think it's simpler just to have objects and to let the virtual memory system
> handle loading.
>
> Do you think this is unworkable from an efficiency view?
Are you saying every object is loaded into memory individually?
What about linking? Loading one object could in turn cause several *hundred*
to subsequently be loaded into memory because it references them. This is
several *hundred* accesses to disk, links, and possibilities of failure.
If related objects, functions, and data are grouped together (in a module,
for example) all internal references are linked at the time the module is
created, not at the time the module is loaded. External links (to other
modules) are resolved at load time, which is done en masse for every object
in the whole module rather than one at a time.
*Yes*, I think its unefficient. Let's look at the implementation: the system
would need to keep track of the standard information for memory allocation,
a pointer and the size of the memory area used. Also, linking information for
every method (public and private - remember inheritance) and data item for
the object would need to be stored. I can envision cases where the info
stored by the system would be larger than the object itself! (I make "pure"
objects all the time, with no code and no data.)
There needs to be some cohesive unit...if this were a 100% object oriented
environment where everything were an object, your idea would have merit.
It's not, and functions and data outside objects still exist. Some way needs
to exist to collect these concepts into a cohesive unit.
> > Again, if objects are loaded individually the overhead would be tremendous -
> > if the entire OS or GUI is put in a single module, memory usage would be
> > outrageous.
>
> Not with virtual memory.
*flame on* This is the one assumption I completely disagree with! IBM and
Microsoft have made this assumption, and now you're *reccomended* to have 16MB
of memory just to run OS/2 or Windows NT. Sure, you can run with 4/8MB, but
you'll be swapping from here to timbuktu. *flame off*
Break the system down into useable chunks, only load those you need.
What if I'm running an application which only utilizes the local screen. Does
it mean I have to load the code to support a screen at a networked system also?
I can't tell if you want everything in one single file or everything in its
own file...please explain your ideas more. I just see the need for a logical
way of dividing things: lots of relatively small objects (and functions and
data items) go into a module to simplify management by the kernel. Lots of
modules can be placed into libraries to simplify management by the *user*.
I'm just trying to develop a system which encourages grouping of related
concepts into logical chunks. Today, you *can* use your C++ compiler to
generate a single file for every object, but you don't, do you? Also, you
can generate hundreds of modules and link to them explicitly instead of
placing them all in a library, but you don't, do you? These are not new
concepts I'm introducing here - they're tried and true, and apply just as
well to the world of OOP.
-------------------------------------------------------------------------------
Ok, so I'm not out to redesign every aspect of the concept of an operating
system - I'm frustrated because it seems that's what we're trying to do. I'm
more interested in applying the concepts already in existence and developing
something useful quickly instead of doing intensive research and testing of
brand new ideas. I'm not trying to re-write UNIX, but I'm also not trying to
develop Amoeba (which has taken over 5 years so far). What I want out of this
project is something that is more *useful* to me than DOS or Windows, not
something which takes the scientific world by storm.
Dennis