home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!crdgw1!rpi!newsserver.pixel.kodak.com!laidbak!tellab5!balr!ttd.teradyne.com!news
- From: nichols@ttd.teradyne.com
- Newsgroups: comp.os.linux
- Subject: Re: shared libs - can everyone be happy with this?
- Message-ID: <1992Aug21.162841.1@ttd.teradyne.com>
- Date: 21 Aug 92 21:24:26 GMT
- References: <1992Aug17.144719.1961@crd.ge.com> <1992Aug17.151311.29507@ods.com> <LILJEBER.92Aug17203359@klaava.Helsinki.FI>
- Sender: news@ttd.teradyne.com (News Feed Account)
- Organization: Teradyne Inc., Telecommunications Division
- Lines: 26
- Nntp-Posting-Host: mrdata.ttd.teradyne.com
-
- In article <LILJEBER.92Aug17203359@klaava.Helsinki.FI>, liljeber@klaava.Helsinki.FI (Mika Pekka Liljeberg) writes:
- >>
- >> 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.
- >
- > I'll admit right away that I'm no expert, but it seems to me that William is
- > right. The page _could_ still be shared, since all the processes using the
- > page would be using the same libs. Of course, some kernel support would be
- > needed: The page fault handler would have to check, if the referenced address
- > is in library space and if so, fix the reference to point to the correct
- > place in the library and clear the dirty-bit for that page instead of doing
- > a Copy On Write. This would also work for static data references, as long as
- > the data structures didn't change too profoundly.
- >
- > Would this break demand loading, then? I think not. A text page could still
- > be freed and reloaded on demand. Any library references on it would simply
- > get relinked, when the path of execution intercepted them.
-
- What happens if the 'linker fixup' code just happens to span a text page?
- Since it's extremely unlikely that the link code is only one byte long, I
- could forsee a problem if only part of it is paged back in ( *BOOM* ). Try
- to find that one with your debugger! :-)
-
- Rick
-