HPlogo Interprocess Communication: Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 7 Interprocess Communication Via the MAIL Facility

Avoiding Deadlocks

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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/iX 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.

Feedback to webmaster