JPH03268043A - Disk cache control system - Google Patents

Disk cache control system

Info

Publication number
JPH03268043A
JPH03268043A JP2067032A JP6703290A JPH03268043A JP H03268043 A JPH03268043 A JP H03268043A JP 2067032 A JP2067032 A JP 2067032A JP 6703290 A JP6703290 A JP 6703290A JP H03268043 A JPH03268043 A JP H03268043A
Authority
JP
Japan
Prior art keywords
cache memory
data
segments
slot
cache
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
JP2067032A
Other languages
Japanese (ja)
Inventor
Masaji Ozawa
匡二 小澤
Yoshihiro Azumi
安積 義弘
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2067032A priority Critical patent/JPH03268043A/en
Publication of JPH03268043A publication Critical patent/JPH03268043A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ディスクキャッシュ制御技術に関し、特に、
キャッシュメモリを有する記憶階層におけるデータの授
受の高速化などに有効な技術に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to disk cache control technology, and in particular,
The present invention relates to a technique effective for speeding up data exchange in a storage hierarchy having a cache memory.

〔従来の技術〕[Conventional technology]

たとえば、汎用の電子計算機システムなどにおいては、
動作の高速な中央処理装置やチャネル装置などの上位処
理装置と、外部記憶装置としての磁気ディスク装置との
間に、磁気ディスク装置などよりも動作の墨かに高速な
半導体メモリなどからなるキャッシュメモリを介在させ
ることが知られている。
For example, in general-purpose computer systems,
Cache memory consisting of semiconductor memory, etc., which operates much faster than magnetic disk devices, is installed between high-level processing units such as central processing units and channel devices that operate at high speed, and magnetic disk drives as external storage devices. It is known to intervene.

そして、上位処理装置による磁気ディスク装置からのデ
ータの読み出し要求に際して、可能な限り、予めキャッ
シュメモリに複写されているデー夕を用いて応答したり
、上位処理装置から磁気ディスク装置へのデータの書き
込みに際して、キャッシュメモリに当該データを書き込
んだ時点で動作完了を上位処理装置に報告するなどの動
作を行うことにより、磁気ディスクの回転待ちなどのた
めに動作の遅い磁気ディスク装置に直接的にアクセスす
ることによる、上位処理装置の処理速度の低下を緩和し
ようとするものである。
When a higher-level processing unit requests a read of data from a magnetic disk device, the higher-level processing unit responds using the data that has been copied in advance to the cache memory whenever possible, or writes data from the higher-level processing unit to the magnetic disk unit. In this case, by performing operations such as reporting the completion of the operation to the upper processing unit at the time the relevant data is written to the cache memory, it is possible to directly access the magnetic disk device that is operating slowly due to waiting for rotation of the magnetic disk, etc. This is intended to alleviate the decrease in the processing speed of the upper-level processing device due to this.

ところで、このようなキャッシュメモリの管理技術とし
ては、従来では、たとえば特開昭59114658号公
報に開示されているように、キャッシュメモリへのデー
タの書き込みの際には、当該データの量に関わらず、ま
ず磁気ディスク装置における1トラック分の容量に相当
する充分な領域を確保し、書き込み終了後に、確保した
領域のうち、当該書き込み処理による正味使用領域以外
の記憶領域を解放するという操作を行うことが知られて
いる。
By the way, conventional techniques for managing such cache memory include, for example, as disclosed in Japanese Unexamined Patent Publication No. 59114658, when data is written to the cache memory, regardless of the amount of data, First, a sufficient area corresponding to the capacity of one track in the magnetic disk device is secured, and after writing is completed, the storage area other than the area net used by the writing process is released from the secured area. It has been known.

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

ところが、上記の従来技術では、データ量が予め確保し
た記憶領域に満たない場合には、不必要な記憶領域の確
保および解放処理を行うこととなり、その分だけ上位処
理装置と磁気ディスク装置トノ間のキャッシュメモリを
介したデータ転送処理において冗長な時間くオーバーヘ
ッド)が増大するので、上位処理装置と磁気ディスク装
置との間における単位時間当たりのデータ転送量(スル
ーブツト)が低下し、システム全体の性能低下を生じる
という問題がある。
However, with the above-mentioned conventional technology, if the amount of data is less than the storage area secured in advance, unnecessary storage area must be secured and released, and the space between the host processing unit and the magnetic disk device is correspondingly reduced. As redundant time (overhead) increases in data transfer processing via the cache memory of There is a problem in that it causes deterioration.

また、キャッシュメモリへのデータの格納処理が集中し
た場合には、無駄な記憶領域の割り当てによる当該記憶
領域の不足が発生し、それまでに格納されている他のデ
ータの追い出しが頻繁になるため、データのキャッシュ
メモリにおける滞在時間が減少する結果、上位処理装置
の要求するデータが当該キャッシュメモリ内に存在する
確率(ヒツト率)が低下し、キャッシュメモリの効果が
薄れることが懸念される。
In addition, when the processing of storing data in the cache memory is concentrated, a shortage of storage area occurs due to wasteful allocation of storage area, and other data stored in the cache memory is frequently purged. As a result of the reduction in the residence time of data in the cache memory, there is a concern that the probability (hit rate) that the data requested by the higher-level processing device exists in the cache memory decreases, and the effectiveness of the cache memory decreases.

そこで、本発明の目的は、上位処理装置とディスク装置
との間で授受されるデータのキャッシュメモリへの格納
におけるオーバーヘッドの発生を防止して、上位処理装
置とディスク装置との間におけるデータ転送でのスルー
ブツトを向上させることが可能なディスクキャッシュ制
御方式を提供することにある。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to prevent the occurrence of overhead in storing data exchanged between an upper processing unit and a disk device in a cache memory, and to improve data transfer between the upper processing unit and a disk device. The object of the present invention is to provide a disk cache control method that can improve the throughput of the disk cache.

本発明の他の目的は、キャッシュメモリにおけるヒツト
率を向上させて、キャッシュメモリ有効利用を図ること
が可能なディスクキャッシュ制御方式を提供することに
ある。
Another object of the present invention is to provide a disk cache control method that can improve the hit rate in the cache memory and make effective use of the cache memory.

本発明の前記ならびにその他の目的と新規な特徴は、本
明細書の記述および添付図面から明らかになるであろう
The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

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

本願において開示される発明のうち、代表的なものの概
要を簡単に説明すれば、下記のとおりである。
A brief overview of typical inventions disclosed in this application is as follows.

すなわち、本発明になるディスクキャッシュ制御方式は
、上位処理装置と回転型記憶装置との間に介在し、両者
の間で授受されるデータを一時的に記憶するキャッシュ
メモリを、回転型記憶装置における物理的または論理的
な所定の記憶単位に対応したスロットに論理的に分割し
て管理し、個々のスロットには所定の長さの複数のセグ
メントを単位として当該キャッシュメモリの記憶領域を
割り当てるようにしたディスクキャッシュ制御方式であ
って、上位処理装置からアクセス要求されたデータのキ
ャッシュメモリへの格納に際して、当該データのキャッ
シュメモリへの書き込みに先立って、キャッシュメモリ
におけるスロットの拡張または新規なスロットの配置に
必要なセグメントの最少数を算出し、当該必要最少数の
セグメントを割り当てた後に、データの必要最少数の当
該セグメントへの書き込み動作を行わせるようにしたも
のである。
In other words, the disk cache control method according to the present invention uses a cache memory that is interposed between a higher-level processing device and a rotating storage device and temporarily stores data exchanged between the two in the rotating storage device. The cache memory is managed by logically dividing it into slots corresponding to a predetermined physical or logical storage unit, and the storage area of the cache memory is allocated to each slot in units of multiple segments of a predetermined length. A disk cache control method that expands slots in the cache memory or places new slots in the cache memory before writing the data to the cache memory when storing data requested for access from a higher-level processing unit in the cache memory. After calculating the minimum number of segments necessary for the data processing and allocating the minimum number of segments, data is written to the minimum number of segments.

〔作用〕[Effect]

上記した本発明のディスクキャッシュ制御方式によれば
、上位処理装置とディスク装置との聞授受されるデータ
のキャッシュメモリへの格納に際して、予め当該データ
の格納に必要な最少のセグメント数を算出し、当該必要
最少数のセグメント分の記憶領域を割り当てるので、た
とえば、データの多少に関わらず、スロットの最大セグ
メント数分の記憶領域を確保し、データを格納した後に
余剰のセグメントを解放する場合に比較して、無駄なセ
グメントの確保および解放に要するオーバーヘッドの発
生が無くなり、上位処理装置とディスク装置との間にお
けるデータ転送でのスルーブツトを向上させることがで
きる。
According to the disk cache control method of the present invention described above, when storing data exchanged between the host processing device and the disk device in the cache memory, the minimum number of segments required for storing the data is calculated in advance, Since the storage area for the required minimum number of segments is allocated, for example, regardless of the amount of data, the storage area for the maximum number of segments of the slot is secured, and the excess segments are released after storing the data. As a result, overhead required for securing and releasing unnecessary segments is eliminated, and throughput in data transfer between the host processing device and the disk device can be improved.

また、キャッシュメモリへのデータの格納処理が集中し
た場合でも、必要最少限の記憶領域を確保するだけなの
で、領域確保のために、それまで格納されていたデータ
の追い出し頻度の必要以上の増大に起因するデータのキ
ャッシュメモリにおける滞在時間の減少、すなわちヒツ
ト率の低下が防止され、キャッシュメモリの有効利用を
図ることができる。
In addition, even when data storage processing is concentrated in the cache memory, only the minimum necessary storage space is secured, so the frequency of purging previously stored data will not increase more than necessary in order to secure space. This prevents a decrease in the residence time of data in the cache memory, that is, a decrease in the hit rate, and makes it possible to effectively utilize the cache memory.

〔実施例〕〔Example〕

第1図は、本発明の一実施例であるディスクキャッシュ
制御方式の一例を示す流れ図であり、第2図は、このデ
ィスクキャッシュ制御方式を行うディスクキャッシュ制
御装置を含む電子31w機ンステムの構成の一例を示す
ブロック図、さらに第3図は、ディスクキャッシュ制御
装置の構成の一例を示すブロック図である。
FIG. 1 is a flowchart showing an example of a disk cache control method according to an embodiment of the present invention, and FIG. 2 is a flowchart showing the configuration of an electronic 31w system including a disk cache control device that performs this disk cache control method. FIG. 3 is a block diagram showing an example of the configuration of a disk cache control device.

まず、第2図および第3図を参照しながら、本実施例の
計算機システトの構成の概略を説明する。
First, an outline of the configuration of the computer system of this embodiment will be explained with reference to FIGS. 2 and 3.

中央処理装置10  (CPU)には、当該中央処理装
置10に代わって周辺機器などとの情報の授受の制御動
作を行うチャネル10aおよびディスクキャッシュ制御
装置11.磁気ディスク接続装置12を介して、複数の
磁気ディスク装置14が接続されている。
The central processing unit 10 (CPU) includes a channel 10a and a disk cache control unit 11, which perform control operations for exchanging information with peripheral devices on behalf of the central processing unit 10. A plurality of magnetic disk devices 14 are connected via a magnetic disk connection device 12 .

ディスクキャッシュ制御装置11は、第3図に示される
ように、ランダムアクセスメモリ (RAM)21に格
納されているマイクロプログラムに基づいて全体の制御
を行うマイクロプロセッサ(MPU>20と、上位のチ
ャネル10aとの間におけるデータ転送を制御する対チ
ャネル転送制御装置22と、下位の磁気ディスク装置1
4の側との間におけるデータ転送を制御する対ディスク
転送制御装置24と、チャネル−磁気ディスク装置間の
同期をとりつつデータ転送を制御するデータ転送制御回
路23とを備えている。
As shown in FIG. 3, the disk cache control device 11 includes a microprocessor (MPU>20) that performs overall control based on a microprogram stored in a random access memory (RAM) 21, and an upper channel 10a. a channel-to-channel transfer control device 22 that controls data transfer between the
4, and a data transfer control circuit 23 that controls data transfer while synchronizing between the channel and the magnetic disk device.

さらに、ディスクキャッシュ制御装置11には、磁気デ
ィスクの回転待ちなどの機械的な動作を伴う磁気ディス
ク装置14よりも浪かに高速なアクセスが可能な半導体
メモリなどで構成されるキャッシュメモリ50が設けら
れており、磁気ディスク装置14に格納されているデー
タのうち上位のチャネル10aの側からのアクセスされ
る確率の高いデータの写を保持したり、チャネル10a
から磁気ディスク装置14に書き込むべきデータを一時
的に保持するなどの動作を行うように構成されている。
Further, the disk cache control device 11 is provided with a cache memory 50 composed of a semiconductor memory or the like that can be accessed much faster than the magnetic disk device 14, which involves mechanical operations such as waiting for rotation of a magnetic disk. Among the data stored in the magnetic disk device 14, it holds a copy of data that has a high probability of being accessed from the upper channel 10a side.
It is configured to perform operations such as temporarily holding data to be written to the magnetic disk device 14 from the beginning.

この場合、キャッシュメモリ50は、スロットと呼ばれ
る所定の単位に分割して管理されており、さらに個々の
スロットは、所定容量のセグメントを単位として構成さ
れ、1スロツトが最大で磁気ディスク装置14における
1トラツクの容量に相当するセグメント数を含むように
設定されている。
In this case, the cache memory 50 is managed by being divided into predetermined units called slots, and each slot is configured as a unit of segment with a predetermined capacity. The number of segments is set to include the number of segments corresponding to the capacity of the track.

個々のスロットに格納されているデータと、当該データ
の磁気ディスク装置14における実際の格納位置との関
係は、サーチ管理テーブル30に記録されており、上位
のチャネル10aの側から、磁気ディスク装置14にお
けるシリンダ番号やトラック番号、レコード番号などに
基づくインターナルレコード番号などを指定して特定の
データに対するアクセス要求が発生した場合に、これら
の情報に基づいて当該サーチ管理テーブル30を参照す
ることで、当該データがキャッシュメモリ50に存在す
る(キャツシュヒツト)か否(キャツンユミス)かが判
るようになっている。
The relationship between the data stored in each slot and the actual storage position of the data in the magnetic disk device 14 is recorded in the search management table 30. When an access request for specific data is generated by specifying an internal record number based on a cylinder number, track number, record number, etc., by referring to the search management table 30 based on this information, It is possible to know whether the data exists in the cache memory 50 (cache hit) or not (cache miss).

また、キャッシュメモリ50における個々のスロットは
、スロットコントロールテーブル40によって管理され
ている。
Further, each slot in the cache memory 50 is managed by a slot control table 40.

ここで、第4図は磁気ディスク装置14におけるデータ
の記録形式と、キャッシュメモリ50におけるスロット
でのデータの記録形式との関係の一例を示したものであ
り、本実施例の場合には以下のような仕様になっている
ものとする。
Here, FIG. 4 shows an example of the relationship between the data recording format in the magnetic disk device 14 and the data recording format in the slot in the cache memory 50. It is assumed that the specifications are as follows.

すなわち、磁気ディスク装置14においては、(1)1
024シリンダ/デイスク (2)16トラツク/シリンダ (3)48にバイト/トラック また、キャッシュメモリ50においては、(4)204
8)ラック/キャッシュメモリ(5)8にバイト/セグ
メント (6)6セグメント/トラツク となっている。
That is, in the magnetic disk device 14, (1) 1
024 cylinders/disk (2) 16 tracks/cylinder (3) 48 bytes/track Also, in the cache memory 50, (4) 204
8) Rack/cache memory (5) 8 bytes/segment (6) 6 segments/track.

また、特に図示しないがスロットコントロールテーブル
40には、たとえばスロット番号、当該スロットを構成
する複数のセグメントの先頭のキャッシュメモリ50に
おけるアドレスを示すポインタ、当該スロットを構成す
るセグメント数、当該スロットに格納されている複数の
レコードのレコード長や最終レコード長などの情報が記
録された格納データ情報などが記録されている。
Although not particularly shown, the slot control table 40 includes, for example, a slot number, a pointer indicating the address in the cache memory 50 of the beginning of a plurality of segments that make up the slot, the number of segments that make up the slot, and information stored in the slot. Stored data information that records information such as the record lengths of multiple records and the final record length is recorded.

なお、個々スロットを構成する複数のセグメントは、キ
ャッシュメモリ50の内部において物理的に連続してい
る必要はなく、周知のリスト構造などによって管理する
ことにより、スロットの解放によって生じた不定数およ
び不定位置のセグメントを有効に利用するようになって
いる。
Note that the plurality of segments constituting each slot do not need to be physically contiguous inside the cache memory 50, and by managing them using a well-known list structure etc. The location segment is now used effectively.

以下、このような構成および仕様のシステムにおける作
用の一例を第1図の流れ図などを参照しながら説明する
An example of the operation of a system having such a configuration and specifications will be described below with reference to the flowchart of FIG. 1 and the like.

まず、中央処理装置10からチャネル10aを介してデ
ィスクキャッシュ制御装置11に、磁気ディスク装置1
4に格納されているデータに対するリード要求が発行さ
れた場合について説明する。
First, the magnetic disk device 1 is sent from the central processing unit 10 to the disk cache control device 11 via the channel 10a.
A case will be described in which a read request is issued for data stored in No. 4.

リード要求が、チャネルlOaから発行される、たとえ
ば以下のCCV (チャネル・コマンド・ワード)チエ
インで行われる場合、 LOC/RD  D/RD  D/ LOGコマンドでは、当該リード要求が目的とするレコ
ードの磁気ディスク装置14における格納位置を示すパ
ラメータが与えられ、また、個々のRD  Dコマンド
では、実際に磁気ディスク装置14から読み出すべき個
々のレコードの転送が行われる。
If a read request is issued from channel lOa, for example, in the following CCV (channel command word) chain, the LOC/RD D/RD D/LOG command will read the magnetic field of the record targeted by the read request. A parameter indicating the storage position in the disk device 14 is given, and each RDD command actually transfers each record to be read from the magnetic disk device 14.

なお、本実施例の場合には、2つのRD  Dコマンド
によって転送される2個のレコード(レコードカウント
−2)は各々4にバイトであり、当該レコードを含むス
ロットがキャッシュメモリ50に存在しない場合、すな
わちキャッシュミスで、磁気ディスク装置t14からキ
ャッシュメモリ50に当該レコードを格納する必要があ
る場合を説明する。
In the case of this embodiment, the two records (record count - 2) transferred by the two RDD commands each have 4 bytes, and if the slot containing the record does not exist in the cache memory 50. In other words, a case will be described in which it is necessary to store the record from the magnetic disk device t14 into the cache memory 50 due to a cache miss.

ディスクキャッシコ制御装置11は、チャネル10aか
らLOGコマンドを受領することにより、これから実行
するデータ転送の種類とそれに付随する制限を認識する
(ステップ101)。
By receiving the LOG command from the channel 10a, the disk cashico control device 11 recognizes the type of data transfer to be executed and the restrictions attached thereto (step 101).

本実施例の場合には、LOGコマンドを受は取った時点
で、リード要求であることを認識し、さらに当該レコー
ドの磁気ディスク装Wt14における格納位置情報に対
応したインターナルサーチレコード#などに基づいて、
サーチ管理テーブル30を検索する゛が(ステップ10
2)、前述のように、キャッシュメモリ50には目的の
レコード(スOット)が存在しないのでキャッシニミス
トナリ、キャッシュメモリ50における新たなスロット
(セグメント)の配置および磁気ディスク装置14から
当該スロット(セグメント)への当該レコードの複写を
行うスロットアロケートに移る。
In the case of this embodiment, when the LOG command is received, it is recognized that it is a read request, and further based on the internal search record # etc. corresponding to the storage position information of the record in the magnetic disk unit Wt14. hand,
Searching the search management table 30 (step 10)
2) As mentioned above, since the target record (slot) does not exist in the cache memory 50, the cache memory 50 requires the arrangement of a new slot (segment) in the cache memory 50 and the corresponding information from the magnetic disk device 14. The process moves to slot allocation, which copies the record to a slot (segment).

すなわち、まず、同コマンドに随伴したレコードカウン
トおよび転送長などから、総転送データ長を算出する。
That is, first, the total transfer data length is calculated from the record count and transfer length accompanying the command.

この場合、レコードカウント(2)X転送長4にバイト
より、総転送データ長=8にバイトを算出する(ステッ
プ103)’。
In this case, record count (2) x transfer length 4 bytes is used to calculate total transfer data length=8 bytes (step 103)'.

さらに、この総転送データ長8にバイトから、必要な割
り付はセグメント数1 (&!転送データ長8にバイト
/8にバイト/セグメント=1セグメント)を求め(ス
テップ104)、キャッシュメモリ50に対して1個の
セグメントを含む新たなスロットの割り付けを行い、磁
気ディスク装置14から当該1個のセグメントに該当デ
ータ(2個のレコード)を複写する(第5図(a) )
Furthermore, from this total transfer data length of 8 bytes, the required allocation is 1 segment (&! transfer data length of 8 bytes/8 bytes/segment = 1 segment) (step 104), and A new slot containing one segment is allocated to the corresponding segment, and the corresponding data (two records) is copied from the magnetic disk device 14 to the one segment (Fig. 5(a)).
.

なお、上位のチャネル10aの側へのリード要求された
データの転送は、キャッシュメモリ50への当該データ
の複写と並行して行ってもよいし、キャッシュメモリ5
0に一旦複写した後に、当該データを読み出して転送す
るようにしてもよい。
Note that the transfer of the read-requested data to the upper channel 10a may be performed in parallel with the copying of the data to the cache memory 50, or the data may be transferred to the upper channel 10a side.
After copying the data to 0, the data may be read and transferred.

ここで、従来の場合には、前述のように、前記スロット
の確保に際して、総転送データ長に関係なくスロットを
構成する最大セグメント数6を割り当ててデータ転送を
行った後、余剰の5個のセグメントを解放する操作を行
うため、当該5個のセグメントの確保および解放のため
のオーバーヘッドの発生がある。
Here, in the conventional case, as mentioned above, when securing the slot, after data transfer is performed by allocating the maximum number of segments that make up a slot, 6, regardless of the total transfer data length, the remaining 5 segments are Since the operation of releasing the segments is performed, overhead is generated for securing and releasing the five segments.

ところが、本実施例の場合には、前述のように、磁気デ
ィスク装置14からキャッシュメモリ50へのデータ転
送に先立って、予め、スロットを構成する必要最少数の
1個のセグメントを確保し、当該セグメントへの目的の
レコードの格納を行うので、このようなオーバーヘッド
を生じることがない。
However, in the case of this embodiment, as described above, prior to data transfer from the magnetic disk device 14 to the cache memory 50, one segment, the minimum number required to configure a slot, is secured in advance, and the corresponding segment is Since the target record is stored in the segment, such overhead does not occur.

次に、磁気ディスク装置14に対して、チャネル10a
からデータのライト要求が発生した場合の処理について
説明する。
Next, the channel 10a is sent to the magnetic disk device 14.
The processing when a data write request is generated from is explained below.

たとえば、ライト要求が以下のCCWチエインによるレ
コードの更新処理である場合、LOC/WRT  UP
  D/ L OGコマンドでは、ライト処理すべきレコードの磁
気ディスク装置14における格納位置などを示す各種パ
ラメータが指示され、WRT  UPDコマンドでは、
更新書き込みすべきデータが転送される。
For example, if the write request is a record update process using the following CCW chain, LOC/WRT UP
The D/LOG command specifies various parameters such as the storage location in the magnetic disk device 14 of the record to be written, and the WRT UPD command
Data to be updated and written is transferred.

なお、以下の説明では、更新対象のレコードを含むスロ
ットがキャッシュメモリ50に存在し、キャツシュヒツ
トとして更新処理が行われる場合を説明する。
In the following description, a case will be described in which a slot including a record to be updated exists in the cache memory 50 and the update process is performed as a cache hit.

すなわち、キャッシュメモリ50において、LOGコマ
ンドの条件に合致するレコードを含むスロットには、現
在2個のセグメントを使用して、1個当たり5にバイト
のレコードが3個=15にバイトのデータが格納されて
おり、最後のレコードにおける実際のデータ長は3にバ
イトであるとする。そして、更新処理はこの最後の1個
のレコードに対して行うものとする。
In other words, in the cache memory 50, two segments are currently used for slots containing records that meet the conditions of the LOG command, and three records each having 5 bytes = 15 bytes of data are stored. Assume that the actual data length in the last record is 3 bytes. It is assumed that the update process is performed on this last record.

まず、ディスクキャッシュ制御装置11は、L0Cコマ
ンドを受領するとくステップ101)、当該コマンドに
随伴するインターナルサーチレコード番号などの情報に
よってサーチ管理テーブル30を検索し、ヒツト/ミス
の判定を行う(ステップ102)。
First, upon receiving an L0C command (step 101), the disk cache control device 11 searches the search management table 30 based on information such as an internal search record number accompanying the command, and determines whether it is a hit or a miss (step 101). 102).

前述のように、目的のレコードを含むスロットがキャッ
シュメモリ50に存在するので、キャツシュヒツトと判
定され、セグメントアロケートに移る。
As described above, since a slot containing the target record exists in the cache memory 50, it is determined that the cache hit is to be made, and the process moves to segment allocation.

すなわチ、スロットコントロールテーブル40における
当該スロットに関する、キャッシュメモリ50での先頭
セグメントへのポインタ、セグメント数、格納データ情
報などを用いて、まず、最終位置にある更新対象レコー
ドを除く格納データ長を算出する(ステップ105)。
In other words, using the pointer to the first segment in the cache memory 50, the number of segments, stored data information, etc. regarding the slot in the slot control table 40, first, calculate the stored data length excluding the record to be updated at the final position. Calculate (step 105).

すなわち、最終位置にある更新対象レコードを除く格納
データ長=(該当するスロットにおける現在のデータ長
15にバイト)−(更新対象の最終レコードの長さ3に
バイト)=12にバイトを得る。
That is, the stored data length excluding the record to be updated at the final position = (current data length of the corresponding slot, 15 bytes) - (length of the last record to be updated, 3 bytes) = 12 bytes.

さらに、前記LOGコマンドに随伴したレコードカウン
タの値(この場合1)や平均転送レコード長(この場合
5にバイト)により総転送データ長くレコード長)5に
バイトを算出する(ステップ106)。
Furthermore, the total transfer data length (record length) is calculated from the value of the record counter accompanying the LOG command (1 in this case) and the average transfer record length (5 bytes in this case) (step 106).

そして、ステップ105で得られた更新対象レコードを
除く格納データ長12にバイトに、ステップ106で得
られた総転送レコード長5にバイトを加算することによ
り、更新処理後に全データ長17にバイトを算出する(
ステップ107)。
Then, by adding bytes to the storage data length 12 excluding the record to be updated obtained in step 105 and adding bytes to the total transfer record length 5 obtained in step 106, the total data length 17 is reduced by bytes after the update process. calculate(
Step 107).

さらに、この全データ長17にバイトと、1セグメント
当たりの容18にバイトから当該全データ長17にバイ
トを格納するのに必要なセグメント数−3を算出しくス
テップ108) 、さらに、このセグメント数(3)か
ら、それまでに使用していたセグメント数(2)を差し
引くことにより、当該更新処理による最終レコードの長
さの増加に伴って必要となったセグメントの数(1)を
求め(ステップ109)、当該1セグメント分だけの新
たな記憶領域の割り付け(追加)処理を行い、その後、
当該1個のセグメントとこれまでの2個のセグメントを
用いて目的の最終レコードの更新処理を行う(第5図ら
))。
Furthermore, from this total data length 17 bytes and the capacity per segment 18 bytes, calculate the number of segments - 3 required to store the bytes in the total data length 17 (step 108), and further calculate the number of segments. By subtracting the number of segments (2) previously used from (3), the number of segments (1) required due to the increase in the length of the final record due to the update process is calculated (step 109), allocates (adds) a new storage area for the one segment, and then
The target final record is updated using this one segment and the previous two segments (FIG. 5, etc.)).

ここで、従来の場合には、まず、当該更新レコードが属
するスロットのセグメント数が最大となるように、すな
わち、これまでの使用セグメント数(2)に4個の新た
なセグメントを割り当てた後、実際には3セグメントし
か使用されないので、余剰の3セグメントの解放処理が
必要となり、余剰の当該3セグメント分の割り当てや解
放のためのオーバーヘッドが発生することになるが、本
実施例の場合には、前述のように、必要最少限のセグメ
ントしか割り当てを行わないので、従来のようなオーバ
ーヘッドが発生することがない。
Here, in the conventional case, first, after allocating four new segments to the number of segments used so far (2) so that the number of segments of the slot to which the update record belongs is maximized, Since only 3 segments are actually used, it is necessary to release the surplus 3 segments, and overhead is generated to allocate and release the surplus 3 segments. However, in the case of this embodiment, As mentioned above, since only the minimum necessary segments are allocated, the overhead unlike the conventional method does not occur.

以上説明したように、本実施例のディスクキャッシュ制
御方式では、上位のチャネル10a(中央処理装置10
)と磁気ディスク装置14との間におけるキャッシュメ
モリ50を介してのデータの授受(リード/ライト)に
伴うオーバヘッドの発生が抑止されるので、上位のチャ
ネル10a(中央処理装置10)と磁気ディスク装置1
4との間におけるデータ転送のスループットが確実に向
上する。
As explained above, in the disk cache control method of this embodiment, the upper channel 10a (central processing unit 10
) and the magnetic disk device 14 via the cache memory 50 (read/write) is suppressed. 1
The throughput of data transfer between 4 and 4 is definitely improved.

また、キャッシュメモリ50へのデータの格納に際して
、必要以上に大きな記憶領域の割り当てを行わないので
、当該記憶領域の割り当てに伴ってキャッシュメモリ5
0から追い出される他のデータの量が少なくなり、すな
わちデータ全体のキャッシュメモリ50における滞在時
間が長くなり、チャネルlOaの側からアクセス要求さ
れるデータがキャッシュメモリ50に存在する確率(ヒ
ツト率)が確実に高くなり、キャッシュメモリ50をよ
り有効に活用することができる。
Furthermore, when storing data in the cache memory 50, an unnecessarily large storage area is not allocated, so that the cache memory 50 is
The amount of other data that is evicted from 0 is reduced, that is, the residence time of the entire data in the cache memory 50 becomes longer, and the probability (hit rate) that data requested for access from the channel lOa side exists in the cache memory 50 increases. This will surely increase the cost, and the cache memory 50 can be used more effectively.

以上本発明者によってなされた発明を実施例に基づき具
体的に説明したが、本発明は前記実施例に限定されるも
のではなく、その要旨を逸脱しない範囲で種々変更可能
であることはいうまでもない。
Although the invention made by the present inventor has been specifically explained above based on Examples, it goes without saying that the present invention is not limited to the Examples and can be modified in various ways without departing from the gist thereof. Nor.

たとえば、キャッシュメモリを構成する記憶媒体として
は、半導体メモリに限らず、他の不揮発性記憶媒体であ
っても同様の効果を得ることができる。
For example, the storage medium constituting the cache memory is not limited to semiconductor memory, and similar effects can be obtained even when other nonvolatile storage media are used.

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

本願において開示される発明のうち、代表的なものによ
って得られる効果を簡単に説明すれば、以下のとおりで
ある。
Among the inventions disclosed in this application, the effects obtained by typical inventions are briefly described below.

すなわち、本発明になるディスクキャッシュ制御方式に
よれば、上位処理装置と回転型記憶装置との間に介在し
、両者の間で授受されるデータを一時的に記憶するキャ
ッシュメモリを、前記回転型記憶装置j:おける物理的
または論理的な所定の記憶単位に対応したスロットに論
理的に分割して管理し、個々の前記スロットには所定の
長さの複数のセグメントを単位として当該キャッシュメ
モリの記憶領域を割り当てるようにしたディスクキャッ
シュ制御方式であって、前記上位処理装置からアクセス
要求されたデータの前記キャッシュメモリへの格納に際
して、当該データの前記キャッシュメモリへの書き込み
に先立って、前記キャッシュメモリにおける前記スロッ
トの拡張または新規なスロットの配置に必要な前記セグ
メントの最少数を算出し、当該必要最少数の前記セグメ
ントを割り当てた後に、前記データの必要最少数の当該
セグメントへの書き込み動作を行わせるので、たとえば
、データの多少に関わらず、スロットの最大セグメント
数分の記憶領域を確保し、データを格納した後に余剰の
セグメントを解放する場合などに比較して、無駄なセグ
メントの確保および解放に要するオーバーヘッドの発生
が無くなり、上位処理装置とディスク装置との間にふけ
るデータ転送でのスループットを向上させることができ
る。
That is, according to the disk cache control method of the present invention, the cache memory that is interposed between the upper processing device and the rotating storage device and temporarily stores data exchanged between the two is controlled by the rotating storage device. Storage device j: is managed by logically dividing it into slots corresponding to a predetermined physical or logical storage unit, and each slot stores the cache memory in units of multiple segments of a predetermined length. A disk cache control method that allocates a storage area, wherein when storing data requested for access from the higher-level processing device in the cache memory, the data is stored in the cache memory prior to writing the data to the cache memory. After calculating the minimum number of the segments necessary for expanding the slot or arranging a new slot in the process, and allocating the necessary minimum number of the segments, performing a write operation of the data to the required minimum number of the segments. This reduces the need to allocate and release unnecessary segments, compared to, for example, securing storage space for the maximum number of segments in a slot regardless of the amount of data, and then releasing the excess segments after storing the data. This eliminates the overhead required for data transfer between the host processing device and the disk device, and improves the throughput of data transfer between the host processing device and the disk device.

また、キャッシュメモリへのデータの格納処理が集中し
た場合でも、必要最少限の記憶領域を確保するだけなの
で、領域確保のために、それまで格納されていたデータ
の追い出し頻度が必要以上に増大することに起因するデ
ータのキャッシュメモリにおける滞在時間の減少、すな
わちヒツト率の低下が防止され、キャッシュメモリの有
効利用を図ることができる。
In addition, even if the processing of storing data in the cache memory is concentrated, only the minimum necessary storage space is secured, so the frequency of purging previously stored data increases more than necessary in order to secure space. This prevents a reduction in the residence time of data in the cache memory, that is, a reduction in the hit rate, which is caused by this, and makes it possible to effectively utilize the cache memory.

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

第1図は、本発明の一実施例であるディスクキャッンユ
制御方式の一例を示す流れ図、第2図は、本発明の一実
施例であるディスクキャッシュ制御方式を行うディスク
キャッシュ制御装置を含む電子計算機システムの構成の
一例を示すブロック図、 第3図は、ディスクキャッシュ制御装置の構成の一例を
示すブロック図、 第4図は、本発明の一実施例であるディスクキャッシュ
制御方式が実施される計算機システムにおける磁気ディ
スク装置およびキャッシュメモリでのデータの記録形式
の対応関係の一例を示す概念図、 第5図(a)およびい)は、スロットアロケートおよび
セグメントアロケートにおけるデータ格納状態の一例を
示す概念図である。 10・・・中央処理装置(CPU)、10a・・・チャ
ネル(上位処理装[)、11・・・ディスクキャッシュ
制御装置、12・・・磁気ディスク装置、14・・・磁
気ディスク装置(回転型記憶装置)、20・・・マイク
ロプロセッサ(MPU)、21・・・ランダムアクセス
メモリ (RAM)、22・・・対チャネル転送制御装
置、23・・・データ転送制御回路、24・・・対ディ
スク転送制御装置、30・・・サーチ管理テーブル、4
0・・・スロットコントロールテーブル 50・・・キ
ャッシュメモリ、101〜109・・・ディスクキャッ
シュ制御方式の−・例を示す処理ステップ。
FIG. 1 is a flowchart showing an example of a disk cache control method according to an embodiment of the present invention, and FIG. FIG. 3 is a block diagram showing an example of the configuration of a computer system; FIG. 3 is a block diagram showing an example of the configuration of a disk cache control device; FIG. 4 is a block diagram showing an example of the configuration of a disk cache control device; FIG. A conceptual diagram showing an example of the correspondence between data recording formats in a magnetic disk device and a cache memory in a computer system, Figures 5 (a) and 5) are conceptual diagrams showing an example of data storage states in slot allocation and segment allocation. It is a diagram. DESCRIPTION OF SYMBOLS 10...Central processing unit (CPU), 10a...Channel (upper processing unit), 11...Disk cache control device, 12...Magnetic disk device, 14...Magnetic disk device (rotating type) 20... Microprocessor (MPU), 21... Random access memory (RAM), 22... Channel transfer control device, 23... Data transfer control circuit, 24... Disk disk Transfer control device, 30...Search management table, 4
0...Slot control table 50...Cache memory, 101-109...Processing steps showing an example of disk cache control method.

Claims (1)

【特許請求の範囲】[Claims] 1、上位処理装置と回転型記憶装置との間に介在し、両
者の間で授受されるデータを一時的に記憶するキャッシ
ュメモリを、前記回転型記憶装置における物理的または
論理的な所定の記憶単位に対応したスロットに論理的に
分割して管理し、個々の前記スロットには所定の長さの
複数のセグメントを単位として当該キャッシュメモリの
記憶領域を割り当てるようにしたディスクキャッシュ制
御方式であって、前記上位処理装置からアクセス要求さ
れたデータの前記キャッシュメモリへの格納に際して、
当該データの前記キャッシュメモリへの書き込みに先立
って、前記キャッシュメモリにおける前記スロットの拡
張または新規なスロットの配置に必要な前記セグメント
の最少数を算出し、当該必要最少数の前記セグメントを
割り当てた後に、前記データの必要最少数の当該セグメ
ントへの書き込み動作を行わせることを特徴とするディ
スクキャッシュの制御方式。
1. A cache memory that is interposed between the upper processing unit and the rotating storage device and temporarily stores data exchanged between the two is a physical or logical predetermined storage in the rotating storage device. A disk cache control method that logically divides and manages slots corresponding to units, and allocates storage areas of the cache memory in units of multiple segments of a predetermined length to each slot. , when storing data requested for access from the higher-level processing device in the cache memory,
Prior to writing the data to the cache memory, calculate the minimum number of segments necessary for expanding the slot in the cache memory or arranging a new slot, and after allocating the required minimum number of segments. , a control method for a disk cache, characterized in that a write operation is performed to a necessary minimum number of said segments.
JP2067032A 1990-03-19 1990-03-19 Disk cache control system Pending JPH03268043A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2067032A JPH03268043A (en) 1990-03-19 1990-03-19 Disk cache control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2067032A JPH03268043A (en) 1990-03-19 1990-03-19 Disk cache control system

Publications (1)

Publication Number Publication Date
JPH03268043A true JPH03268043A (en) 1991-11-28

Family

ID=13333131

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2067032A Pending JPH03268043A (en) 1990-03-19 1990-03-19 Disk cache control system

Country Status (1)

Country Link
JP (1) JPH03268043A (en)

Similar Documents

Publication Publication Date Title
US4536836A (en) Detection of sequential data stream
US5530829A (en) Track and record mode caching scheme for a storage system employing a scatter index table with pointer and a track directory
US5269019A (en) Non-volatile memory storage and bilevel index structure for fast retrieval of modified records of a disk track
US5584012A (en) Cache control method and rotary storage device having cache control
JP2784440B2 (en) Data page transfer control method
JP2783748B2 (en) Method and apparatus for data transfer to auxiliary storage in a dynamically mapped data storage system
US5418929A (en) Controller for storage unit and method of controlling storage unit
US5734861A (en) Log-structured disk array with garbage collection regrouping of tracks to preserve seek affinity
US5991775A (en) Method and system for dynamic cache allocation between record and track entries
EP0077453B1 (en) Storage subsystems with arrangements for limiting data occupancy in caches thereof
KR100373313B1 (en) A method and system for managing a cache memory
US6151660A (en) Information recording/reproducing apparatus having segmented cache memory
US4974197A (en) Batching data objects for recording on optical disks with maximum object count
EP0073330A2 (en) Hierarchical storage systems adapted for error handling
US5420983A (en) Method for merging memory blocks, fetching associated disk chunk, merging memory blocks with the disk chunk, and writing the merged data
JPH06342395A (en) Method and medium for storage of structured data
JPH06180671A (en) Disk cache controller
JP2002207620A (en) File system and data caching method in the system
JPH07104817B2 (en) Data record transfer method
EP0490485B1 (en) Rotating memory system
US7139874B1 (en) System and method for providing client-directed staging to improve non-sequential access performance in a caching disk storage system
CN119440406B (en) Disk space allocation method and device, electronic equipment and storage medium
US5761710A (en) Information apparatus with cache memory for data and data management information
JPH0511933A (en) Hard disk emulator and its fixed cache area allocation method
US6209057B1 (en) Storage device having data buffer