Sourceforge harbors code for OpenVMS locking

OpenVMS experts are pointing to a new location for a tool to make locking a reliable resource for both Alpha and VAX systems. Along the way to that news, reports are out in the open for an Itanium-ready lock utility for OpenVMS.

Jon Pinkley says that Ken Coars’ LOCK utility traces its roots back to a DECUS VAXSIG tape.

The file as submitted to that tape includes source code for LOCK. Now Pinkley is making this source available though Sourceforge.

“In 1998, I was able to get an Alpha version of [LOCK] directly from Ken Coar. I also added some features to support some of the new DLM features, specifically /expedite of null lock request and support for QUECVT which uses /serialise.”

“LOCK uses supervisor mode locks that survive image rundown, and the lock IDs are a help in processing kernel mode logical names. I find it to be an extremely useful utility.”

DCL access is key

Pinkley goes on to explain that the utility is a DCL interface to the OpenVMS distributed lock manager system services SYS$ENQ and SYS$DEQ. The supervisor mode locks granted to the process don’t disappear with image rundown.

“You can use it to do things the VMS DLM allows, but from DCL. That can be for synchronizing access to some object that can’t be shared safely, or to enforce FIFO, to detect/prevent a multi-step job from running concurrently, to allow failover to another node in the cluster (with finer granularity than autostart queues).”

“Or perhaps you have a poorly designed program that uses fixed filenames. So you can’t run multiple instances concurrently without problems. With LOCK, you can avoid the problem by forcing single threading as long as you can make everyone use your wrapper to use the program.”

“Or if you have a single concurrent use compiler license, and you don’t want jobs to fail halfway through a build when someone else compiles something.”

Steven Hoffman adds that other DLM-from-DCL utilities are available over the years. LCK, as well as  netlock are at the digiater.nl website. “More than a few other apps use lock files for this purpose, as that tends to be somewhat more portable. And that approach can work from DCL, too.”

Mark Van Dyck says, “I’m the author of LCK and would love to find a place to store more recent versions… It also works on Itanium now. If there is a demand for locks in other modes than exclusive, I’m ready to give it a try.”

Leave a Reply