[comp.sys.amiga.tech] Amiga UNIX - shared libraries?

aoe@hpfcso.HP.COM (Alexander Elkins) (10/27/90)

ag@cbmvax.commodore.com (Keith Gabryelski) writes:
>The port is out.  Ask questions about it and you will get answers.

aoe@hpfcso.HP.COM (Alexander Elkins) writes:
>Alright - 1) Does it support shared code/libraries?  By shared code I mean
>two processes using the same code bytes in real memory.  By shared libraries

gilgalad@dip.eecs.umich.edu (Ralph Seguin) writes:
>Do you mean lightweight processes by this?
>I think that this discussion should be moved into csa.tech.
(OK - so I moved it :-)

What I mean is: Does every executable file get linked with all the library code
that needs when it is compiled?  This would mean that a lot disk space and
memory space is consumed by the inherent replication of code.  A difference
of 40000 bytes versus 400 bytes (perhaps) for a simple command like mv.

aoe@hpfcso.HP.COM (Alexander Elkins) writes:
>I mean two different executables using the same library code bytes in real
>memory implying some kind of linking occurring, and if so how is it
>implemented?

Doing this is non-trivial.  Global variables are a royal pain, so I'm
curious ...

aoe@hpfcso.HP.COM (Alexander Elkins) writes:
>2) Is the executable program code copied to virtual memory when it is run?

gilgalad@dip.eecs.umich.edu (Ralph Seguin) writes:
>What?  I don't understand the question.  All things reside in the virtual
>address space, which is considerably larger than the REAL address space
>(ie, real RAM).

I wasn't clear.  The question I am asking is: Does the executable file get
copied to the swap space on the disk as well as to real memory when it is
loaded?  It effects performance if that is what is done.  The point is that
the program code file could locked and treated as read-only while the code
runs, when swaped out the data is then available to be swaped in from the
original locked program code file rather than taking up swap disk space.

aoe@hpfcso.HP.COM (Alexander Elkins) writes:
>3) Is virtual memory kept in a separate fixed size partition on the disk?

gilgalad@dip.eecs.umich.edu (Ralph Seguin) writes:
>This is usually the case in most UNIX systems, and probably true of
>Amiga UNIX.  I would prefer a separate small, fast disk (say 40 or 80 megs)
>for paging so that disk thrashing is reduced.

That fine if you have a separate small, fast disk to consume for that purpose.
My thought is that sometimes I need a great of swap space, most of the time
I don't, so it would be nice to be able to share file system space.  Otherwise
I'd have to repartition my disk to increase swap space rather have I happen
on the fly.  Mmap() may take care of that anyway.

Alexander Elkins (aoe@hpfiaoe.HP.COM)

ag@cbmvax.commodore.com (Keith Gabryelski) (10/30/90)

In article <9310013@hpfcso.HP.COM> aoe@hpfcso.HP.COM (Alexander Elkins) writes:
>What I mean is: Does every executable file get linked with all the
>library code that needs when it is compiled?

No.  SVR4 supports dynamic libraries.  This allows a executable to be
compiled with only a table index of where library symbols can be
found.

Pax, Keith