1826790 Members
1722 Online
109702 Solutions
New Discussion

Re: Semaphore

 
Ngoh Chean Siung
Super Advisor

Semaphore

Hi,

1) What is semaphore and the usage?
2) What is the guideline to configure semaphore?
3) How to check current semaphore setting and how to configure?

My HP-UX system is 11.0 and 11i.

regards.
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: Semaphore

Hi:

The word "semaphore" derives from the Greek word for "flag" or "signal". As such, it is a variable used to control access to some common resource: a file; a piece of shared memory, etc.

A semaphore holds a zero or positive count that denotes the number of a resource that is available. One speaks of "P" and "V" operations to "dePlete" and "reVive" the count. Semaphores implement "locks" to resources.

A "P" operation decrements a resource count. If the count is zero, the process attempting to do the operation is suspended (waits). A "V" operation increments the semaphore count, allowing another waiting process to resume execution. A binary semaphore (i.e one with states (counts) of only 0 and 1) implements a simple "lock" to a resource.

Semaphores form the basis for any multi-threading environement. Without them, it would be a city without traffic lights!

The Tunable Kernel Parameters guide provides additional information and details the various kernel parameters; their values; and the effects of lowering or raising their values:

http://www.docs.hp.com/en/TKP-90202/index.html

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Semaphore

Hi (again):

Sorry, I forgot to comment on the third question.

You can use 'kmtune' to interrogate the current settings of kernel parameters. See its manpages for more information.

SAM is an easy way to tune the kernel.

You can see some of the values too with 'glance' (in the system tables report) and with 'sar -m'. Again, consult the manpages for more information, or for glance, its builtin help.

Regards!

...JRF...
Ngoh Chean Siung
Super Advisor

Re: Semaphore

Hi James,

Thanks for your reply.

Any doc that explain each option and parameters that under SAM (such as kernel configuration -> configurable paramaters)?

regards.
Sandman!
Honored Contributor

Re: Semaphore

Hi Siung,

Here is a doc that will be helpful for viewing and setting the tuneable kernel parameters: http://docs.hp.com/en/TKP-90203/index.html

cheers!
Ngoh Chean Siung
Super Advisor

Re: Semaphore

Hi,

Is there any single doc that explains all the options as shown below in SAM?

SAM Accounts for Users and Groups
SAM Auditing and Security
SAM Backup and Recovery
SAM Disks and File Systems
SAM Display
SAM Kernel Configuration
SAM Networking and Communications
SAM Performance Monitors
SAM Peripheral Devices
SAM Printers and Plotters
SAM Process Management
Other Resource Management
SAM Routine Tasks
SAM Run SAM on Remote Systems
SD-UX Software Management
SAM Time

regards
James R. Ferguson
Acclaimed Contributor

Re: Semaphore

Hi:

You asked about a document that explains the various SAM sections and their contents.

One starting place is :

http://www.docs.hp.com/en/B2355-60127/sam.1M.html

SAM has builtin help too. As noted in the above manpages, "Help menus describe how to use SAM and perform the various management tasks. Press the F1 function key for help on a currently highlighted field and for more information not covered in this manpage. "

Regards!

...JRF...