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

R

Robin Becker

Robin said:
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++) {
int id = semget(IPC_PRIVATE, MAX_SYSV_SET_SIZE, IPC_CREAT
| 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
environment.
 
A

Andrew MacIntyre

Robin said:
Robin said:
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++) {
int id = semget(IPC_PRIVATE, MAX_SYSV_SET_SIZE, IPC_CREAT
| 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
environment.

The number of semaphores is certainly tunable - the SYSV IPC KERNEL
PARAMETERS section in the file /usr/src/sys/conf/NOTES lists the SYSV
semaphore parameters that can be set in the kernel config.

--
 
R

Robin Becker

Andrew MacIntyre wrote:
.....
The number of semaphores is certainly tunable - the SYSV IPC KERNEL
PARAMETERS section in the file /usr/src/sys/conf/NOTES lists the SYSV
semaphore parameters that can be set in the kernel config.

yes those limits look pretty low. I think POSH grabs 60 the first time
and then fails the second as the limit appears to be 61. I wonder what
the actual cost is of having lots of semaphores.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top