JPH03269744A - Cache memory control system - Google Patents

Cache memory control system

Info

Publication number
JPH03269744A
JPH03269744A JP2068244A JP6824490A JPH03269744A JP H03269744 A JPH03269744 A JP H03269744A JP 2068244 A JP2068244 A JP 2068244A JP 6824490 A JP6824490 A JP 6824490A JP H03269744 A JPH03269744 A JP H03269744A
Authority
JP
Japan
Prior art keywords
cache memory
address
data
register
record
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.)
Pending
Application number
JP2068244A
Other languages
Japanese (ja)
Inventor
Nobukazu Kirigatani
桐ケ谷 信和
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 JP2068244A priority Critical patent/JPH03269744A/en
Publication of JPH03269744A publication Critical patent/JPH03269744A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To make hardware of an address calculating part to quickly calculate the access address by calculating the access address of a cache memory on the side of a cache memory access control means. CONSTITUTION:An address updating means 14 accesses a cache memory 21 by the start address set to an address register 11 and compares the discrimination number of a read-out record and that of the access object record set to an ID register 12 with each other. If they do not coincide with each other, the value of the address register 11 is updated to the address of the next record by the key length and the data length taken out from the count part of the read-out record, and this operation is repeated till discrimination numbers coincide with each other. Thus, the address calculating part is easily made into hardware to quickly calculate the address because the access address of the cache memory 21 is calculated on the side of a cache memory access control means 10.

Description

【発明の詳細な説明】 〔概 要〕 ディスクキャッシュ方式ディスクコントロール装置のキ
ャッシュメモリ制御方式に関し、キャッシュメモリ制御
部分をハード化して、キャッシュメモリ制御を高速化す
ることを目的とし、キャッシュメモリに対するデータ転
送を制御するキャッシュメモリアクセス制御手段を備え
たディスクコントロール装置のキャッシュメモリ制御方
式において、キャッシュメモリのアクセスアドレスをセ
ットするアドレスレジスタと、アクセス対象レコードの
識別番号をセットするIDレジスタと、アクセス元のコ
マンドを解析し、キャッシュメモリのアクセスアドレス
をアドレスレジスタにセットし、アクセスレコードの識
別番号をIDレジスタにセットする手段と、キャッシュ
メモリから読み出されたカウント部を解析し、レコード
の識別番号とIDレジスタの識別番号が一致するまで、
カウント部のデータに基づいてアドレスレジスタのアド
レスを更新する手段をキャッシュメモリアクセス制御手
段に設けるように構成する。
[Detailed Description of the Invention] [Summary] Regarding the cache memory control method of a disk cache type disk control device, the purpose of this invention is to make the cache memory control part hard and speed up the cache memory control. In a cache memory control method of a disk control device equipped with a cache memory access control means for controlling a cache memory, an address register for setting an access address of the cache memory, an ID register for setting an identification number of a record to be accessed, and an access source command. means to analyze the access address of the cache memory, set the access address in the address register, and set the identification number of the access record in the ID register, analyze the count part read from the cache memory, and set the identification number of the record and the ID register. until the identification numbers match.
The cache memory access control means is configured to include means for updating the address of the address register based on the data of the count section.

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

本発明は、複数のアクセス元が共用するキャッシュメモ
リと、このキャッシュメモリに対するデータ転送をコン
トロールするキャッシュメモリアクセス制御手段を備え
たディスクキャ・ンシュ方式のディスクコントロール装
置において、CPU等のアクセス元からのコマンードに
従って、キャッシュメモリをアクセスする際のキャッシ
ュメモリ制御方式に関する。
The present invention provides a disk cache type disk control device equipped with a cache memory shared by a plurality of access sources and a cache memory access control means for controlling data transfer to the cache memory. This invention relates to a cache memory control method when accessing cache memory according to commands.

〔従来の技術〕[Conventional technology]

上位のCPU等のアクセス元からのコマンドに従って磁
気ディスク装置等の外部記憶装置に対するデータのり一
ド/ライトを制御するディスクコントロール装置におい
ては、外部記憶装置に対するリード/ライトを高速化す
るために、その内部にキャッシュメモリを設けたディス
クキャッシュ方式が多く採用されている。
In a disk control device that controls data read/write to an external storage device such as a magnetic disk device according to commands from an access source such as a higher-level CPU, in order to speed up read/write to the external storage device, A disk cache method with internal cache memory is often used.

このディスクキャッシュ方式では、ディスクコントロー
ル装置内に外部記憶装置よりも高速低容量のキャッシュ
メモリを設け、リード時は外部記憶装置からのリードデ
ータをキャッシュメモリに一時蓄え、CPUは、適当な
タイミング(例えば、他の処理がないとき)でこのキャ
ッシュメモリ上のデータをリードするようにする。
In this disk cache method, a cache memory with a higher speed and lower capacity than the external storage device is provided in the disk control device, and when reading data, the read data from the external storage device is temporarily stored in the cache memory, and the CPU reads data at an appropriate timing (e.g. , when there is no other processing), the data on this cache memory is read.

また、ライト時はライトデータをキャッシュメモリに一
時蓄え、適当なタイミングでこのライトデータを外部記
憶装置に転送して書き込むようにする。
Furthermore, when writing, the write data is temporarily stored in the cache memory, and the write data is transferred to the external storage device and written at an appropriate timing.

第5図は、キャッシュメモリ方式のディスクコントロー
ル装置の基本構成をブロック図で示したものである。
FIG. 5 is a block diagram showing the basic configuration of a cache memory type disk control device.

第5図のディスクコントロール装置20において、21
はキャッシュメモリであり、高速低容量のメモリで構成
され、図示しないCPU等のアクセス元と図示しない磁
気ディスク装置等外部記憶装置との間で転送されるデー
タが、レコード形式で格納される。
In the disk control device 20 of FIG.
A cache memory is a high-speed, low-capacity memory in which data transferred between an access source such as a CPU (not shown) and an external storage device (not shown) such as a magnetic disk device is stored in record format.

22はキャッシュメモリアクセス制御手段であり、キャ
ッシュメモリ21に対するアクセスを制御する。
A cache memory access control means 22 controls access to the cache memory 21.

231〜23nはチャネルアダプタであり、対応するC
PU等のアクセス元(図示せず)とディスクコントロー
ル装置20との間の接続制御、アクセス元からのコマン
ドの解析、キャッシュメモリ21をアクセスするアドレ
スの算出、リード/ライトする各データのデータ長の設
定等の処理を行う。
231 to 23n are channel adapters, and the corresponding C
Connection control between an access source (not shown) such as a PU and the disk control device 20, analysis of commands from the access source, calculation of addresses for accessing the cache memory 21, and determination of the data length of each data to be read/written. Performs processing such as settings.

24、〜24nはデバイスアダプタであり、対応する外
部記憶装置(磁気ディスク装置)との間の接続制御、を
行う。
Device adapters 24 and 24n control connections with corresponding external storage devices (magnetic disk devices).

25は共通ハスであり、キャッシュメモリアクセス制御
手段22、チャネルアダプタ23.〜23n及びデバイ
スアダプタ241〜24n相互間のデータやアドレスが
転送される。
25 is a common lotus, which includes cache memory access control means 22, channel adapter 23. 23n and the device adapters 241 to 24n, data and addresses are transferred between them.

第4図は、キャッシュメモリ21にレコード形式で格納
されるデータのフォーマットを示したものであり、各レ
コードは、図示のようにカウント部、キ一部及びデータ
部で構成される。
FIG. 4 shows the format of data stored in the cache memory 21 in record format, and each record is composed of a count section, a key section, and a data section as shown.

カウント部は固定長(28バイト)であり、そこには、
そのレコードを識別する識別番号IDと、キ一部の長さ
を指示するキー長KL及びデータ部のデータの長さを指
定するデータ長DLが格納される。
The count part has a fixed length (28 bytes) and contains:
An identification number ID that identifies the record, a key length KL that specifies the length of the key part, and a data length DL that specifies the length of the data part are stored.

キ一部には、そのレコードをサーチする場合の物理的な
指標が格納され、データ部には、転送対象となるユーザ
のデータが格納される。
The key part stores a physical index for searching the record, and the data part stores the data of the user to be transferred.

次に、第6図は、第5図のキヤ・ンシュメモリアクセス
制御手段22の内部構成の詳細な説明図である。
Next, FIG. 6 is a detailed explanatory diagram of the internal configuration of the cache memory access control means 22 of FIG. 5.

第6図において、221はアドレスレジスタであり、キ
ャッシュメモリ21をアクセスするアドレスがセットさ
れる。
In FIG. 6, 221 is an address register in which an address for accessing the cache memory 21 is set.

222はデータバイトカウンタであり、キャッシュメモ
リ21にリード/ライトされるデータのバイト数がセッ
トされる。
222 is a data byte counter, and the number of bytes of data to be read/written to the cache memory 21 is set.

223はコマンドレジスタであり、アクセス元から転送
されたコマンドが格納される。
223 is a command register in which a command transferred from an access source is stored.

224はコマンド解析部であり、コマンドレジスタ22
3に格納されたコマンドを解析し、リード/ライトのい
ずれかを識別する処理、キャッシュメモリ21をアクセ
スするスタートアドレスをアドレスレジスタ221にセ
ットする処理、リード/ライトされる各種データのデー
タ長をデータバイトカウンタ222にセットする処理を
行う。
224 is a command analysis section, and the command register 22
Processing to analyze the command stored in 3 and identify either read/write, processing to set the start address for accessing the cache memory 21 in the address register 221, and data length of various data to be read/written. Processing to set the byte counter 222 is performed.

225はデータレジスタであり、キャッシュメモリ21
にリード/ライトするデータが一時格納される。
225 is a data register, and the cache memory 21
The data to be read/written is temporarily stored.

226はデータ転送コントロール部であり、キャッシュ
メモリ21にリード/ライトするデータの転送制御、デ
ータ転送に伴うアドレスレジスタ221及びデータバイ
トカウンタ222の内容を更新する処理を行う。
A data transfer control unit 226 controls the transfer of data read/written to the cache memory 21 and updates the contents of the address register 221 and data byte counter 222 in connection with data transfer.

この構成において、図示しないCPU等のアクセス元か
ら、メモリをアクセスするスタートアドレス、リード/
ライトの区別、リード/ライトするデータ長等を指示す
るコマンドが、チャネルアダプタ(23,とする)に発
行される。なお、説明を簡単にするために、キャッシュ
メモリ21にヒツトし、リード/ライトが可能な状態で
あるとする。
In this configuration, from an access source such as a CPU (not shown), a start address for accessing the memory, a read/write address, etc.
Commands instructing write distinction, data length to be read/written, etc. are issued to the channel adapter (23). In order to simplify the explanation, it is assumed that the cache memory 21 is hit and read/write is possible.

チャネルアダプタ23+ はアクセス元からのコマンド
の解析し、アクセスされるデータのあるレコードのカウ
ント部、キ一部及びデータ部の各アドレス及び各部のデ
ータ長を求める処理を行い、コマンドとともに順次キャ
ッシュメモリアクセス制御手段22に送る。
The channel adapter 23+ analyzes the command from the access source, performs processing to obtain the addresses of the count part, key part, and data part of the record with data to be accessed, and the data length of each part, and sequentially accesses the cache memory along with the command. It is sent to the control means 22.

この場合、カウント部のアドレスはスタートアドレスと
してアクセス元より通知され、また、カウント部のデー
タ長CLは28バイトに固定されている。
In this case, the address of the count section is notified by the access source as a start address, and the data length CL of the count section is fixed at 28 bytes.

これに対し、キ一部のアドレスは、カウント部のデータ
長(28バイト)をスタートアドレスに加算することに
より求められ、キ一部のデータ長はカウント部にあるキ
ー長KLより求められる。
On the other hand, the address of the key part is found by adding the data length (28 bytes) of the count part to the start address, and the data length of the key part is found from the key length KL in the count part.

また、データ部のアドレスは、カウント部にあるキー長
KLをスタートアドレスに加算することにより求められ
、データ部のデータ長はカウント部にあるデータ長DL
より求められる。
The address of the data section is obtained by adding the key length KL in the count section to the start address, and the data length of the data section is determined by adding the data length DL in the count section.
More demanded.

更に、次のレコードの先頭アドレスは、カウント部にあ
るキー長KL及びデータ長DLをスタートアドレスに加
算することにより求められる。
Furthermore, the start address of the next record is found by adding the key length KL and data length DL in the count section to the start address.

チャネルアダプタ21+から転送されたコマンドは、キ
ャッシュメモリアクセス制御手段22のコマンドレジス
タ223に格納される。
The command transferred from the channel adapter 21+ is stored in the command register 223 of the cache memory access control means 22.

コマンド解析部224は、コマンドレジスタ223に格
納されたコマンドを解析し、リード/ライトのいずれか
を識別するとともに、キャッシュメモリ21をアクセス
するスタートアドレスをアドレスレジスタ221にセッ
トし、更に、バイト数で指示されるデータ長をデータバ
イトカウンタ222にセットする。
The command analysis unit 224 analyzes the command stored in the command register 223, identifies read/write, sets the start address for accessing the cache memory 21 in the address register 221, and further specifies the number of bytes. The specified data length is set in the data byte counter 222.

メモリライト時は、データ転送コントロール部226は
、ドレス221にセットされたアドレスによりキャッシ
ュメモリ21をアクセスし、チャネルアダプタ22.を
介してアクセス元より転送されるライトデータを、デー
タレジスタ225を介してキャッシュメモリ21にライ
トする。
At the time of memory write, the data transfer control unit 226 accesses the cache memory 21 using the address set in the address 221, and writes the data to the channel adapter 22. Write data transferred from the access source via the data register 225 is written to the cache memory 21 via the data register 225.

次いで、データ転送コントロール部226は、アクセス
元より受は取ったデータのバイト数だけアドレスレジス
タ221のアドレス値を加算し、同じく受は取ったデー
タのバイト数だけデータバイトカウンタ222のバイト
数を減算する更新処理を行う。
Next, the data transfer control unit 226 adds the address value of the address register 221 by the number of bytes of data received from the access source, and subtracts the number of bytes of the data byte counter 222 by the number of bytes of data received. Perform the update process.

以下同様にして、アクセス元より受は取ったデ−夕をア
ドレスレジスタ221のアドレスでキャッシュメモリ2
1にリードし、受は取ったデータのハイド数分だけアド
レスレジスタ221及びデータバイトカウンタ222の
内容を更新する。
Similarly, data received from the access source is stored in the cache memory 221 at the address of the address register 221.
1, and the receiver updates the contents of the address register 221 and data byte counter 222 by the number of data received.

データバイトカウンタ222の値が0になったことによ
り、アクセス元より指示された全データのライト処理の
終了が検出されると、チャネルアダプタ221は、アク
セス元にメモリライト処理の終了を通知する。
When the value of the data byte counter 222 becomes 0 and the end of the write process for all data instructed by the access source is detected, the channel adapter 221 notifies the access source of the end of the memory write process.

次に、メモリリード時は、データ転送コントロール部2
26は、アドレスレジスタ221にセットされたアドレ
スによりキャッシュメモリ21をアクセスし、キャッシ
ュメモリ21よりリードされた所定バイト数のデータを
、−時データレジスタ225に格納した後、チャネルア
ダプタ22゜を介して、アクセス元に転送する。
Next, when reading memory, the data transfer control unit 2
26 accesses the cache memory 21 using the address set in the address register 221, stores a predetermined number of bytes of data read from the cache memory 21 in the -time data register 225, and then outputs the data via the channel adapter 22°. , forward to the access source.

同時に、データ転送コントロール部226は、リードし
たデータのバイト数だけアドレスレジスタ221のアド
レス値を加算し、同じくリードしたデータのバイト数だ
けデータバイトカウンタ222のバイト数を減算する更
新処理を行う。
At the same time, the data transfer control unit 226 performs an update process of adding the address value of the address register 221 by the number of bytes of the read data and subtracting the number of bytes of the data byte counter 222 by the number of bytes of the read data.

以下同様にして、アドレスレジスタ221のアドレスで
キャッシュメモリ21よりリードしたデータを、データ
レジスタ225及びチャネルアダプタ22.を介してア
クセス元に転送し、リードデータのバイト数分だけアド
レスレジスタ221及びデータバイトカウンタ222の
内容を更新する。
Thereafter, in the same manner, data read from the cache memory 21 using the address of the address register 221 is transferred to the data register 225 and the channel adapter 22. and updates the contents of the address register 221 and data byte counter 222 by the number of bytes of read data.

データバイトカウンタ222の値がOになったことによ
り、アクセス元より指示された全データのリード処理の
終了が検出されると、チャネルアダプタ22.は、アク
セス元にメモリリード処理の終了を通知する。
When the value of the data byte counter 222 becomes O and the end of the read process for all data instructed by the access source is detected, the channel adapter 22. notifies the access source of the end of memory read processing.

以上のようにして、キャッシュメモリ2Iに対するデー
タのり一ド/ライトが行われる。フォーマットライトの
ようにレコードのフォーマットが変更される場合は、各
レコードのカウント部、キ一部及びデータ部について、
それらのアドレスが算出されて、前述のり一ド/ライト
処理が行われる。
In the manner described above, data is read/written to the cache memory 2I. When the format of a record is changed, such as with a format write, the count section, key section, and data section of each record should be changed.
These addresses are calculated and the above-mentioned read/write processing is performed.

以上のようにすることにより、CPUは外部記憶装置と
の処理速度差や外部記憶装置の現在の動作状態を意識す
ることなく、通常のメモリに対すると同様にして外部記
憶装置に対するリード/ライトを高速に行うことができ
る。
By doing the above, the CPU can read and write to the external storage device at high speed in the same way as normal memory, without being aware of the processing speed difference with the external storage device or the current operating state of the external storage device. can be done.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来のディスクキャッシュシステムにおけるキャッシュ
メモリ制御方式は、前述のように、チャネルアダプタ側
で、アクセスするキャッシュメモリ上のアドレスを算出
していた。
In the conventional cache memory control method in a disk cache system, as described above, the channel adapter side calculates the address on the cache memory to be accessed.

このチャネルアダプタ側で行われるアドレス計算は、ハ
ード化することが困難なことからファームウェアで行わ
れるため、アドレス計算の高速化が困難であり、キャッ
シュメモリに対するリード/ライトを高速化しにくいと
いう問題があった。
The address calculation performed on the channel adapter side is difficult to implement in hardware, so it is performed in firmware. Therefore, it is difficult to speed up address calculation, and there is a problem that it is difficult to speed up read/write to cache memory. Ta.

特にフォーマットライトの場合は、各レコードのカウン
ト部、キ一部及びデータ部について、それらのアドレス
を計算する必要があるため、キャッシュメモリに対する
リード/ライトの高速化が困難であった。
Particularly in the case of format writing, it is necessary to calculate the addresses of the count section, key section, and data section of each record, making it difficult to increase the speed of reading/writing from and to the cache memory.

また、キャッシュメモリをアクセスするアドレス計算を
全てチャネルアダプタ側で行っていたために、チャネル
アダプタの負荷が増大し、この点からも処理の高速が妨
げられるという問題があった。
Furthermore, since all address calculations for accessing the cache memory are performed on the channel adapter side, the load on the channel adapter increases, which also poses a problem in that high-speed processing is hindered.

本発明は、キャッシュメモリをアクセスするアドスの算
出をキャッシュメモリアクセス制御手段側で行わせるこ
とにより、アドレス算出部分をハード化してアクセスア
ドレスの算出を高速化するとともに、チャネルアダプタ
側の負荷を低減させて、全体のキャッシュメモリに対す
るリード/ライト処理を高速化するように改良したキャ
ッシュメモリ制御方式を提供することを目的とする。
The present invention allows the cache memory access control means to calculate the address for accessing the cache memory, thereby making the address calculation part hardware, speeding up the calculation of the access address, and reducing the load on the channel adapter side. An object of the present invention is to provide an improved cache memory control method that speeds up read/write processing for the entire cache memory.

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

前述の課題を解決するために本発明が採用した手段を、
第1図を参照して説明する。本発明は、第5図及び第6
図で説明したディスクコントロール装置のキャッシュメ
モリアクセス制御手段22の改良に係るものであり、キ
ャッシュメモリアクセス制御手段以外の構成は、第5図
の構成と共通する。
The means adopted by the present invention to solve the above-mentioned problems are as follows:
This will be explained with reference to FIG. The present invention is illustrated in FIGS. 5 and 6.
This is an improvement of the cache memory access control means 22 of the disk control device explained in the figure, and the configuration other than the cache memory access control means is the same as the configuration of FIG. 5.

第1図は、本発明の基本構成、すなわちキャッシュメモ
リアクセス制御手段■0の基本構成をブロック図で示し
たものである。
FIG. 1 is a block diagram showing the basic configuration of the present invention, that is, the basic configuration of cache memory access control means (2)0.

第1図のキャッシュメモリアクセス制御手段10におい
て、11はアドレスレジスタであり、キャッシュメモリ
をアクセスするアドレスがセットされる。
In the cache memory access control means 10 shown in FIG. 1, 11 is an address register in which an address for accessing the cache memory is set.

12はIDレジスタであり、アクセス対象となるレコー
ドの識別番号がセットされる。
Reference numeral 12 is an ID register, in which the identification number of the record to be accessed is set.

13はコマンド解析手段であり、アクセス元からのコマ
ンドを解析して、リード/ライトの識別処理、キャッシ
ュメモリ21をアクセスするスタートアドレスをアドレ
スレジスタ11にセットする処理、アクセス対象レコー
ドの識別番号をIDレジスタ12にセットする処理等を
行う。
Reference numeral 13 denotes a command analysis means, which analyzes the command from the access source, performs read/write identification processing, sets the start address for accessing the cache memory 21 in the address register 11, and identifies the identification number of the record to be accessed using the ID. Processing such as setting in the register 12 is performed.

14はアドレス更新手段であり、アドレスレジスタ11
のアドレスでキャッシュメモリ21をアクセスし、キャ
ッシュメモリ21から読み出されたレコードのカウント
部を解析し、読み出されたレコードの識別番号とIDレ
ジスタ12にセットされた識別番号が一致するまで、前
記読み出されたカウント部のデータに基づくアドレスレ
ジスタのアドレスの更新と、レコードのリードを繰り返
す処理を行う。
14 is an address updating means, and the address register 11
The cache memory 21 is accessed at the address of , the count part of the record read from the cache memory 21 is analyzed, and the above-mentioned process is performed until the identification number of the read record matches the identification number set in the ID register 12. A process of repeatedly updating the address of the address register based on the read data of the count section and reading the record is performed.

〔作 用〕[For production]

図示しないチャネルアダプタは、アクセス元からのコマ
ンドをキャッシュメモリアクセス制御手段10のコマン
ド解析部13に送る。
A channel adapter (not shown) sends the command from the access source to the command analysis section 13 of the cache memory access control means 10.

コマンド解析手段13はアクセス元からのコマンドを解
析して、コマンドがリード/ライトのいずれであるか識
別するとともに、キャッシュメモI721をアクセスす
るスタートアドレスをアドレスレジスタ11にセットし
、アクセス対象レコードの識別番号をIDレジスタ12
にセットする。
The command analysis means 13 analyzes the command from the access source, identifies whether the command is for reading or writing, sets the start address for accessing the cache memo I 721 in the address register 11, and identifies the record to be accessed. ID register number 12
Set to .

アドレス更新手段14は、アドレスレジスタ11のアド
レスでキャッシュメモリ21をアクセスし、キャッシュ
メモリ21から読み出されたレコードのカウント部を解
析して、読み出されたカウント部からキー長KL及びデ
ータ長DLを求め、更に読み出されたレコードの識別番
号とIDレジスタ12にセットされた識別番号を比較す
る。
The address update means 14 accesses the cache memory 21 with the address of the address register 11, analyzes the count part of the record read from the cache memory 21, and extracts the key length KL and data length DL from the read count part. Then, the identification number of the read record is compared with the identification number set in the ID register 12.

両者が一致しないときは、前記カウント部から取り出さ
れたキー長KL及びデータ長DLによりアドレスレジス
タの値を次のレコードのアドレスに更新し、この更新さ
れたアドレスでキャッシュメモリ21をアクセスし、キ
ャッシュメモリ21から読み出されたレコードのカウン
ト部の識別番号とIDレジスタ12にセットされた識別
番号を比較する。
If the two do not match, the value of the address register is updated to the address of the next record using the key length KL and data length DL taken out from the count section, and the cache memory 21 is accessed with this updated address, and the cache memory 21 is accessed using the updated address. The identification number in the count section of the record read from the memory 21 is compared with the identification number set in the ID register 12.

以下同様にして、キャッシュメモリ21から読み出され
たレコードのカウント部の識別番号とIDレジスタ12
にセットされた識別番号が一致するまで、前記読み出さ
れたカウント部のデータに基づくアドレスレジスタのア
ドレスの更新と、レコードのリードを繰り返す。
Thereafter, in the same manner, the identification number of the count section of the record read from the cache memory 21 and the ID register 12
The updating of the address in the address register based on the read data in the count section and the reading of the record are repeated until the set identification numbers match.

キャッシュメモリ21より読み出されたレコードのカウ
ント部の識別番号とIDレジスタ12にセットされた識
別番号が一致したときは、そのレコードがアクセス対象
のレコードであるので、以下、従来と同様にして図示し
ないデータ転送コントロール部により、アクセス元から
のコマンドに従って、キャッシュメモリ21に対するリ
ード/ライトが行われる。
When the identification number in the count section of the record read from the cache memory 21 and the identification number set in the ID register 12 match, that record is the record to be accessed, and henceforth the illustration will be performed in the same manner as in the past. A data transfer control unit that does not perform read/write operations on the cache memory 21 according to commands from the access source.

以上のように、キャッシュメモリアクセス制御手段10
側で、キャッシュメモリ21をアクセスするアドレスの
計算を行うようにしたので、アドレス計算部分のハード
化が容易になり、アドレス計算の高速化することが可能
となった。
As described above, the cache memory access control means 10
Since the address for accessing the cache memory 21 is calculated on the side, the address calculation part can be easily made into hardware, making it possible to speed up the address calculation.

また、これによりチャネルアダプタ側は、スタートアド
レスとアクセス対処レコードの識別番号IDをキャッシ
ュメモリアクセス制御手段10に送るだけでよいので、
チャネルアダプタの負荷が低減されて、全体のキャッシ
ュメモリに対するリード/ライト処理を高速化すること
ができる。
Additionally, the channel adapter side only needs to send the start address and the identification number ID of the access handling record to the cache memory access control means 10.
The load on the channel adapter is reduced, making it possible to speed up read/write processing for the entire cache memory.

〔実施例〕〔Example〕

本発明の一実施例を、第2図及び第3図を参照して説明
する。第2図は本発明の一実施例の構成の説明図、第3
図は同実施例の動作フローチャートである。
An embodiment of the present invention will be described with reference to FIGS. 2 and 3. FIG. 2 is an explanatory diagram of the configuration of one embodiment of the present invention, and FIG.
The figure is an operation flowchart of the same embodiment.

(A)実施例の構成 第2図において、キャッシュメモリアクセス制御手段1
0、アドレスレジスタ11、IDレジスタ12、コマン
ド解析手段13及びアドレス更新手段14については、
第1図で説明したとおりである。また、ディスクコント
ロール装置におけるキャッシュメモリアクセス制御手段
10以外の各構成は、第5図で説明した各構成と共通す
る。
(A) Configuration of embodiment In FIG. 2, cache memory access control means 1
0, address register 11, ID register 12, command analysis means 13 and address update means 14,
This is as explained in FIG. Further, each configuration other than the cache memory access control means 10 in the disk control device is common to each configuration explained in FIG.

コマンド解析手段13において、131はコマンドレジ
スタであり、図示しないチャネルアダプタを介してアク
セス元から転送されたコマンドが格納される。
In the command analysis means 13, 131 is a command register in which a command transferred from an access source via a channel adapter (not shown) is stored.

132はコマンド解析部であり、コマンドレジスタ13
1に格納されたアクセス元からのコマンドを解析して、
リード/ライトを識別する処理、キャッシュメモリ21
をアクセスするスタートアドレスをアドレスレジスタ1
1にセットする処理、アクセス対象レコードの識別番号
をIDレジスタ12にセットする処理、アクセス元がら
指示されたり一ド/ライトするデータ長をデータバイト
カウンタにセットする処理を行う。
132 is a command analysis section, and the command register 13
Analyze the command from the access source stored in 1,
Processing to identify read/write, cache memory 21
Set the start address to access address register 1
1, the identification number of the record to be accessed is set in the ID register 12, and the data length specified by the access source or to be read/written at one time is set in the data byte counter.

アドレス更新手段14において、141はカウント長レ
ジスタであり、レコードのカウント部のカウント長CL
がセットされる。142はキー長レジスタであり、レコ
ードのキ一部のキー長KLがセットされる。143はデ
ータ長レジスタであり、レコードのデータ部のデータ長
DLがセットされる。
In the address updating means 14, 141 is a count length register, and the count length CL of the count section of the record
is set. 142 is a key length register in which the key length KL of the key part of the record is set. 143 is a data length register in which the data length DL of the data portion of the record is set.

また、144はアドレス加算器であり、カウント部解析
部の指示に従って、カウント長レジスタ141、キー長
レジスタ142及びデータ長レジスタ143の値を適宜
加算して、キャッシュメモリ21をアクセスするアドレ
スを算出して、アドレスレジスタ11にセットする。
Further, 144 is an address adder, which adds the values of the count length register 141, key length register 142, and data length register 143 as appropriate in accordance with the instructions from the counting section analysis section to calculate the address for accessing the cache memory 21. and set it in the address register 11.

145はカウント部解析部であり、アドレスレジスタ1
1のアドレスでキャッシュメモリ21をアクセスし、キ
ャッシュメモリ21から読み出されたレコードのカウン
ト部を解析し、読み出されたレコードの識別番号とID
レジスタ12にセットされた識別番号が一致するまで、
前記読み出されたカウント部のデータに基づくアドレス
レジスタのアドレスの更新と、レコードのリードを繰り
返す処理を行う。
145 is a counting section analysis section, and address register 1
The cache memory 21 is accessed with address 1, the count part of the record read from the cache memory 21 is analyzed, and the identification number and ID of the read record are obtained.
Until the identification numbers set in register 12 match,
A process of repeatedly updating the address of the address register based on the read data of the count section and reading the record is performed.

15はデータバイトカウンタであり、キャッシュメモリ
21にリード/ライトされるデータのバイト数がセット
される。
15 is a data byte counter, and the number of bytes of data to be read/written to the cache memory 21 is set.

16はデータレジスタであり、キャッシュメモIJ 2
1にリード/ライトするデータが一時格納される。
16 is a data register, and cache memory IJ2
Data to be read/written is temporarily stored in 1.

17はデータ転送コントロール部であり、キャッシュメ
モリ21にリード/ライトするデータの転送制御、デー
タ転送に伴うデータバイトカウンタ222の内容を更新
する処理を行う。
A data transfer control unit 17 controls the transfer of data to be read/written to the cache memory 21 and updates the contents of the data byte counter 222 in conjunction with the data transfer.

(B)実施例の動作 実施例の動作を、第4図のフローチャートを参照し、そ
の処理ステップに従って説明する。
(B) Operation of the Embodiment The operation of the embodiment will be explained according to its processing steps with reference to the flowchart of FIG. 4.

なお、以下の実施例はフォーマットライト時の場合であ
り、他の処理はこのフォーマットライト処理動作から容
易に理解することができる。フォーマットライト時は、
アクセス元より、−回のサーチIDとライトCKDのコ
マンドが発行される。
Note that the following embodiment is for the case of format writing, and other processing can be easily understood from this format writing processing operation. When writing format,
The access source issues -times search ID and write CKD commands.

(1)ステップSI アクセス元は、サーチIDのコマンドを発行し、リード
/ライトの区別、キャッシュメモリ21をアクセスする
スタートアドレス及びアクセス対象レコードの識別番号
IDをディスクコントロール装置に指示する。
(1) Step SI The access source issues a search ID command and instructs the disk control device about the read/write distinction, the start address for accessing the cache memory 21, and the identification number ID of the record to be accessed.

ディスクコントロール装置のチャネルアダプタは、この
コマンドを受信して解析し、サーチIDのコマンドであ
ることを検知すると、コマンドとともにこのサーチID
のコマンドをキャッシュメモリアクセス制御手段10の
コマンドレジスタ131に転送し格納する。
The channel adapter of the disk control device receives and analyzes this command, and if it detects that it is a search ID command, it sends this search ID along with the command.
The command is transferred to the command register 131 of the cache memory access control means 10 and stored therein.

(2)ステップS2 コマンド解析部132は、コマンドレジスタ131に格
納されたアクセス元からのサーチIDのコマンドを解析
して、リード/ライトのいずれであるかを識別するとと
もに、キャッシュメモリ21をアクセスするスタートア
ドレスをアドレスレジスタ11にセットし、アクセス対
象レコードの識別番号をIDレジスタ12にセットする
処理を行う。
(2) Step S2 The command analysis unit 132 analyzes the command of the search ID from the access source stored in the command register 131, identifies whether it is a read or write command, and accesses the cache memory 21. The start address is set in the address register 11, and the identification number of the record to be accessed is set in the ID register 12.

(3)ステップS3、ステップS4 コマンド解析部145は、アドレスレジスタ11のアド
レスでキャッシュメモリ21をアクセスし、キャッシュ
メモリ21から読み出されたレコードのカウント部を解
析しくステップS3)、読み出されたカウント部から取
り出されたキー長KL及びデータ長DLを、キー長レジ
スタ142及びデータ長レジスタ143にそれぞれセッ
トする(ステップS4)。なお、カウント部のデータ長
DLは28バイトで一定であるので、予めカウント長レ
ジスタ141にセットされている。
(3) Step S3, Step S4 The command analysis unit 145 accesses the cache memory 21 with the address of the address register 11, and analyzes the count part of the record read from the cache memory 21. The key length KL and data length DL taken out from the count section are set in the key length register 142 and data length register 143, respectively (step S4). Note that since the data length DL of the count section is constant at 28 bytes, it is set in the count length register 141 in advance.

(4)ステップS5 コマンド解析部145は、読み出されたレコードの識別
番号とIDレジスタ12にセントされた識別番号を比較
する。
(4) Step S5 The command analysis unit 145 compares the identification number of the read record with the identification number written in the ID register 12.

(5)ステップSb 両者が一致しないときは、コマンド解析部145はアド
レス加算器144に指示し、キー長レジスタ142及び
データ長レジスタ143にセントされているキー長KL
及びデータ長DLを加算して、アドレスレジスタ11の
値を、次のレコードの先頭アドレス値に更新させる。
(5) Step Sb When the two do not match, the command analysis unit 145 instructs the address adder 144 to input the key length KL stored in the key length register 142 and data length register 143.
and data length DL, and the value of the address register 11 is updated to the start address value of the next record.

(6)以下コマンド解析部145は前述のステップS2
・〜ステップS6の処理を繰り返し、キャッシュメモリ
21から読み出されたレコードのカウント部の識別番号
とIDレジスタ12にセットされた識別番号が一致する
まで、前記読み出されたカウント部のデータに基づくア
ドレスレジスタ11のアドレスの更新と、レコードのリ
ードを繰り返し実行する。
(6) Below, the command analysis unit 145 performs the above-mentioned step S2.
- Repeat the process of step S6 until the identification number of the count section of the record read from the cache memory 21 and the identification number set in the ID register 12 match, based on the data of the read count section. Update of the address in the address register 11 and reading of the record are repeated.

(7)ステップS。(7) Step S.

キャッシュメモリ21から読み出されたレコードのカウ
ント部の識別番号とIDレジスタ12にセットされた識
別番号が一致したときは、サーチIDのコマンドの終了
をアクセス元に通知して、次のコマンドを待つ。
When the identification number in the count section of the record read from the cache memory 21 and the identification number set in the ID register 12 match, the access source is notified of the end of the search ID command and waits for the next command. .

(8)ステップSB アクセス元は、レコードのカウント部、キー部及びデー
タ部に対するライトを行うフォーマットライトのときは
ライトCKDのコマンドを発行する。
(8) Step SB The access source issues a write CKD command when performing a format write that writes to the count section, key section, and data section of the record.

ディスクコントロール装置のチャネルアダプタは、この
コマンドを受信して解析し、ライトCKDのコマンドで
あることを検知すると、このライトCKDのコマンドを
キャッシュメモリアクセス制御手段10のコマンドレジ
スタ131に転送し格納する。
The channel adapter of the disk control device receives and analyzes this command, and when detecting that it is a write CKD command, transfers this write CKD command to the command register 131 of the cache memory access control means 10 and stores it therein.

コマンド解析部132は、コマンドレジスタ131に格
納されたアクセス元からのサーチIDのコマンドを解析
して、レコードのどの部分(カウント部、キ一部、デー
タ部、次のレコードのカウント部、キ一部、データ部等
)に対するリード/ライトであるかを識別する。
The command analysis unit 132 analyzes the command of the search ID from the access source stored in the command register 131, and determines which part of the record (count part, key part, data part, count part of the next record, key part). data section, data section, etc.).

(9)  ライトCKDのコマンドでカウント部のライ
トを行うものであるときは、コマンド解析部132は、
カウント長レジスタ141にあるデータ長DLを、デー
タバイトカウンタ15にセットする。
(9) When the write CKD command is to write the count section, the command analysis section 132
The data length DL in the count length register 141 is set in the data byte counter 15.

00)ステップSIO カウント部のデータのライトを行う際、コマンド解析部
145は、前述のステップS4の処理と同様にして、カ
ウント部から取り出されたキー長KL及びデータ長DL
を、キー長レジスタ142及びデータ長レジスタ143
にそれぞれセットする。
00) Step SIO When writing data in the count section, the command analysis section 145 uses the key length KL and data length DL extracted from the count section in the same way as the process in step S4 described above.
, key length register 142 and data length register 143
Set each.

以下、第5図及び第6図で説明した従来方式と同様にし
て、データレジスタ16及びデータ転送コントロール部
17により、カウント部のデータのライト処理が行われ
、データバイトカウンタ15の値が0になったときに、
カウント部のライト処理が終了する。
Thereafter, in the same way as in the conventional method explained in FIGS. 5 and 6, the data register 16 and the data transfer control section 17 perform the write process of the data in the count section, and the value of the data byte counter 15 becomes 0. When it becomes
The write processing of the count section ends.

(11)  ステップSl+ キ一部のライトを行うときは、コマンド解析部132は
、キー長レジスタ142にあるキー長KLを、データバ
イトカウンタ15にセットする。
(11) Step Sl+ When performing a partial write, the command analysis unit 132 sets the key length KL in the key length register 142 to the data byte counter 15.

以下、カウント部の場合と同様にして、キー部のデータ
のライト処理が行われる。
Thereafter, write processing of data in the key section is performed in the same manner as in the case of the count section.

02)  ステップ312 データ部のライトを行うときは、コマンド解析部132
は、データ長レジスタ143にあるデータ長DLを、デ
ータバイトカウンタ15にセットする。
02) Step 312 When writing the data section, the command analysis section 132
sets the data length DL in the data length register 143 to the data byte counter 15.

以下、カウント部の場合と同様にして、データ部のデー
タのライト処理が行われる。
Thereafter, write processing of data in the data section is performed in the same manner as in the case of the count section.

いずれの場合も、データバイトカウンタ15の値が0に
なったときに、各部のライト処理が終了する。
In either case, when the value of the data byte counter 15 becomes 0, the write processing of each part ends.

以上フォーマットライトの場合の実施例について説明し
たが、キ一部だけのライト処理やデータ部だけのライト
処理も、同様にして行われる。キ一部のライトを行うと
きは、サーチID及びライトKDのコマンドが発行され
、データ部のライトを行うときは、サーチID及びライ
トDのコマンドが発行される。
Although the embodiment in the case of format writing has been described above, write processing of only a portion of the key or write processing of only the data portion is performed in the same manner. When writing a portion of the data section, a search ID and write KD command are issued, and when writing a data section, a search ID and write D command are issued.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば次の諸効果が得ら
れる。
As explained above, according to the present invention, the following effects can be obtained.

(1)キャッシュメモリアクセス制御手段10側で、キ
ャッシュメモリ21をアクセスするアドレスの計算を行
うようにしたので、アドレス計算部分のハード化が容易
になり、アドレス計算の高速化することが可能である。
(1) Since the address for accessing the cache memory 21 is calculated on the cache memory access control means 10 side, the address calculation part can be easily made into hardware, making it possible to speed up the address calculation. .

(2)チャネルアダプタ側の負荷が低減されて、全体の
キャッシュメモリに対するリード/ライト処理を高速化
することができる。
(2) The load on the channel adapter side is reduced, making it possible to speed up read/write processing for the entire cache memory.

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

第1図は本発明の基本構成の説明図、 第2図は本発明の一実施例の構成の説明図、第3図は同
実施例の動作フローチャート、第4図はレコードのフォ
ーマットの説明図、第5図は従来のディスクコントロー
ル装置の説明図、 第6図は従来のディスクコントロール装置のキャッシュ
メモリアクセス制御手段の説明図である。 第1図及び第2図において、 10・・・キャッシュメモリアクセス制御手段、11・
・・アドレスレジスタ、12・・・IDレジスタ、13
・・・コマンド解析手段、14・・・アドレス更新手段
、21・・・キャッシュメモリ。
Fig. 1 is an explanatory diagram of the basic configuration of the present invention, Fig. 2 is an explanatory diagram of the configuration of an embodiment of the present invention, Fig. 3 is an operational flowchart of the embodiment, and Fig. 4 is an explanatory diagram of the record format. , FIG. 5 is an explanatory diagram of a conventional disk control device, and FIG. 6 is an explanatory diagram of cache memory access control means of the conventional disk control device. In FIG. 1 and FIG. 2, 10...cache memory access control means, 11.
... Address register, 12 ... ID register, 13
. . . Command analysis means, 14 . . Address updating means, 21 . . . Cache memory.

Claims (1)

【特許請求の範囲】 複数のアクセス元が共用するキャッシュメモリ(21)
と、このキャッシュメモリ(21)に対するアクセスを
コントロールするキャッシュメモリアクセス制御手段(
10)を備えたディスクコントロール装置のキャッシュ
メモリ制御方式において、 (a)キャッシュメモリ(21)をアクセスするアドレ
スがセットされるアドレスレジスタ(11)と、 (b)アクセス対象となるレコードの識別番号がセット
されるIDレジスタ(12)と、 (c)アクセス元からのコマンドを解析して、キャッシ
ュメモリをアクセスするスタートアドレスをアドレスレ
ジスタ(11)にセットし、アクセス対象レコードの識
別番号をIDレジスタ(12)にセットするコマンド解
析手段(13)と、 (d)キャッシュメモリ(11)から読み出されたレコ
ードのカウント部を解析し、読み出されたレコードの識
別番号とIDレジスタ(11)にセットされた識別番号
が一致するまで、前記読み出されたカウント部のデータ
に基づいてアドレスレジスタのアドレスを更新するアド
レス更新手段(14)、 を前記キャッシュメモリアクセス制御手段(10)に設
けたことを特徴とするキャッシュメモリ制御方式。
[Claims] Cache memory shared by multiple access sources (21)
and cache memory access control means (21) for controlling access to this cache memory (21).
10) In a cache memory control method of a disk control device equipped with (a) an address register (11) in which an address for accessing the cache memory (21) is set, and (b) an identification number of a record to be accessed, (c) Analyzes the command from the access source, sets the start address for accessing the cache memory in the address register (11), and sets the identification number of the record to be accessed in the ID register (11). (d) analyzes the count part of the record read from the cache memory (11), and sets the identification number and ID register (11) of the read record; The cache memory access control means (10) is provided with an address update means (14) for updating the address of the address register based on the read data of the count section until the identified identification numbers match. Characteristic cache memory control method.
JP2068244A 1990-03-20 1990-03-20 Cache memory control system Pending JPH03269744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2068244A JPH03269744A (en) 1990-03-20 1990-03-20 Cache memory control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2068244A JPH03269744A (en) 1990-03-20 1990-03-20 Cache memory control system

Publications (1)

Publication Number Publication Date
JPH03269744A true JPH03269744A (en) 1991-12-02

Family

ID=13368164

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2068244A Pending JPH03269744A (en) 1990-03-20 1990-03-20 Cache memory control system

Country Status (1)

Country Link
JP (1) JPH03269744A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014128967A1 (en) * 2013-02-25 2014-08-28 株式会社日立製作所 Storage control device and data write completion sensing method
WO2014128975A1 (en) * 2013-02-25 2014-08-28 株式会社日立製作所 Storage device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014128967A1 (en) * 2013-02-25 2014-08-28 株式会社日立製作所 Storage control device and data write completion sensing method
WO2014128975A1 (en) * 2013-02-25 2014-08-28 株式会社日立製作所 Storage device
US8949537B2 (en) 2013-02-25 2015-02-03 Hitachi, Ltd. Storage control apparatus and method for detecting write completion of data

Similar Documents

Publication Publication Date Title
US6782465B1 (en) Linked list DMA descriptor architecture
US20050114561A1 (en) Method for performing DMA transfers with dynamic descriptor structure
US7483920B2 (en) Database management system, database management method, and program
CN1963950A (en) Semiconductor storage device equipped with ecc function
JPS5898893A (en) Information processing device
CN111291022B (en) Data storage system based on block chain
JPH03269744A (en) Cache memory control system
JP2770917B2 (en) Information recording / reproducing device
JPS61241825A (en) Data transfer method
JPS6041124A (en) Magnetic disc control device
JPH0341557A (en) Data retrieving device
JPS6162124A (en) Data transfer system
KR20230012970A (en) Key packing for flash key value store operations
JPH01166148A (en) Memory access device
JPH01251248A (en) Cache control system for stack data structure
JPS62256058A (en) Control system for address converting buffer
JPS59195753A (en) Control system of disc cache memory
JPS63148349A (en) Cache memory positioning system
JPS62271029A (en) Disk cache control system
JPH04199338A (en) Data base management system
JPH01114962A (en) Direct memory access controller
JPS6346555A (en) Control system for cache memory
JPH02287661A (en) Data access system
JPS63241648A (en) Disk controller
JPS61183787A (en) Data variation detecting circuit