Solaris Tunable Parameters Reference Manual

System V Semaphores

System V semaphores provide counting semaphores in the Solaris environment. In addition to the standard set and release operations for semaphores, System V semaphores can have values that are incremented and decremented as needed (for example, to represent the number of resources available). The ability is offered to do operations on a group of semaphores simultaneously as well as to have the system undo the last operation by a process if it dies.

Semaphores are created in sets.

The module is dynamically loaded on first reference. Parameters provided to the subsystem are validated at that time and all data structures (including the semaphores) are created. Values for parameters are, accordingly, not changeable at runtime because increases in values would lead to data corruption. Entries in the /etc/system file must contain the semsys: prefix.

This facility is different from the POSIX 1003.1b semaphore facility.

semsys:seminfo_semmni

Description

Maximum number of semaphore identifiers.

Data Type

Signed integer

Default

10

Range

1 to 65,535

Dynamic?

No

Validation

Compared to SEMA_INDEX_MAX (currently 65,535) and reset to that value if larger. A warning message is written to the console and or system messages file.

When to Change

When the default number of sets is not enough. Generally changed at the recommendation of software vendors. No error messages are displayed when an attempt is made to create more sets than are currently configured. The application sees a return code of ENOSPC from a semget(2) call.

Commitment Level

Unstable

semsys:seminfo_semmns

Description

Maximum number of System V semaphores on the system.

Data Type

Signed integer

Default

60

Range

1 to MAXINT

Dynamic?

No

Validation

The amount of space that could possibly be consumed by the semaphores and their supporting data structures is compared to 25% of the kernel memory available at the time the module is first loaded. If the memory threshold is exceeded, the module refuses to load and the semaphore facility is not available.

When to Change

When the default number of semaphores is not enough. Generally changed at the recommendation of software vendors. No error messages are displayed when an attempt is made to create more semaphores than are currently configured. The application sees a return code of ENOSPC from a semget(2) call.

Commitment Level

Unstable

semsys:seminfo_semvmx

Description

Maximum value a semaphore can be set to.

Data Type

Unsigned short

Default

32,767

Range

1 to 65,535

Dynamic?

No

Validation

None

When to Change

When the default value is not enough. Generally changed at the recommendation of software vendors. No error messages are displayed when the maximum value is exceeded. The application sees a return code of ERANGE from a semop(2) call.

Commitment Level

Unstable

semsys:seminfo_semmsl

Description

Maximum number of System V semaphores per semaphore identifier.

Data Type

Signed integer

Default

25

Range

1 to MAXINT

Dynamic?

No

Validation

The amount of space that could possibly be consumed by the semaphores and their supporting data structures is compared to 25% of the kernel memory available at the time the module is first loaded. If the memory threshold is exceeded, the module refuses to load and the semaphore facility is not available.

When to Change

When the default value is not enough. Generally changed at the recommendation of software vendors. No error messages are displayed when an attempt is made to create more semaphores in a set than are currently configured. The application sees a return code of EINVAL from a semget(2) call.

Commitment Level

Unstable

semsys:seminfo_semopm

Description

Maximum number of System V semaphore operations per semop(2) call. This parameter refers to the number of sembufs in the sops array that is provided to the semop() system call.

Data Type

Signed integer

Default

10

Range

1 to MAXINT

Dynamic?

No

Validation

The amount of space that could possibly be consumed by the semaphores and their supporting data structures is compared to 25% of the kernel memory available at the time the module is first loaded. If the memory threshold is exceeded, the module refuses to load and the semaphore facility is not available.

When to Change

When the default value is not enough. Generally changed at the recommendation of software vendors. No error messages are displayed when an attempt is made to perform more semaphore operations in a single semop call than are currently allowed. The application sees a return code of E2BIG from a semop() call.

Commitment Level

Unstable

semsys:seminfo_semmnu

Description

Total number of undo structures supported by the System V semaphore system.

Data Type

Signed integer

Default

30

Range

1 to MAXINT

Dynamic?

No

Validation

The amount of space that could possibly be consumed by the semaphores and their supporting data structures is compared to 25% of the kernel memory available at the time the module is first loaded. If the memory threshold is exceeded, the module refuses to load and the semaphore facility is not available.

When to Change

When the default value is not enough. Generally changed at the recommendation of software vendors. No error message is displayed when an attempt is made to perform more undo operations than are currently configured. The application sees a return value of ENOSPC from a semop(2) call when the system runs out of undo structures.

Commitment Level

Unstable

Changes From Previous Release

For information, see semsys:seminfo_semmnu.

semsys:seminfo_semume

Description

Maximum number of System V semaphore undo structures that can be used by any one process.

Data Type

Signed integer

Default

10

Range

1 to MAXINT

Dynamic?

No

Validation

The amount of space that could possibly be consumed by the semaphores and their supporting data structures is compared to 25% of the kernel memory available at the time the module is first loaded. If the memory threshold is exceeded, the module refuses to load and the semaphore facility is not available.

When to Change

When the default value is not enough. Generally changed at the recommendation of software vendors. No error messages are displayed when an attempt is made to perform more undo operations than are currently configured. The application sees a return code of EINVAL from a semop(2) call.

Commitment Level

Unstable

semsys:seminfo_semaem

Description

Maximum value that a semaphore's value in an undo structure can be set to.

Data Type

Unsigned short

Default

16,384

Range

1 to 65,535

Dynamic?

No

Validation

None

When to Change

When the default value is not enough. Generally changed at the recommendation of software vendors. No error messages are displayed when an attempt is made to perform more undo operations than are currently configured. The application sees a return code of EINVAL from a semop(2) call.

Commitment Level

Unstable