Z From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 10-APR-1993 06:26 10-APR-1993 06:26:00.00 To:	Info-VAX@KL.SRI.COM  CC:	6 Subj:	Re: Interrupt Based Inter Process Communications  T In article <555E03A012FF228848@MAX.U.WASHINGTON.EDU>, DEREK@U.WASHINGTON.EDU writes:) > Wayne (wpearson@kean.ucs.mun.ca) asked:  >  >>Hi, G >>   I wish to implement interrupt based communications between several J >>   processes on a VAX 8250 running VMS version 5.1. A signalling processL >>   would generate an interrupt causing several other processes to retrieve3 >>   and process data from a common global section.  > K > To which both Jerry Leicther and Jim Agnew replied, each with a different E > approach.  The first thing that came to my mind, which I didn't see J > suggested elsewhere, is to use the ENQ/DEQ system services with blocking > (or notify) ASTs.  > K > Here, each reader of the global section would obtain a, say, CR mode lock L > on some resource name.  The writer would obtain a NL mode lock on the sameG > resource.  When the writer has data to pass to the readers, it simply K > converts the NL mode lock to EX mode.  Since the readers are blocking the G > writer, and since they have requested blocking notification, the ENQW H > service will issue ASTs to all of the readers.  Each reader would thenG > convert their CR mode lock to NL, and then attempt to convert it back L > to CR mode.  This would place all of the readers on the conversion waitingG > to be granted queue *behind* the writer.  Once the writer gets the EX I > mode lock, it may simply convert it back to NL mode.  (This is a matter I > of *when* you decide the writer can write.  It may be that you use this G > technique simply to send signals to the readers, and *not* to control   > access to the global section.) >  > Voila. > F > This also gets around a potential problem of mailboxes for this typeL > of application.  Namely, that only one reader can read the mailbox.  *IF*,E > however, you only want one reader to process each message, then the D > mailbox will work fine.   Although this seems to be what one wouldL > normally want to do, it doesn't match the scenario you describe.  (PerhapsG > each receiver in your scheme does something different with the data?)  >  And still another solution.....   = You can use a global section threaded with known size packets < and use the LIB$INSQUE and LIB$REMQUE which will allow easy = insertion of datagrams within a region, and even be protected 8 by multiple processor type machines.   You can use event= flags, kernal mode ASTs, locks, etc. to wake up the receiving  processs.     $ Earl Lakia			Email:  LAKIA@IPACT.COM! IPACT Inc.			Voice:  219-464-7212 ( 260 South Campbell		FAX:    219-462-5387 Valparaiso, IN   46383  