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: Subj: Re: Interrupt Based Inter Process Communications In article <555E03A012FF228848@MAX.U.WASHINGTON.EDU>, DEREK@U.WASHINGTON.EDU writes: > Wayne (wpearson@kean.ucs.mun.ca) asked: > >>Hi, >> I wish to implement interrupt based communications between several >> processes on a VAX 8250 running VMS version 5.1. A signalling process >> would generate an interrupt causing several other processes to retrieve >> and process data from a common global section. > > To which both Jerry Leicther and Jim Agnew replied, each with a different > approach. The first thing that came to my mind, which I didn't see > suggested elsewhere, is to use the ENQ/DEQ system services with blocking > (or notify) ASTs. > > Here, each reader of the global section would obtain a, say, CR mode lock > on some resource name. The writer would obtain a NL mode lock on the same > resource. When the writer has data to pass to the readers, it simply > converts the NL mode lock to EX mode. Since the readers are blocking the > writer, and since they have requested blocking notification, the ENQW > service will issue ASTs to all of the readers. Each reader would then > convert their CR mode lock to NL, and then attempt to convert it back > to CR mode. This would place all of the readers on the conversion waiting > to be granted queue *behind* the writer. Once the writer gets the EX > mode lock, it may simply convert it back to NL mode. (This is a matter > of *when* you decide the writer can write. It may be that you use this > technique simply to send signals to the readers, and *not* to control > access to the global section.) > > Voila. > > This also gets around a potential problem of mailboxes for this type > of application. Namely, that only one reader can read the mailbox. *IF*, > however, you only want one reader to process each message, then the > mailbox will work fine. Although this seems to be what one would > normally want to do, it doesn't match the scenario you describe. (Perhaps > 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 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