Re: Max ops per semop call
Re: Max ops per semop call
- Subject: Re: Max ops per semop call
- From: Terry Lambert <email@hidden>
- Date: Fri, 30 Jan 2009 01:02:51 -0800
On Jan 29, 2009, at 10:57 AM, Rohitash Panda
<email@hidden> wrote:
Folks,
Is there a sysctl parameter that can be changed , to set the limit
on the number of operations in a single semop() call ? Is it
configurable ?
No. The value is hard-coded to MAX_SOPS, which is currently defined in
sem.h as 5; also note the comment in that file which indicates the
value is informational and subject to change in the future. If you
need more than that, you will need to make multiple calls. Note that
even if you limit yourself, the operations you group will only be
individually atomic, not group idempotent (POSIX does not guarantee
it), so there's no benefit other than reduced number of system calls
to grouping a larger number of them together. Given that semaphore
operations are themselves pretty heavyweight, the amortized overhead
costs of extra calls for a larger number of them is proportionally
small.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden