Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subsequent': 0.04; 'fixes': 0.05; 'executable': 0.07; 'over,': 0.07; 'fork': 0.09; 'friday,': 0.09; 'to:addr:comp.lang.python': 0.09; 'wraps': 0.09; 'cc:addr:python-list': 0.10; 'size,': 0.13; 'library': 0.15; 'applies': 0.15; 'accesses': 0.16; 'descriptors': 0.16; 'increment': 0.16; 'mapped': 0.16; 'normal,': 0.16; 'pentium': 0.16; 'wrote:': 0.17; 'byte': 0.17; 'copied': 0.17; 'memory': 0.18; 'libraries': 0.22; 'smallest': 0.22; 'trace': 0.22; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'common': 0.26; 'possibly': 0.27; 'cc:2**2': 0.27; 'execution': 0.27; "doesn't": 0.28; 'initial': 0.28; 'block,': 0.29; 'writes': 0.30; 'resolution': 0.30; 'gets': 0.32; 'not.': 0.32; 'allocated': 0.33; 'much.': 0.33; 'turns': 0.33; 'themselves': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'table': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'cc:no real name:2**1': 0.36; 'itself': 0.37; 'one,': 0.37; 'two': 0.37; 'virtual': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'copying': 0.38; 'description': 0.39; 'first': 0.61; 'is.': 0.62; 'different': 0.63; 'times': 0.63; 'details': 0.63; 'levels': 0.66; 'family': 0.68; 'fact,': 0.69; 'cc:addr:ix.netcom.com': 0.84; 'cow': 0.84; 'dennis': 0.91; 'angel': 0.93 Newsgroups: comp.lang.python Date: Sat, 8 Sep 2012 08:11:48 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=122.167.88.20; posting-account=uPFZNQoAAAAm9w7z13q1SjWNKNjztdcD References: <50410AD6.7080003@shopzeus.com> <2p0i489b5kq6ad2kc70r82ksjqpcatdsqu@invalid.netcom.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 122.167.88.20 MIME-Version: 1.0 Subject: Re: Looking for an IPC solution From: Ramchandra Apte To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org, Dennis Lee Bieber , d@davea.name X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 64 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347117117 news.xs4all.nl 6847 [2001:888:2000:d::a6]:34427 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28725 On Friday, 7 September 2012 02:25:15 UTC+5:30, Dave Angel wrote: > On 09/06/2012 04:33 PM, Dennis Lee Bieber wrote: > > > > > > > > Note that this difference mainly applies to how the processes are > > > themselves are created... How the library wraps shared data is > > > possibly different (I've never understood how a "fork" process can > > > avoid memory conflicts if it has write access to common virtual memory > > > blocks). > > Here's an approximate description of fork, at least for the memory > > aspects. During a fork, the virtual memory table is copied (that's > > descriptors for all mapped and allocated memory) but the memory itself > > is NOT. All the new descriptors are labeled "COW" (copy-on-write). As > > that process executes, the first time it writes in a particular memory > > block, the OS gets a memory fault, which it fixes by allocating a block > > of the same size, copying the memory block to the new one, and labeling > > it read/write. Subsequent accesses to the same block are normal, with no > > trace of the fork remaining. > > > > Now, there are lots of details that this blurs over, but it turns out > > that many times the new process doesn't change very much. For example, > > all the mappings to the executable and to shared libraries are > > theoretically readonly. In fact, they might have also been labeled COW > > even for the initial execution of the program. Another place that's > > blurry is just what the resolution of this table actually is. There are > > at least two levels of tables. The smallest increment on the Pentium > > family is 4k. > > > > > > -- > > > > DaveA >From my OS development experience, there are two sizes of pages - 4K and 1 byte