[Python-3000] Kill GIL?

Josiah Carlson jcarlson at uci.edu
Mon Sep 18 09:25:57 CEST 2006

Ivan Krstic <krstic at solarsail.hcs.harvard.edu> wrote:
> * Bite the bullet; write and support a stdlib SHM primitive that works
> wherever possible, and simply doesn't work on completely broken
> platforms (I understand Windows falls into this category). Utilize it in
> a lightweight fork-and-coordinate wrapper provided in the stdlib.

Shared memory as an object store, or as IPC?  Either way, shared mmaps
offer shared memory for most platforms.  Which ones?  Windows, linux,
OSX, solaris, BSDs, ... I would be surprised if Irix, AIX, HP-UX and
other "big iron" OSes /didn't/ support shared mmaps.  Sure, you don't
get it on little embedded machines, but I'm not sure if we want to worry
about concurrency libraries there.

Alternatively, for platforms that support it, I have found that
synchronous unix domain sockets can push about 3x as much as the
loopback interface, about 1 GBytes/second on a 3 ghz Xeon, vs. around
350 MBytes/second for loopback tcp/ip.  I haven't tried using
domain+tcp/ip as a synchronization/"check the mmap at offset X, length Y",
but I would imagine that it would be competitive.

 - Josiah

More information about the Python-3000 mailing list