JPH0844575A - Monitor and load control system for cpu - Google Patents

Monitor and load control system for cpu

Info

Publication number
JPH0844575A
JPH0844575A JP6182352A JP18235294A JPH0844575A JP H0844575 A JPH0844575 A JP H0844575A JP 6182352 A JP6182352 A JP 6182352A JP 18235294 A JP18235294 A JP 18235294A JP H0844575 A JPH0844575 A JP H0844575A
Authority
JP
Japan
Prior art keywords
cpu
interrupt
time
load
irq
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP6182352A
Other languages
Japanese (ja)
Inventor
Hiroyuki Saito
宏行 齋藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP6182352A priority Critical patent/JPH0844575A/en
Publication of JPH0844575A publication Critical patent/JPH0844575A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)

Abstract

PURPOSE:To efficiently detect the load state or the overload state of a CPU with a simple constitution by periodically inputting an external interrupt to the CPU and monitoring the time from the interrupt request to the interrupt acceptance. CONSTITUTION:For example, a CPU 1a accepts plural external interrupts IRQ0a to IRQna through a priority control part 2a in the priority order. An interrupt generation part 3a periodically inputs the external interrupt IRQ0a, whose priority is equal to or lower than priorities of the other external interrupts preferably, to the CPU 1a. A CPU management part 10 monitors the time from this interrupt request IRQ0a to interrupt acceptance IAK0a. If the number or external interrupts ORQ0a. to IRQna is small at this time, the CPU 1 quickly accepts the external interrupt IRQ0a, and it doesn't take time to accept it. If the number of external interrupts IRQ0a to IRQna is large, the CPU 1a slowly accepts the external interrupt IRQna, and it takes time to accept it. Consequently, the load state of the CPU is effectively detected by the simple constitution.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はCPUの監視及び負荷制
御方式に関し、更に詳しくは複数の外部割込を受け付け
る1又は2以上のCPUの処理について、負荷状態や過
負荷状態の検出、ひいては障害の検出、及び負荷分担の
制御を行うCPUの監視及び負荷制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a CPU monitoring and load control system, and more specifically, it detects a load state or an overload state, and consequently a failure, in processing of one or more CPUs that receive a plurality of external interrupts. The present invention relates to a CPU monitoring and load control method for detecting load and controlling load sharing.

【0002】例えば交換局に設置される通信装置では多
数の通信チャネルからの割込要求をCPUが実時間で処
理する。この種の装置にはその社会的影響が大きいこと
から高い信頼性が求められており、マルチプロセッサの
構成をとる例が多い。かかる通信システムの円滑な運用
のためには個々のCPUの負荷状態や障害の状態を有効
に検出し、効果的な負荷分担が必要になる。
For example, in a communication device installed in an exchange, a CPU processes interrupt requests from many communication channels in real time. This type of device is required to have high reliability because it has a great social impact, and there are many cases where a multiprocessor configuration is adopted. In order to smoothly operate such a communication system, it is necessary to effectively detect the load state and the fault state of each CPU and effectively share the load.

【0003】[0003]

【従来の技術】従来は、CPUの負荷を単位時間当たり
の有効な処理が実行された時間により計測していた。
2. Description of the Related Art Conventionally, the CPU load is measured by the time during which effective processing is executed per unit time.

【0004】[0004]

【発明が解決しようとする課題】しかし、一般にこの種
の計測方法は複雑であり、例えばシングルプログラミン
グ方式のプロセッサでは、どの処理が有効で、どの処理
が有効でないかを切り分けるのが困難である。また、複
数のタスクが入れ代わり実行されるマルチプログラミン
グ方式のプロセッサではタスク毎の実行時間を集計する
必要があり、これがプロセッサに余分な負荷を与え、本
来の処理能力が低下する恐れがある。
However, this kind of measuring method is generally complicated, and it is difficult to distinguish which processing is effective and which processing is not effective, for example, in a single programming type processor. Further, in a multi-programming system processor in which a plurality of tasks are executed alternately, it is necessary to total the execution time for each task, which may impose an extra load on the processor and reduce the original processing capability.

【0005】本発明の目的は、簡単な構成によりCPU
の負荷状態や過負状態荷の検出、ひいては障害の検出、
及び負荷分担の制御を効率的に行えるCPUの監視及び
負荷制御方式を提供することにある。
An object of the present invention is to provide a CPU with a simple structure.
Load condition and overload condition detection, and eventually failure detection,
Another object of the present invention is to provide a CPU monitoring and load control method capable of efficiently controlling load sharing.

【0006】[0006]

【課題を解決するための手段】上記の課題は図1の構成
により解決される。即ち、本発明(1)のCPUの監視
方式は、複数の外部割込を優先順に受け付けるCPUの
監視方式において、CPUに対して外部割込を定期的に
入力し、その割込要求から割込受付までの時間を監視す
ることによりCPUの負荷状態を検出するものである。
The above-mentioned problems can be solved by the structure shown in FIG. That is, according to the CPU monitoring method of the present invention (1), in the CPU monitoring method that receives a plurality of external interrupts in priority order, external interrupts are periodically input to the CPU, and interrupts are issued from the interrupt request. The load state of the CPU is detected by monitoring the time until reception.

【0007】また本発明(4)のCPUの監視方式は、
複数の外部割込を受け付け、その割込ベクトルを一旦待
ち行列にプールし、優先順に割込処理を実行するCPU
の監視方式において、CPUに対して外部割込を定期的
に入力し、その割込受付から割込処理実行までの時間を
監視することによりCPUの負荷状態を検出するもので
ある。
The CPU monitoring method of the present invention (4) is
A CPU that accepts multiple external interrupts, temporarily pools the interrupt vectors, and executes interrupt processing in priority order.
In this monitoring method, an external interrupt is periodically input to the CPU, and the time from the reception of the interrupt until the execution of the interrupt process is monitored to detect the load state of the CPU.

【0008】また本発明(9)のCPUの負荷制御方式
は、上記の監視機能を備えるCPUを複数備え、これら
が共通の負荷を分担すると共に、何れかのCPUで過負
荷状態又は障害状態が検出されたことにより残りのCP
Uがその負荷を分担するように構成したものである。
The CPU load control system of the present invention (9) is provided with a plurality of CPUs having the above-mentioned monitoring function, which share a common load, and whichever of the CPUs has an overload state or a fault state. Remaining CP due to detection
The U is configured to share the load.

【0009】[0009]

【作用】本発明(1)のCPUの監視方式において、例
えばCPU1a は優先制御部2 a を介して複数の外部割
込IRQ0a〜IRQnaを優先順に受け付ける。割込発生
部3a はCPU1a に対して好ましくは他と同程度又は
それ以下の優先順位の外部割込IRQ0aを定期的に入力
する。そして、CPU管理部10はその割込要求IRQ
0aから割込受付IAK0aまでの時間を監視する。
In the CPU monitoring system of the present invention (1), an example is given.
For example, CPU1aIs the priority control unit 2 aMultiple external discounts via
Included IRQ0a~ IRQnaAre accepted in order of priority. Interrupt occurrence
Part 3aIs CPU1aTo the same degree as other or
External interrupt IRQ with lower priority0aEnter regularly
I do. Then, the CPU management unit 10 sends the interrupt request IRQ.
0aReceived from IAK0aUp to time.

【0010】外部割込IRQ0a〜IRQnaが少ない場合
は、CPU1a による外部割込IRQ0aの受け付けが速
く、時間がかからない。また外部割込IRQ0a〜IRQ
naが多い場合は、CPU1a による外部割込IRQ0
受け付けが遅くなり、時間がかかる。従って、本発明
(1)によれば簡単な構成によりCPUの負荷状態を有
効に検出できる。
When the external interrupts IRQ 0a to IRQ na are small, the CPU 1 a accepts the external interrupts IRQ 0a quickly and does not take much time. In addition, external interrupt IRQ 0a to IRQ
If the number of na is large, the acceptance of the external interrupt IRQ 0 by the CPU 1 a becomes slow and takes time. Therefore, according to the present invention (1), the load state of the CPU can be effectively detected with a simple configuration.

【0011】好ましくは、前記時間が第1の所定時間を
超えたことによりCPUの過負荷状態を検出する。また
好ましくは、前記時間が前記第1よりも長い第2の所定
時間を超えたことによりCPUの障害状態を検出する。
本発明(4)のCPUの監視方式において、例えばCP
U1a は優先制御部2 a を介して複数の外部割込IRQ
0a〜IRQnaを受け付け、その割込ベクトルを一旦待ち
行列にプールし、優先順に割込処理TSK0a〜TSKna
を実行する。
Preferably, the time is a first predetermined time.
The CPU overload state is detected when the value exceeds the limit. Also
Preferably, the second predetermined time is longer than the first predetermined time.
The failure state of the CPU is detected when the time is exceeded.
In the CPU monitoring method of the present invention (4), for example, CP
U1aIs the priority control unit 2 aMultiple external interrupt IRQs via
0a~ IRQnaAnd wait for the interrupt vector
Pool in a queue and interrupt processing TSK in priority order0a~ TSKna
To execute.

【0012】この場合に、複数の外部割込を優先順に受
け付け、受付順に割込処理を実行しても良いし、又は複
数の外部割込を一斉に受け付け、優先順に割込処理を実
行しても良い。割込発生部3a はCPU1a に対して好
ましくは他と同程度又はそれ以下の優先順位の外部割込
IRQ0aを定期的に入力する。そして、CPU管理部1
0はその割込受付IAK0aから割込処理TSK0aの実行
までの時間を監視する。
In this case, a plurality of external interrupts may be received in the order of priority and the interrupt processing may be executed in the order of reception, or a plurality of external interrupts may be received all at once and the interrupt processing executed in the order of priority. Is also good. The interrupt generating unit 3 a periodically inputs to the CPU 1 a an external interrupt IRQ 0a, which preferably has the same or lower priority than the others. Then, the CPU management unit 1
0 monitors the time from the interruption acceptance IAK 0a to the execution of the interruption processing TSK 0a .

【0013】外部割込IRQ0a〜IRQnaが少ない場合
は、待ち行列が少なく、CPU1aによる割込処理TS
0aの実行までに時間がかからない。また外部割込IR
0a〜IRQnaが多い場合は、待ち行列も多くなり、C
PU1a による割込処理TSK0aの実行までに時間がか
かる。従って、本発明(4)によれば簡単な構成により
CPUの負荷状態を有効に検出できる。
[0013] If the external interrupt IRQ 0a ~IRQ na is small, less queues, interrupt processing TS by CPU1 a
It does not take long to execute K 0a . External interrupt IR
If there are many Q 0a to IRQ na , there will be more queues and C
It takes a long time to execute the interrupt process TSK 0a by the PU 1 a . Therefore, according to the present invention (4), the CPU load state can be effectively detected with a simple configuration.

【0014】好ましくは、前記時間が第3の所定時間を
超えたことによりCPUの過負荷状態を検出する。また
好ましくは、前記時間が前記第3よりも長い第4の所定
時間を超えたことによりCPUの障害状態を検出する。
また好ましくは、前記所定時間をワンショットマルチバ
イブレータ回路により生成するように構成する。
Preferably, the CPU overload state is detected when the time exceeds the third predetermined time. Further, preferably, the failure state of the CPU is detected when the time exceeds a fourth predetermined time which is longer than the third time.
Further, preferably, the predetermined time period is generated by a one-shot multivibrator circuit.

【0015】また好ましくは、前記時間をカウンタによ
り計数するように構成する。本発明(9)のCPUの負
荷制御方式においては、上記の監視機能を備える複数の
CPU1a ,1b を備え、通常はこれらが共通の負荷6
1 〜6n を例えば1/2づつ分担する。そして、CPU
a で過負荷状態(BSY1a又はBSY2a)又は障害状
態(ALM1a又はALM2a)が検出された場合はCPU
b がCPU1a の負荷の一部又は全部を負担する。逆
にCPU1b で過負荷状態(BSY1b又はBSY2b)又
は障害状態(ALM1b又はALM2b)が検出された場合
はCPU1a がCPU1b の負荷の一部又は全部を負担
する。従って、本発明(9)によれば簡単な構成により
CPU間の負荷分担の制御を効率的に行える。
Further, preferably, the time is counted by a counter. In the load control system of the CPU of the present invention (9), comprising a plurality of CPU 1 a, 1 b comprising the monitoring function, the load is usually these common 6
For example, 1 to 6 n are divided into 1/2, for example. And CPU
Overloaded with 1 a (BSY 1a or BSY 2a) or fault condition (ALM 1a or ALM 2a) If the detected CPU
1 b bears part or all of the load on the CPU 1 a . Conversely, when the CPU 1 b detects an overload state (BSY 1b or BSY 2b ) or a fault state (ALM 1b or ALM 2b ), the CPU 1 a bears part or all of the load of the CPU 1 b . Therefore, according to the present invention (9), it is possible to efficiently control the load sharing between the CPUs with a simple configuration.

【0016】好ましくは、上記の監視機能を一箇所(例
えばCPU管理部10)にまとめ、各時間の監視機能を
共通のRAMカウンタ105 により構成する。
Preferably, the above-mentioned monitoring functions are integrated in one place (for example, the CPU management unit 10), and the monitoring function for each time is constituted by a common RAM counter 10 5 .

【0017】[0017]

【実施例】以下、添付図面に従って本発明による実施例
を詳細に説明する。なお、全図を通して同一符号は同一
又は相当部分を示すものとする。図2は第1実施例の構
成を示す図で、図において1はマルチプログラミング方
式のCPU、11 はスーパバイザ、12 はタスク、2は
割込制御部(INTC)、21 は優先制御部(PRT
C)、22 はマスク回路(MSK)、3は割込発生部
(IG)、31 は分周回路(1/M)、32 はフリップ
フロップ回路(FF)、4は割込要求から割込受付まで
の時間を監視する監視部、41 ,42 はワンショットマ
ルチバイブレータ回路(SS)、43 ,44 はフリップ
フロップ回路(FF)、5は割込受付から割込タスク実
行までの時間を監視する監視部、51 ,52 はワンショ
ットマルチバイブレータ回路(SS)、53 〜55 はフ
リップフロップ回路(FF)、61 〜6m はシリアル通
信制御部(SCC)、CH1 〜CHm はその通信チャネ
ル、7は割込バス(IB)、8はCPU1のデータバ
ス、アドレスバス、制御バス等から成る共通バス(C
B)、21はORゲート回路(O)、SRはシステムリ
セット信号である。
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Note that the same reference numerals indicate the same or corresponding parts throughout the drawings. Figure 2 is a diagram showing a configuration of a first embodiment, CPU, 1 1 of 1 multiprogramming system in FIG supervisor, 1 2 task 2 interrupt control unit (INTC), 2 1 priority control unit (PRT
C), 2 2 is a mask circuit (MSK), 3 is an interrupt generator (IG), 3 1 is a frequency dividing circuit (1 / M), 3 2 is a flip-flop circuit (FF), 4 is from an interrupt request. monitoring unit for monitoring the time to interrupt reception, 4 1, 4 2 one-shot multivibrator circuit (SS), 4 3, 4 4 is a flip-flop circuit (FF), 5 execution interrupt task from interrupt reception monitoring unit for monitoring the time to, 5 1, 5 2 one-shot multivibrator circuit (SS), 5 3 to 5 5 flip-flop circuit (FF), 6 1 ~6 m serial communication controller (SCC) , CH 1 to CH m are communication channels thereof, 7 is an interrupt bus (IB), 8 is a common bus (C which is a data bus, an address bus, a control bus, etc. of the CPU 1).
B) and 21 are OR gate circuits (O), and SR is a system reset signal.

【0018】スーパバイザ11 は外部からの割込要求I
RQ0 〜IRQn を受け付ける共通の受付処理、各種タ
スクのスケジュール処理、及びこれらを実行に移す処理
等を行う。タスク12 には外部割込IRQ0 〜IRQn
の受付によりスケジュールされた割込タスクITSK0
〜ITSKn 等が含まれる。優先制御部21 は、この例
では割込要求IRQ1 (BSY1 ),IRQ2 (BSY
2 )に対して高い優先度を与えている。SCC61 〜S
CC6m からの割込要求IRQ3 〜IRQn に対しては
中程度の同一の優先度又は通信チャネルCH 1 〜CHm
の緊急度又は重要度に応じた優先度を与えている。そし
て、割込発生部3からの割込要求IRQ0 に対しては割
込要求IRQ3 〜IRQn に対するのと同一又はそれら
の内の中程度又はそれ以下の優先度を与えている。従っ
て、割込要求IRQ0 は割込要求IRQ3 〜IRQn
の関係では略発生順に受け付けられる。
Supervisor 11Is an external interrupt request I
RQ0~ IRQnCommon acceptance processing that accepts
Schedule processing of tasks and processing to execute these
And so on. Task 12External interrupt IRQ0~ IRQn
Interrupt task ITSK scheduled by reception of0
~ ITSKnEtc. are included. Priority control unit 21Is this example
Then interrupt request IRQ1(BSY1), IRQ2(BSY
2) Is given a high priority. SCC61~ S
CC6mInterrupt request IRQ from3~ IRQnFor
Medium priority or communication channel CH 1~ CHm
The priority is given according to the urgency or importance of. Soshi
The interrupt request IRQ from the interrupt generator 3.0For
Include request IRQ3~ IRQnThe same as or against
Among them, the priority is given to medium or lower. Follow
Interrupt request IRQ0Is the interrupt request IRQ3~ IRQnWhen
In the relationship of, the order of occurrence is accepted.

【0019】マスク回路22 は通常は全開とされ、CP
U1はSCC61 〜SCC6m のフル負荷を担う。即
ち、例えばSCC61 は1フレームデータの送/受信を
行うと割込要求信号IRQ3 を発生する。スーパバイザ
1 が割込要求IRQ3 を受け付けると、割込制御部2
から割込受付信号IAK3 がSCC61 に返送される。
しかる後、スーパバイザ11 はこの割込要求(割込ベク
タ)IRQ3 に対応する割込タスクITSK3 をスケジ
ュールし、これを一旦割込タスクの実行待ち行列に受付
順にプールする。そして、順番がくると割込タスクIT
SK3 を実行する。SCC62 〜6m に対しても同様で
ある。
The mask circuit 2 2 is normally fully opened, and CP
U1 bears the full load of SCC6 1 to SCC6 m . That is, for example, the SCC 6 1 generates an interrupt request signal IRQ 3 when transmitting / receiving one frame data. When the supervisor 1 1 receives the interrupt request IRQ 3 , the interrupt controller 2
Sends an interrupt acceptance signal IAK 3 to SCC 6 1 .
Thereafter, the supervisor 1 1 schedules the interrupt task ITSK 3 corresponding to the interrupt request (interrupt vector) IRQ 3, which temporarily pooled in order of reception to the run queue of the interrupt task. Then, when the turn comes, the interrupt task IT
Execute SK 3 . The same applies to SCC6 2 to 6 m .

【0020】かかる状態のもとで、割込発生部3は定期
的に割込要求信号IRQ0 を発生する。即ち、分周回路
1 はマスタクロック信号MCKをM分周し、一定周期
の割込クロック信号ICKを生成する。FF32 は割込
クロック信号ICKによりセットされ、割込要求信号I
RQ0 =1を出力する。同時に、この割込要求信号IR
0 は監視部4のSS41 ,SS42 をトリガする。S
S41 のタイムアウト時間t1 はCPU1が過負荷の状
態にあるか否かを判定できる値に設定されている。即
ち、スーパバイザ11 がt1 以内に割込要求IRQ0
受付を行えば正常負荷の範囲であり、t1 以内に割込要
求IRQ0の受付を行わなければ過負荷の状態である。
またSS42 のタイムアウト時間t 2 (t1 より十分に
長い)はCPU1が障害の状態にあるか否かを判定でき
る値に設定されている。即ち、スーパバイザ11 がt2
以内に割込要求IRQ0 の受付を行えば正常の範囲であ
り、t2 以内に割込要求IRQ0 の受付を行わなければ
障害の状態である。
Under such a condition, the interrupt generator 3 is regularly
Interrupt request signal IRQ0To occur. That is, the frequency divider circuit
Three1Is the master clock signal MCK divided by M,
To generate the interrupt clock signal ICK. FF32Is an interrupt
The interrupt request signal I is set by the clock signal ICK
RQ0= 1 is output. At the same time, this interrupt request signal IR
Q0Is SS4 of the monitoring unit 41, SS42Trigger. S
S41Timeout time t1CPU1 is overloaded
It is set to a value that can be determined whether or not Immediately
Chi, supervisor 11Is t1Interrupt request IRQ within0of
If it is accepted, it is within the range of normal load, and t1Need to interrupt within
Seeking IRQ0If it is not accepted, it is overloaded.
Also SS42Timeout time t 2(T1More fully
Long) can determine whether CPU1 is in a faulty state
Is set to a value. That is, supervisor 11Is t2
Interrupt request IRQ within0If you accept
, T2Interrupt request IRQ within0If you do not accept
It is in a state of disability.

【0021】スーパバイザ11 が混んでいない場合は、
割込要求信号IRQ0 は合理的な時間内に受け付けら、
FF32 は割込受付信号IAK0 によりリセットされ
る。この場合はSS41 ,SS42 がタイムアウトする
前に割込要求信号IRQ0 =0となり、よってFF
3 ,FF44 はセットされない。一方、この割込受付
信号IAK0 は監視部5のFF55 をセットする。そし
て、FF55 の出力はSS51 ,SS52 をトリガす
る。SS51 のタイムアウト時間t3 はCPU1が過負
荷の状態にあるか否かを判定できる値に設定されてい
る。即ち、スーパバイザ11 がt3 以内に割込タスクI
TSK0 を実行すれば正常負荷の範囲であり、t3 以内
に割込タスクITSK0 を実行しなければ過負荷の状態
である。またSS52 のタイムアウト時間t4 (t3
り十分に長い)はCPU1が障害の状態にあるか否かを
判定できる値に設定されている。即ち、スーパバイザ1
1 がt4 以内に割込タスクITSK0 を実行すれば正常
の範囲であり、t4 以内に割込タスクITSK0 を実行
しなければ障害の状態である。
If the supervisor 1 1 is not busy,
Accept the interrupt request signal IRQ 0 within a reasonable time,
The FF3 2 is reset by the interrupt acceptance signal IAK 0 . In this case, the interrupt request signal IRQ 0 = 0 before SS4 1 and SS4 2 time out, and therefore FF
4 3 and FF4 4 are not set. On the other hand, the interrupt acceptance signal IAK 0 sets the FF 5 5 of the monitoring unit 5. The output of FF5 5 triggers the SS5 1, SS5 2. The time-out time t 3 of SS5 1 is set to a value that can determine whether the CPU 1 is overloaded. That is, the supervisor 1 1 receives the interrupt task I within t 3.
If TSK 0 is executed, it is in the range of normal load, and if the interrupt task ITSK 0 is not executed within t 3 , it is in overload. Further, the timeout time t 4 (sufficiently longer than t 3 ) of SS5 2 is set to a value with which it can be determined whether or not the CPU 1 is in a failure state. That is, supervisor 1
If 1 executes the interrupt task ITSK 0 within t 4 , it is in the normal range, and if it does not execute the interrupt task ITSK 0 within t 4 , it is in a failure state.

【0022】スーパバイザ11 が混んでいない場合は、
割込タスクITSK0 は合理的な時間内に実行され、F
F55 は割込タスクITSK0 の実行時に生成されるプ
ログラムリセット信号PR1 によりリセットされる。こ
の場合はSS51 ,SS52がタイムアウトする前にF
F55 の出力Q=0となり、よってFF53 ,54 はセ
ットされない。
If the supervisor 1 1 is not busy,
The interrupt task ITSK 0 is executed within a reasonable time, and F
F5 5 is reset by the program reset signal PR 1 generated when the interrupt task ITSK 0 is executed. In this case, F before SS5 1 and SS5 2 time out.
The output Q of F5 5 becomes 0, so that FF 5 3 and 5 4 are not set.

【0023】しかし、スーパバイザ11 が混んでいる場
合は、割込要求信号IRQ0 はt1以内に受け付けられ
ない。即ち、SS41 がタイムアウトした時には割込要
求信号IRQ0 =1であり、これによりFF43 はセッ
トされ、ビジー信号BSY1=1となる。ビジー信号B
SY1 は割込要求信号IRQ1 としてCPU1に対して
高い優先度の割込要求を行う。スーパバイザ11 は割込
要求IRQ1 を受け付けると割込タスクITSK1 をス
ケジュールする。そして、この割込タスクITSK1
実行に移されると、その処理の中でマスク回路22 にマ
スクデータをセットし、負荷の軽減を図る。例えばSC
C61 〜6n の全部又は緊急度や重要度の低い一部の割
込要求を一時的にマスクし、負荷の軽減を図る。そし
て、負荷が軽減されたら(例えばスーパバイザ11 がア
イドルタスクを実行するような状況になったら)マスク
データを全開に戻す。
However, when the supervisor 1 1 is busy, the interrupt request signal IRQ 0 cannot be accepted within t 1 . That is, when the SS4 1 times out an interrupt request signal IRQ 0 = 1, thereby FF4 3 is set, the busy signal BSY 1 = 1. Busy signal B
SY 1 issues a high priority interrupt request to the CPU 1 as an interrupt request signal IRQ 1 . When the supervisor 1 1 receives the interrupt request IRQ 1 , it schedules the interrupt task ITSK 1 . When this interrupt task ITSK 1 is put into execution, mask data is set in the mask circuit 2 2 in the process to reduce the load. SC
C6 1 temporarily masking all or urgency or less important part of the interrupt request to 6 n, attempt to reduce the load. Then, (When eg supervisor 1 1 becomes situations to perform idle task) When the load is reduced to return the mask data is fully opened.

【0024】また、スーパバイザ11 が混んでいる場合
は、割込タスクITSK0 はt3 以内に実行に移されな
い。即ち、SS51 がタイムアウトした時にはFF55
の出力Q=1であり、これによりFF53 はセットさ
れ、ビジー信号BSY2 =1となる。ビジー信号BSY
2 は割込要求信号IRQ2 としてCPU1に対して高い
優先度の割込要求を行う。スーパバイザ11 は割込要求
IRQ2 を受け付けると割込タスクITSK2 をスケジ
ュールする。そして、この割込タスクITSK2 が実行
に移されると、その処理の中でマスク回路22 にマスク
データをセットし、負荷の軽減を図る。
Further, when the supervisor 1 1 is busy, the interrupt task ITSK 0 is not executed within t 3 . That is, when SS5 1 times out, FF5 5
Output Q = 1, and thereby FF5 3 is set and the busy signal BSY 2 = 1. Busy signal BSY
2 issues an interrupt request of high priority to the CPU 1 as an interrupt request signal IRQ 2 . When the supervisor 1 1 receives the interrupt request IRQ 2 , it schedules the interrupt task ITSK 2 . When the interrupt task ITSK 2 is put into execution, mask data is set in the mask circuit 2 2 in the process to reduce the load.

【0025】なお、上記ビジー信号BSY1 ,BSY2
は共にCPU1の過負荷状態を検出した信号であるが、
割込要求IRQ0 の受付遅延が検出された場合(BSY
1 )と割込タスクITSK0 の実行遅延が検出された場
合(BSY2 )とではCPU1内における過負荷の性質
(深刻度)が異なる。一般に割込要求IRQ0 の受付遅
延が検出された場合の方が深刻である。本実施例ではビ
ジー信号BSY1 ,BSY2 で別個に割込要求IR
1 ,IRQ2 を行うので、負荷軽減の対策も別個に行
える。しかし、これらを分ける必要がない場合は、ビジ
ー信号BSY1 ,BSY2 の論理ORをとり、その出力
で割込要求IRQ1 をかけるように構成しても良い。
The busy signals BSY 1 and BSY 2
Are both signals that detect the overload state of the CPU 1,
When the acceptance delay of the interrupt request IRQ 0 is detected (BSY
1 ) and the case where the execution delay of the interrupt task ITSK 0 is detected (BSY 2 ) differ in the nature (severity) of overload in the CPU 1. Generally, it is more serious when a delay in accepting the interrupt request IRQ 0 is detected. In this embodiment, the busy signals BSY 1 and BSY 2 are used to separately request the interrupt request IR.
Since Q 1 and IRQ 2 are performed, measures for reducing the load can also be taken separately. However, if it is not necessary to divide them, the busy signals BSY 1 and BSY 2 may be logically ORed, and the interrupt request IRQ 1 may be applied at the output.

【0026】更に、CPU1に障害(ホルト、暴走、無
限ループ等)があると割込要求信号IRQ0 はt2 以内
に受け付けられない。又は割込タスクITSK0 はt4
以内に実行に移されない。これらの場合はFF44 /F
F54 がセットされ、アラーム信号ALM1 /ALM2
=1となる。ALM1 /ALM2 =1となるとORゲー
ト回路21を満足し、CPU1の動作を強制的に停止さ
せる。なお、図示しないが、ORゲート回路21の出力
で発光ダイオードを点灯し、障害を報知するように構成
しても良い。
Further, if the CPU 1 has a failure (holt, runaway, infinite loop, etc.), the interrupt request signal IRQ 0 cannot be accepted within t 2 . Alternatively, the interrupt task ITSK 0 is t 4
Not implemented within. In the case of these FF4 4 / F
F5 4 is set and alarm signals ALM 1 / ALM 2
= 1. When ALM 1 / ALM 2 = 1 is satisfied, the OR gate circuit 21 is satisfied, and the operation of the CPU 1 is forcibly stopped. Although not shown, a light emitting diode may be turned on by the output of the OR gate circuit 21 to notify the failure.

【0027】かくして、第1実施例によればワンショッ
トマルチバイブレータ回路とフリップフロップ回路とか
ら成る簡単な構成によりCPU1の効率的な過負荷検
出、障害検出、及び負荷管理が行える。なお、CPU1
がマスク回路22 にマスクデータをセットする代わり
に、例えばORゲート回路22を設け、ビジー信号BS
1 /BSY2 =1の発生によりマスク回路22 に直接
マスクデータを与え、負荷の軽減を図るように構成して
も良い。
Thus, according to the first embodiment, the overload detection, the fault detection, and the load management of the CPU 1 can be efficiently performed with a simple structure including the one-shot multivibrator circuit and the flip-flop circuit. In addition, CPU1
Instead of setting mask data in the mask circuit 2 2 , for example, an OR gate circuit 22 is provided and the busy signal BS
The mask data may be directly supplied to the mask circuit 2 2 by the generation of Y 1 / BSY 2 = 1 to reduce the load.

【0028】図3は第2実施例の構成を示す図で、上記
第1実施例との相違点は監視部4,5をカウンタと比較
回路(又はデコーダでも良い)とで構成したことにあ
る。即ち、4は割込要求から割込受付までの時間を監視
する監視部、47 はカウンタ回路(CTR)、48 は比
較回路(CMP)、5は割込受付から割込タスク実行ま
での時間を監視する監視部、56 はフリップフロップ回
路(FF)、57 はカウンタ回路(CTR)、58 は比
較回路(CMP)である。
FIG. 3 is a diagram showing the structure of the second embodiment. The difference from the first embodiment is that the monitoring units 4 and 5 are composed of counters and comparison circuits (or decoders). . That is, 4 is a monitoring unit that monitors the time from interrupt request to interrupt acceptance, 4 7 is a counter circuit (CTR), 4 8 is a comparison circuit (CMP), and 5 is from interrupt acceptance to execution of an interrupt task. A monitoring unit for monitoring time, 5 6 is a flip-flop circuit (FF), 5 7 is a counter circuit (CTR), and 5 8 is a comparison circuit (CMP).

【0029】監視部4において、カウンタ47 は割込要
求信号IRQ0 =1によりカウントイネーブルとなり、
マスタクロック信号MCKの計数を開始する。スーパバ
イザ11 が混んでいない場合は割込要求IRQ0 は合理
的な時間内に受け付けられる。即ち、FF32 は割込受
付信号IAK0 によりリセットされ、これによりカウン
タ47 は計数を停止する。
In the monitoring unit 4, the counter 4 7 is enabled by the interrupt request signal IRQ 0 = 1
The counting of the master clock signal MCK is started. If the supervisor 1 1 is not busy, the interrupt request IRQ 0 is accepted within a reasonable time. That is, the FF3 2 is reset by the interrupt acceptance signal IAK 0 , which causes the counter 4 7 to stop counting.

【0030】スーパバイザ11 の割込受付処理は割込要
求IRQ0 を受け付けた際に共通バス8を介してカウン
タ47 の計数値を読み込む。計数値の読込は例えばアド
レスバスに監視部4のI/Oアドレスを指定し、かつ制
御バスにリードの制御信号を送り、データバスより計数
値を読み込むことで行う。読み込んだ計数値の値はCP
U1の負荷状態に応じてその都度様々な値をとり得るの
で、スーパバイザ11は該計数値に基づきCPU1の負
荷状態をきめ細かく判断できる。従って、本実施例では
負荷軽減の制御もきめ細かく行える。
The interrupt acceptance processing of the supervisor 1 1 reads the count value of the counter 4 7 via the common bus 8 when the interrupt request IRQ 0 is accepted. The count value is read by, for example, designating the I / O address of the monitoring unit 4 on the address bus, sending a read control signal to the control bus, and reading the count value from the data bus. The value of the read count value is CP
Since each case may take various values depending on the load state of U1, supervisor 1 1 can precisely determine the load state of CPU1 based on the regimen value. Therefore, in this embodiment, it is possible to finely control the load reduction.

【0031】スーパバイザ11 が混んでいる場合は、割
込要求IRQ0 は合理的な時間内には受け付けられな
い。その結果、比較回路48 では時間t1 に相当する計
数値を検出したことによりビジー信号BSY1 を出力す
る。但し、この第2実施例では計数値そのものがスーパ
バイザ11 に取り込まれるので、ビジーか否かの判断も
スーパバイザ11 が独自に行える。従って、本実施例で
は比較回路48 の上記ビジー信号BSY1 を検出する部
分は必ずしも必要はない。しかし、例えばORゲート回
路22を設け、ORゲート回路22の出力により直接に
マスク回路22 のマスクデータの制御を行うような場合
にはビジー信号BSY1 は有用である。
When the supervisor 1 1 is busy, the interrupt request IRQ 0 cannot be accepted within a reasonable time. As a result, it outputs a busy signal BSY 1 by detecting the counter value corresponding to the comparison circuit in 4 8 time t 1. However, in this second embodiment, since the count value itself is taken into the supervisor 1 1 , the supervisor 1 1 can independently determine whether it is busy or not. Therefore, in the present embodiment, the portion of the comparison circuit 4 8 for detecting the busy signal BSY 1 is not necessarily required. However, for example, when the OR gate circuit 22 is provided and the mask data of the mask circuit 2 2 is directly controlled by the output of the OR gate circuit 22, the busy signal BSY 1 is useful.

【0032】更に、CPU1に障害がある場合は割込要
求IRQ0 は何時までたっても受け付けられない。その
結果、比較回路48 では時間t2 に相当する計数値を検
出したことによりアラーム信号ALM1 を出力する。ア
ラーム信号ALM1 はORゲート回路21を介してCP
U1の動作を強制的に停止させる。一方、監視部5にお
いて、FF56 は割込受付信号IAK0 によりセットさ
れる。カウンタ57 はFF56 の出力Q=1によりカウ
ントイネーブルとなり、マスタクロック信号MCKの計
数を開始する。
Further, when the CPU 1 has a failure, the interrupt request IRQ 0 cannot be accepted until any time. As a result, it outputs an alarm signal ALM 1 by detecting the counter value corresponding to the comparator circuit 4 8 time t 2. The alarm signal ALM 1 is sent to the CP via the OR gate circuit 21.
The operation of U1 is forcibly stopped. On the other hand, in the monitoring section 5, the FF5 6 is set by the interrupt acceptance signal IAK 0 . The counter 5 7 becomes count enable by the output Q = 1 of the FF 5 6 and starts counting the master clock signal MCK.

【0033】CPU1が混んでいない場合は、割込要求
IRQ0 に対応する割込タスクITSK0 は合理的な時
間内に実行に移される。これにより割込タスクITSK
0 はまず共通バス8を介してカウンタ57 の計数値を読
み込み、しかる後、プログラムリセット信号PR3 を発
生してFF56 及びカウンタ57 をリセットする。読み
込んだ計数値の値はCPU1の負荷状態に応じてその都
度様々な値をとり得るのでスーパバイザ11 は該計数値
に基づきCPU1の負荷状態をきめ細かく判断できる。
従って、本実施例では負荷軽減の制御もきめ細かく行え
る。
When the CPU 1 is not busy, the interrupt task ITSK 0 corresponding to the interrupt request IRQ 0 is put into execution within a reasonable time. This causes the interrupt task ITSK
For 0 , first, the count value of the counter 5 7 is read through the common bus 8, and thereafter, the program reset signal PR 3 is generated to reset the FF 5 6 and the counter 5 7 . The value of the read count supervisor 1 1 because each time may take various values depending on the load state of CPU1 can precisely determine the load state of CPU1 based on the regimen value.
Therefore, in this embodiment, it is possible to finely control the load reduction.

【0034】CPU1が混んでいる場合は、割込タスク
ITSK0 は合理的な時間内には実行に移されない。そ
の結果、比較回路58 では時間t3 に相当する計数値を
検出したことによりビジー信号BSY2 を出力する。但
し、ビジー信号BSY2 の用い方は上記と同様で良い。
CPU1に障害がある場合は、割込タスクITSK0
何時までたっても実行に移されない。その結果、比較回
路58 では時間t4 に相当する計数値を検出したことに
よりアラーム信号ALM2 を出力する。アラーム信号A
LM2 はORゲート回路21を介してCPU1の動作を
強制的に停止させる。
If the CPU 1 is busy, the interrupt task ITSK 0 will not be executed in a reasonable time. As a result, it outputs a busy signal BSY 2 by detecting the counter value corresponding to the comparison circuit in 5 8 hours t 3. However, the usage of the busy signal BSY 2 may be the same as above.
If the CPU 1 has a failure, the interrupt task ITSK 0 is not executed until any time. As a result, the comparator circuit 5 8 outputs the alarm signal ALM 2 when it detects the count value corresponding to the time t 4 . Alarm signal A
The LM 2 forcibly stops the operation of the CPU 1 via the OR gate circuit 21.

【0035】かくして、この第2実施例によればカウン
タを用いる構成によりCPU1のきめ細かな負荷検出及
び負荷管理が行える。図4は第3実施例の構成を示す図
で、この第3実施例は本発明のマルチプロセッサ方式へ
の適用例を示している。図において、1a ,1b はマル
チプログラミング方式のCPU、2a ,2b は割込制御
部(INTC)、3a ,3b は割込発生部(IG)、6
1 〜6n はシリアル通信制御部(SCC)、CH1 〜C
n はその通信チャネル、7は割込バス(IB)、
a ,8b は夫々CPU1a ,1b の共通バス(C
B)、9は拡張バス(EB)、10はCPU1a ,1b
の負荷及び障害状態の検出を行うCPU管理部、1
a ,11b は共通バス8a ,8b と拡張バス9との間
の接続制御を行うバスインタフェース(BIF)、12
は拡張バス9の使用権を調停する調停バス(AB)、1
3はバス調停部(ABT)である。
Thus, according to the second embodiment, the configuration using the counter enables the CPU 1 to perform the fine load detection and the load management. FIG. 4 is a diagram showing the configuration of the third embodiment. This third embodiment shows an example of application of the present invention to the multiprocessor system. In Fig, 1 a, 1 b is a multiprogramming system CPU, 2 a, 2 b is an interrupt control unit (INTC), 3 a, 3 b an interrupt generator (IG), 6
1 to 6 n are serial communication control units (SCC), CH 1 to C
H n is the communication channel, 7 is the interrupt bus (IB),
8 a, 8 b is a common bus (C of each CPU1 a, 1 b
B), the expansion bus 9 (EB), 10 is CPU 1 a, 1 b
CPU management unit that detects the load and fault status of the
1 a, 11 b is a bus interface for connection control between the expansion bus 9 and common bus 8 a, 8 b (BIF) , 12
Is an arbitration bus (AB) that arbitrates the right to use the expansion bus 1
Reference numeral 3 is a bus arbitration unit (ABT).

【0036】CPU1a ,1b は通常はシリアル通信制
御部61 〜6n の全負荷を公平に分担している。即ち、
割込制御部2a はCPU1a からのマスクデータの設定
により割込要求IRQ1 〜IRQn の内の前半部分を受
け付ける。一方、割込制御部2b はCPU1b からのマ
スクデータの設定により割込要求IRQ1 〜IRQn
内の後半部分を受け付ける。
The CPU 1 a, 1 b is normally are fairly share the full load of the serial communication control unit 6 1 to 6 n. That is,
Interrupt control unit 2 a accepts the first part of the interrupt request IRQ 1 ~IRQ n by setting the mask data from the CPU 1 a. On the other hand, the interrupt controller 2 b accepts the second part of the interrupt request IRQ 1 ~IRQ n by setting the mask data from the CPU 1 b.

【0037】CPU1a は自己の共通バス8a を常時ア
クセス可能である。一方、CPU1 a が拡張バス9にア
クセスする場合は調停バス12にバス要求信号BRQa
を出力する。バス調停部13は拡張バス9がCPU1b
により使用中(ビジー)でなければCPU1a にバス許
可信号BAKa を返送する。これを受けたCPU1a
BIF11a を付勢し、共通バス8a を拡張バス9に接
続する。
CPU1aIs my common bus 8aAlways
Accessible. On the other hand, CPU1 aTo expansion bus 9
To access the bus request signal BRQ to the arbitration bus 12a
Is output. In the bus arbitration unit 13, the expansion bus 9 is the CPU 1b
CPU1 if not in use (busy)aBus permit
Signal BAKaWill be returned. CPU1 that received thisaIs
BIF11aEnergize the common bus 8aTo the expansion bus 9
To continue.

【0038】この状態では、CPU1a は例えばアドレ
スバスにSCC61 〜6n の装置アドレスを指定するこ
とでSCC61 〜6n の内の何れか一つをアクセスでき
る。またCPU管理部10に割り当てられた装置アドレ
スを指定することでCPU管理部10へのコマンドデー
タ(プログラムリセット等)の書込、CPU管理部10
からの計数値データやステータスデータ(ビジー,アラ
ーム)の読出が可能である。CPU1b についても同様
である。
[0038] In this state, CPU 1 a can access any one of the SCC6 1 to 6 n by specifying a device address of SCC6 1 to 6 n, for example, the address bus. Further, by designating a device address assigned to the CPU management unit 10, writing command data (such as program reset) into the CPU management unit 10, and the CPU management unit 10
It is possible to read the count value data and status data (busy, alarm) from. The same applies to the CPU 1 b .

【0039】図5は第3実施例のCPU管理部のブロッ
ク図で、図において10はCPU管理部、101 ,10
2 はフリップフロップ回路(FF)、103 はセレクタ
(SEL)、104 は加算回路、105 はRAMカウン
タ、106 はANDゲート回路(A)、107 はカウン
タ(CTR)、108 はコンパレータ(CMP)、10
9 はインストラクションレジスタ(IR)、1010はデ
コーダ(DEC)、1011はフリップフロップ(F
F)、1012,1013は3ステートのドライバ回路
(D)、1014はデコーダ(DEC)、1015〜1018
はコンパレータ(CMP)、1021〜1024,1031
1034はフリップフロップ(FF)である。
FIG. 5 is a block diagram of the CPU management section of the third embodiment. In the figure, 10 is the CPU management section 10 1 , 10
2 is a flip-flop circuit (FF), 10 3 is a selector (SEL), 10 4 is an adder circuit, 10 5 is a RAM counter, 10 6 is an AND gate circuit (A), 10 7 is a counter (CTR), 10 8 is Comparator (CMP), 10
9 is an instruction register (IR), 10 10 is a decoder (DEC), 10 11 is a flip-flop (F).
F), 10 12, 10 13 are three-state driver circuit (D), 10 14 a decoder (DEC), 10 15 ~10 18
Is a comparator (CMP), 10 21 to 10 24 , 10 31 to
10 34 is a flip-flop (FF).

【0040】RAMカウンタ105 の全内容はCPU1
a /CPU1b からの指令により予めクリアされてい
る。FF101 は割込制御部2a からの割込受付信号I
AK0aによりセットされ、しかる後、割込タスクITS
0aの実行においてCPU1aにより生成されるプログ
ラムリセット信号PR3aによりリセットされる。FF1
2 は割込制御部2b からの割込受付信号IAK0bによ
りセットされ、しかる後、割込タスクITSK0bの実行
においてCPU1b により生成されるプログラムリセッ
ト信号PR3bによりリセットされる。
The entire content of the RAM counter 10 5 is the CPU 1
It has been pre-cleared by a command from the a / CPU1 b. FF10 1 is an interrupt acceptance signal I from the interrupt control unit 2 a.
Set by AK 0a , then interrupt task ITS
It is reset by the program reset signal PR 3a generated by the CPU 1 a during execution of K 0a . FF1
0 2 is set by the interrupt acceptance signal IAK 0b from the interrupt control unit 2 b , and then reset by the program reset signal PR 3b generated by the CPU 1 b during execution of the interrupt task ITSK 0b .

【0041】カウンタ107 はマスタクロック信号MC
Kによりサイクリック(この例では0,1,2,3,
0,1,2,3,…の如く)にカウントアップしてい
る。カウンタ107 のカウント出力Q(この例では2ビ
ット)はセレクタ103 の選択入力とRAMカウンタ1
5 のアドレス入力とに加えられる。カウント出力Q=
0の時はRAMカウンタ105 のアドレス0からカウン
トデータCDR0=0が読み出される。一方、セレクタ1
3 はこの時点で割込要求信号IRQ0aを選択出力して
いる。加算回路104 は、IRQ0a=0の場合はCD R0
=0に0を加算し、書込カウントデータCDW0=0を形
成する。またIRQ0a=1の場合はCDR0=0に1を加
算し、書込カウントデータCDW0=1を形成する。即
ち、カウントデータCDR0はIRQ0a=1の場合は+1
され、IRQ0a=0の場合はその値を保持する。
Counter 107Is the master clock signal MC
Cyclic by K (0, 1, 2, 3, in this example
(Like 0, 1, 2, 3, ...)
It Counter 107Count output of Q (in this example, 2
Is a selector 103Selection input and RAM counter 1
0FiveIt is added to the address input of. Count output Q =
RAM counter 10 when 0FiveFrom address 0
Data CDR0= 0 is read. On the other hand, selector 1
03Is the interrupt request signal IRQ at this point0aSelect and output
There is. Adder circuit 10FourIs the IRQ0aIf = 0 then CD R0
Write count data CD by adding 0 to = 0W0Form = 0
To achieve. Also IRQ0aIf = 1 then CDR0Add 1 to = 0
Calculate and write count data CDW0= 1 is formed. Immediately
The count data CDR0Is IRQ0a+1 if = 1
And IRQ0aWhen = 0, the value is retained.

【0042】同様にして、アドレス1のカウントデータ
CDR1はFF101 の出力Qの1/0に、アドレス2の
カウントデータCDR2は割込要求信号IRQ0bの1/0
に、アドレス3のカウントデータCDR3はFF102
出力Qの1/0に、夫々対応して+1され、又はその内
容を保持する。例えば割込発生部3a の割込要求信号I
RQ0a=1になるとRAMカウンタ105 のカウントデ
ータCDR0はカウントアップを開始する。CPU1a
スーパバイザ11aが混んでいない場合は割込要求IRQ
0aは合理的な時間内に受け付けられる。即ち、割込要求
信号IRQ0a=1は割込受付信号IAK0aによりリセッ
トされ、これによりカウントデータCDR0はカウントア
ップを停止する。
Similarly, the count data CD R1 of the address 1 is 1/0 of the output Q of the FF 10 1 and the count data CD R2 of the address 2 is 1/0 of the interrupt request signal IRQ 0b .
, The count data CD R3 address 3 1/0 of FF10 2 outputs Q, corresponding respectively to be +1, or retains its contents. Interrupt request signal I, for example, the interrupt generation unit 3 a
When RQ 0a = 1, the count data CD R0 of the RAM counter 10 5 starts counting up. Interrupt request IRQ if supervisor 1 1a of CPU 1 a is not busy
0a will be accepted within a reasonable time. That is, the interrupt request signal IRQ 0a = 1 is reset by the interrupt acceptance signal IAK 0a , whereby the count data CD R0 stops counting up.

【0043】スーパバイザ11aの割込受付処理は割込要
求IRQ0aを受け付けた際に共通バス8a を拡張バス9
に接続してRAMカウンタ105 のカウントデータCD
R0を読み込む。カウントデータCDR0の読込は、例えば
アドレスバスにCPU管理部10の装置アドレス及びR
AMカウンタ105 に対するサブアドレス0を指定し、
かつ制御バスにリード信号を送ることで行う。
[0043] extend the common bus 8 a interrupt the process of accepting the supervisor 1 1a is at the time of accepting the interrupt request IRQ 0a bus 9
Connected to the RAM counter 10 5 count data CD
Read R0 . To read the count data CD R0 , for example, the device address of the CPU management unit 10 and the R
Specify sub address 0 for AM counter 10 5 ,
In addition, the read signal is sent to the control bus.

【0044】CPU管理部10の装置アドレス及びリー
ド信号は不図示のデコーダでデコードされ、パルス信号
WRDを発生させる。これによりFF1011がセットさ
れ、拡張バス13の使用の延長信号EXTを生成する。
またパルス信号WRDによりIR109 にサブアドレス
2 =0及びリードの旨の指令情報がセットされる。コ
ンパレータ108 はIR109 のサブアドレスI2 =0
とカウンタ107 のカウント値とを比較し、A=Bであ
るとデコーダ1010を付勢する。デコーダ10 10はIR
109 の指令I1 (=リード)に従ってA=Bのタイミ
ングにリードゲート信号RDGを出力する。これにより
ドライバ回路102 が付勢され、カウントデータCDR0
の内容がCPU1a に読み込まれる。
The device address and the memory of the CPU management unit 10
The pulse signal is decoded by a decoder (not shown).
Generate WRD. As a result, FF1011Is set
Then, the extension signal EXT for using the extension bus 13 is generated.
In addition, IR10 is generated by the pulse signal WRD.9Sub address
I2= 0 and command information to the effect of read is set. Ko
Comparator 108Is IR109Subaddress I of2= 0
And counter 107Is compared with the count value of
And decoder 10TenEnergize. Decoder 10 TenIs IR
109Directive I1(= Lead) according to A = B timing
Read gate signal RDG. This
Driver circuit 102Is activated, and count data CDR0
Contents of CPU1aRead in.

【0045】読み込まれたカウントデータCDR0の内容
はCPU1a の負荷状態に応じてその都度様々な値をと
り得るのでスーパバイザ11aは該カウントデータCDR0
の内容に基づきCPU1a の負荷状態をきめ細かく判断
できる。従って、必要ならCPU1a は独自の負荷軽減
の制御をきめ細かく行える。カウントデータCDR0の内
容はCPU1a からのリセットコマンドにより上記読取
の場合と同様の制御でクリアされる。即ち、この場合は
カウントデータCD R0が読み出されたタイミングにデコ
ーダ1010からゲート信号CLが発生し、RAMカウン
タ105 への書込カウントデータCDW0を強制的に0に
する。以上はCPU1b についても同様である。
Count data CD readR0Content of
Is CPU1aDepending on the load condition of
Supervisor 11aIs the count data CDR0
CPU1 based on the contents ofaThe load condition of the machine
it can. Therefore, if necessary, CPU1aOriginal load reduction
Can be finely controlled. Count data CDR0Of
The content is CPU1aRead the above by reset command from
It is cleared by the same control as in the case. That is, in this case
Count data CD R0At the timing when is read
Order 10TenThe gate signal CL is generated from
10FiveWrite count data to CDW0Is forced to 0
I do. The above is CPU1bIs also the same.

【0046】一方、CPU1a ,CPU1b が混んでい
る場合はRAMカウンタ105 の各カウントアップが進
む。デコーダ1014はカウンタ107 のカウント出力Q
の値に応じて順に位相の異なるパルス信号φ0 〜φ3
出力している。この状態で、コンパレータ1015はRA
Mカウンタ105 の各カウントデータCDR と時間t1
に対応する所定値とを比較しており、A>Bの場合はH
IGHレベルを出力する。そして、パルス信号φ0 =1
のタイミングにA>Bを満足するとFF1021の出力Q
(ビジー信号BSY1a)=1となる。またパルス信号φ
2 =1のタイミングにA>Bを満足するとFF1023
出力Q(ビジー信号BSY1b)=1となる。
On the other hand, CPU1a, CPU1bIs crowded
RAM counter 10FiveEach count up
Mu. Decoder 1014Is counter 107Count output Q
Pulse signal φ with different phases according to the value of0~ Φ3To
It is outputting. In this state, the comparator 10FifteenIs RA
M counter 10FiveEach count data CDRAnd time t1
Is compared with a predetermined value corresponding to, and if A> B, then H
Outputs IGH level. Then, the pulse signal φ0= 1
If A> B is satisfied at the timing of, FF10twenty oneOutput Q
(Busy signal BSY1a) = 1. The pulse signal φ
2If A> B is satisfied at the timing of = 1, FF10twenty threeof
Output Q (busy signal BSY1b) = 1.

【0047】また、コンパレータ1016はRAMカウン
タ105 の各カウントデータCDRと時間t2 に対応す
る所定値とを比較しており、A>Bの場合はHIGHレ
ベルを出力する。そして、パルス信号φ1 =1のタイミ
ングにA>Bを満足するとFF1022の出力Q(ビジー
信号BSY2a)=1となる。またパルス信号φ3 =1の
タイミングにA>Bを満足するとFF1024の出力Q
(ビジー信号BSY2b)=1となる。
Further, the comparator 10 16 compares each count data CD R of the RAM counter 10 5 with a predetermined value corresponding to the time t 2 , and outputs a HIGH level when A> B. Then, when A> B is satisfied at the timing of the pulse signal φ 1 = 1, the output Q (busy signal BSY 2a ) of the FF 10 22 becomes 1. When A> B is satisfied at the timing of pulse signal φ 3 = 1, the output Q of FF10 24
(Busy signal BSY 2b ) = 1.

【0048】更に、コンパレータ1017はRAMカウン
タ105 の各カウントデータCDRと時間t3 に対応す
る所定値とを比較しており、A>Bの場合はHIGHレ
ベルを出力する。そして、パルス信号φ0 =1のタイミ
ングにA>Bを満足するとFF1031の出力Q(アラー
ム信号ALM1a)=1となる。またパルス信号φ2 =1
のタイミングにA>Bを満足するとFF1033の出力Q
(アラーム信号ALM 1b)=1となる。
Further, the comparator 1017Is a RAM count
10FiveEach count data CDRAnd time t3Corresponding to
Is compared with a predetermined value, and if A> B, the HIGH level is
Output bell. Then, the pulse signal φ0= 1 Taimi
FF10 when Satisfaction A> B31Output Q (Alarm
Signal ALM1a) = 1. The pulse signal φ2= 1
If A> B is satisfied at the timing of, FF1033Output Q
(Alarm signal ALM 1b) = 1.

【0049】また、コンパレータ1018はRAMカウン
タ105 の各カウントデータCDRと時間t4 に対応す
る所定値とを比較しており、A>Bの場合はHIGHレ
ベルを出力する。そして、パルス信号φ1 =1のタイミ
ングにA>Bを満足するとFF1033の出力Q(アラー
ム信号ALM1b)=1となる。またパルス信号φ3 =1
のタイミングにA>Bを満足するとFF1034の出力Q
(アラーム信号ALM 2b)=1となる。
Further, the comparator 1018Is a RAM count
10FiveEach count data CDRAnd time tFourCorresponding to
Is compared with a predetermined value, and if A> B, the HIGH level is
Output bell. Then, the pulse signal φ1= 1 Taimi
FF10 when Satisfaction A> B33Output Q (Alarm
Signal ALM1b) = 1. The pulse signal φ3= 1
If A> B is satisfied at the timing of, FF1034Output Q
(Alarm signal ALM 2b) = 1.

【0050】この状態で、CPU1a ,CPU1b は任
意の時点にステータスデータ(BSY1a〜ALM2b)を
読み込むことが可能である。ステータスデータの読込
は、例えばアドレスバスにCPU管理部10のもう一つ
の装置アドレスを指定し、かつ制御バスにリード信号を
送ることで行う。この場合はゲート信号RDの発生によ
り直ちにドライバ回路1013が付勢され、ステータスデ
ータがCPU1a 又はCPU1b に読み込まれる。
[0050] In this state, CPU1 a, CPU1 b is able to read status data (BSY 1a ~ALM 2b) at any time. The reading of the status data is performed by, for example, designating another device address of the CPU management unit 10 on the address bus and sending a read signal to the control bus. In this case, the generation of the gate signal RD immediately activates the driver circuit 10 13 and the status data is read into the CPU 1 a or the CPU 1 b .

【0051】この第3実施例によれば、CPU1a ,C
PU1b は共通のステータスデータを監視することによ
りに負荷の相互分散制御を行える。即ち、例えばCPU
bに障害が発生するとそのステータスデータはビジー
信号BSY1b,BSY2b=1、かつアラーム信号ALM
1b,ALM2b=1となる。この場合のCPU1a は読み
取ったステータスデータの内のアラーム信号ALM1b
ALM2b=1に着目し、自ら全負荷を負担するように変
化する。即ち、割込制御部2a はCPU1a からのマス
クデータの設定により割込要求IRQ1 〜IRQn の全
部を受け付けるように変化する。一方、CPU1b はA
LM1b/ALM2b=1になった時点でその動作を停止さ
れている。CPU1a に障害が発生した場合は上記の逆
である。
[0051] According to the third embodiment, CPU 1 a, C
PU1 b can perform mutual load balancing control by monitoring common status data. That is, for example, a CPU
When a failure occurs in 1 b , the status data is busy signal BSY 1b , BSY 2b = 1 and alarm signal ALM.
1b and ALM 2b = 1. Alarm signal of the status data CPU 1 a is read in this case ALM 1b /
Focusing on ALM 2b = 1 and changing so as to bear the full load by itself. That is, the interrupt control unit 2 a is changed to accept all of the interrupt request IRQ 1 ~IRQ n by setting the mask data from the CPU 1 a. On the other hand, CPU1 b is A
The operation is stopped when LM 1b / ALM 2b = 1. When a failure occurs in the CPU 1a, the reverse operation is performed.

【0052】更に、例えばビジー信号BSY1a及びBS
2a=0で、かつビジー信号BSY 1b又はBSY2b=1
になっている場合は、例えばCPU1a が全負荷の2/
3を負担し、CPU1b が残りの1/3を負担するよう
に変化することが可能である。またビジー信号BSY1b
及びBSY2b=0で、かつビジー信号BSY1a又はBS
2a=1になっている場合は、CPU1b が全負荷の2
/3を負担し、CPU1a が残りの1/3を負担するよ
うに変化することが可能である。
Further, for example, the busy signal BSY1aAnd BS
Y2a= 0 and the busy signal BSY 1bOr BSY2b= 1
If it is, for example, CPU1aIs 2 / of full load
Bear 3 CPU1bBear the remaining 1/3
It is possible to change to. Also busy signal BSY1b
And BSY2b= 0 and the busy signal BSY1aOr BS
Y2aIf = 1 then CPU1bIs full load 2
/ 3, CPU1aWill bear the remaining 1/3
Can change.

【0053】この場合に、CPU1b は自分の負荷が軽
減されると(即ち、内部処理が進むと)プログラムリセ
ット信号PR1bを出力し、FF1023,FF1024をリ
セットする。このリセットは延長信号EXTを出力する
ことなく、直ちに行われる。またCPU1a は自分の負
荷が軽減されるとプログラムリセット信号PR1aを出力
し、FF1021,FF1022をリセットする。いずれの
場合もビジー信号がリセットされれば、負荷分担は公平
の1/2に戻る。
In this case, the CPU 1 b outputs the program reset signal PR 1b when its own load is reduced (that is, when the internal processing proceeds), and resets the FF10 23 and FF10 24 . This reset is performed immediately without outputting the extension signal EXT. Further, the CPU 1 a outputs the program reset signal PR 1a when its own load is reduced, and resets the FF 10 21 and FF 10 22 . In either case, if the busy signal is reset, the load sharing returns to 1/2 of fairness.

【0054】なお、上記のステータスデータを不図示の
ROM等によりエンコードし、その出力で割込制御部2
a ,2b のマスク回路22a,22bのマスクデータを直接
に変更するように構成しても良い。こうすればCPU1
a ,CPU1b 間における負荷分担の同期化制御が簡単
になる。又は、CPU管理部10内に管理専用のCPU
を備え、CPU1a ,CPU1 b に対する負荷分散制御
をよりきめ細かく行うように構成しても良い。
The above status data is not shown in the figure.
Encoded by ROM etc. and output from it interrupt control unit 2
a, 2bMask circuit 22a, 22bMask data directly
It may be configured to change to. This way CPU1
a, CPU1bEasy synchronization control of load sharing between
become. Alternatively, a CPU dedicated for management in the CPU management unit 10
Equipped with CPU1a, CPU1 bLoad balancing control
May be configured to be performed more finely.

【0055】また、上記実施例ではCPU1はマルチプ
ログラミング方式によるものであったが、本発明はシン
グルプログラミング方式のCPUにも適用できる。ま
た、上記本発明に好適なる複数の実施例を述べたが、本
発明思想を逸脱しない範囲内で、構成、組み合わせ及び
制御手順の様々な変更が行えることは言うまでも無い。
Although the CPU 1 is based on the multi-programming system in the above embodiment, the present invention can be applied to a single programming system CPU. Although a plurality of preferred embodiments of the present invention have been described above, it goes without saying that various changes can be made to the configurations, combinations and control procedures without departing from the spirit of the present invention.

【0056】[0056]

【発明の効果】以上述べた如く本発明のCPUの監視及
び負荷制御方式は、上記構成であるので、簡単な構成に
よりCPUの負荷状態や過負状態荷の適正な検出、ひい
ては障害の検出、及び負荷分担の適正な制御を効率的に
行える。
As described above, since the CPU monitoring and load control system of the present invention has the above-mentioned configuration, it is possible to properly detect the load state and overload state load of the CPU by the simple configuration, and to detect the failure. Also, proper control of load sharing can be performed efficiently.

【図面の簡単な説明】[Brief description of drawings]

【図1】図1は本発明の原理を説明する図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】図2は第1実施例の構成を示す図である。FIG. 2 is a diagram showing a configuration of a first embodiment.

【図3】図3は第2実施例の構成を示す図である。FIG. 3 is a diagram showing a configuration of a second embodiment.

【図4】図4は第3実施例の構成を示す図である。FIG. 4 is a diagram showing a configuration of a third embodiment.

【図5】図5は第3実施例のCPU管理部のブロック図
である。
FIG. 5 is a block diagram of a CPU management unit according to the third embodiment.

【符号の説明】[Explanation of symbols]

a ,1b CPU 2a ,2b 割込制御部 3a ,3b 割込発生部 61 〜6n I/O制御部 10 CPU管理部1 a , 1 b CPU 2 a , 2 b Interrupt control unit 3 a , 3 b Interrupt generation unit 6 1 to 6 n I / O control unit 10 CPU management unit

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 複数の外部割込を優先順に受け付けるC
PUの監視方式において、 CPUに対して外部割込を定期的に入力し、その割込要
求から割込受付までの時間を監視することによりCPU
の負荷状態を検出することを特徴とするCPUの監視方
式。
1. A C which accepts a plurality of external interrupts in priority order
In the PU monitoring method, an external interrupt is periodically input to the CPU, and the time from the interrupt request to the interrupt acceptance is monitored to detect the CPU.
CPU monitoring method characterized by detecting the load state of the CPU.
【請求項2】 前記時間が第1の所定時間を超えたこと
によりCPUの過負荷状態を検出することを特徴とする
請求項1のCPUの監視方式。
2. The CPU monitoring method according to claim 1, wherein the CPU overload state is detected when the time exceeds a first predetermined time.
【請求項3】 前記時間が前記第1よりも長い第2の所
定時間を超えたことによりCPUの障害状態を検出する
ことを特徴とする請求項2のCPUの監視方式。
3. The CPU monitoring system according to claim 2, wherein a failure state of the CPU is detected when the time exceeds a second predetermined time which is longer than the first time.
【請求項4】 複数の外部割込を受け付け、その割込ベ
クトルを一旦待ち行列にプールし、優先順に割込処理を
実行するCPUの監視方式において、 CPUに対して外部割込を定期的に入力し、その割込受
付から割込処理実行までの時間を監視することによりC
PUの負荷状態を検出することを特徴とするCPUの監
視方式。
4. A CPU monitoring method for accepting a plurality of external interrupts, temporarily pooling the interrupt vectors, and executing interrupt processing in priority order. C by inputting and monitoring the time from the acceptance of the interrupt to the execution of the interrupt process
A CPU monitoring method characterized by detecting a load state of a PU.
【請求項5】 前記時間が第3の所定時間を超えたこと
によりCPUの過負荷状態を検出することを特徴とする
請求項4のCPUの監視方式。
5. The CPU monitoring system according to claim 4, wherein the CPU overload state is detected when the time exceeds a third predetermined time.
【請求項6】 前記時間が前記第3よりも長い第4の所
定時間を超えたことによりCPUの障害状態を検出する
ことを特徴とする請求項5のCPUの監視方式。
6. The CPU monitoring method according to claim 5, wherein a failure state of the CPU is detected when the time exceeds a fourth predetermined time which is longer than the third time.
【請求項7】 前記所定時間をワンショットマルチバイ
ブレータ回路により生成するように構成したことを特徴
とする請求項2,3又は5,6のCPUの監視方式。
7. The CPU monitoring method according to claim 2, wherein the predetermined time is generated by a one-shot multivibrator circuit.
【請求項8】 前記時間をカウンタにより計数するよう
に構成したことを特徴とする請求項1又は4のCPUの
監視方式。
8. The CPU monitoring method according to claim 1, wherein the time is counted by a counter.
【請求項9】 請求項1乃至6の監視機能を備えるCP
Uを複数備え、これらが共通の負荷を分担すると共に、
何れかのCPUで過負荷状態又は障害状態が検出された
ことにより残りのCPUがその負荷を分担するように構
成したことを特徴とするCPUの負荷制御方式。
9. A CP having the monitoring function according to claim 1.
Multiple U are provided, and these share a common load,
A load control system for a CPU, wherein any one of the CPUs is configured to share the load when an overload condition or a fault condition is detected.
【請求項10】 請求項1乃6の監視機能を一箇所にま
とめ、各時間の監視機能を共通のRAMカウンタにより
構成したことを特徴とする請求項9のCPUの負荷制御
方式。
10. The CPU load control system according to claim 9, wherein the monitoring functions of claim 1 are combined in one place, and the monitoring function of each time is constituted by a common RAM counter.
JP6182352A 1994-08-03 1994-08-03 Monitor and load control system for cpu Withdrawn JPH0844575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6182352A JPH0844575A (en) 1994-08-03 1994-08-03 Monitor and load control system for cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6182352A JPH0844575A (en) 1994-08-03 1994-08-03 Monitor and load control system for cpu

Publications (1)

Publication Number Publication Date
JPH0844575A true JPH0844575A (en) 1996-02-16

Family

ID=16116816

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6182352A Withdrawn JPH0844575A (en) 1994-08-03 1994-08-03 Monitor and load control system for cpu

Country Status (1)

Country Link
JP (1) JPH0844575A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000060963A (en) * 1999-03-22 2000-10-16 김영환 Data transmission automatic breaking method of the digital mobile communication system
JP2011180767A (en) * 2010-02-26 2011-09-15 Kyocera Mita Corp Semiconductor device
CN102207889A (en) * 2010-03-31 2011-10-05 国际商业机器公司 Command control method and command controller
US8191064B2 (en) 2007-07-25 2012-05-29 Lenovo (Beijing) Limited Method and device for scheduling true CPU resources for a virtual machine system
JP2013254333A (en) * 2012-06-06 2013-12-19 Hitachi Ltd Multiple system control system and control method therefor
WO2016017219A1 (en) * 2014-07-31 2016-02-04 三菱電機株式会社 Data processing system, data processing method, and program
CN106649042A (en) * 2016-12-28 2017-05-10 深圳市深信服电子科技有限公司 Processing method and processing device for CPU load information
CN109918223A (en) * 2019-05-06 2019-06-21 深圳市钮为通信技术有限公司 Cpu reset monitoring device
JP2021124910A (en) * 2020-02-04 2021-08-30 株式会社デンソー Electronic control unit

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000060963A (en) * 1999-03-22 2000-10-16 김영환 Data transmission automatic breaking method of the digital mobile communication system
US8191064B2 (en) 2007-07-25 2012-05-29 Lenovo (Beijing) Limited Method and device for scheduling true CPU resources for a virtual machine system
JP2011180767A (en) * 2010-02-26 2011-09-15 Kyocera Mita Corp Semiconductor device
CN102207889A (en) * 2010-03-31 2011-10-05 国际商业机器公司 Command control method and command controller
JP2013254333A (en) * 2012-06-06 2013-12-19 Hitachi Ltd Multiple system control system and control method therefor
WO2016017219A1 (en) * 2014-07-31 2016-02-04 三菱電機株式会社 Data processing system, data processing method, and program
CN106649042A (en) * 2016-12-28 2017-05-10 深圳市深信服电子科技有限公司 Processing method and processing device for CPU load information
CN106649042B (en) * 2016-12-28 2019-08-06 深信服科技股份有限公司 A kind of processing method and processing unit of cpu load information
CN109918223A (en) * 2019-05-06 2019-06-21 深圳市钮为通信技术有限公司 Cpu reset monitoring device
JP2021124910A (en) * 2020-02-04 2021-08-30 株式会社デンソー Electronic control unit

Similar Documents

Publication Publication Date Title
US5974439A (en) Resource sharing between real-time and general purpose programs
US5448732A (en) Multiprocessor system and process synchronization method therefor
US8245236B2 (en) Lock based moving of threads in a shared processor partitioning environment
KR100911796B1 (en) Multi processor and multi thread safe message queue with hardware assistance
US7996843B2 (en) Symmetric multi-processor system
EP0443557B1 (en) Interrupt controller capable of realizing interrupt nesting function
US7103631B1 (en) Symmetric multi-processor system
US20140026143A1 (en) Exclusive access control method and computer product
JPH0844575A (en) Monitor and load control system for cpu
US6990669B1 (en) Real-time scheduler
US6981081B2 (en) Method for SMI arbitration timeliness in a cooperative SMI/driver use mechanism
Zuepke et al. Fast user space priority switching
JPH10320349A (en) Processor and data transfer system using the processor
US20230305872A1 (en) Efficient central processing unit overcommit for virtual machines with symmetric multi-processing
Betti et al. Hard real-time performances in multiprocessor-embedded systems using asmp-linux
US20240231867A9 (en) Paravirtual pause loops in guest user space
US20240134669A1 (en) Paravirtual pause loops in guest user space
JP2000066910A (en) Task scheduling method and recording medium
JPH07244595A (en) Process switch controller and process controlling method
Yan et al. Process Management of Linux in Embedded System Based on Priority-Driven Tactics
CN117453413A (en) Resource application method, device, electronic equipment and storage medium
JPH09223106A (en) Exclusive control system
JPS63118947A (en) Single chip microcomputer
JPS5935454B2 (en) Prioritization method and device
JPH02108149A (en) Exclusive control mechanism for multiprocessor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20011106