Re: Shared text segments?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 15 Sep 1999 00:26:48 +0100 (BST)


> Has anybody considered making shared text segments? (text meaning the
> executable code + constant data, right?)

Yes

> This would allow e.g. one to run Emacs once, and then have 9 other people
> run Emacs without having to load the Emacs code core in again. Same

Its such a good idea that it has been done since the very early days of Unix.
Older boxed had a clear idea of shared text segments. With newer systems
anything is shared until the first write to it makes a copy of the page
for the user who tried to write to it. That helps to keep potentially
writeable data shared unless it cannot be avoided.

Its not as trivial as it sounds for shared libraries. Some bits of libraries
are writeable per process to handle linking and the like. The internals are
pretty scary but fortunately[1] land on the glibc people's door not the
kernels

Alan

[1] for us 8)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/