[Info-vax] Ken Coar's OpenVMS Lock utility sources are available on Sourceforge.
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Mon Nov 9 14:43:51 EST 2020
On 2020-11-09 18:24:44 +0000, Simon Clubley said:
> On 2020-11-09, Stephen Hoffman <seaohveh at hoffmanlabs.invalid> wrote:
>> On 2020-11-09 13:14:22 +0000, Simon Clubley said:
>>
>>> ...but the ability to use the DLM to notify everyone else that some
>>> activity or program is running is a far better approach than having to
>>> use lock files to indicate that.
>>
>> You're asking for a job scheduler.
>
> No, I'm not.
Yes, you are.
> Imagine if, for example, a webserver took out a lock at startup so you
> know it's running. Or if a program took out a lock during a critical
> section so that another instance of the program can't run the same
> critical section at the same time.
Isn't that job scheduling and recovery?
> If the web server (for example) crashes, the lock disappears without
> any manual cleanup of a lock file required. Same if the system crashes
> or there's a power failure.
Job scheduling and recovery?
>> DLM might well be part of that scheduler implementation. But as an
>> interprocess notification and coordination mechanism, the DLM API...
>> does not deal easily with the common cases.
>
> I can imagine a large number of common cases it deals with, including
> the examples above.
I don't doubt it. I too have written job schedulers. And I've written
doorbell notifications using DLM. Various of those doorbells and
interlocks can be considered notifications around job status changes.
DLM works well for doorbells, though it's rather involved to implement
doorbells—the DLM API is wonderfully flexible, but not at all good at
some common tasks.
This particular realization driven home by having to explain how to
implement doorbell functions and job control functions to various
developers.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list