| aug2005.tar |
Semaphore OptionsQjob uses semaphores covered in our previous article "Implementing Semaphores in the Shell", available from:
http://www.samag.com/documents/s=9238/sam0408f/0408f.htmThe following is a subset of the semaphore options used by the qjob script:
-I -- Initialize the semaphore and set the number of resources. -P -- Grab a resource and decrement the value of the semaphore. Wait until a resource becomes available if necessary. -V -- Increment the value of the semaphore if and only if the calling process has a resource to return. -q -- Use with the -P operation to place processes that are waiting for a resource in a queue. -t -- Set the number of times the P operation will try to obtain a resource before timing out if none are available. By default, the P operation keeps trying until is a resource is obtained. -s -- Set the number of seconds the P operation sleeps between tests. By default, processes waiting for a resource sleep for one second before trying again. |