Multiple ASTs for a Lock in a single process ?

From: JF Mezei (jfmezei.spamnot_at_istop.com)
Date: 03/08/04


Date: Mon, 08 Mar 2004 16:05:58 -0500

Ok, I have ALL-IN-1 do LIB$FDIND_IMAGE_SYMBOL against a shareable image of
mine, then executes a routine inside that image. 99% of the time is spent
inside my routine (for instance, when waiting for calls from the web server).

ALL-IN-1 takes a lock called OA$_SHUTDOWN with a blocking AST. (see details of
that lock at bottom of this post). Its only "Flag" is "SYSTEM".

I have tested this yesterday. When the shutdown comes into effect, a user A1
process doesn't exit until the user enters the next command. So it would seem
that the blocking AST only sets a flag. There is a DCL procedure that also
runs which will do a rather blunt STOP/ID on any process still running Allin1
after 2 minutes (does a show dev/files/nosys and then searches for all
processes with a channel to a specific allin1 file).

Back to my problem: Is there a way for my routine to also be notified when the
system manager notifies processes of the A1 shutdown ? Can one take the same
lock twice in the same process ?
Or would the only way be to have my routine cancel the lock taken by All-IN-1
and reissue it with the blocking AST pointing to my own code (which would then
call the AST that had been specified by A1 after doing my own stuff) ?

My concern is that when the shutdown is done during iddle time, no commands
would be sent by my routine to ALL-In-1, so ALL-In-1 woudln't exit by itself
and thus be unceremoniously killed. What I want is to have DCL code look at
the exit status and determine is it is just a temporary shutdown or a
requested shutdwon (with temprary shutdown, the DCL could wait a couple
minutes and then try to restart the app).

Here is what SDA tells me about the lock :

Process index: 0057 Name: A1 Extended PID: 20400557
-------------------------------------------------------
Lock data:

Lock id: 0E00077C PID: 000A0057 Flags: SYSTEM
Par. id: 00000000 SUBLCKs: 0
LKB: 80C5A000 BLKAST: 000B260A
PRIORTY: 0000

Granted at CR 00000000-FFFFFFFF

Resource: 54554853 5F24414F OA$_SHUT Status:
 Length 13 0000004E 574F445F _DOWN...
 User mode 00000000 00000000 ........
 System 00000000 00000000 ........

Local copy



Relevant Pages

  • Re: Multiple ASTs for a Lock in a single process ?
    ... > inside my routine. ... When the shutdown comes into effect, ... > that the blocking AST only sets a flag. ... couldn't lock records against itself, ...
    (comp.os.vms)
  • Re: WinXPSP2, Intel Core2Duo, Kernel drivers
    ... I am referring to a routine normally called at DISPATCH_LEVEL that takes ... a lock, and which an individual forgot was for DISPATCH and called from his ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... the routine, called by ISR, deals with spinlocks. ...
    (microsoft.public.development.device.drivers)
  • Re: Asynchronous IRP remove lock race?
    ... routine, do the IoCallDriver, and do an IoReleaseRemoveLockin the ... The remove lock is meant to prevent a PNP remove ... but won't the lower driver still be blocked in its call to ... dispatch routine, won't the completion routine remove the lock before ...
    (microsoft.public.development.device.drivers)
  • Re: FMODE_EXEC or alike?
    ... filesystems (e.g., to allow consistent locking across NFS clients ... So none of the lock ... routines that are used by lockd or nfsv4 bother to call those methods. ... and then later return the results with a call to the routine ...
    (Linux-Kernel)
  • Re: lock record code
    ... it accessible from code in any other part of the database) ... it isn't critical to the routine. ... >>to lock the records, ... >>> Steel ...
    (microsoft.public.access.forms)

Quantcast