JP2525479B2 - Command exclusive control method - Google Patents

Command exclusive control method

Info

Publication number
JP2525479B2
JP2525479B2 JP1152744A JP15274489A JP2525479B2 JP 2525479 B2 JP2525479 B2 JP 2525479B2 JP 1152744 A JP1152744 A JP 1152744A JP 15274489 A JP15274489 A JP 15274489A JP 2525479 B2 JP2525479 B2 JP 2525479B2
Authority
JP
Japan
Prior art keywords
command
control
host device
control table
input
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.)
Expired - Fee Related
Application number
JP1152744A
Other languages
Japanese (ja)
Other versions
JPH0318951A (en
Inventor
智宏 小野
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 JP1152744A priority Critical patent/JP2525479B2/en
Publication of JPH0318951A publication Critical patent/JPH0318951A/en
Application granted granted Critical
Publication of JP2525479B2 publication Critical patent/JP2525479B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術 発明が解決しようとする課題 課題を解決するための手段(第1図) 作用 実施例(第2図〜第5図) 発明の効果 〔概要〕 コマンド排他制御方法に関し、 複数台のホスト装置から入出力コマンドを処理する場
合、マイクロプログラムによる簡単な制御により、入出
力コマンドがどんな異常終了をした場合でも、以後のコ
マンド処理には悪影響を及ぼさないように、コマンド毎
に独立した制御を可能とすることを目的とし、 コマンドの実行制御に必要な管理情報を格納する、コ
マンド制御用テーブルを、ホスト装置の数(N)より1
つ多い領域に分けて設定すると共に、前記各領域のベー
スアドレスを、コマンド受信用領域及び各ホスト装置用
領域に、それぞれ1つずつ対応させてセットし、ホスト
装置からコマンドが発行された場合に、コマンド受信用
領域に用意されているコマンド制御用テーブルのベース
アドレスを用いて、受信したコマンドを格納し、該コマ
ンドの実行時に、ホスト装置に対応させてセットされて
いるベースアドレスと、コマンド受信用としてセットさ
れているベースアドレスとを交換した後に、該コマンド
の実行をするように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Table of Contents] Outline Industrial field of application Conventional technology Problem to be solved by the invention Means for solving the problem (Fig. 1) Action Example (Figs. 2 to 5) EFFECTS OF THE INVENTION [Outline] Regarding a command exclusive control method, when processing an input / output command from a plurality of host devices, even if the input / output command terminates abnormally by a simple control by a microprogram, subsequent command processing is performed. In order to enable independent control for each command so that it will not be adversely affected, the command control table that stores the management information necessary for command execution control is set to the number of host devices (N). Than 1
When the command is issued from the host device, the base address of each region is set in correspondence with the command receiving region and the host device region, respectively. , The received command is stored by using the base address of the command control table prepared in the command receiving area, and the base address set in correspondence with the host device and the command reception when the command is executed After exchanging with the base address set for the purpose, the command is executed.

〔産業上の利用分野〕[Industrial applications]

本発明はコマンド排他制御方法に関し、更に詳しくい
えば、磁気ディスク装置、光ディスク装置、磁気テープ
装置等の入出力機器に対して、データの読み出し、また
は書き込み等を実行するための入出力コマンド処理に利
用するものであり、特に、ファームウェアによる簡単な
制御により、複数のホスト装置から発行される各々のコ
マンドに対して、前回のコマンドで正常終了したか否か
に関係なく、コマンド毎に独立した制御ができるように
したコマンド排他制御方法に関する。
The present invention relates to a command exclusion control method, and more specifically, to an input / output command processing for executing data reading or writing to an input / output device such as a magnetic disk device, an optical disk device, or a magnetic tape device. In particular, the simple control by the firmware enables independent control for each command issued from multiple host devices, regardless of whether the previous command completed normally or not. The present invention relates to a command exclusive control method that enables the.

〔従来の技術〕[Conventional technology]

近年、コンピュータシステムの高性能化と大容量化に
伴い、磁気ディスク装置を中心とした周辺補助記憶装置
は、記憶容量の拡大と小型化および高性能化が求められ
ている。
2. Description of the Related Art In recent years, as the performance and capacity of computer systems have increased, peripheral auxiliary storage devices such as magnetic disk devices have been required to have expanded storage capacity, reduced size, and improved performance.

さらに複数台のホスト装置が磁気ディスク装置等を共
用するようなシステムの場合は、各入出力機器の制御装
置がそれぞれのホスト装置から次々に発行される入出力
コマンドを効率よく、かつ正確に処理する必要がある。
Furthermore, in the case of a system in which multiple host devices share a magnetic disk device, etc., the control device of each input / output device efficiently and accurately processes the input / output commands issued from each host device one after another. There is a need to.

ホスト装置から入出力コマンドを受信し、そのコマン
ドを実行する場合、入出力機器は機械的な動作が必要で
あり、ある程度の時間だけデータ転送等を行わない間バ
スの使用効率を上げるために、そのホスト装置とのバス
の結合状態を一時解除するような機能を備えている。こ
のような入出力機器(制御装置)は、1台のホスト装置
から入出力コマンドを受信し、そのコマンドを実行中に
他のホスト装置から入出力コマンドが発行されると、そ
のコマンドは、前のコマンドを処理中であるために、直
ぐには実行できないことになる。
When receiving an input / output command from the host device and executing the command, the input / output device needs mechanical operation, and in order to improve the bus usage efficiency while not performing data transfer for a certain time, It has a function of temporarily releasing the connection state of the bus with the host device. Such an input / output device (control device) receives an input / output command from one host device, and when an input / output command is issued from another host device while executing the command, the command Because the command of is being processed, it cannot be executed immediately.

この場合、後に発行されたコマンドを受信した時
(イ)、そのコマンドを発行したホスト装置に対して、
直ちにコマンドの実行が開始できない状態であることを
報告して(例えば、BUSYステータスを報告)、そのコマ
ンドの実行を行わないか、または(ロ)、後に受信した
コマンドを一時スタックしておき、前のコマンドの実行
が終了し、終了結果を報告してから実行を開始するよう
に制御していた。
In this case, when the command issued later is received (b), the host device that issued the command
Immediately report that execution of the command cannot be started (for example, report BUSY status), do not execute the command, or (b), temporarily stack the command received later, and The execution of the command was completed, and the execution result was reported before the execution was controlled.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上記のような従来のものにおいては次のような欠点が
あった。即ち、上記(イ)の場合、他のホスト装置に対
する現在実行中の入出力動作がどれだけの間続くのか特
定できない。
The conventional device as described above has the following drawbacks. That is, in the case of the above (a), it is not possible to specify how long the input / output operation currently being executed with respect to another host device continues.

このため、何度もコマンドを発行しなければならなく
なることがあり、このような場合には無駄な処理を行う
ことになる。また、その他のホスト装置のバスの使用を
妨げることになる可能性がある。
Therefore, the command may have to be issued many times, and in such a case, useless processing is performed. It may also hinder the use of the bus of other host devices.

上記(ロ)の場合、後に受信したコマンドをスタック
している時に、先に受信したコマンドの処理が異常終了
した場合、後に受信したコマンドを正常に実行するよう
に制御することが困難な場合がある。
In the case of (b) above, while the command received later is being stacked, if the processing of the command received earlier ends abnormally, it may be difficult to control the command received later to execute normally. is there.

例えば、制御装置は現在入出力コマンドを実行中であ
るかどうか、あるいは入出力コマンド及び、そのコマン
ドの実行を制御するためのフラグや変数を格納するため
の複数のテーブルを制御装置内のRAM上に備えており、
使用中のテーブルを示すためのフラグも備えている。よ
って、コマンド処理が異常終了するケースは非常に多く
の場合があるため、その全ての場合について、そのフラ
グの操作を行う必要がある。
For example, whether the control device is currently executing an input / output command, or a plurality of tables for storing the input / output command and flags and variables for controlling the execution of the command are stored in the RAM in the control device. To prepare for
It also has a flag to indicate which table is in use. Therefore, there are many cases in which command processing ends abnormally, and it is necessary to operate the flag in all cases.

また、数多くある入出力コマンドの異常終了時の処理
が全てのケースにおいて正しく行われたかどうかを確認
することも困難となる。
Also, it is difficult to confirm whether or not the processing at the time of abnormal termination of a large number of input / output commands has been correctly performed in all cases.

結局、複数台のホスト装置が入出力機器を共用するよ
うなシステムの場合、各ホスト装置から発行される入出
力コマンドを実行するため各入出力機器の制御装置で
は、複雑な処理をマイクロプログラムにより制御する場
合が多い。
After all, in the case of a system in which multiple host devices share input / output devices, in order to execute the input / output commands issued from each host device, the control device of each input / output device can perform complicated processing by a microprogram. Often controlled.

したがって、マイクロプログラムにバグ(間違い)が
あり、前記の数多くある入出力コマンドの異常終了の内
の1つでもフラグ操作を誤った場合、入出力装置が常に
動作中となったり、コマンド等を格納するテーブルが常
に使用中になったりする。
Therefore, if there is a bug (error) in the microprogram and the flag operation is wrong even in one of the numerous abnormal terminations of the I / O commands described above, the I / O device will always be in operation, and commands etc. will be stored. The table to be used is always in use.

このため、異常終了したコマンドを発行したホスト装
置だけでなく、他のホスト装置にもこの入出力装置に対
する入出力動作に支障をきたすことになりかねない。
For this reason, not only the host device that issued the abnormally terminated command, but also other host devices may interfere with the input / output operation for this input / output device.

本発明は、このような従来の欠点を解消し、複数台の
ホスト装置から入出力コマンドを処理する場合、マイク
ロプログラムによる簡単な制御により、入出力コマンド
がどんな異常終了をした場合でも、以後のコマンド処理
には悪影響を及ぼさないように、コマンド毎に独立した
制御を可能とすることを目的とする。
The present invention eliminates such a conventional drawback, and when processing an input / output command from a plurality of host devices, even if the input / output command terminates abnormally by simple control by a microprogram, The purpose is to enable independent control for each command so as not to adversely affect the command processing.

〔課題を解決するための手段〕[Means for solving the problem]

第1図は本発明の原理図であり、以下、この図に基づ
いて本発明の原理を説明する。
FIG. 1 is a principle view of the present invention, and the principle of the present invention will be described below based on this figure.

本発明は、共通バスに、1台あるいは複数台のホスト
装置と、1台あるいは複数台の入出力機器とが接続さ
れ、ホスト装置から入出力機器に対して発行される入出
力命令(コマンド)をマイクロプロセッサ及びマイクロ
プログラムにより制御するシステムに適用されるもので
あり、特に、複数台のホスト装置が入出力機器を共用す
る場合に有効である。
According to the present invention, one or a plurality of host devices and one or a plurality of input / output devices are connected to a common bus, and input / output commands (commands) issued from the host devices to the input / output devices. The present invention is applied to a system in which a host computer is controlled by a microprocessor and a microprogram, and is particularly effective when a plurality of host devices share an input / output device.

第1図Aは、上記システムにおける入出力機器に設け
られた制御装置内のRAM領域の説明図である。
FIG. 1A is an explanatory diagram of a RAM area in a control device provided in an input / output device in the above system.

図において、22−2は、コマンド制御用テーブル(RA
M上の領域)であり、それぞれ22−2−1、22−2−
2、22−2−3、…22−2−(N+1)の各領域に分け
てある(この領域は、入出力機器に対してアクセスを行
うホスト装置の数+1の領域がある)。
In the figure, 22-2 is a command control table (RA
22-2-1 and 22-2-, respectively.
, 22-2-3, ..., 22-2- (N + 1) areas (in this area, there are +1 areas of the number of host devices that access the input / output devices).

このコマンド制御用テーブル22−2は、コマンドや、
コマンドの実行制御に必要な変数、制御フラグ、コマン
ドを発行したホスト装置名、コマンドの終了状況(正常
終了か異常終了かの情報)等を格納する。
This command control table 22-2 includes commands and
It stores variables necessary for command execution control, control flags, the name of the host device that issued the command, the end status of the command (information about normal end or abnormal end), and the like.

22−1は、マイクロプロセッサが、上記コマンド制御
用テーブル22−2に対してアクセスを行う場合に使用す
る各コマンド制御用テーブルのベースアドレス(1)、
(2)、(3)…(N+1)を格納するコマンド制御用
テーブルのベースアドレス格納テーブル領域である。
22-1 is a base address (1) of each command control table used by the microprocessor to access the command control table 22-2,
(2), (3) ... (N + 1) is the base address storage table area of the command control table.

この領域は、1つのコマンド受信用領域2−1−1
と、各ホスト装置に対応して1つづつのホスト装置用領
域2−1−2、2−1−3、…2−1−(N+1)とか
ら成っている。
This area is one command receiving area 2-1-1.
And one host device area 2-1-2, 2-1-3, ... 2-1 (N + 1) corresponding to each host device.

第1図Bは、本発明の制御フローチャートを示した図
であり、以下この図に基づき、第1図Aを参照しながら
説明する。
FIG. 1B is a diagram showing a control flow chart of the present invention, which will be described below with reference to FIG. 1A based on this diagram.

先ず、電源投入時に、初期値として、ベースアドレス
格納用テーブル22−1のコマンド受領用及びホスト装置
用の各領域に、コマンド制御用テーブル{22−2−1〜
22−2−(N+1)}のベースアドレス(1)、
(2)、(3)…(N+1)を1つずつ対応させてセッ
トする(イ)。
First, when the power is turned on, the command control tables {22-2-1 to 22-2 to 1 are stored in the base address storage table 22-1 in the command reception and host device areas as initial values.
22-2- (N + 1)} base address (1),
(2), (3) ... (N + 1) are set one by one (a).

次に、制御装置が、ホスト装置の発行した入出力コマ
ンド(入出力命令)を受信すると(ロ)、コマンド受信
時に使用すべきコマンド制御用テーブルの領域を指し示
すデータであるベースアドレスを、ベースアドレス格納
テーブル22−1内のコマンド受信用領域22−1−1から
取り出し、このベースアドレスが指し示すコマンド制御
用テーブルに受信したコマンド等を格納する(ハ)。
Next, when the control device receives the input / output command (input / output command) issued by the host device (b), the base address, which is the data indicating the area of the command control table to be used when the command is received, is changed to the base address. The command is fetched from the command receiving area 22-1-1 in the storage table 22-1, and the received command or the like is stored in the command control table indicated by this base address (c).

次に、ベースアドレス格納テーブル22−1内におい
て、コマンド受信用領域22−1−1にセットされている
ベースアドレスと、そのコマンドを発行したホスト装置
に対応して用意されているホスト装置用領域{22−1−
2〜22−1−(N+1)}のいずれかの領域にセットさ
れているベースアドレスとを交換する(ニ)。
Next, in the base address storage table 22-1, the base address set in the command receiving area 22-1-1 and the host device area prepared corresponding to the host device that issued the command {22-1-
2-22-1- (N + 1)} is exchanged with the base address set in any area (d).

続いて、実行すべきコマンドが格納されている領域を
示すデータ(ベースアドレス)を、コマンド実行に渡
し、コマンド実行部がコマンドを実行する(ホ)。この
場合、コマンド実行部は、ホスト装置から発行されたコ
マンドを解析し、前記コマンドの指示に従って入出力動
作を実行する。例えば、磁気ディスク装置の場合は、リ
ードコマンドであれば、リードコマンドで指定されたタ
ーゲットトラック(目的のトラック)へ磁気ヘッドをシ
ーク(移動)させ、ターゲットセクタをリードした後、
ホスト装置にリードデータを転送する制御を行う。
Then, the data (base address) indicating the area in which the command to be executed is stored is passed to the command execution, and the command execution unit executes the command (e). In this case, the command execution unit analyzes the command issued from the host device and executes the input / output operation according to the instruction of the command. For example, in the case of a magnetic disk device, if it is a read command, the magnetic head is sought (moved) to the target track (target track) specified by the read command, and after reading the target sector,
It controls the transfer of read data to the host device.

以上の制御を繰返し(ロ〜ホ)、各ホスト装置からの
コマンドを処理する。
The above control is repeated (ro-ho) to process the command from each host device.

〔作用〕[Action]

本発明は上記のように構成したので、次のような作用
がある。
Since the present invention is configured as described above, it has the following effects.

コマンドの実行を制御するためのテーブル(コマンド
制御用テーブル)を、ホスト装置の数より1つ多い数だ
け用意し、そのテーブルをアクセスする時に使用する各
テーブル22−2−1〜22−2−(N+1)のベースアド
レスを格納するテーブル(ベースアドレス格納テーブ
ル)を、コマンド受信用及び各ホスト装置に対応させて
保持させている。
The number of tables for controlling command execution (command control table) is set to be one more than the number of host devices, and each table 22-2-1 to 22-2-is used when accessing that table. A table for storing (N + 1) base addresses (base address storage table) is held for command reception and corresponding to each host device.

つまり、各コマンド制御用テーブル22−2−1〜22−
2−(N+1)のベースアドレス(1)〜(N+1)が
常にテーブル22−2−1〜22−2−(N+1)のどれか
にセットされている。
That is, each command control table 22-2-1 to 22-
The base addresses (1) to (N + 1) of 2- (N + 1) are always set in any of the tables 22-2-1 to 22-2- (N + 1).

従って、ホスト装置が発行したコマンド等が格納され
ているコマンド制御用テーブル22−2のベースアドレス
は、対応するベースアドレス格納テーブル22−1にセッ
トされている。
Therefore, the base address of the command control table 22-2 in which the commands issued by the host device are stored is set in the corresponding base address storage table 22-1.

このため、ベースアドレス格納テーブル22−1が指し
示すコマンド制御用テーブル22−2には、対応するホス
ト装置が現在実行中、あるいは実行が終了したコマンド
等が格納されている。
Therefore, the command control table 22-2 pointed to by the base address storage table 22-1 stores the command or the like currently being executed by the corresponding host device, or the command having been executed.

また、コマンド受信用として用意されているテーブル
が指し示すコマンド制御用テーブルには、実行が終了し
たコマンド等が格納されている。
The command control table indicated by the table prepared for command reception stores the commands and the like that have been executed.

即ち、未使用中のコマンド制御用テーブルが常に用意
されていることになるため、ホスト装置からコマンドを
受信した場合に、どのコマンド制御用テーブルが未使用
中なのかを検索することなく、コマンド受信用のベース
アドレス格納テーブル22−1−1からコマンド制御用テ
ーブルのアドレス情報を取り出し、このコマンド情報が
指し示すコマンド制御用テーブルに受信したコマンドを
直ちに格納することができる。
In other words, since the command control table that is not in use is always prepared, when a command is received from the host device, the command reception table is not searched without searching which command control table is in use. It is possible to take out the address information of the command control table from the base address storage table 22-1-1 for use and immediately store the received command in the command control table indicated by this command information.

ところで、従来の装置では、それぞれのコマンド制御
用テーブル毎に使用中かどうかを示すフラグを設け、ホ
スト装置からコマンドを受信した場合には、どのコマン
ド制御用テーブルが未使用中なのかを検索して、未使用
中のコマンド制御用テーブルに受信したコマンドを格納
していた。
By the way, in the conventional device, each command control table is provided with a flag indicating whether it is in use, and when a command is received from the host device, which command control table is not used is searched. Thus, the received command is stored in the unused command control table.

このため、コマンドで指示された入出力処理を実行中
に何らかの異常(機械的な動作を制御中のエラーやホス
ト装置とデータ転送中のエラー等)が発生したコマンド
を異常終了させる場合に、その時使っていたコマンド制
御用テーブルの使用中を示すフラグをリセットする必要
があった。
For this reason, when abnormally ending a command that has occurred during execution of input / output processing instructed by a command (error during control of mechanical operation, error during data transfer with host device, etc.), It was necessary to reset the flag indicating that the command control table used was in use.

しかし、ファームウェアの誤りが原因で、多数存在す
る異常処理の内で一か所でもこのフラグのリセットが行
われなかった場合には、そのコマンド制御用テーブルは
常に使用中になってしまい、再び使用することができな
くなるという問題があった。また、このようなフラグの
誤操作が数回発生すると、新たなコマンドを受信しても
そのコマンドを格納するコマンド制御用テーブルが1つ
も無いという事態になってしまう。
However, due to an error in the firmware, if this flag is not reset even in one of the many abnormal processes, the command control table will always be in use and will not be used again. There was a problem that I could not do it. Further, if such an erroneous operation of the flag occurs several times, even if a new command is received, there is no command control table for storing the command.

これに対して本願発明では、従来の装置で使用されて
いたコマンド制御テーブルの使用状態を示すフラグ等を
設ける必要がなくなり、コマンドの正常終了、或いは異
常終了に関わらず、コマンド制御用テーブルの使用状態
を示すフラグの操作が不要になる。
On the other hand, in the present invention, it is not necessary to provide a flag or the like indicating the usage state of the command control table used in the conventional apparatus, and the command control table is used regardless of whether the command is normally ended or abnormally ended. It is not necessary to operate the flag indicating the state.

ホスト装置は1つのコマンドを発行したら、そのコマ
ンドが終了するまで新たなコマンドを発行することはな
いため、入出力装置は、1つのホスト装置からは1つの
コマンドだけを受け取る機能が必要である。また、入出
力装置が或るホスト装置から発行されたコマンドを実行
中に、他のホスト装置からコマンドが発行された場合に
は、そのコマンドを受信する機能も必要である。
When the host device issues one command, it does not issue a new command until the command is completed. Therefore, the input / output device must have a function of receiving only one command from one host device. Further, when the input / output device is executing a command issued from a certain host device and a command is issued from another host device, a function of receiving the command is also required.

本願発明は、これらの機能を満たし、かつコマンドが
異常終了しても、コマンド制御用テーブルが常に使用中
になる不具合が発生することがないため、コマンドが異
常終了することによって以降のコマンド処理に悪影響を
及ぼすことがない。
The present invention does not cause the problem that the command control table is always in use even if the commands are satisfied and the command ends abnormally. There is no adverse effect.

〔実施例〕〔Example〕

以下、本発明の実施例を図面に基づいて説明する。 Embodiments of the present invention will be described below with reference to the drawings.

第2図は、本発明の1実施例で用いるシステム構成図
である。図において、1−1、1−2、1−3…1−N
は、ホスト装置(中央処理装置等から成る上位コンピュ
ータシステム、2A、2Bは磁気ディスク制御装置、3A、3B
は磁気ディスク装置、4はホスト装置1−1、1−2、
1−3…1−Nと磁気ディスク制御装置2A、2Bとを接続
する上位インターフェイス(共通バス)、5A、5Bは、磁
気ディスク制御装置2Aまたは2Bと、磁気ディスク装置3A
または3Bとを接続する下位インターフェイスを示す。
FIG. 2 is a system configuration diagram used in one embodiment of the present invention. In the figure, 1-1, 1-2, 1-3 ... 1-N
Is a host device (upper computer system including a central processing unit, etc., 2A, 2B are magnetic disk control devices, 3A, 3B
Is a magnetic disk device, 4 is a host device 1-1, 1-2,
1-3 ... 1-N and the magnetic disk control devices 2A and 2B are connected to a higher-level interface (common bus), 5A and 5B, the magnetic disk control device 2A or 2B and the magnetic disk device 3A.
Or it shows the lower interface to connect with 3B.

このシステムは、ホスト装置1−1〜1−Nが上位イ
ンターフェイス4を介して、磁気ディスク制御装置2Aま
たは2Bに入出力コマンドを発行し、磁気ディスク制御装
置2Aまたは2Bは、下位インターフェイス5Aまたは5Bを介
して磁気ディスク装置3Aまたは3Bを制御し、コマンドで
指定された動作を実行する。
In this system, the host devices 1-1 to 1-N issue an input / output command to the magnetic disk control device 2A or 2B via the upper interface 4, and the magnetic disk control device 2A or 2B is connected to the lower interface 5A or 5B. The magnetic disk device 3A or 3B is controlled via the, and the operation specified by the command is executed.

第3図は、磁気ディスク制御装置のブロック図であ
り、第2図に示したシステムに用いる1台の装置を図示
したものである。
FIG. 3 is a block diagram of a magnetic disk control device, and illustrates one device used in the system shown in FIG.

図において、2は磁気ディスク制御装置、3は磁気デ
ィスク装置、4は上位インターフェイス、5は下位イン
ターフェイスを示す。
In the figure, 2 is a magnetic disk control device, 3 is a magnetic disk device, 4 is an upper interface, and 5 is a lower interface.

また、20はMPU(マイクロプロセッサ)、21はROM(読
み出し専用メモリ)、22はRAM、23は上位インターフェ
イス制御部、24は下位インターフェイス制御部、25はデ
ータバッファを示す。
Further, 20 is an MPU (microprocessor), 21 is a ROM (read only memory), 22 is a RAM, 23 is an upper interface control unit, 24 is a lower interface control unit, and 25 is a data buffer.

上記MPU20は、磁気ディスク制御装置内でコマンド処
理等の動作を制御するものであり、ROM21はマイクロプ
ログラムを格納するためのものである。
The MPU 20 controls operations such as command processing in the magnetic disk control device, and the ROM 21 stores micro programs.

RAM22は、MPU20が使用するメモリ、上位インターフェ
イス制御部23は、コマンド受信、実行結果の送出、デー
タ転送、インターフェイスプロトコル制御等を行う。
The RAM 22 is a memory used by the MPU 20, and the upper interface control unit 23 performs command reception, execution result transmission, data transfer, interface protocol control, and the like.

下位インターフェイス制御部24は、データ転送、イン
ターフェイスプロトコル制御等を行い、データバッファ
25は、磁気ディスク装置3とホスト装置との間でデータ
転送を効率良く実行するためのものである。
The lower interface control unit 24 performs data transfer, interface protocol control, etc.
The numeral 25 is for efficiently executing data transfer between the magnetic disk device 3 and the host device.

第4図は第3図に示したRAM内の構成図であり、第1
図Aと同符号は同一のものを示す。
FIG. 4 is a block diagram of the RAM shown in FIG.
The same reference numerals as those in FIG.

RAM22内には、コマンド制御用テーブル22−2と、コ
マンド制御用テーブルのベースアドレス格納テーブル22
−1とを設ける。
The RAM 22 has a command control table 22-2 and a command control table base address storage table 22-2.
-1 and -1 are provided.

コマンド制御用テーブル22−2には、入出力機器に対
してアクセスを行うホスト装置の数Nより1つ多いN+
1個の領域22−2−1〜22−2−(N+1)が設けてあ
り、前記ホスト装置から発行されたコマンドを受信する
際に、前記領域22−2−1〜22−2−(N+1)に対し
て、コマンドや、コマンドの実行制御に必要な変数、制
御フラグ、コマンドを発行したホスト装置名、コマンド
の終了状況(正常終了か異常終了か)等を格納する。
The command control table 22-2 has one more N + than the number N of host devices that access the input / output device.
One area 22-2-1 to 22-2- (N + 1) is provided, and when the command issued from the host device is received, the area 22-2-1 to 22-2- (N + 1) is provided. ), The command, variables necessary for controlling the execution of the command, control flags, the name of the host device that issued the command, the end status of the command (normal end or abnormal end), etc. are stored.

ベースアドレス格納テーブル22−1には、コマンド制
御用テーブル22−2の各領域22−2−1〜22−2−(N
+1)に対応した領域がある。
The base address storage table 22-1 includes areas 22-2-1 to 22-2- (N) of the command control table 22-2.
There is an area corresponding to +1).

この領域は、1つのコマンド受信用領域22−1−1
と、各ホスト装置用領域22−1−2〜22−1−(N+
1)から成り、コマンド制御用テーブル22−2の各領域
22−2−1〜22−2−(N+1)のベースアドレスをそ
れぞれ対応して格納する。
This area is one command receiving area 22-1-1.
And each host device area 22-1-2 to 22-1- (N +
1) and each area of the command control table 22-2
The base addresses of 22-2-1 to 22-2- (N + 1) are stored correspondingly.

第5図は、上記実施例の制御フローチャートであり、
第2図〜第4図を参照しながら説明する。
FIG. 5 is a control flowchart of the above embodiment,
This will be described with reference to FIGS.

先ず、電源投入時ROM21内のマイクロプログラムによ
り初期値を設定する(チ)。これは、RAM22上のベース
アドレス格納テーブル22−1内に設けたコマンド受信用
領域22−1−1とホスト装置用領域22−1−2〜22−1
−(N+1)に、コマンド制御用テーブル22−2内の各
領域22−2−1〜22−2−(N+1)のベースアドレス
を1つずつ対応させてセットすることにより行う。
First, when the power is turned on, an initial value is set by the microprogram in the ROM 21 (h). This is a command receiving area 22-1-1 and host device areas 22-1-2 to 22-1 provided in the base address storage table 22-1 on the RAM 22.
This is performed by setting the base address of each of the areas 22-2-1 to 22-2- (N + 1) in the command control table 22-2 in correspondence with-(N + 1).

次に、受信したコマンドが有する場合は(リ)、コマ
ンド受信用領域22−1−1にセットされているベースア
ドレス(1)を使用して、前記ベースアドレス(1)が
指し示すコマンド制御用テーブル22−2内の領域22−2
−1にコマンド等を格納する(ヌ)。
Next, if the received command has (i), the command control table indicated by the base address (1) is used by using the base address (1) set in the command reception area 22-1-1. Area 22-2
The command and the like are stored in -1 (nu).

そして、受信したコマンドが、そのコマンド処理完了
までにある程度の時間(T時間以上)要するかどうかを
判断する(ル)。
Then, it is determined whether the received command requires a certain time (T time or more) until the command processing is completed (L).

その結果、コマンドの実行に際して、入出力機器(実
施例では磁気ディスク装置3A、3B)に機械的な動作を必
要とする場合など、コマンド処理に上記T時間以上必要
とする場合には、ホストとのバス結合状態を解除して、
コマンド受信用領域22−1−1にセットされているベー
スアドレス(1)と、ホスト装置1−1用領域22−1−
2にセットされているベースアドレス(2)とを交換す
る(オ)。
As a result, when executing the command, if the input / output device (the magnetic disk devices 3A and 3B in the embodiment) requires a mechanical operation, such as when the command processing requires the time T or more, Cancel the bus connection state of
The base address (1) set in the command receiving area 22-1-1 and the host device 1-1 area 22-1-
The base address (2) set to 2 is exchanged (e).

つまり、コマンド受信用領域22−1−1に保持されて
いるアドレスと、ホスト装置1−1用領域22−1−2に
保持されているアドレスを読み出し、次にコマンド受信
用領域22−1−1から読み出したアドレスをホスト装置
1−1用領域22−1−2にセットし、ホスト装置1−1
用領域22−1−2から読み出したアドレスをコマンド受
信用領域22−1−1にセットする。この操作によって、
新たなコマンドを受信する際に使用するコマンド制御用
テーブルが用意されることになる。
That is, the address held in the command receiving area 22-1-1 and the address held in the host device 1-1 area 22-1-2 are read out, and then the command receiving area 22-1-1. 1 is set in the area 22-1-2 for the host device 1-1, and the address read from
The address read from the working area 22-1-2 is set in the command receiving area 22-1-1. By this operation,
A command control table used when receiving a new command is prepared.

T時間以上要するコマンド処理を実行中の場合は、ホ
スト装置とのバスの結合状態を解除するため、他のホス
ト装置がコマンドを発行してくることがある。コマンド
実行中に他のホスト装置からT時間以上要するコマンド
を受信した場合には、そのコマンドを直ちに実行するこ
とができないため、実行中のコマンド処理が完了するま
で待たせておく(スタックする)必要がある。このた
め、T時間以上要するコマンドを受信した時は(ル)、
現在コマンド実行中かどうかを判断する(ワ)。
When a command process requiring more than T time is being executed, another host device may issue a command in order to release the connection state of the bus with the host device. When a command that requires more than T time is received from another host device during command execution, that command cannot be executed immediately, so it is necessary to wait (stack) until the command processing being executed is completed. There is. Therefore, when a command that requires more than T time is received (L),
Judge whether the command is currently being executed (W).

その後、直ちにコマンドの実行ができる場合には
(ワ)、コマンドの実行を開始する(カ)が、現在コマ
ンドを実行中であり、直ちに実行できない場合には、コ
マンドをスタックする(ヨ)。コマンドのスタック時に
は何も操作を行わないが、実行中のコマンド処理が終了
すると、スタックされたコマンドがあるかどうか検索す
る。ここで、いずれかのホスト装置についてまだ未実行
のコマンドが存在した場合は、そのコマンドの実行を開
始する。
After that, if the command can be executed immediately (wa), the command execution is started (f), but if the command is currently being executed and cannot be executed immediately, the command is stacked (yo). Nothing is done when the commands are stacked, but when the command being executed is finished, the command is searched for the stacked commands. If there is an unexecuted command for any of the host devices, execution of that command is started.

また、前記の場合、コマンドの処理時間がT時間より
少ない場合には、現在他のホスト装置からのコマンドを
実行中か否かに関わらず、直ちにコマンドの実行を開始
する。他のホスト装置からのコマンドを実行中に受信し
たコマンドがT時間内で実行できるコマンドである場合
は、現在実行中のコマンドの処理に割り込んで新たなコ
マンドを実行した後、元々実行していたコマンドの処理
を継続する。
Further, in the above case, if the command processing time is less than T time, the command execution is immediately started regardless of whether the command from another host device is currently being executed. If the command received during execution of a command from another host device is a command that can be executed within T time, it is originally executed after interrupting the processing of the command currently being executed and executing a new command. Continue processing the command.

このようなコマンドの実行過程において、最初のコマ
ンドを実行中に、別のホスト装置、例えばホスト装置1
−2からコマンドが発行された場合、コマンド受信要領
域22−1−1にセットされているベースアドレス(2)
を使用してコマンド受信用領域22−1−1内のベースア
ドレス(2)が指し示すコマンド制御用テーブルの領域
22−2−2に受信したコマンド等を格納する。
In the process of executing such a command, while the first command is being executed, another host device, for example, the host device 1
-2, when the command is issued, the base address set in the command reception required area 22-1-1 (2)
Area of the command control table pointed to by the base address (2) in the command reception area 22-1-1 using
The received command etc. is stored in 22-2-2.

受信したコマンドが、そのコマンド処理完了までにあ
る程度の時間を要する場合(T時間以上)は、コマンド
受信用領域22−1−1にセットされているベースアドレ
ス(2)と、ホスト装置1−2用に対応するテーブルの
領域22−1−3にセットされているベースアドレス
(3)を交換してからコマンドの実行を開始またはスタ
ックする。
When the received command requires a certain amount of time to complete the command processing (T time or more), the base address (2) set in the command receiving area 22-1-1 and the host device 1-2 are set. For exchanging the base address (3) set in the area 22-1-3 of the corresponding table for execution, execution or stacking of the command is started.

しかし、そのコマンドが短時間処理可能なコマンドで
あれば、直ちにコマンドの実行を開始する。
However, if the command is a command that can be processed for a short time, execution of the command is immediately started.

以下同様にして、コマンド制御用テーブルのベースア
ドレス(ポインタ)を操作することにより、コマンドの
実行を制御する。
Similarly, the command execution is controlled by operating the base address (pointer) of the command control table.

前記実施例の装置は、SCSIインターフェイスを装備す
る磁気ディスク装置に適用した例であるが、この場合、
同一のホスト装置が複数のコマンドを発行する場合の機
能は定義されていない。従って、前記実施例の装置は、
同一ホスト装置が複数のコマンドを発行する機能(コマ
ンドキューイング機能)には対応できないものである。
すなわち、前記実施例の装置は、同一ホスト装置からの
複数のコマンドをスタックする機能を持たないため、コ
マンドキューイング機能を使用しないシステムでの適用
が可能である。
The device of the above embodiment is an example applied to a magnetic disk device equipped with a SCSI interface. In this case,
The function when the same host device issues multiple commands is not defined. Therefore, the device of the above embodiment is
The same host device cannot support the function of issuing a plurality of commands (command queuing function).
That is, since the device of the above embodiment does not have a function of stacking a plurality of commands from the same host device, it can be applied to a system that does not use the command queuing function.

なお、上記実施例においては、磁気ディスク装置に適
用した例について説明したが、その他、光ディスク装置
や磁気テープ装置等、各種の入出力機器に適用可能であ
る。
In the above embodiment, the example applied to the magnetic disk device has been described, but it is also applicable to various input / output devices such as an optical disk device and a magnetic tape device.

また、ホスト装置は、複数台設けた場合、特に有効で
あるが、1台のホスト装置を有するシステムにも適用可
能である。
Further, when a plurality of host devices are provided, it is particularly effective, but it is also applicable to a system having one host device.

〔発明の効果〕〔The invention's effect〕

以上説明しように、本発明によれば次のような効果が
ある。
As described above, the present invention has the following effects.

複数台のホスト装置から入出力機器を共用するような
システムの場合でも、各ホスト装置から発行される入出
力コマンドを実行する際、マイクロプログラムによる簡
単な制御により、入出力コマンドがどんな異常終了をし
た場合にも、以後のコマンド処理には悪影響を及ぼさな
いよう、コマンド毎に独立した制御ができる。
Even in a system where I / O devices are shared by multiple host devices, when an I / O command issued from each host device is executed, any abnormal termination of the I / O command can be performed by simple control by the microprogram. Even in this case, independent control can be performed for each command so as not to adversely affect the subsequent command processing.

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

第1図は本発明に係るコマンド排他制御方法の原理図、 第2図は本発明の1実施例で使用するシステムの構成
図、 第3図は第2図に示した磁気ディスク制御装置のブロッ
ク図、 第4図は第3図に示したRAM内の構成図、 第5図は本発明の1実施例の制御フローチャートを示し
た図である。 22−2……コマンド制御用テーブル 22−1……コマンド制御用テーブルのベースアドレス格
納テーブル
FIG. 1 is a principle diagram of a command exclusive control method according to the present invention, FIG. 2 is a configuration diagram of a system used in one embodiment of the present invention, and FIG. 3 is a block of the magnetic disk control device shown in FIG. FIG. 4 is a block diagram of the RAM shown in FIG. 3, and FIG. 5 is a control flow chart of one embodiment of the present invention. 22-2 ...... Command control table 22-1 ...... Command control table base address storage table

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】共通バスに結合され、1台あるいは複数台
のホスト装置から発行される入出力機器に対するコマン
ドを、前記入出力機器の制御手段により制御するコマン
ド排他制御方法において、 前記ホスト装置から受信したコマンドや、前記コマンド
の実行制御を行う際に必要なコマンド制御情報を格納す
るコマンド制御用テーブル(22−2)を、前記ホスト装
置の数(N)より1つ多い領域{22−2−1〜22−2−
(N+1)}に分けて設定すると共に、 前記制御手段は、前記コマンド制御用テーブル(22−
2)に対してアクセスを行う場合に使用する前記各領域
{22−2−1〜22−2−(N+1)}のベースアドレス
を、コマンド受信用領域(22−1−1)及び各ホスト装
置用領域{22−1−2〜22−1−(N+1)}に、それ
ぞれ1つずつ対応させてセットし、 前記ホスト装置からコマンドが発行された場合に、コマ
ンド受信用領域(22−1−1)に用意されているコマン
ド制御用テーブルのベースアドレスを用いて、それに対
応するコマンド制御用テーブルの所定の領域に、受信し
たコマンドを格納し、 該コマンドの実行時に、該コマンドを発行したホスト装
置に対応させてセットされているコマンド制御用テーブ
ルのベースアドレスと、このコマンド受信時に使用した
コマンド受信用としてセットされているコマンド制御用
テーブルのベースアドレスとを交換した後に、該コマン
ドを実行することを特徴としたコマンド排他制御方法。
1. A command exclusion control method for controlling a command for an input / output device, which is connected to a common bus and is issued from one or a plurality of host devices, by a control means of the input / output device. The command control table (22-2) for storing the received command and the command control information necessary for controlling the execution of the command is added to the area {22-2 which is one more than the number (N) of the host devices. -1 to 22-2-
(N + 1)}, and the control means sets the command control table (22-
2) the base address of each of the areas {22-2-1 to 22-2- (N + 1)} used when accessing to the command receiving area (22-1-1) and each host device For each of the command areas {22-1-2 to 22-1- (N + 1)}, and when a command is issued from the host device, the command receiving area (22-1- Using the base address of the command control table prepared in 1), the received command is stored in a predetermined area of the corresponding command control table, and the host that issued the command when executing the command The base address of the command control table set corresponding to the device and the base of the command control table set for receiving the command used when receiving this command After exchanging the dress, the command exclusive control method characterized by executing the command.
JP1152744A 1989-06-15 1989-06-15 Command exclusive control method Expired - Fee Related JP2525479B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1152744A JP2525479B2 (en) 1989-06-15 1989-06-15 Command exclusive control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1152744A JP2525479B2 (en) 1989-06-15 1989-06-15 Command exclusive control method

Publications (2)

Publication Number Publication Date
JPH0318951A JPH0318951A (en) 1991-01-28
JP2525479B2 true JP2525479B2 (en) 1996-08-21

Family

ID=15547212

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1152744A Expired - Fee Related JP2525479B2 (en) 1989-06-15 1989-06-15 Command exclusive control method

Country Status (1)

Country Link
JP (1) JP2525479B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4350474B2 (en) * 2003-09-12 2009-10-21 株式会社アドバンテスト Test apparatus and write control circuit

Also Published As

Publication number Publication date
JPH0318951A (en) 1991-01-28

Similar Documents

Publication Publication Date Title
US3725864A (en) Input/output control
EP0558926A1 (en) Efficient channel and control unit for host computer
US5201053A (en) Dynamic polling of devices for nonsynchronous channel connection
JPS6252655A (en) Common interrupt system
US5239646A (en) Data transmission method and data processing system using the same
US4639862A (en) Computer system
JP2550311B2 (en) Multiple control system of magnetic disk
JP2525479B2 (en) Command exclusive control method
US5734918A (en) Computer system with an input/output processor which enables direct file transfers between a storage medium and a network
US5636188A (en) Data transmission circuit for disk storage apparatus
EP0206335B1 (en) Interruption method for a data processing system
JP2755103B2 (en) Storage device access method
JPH03278135A (en) Stack tracing device
JPS58117041A (en) Pattern information storage and control system
JP2808761B2 (en) Command control method for data processing system
JPS6229831B2 (en)
JPS62282347A (en) Error information collecting system
JPH0574863B2 (en)
JPS6226053B2 (en)
JPS5954091A (en) Electronic computer
JPS6182260A (en) Input and output interruption control system
JP2000010899A (en) Input/output processing system and its peripheral device control method, and recording medium where its control program is recorded
JPH01292519A (en) Control system for auxiliary memory
JPH0235546A (en) Control system for writing to auxiliary storage device
JPH0451849B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees