Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

Robin Becker robin at reportlab.com
Fri Nov 10 11:23:46 CET 2006

Robin Becker wrote:
> Andrew MacIntyre wrote:
>> Robin Becker wrote:
>>> I think it uses sysv semaphores and although freeBSD 6 has them 
>>> perhaps there's something I need to do to allow them to work.
>> IIRC, you need to explicitly configure loading the kernel module, or
>> compile the kernel with the necessary option in the config file.
> I tried loading the module, but it seems already to be in the kernel. 
> Probably some sysctl stuff to do.
In fact the semaphore modules are built in now. I did some debugging and the 
error happens in the code at SemSet.c line 25

   for (i = 0; i < sets; i++) {
             | S_IREAD | S_IWRITE); //SEM_R | SEM_A);
     if (id == -1) {

the first semget(i=0) succeeds and the second fails with an errno ENOSPC which 
from the man page implies a resource issue of some kind.

     [ENOSPC]           Insufficiently many semaphores are available.
     [ENOSPC]           The kernel could not allocate a struct semid_ds.

I guess the freebsd limits  must be different to the original development 
Robin Becker

More information about the Python-list mailing list