Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2860

Re: Copy-on-write when forking a python process

Date 2011-04-08 19:26 +0200
From Heiko Wundram <modelnine@modelnine.org>
Subject Re: Copy-on-write when forking a python process
References <BANLkTikxcTsgyK-kDQM6PWFQAScztvFh7w@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.156.1302284140.9059.python-list@python.org> (permalink)

Show all headers | View raw


Am 08.04.2011 18:14, schrieb John Connor:
> Has anyone else looked into the COW problem?  Are there workarounds
> and/or other plans to fix it?  Does the solution I am proposing sound
> reasonable, or does it seem like overkill?  Does anyone foresee any
> problems with it?

Why'd you need a "fix" like this for something that isn't broken? COW
doesn't just refer to the object reference-count, but to the object
itself, too. _All_ memory of the parent (and, as such, all objects, too)
become unrelated to memory in the child once the fork is complete.

The initial object reference-count state of the child is guaranteed to
be sound for all objects (because the parent's final reference-count
state was, before the process image got cloned [remember, COW is just an
optimization for a complete clone, and it's up the operating-system to
make sure that you don't notice different semantics from a complete
copy]), and what you're proposing (opting in/out of reference counting)
breaks that.

-- 
--- Heiko.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Copy-on-write when forking a python process Heiko Wundram <modelnine@modelnine.org> - 2011-04-08 19:26 +0200
  Re: Copy-on-write when forking a python process jac <john.theman.connor@gmail.com> - 2011-04-08 11:34 -0700
    Re: Copy-on-write when forking a python process Heiko Wundram <modelnine@modelnine.org> - 2011-04-08 23:29 +0200
      Re: Copy-on-write when forking a python process jac <john.theman.connor@gmail.com> - 2011-04-12 14:13 -0700

csiph-web