freebsd and multiprocessing

Philip Semanchuk philip at
Tue Mar 2 17:52:13 CET 2010

On Mar 2, 2010, at 11:31 AM, Tim Arnold wrote:

> Hi,
> I'm intending to use multiprocessing on a freebsd machine (6.3
> release, quad core, 8cpus, amd64). I see in the doc that on this
> platform I can't use synchronize:
> ImportError: This platform lacks a functioning sem_open
> implementation, therefore, the required synchronization primitives
> needed will not function, see issue 3770.
> As far as I can tell, I have no need to synchronize the processes--I
> have several processes run separately and I need to know when they're
> all finished; there's no communication between them and each owns its
> own log file for output.
> Is anyone using multiprocessing on FreeBSD and run into any other
> gotchas?

Hi Tim,
I don't use multiprocessing but I've written two low-level IPC  
packages, one for SysV IPC and the other for POSIX IPC.

I think that multiprocessing prefers POSIX IPC (which is where  
sem_open() comes from). I don't know what it uses if that's not  
available, but SysV IPC seems a likely alternative. I must emphasize,  
however, that that's a guess on my part.

FreeBSD didn't have POSIX IPC support until 7.0, and that was sort of  
broken until 7.2. As it happens, I was testing my POSIX IPC code  
against 7.2 last night and it works just fine.

SysV IPC works under FreeBSD 6 (and perhaps earlier versions; 6 is the  
oldest I've tested). ISTR that by default each message queue is  
limited to 2048 bytes in total size. 'sysctl kern.ipc' can probably  
tell you that and may even let you change it. Other than that I can't  
think of any SysV limitations that might bite you.


More information about the Python-list mailing list