Avoiding Deadlocks [ Interprocess Communication:Programmer's Guide ] MPE/iX 5.0 Documentation
Interprocess Communication:Programmer's Guide
Avoiding Deadlocks
Simultaneous use of mail-transmission, process-suspension, and
RIN-locking intrinsics throughout a process structure can result in a
deadlock if the intrinsic calls are not synchronized properly. Be aware
of the following:
1. In a multi-process job/session, whenever a process is suspended
(through the SUSPEND intrinsic, or blocked, or when locking a RIN
or receiving mail), MPE XL does not determine whether all other
processes in the process tree are suspended or blocked. Avoid
this situation.
2. An attempt by a process to lock a global RIN succeeds only if both
of the following conditions are met:
* No other process within the job/session currently has locked
this RIN. A global RIN cannot be used as a local RIN, because
deadlock within the same job/session can occur.
* The calling process currently has no other global RIN locked
for itself. This could otherwise result in deadlock between
two jobs/sessions.
MPE/iX 5.0 Documentation