home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / linux / 8471 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  2.6 KB

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