The ENQ/DEQ mechanism allows multiple OPS/REXX programs to share a virtual terminal. Since nothing prevents a program from getting exclusive control of a virtual terminal (ENQ) and never releasing control of it, the EPI will automatically issue a DEQ for any virtual terminals ENQd by a program under the following circumstances:
In addition, the possibility exists that two REXX programs get into a deadlock situation when ENQing on multiple virtual terminals. Consider the situation of two REXX programs (PGM1 and PGM2) trying to use two virtual terminals (TERMA and TERMB) as follows:
Neither program will be able to continue and both virtual terminals are inaccessible by all other REXX programs. To prevent this situation, the following additional protocol is enforced by the EPI: All ENQs must be performed in alphabetical order by virtual terminal name. Therefore, in the above example, the fourth step (ENQ TERMA by PGM2) would have been rejected by the EPI, as PGM2 has already issued an ENQ for TERMB.
Copyright © 2014 CA.
All rights reserved.
|
|