JP3796281B2 - I / O processing method - Google Patents
I / O processing method Download PDFInfo
- Publication number
- JP3796281B2 JP3796281B2 JP25730195A JP25730195A JP3796281B2 JP 3796281 B2 JP3796281 B2 JP 3796281B2 JP 25730195 A JP25730195 A JP 25730195A JP 25730195 A JP25730195 A JP 25730195A JP 3796281 B2 JP3796281 B2 JP 3796281B2
- Authority
- JP
- Japan
- Prior art keywords
- ccw
- dcw
- channel command
- sequence
- command
- 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
Links
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【0001】
【発明の属する技術分野】
本発明はI/O処理方法に係わり、特に特定のチャネル装置のために作成されたチャネルコマンド列(CCW列)を、他のチャネル装置のための別のチャネルコマンド列(DCW列)に変換し、該変換されたチャネルコマンド列(DCW列)を用いて他のチャネル装置が前記特定のチャネル装置と同一のI/O動作を実行するI/O処理方法に関する。
【0002】
【従来の技術】
汎用の計算機のために作成されたチャネルコマンド列(CCW列)を、ワークステーション上のパソコン等のための別のチャネルコマンド列(DCW列)に変換し、該変換されたチャネルコマンド列(DCW列)を用いてパソコンが汎用計算機と同一のI/O動作を実行するシステムがある。図20はかかるシステムの構成図であり、1aは汎用計算機等の第1処理装置、2aは第1処理装置対応に設けた第1チャネル装置、3aは第1チャネル装置に接続された第1のI/O装置、1bはパソコン等の第2処理装置でI/O処理を専用に実行するもの、2bはパソコン用の第2チャネル装置、3bは第2チャネル装置に接続された第2のI/O装置である。4は主記憶装置で、領域5にはI/Oバッファ部5aやチャネルコマンド列(CCW列)を記憶する領域5b設けられている。6はバス線である。領域5に記憶されているチャネルコマンド列(CCW列)は、第1処理装置1aが第1チャネル2aを介してI/O装置3aにアクセスするために作成したものである。
第1、第2処理装置1a,1bは同一の主記憶装置4を共有しているが、第1処理装置は領域5のみをアクセス可能であり、両者は異なるアドレス空間で動作する。
【0003】
ところで、第1チャネル装置2aで動作するチャネルコマンド列(CCW列)と第2チャネル装置2bで動作するチャネルコマンド列(DCW列)は異なる形式を有している。このため、第1チャネル装置2aのために作成されたチャネルコマンド列(CCW列)を第2チャネル装置2bのためのチャネルコマンド列(DCW列)に変換して実行しなければならない。すなわち、第2処理装置1bは、第1処理装置1aが第1チャネル2aを介してI/O装置3aにアクセスするために作成したチャネルコマンド列(CCW列)を、第2処理装置1bが第2チャネル装置2bを介してI/O装置3bにアクセスするためのコマンド列(DCW列)に変換し、該DCW列に基づいて第1処理装置と同様のI/O動作を実行する。
【0004】
【発明が解決しようとする課題】
特定のチャネルを想定したチャネルコマンド(CCW列)を他のチャネル上で実行する方法としては、特開平7-44324号公報及び特開平1-293455号公報に開示されているものがある。
特開平7-44324号公報に開示されている方法は、ソフトあるいはI/O制御装置が与えられたCCW列上のCCWを1個づつ変換しながらI/O処理を実行するもので、実行時のオーバヘッドが大きい。このため、十分なI/O性能を得るためには巨大なディスクキャッシュを主記憶上に持たなければならない問題がある。
特開平1-293455号公報に開示されている方法は、静的にCCW列を変換するものであるが、変換対象CCW列が限定されており、分岐、ループを伴うような複雑なCCW列に対しては、十分に変換を行えない問題がある。
又、変換対象CCWが異常なものであった場合、異常CCWまでは正常に実行し、異常CCWについて適切なエラー報告をしなければならないが、従来の方法では適切なエラー報告ができない問題がある。
更に、CCW列の中には、外部装置に格納されたCCW列を後続するCCW列として使用する場合があるが、従来方法はこれに対応できない問題がある。
又、CCW列の中には実行の途中でソフト(OS)によりCCW列の変更を行わせる場合があるが、かかる場合にも従来方法は対応できない問題がある。
【0005】
以上から、本発明の目的は、CCW列の変換を最初に一括して行うことにより、実行時のオーバヘッドを削減でき、十分なI/O処理性能を発揮できるI/O処理方法を提供することである。
本発明の別の目的は、分岐、ループを伴うような複雑なCCW列に対しても変換が行えるI/O処理方法を提供することである。
本発明の更に別の目的は、変換対象CCWが異常なものであった場合、異常CCWまで正常に実行し、異常CCWについて適切なエラー報告ができるI/O処理方法を提供することである。
本発明の他の目的は、外部装置に格納されたCCW列を後続するCCW列として使用する場合であっても、変換及び実行が可能なI/O処理方法を提供することである。
本発明の更に他の目的は、実行の途中でソフト(OS)によりCCW列の変更を行わせる場合であっても、変換及び実行が可能なI/O処理方法を提供することである。
【0006】
【課題を解決するための手段】
図1は本発明の原理説明図である。(a)において、12はチャネルコマンド列(CCW列)を別のチャネルコマンド列(DCW列)に変換するCCW変換部、13はチャネルコマンドCCWのアドレスと変換されたチャネルコマンドDCWのアドレスとの対応を記憶するCCW・DCW対応テーブル、21は主記憶装置であり、CCW列及び変換により得られたDCW列が記憶される。
CCW変換部12は、一括変換に際して、CCWのアドレスと変換されたDCWのアドレスとの対応をCCW・DCW対応テーブル13に記憶する。CCW変換部12は、(b)に示すように変換すべきCCWが単純なジャンプコマンド(分岐コマンド)J1,J2の場合、分岐先CCW列▲2▼が既に変換済みであるか否かをCCW・DCW対応テーブル13をサーチして判断し、変換済みでない場合には(J1の場合)、分岐CCW(J1)を変換することなく分岐先CCW以降のCCW列▲2▼をDCW列▲2▼に変換する。一方、変換済みの場合(J2の場合)には、分岐先CCWに対応するDCW(DCW列▲2▼の先頭)に分岐するDCWを作成する。
【0007】
CCWが(c)に示すように条件つきジャンプコマンド(分岐CCW)SKの場合、該分岐CCWを分岐先アドレスが未定の分岐DCW(SK′)に変換し、ついで、条件が不成立の場合におけるCCW列▲2▼をDCW列に変換する。しかる後、条件成立の場合における分岐先CCW列▲3▼が既に変換済みであるか否かをCCW・DCW対応テーブル13をサーチして判断し、変換済みでない場合には、前記分岐DCWの分岐先アドレスを次のDCWを格納するアドレスとし、以後、分岐先CCW以降のCCW列▲3▼をDCW列▲3▼に変換する。又、分岐先CCW列▲3▼が既に変換済みの場合には該分岐先CCWに対応する分岐先DCWに分岐するように前記分岐DCWの分岐先アドレスを決定する。
以上のようにすれば、CCW列を、内部に分岐が存在しない一連のCCWの集まりであるCCW群に分割して変換を行い、又、CCWのアドレスと変換されたDCWのアドレスとの対応をCCW・DCW対応テーブルで管理し、該テーブルを参照して分岐コマンド、ジャンプコマンドを適切に変換処理するようにしたから、分岐、ループを伴うような複雑なCCW列に対しても効率良く変換を行って実行することができる。・・・請求項1
【0008】
CCW変換部12は、一括変換時に、異常CCWが検出された時、直前のCCWに対応するDCWのチェインビットをオフすると共に、CCW・DCW対応テーブル13においてDCWアドレスに応じたエラーフラグビットをオンする。そして、一括変換により得られたDCWの実行時、チェインビットのオフによりDCWの実行が停止した時、CCW・DCW対応テーブル13を参照してエラーフラグビットがオンしているかチェックし、オンしている場合には、次のCCW(異常CCWである)を読み出してチェック後、異常終了の割込みを発生する。このようにすれば、変換対象CCWが異常なものであった場合、異常CCWまで正常に実行し、異常CCWについて適切なエラー報告ができる。・・・請求項2
【0009】
CCW・DCW対応テーブル13に、リードコマンドのデータ入力領域の先頭アドレスとデータ長を記憶する欄を設ける。CCW変換部12は、一括変換に際して、CCWがリードコマンドの場合には該テーブル13にデータ入力領域の先頭アドレスとデータ長を記憶すると共に、以降のCCWのアドレスが前記テーブルに記憶されているデータ領域内に存在するか判断する。存在する場合は、該CCWは外部装置より読み込んだCCWであると判定し、前記データ領域をデータ入力領域とするリードコマンド(CCW)に対応するDCWにフラグをセットする。そして、一括変換により得られたDCW列の実行時、前記フラグが検出された時、該フラグ付きのDCW(リードコマンド)により外部装置より前記データ領域に読み込んだCCW列を、順次別のDCW列に変換し、変換後、該DCW列を実行する。このようにすれば、外部装置に格納されたCCW列を後続するCCW列として使用する場合であっても、変換及び実行できる。・・・請求項3
【0010】
所定のCCWにフラグをセットしておき、CCW変換部12は、一括変換時に該CCWに応じたDCWにフラグをセットする。そして、一括変換により得られたDCWの実行時に、前記フラグが検出された時、該検出をオペレーションシステムOSに通知する。しかる後、一定間隔で一括変換時におけるCCW列と現在のCCW列を比較し、変更CCWが存在する場合には、該変更CCWをDCWに再変換する。このようにすれば、実行の途中でソフト(OS)によりCCW列の変更を行う場合であっても、変更通りに正しくCCW列をDCW列に変換して実行することができる。・・・請求項4
以上のように、本発明においては、CCW列の変換を最初に一括して行うことにより、実行時のオーバヘッドを削減でき、十分なI/O処理性能を発揮することができる。
【0011】
【発明の実施の形態】
(a)本発明の構成
図2は本発明の概略構成図であり、10はチャネルコマンド列(CCW列)を別のチャネルコマンド列(DCW列)に変換するCCW変換機構、20は第1チャネル装置、30は第2チャネル装置、40は入出力動作終了時における割込み処理部である。図3はCCWの説明図であり、READ,WRITE,TRANSFER IN CHANNEL等のコマンドコードCM、入出力データ領域の先頭アドレスDAD、細かな指示を与えるフラグFG、データのバイト数(データ長)DLを備えている。図4は入出力割込み時に設定されるチャネルステータスワードCSWの説明図であり、プロテクションキーK、直前に実行したコマンドアドレスCAD、入出力装置の状態を示すI/OステータスIST、チャネルの状態を示すチャネルステータスCST、異常終了時において未処理(残っている)データのバイト数DTを備えている。
【0012】
図5はCCW変換機構10におけるCCW→DCW変換の説明図である。CCW→DCW変換において、▲1▼CCWのデータサイズDLはそのままDCWにおいて使用することができる。▲2▼CCW、DCWのコマンドは1:1に対応しており、コマンド変換テーブルによりCCWのコマンドCMをDCWのコマンドに変換することができる。▲3▼CCWの先頭アドレスは物理アドレスの場合と論理アドレスの場合があり、物理アドレスの場合にはそのままDCWにおいて使用することができるが、論理アドレスの場合には、動的アドレス変換機構DATにより論理アドレス(CCWアドレス)→物理アドレス(DCWアドレス)に変換を行うことにより得ることができる。
【0013】
図6は割込み処理部40におけるDSW→CSW変換説明図であり、第2チャネル装置30より入力されたチャネルステータスワードDSWをOSが認識できるチャネルステータスワードCSWに変換する場合の説明図である。DSW→CSW変換において、▲1▼DSWのチャネルステータスCST、I/OステータスIST、残りバイト数DTはそのままCSWにおいて使用することができる。▲2▼直前に実行したコマンドアドレス(DCWアドレス)はCCWアドレスに変換する必要がある。変換は、CCW変換機構10に設けられている後述のCCW・DCW対応テーブルより求めることができる。
【0014】
図7はCCW変換機構11の構成図である。12はチャネルコマンド列(CCW列)を別のチャネルコマンド列(DCW列)に変換するCCW変換部、13はは、▲1▼CCWのアドレスと▲2▼該CCWを変換することにより得られたDCWのアドレスと▲3▼各種フラグFlagの対応を記憶するCCW・DCW対応テーブル、14は機種と該機種におけるスキップコマンドの対応を記憶するスキップコマンド一覧テーブルである。
CCW変換部12において、12aはCCW・DCW変換制御部、12bは動的アドレス変換機構(DAT)、12cはDCW組立て部である。CCW・DCW変換制御部12aは、▲1▼主記憶装置(図示せず)の所定のCCWアドレスよりCCWを読み出し、▲2▼該読み出したCCWをコマンドコードCM、データアドレスDAD、フラグFG、データバイト数DLに分解し、▲3▼データアドレスDADを動的アドレス変換機構12bに入力し、▲4▼コマンドコードを内蔵のコマンドコード変換部で変換すると共に、必要に応じて所定のフラグをオン・オフセットし、▲5▼得られたコマンドコード、フラグ、データバイト数をDCW組立て部12cに入力する。又、CCW・DCW変換制御部12aは、▲6▼CCW・DCW対応テーブル13の更新、参照、▲7▼その他後述する種々の制御を実行する。
【0015】
動的アドレス変換機構12bは、入力されたCCWのデータアドレス(先頭アドレス)をDCWのデータアドレス(先頭アドレス)に動的に変換し、得られたDCWのデータアドレス(先頭アドレス)をDCW組立て部12cに入力する。DCW組立て部12cは入力されたコマンドコード、データサイズ、フラグ、データアドレスを用いてDCWを組立て、主記憶装置の所定のアドレス(DCWアドレス)に格納する。尚、CCW・DCW変換制御部12aは、CCWを読み出したCCWアドレスとDCWを記憶するDCWアドレスとの対応及びフラグをCCW・DCW対応テーブル13に記憶する。
【0016】
(b)分岐コマンドを含む場合の変換処理
与えられたCCW列が分岐やジャンプによるループ等がない単純なものである場合は、その変換方法は容易に考えることが可能である。だが、分岐等があるCCW列では、分岐先CCW列が変換後のDCW列上でいずれのDCWに対応するかを検出し、DCW上の分岐コマンド上に記述しなければならない。
図8及び図9は分岐コマンドを含む場合におけるCCW→DCW変換処理のフローである。
チャネルアドレスワードCAWの指定する主記憶装置より先頭のCCWを読み取り(ステップ101)、該CCWが単純なジャンコマンド(TIC)であるかチェックし(ステップ102)、ジャンプコマンドでなければ、条件つきジャンコマンド(スキップコマンド)であるかチェックする(ステップ103)。尚、機種とスキップコマンドの対応はテーブル14に登録されているから、該テーブルを参照してスキップコマンドの判別を行う。
【0017】
スキップコマンドでなければ、CCW→DCW変換を行うと共に、CCWアドレスとDCWアドレスの対応をテーブル13に記憶する(ステップ104)。しかる後、全CCW列の変換が終了したかチェックし(ステップ105)、終了してなければ、次のCCWをCCWアドレスより読み取り(ステップ106)、ステップ102以降の処理を行う。一方、全CCWのDCWへの変換が終了すれば、第2チャネル装置30は順次DCWを実行し(ステップ107,108)、全DCWの実行終了によりDSWを割込み処理部40に入力する。割込み処理部40はDSWをCSWに変換して上位装置(OS)に入出力割込みを掛け(ステップ109)、入出力動作を終了する。。
【0018】
一方、ステップ102において、CCWが単純なジャンプコマンドの場合には、分岐先CCWが既に変換済みであるか否かをCCW・DCW対応テーブル13をサーチして判断する(ステップ110)。すなわち、分岐先CCWが変換済みの場合には、該分岐先CCWのCCWアドレスがCCW・DCW対応テーブル13に記憶されるから、該テーブル13に分岐先CCWアドレスが存在するか調べ、存在する場合には変換済みであると判定し、存在しない場合には変換済みでないと判定する。変換済みの場合には分岐先CCWに対応する分岐先DCWに分岐するようにDCWを作成し(ステップ111)、変換済みでない場合には該分岐先CCW以降のCCW列をDCW列に変換する(ステップ112)。しかる後、ステップ105以降の処理を行う。
【0019】
図10は単純ジャンプコマンドの場合におけるCCW→DCW変換説明図である。図10に示すようにCCW列▲1▼,▲2▼の後のCCWが単純なジャンプコマンド(TIC)J1,J2の場合、分岐先CCW列▲2▼が既に変換済みであるか否かをCCW・DCW対応テーブル13をサーチして判断し、変換済みでない場合には(J1の場合)、分岐CCWをDCWに変換することなく分岐先CCW列▲2▼をDCW列▲2▼に変換する。一方、変換済みの場合(J2の場合)には、分岐先CCWに対応するDCW(DCW列▲2▼の先頭)に分岐するDCWを作成する。
【0020】
又、ステップ103において、CCWがスキップコマンド(分岐CCW)の場合には、該分岐CCWを分岐先アドレスが未定の分岐DCWに変換する(ステップ113)。ついで、分岐条件が不成立の場合におけるCCW列をDCW列に変換する(ステップ114,115)。
しかる後、条件成立の場合における分岐先CCWが既に変換済みであるか否かをCCW・DCW対応テーブル13をサーチして判断する(ステップ116)。変換済みの場合には該分岐先CCWに対応する分岐先DCWに分岐するように前記ステップ113における分岐DCWの分岐先アドレスを決定して埋め込み(ステップ117)、以後ステップ105以降の処理を行う。一方、変換済みでない場合には、前記ステップ113における分岐DCWの分岐先アドレスを次のDCWの格納アドレスする。ついで、分岐先CCW以降のCCW列をDCW列に変換し、ステップ105以降の処理を行う。
【0021】
図11はスキップコマンドの場合におけるCCW→DCW変換説明図である。図11に示すよう条件コマンドCKの後のコマンドSKがスキップコマンド(分岐CCW)の場合、該分岐CCWを分岐先アドレスが未定の分岐DCW(SK′)に変換し、ついで、条件が不成立の場合におけるCCW列▲2▼をDCW列▲2▼に変換する。しかる後、条件成立の場合における分岐先CCW列▲3▼が既に変換済みであるか否かをCCW・DCW対応テーブル13をサーチして判断し、変換済みでない場合には、前記分岐DCW(SK′)の分岐先アドレスを次のDCWを格納するアドレスとし、以後、分岐先CCW列▲3▼をDCW列▲3▼に変換する。又、分岐先CCW列▲3▼が既に変換済みの場合には該分岐先CCWに対応する分岐先DCWに分岐するように前記分岐DCW(SK′)の分岐先アドレスを決定する。
【0022】
以上、CCW列を、内部に分岐が存在しない一連のCCWの集まりであるCCW群に分割して変換を行い、又、CCWのアドレスと変換されたDCWのアドレスとの対応をCCW・DCW対応テーブルで管理し、該テーブルを参照して分岐コマンド、ジャンプコマンドを適切に変換処理するから、分岐、ジャンプによるループを伴うような複雑なCCW列に対しても効率良く変換を行って実行することができる。
【0023】
(c)CCWに異常CCWが存在する場合の処理
変換対象CCWが異常なものであった場合、異常CCWの直前までは正常に実行し、異常CCWについては適切なエラー報告をしなければならない。
図12はCCWに異常CCWが存在する場合のCCW→DCW変換処理の説明図、図13はCCWに異常CCWが存在する場合のDCW実行処理の説明図である。
CCWを主記憶装置の所定のCCWアドレスより読み取り(ステップ201)、該CCWが異常CCWかチェックする(ステップ202)。なお、CCWはフォーマットエラー、未定義コード使用、文法エラー等が検出された場合、異常CCWである。
異常CCWでなければ、CCW→DCWの変換を実行し(ステップ203)、ついで、全CCW列について変換したかチェックし(ステップ204)、変換してなければステップ201以降の処理を繰返す。
【0024】
一方、ステップ202において、異常CCWの場合には、直前のCCWに対応するDCWのチェインビットをオフすると共に(ステップ205)、CCW・DCW対応テーブル13において該CCW、DCWのアドレスに対応するフラグ(エラーフラグビット)をオンする(ステップ206)。尚、DCW実行時にチェインビットがオン(”1”)の場合には次のDCWを実行し、チェインビットがオフ(”0”)の場合には次のDCWの実行を中止する。
ついで、異常CCW以降のCCW列の変換を打切る。そして、異常CCW以前に分岐CCW(スキップコマンド)の分岐先CCW列で変換をしてないものが存在するかチェックし(ステップ207)、存在しなければ変換処理を終了し、存在すれば、分岐先CCW列を読み取り(ステップ208)、以後、ステップ202以降の変換処理を実行する。
【0025】
CCW列変換終了後、DCWを読み取って実行する(ステップ301)。実行後、チェインビットがオフかチェックし(ステップ302)、オフでなければ、全DCWの実行が終了したかチェックし(ステップ303)、終了してなければステップ301に戻り次のDCWを実行する。
一方、チェインビットがオフあるいは、全DCWの実行が終了すれば、その時のDCWアドレスに対応するエラーフラグをCCW・DCW対応テーブル13より求め、エラーフラグビット=”1”かチェックする(ステップ304)。
エラーフラグビット=”0”の場合には、正常終了報告を出力し(ステップ305)、エラーフラグビット=”1”の場合には、次のCCW(異常CCWである)を主記憶装置より読み出してチェック後、異常終了の割込みによりエラー報告する(ステップ307)。
以上により、変換対象CCWが異常なものであった場合、異常CCWまで正常に実行し、異常CCWについて適切なエラー報告をすることができる。
【0026】
(d)CCW列が外部装置に格納されている場合の処理
CCW列の中には、磁気ディスク装置等の外部装置に格納されたCCW列を後続するCCW列として使用するようなものがある。図14はかかる場合の説明図であり、21は主記憶装置、50は磁気ディスク装置である。主記憶装置21には、CCW列▲1▼、磁気ディスク装置よりデータ(実はCCW列)を読み出すリードコマンド(RD α L)、CCW列▲2▼がそれぞれ格納されている。又、磁気ディスク装置50には、上記リードコマンドにより読み取られるCCW列▲2▼が記憶されている。このように外部装置にCCW列が記憶されている場合、CCW列は以下のように実行される。すなわち、まず、CCW列▲1▼を実行し、ついで、リードコマンドにより磁気ディスク装置50よりCCW列▲2▼を主記憶装置21に読み込み、しかる後、CCW列▲2▼を実行し、最後にCCW列▲3▼を実行する。従って、CCW列をDCW列に変換した場合、上記と同様の順序でDCW列を実行するようにしなければならない。
【0027】
ところで、本発明のように、CCW列を一括変換する方式では、変換後のDCW列により外部装置より読み出したCCW列は最初のCCW→DCW変換時には変換がされていない。このため、外部装置よりCCW列を読み出した後に再度、CCW列の変換を行うようにしなければならない。更に、いずれのCCWがCCWの変更を行うものであるか、変更されたCCWはいずれのものであるかを知る手段が必要である。
【0028】
そこで、図15に示すように、CCW・DCW対応テーブル13に、リードコマンド(CCW)のデータ入力領域の先頭アドレスαとデータ長Lを記憶する欄を設ける。そして、CCW変換部12はCCWがリードコマンドの場合、CCW・DCW対応テーブル13にCCWアドレス、DCWアドレスと共に該リードコマンド(CCW)のデータ入力領域の先頭アドレスαとデータ長Lを記入する。かかる状態において、以降のCCWのCCWアドレスが上記領域に含まれているならば、その領域をデータ入力領域とするリードコマンド(CCW)を変換して得られたDCWによってCCWの書替えが行われる。このため、該DCW上のPCIフラグをセットし、CCWの変更が行われることをCCW変換機構が検出可能にする。すなわち、最初に各CCWを変換する際、変換対象のCCWが変換済みCCWのデータ領域に含まれているか否かをチェックし、含まれているならば該変換対象CCWは変換済みCCWの実行によって書き替えられるため、該変換済みCCWに対応するDCWのPCIフラグをセットする。
【0029】
そして、DCW列実行時にPCI割込みが発生すると、CCW変換機構11はPCI割込みを通知したDCWアドレスによってCCW・DCW対応テーブル13をサーチし、書替えが行われた領域を検出し、対応するCCW列を読み出して再変換し、再変換したDCWを実行する。
【0030】
図16はCCW列が外部装置に格納されている場合のCCW→DCW変換処理フローである。
所定のCCWアドレスよりCCWを読み込み(ステップ401)、該CCWがリードコマンドであるかチェックする(ステップ402)。リードコマンドでなければ、該CCWアドレスがCCW・DCW対応テーブル13に格納されているデータ領域内に存在するかチェックし(ステップ403)、存在しなければ、CCW→DCW変換を行うと共に、CCWアドレス、DCWアドレスの対応をCCW・DCW対応テーブル13に記入する(ステップ404)。ついで、全CCWをDCWに変換したかチェックし(ステップ405)、変換が終了してなければ、ステップ401に戻り以降のCCWについてステップ401以降の処理を実行し、変換が終了していれば、CCW→DCW変換処理を終了する。
【0031】
一方、ステップ402において、CCWがリードコマンドであれば、CCW→DCW変換を行うと共に、CCWアドレス、DCWアドレス及びリードコマンドの先頭アドレスα、データ長LをCCW・DCW対応テーブル13に記入し(ステップ406)、以後、ステップ405以降の処理を実行する。
又、ステップ403において、CCWアドレスがCCW・DCW対応テーブル13に格納されているデータ領域内に存在すれば、CCWは外部装置より主記憶装置に読み込んであるCCWであると判定し、前記データ領域をデータ入力領域とするリードコマンド(CCW)を変換して得られたDCWにPCIフラグをセットする(ステップ406)。
ついで、該CCWをDCWに変換すると共に、以降のCCW列をDCW列に変換し(ステップ407、408)、変換処理を終了する。
【0032】
図17はCCW列が外部装置に格納されている場合のDCW実行処理フローである。
DCWを読み取って実行すると共に(ステップ501)、該DCWのPCIフラグがセットされているか(”1”であるか)チェックする(ステップ502)。PCIフラグがセットされていなければ、全DCWを実行したかチェックする(ステップ503)。全DCWの実行が終了してなければ、ステップ501に戻り以降のDCW実行処理を繰返し、全DCWの実行が終了すれば、DSWを作成して割込み処理部40に入力してI/O処理を終了する(ステップ504)。
【0033】
一方、ステップ502において、PCIフラグがセットされている場合には、PCI割込みを発生する(ステップ505)。これにより、CCW変換部12は現DCWアドレスに対応するデータ領域をCCW・DCW対応テーブル13より求め(ステップ506)、該データ領域よりCCW列(外部装置より読み込んだCCW列)を順次読み取ってCCW→DCW変換を行う(ステップ507,508)。
外部装置より読み込んだCCW列のCCW→DCW変換が終了すれば、再変換したDCW列を順次実行する(ステップ509)。DCW列の実行終了後、ステップ503において全DCWを実行したかチェックし、以降の処理を行う。
以上のようにすれば、CCW列の中に外部装置に格納されたCCW列を後続するCCW列として使用する場合であっても、正しくCCW→DCW変換を行って実行することができる。
【0034】
ところで、PCI割込みが遅れたり、再変換処理に時間を要した場合、再変換終了より以前に、変更対象DCWが実行される可能性がある。この場合、変換前のDCWは本来実行すべきものではなく、予期しない動作が行われてしまう。そこで、変更対象のDCWは、ステップ407において先頭DCWをNOP(NO Operation)にすると共に、チェインビットフラグをオフすることにより、変更前DCWの実行によって弊害が生じないようにする。さらに、該NOPコマンドに対応するCCW・DCW対応テーブル13上の動的変更ビットを立てる(”1”にする)ことで、動的変更の遅延によってDCW実行が終了したことを検出可能にする。
上記のように、CCWの動的変更の遅れによってDCWの実行が終了した場合、通常は動的変更が終了すると、変更を行ったDCWより処理を再開する。しかし、場合によっては、オリエンテーションが崩れているため、予期しない動作が行われる可能性がある。そこで、CCW変換部は、以前のCCWをチェックし、該CCWより実行を再開すれば問題となる可能性がある場合は、先頭DCWより再度、実行を行わせる。この場合、CCWの動的変更、再変換は既に終了しているため、処理再開前に、変更を行うDCWのPCIフラグ並びに対応するCCW・DCW対応テーブル上の動的変更ビットをオフする。
【0035】
(e)ソフトによるCCW変更があった場合の処理
CCW列の中には、実行の途中でソフトにPCI(Program Controlled Interrupt)を通知し、ソフトにCCWの変更を行わせるようなものがある。この場合、いずれのCCWがどのタイミングで変換されたかが、CCW変換部では認識することができない。そこで、ソフト(OS)へのPCI報告後、一定時間ごとに変換時のCCW列と最新のCCW列を照合比較し、CCW変更の有無をチェックする。変更が確認された場合は変更CCWを再変換する。
図18はソフトによるCCW変更がある場合のCCW→DCW変換処理フローである。尚、所定のCCWには、該CCWまでの実行終了をソフトに通知するためにPCIフラグがセットされている。このPCIを報告されるとソフトはCCWを変更する。
【0036】
まず、CCWアドレスよりCCWを読み取り(ステップ601)、該CCWのPCIフラグがセットされているかチェックする(ステップ602)。PCIフラグがセットされていなければ、該CCWをDCWに変換すると共にCCWアドレス、DCWアドレスをCCW・DCW対応テーブル13に記入する(ステップ603)。以後、全CCWの変換が終了したかチェックし(ステップ604)、変換が終わってなければ、ステップ602に戻り以降のCCWの変換を行う。
一方、ステップ602において、CCWのPCIフラグがセットされていれば、CCW→DCW変換すると共にDCWのPCIフラグをセットする(ステップ605)。又、CCWアドレス、DCWアドレスをCCW・DCW対応テーブル13に記入すると共に、これらアドレスに対応するフラグ上のPCIビットをセット子(ステップ606)、以後ステップ604以降の処理を実行する。
【0037】
図19はソフトによるCCW変更がある場合のDCW実行処理フローである。DCWを読み取って実行すると共に(ステップ701)、該DCWのPCIフラグがセットされているかチェックし(ステップ702)、セットされていれば、CCW変換部12を介してソフト(OS)にPCI通知を行う(ステップ703)。しかる後、あるいはステップ702において、PCIフラグがセットされていない場合には、全DCWの実行が終了したかチェックする(ステップ704)。全DCWの実行が終了すれば、実行処理を終える。しかし、全DCWの実行が終了してなければ、保持しているCCW→DCW変換時のCCW列と現在のCCW列との比較が必要であるかチェックする(ステップ705)。PCIが検出されず、PCI通知をしてなければ、比較する必要はなく、以後ステップ701以降の処理を実行する。
【0038】
一方、PCI通知をしており、比較する必要がある場合には、定期的に変換時のCCW列と現在のCCW列との比較を行う(ステップ706)。比較の結果、不一致のCCWがあったか調べ(ステップ707)、なければステップ701以降の処理を行い、不一致のCCWが存在すれば、ソフトによりCCWが変更されたものであるから、該変更CCWをDCWに再変換し(ステップ708)、以後、ステップ701以降の処理を実行する。
以上のようにすれば、実行の途中でソフト(OS)によりCCW列の変更を行う場合であっても、変更通りに正しくCCW列をDCW列に変換して実行することができる。
以上、本発明を実施例により説明したが、本発明は請求の範囲に記載した本発明の主旨に従い種々の変形が可能であり、本発明はこれらを排除するものではない。
【0039】
【発明の効果】
以上本発明によれば、CCW列の変換を最初に一括して行うことにより、実行時のオーバヘッドを削減でき、十分なI/O処理性能を発揮することができる。
又、本発明によれば、CCW列を、内部に分岐が存在しない一連のCCWの集まりであるCCW群に分割して変換を行い、又、CCWのアドレスと変換されたDCWのアドレスとの対応をCCW・DCW対応テーブルで管理し、該テーブルを参照して分岐コマンド、ジャンプコマンドを適切に変換処理するようにしたから、分岐、ループを伴うような複雑なCCW列に対しても効率良く変換を行って実行することができる。
【0040】
更に本発明によれば、変換対象CCWが異常なものであった場合、異常CCWまで正常に実行し、異常CCWについて適切なエラー報告ができる。
又、本発明によれば、外部装置に格納されたCCW列を後続するCCW列として使用する場合であっても、変換及び実行ができる。
更に、本発明によれば、実行の途中でソフト(OS)によりCCW列の変更を行う場合であっても、変更通りに正しくCCW列をDCW列に変換して実行することができる。
【図面の簡単な説明】
【図1】本発明の原理説明図である。
【図2】本発明の概略構成図である。
【図3】CCWの説明図である。
【図4】CSWの説明図である。
【図5】CCW→DCW変換説明図である。
【図6】DSW→CSW変換説明図である。
【図7】CCW変換機構の構成図である。
【図8】分岐を含むCCW→DCW変換処理フロー(その1)である。
【図9】分岐を含むCCW→DCW変換処理フロー(その2)である。
【図10】単純ジャンプの場合の変換説明図である。
【図11】条件つきジャンプコマンド(スキップコマンド)の場合の変換説明図である。
【図12】異常CCWが検出された場合のCCW→DCW変換処理フローである。
【図13】異常CCWが検出された場合のDCW実行処理フローである。
【図14】CCW列が外部装置に格納されている場合の説明図である。
【図15】CCW・DCW対応テーブルの別の説明図である。
【図16】CCW列が外部装置に格納されている場合のCCW→DCW変換処理フローである。
【図17】CCW列が外部装置に格納されている場合のDCW実行処理フローである。
【図18】ソフトによるCCW変更がある場合のCCW→DCW変換処理フローである。
【図19】ソフトによるCCW変更がある場合のDCW実行処理フローである。
【図20】本発明の背景説明図である。
【符号の説明】
12・・CCW変換部
13・・CCW・DCW対応テーブル
21・・主記憶装置[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an I / O processing method. A channel command sequence (CCW sequence) created for a specific channel device is converted into another channel command sequence (DCW sequence) for another channel device, and the converted channel command sequence (DCW sequence) The other channel device performs the same I / O operation as the specific channel device using The present invention relates to an I / O processing method.
[0002]
[Prior art]
A channel command sequence (CCW sequence) created for a general-purpose computer is converted into another channel command sequence (DCW sequence) for a personal computer or the like on a workstation, and the converted channel command sequence (DCW sequence) ), A personal computer executes the same I / O operation as a general-purpose computer. FIG. 20 is a block diagram of such a system. 1a is a first processing device such as a general-purpose computer, 2a is a first channel device provided for the first processing device, and 3a is a first channel device connected to the first channel device. An I / O device, 1b is a second processing device such as a personal computer, which performs I / O processing exclusively, 2b is a second channel device for a personal computer, and 3b is a second I / O connected to the second channel device. / O device.
Although the first and second processing devices 1a and 1b share the same
[0003]
By the way, the channel command sequence (CCW sequence) operating in the first channel device 2a and the channel command sequence (DCW sequence) operating in the
[0004]
[Problems to be solved by the invention]
As a method of executing a channel command (CCW sequence) assuming a specific channel on another channel, there are methods disclosed in Japanese Patent Laid-Open Nos. 7-44324 and 1-293455.
In the method disclosed in Japanese Patent Laid-Open No. 7-44324, software or an I / O controller executes I / O processing while converting CCWs on a given CCW string one by one. The overhead is large. For this reason, in order to obtain sufficient I / O performance, there is a problem that a huge disk cache must be provided on the main memory.
The method disclosed in Japanese Patent Application Laid-Open No. 1-293455 statically converts a CCW sequence, but the CCW sequence to be converted is limited, and a complex CCW sequence involving branches and loops is limited. On the other hand, there is a problem that the conversion cannot be performed sufficiently.
In addition, when the conversion target CCW is abnormal, it is necessary to execute normally until the abnormal CCW and report an appropriate error for the abnormal CCW, but there is a problem that the conventional method cannot perform an appropriate error report. .
Furthermore, some CCW sequences may use a CCW sequence stored in an external device as a subsequent CCW sequence, but the conventional method has a problem that it cannot cope with this.
In addition, there is a case where the CCW sequence is changed by software (OS) in the middle of execution in the CCW sequence, but there is a problem that the conventional method cannot cope with such a case.
[0005]
As described above, an object of the present invention is to provide an I / O processing method that can reduce overhead at the time of execution and perform sufficient I / O processing performance by performing batch conversion of CCW sequences first. It is.
Another object of the present invention is to provide an I / O processing method capable of converting even a complicated CCW sequence involving branches and loops.
Still another object of the present invention is to provide an I / O processing method capable of normally executing an abnormal CCW and appropriately reporting an error for the abnormal CCW when the conversion target CCW is abnormal.
Another object of the present invention is to provide an I / O processing method capable of conversion and execution even when a CCW sequence stored in an external device is used as a subsequent CCW sequence.
Still another object of the present invention is to provide an I / O processing method capable of conversion and execution even when a CCW sequence is changed by software (OS) during execution.
[0006]
[Means for Solving the Problems]
FIG. 1 is a diagram illustrating the principle of the present invention. In (a), 12 is a CCW conversion unit for converting a channel command string (CCW string) into another channel command string (DCW string), and 13 is a correspondence between the address of the channel command CCW and the address of the converted channel command DCW. CCW / DCW correspondence table 21 stores a CCW sequence and a DCW sequence obtained by conversion.
The
[0007]
When the CCW is a conditional jump command (branch CCW) SK as shown in (c), the branch CCW is converted into a branch DCW (SK ′) whose branch destination address is undetermined, and then the CCW when the condition is not satisfied. The column (2) is converted into a DCW column. Thereafter, it is determined by searching the CCW / DCW correspondence table 13 whether or not the branch destination CCW string {circle around (3)} in the case where the condition is satisfied, and if it has not been converted, the branch of the branch DCW is determined. The destination address is set as an address for storing the next DCW, and the CCW sequence {circle around (3)} after the branch destination CCW is converted into the DCW sequence {circle around (3)}. If the branch destination CCW string {circle around (3)} has already been converted, the branch destination address of the branch DCW is determined so as to branch to the branch destination DCW corresponding to the branch destination CCW.
In this way, the CCW sequence is divided into CCW groups, which are a series of CCWs that do not have any branches inside, and converted, and the correspondence between the CCW address and the converted DCW address is determined. CCW / DCW correspondence table is managed, and the branch command and jump command are appropriately converted by referring to the table, so efficient conversion is possible even for complex CCW sequences involving branches and loops. Can go and run. ...
[0008]
When an abnormal CCW is detected during batch conversion, the
[0009]
The CCW / DCW correspondence table 13 is provided with a column for storing the start address and data length of the data input area of the read command. When the CCW is a read command during the batch conversion, the
[0010]
A flag is set in a predetermined CCW, and the
As described above, according to the present invention, by performing the conversion of CCW sequences at once, overhead at the time of execution can be reduced, and sufficient I / O processing performance can be exhibited.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
(A) Configuration of the present invention
FIG. 2 is a schematic configuration diagram of the present invention, in which 10 is a CCW conversion mechanism that converts a channel command string (CCW string) into another channel command string (DCW string), 20 is a first channel device, and 30 is a second channel. An
[0012]
FIG. 5 is an explanatory diagram of CCW → DCW conversion in the
[0013]
FIG. 6 is an explanatory diagram of DSW → CSW conversion in the interrupt processing
[0014]
FIG. 7 is a configuration diagram of the
In the
[0015]
The dynamic
[0016]
(B) Conversion processing when a branch command is included
If a given CCW sequence is a simple one that does not have a branch or jump loop, the conversion method can be easily considered. However, in a CCW sequence with a branch or the like, it is necessary to detect which DCW corresponds to the branch destination CCW sequence on the DCW sequence after conversion, and describe it on the branch command on the DCW.
8 and 9 are flowcharts of CCW → DCW conversion processing when a branch command is included.
The first CCW is read from the main storage device designated by the channel address word CAW (step 101), and it is checked whether the CCW is a simple jean command (TIC) (step 102). It is checked whether it is a command (skip command) (step 103). Since the correspondence between the model and the skip command is registered in the table 14, the skip command is determined with reference to the table.
[0017]
If it is not a skip command, CCW → DCW conversion is performed, and the correspondence between the CCW address and the DCW address is stored in the table 13 (step 104). Thereafter, it is checked whether or not the conversion of all CCW sequences has been completed (step 105). If not, the next CCW is read from the CCW address (step 106), and the processing after
[0018]
On the other hand, if the CCW is a simple jump command in
[0019]
FIG. 10 is an explanatory diagram of CCW → DCW conversion in the case of a simple jump command. As shown in FIG. 10, when the CCW after the CCW sequence (1), (2) is a simple jump command (TIC) J1, J2, whether or not the branch destination CCW sequence (2) has already been converted is determined. The CCW / DCW correspondence table 13 is searched and judged. If it has not been converted (in the case of J1), the branch CCW sequence {circle around (2)} is converted to the DCW sequence {circle around (2)} without converting the branch CCW to DCW. . On the other hand, if it has been converted (in the case of J2), a DCW that branches to the DCW (the head of the DCW sequence {circle around (2)}) corresponding to the branch destination CCW is created.
[0020]
In
Thereafter, it is determined by searching the CCW / DCW correspondence table 13 whether or not the branching CCW when the condition is satisfied has already been converted (step 116). When the conversion has been completed, the branch destination address of the branch DCW in
[0021]
FIG. 11 is an explanatory diagram of CCW → DCW conversion in the case of a skip command. When the command SK after the condition command CK is a skip command (branch CCW) as shown in FIG. 11, the branch CCW is converted into a branch DCW (SK ′) whose branch destination address is undetermined, and then the condition is not satisfied. The CCW sequence {circle around (2)} in FIG. Thereafter, it is determined by searching the CCW / DCW correspondence table 13 whether or not the branch destination CCW string {circle around (3)} in the case where the condition is satisfied, and if not, the branch DCW (SK The branch destination address of ′) is used as an address for storing the next DCW, and thereafter, the branch destination CCW sequence {circle around (3)} is converted into the DCW sequence {circle around (3)}. If the branch destination CCW string {circle around (3)} has already been converted, the branch destination address of the branch DCW (SK ′) is determined so as to branch to the branch destination DCW corresponding to the branch destination CCW.
[0022]
As described above, the CCW sequence is divided into CCW groups, which are a series of CCWs having no branch inside, and conversion is performed, and the correspondence between the CCW address and the converted DCW address is shown in the CCW / DCW correspondence table. Since the branch command and jump command are appropriately converted by referring to the table, it is possible to efficiently perform conversion and execute even for a complex CCW sequence involving a loop due to branch and jump. it can.
[0023]
(C) Processing when an abnormal CCW exists in the CCW
If the conversion target CCW is abnormal, it must be executed normally until immediately before the abnormal CCW, and an appropriate error report must be reported for the abnormal CCW.
FIG. 12 is an explanatory diagram of CCW → DCW conversion processing when an abnormal CCW exists in the CCW, and FIG. 13 is an explanatory diagram of DCW execution processing when the abnormal CCW exists in the CCW.
The CCW is read from a predetermined CCW address of the main memory (step 201), and it is checked whether the CCW is an abnormal CCW (step 202). The CCW is an abnormal CCW when a format error, use of an undefined code, a grammatical error, or the like is detected.
If it is not an abnormal CCW, the conversion from CCW to DCW is executed (step 203), and then it is checked whether all CCW strings have been converted (step 204). If not converted, the processing from
[0024]
On the other hand, in
Next, the conversion of the CCW string after the abnormal CCW is terminated. Then, it is checked whether there is an unconverted branch CCW sequence of the branch CCW (skip command) before the abnormal CCW (step 207), and if it does not exist, the conversion process is terminated. The previous CCW sequence is read (step 208), and thereafter, the conversion processing after
[0025]
After the CCW sequence conversion is completed, the DCW is read and executed (step 301). After execution, it is checked whether the chain bit is off (step 302). If not, it is checked whether execution of all DCWs is completed (step 303). If not, the process returns to step 301 to execute the next DCW. .
On the other hand, if the chain bit is turned off or the execution of all the DCWs is completed, an error flag corresponding to the DCW address at that time is obtained from the CCW / DCW correspondence table 13 to check whether the error flag bit = “1” (step 304). .
If the error flag bit is “0”, a normal end report is output (step 305). If the error flag bit is “1”, the next CCW (abnormal CCW) is read from the main memory. After checking, an error is reported by an abnormal termination interrupt (step 307).
As described above, when the conversion target CCW is abnormal, it is possible to execute normally up to the abnormal CCW and report an appropriate error for the abnormal CCW.
[0026]
(D) Processing when CCW sequence is stored in external device
Some CCW strings use a CCW string stored in an external device such as a magnetic disk device as a subsequent CCW string. FIG. 14 is an explanatory diagram of such a case, in which 21 is a main storage device and 50 is a magnetic disk device. The
[0027]
By the way, in the method of batch conversion of CCW sequences as in the present invention, the CCW sequence read from the external device by the converted DCW sequence is not converted at the first CCW → DCW conversion. For this reason, the CCW sequence must be converted again after the CCW sequence is read from the external device. Furthermore, a means for knowing which CCW is to change the CCW and which is the changed CCW is necessary.
[0028]
Therefore, as shown in FIG. 15, the CCW / DCW correspondence table 13 is provided with a column for storing the start address α and the data length L of the data input area of the read command (CCW). When the CCW is a read command, the
[0029]
When a PCI interrupt occurs when the DCW sequence is executed, the
[0030]
FIG. 16 is a CCW → DCW conversion processing flow when the CCW sequence is stored in the external device.
The CCW is read from a predetermined CCW address (step 401), and it is checked whether the CCW is a read command (step 402). If it is not a read command, it is checked whether the CCW address exists in the data area stored in the CCW / DCW correspondence table 13 (step 403). If not, CCW → DCW conversion is performed and the CCW address The correspondence of the DCW address is entered in the CCW / DCW correspondence table 13 (step 404). Next, it is checked whether all CCWs have been converted to DCW (step 405). If the conversion has not been completed, the process returns to step 401 to execute the processing from
[0031]
On the other hand, if CCW is a read command in
In
Next, the CCW is converted into a DCW, and the subsequent CCW sequence is converted into a DCW sequence (steps 407 and 408), and the conversion process is terminated.
[0032]
FIG. 17 is a DCW execution processing flow when the CCW sequence is stored in the external device.
The DCW is read and executed (step 501), and it is checked whether the PCIW PCI flag is set ("1") (step 502). If the PCI flag is not set, it is checked whether all DCWs have been executed (step 503). If the execution of all the DCWs is not completed, the process returns to step 501 to repeat the subsequent DCW execution process. If the execution of all the DCWs is completed, the DSW is created and input to the interrupt processing
[0033]
On the other hand, if the PCI flag is set in
When CCW → DCW conversion of the CCW sequence read from the external device is completed, the reconverted DCW sequence is sequentially executed (step 509). After completion of the execution of the DCW sequence, it is checked in
In this way, even when the CCW sequence stored in the external device in the CCW sequence is used as the subsequent CCW sequence, the CCW → DCW conversion can be correctly performed and executed.
[0034]
By the way, when the PCI interrupt is delayed or the reconversion process takes time, the change target DCW may be executed before the end of the reconversion. In this case, the DCW before conversion should not be executed originally, and an unexpected operation is performed. Therefore, the DCW to be changed is set to NOP (NO Operation) at the top DCW in step 407 and the chain bit flag is turned off so that no adverse effect is caused by the execution of the DCW before change. Further, by setting the dynamic change bit on the CCW / DCW correspondence table 13 corresponding to the NOP command (set to “1”), it is possible to detect that the DCW execution has ended due to the delay of the dynamic change.
As described above, when the execution of the DCW is terminated due to the delay in the dynamic change of the CCW, normally, when the dynamic change is completed, the process is resumed from the DCW that has performed the change. However, in some cases, since the orientation is broken, an unexpected operation may be performed. Therefore, the CCW conversion unit checks the previous CCW, and if there is a possibility of a problem if the execution is resumed from the CCW, the CCW conversion unit causes the head DCW to perform the execution again. In this case, since the CCW dynamic change and reconversion have already been completed, the DCW PCI flag to be changed and the dynamic change bit on the corresponding CCW / DCW correspondence table are turned off before the process is resumed.
[0035]
(E) Processing when there is a CCW change by software
Some CCW columns notify the software of PCI (Program Controlled Interrupt) during execution and cause the software to change the CCW. In this case, the CCW conversion unit cannot recognize which CCW is converted at which timing. Therefore, after the PCI report to the software (OS), the CCW sequence at the time of conversion is compared with the latest CCW sequence at regular time intervals to check whether there is a CCW change. If the change is confirmed, the changed CCW is reconverted.
FIG. 18 is a flowchart of CCW → DCW conversion processing when there is a CCW change by software. Note that a PCI flag is set in a predetermined CCW in order to notify the software of the end of execution up to the CCW. When this PCI is reported, the software changes the CCW.
[0036]
First, the CCW is read from the CCW address (step 601), and it is checked whether the PCI flag of the CCW is set (step 602). If the PCI flag is not set, the CCW is converted to DCW, and the CCW address and DCW address are entered in the CCW / DCW correspondence table 13 (step 603). Thereafter, it is checked whether or not the conversion of all CCWs has been completed (step 604). If the conversion has not been completed, the process returns to step 602 to perform the subsequent CCW conversion.
On the other hand, if the CCW PCI flag is set in
[0037]
FIG. 19 is a DCW execution processing flow when there is a CCW change by software. The DCW is read and executed (step 701), and it is checked whether the PCI flag of the DCW is set (step 702). If it is set, a PCI notification is sent to the software (OS) via the
[0038]
On the other hand, when PCI notification is made and comparison is necessary, the CCW sequence at the time of conversion is periodically compared with the current CCW sequence (step 706). If there is a mismatched CCW as a result of the comparison (step 707), if there is a mismatched CCW, the CCW is changed by the software if the mismatched CCW exists. (Step 708), and thereafter, the processing after
According to the above, even when the CCW sequence is changed by software (OS) during the execution, the CCW sequence can be correctly converted into the DCW sequence and executed as changed.
The present invention has been described with reference to the embodiments. However, the present invention can be variously modified in accordance with the gist of the present invention described in the claims, and the present invention does not exclude these.
[0039]
【The invention's effect】
As described above, according to the present invention, it is possible to reduce overhead during execution and perform sufficient I / O processing performance by performing batch conversion of CCW sequences first.
Further, according to the present invention, the CCW sequence is divided into CCW groups, which are a series of CCWs that do not have branches inside, and conversion is performed. Also, the correspondence between the CCW address and the converted DCW address Is managed in a CCW / DCW correspondence table, and the branch command and jump command are appropriately converted with reference to the table, so even complex CCW sequences involving branches and loops can be converted efficiently. Can be performed.
[0040]
Further, according to the present invention, when the conversion target CCW is abnormal, it is possible to execute normally up to the abnormal CCW and report an appropriate error for the abnormal CCW.
Further, according to the present invention, conversion and execution can be performed even when a CCW sequence stored in an external device is used as a subsequent CCW sequence.
Furthermore, according to the present invention, even when the CCW sequence is changed by software (OS) during execution, the CCW sequence can be correctly converted into a DCW sequence and executed according to the change.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating the principle of the present invention.
FIG. 2 is a schematic configuration diagram of the present invention.
FIG. 3 is an explanatory diagram of CCW.
FIG. 4 is an explanatory diagram of CSW.
FIG. 5 is an explanatory diagram of CCW → DCW conversion.
FIG. 6 is an explanatory diagram of DSW → CSW conversion.
FIG. 7 is a configuration diagram of a CCW conversion mechanism.
FIG. 8 is a CCW → DCW conversion processing flow (part 1) including a branch.
FIG. 9 is a CCW → DCW conversion processing flow (part 2) including a branch.
FIG. 10 is an explanatory diagram of conversion in the case of a simple jump.
FIG. 11 is an explanatory diagram of conversion in the case of a conditional jump command (skip command).
FIG. 12 is a CCW → DCW conversion processing flow when an abnormal CCW is detected.
FIG. 13 is a DCW execution process flow when an abnormal CCW is detected.
FIG. 14 is an explanatory diagram when a CCW string is stored in an external device.
FIG. 15 is another explanatory diagram of a CCW / DCW correspondence table;
FIG. 16 is a CCW → DCW conversion processing flow when a CCW sequence is stored in an external device.
FIG. 17 is a DCW execution process flow when a CCW string is stored in an external device.
FIG. 18 is a CCW → DCW conversion processing flow when there is a CCW change by software.
FIG. 19 is a DCW execution processing flow when there is a CCW change by software.
FIG. 20 is a background explanatory diagram of the present invention.
[Explanation of symbols]
12. ・ CCW converter
13. ・ CCW ・ DCW correspondence table
21..Main memory
Claims (4)
前記変換に際して、チャネルコマンドCCWのアドレスと変換されたチャネルコマンドDCWのアドレスとの対応をCCW・DCW対応テーブルに記憶し、
チャネルコマンドCCWが単純なジャンプコマンドの場合、分岐先チャネルコマンドCCWが既に変換済みであるか否かを前記CCW・DCW対応テーブルをサーチして判断し、変換済みの場合には対応するチャネルコマンドDCWに分岐するチャネルコマンドDCWを作成し、変換済みでない場合には該分岐先チャネルコマンドCCW以降のチャネルコマンドCCWをチャネルコマンドDCWに変換し、
チャネルコマンドがスキップコマンド(分岐CCW)の場合、該分岐CCWを分岐先アドレスが未定の分岐DCWに変換し、
ついで、条件が不成立の場合におけるCCW列をDCW列に変換し、
しかる後、条件成立の場合における分岐先チャネルコマンドCCWが既に変換済みであるか否かを前記CCW・DCW対応テーブルをサーチして判断し、
変換済みの場合には該分岐先チャネルコマンドCCWに対応する分岐先チャネルコマンドDCWに分岐するように前記分岐DCWの分岐先アドレスを決定し、
変換済みでない場合には、次のチャネルコマンドDCWを格納するアドレスを前記分岐DCWの分岐先アドレスとし、前記分岐先チャネルコマンドCCW以降のチャネルコマンドCCWをチャネルコマンドDCWに変換することを特徴とするI/O処理方法。A channel command sequence (CCW sequence) created for a specific channel device is converted into another channel command sequence (DCW sequence) for another channel device , and the converted channel command sequence (DCW sequence) in I / O processing method of another channel device executes the same I / O operation and the specific channel device using,
At the time of the conversion , the correspondence between the address of the channel command CCW and the address of the converted channel command DCW is stored in the CCW / DCW correspondence table,
When the channel command CCW is a simple jump command, it is determined by searching the CCW / DCW correspondence table whether the branch destination channel command CCW has already been converted. If the channel command CCW has been converted, the corresponding channel command DCW is determined. A channel command DCW that branches to the channel command DCW, and if not converted, converts the channel command CCW after the branch destination channel command CCW to the channel command DCW,
When the channel command is a skip command (branch CCW), the branch CCW is converted into a branch DCW whose branch destination address is undetermined,
Next, the CCW sequence when the condition is not satisfied is converted into a DCW sequence,
Thereafter, the CCW / DCW correspondence table is searched to determine whether or not the branch destination channel command CCW in the case where the condition is satisfied has already been converted,
If it has been converted, the branch destination address of the branch DCW is determined so as to branch to the branch destination channel command DCW corresponding to the branch destination channel command CCW;
If not converted, the address for storing the next channel command DCW is used as the branch destination address of the branch DCW, and the channel command CCW after the branch destination channel command CCW is converted into the channel command DCW. / O processing method.
前記変換により得られたチャネルコマンドDCWの実行時、チェインビットのオフによりチャネルコマンドの実行が停止した時、CCW・DCW対応テーブルを参照してエラーフラグビットがオンしているかチェックし、オンしている場合には、次のチャネルコマンドCCW(異常チャネルコマンドCCWである)を読み出してチェック後、異常終了の割込みを発生することを特徴とする請求項1記載のI/O処理方法。When an abnormal channel command CCW is detected during the conversion , the chain bit of the channel command DCW corresponding to the previous channel command CCW is turned off, and the error flag bit of the channel command DCW is turned on in the CCW / DCW correspondence table. ,
When the channel command DCW obtained by the conversion is executed, when the execution of the channel command is stopped by turning off the chain bit, the CCW / DCW correspondence table is referred to check whether the error flag bit is turned on and turned on. 2. The I / O processing method according to claim 1, wherein an abnormal termination interrupt is generated after reading and checking the next channel command CCW (which is an abnormal channel command CCW).
前記変換に際して、チャネルコマンドCCWがリードコマンドの場合には前記テーブルにデータ入力領域の先頭アドレスとデータ長を記憶すると共に、チャネルコマンドCCWのアドレスが前記テーブルに記憶されているデータ領域内に存在するか判断し、
存在する場合は、該チャネルコマンドCCWは外部装置より読み込んだチャネルコマンドであると判定し、前記データ領域をデータ入力領域とするリードコマンド(チャネルコマンドCCW)に対応するチャネルコマンドDCWにフラグをセットし、
前記変換により得られたチャネルコマンドDCWの実行時、前記フラグが検出された時、該フラグ付きのチャネルコマンドDCW(リードコマンド)により外部装置より前記データ領域に読み込んだチャネルコマンド列CCWを、順次別のチャネルコマンド列DCWに変換し、変換後、該チャネルコマンド列DCWを実行することを特徴とする請求項1記載のI/O処理方法。In the CCW / DCW correspondence table, a column for storing the start address and data length of the data input area of the read command is provided,
At the time of the conversion, when the channel command CCW is a read command, the head address and data length of the data input area are stored in the table, and the address of the channel command CCW exists in the data area stored in the table. Determine whether
If it exists, it is determined that the channel command CCW is a channel command read from an external device, and a flag is set in the channel command DCW corresponding to the read command (channel command CCW) having the data area as the data input area. ,
When the channel command DCW obtained by the conversion is executed, when the flag is detected, the channel command sequence CCW read into the data area from the external device by the channel command DCW (read command) with the flag is sequentially separated. 2. The I / O processing method according to claim 1, wherein the channel command string DCW is converted into a channel command string DCW and the channel command string DCW is executed after the conversion.
前記変換により得られたチャネルコマンドDCWの実行時に、前記フラグが検出された時、該検出をオペレーションシステムOSに通知し、
しかる後、一定間隔で前記変換時におけるチャネルコマンド列(CCW列)と現在のチャネルコマンド列(CCW列)を比較し、変更により不一致のチャネルコマンドCCWが存在する場合には、該変更チャネルコマンドCCWをチャネルコマンドDCWに再変換することを特徴とする請求項1記載のI/O処理方法。A flag is set in a predetermined channel command CCW, a flag is set in a channel command DCW corresponding to the channel command CCW in which the flag is set during the conversion ,
When the flag is detected during execution of the channel command DCW obtained by the conversion , the detection is notified to the operation system OS;
Thereafter, the channel command sequence (CCW sequence) at the time of conversion is compared with the current channel command sequence (CCW sequence) at regular intervals, and if there is a mismatched channel command CCW due to the change, the changed channel command CCW 2. The I / O processing method according to claim 1, wherein the I / O is reconverted into a channel command DCW.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP25730195A JP3796281B2 (en) | 1995-10-04 | 1995-10-04 | I / O processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP25730195A JP3796281B2 (en) | 1995-10-04 | 1995-10-04 | I / O processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH09101918A JPH09101918A (en) | 1997-04-15 |
JP3796281B2 true JP3796281B2 (en) | 2006-07-12 |
Family
ID=17304469
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP25730195A Expired - Fee Related JP3796281B2 (en) | 1995-10-04 | 1995-10-04 | I / O processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3796281B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006277583A (en) * | 2005-03-30 | 2006-10-12 | Hitachi Ltd | Data processing system, data processing method and program |
JP5195228B2 (en) * | 2008-09-26 | 2013-05-08 | 富士通株式会社 | Processing program, processing apparatus, and processing method |
-
1995
- 1995-10-04 JP JP25730195A patent/JP3796281B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH09101918A (en) | 1997-04-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6134063A (en) | Automated multi-track transfers | |
JPH0348537B2 (en) | ||
US6751038B1 (en) | Data write control system and method therefor | |
JP3796281B2 (en) | I / O processing method | |
JP2595341B2 (en) | Memory operation controller for pipeline processor | |
US6535935B1 (en) | Method of sending data streams using a refetchable first-in-first-out memory which is read in a sequence that backs-up | |
JPH03158952A (en) | Dma controller and information processing system | |
JP2004102440A (en) | Command-processing method, and storage device | |
JPH0954694A (en) | Pipeline processor and its processing method | |
JPS58134336A (en) | Word searching device | |
JP2524620B2 (en) | Input / output control method | |
JPH0439732A (en) | Variable length data processor | |
JPH02157932A (en) | Variable length data processor | |
JPS6118032A (en) | External memory controller | |
JPS6238747B2 (en) | ||
JPH086732A (en) | Disk controller | |
JPS6238569A (en) | Magnetic disc controller | |
JPS6217840A (en) | Microprogram control system based upon attribution flag | |
JPS61161509A (en) | System and device for operating high speed sequence | |
JPH0578052B2 (en) | ||
JPH0136198B2 (en) | ||
JPS63291148A (en) | Re-tryal control system for input/output controller | |
JPH01281553A (en) | Channel control system | |
JPS6132698B2 (en) | ||
JPS6036614B2 (en) | information processing equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050606 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050614 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050805 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20060411 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060417 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090421 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100421 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110421 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110421 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120421 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130421 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140421 Year of fee payment: 8 |
|
LAPS | Cancellation because of no payment of annual fees |