home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
- From: davidsen@ariel.crd.GE.COM (william E Davidsen)
- Newsgroups: comp.os.linux
- Subject: Re: shared libs - can everyone be happy with this?
- Message-ID: <1992Aug17.185322.16891@crd.ge.com>
- Date: 17 Aug 92 18:53:22 GMT
- References: <1992Aug17.144719.1961@crd.ge.com> <1992Aug17.151311.29507@ods.com>
- Sender: usenet@crd.ge.com (Required for NNTP)
- Reply-To: davidsen@crd.ge.com (bill davidsen)
- Organization: GE Corporate R&D Center, Schenectady NY
- Lines: 41
- Nntp-Posting-Host: ariel.crd.ge.com
-
- In article <1992Aug17.151311.29507@ods.com>, david@ods.com (David Engel) writes:
- | william E Davidsen (davidsen@ariel.crd.GE.COM) wrote:
-
- | : Well, no, actually. Since the new version of the page is still valid
- | : for all processes it would still be sharable. And it would not have to
- | : be saved somewhere in the unlikely event that it gets paged out, because
- | : the unmodified varsion is still perfectly valid.
- |
- | No, it wouldn't be shareable. When a process writes to a shared page,
- | it gets its very own copy of it which is no longer shared. There is a
- | term for this that you probably already know, but others may not. It's
- | called Copy-On-Write.
-
- This is just what you don't want/need to do in this particular
- circumstance. This is a very neat exception to the usual rules of shared
- or not memory. This memory doesn't get set dirty when written by the
- kernel (I'm saying that, what I mean is the user proc can't write it)
- or copied on write because it is really still valid for all processes
- which share it, and it doesn't need to be paged out, because the
- original copy is also valid.
-
- The only case in which this rewriting of code can't be done is when an
- unalligned address falls over a page boundary. In that case it stays
- unfixed.
-
- I hope I made this clear this time around, the page is written by
- {something other than the user process} and therefore it is equally
- valid with or without the mod and can still be shared freely.
-
- The analogy for this is the jump table library, if you were to patch
- on the fly, which systems in the past have done, the fixed version of a
- procedure is added to the end of the lib, and then the jump table is
- patched to call it. Processes sharing the jump table should not get
- their own copy.
-
- I'm explaining these methods /not/saying we should use them. As long
- as I don't have to use jump tables I can be happy, although I hope
- people will distribute .a files so the end user can link them.
- --
- bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
- I admit that when I was in school I wrote COBOL. But I didn't compile.
-