[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making MiNTOS the underlying Atari Operating System
>
>
> On Wed, 4 Sep 1996 pross@soho.ios.com wrote:
>
> > I couldn't have said it better. Thanks Yves. Can somebody explain to
> > me the concept of shared libraries and would it or does it apply to
> > MiNTOS?
>
> Basically with a shared library, you only load your library code
> once total for all apps, not once for each app. Usually, these are
> also dynamically loaded, so that you can upgrade your apps just by
> upgrading your library and you don't have to recompile.
>
> MiNT can't do this because it is either very difficult or very
> inefficient (or both) without VM.
>
Well.. eehhh well. I guess it's that time of year again...
Dynamically linked libraries does NOT need any VM at all in fact using
dynamically linked libraries usually decreases memory usage. AmigaOS have had
libraries (which is dynamically loaded) from the beginning. Dyn. loaded libs
works like this..
Suppose you would like to use some kind of help manual browser in your program
if you are using libs then you ask the os for a browser lib. (Usually the names
are standardized.) The os first searches some paths to see if the library is
present, then it looks to see if the lib is already in memory if not the
library is loaded from disc. The os returns a handle that can be used to run
routines in the library. Your program uses these routines to for instance
display a window on screen. You usually call the routines through the os but
some oses (like AmigaOS) permits you to jump directly into the library. When
you are through displaying the manual you close the the library (tell the os
that you do not need the library anymore). The os then if you were the only
user
of the library frees the library from memory.
There is nothing in this process that needs VM. After all if your programs use
libraries properly then memory usage is significanly lowered since you don't
need routines for GIF/JPEG decoding, font selecting, showing help, running
z-modem, playing music, packing unpacking zip or lzh files, doing printfs and
buffered file-io (and and and... the list is long) in your program.
Actually some crude ways of using libs are used today in GEM. For instance
many programs uses ST-Guide for showing manuals and help. There are a
standardized GEM message protocol for communication with accs. ACS (an
application builder) also uses a kind of libraries....
As for the efficiency: Yes if the library routines are called very often then
the os-overhead can be significant however this is seldom any problem and that
problem can't be helped using VM (if you are using dynamically linked
libraries..). VM can be used if the sharedlibs are linked at compiletime
however that scheme is not very good for various reasons..
Regards
Sven Karlsson
---------------------------------------------------------------------------
Student of Engineering Physics at Lund Institute of Technology, Sweden
Soft- and Hardware developer @ Istari Software
Current project: Code ,an interactive development tool for video
game consoles including Editor,Debugger and Assembler
Fenix, a new OO OS for Atari compatible computers.
E-mail: f92sk@efd.lth.se or tomten@df.lth.se
WWW: http://www.efd.lth.se/~f92sk