Mitsubishi QD51 Programming Manual page 157

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

8 MULTITASK PROCESSING
BASIC
ZRESERVE 1
program (A)
Request
Resource with
resource number 1
Resource with
resource number 2
Request
BASIC
program (B)
8 - 12
Deadlock example
In use
Request
In use
ZRESERVE 2
In this case, if the "timeout" parameter is specified by each ZRESERVE instruction, a
timeout error occurs after the specified period of time and the execution interrupted
status can be released.
However, it is not preferable to release the execution interrupted status by generating
an error; it is recommended to modify the program appropriately.
(5) Types of resources which are managed by the OS program of the
communication module
Resources that do not require mutual exclusive control are as follows.
(a)
Resources managed by the OS of the communication module
• Channel numbers for data communication with external devices.
• File numbers specified for input/output interaction with files and
devices.
• Priorities that define the program's execution order.
High priority numbers may be used in mutual exclusion, however.
For example, if an emergency processing at an error occurrence needs to
be executed preceding other programs.
• Character strings assigned to function keys
(b)
Resources managed by each program
• Variables and Arrays handled by the program.
Resources other than the ones listed above can be accessed by all
programs.
For example:
Text screen
Keyboard
Files and disks
Extension devices of the communication module
Event numbers
Resource numbers etc.
Program A requested to use
the resource with resource
number 2, but is put into the
ZRESERVE 2
wait status because program
B is using it.
Request
ZRESERVE 1
Program B requested to use
the resource with resource
number 1, but is put into the
wait status because program
A is using it.
MELSEC-Q
Both programs
were put into the
wait status and
keep each other
from continuing.
This situation is
called the deadlock
status.
8 - 12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents