Re: [dev] [st] will global-less changes be wanted upstream?

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Tue, 19 Aug 2014 08:41:27 +0200

> I think this is a very nice summary of the situation. Are you maybe
> aware of a webpage or some other text that describes this, maybe with
> some code snippets, etc.?

Well, I have searched some references in the net, but this is a really
well known topic. You can read the description of rfork in freebsd [1]
and Plan9 [2], and also you can read this page [3], where I quote it:

        A region in the main memory is ultimately loadded from the
        contents of the executable file (generated by the compiler).
        This file also is a part of the UNIX file system and is
        uniquely identified by an inode number. Thus, the region
        table also contains a pointer to this inode to trace back
        to the source from which the region was loaded.

It needs the inode number to can share this region with another
process that execute the same file, and then load the same
read only pages. This is the reason why in some systems (old
systems), you cannot modify the executable of one process that
is runnning (yes I had to work in such systems and it was
paintful :().


Regards,

[1] http://www.freebsd.org/cgi/man.cgi?query=rfork
[2] http://swtch.com/plan9port/man/man3/rfork.html
[3] http://books.google.es/books?id=dY25RaFVM9oC&pg=PA615&lpg=PA615&dq=unix+inode+process+share+text+region&source=bl&ots=bzIN1Dqk2C&sig=BK7BEZsctf5Voq9zp79y1Lk4ooE&hl=es&sa=X&ei=XNjxU-y2OMmb1AXQtoDICw&ved=0CDQQ6AEwAw#v=onepage&q=unix%20inode%20process%20share%20text%20region&f=false

-- 
Roberto E. Vargas Caballero
Received on Tue Aug 19 2014 - 08:41:27 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 19 2014 - 08:48:07 CEST