JPH0397053A - Cache memory data managing system and cache controller - Google Patents

Cache memory data managing system and cache controller

Info

Publication number
JPH0397053A
JPH0397053A JP1235138A JP23513889A JPH0397053A JP H0397053 A JPH0397053 A JP H0397053A JP 1235138 A JP1235138 A JP 1235138A JP 23513889 A JP23513889 A JP 23513889A JP H0397053 A JPH0397053 A JP H0397053A
Authority
JP
Japan
Prior art keywords
data
cache memory
data management
management unit
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.)
Granted
Application number
JP1235138A
Other languages
Japanese (ja)
Other versions
JP3083530B2 (en
Inventor
Yoshihiro Azumi
安積 義弘
Akira Yamamoto
彰 山本
Katsunori Nakamura
中村 勝憲
Yoshinaga Kuwabara
桑原 善祥
Shigeo Honma
繁雄 本間
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 JP01235138A priority Critical patent/JP3083530B2/en
Publication of JPH0397053A publication Critical patent/JPH0397053A/en
Application granted granted Critical
Publication of JP3083530B2 publication Critical patent/JP3083530B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To hit a cache memory to an output instruction to be followed up when an input instruction due to a successive access purposes updating by preventing a data management unit from being immediately defined as the object of the most preferential abandonment when the data management unit is preferentially abandoned. CONSTITUTION:When data to be inputted according to the input instruction of a host device such as a central processing unit 101, etc., are in a successive access file, all the data in the data management unit including the input data are accessed and afterwards, the data management unit is not defined as the object of the most preferential abandonment but defined as an object to be preferentially abandoned. Namely, the data management unit is not defined immediately as the object of the abandonment but defined as the object of the abandonment while providing a slight postponement. Thus, the successively accessed data can stay in a cache memory 105 for a while data after the host device 101 issues the input instruction, the output instruction to be followed up can be hit through time to be spent for an update processing or delay time caused by competition, etc., between the other host device and a controller or a disk drive.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、ライトアフタ型ディスクキャッシュ制御に係
り,特に順次アクセスの制御に好適なディスクキャッシ
ュメモリのデータ管理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to write-after disk cache control, and particularly to a data management system for disk cache memory suitable for sequential access control.

[従来の技術] 磁気ディスク装置の様に、データのアクセス時に機械的
位置付け動作を伴う記憶装置を含む記憶サブシステムに
おいて,中央処理装置からのアクセスに対する応答の高
速化を図る手段の1つとして、制御装置に半導体メモリ
の様な高速アクセス可能なメモリ・デバイスを設置し、
中央処理装置から、アクセスされる可能性の高いデータ
を格納しておくことによりアクセスに対する応答を高速
化する装置、いわゆるディスクキャッシュが実用化され
ている。
[Prior Art] In a storage subsystem including a storage device that requires a mechanical positioning operation when accessing data, such as a magnetic disk device, one method for speeding up the response to access from a central processing unit is as follows. Installing high-speed accessible memory devices such as semiconductor memory in the control equipment,
A so-called disk cache, which is a device that speeds up response to access by storing data that is likely to be accessed from a central processing unit, has been put into practical use.

一般に、ディスクキャッシュでは上位装置からの入力命
令に対し、目的のデータがキャッシュメモリ内に存在す
れば,キャッシュメモリから上位装置にデータ転送を行
い応答の高速化を図るが,出力命令に対しては出力デー
タをキャッシュメモリばかりでなく,ディスク装置にも
書き込み動作が終了してから終了報告を行う。これは,
キャッシュメモリに用いられるメモリデバイスが揮発性
であるが故に電源断時のデータの消失を防ぐ為である。
Generally, when a disk cache receives an input command from a higher-level device, if the target data exists in the cache memory, the data is transferred from the cache memory to the higher-level device to speed up the response, but for an output command, A completion report is made after the write operation of the output data is completed not only in the cache memory but also in the disk device. this is,
This is to prevent data loss when the power is turned off, since the memory device used for the cache memory is volatile.

従って、出力命令時はディスク装置の機械的位置付け動
作を伴い、応答の高速化は図れない。
Therefore, when an output command is issued, a mechanical positioning operation of the disk device is required, and a high-speed response cannot be achieved.

この様なディスクキャッシュは、一般にライトスルー型
ディスクキャッシュと呼ばれている。
Such a disk cache is generally called a write-through type disk cache.

これに対し、出力命令に対しても出力データをキャッシ
ュメモリに書き込むのみで動作終了報告を行い,応答の
高速化を図るディスクキャッシュ,即ち、ライトアフタ
型ディスクキャッシュが提案されている。
In contrast, a write-after type disk cache has been proposed, which reports the completion of an operation by simply writing output data to a cache memory in response to an output command, thereby speeding up the response.

このライトアフタ型ディスクキャッシュは、1.ヒット
時には出力命令に対しても,ディスク装置をアクセスせ
ずに動作終了報告が可能である。
This write-after type disk cache has 1. In the event of a hit, it is possible to report the completion of the operation for the output command without accessing the disk device.

2.順次アクセス・ファイルのディスク装置への出力処
理は、特開昭59−135563号や、特公昭61−4
3742号で示されるような複数トラックをまとめて連
続して出力することが可能である。
2. Output processing of sequential access files to a disk device is described in Japanese Patent Application Laid-Open No. 59-135563 and Japanese Patent Publication No. 61-4.
It is possible to collectively output a plurality of tracks as shown in No. 3742 continuously.

等のシステム性能上有効な機能を有する。It has functions that are effective in terms of system performance.

ライトアフタ型ディスクキャッシュを実現する手段とし
ては、特開昭55−157053号及び前記特開昭59
−135563号にてその技術が開示されている。
As a means for realizing a write-after type disk cache, Japanese Patent Laid-Open No. 55-157053 and the aforementioned Japanese Patent Laid-Open No. 59
The technique is disclosed in No.-135563.

前記特開昭55−157053号では.出力データを、
一時ファイル用データと永久ファイル用データとに分け
、永久ファイル用データはライトスルー型ディスクキャ
ッシュと同様にディスク装置に直接データを書き込んで
から動作終了報告を行うことによってデータの保障を行
い、一時ファイル用データはキャッシュメモリにデータ
を格納しただけで動作終了報告を行い、応答の高速化を
図るものである。
In the above-mentioned Japanese Patent Application Laid-Open No. 55-157053. Output data,
Data for temporary files is divided into data for temporary files and data for permanent files. Data for permanent files is guaranteed by writing the data directly to the disk device and then reporting the completion of the operation, similar to a write-through type disk cache. The purpose of this is to report the completion of an operation just by storing the data in the cache memory, thereby speeding up the response.

また、前記特開昭59−135563号では、キャッシ
ュメモリに揮発性メモリの他に不揮発性メモリを具備し
、キャッシュメモリにのみ格納されている書き込みデー
タが,ディスク装置に反映されるまでの間、不揮発性メ
モリにバックアップ・データを保管することによってデ
ータの保障を行うものである。
Furthermore, in the above-mentioned Japanese Patent Application Laid-Open No. 59-135563, the cache memory is provided with a non-volatile memory in addition to the volatile memory, and write data stored only in the cache memory is written until it is reflected in the disk device. Data is guaranteed by storing backup data in non-volatile memory.

ところで,ディスクキャッシュではキャッシュメモリに
どのデータを格納しておくのかの選択アルゴリズムが、
その性能を大きく左右する。なぜなら上位装置から要求
された目的のデータが、キャッシュメモリ内に存在する
確率(目的のデータが,キャッシュ内に存在することを
ヒットと呼び、その確率をヒット率と呼ぶ)が大きいほ
ど、ディスク装置をアクセスしないですむデータ、すな
わちキャッシュメモリと上位装置間でのデータ転送可能
なデータが増え、サブシステム全体の処理能力は向上す
る。また逆に、不必要なデータをキャッシュメモリ内に
残しておくことは、ヒット率の低下をもたらしサブシス
テムの処理能力をも低下させる。
By the way, in disk cache, the selection algorithm for which data to store in cache memory is
It greatly affects its performance. This is because the higher the probability that the target data requested from the host device exists in the cache memory (the existence of the target data in the cache is called a hit, and this probability is called the hit rate), the higher the probability that the target data requested by the host device exists in the cache memory. The amount of data that does not need to be accessed, that is, the amount of data that can be transferred between the cache memory and the host device, increases, and the processing capacity of the entire subsystem improves. Conversely, leaving unnecessary data in the cache memory lowers the hit rate and also reduces the processing capacity of the subsystem.

この選択アルゴリズムの1つとして、LRU(Leas
t Recently Used)アルゴリズムが広く
知られている。LRUアルゴリズムは、最も最近アクセ
スされたデータが今後最もアクセスされる可能性が高い
と考え、より長くキャッシュメモリ内に留める様にする
アルゴリズムである。また,上位装置から要求されたデ
ータがキャッシュメモリ内に存在せず,そのデータをデ
ィスク装置から読出して新たにキャッシュメモリに格納
(これをステージングと呼ぶ)しようとした時にキャッ
シュメモリに格納可能な空き領域がない場合には、前述
のLRUアルゴリズムに基づき最も古い過去にアクセス
されたデータが今後アクセスされる可能性が最も低いと
考え、そのようなデータをキャッシュメモリから破棄し
、その領域に前述の新たにステージングすべきデータを
格納する。この処理を一般にリプレースと呼ぶ。
One of the selection algorithms is LRU (Leas
tRecently Used) algorithm is widely known. The LRU algorithm is an algorithm that considers data that has been accessed most recently to be most likely to be accessed in the future, and keeps it in the cache memory for a longer time. In addition, when the data requested from the host device does not exist in the cache memory and the data is read from the disk device and is newly stored in the cache memory (this is called staging), there is free space available for storage in the cache memory. If there is no space, the oldest previously accessed data is considered to be least likely to be accessed in the future based on the LRU algorithm described above, such data is discarded from the cache memory, and the area is replaced with the data previously accessed. Store data to be newly staged. This process is generally called replacement.

一般に、LRUアルゴリズムはランダム・アクセスされ
るデータに対しては有効なアルゴリズムであることが知
られているが,順次アクセス(S AM : Sequ
ential Access Method)系ファイ
ルの様に、順次アクセスされるファイル構造から或るデ
ータに対しては有効なアルゴリズムとは言い難い。なぜ
なら、順次アクセスファイルはデータがディスク媒体上
に記録されている物理的順序に従ってアクセスされ,か
つ同一のデータに再度アクセスする場合にはファイルの
先頭からアクセスし直さねばならないファイル構造であ
る為である。即ち、順次アクセスファイルにおいては,
最も最近アクセスされたデータ及びその前方の既にアク
セスが終了したデータは、今後アクセスされる可能性が
低いと考えられ、また最も最近アクセスされたデータよ
り後方のデータは,今後アクセスされる可能性が高いと
考えられる。この様に順次アクセスファイルのデータは
、LRUアルゴリズムとは全くそぐわない性格を持つ。
It is generally known that the LRU algorithm is an effective algorithm for data that is accessed randomly, but for sequential access (SAM)
It is difficult to say that this is an effective algorithm for certain data because of the file structure that is sequentially accessed, such as for files such as (Access Method) files. This is because a sequential access file has a file structure in which data is accessed according to the physical order recorded on the disk medium, and when accessing the same data again, it must be accessed from the beginning of the file. . That is, for sequential access files,
The most recently accessed data and the data that has already been accessed before it are considered to be unlikely to be accessed in the future, and the data after the most recently accessed data is unlikely to be accessed in the future. It is considered expensive. In this way, the data of the sequential access file has characteristics that are completely inconsistent with the LRU algorithm.

順次アクセスされるデータに対しては、次にアクセスさ
れるであろうと予測される最も最近アクセスされたデー
タより後方の幾つかのデータを、あらかじめキャッシュ
メモリにステージングしておくことが以降の上位装置か
らの該ファイルに対するアクセスをヒットにすることが
でき、性能向上に有効な技術である。この技術は一般に
先読み処理と呼ばれ、ディスクキャッシュにて広く採用
されている。この先読み処理でステージングするデータ
のブロッキングの単位はディスク媒体上のトラックであ
ってよい。また、順次アクセスファイルに対するアクセ
スではアクセスの済んだデータは,今後近い将来にアク
セスされる可能性が低い不必要なデータと考えられる為
、キャッシュメモリ内に残しておくことはキャッシュメ
モリの使用効率を下げ、ヒット率の低下,ひいてはサブ
システムの性能低下をもたらす。特に順次アクセスファ
イルに対するアクセスは、該ファイル全域に渡ってアク
セスされる特徴を持つ為,キャッシュメモリ内に残存す
るデータ量は一般的に多量になるケースが多く、ランダ
ム・アクセスされるデータと比べ、不必要なデータが残
存する被害は大きい。
For data that is accessed sequentially, it is recommended to stage some data after the most recently accessed data that is expected to be accessed next in advance in the cache memory. This is an effective technique for improving performance because it can make accesses to the file from the computer a hit. This technique is generally called read-ahead processing, and is widely used in disk caches. The blocking unit of data to be staged in this pre-reading process may be a track on a disk medium. In addition, when accessing a sequential access file, data that has already been accessed is considered unnecessary data that is unlikely to be accessed in the near future, so leaving it in the cache memory improves cache memory usage efficiency. This results in a decrease in the hit rate and, in turn, a decrease in the performance of the subsystem. In particular, accesses to sequential access files have the characteristic that the entire file is accessed, so the amount of data remaining in the cache memory is often large, compared to data accessed randomly. The damage caused by unnecessary data remaining is significant.

この様な問題点に対し、特開昭60−45855号は、
キャッシュメモリ上のデータ管理の一単位、例えばトラ
ック全域に渡ってアクセスが終了した場合、該トラック
をより優先的にリプレースされやすいようにすることに
よって、不必要なデータをキャッシュメモリ内に残さな
いようにし,キャッシュメモリの有効活用を図る技術を
開示している。
To address these problems, Japanese Patent Application Laid-Open No. 60-45855,
When access to a unit of data management on the cache memory, for example, an entire track, is accessed, the track is given priority to be replaced, so that unnecessary data is not left in the cache memory. This paper discloses technology for making effective use of cache memory.

[発明が解決しようとする課題] さて、中央処理装置はディスク装置の様な外部記憶装置
に対して、 1.ファイルデータの参照 2.新しいファイルの作或 3.ファイルデータの更新 の3つの目的のうち、いずれかの目的をもって入出力命
令を発行する。また目的ごとにそのアクセス形態は異な
る。
[Problems to be Solved by the Invention] Now, the central processing unit has the following problems with respect to external storage devices such as disk devices: 1. Reference file data 2. Creating a new file 3. An input/output command is issued for one of the three purposes of updating file data. Furthermore, the access form differs depending on the purpose.

ファイルデータの参照を目的とした場合、外部記憶装置
に対しては入力命令のみが発行される。
When the purpose is to refer to file data, only an input command is issued to the external storage device.

新しいファイルの作或を目的とした場合、外部記憶装置
に対しては出力命令のみが発行される。さらに,ファイ
ル・データの更新を目的とした場合には入力命令と出力
命令が入りまじって発行される。
When the purpose is to create a new file, only an output command is issued to the external storage device. Furthermore, when the purpose is to update file data, input commands and output commands are issued together.

一方、順次アクセスファイルに対し、前述の更新を目的
としたアクセス形態によってアクセスがある場合、以下
の様なアクセス形態になる。
On the other hand, when a sequential access file is accessed in the above-described access mode for the purpose of updating, the access mode is as follows.

中央処理装置は入出力制御装置を介し、更新すべき対象
となるデータを、ある適当なブロック単位で主記憶装置
に読み込む。この処理は入力命令によってなされる。次
に、主記憶装置内の該データに対し更新処理を行う。こ
の更新処理の間、処理の高速化を狙いとして、入出力制
御装置によって入力命令を発行し,読み込み処理を行う
。その後、主記憶装置内で更新されたデータを、ディス
ク装置に書き込み処理を行う。この書き込み処理も、順
次アクセスによってなされる。この様なアクセス形態は
制御装置側にとってみると、あたかも該順次アクセスフ
ァイルに対し順次アクセスによる入力命令が先行し、し
ばらくの間を置いて出力命令が追従する様に見える。先
行した入カ命令と追従する出力命令の間隔は、該処理を
行う為に割り当てられた主記憶装置の領域の大きさや、
更新処理の内容等、様々な要因により異なる。
The central processing unit reads data to be updated into the main storage device in appropriate block units via the input/output control device. This processing is performed by input commands. Next, update processing is performed on the data in the main storage device. During this update process, the input/output control device issues input commands and performs read processing, with the aim of speeding up the process. Thereafter, the updated data in the main storage device is written to the disk device. This write processing is also performed by sequential access. From the perspective of the control device, this type of access appears as if an input command by sequential access to the sequential access file precedes it, and an output command follows after a while. The interval between the preceding input instruction and the following output instruction depends on the size of the main memory area allocated for the processing, and
It varies depending on various factors such as the content of the update process.

一般に、中央処理装置からの入出力命令は、1回のI/
Oでの動作を指示するものであり,以降の複数回に渡る
入出力命令をあらかじめ設定する機能はもたない。即ち
、中央処理装置からの入出力命令が発行された時点では
、該入力命令が参照を目的としたものであるか、もしく
は更新を目的としたものであるか、出力命令が追従する
のか、もしくはしないのかは制御装置には予測できない
Generally, an input/output instruction from a central processing unit is one I/O command.
It instructs the operation at O, and does not have the function of setting in advance the input/output commands that will be used multiple times thereafter. That is, at the time an input/output command is issued from the central processing unit, whether the input command is for reference or update, whether the output command will follow, or The control device cannot predict whether this will happen or not.

トラック全域に渡ってアクセスが終了した場合、該トラ
ックを優先的にリプレースされやすいようにする前述の
特開昭60−45855号は、ライトスルー型ディスク
キャッシュにおいては,入力命令が参照あるいは更新の
いずれを目的としたものであっても、有効な技術となる
。その理由は次の通りである。
The above-mentioned Japanese Patent Application Laid-Open No. 60-45855, which makes it easier to preferentially replace a track when access is completed over the entire track, proposes that in a write-through type disk cache, an input command is either a reference or an update command. It is an effective technique even if the purpose is The reason is as follows.

1.その入力命令が参照を目的としたものであった場合
、アクセス済のデータは、今後アクセスされる可能性は
低く、キャッシュメモリ内に残留させることはキャッシ
ュメモリの無駄使いとなる。
1. If the input command is for reference, the accessed data is unlikely to be accessed in the future, and leaving it in the cache memory is a waste of the cache memory.

2.その入力命令が更新を目的としたものであった場合
においても、出力命令の書き込み動作はディスク装置に
直接行う為,追従する出力命令に対しミスヒットとなっ
ても性能低下にはつながらない。
2. Even if the input command is for updating, the write operation of the output command is performed directly to the disk device, so even if a miss occurs with respect to the following output command, performance will not deteriorate.

一方、ライトアフタ型ディスクキャッシュにおいては、
前記特開昭60−45855号では入力命令が参照を目
的としたものであった場合については、前述のライトス
ルー型ディスクキャッシュと同様に有効となる。しかし
ながら,更新を目的としたものであった場合、追従する
出力命令がミスヒットとなる為、前述したような,ヒッ
ト時には出方命令に対しても,ディスク装置をアクセス
せずに動作終了報告が可能であり,順次アクセス・ファ
イルのディスク装置への出方処理は、複数トラックをま
とめて連続して出力することが可能である等のライトア
フタ特有の機能が無効になり性能低下につながる。
On the other hand, in write-after disk cache,
In the above-mentioned Japanese Patent Application Laid-Open No. 60-45855, when the input command is for reference, it is effective in the same way as the write-through type disk cache described above. However, if the purpose is to update, the following output command will result in a miss, so when there is a hit, as mentioned above, even in response to the output command, the operation completion report will be sent without accessing the disk device. However, the process of outputting sequentially accessed files to the disk device disables the unique functions of write-after, such as the ability to output multiple tracks in succession, leading to a decrease in performance.

以上のように、特開昭60−45855号に見られるよ
うな技術では,ライトアフタ型ディスクキャッシュにお
いて、更新を目的としたアクセスに対しては何ら効果が
得られない。そこで、更新を目的としたアクセスに対し
て効果があるように,即ち追従する出力命令に対してヒ
ットとすることを目的として、入力命令でのアクセス済
データをキャッシュメモリ内に残した場合,その入力命
令が参照を目的としたものであった場合には、不必要な
データが多量にキャッシュメモリ内に残存する結果とな
り、性能低下を招来する。
As described above, the technique disclosed in Japanese Patent Application Laid-Open No. 60-45855 has no effect on access for the purpose of updating in a write-after type disk cache. Therefore, if data that has been accessed by an input instruction is left in the cache memory in order to have an effect on the access for the purpose of updating, that is, to make it a hit for the following output instruction, If the input instruction is for reference, a large amount of unnecessary data will remain in the cache memory, resulting in a decrease in performance.

以上の様に,ライトアフタ型ディスクキャッシュにおい
ては,順次アクセスでの入方命令が終了したデータを出
力命令が追従するか、追従しないか予測不可能であるこ
とを考慮し、どの様な制御を行うかが、キャッシュメモ
リの使用効率上、即ち、サブシステムの性能上、重要な
課題となる。
As described above, in a write-after disk cache, what kind of control should be used in consideration of the fact that it is impossible to predict whether an output instruction will follow the data that has been completed by an input instruction in sequential access. How this is done is an important issue in terms of cache memory usage efficiency, that is, in terms of subsystem performance.

本発明の目的は、以上述べた問題点に鑑み、ライトアフ
タ型キャッシュ制御を採用したシステムにおいて,順次
アクセスファイルに対しても効率的なキャッシュメモリ
の使用を可能とするキャノシュメモリのデータ管理方式
およびキャッシュ制御装置を提供することにある。
In view of the above-mentioned problems, an object of the present invention is to provide a data management method for cache memory that enables efficient use of cache memory even for sequentially accessed files in a system that employs write-after cache control. An object of the present invention is to provide a cache control device.

[課題を解決するための手段] 上記目的を達成するために,本発明によるキャッシュメ
モリのデータ管理方式は、上位装置からの入力命令にし
たがって外部記憶装置からキャッシュメモリ内に取り込
まれたデータが1′@次アクセスファイルである場合、
当該入力データを含む前記キャッシュメモリ上でのデー
タ管理単位の全データをアクセスした後に、該データ管
理単位をキヤッシュメモリから優先的に破棄するキャッ
シュメモリのデータ管理方式において,前記データ管理
単位を優先的に破棄する際に、当該データ管理単位を直
ちに最先破棄対象とはしないようにしたものである。
[Means for Solving the Problems] In order to achieve the above object, the cache memory data management method according to the present invention is such that the data fetched from the external storage device into the cache memory according to the input command from the host device is ′@Next access file,
In a data management method for a cache memory in which the data management unit is preferentially discarded from the cache memory after accessing all data in the data management unit on the cache memory including the input data, the data management unit is prioritized. When discarding a data management unit, the data management unit is not immediately set as the first target to be discarded.

本発明によるデータ管理単位のリプレース制御方式は、
ランダムアクセスファイルと順次アクセスファイルとが
混在した外部記憶装置内の記憶内容の一部の写しをデー
タ管理単位に保持するキャッシュメモリにおけるデータ
管理単位のリプレース制御方式であって、ランダムアク
セスファイルについては,最も最近アクセスされたデー
タ管理単位に対して最もリプレースされにくいリプレー
ス順位を付与し、順次アクセスファイルについては、最
も最近アクセスされたデータ管理単位に対して最もリプ
レースされにくいリプレース順位を付与すると共にアク
セスが終了したデータ管理単位に対して最先ではないが
優先的にリプレースされるリプレース順位を付与するよ
うにしたものである。
The data management unit replacement control method according to the present invention is as follows:
A data management unit replacement control method in a cache memory that holds a copy of a part of the storage contents in an external storage device in which random access files and sequential access files are mixed, in a data management unit, and for random access files, The most recently accessed data management unit is given a replacement ranking that is least likely to be replaced, and for sequentially accessed files, the most recently accessed data management unit is given a replacement ranking that is least likely to be replaced, and the most recently accessed data management unit is given a replacement ranking that is least likely to be replaced. A replacement order is given to the completed data management unit so that it is replaced preferentially, but not first.

また、本発明によるキャッシュ制御装置は,主記憶装置
と外部記憶装置との間に配置され,該外部記憶装置の記
憶内容の一部の写しを保持するキャッシュメモリを用い
、上位装置から前記外部記憶装置へのデータ出力時には
,一旦、前記キャッシュメモリへデータを転送した後,
該キャッシュメモリから前記外部記憶装置へ当該データ
を転送するライトアフタ型のキャッシュ制御装置におい
て、前記キャッシュメモリ上の各データ管理単位に対し
て破棄されるべき順に順序付けを行う破棄順序管理手段
と、特定のデータ管理単位についての前記破棄順序管理
手段による破棄順位を、最先に破棄される順位ではない
が優先的に破棄される順位に変更する破棄順序変更手段
とを具備したものである,。
Further, the cache control device according to the present invention uses a cache memory that is disposed between a main storage device and an external storage device and holds a copy of a part of the storage contents of the external storage device, and uses When outputting data to the device, once the data is transferred to the cache memory,
In a write-after type cache control device that transfers the data from the cache memory to the external storage device, a discard order management means for ordering each data management unit on the cache memory in the order in which it should be discarded; and a discard order changing means for changing the discard order by the discard order management means for the data management unit to a discard order which is not the first discard order but which is preferentially discarded.

前記破棄順序管理手段は、例えば、複数のデータ管理単
位を、破棄順位の低い第1のグループと破棄順位の高い
第2グループとに分割して管理し、前記破棄順序変更手
段は、上位装置からのデータ入力命令が順次アクセスフ
ァイルに対する入力命令であった場合、当該入力データ
を含むデータ管理単位の全域に渡って前記上位装置への
入力が終了したときに、当該データ管理単位を前記第2
グループの最も破棄順位の低い位置に、または前記第1
グループの最も搬棄順位の高い位置に位置付けるもので
ある。
The discard order management means divides and manages a plurality of data management units into, for example, a first group with a low discard order and a second group with a high discard order, and the discard order change means manages a plurality of data management units by dividing them into a first group with a low discard order and a second group with a high discard order. If the data input command is an input command for a sequential access file, when input to the higher-level device is completed over the entire data management unit including the input data, the data management unit is transferred to the second data management unit.
in the lowest discard order of the group, or in the first
This is the highest position in the group for disposal.

本発明による他のキャッシュ制御装置は、主記憶装置と
外部記憶装置との間に配置され、該外部記憶装置の記憶
内容の一部の写しを保持するキャッシュメモリを用い、
上位装置から前記外部記憶装置へのデータ出力時には、
一旦、前記キャッシュメモリへデータを転送した後、該
キャッシュメモリから前記外部記憶装置へ当該データを
転送するライトアフタ型のキャッシュ制御装置において
、前記キャッシュメモリ上の各データ管理単位に対して
破棄されるべき順に順序付けを行う破棄順序管理手段と
、順次アクセスファイルに対して、入力命令によりキャ
ッシュメモリに取り込まれた前記データ管理単位につい
て、該データ管理単位に対する出力命令が追従すること
なく予め定めた数の後続のデータ管理単位に対して入力
命令が発行されたとき、当該データ管理単位を優先的に
破棄するよう前記破棄順序管理手段の破棄順序を変更す
る破棄順序変更手段とを備えたものである。
Another cache control device according to the present invention uses a cache memory that is disposed between a main storage device and an external storage device and holds a copy of a part of the storage contents of the external storage device,
When outputting data from the host device to the external storage device,
Once data is transferred to the cache memory, in a write-after type cache control device that transfers the data from the cache memory to the external storage device, each data management unit on the cache memory is discarded. A discard order management means that performs ordering in power order, and a discard order management means for sequentially accessing files, for the data management unit taken into the cache memory by an input command, a predetermined number of data management units are stored without being followed by an output command for the data management unit. and a discard order changing means for changing the discard order of the discard order management means so that when an input command is issued for a subsequent data management unit, the data management unit is preferentially discarded.

前記予め定めた数を定めるにあたっては、入力命令によ
りキャッシュメモリに取り込まれたデータ管理単位につ
いて、追従する命令が発行されるまでに入力命令が発行
されるデータ管理単位の数を計測する計測手段を有し、
該計測手段の計測結果により定めることができる。
In determining the predetermined number, a measuring means is used to measure the number of data management units for which an input command is issued before a following command is issued, with respect to data management units taken into the cache memory by an input command. have,
It can be determined based on the measurement results of the measuring means.

本発明によるキャッシュメモリシステムは,ディスク装
置の記憶内容の一部の写しを保持するディスクキャッシ
ュメモリと,上位装置から前記ディスク装置へのデータ
出力時には、一旦、前記キャッシュメモリへデータを転
送し,その後,該キャッシュメモリから前記ディスク装
置へ当該データを転送するライトアフタ型のキャッシュ
制御装置とを備えるキャッシュメモリシステムにおいて
、前記上位装置からは、順次アクセスによる入力命令で
入力され終わったデータに対し、前記主記憶装置内で更
新処理を行ったあと再度出力命令を発行することを、当
該入力命令実行時点もしくは実行以前の時点において予
め前記キャッシュ制御装置に指示するようにし、前記キ
ャッシュ制御装置内に、前記キャッシュメモリ内のデー
タ管理単位に破棄の順序付けを行う破棄順序管理手段と
、前記上位装置による更新処理を行うことが明示されな
かったデータ管理単位については優先的に破棄するよう
前記破棄順序管理手段による破棄順位を繰り上げる破棄
順位変更手段とを設けたものである。
The cache memory system according to the present invention includes a disk cache memory that holds a copy of a part of the storage contents of a disk device, and when data is output from a host device to the disk device, the data is temporarily transferred to the cache memory, and then , a write-after type cache control device that transfers the data from the cache memory to the disk device. The cache control device is instructed in advance to issue an output command again after performing update processing in the main storage device at the time of execution of the input command or at a time before the execution of the input command, and Discard order management means for ordering data management units in the cache memory to be discarded; and discard order management means for discarding data management units that are not specified to be updated by the host device with priority. A discard order changing means for moving up the discard order is provided.

(以下、余白) [作 用] 本発明では、中央処理装置等の上位装置の入力命令に従
って入力するデータが順次アクセスファイルである場合
に、その入力データが含まれるデータ管理単位(外部記
憶装置がディスク装置の場合は例えばlトラック)のす
べてのデータがアクセスされた後に、そのデータ管理単
位を、最先の破棄対象(リプレース)とはしないが優先
的に破棄する対象とする。すなわち,即座に破棄対象と
するのではなく、若干の猶予を持たせて破棄対亀とする
。したがって、キャッシュメモリ内にしばらくの間、j
@次アクセス済データを滞留させることになり、上位装
置が入力命令発行後、更新処理に費す時間や他の上位装
置との間での制御装置及びディスク装置の競合等に起因
する遅れ時間を経て追従する出力命令を、ヒットさせる
ことが可能となる。
(Hereinafter, blank space) [Operation] In the present invention, when data input according to an input command from a higher-level device such as a central processing unit is a sequential access file, the data management unit (external storage device) that includes the input data is In the case of a disk device, for example, after all the data in one track) has been accessed, the data management unit is not the first target to be destroyed (replaced), but is prioritized to be destroyed. In other words, rather than immediately discarding it, it is decided to discard it with some grace period. Therefore, j
@Next accessed data will be retained, and the delay time caused by the time the host device spends on update processing after issuing an input command and the contention of the control device and disk device with other host devices. This makes it possible to hit the output command that follows.

但し、あくまで優先的に破棄するので、キャッシュメモ
リ内での不要なデータの残留は必要最小限に抑えられる
. 前記アクセス済のデータ管理単位を優先的に破棄対象と
するのに若干の猶予を持たせる手段として,周知のLR
Uリストのような破棄順序管理手段を分割する構成を採
用したものでは,破棄される順位の中位が極めて簡単に
認識できる。従って、順次アクセスでのアクセス済のデ
ータ管理単位を破棄順位の高いグループの最後に位置付
けると、該データ管理単位は破棄される順序の中位に順
位付けられることになる。破棄順位が高いグループの最
後に位置付けられたデータ管理単位は,該データより破
棄順位の高いのデータ管理単位がアクセスされるか、も
しくはキャッシュメモリに新たなデータ管理単位を格納
する時のリプレース処理等によって破棄順序が変更され
、いずれは最先の破棄順位のデータ管理単位となる。
However, since it is discarded on a priority basis, unnecessary data remaining in the cache memory can be kept to the minimum necessary. The well-known LR is used as a means to give some grace to preferentially target the accessed data management unit for destruction.
In a device such as a U list that employs a configuration in which the discard order management means is divided, the middle rank of the discard order can be recognized very easily. Therefore, if a data management unit that has been accessed in sequential access is placed at the end of a group with a high discard order, the data management unit will be ranked in the middle of the discard order. The data management unit positioned at the end of a group with a high discard order is subject to replacement processing when a data management unit with a higher discard order is accessed or a new data management unit is stored in the cache memory. The discard order is changed by , and eventually the data management unit becomes the first discard order.

入力命令が更新を目的としたものであった場合、当該デ
ータ管理単位が中位の破棄順位から最先の破棄順位へと
移行するまでの間に、出力命令の追従アクセスがあった
場合にはヒットとなる。
If the input command is for update, and there is a follow-up access of the output command before the data management unit moves from the middle discard order to the first discard order, It becomes a hit.

一方、入力命令が参照であった場合には,前述の様に破
棄順序の変更により、いずれは最先の破棄対象となり、
リプレースされる。
On the other hand, if the input instruction is a reference, due to the change in the discard order as described above, it will eventually become the first to be discarded.
will be replaced.

前記アクセス済のデータ管理単位を優先的に破棄対象と
するのに若干の猶予を持たせる他の手段として、入力さ
れたデータ管理単位に対して出力命令が追従することな
く予め定めた数の後続のデータ管理単位に対して入力命
令が発行されたときにそのデータ管理単位を優先的に破
棄する構成を採用したものにおいては,少なくとも前記
予め定めた数の後続のデータ管理単位について入力命令
が発行されるまでの間に出力命令が追従したときにキャ
ッシュがヒットとなることが保証される。
As another means of giving some grace to preferentially discard the accessed data management unit, it is possible to create a predetermined number of successors without the output command following the input data management unit. When an input command is issued for a data management unit, the data management unit is preferentially discarded. It is guaranteed that the cache will be hit when the output instruction follows the instruction until the output instruction is executed.

前記「予め定めた数」としては、入力されたファイルの
更新処理後の出力命令が発行される確率が高いと考えら
れる期間に対応して定める必要があるが、システムの用
途に応じた固定値としてもよいし、システム稼働中に実
際に計測して得るようにしてもよい。
The above-mentioned "predetermined number" needs to be determined in accordance with the period during which the output command after update processing of the input file is considered to be issued, but it may be a fixed value depending on the purpose of the system. Alternatively, it may be obtained by actually measuring while the system is in operation.

前記データ管理単位数以上、入力命令が先行したデータ
管理単位については、以後、主記憶装置からキャッシュ
メモリ及び外部記憶装置への更新データの出力は無いと
判断してもよいので、そのデータ管理単位を優先的に破
棄対象として、キャッシュメモリ内の不要なデータの残
留を防止する6この場合に「優先的に破棄対象とする」
とは、即座に最先の破棄対象とすることであってよい。
For a data management unit that has been preceded by an input command for more than the number of data management units, it may be determined that no update data will be output from the main storage to the cache memory or external storage. Prevent unnecessary data from remaining in the cache memory by making it a preferential discard target6 In this case, "preferentially discard"
This may mean immediately making it the first object to be discarded.

但し、前述した破棄順の中位に位置付ける方法をとるこ
ともできる。
However, it is also possible to take the method of positioning it in the middle of the order of discard mentioned above.

入力命令が更新を目的としたものであるか、参照を目的
としたものであるかが入力命令実行時点に上位装置から
明示される構成では、より確実に出力命令の追従に対処
する事が可能となる。即ち,当該入力命令が更新を目的
としたものであるか否かの判断(即ち、キャッシュメモ
リ内に残留させるべきか否かの判断)が、比較的簡単に
より確実に行うことができ,処理装置内でのデータの処
理形態に即したキャッシュメモリ上でのデータ管理が可
能となる。
In a configuration where the higher-level device clearly indicates whether the input command is for updating or reference at the time of execution of the input command, it is possible to more reliably follow the output command. becomes. In other words, it is possible to relatively easily and reliably determine whether or not the input command is intended for updating (i.e., whether or not it should remain in the cache memory), and the processing device It becomes possible to manage data on the cache memory in accordance with the data processing format within the cache memory.

[実施例] 以下、本発明の実施例について図面により詳細に説明す
る。
[Example] Hereinafter, an example of the present invention will be described in detail with reference to the drawings.

まず、第3図に本発明が適用される計算機システムの構
成例を示す。
First, FIG. 3 shows a configuration example of a computer system to which the present invention is applied.

この計算機システムは、中央処理装1101.主記憶装
置102,入出力制御装置(チャネル)103、ディス
ク制御装置104、キャッシュメモリ部l05,ディレ
クトリ部106、ディスク装置107から或る。
This computer system includes a central processing unit 1101. It consists of a main storage device 102, an input/output control device (channel) 103, a disk control device 104, a cache memory section 105, a directory section 106, and a disk device 107.

本発明hi適用される部分は、主としてキャッシュメモ
リ部105とディレクトリ部106であり,その一般的
な構造を第2図に示す。
The parts to which the present invention is applied are mainly the cache memory section 105 and the directory section 106, the general structure of which is shown in FIG.

第2図において、キャッシュメモリ部105は複数個の
エントリから成り、各エントリに1トラック分のデータ
を格納する。このエントリをスロット201と呼ぶ。以
下の説明では、各スロットに格納される1トラックがデ
ータ管理単位に対応するが、データ管理単位は、1トラ
ック以下あるいは数トラックの単位であってもよい。デ
ィレクトリ部106は、サーチテーブル202とスロッ
ト管理テーブル203とから戒る。サーチテーブル20
2はキャッシュメモリ105にステージングされている
トラックのアドレスを示す情報を持ち、中央処理装11
01から要求のあったデータがキャッシュメモリ105
内に存在するか否かの判定,即ち,ヒット/ミスヒット
の判定をこのテーブルにより行う。スロット管理テーブ
ル203は,キャッシュメモリ105の各スロットとl
対lに対応するエントリを持つ。このエントリをスロッ
ト管理ブロック204と呼び、各スロット201に格納
されているトラックの管理情報、例えばデバイス・アド
レス,シリンダ・アドレス,ヘッド・アドレス及びステ
ータス等を持つ。
In FIG. 2, the cache memory section 105 consists of a plurality of entries, and each entry stores data for one track. This entry is called slot 201. In the following description, one track stored in each slot corresponds to a data management unit, but the data management unit may be less than one track or several tracks. The directory unit 106 searches the search table 202 and the slot management table 203. search table 20
2 has information indicating the address of the track staged in the cache memory 105, and the central processing unit 11
The data requested from 01 is stored in the cache memory 105.
This table is used to determine whether or not it exists within the range, that is, whether it is a hit or a miss. The slot management table 203 includes each slot and l of the cache memory 105.
It has an entry corresponding to pair l. This entry is called a slot management block 204 and has management information of the track stored in each slot 201, such as device address, cylinder address, head address, status, etc.

また、すべてのスロット管理ブロック204はLRUア
ルゴリズムに従って順序付けられ、LRUリストを構或
する。LRUリストの最も最近アクセスされたデータの
位置する側をMRU側(Most Recently 
IJsed)と呼び、最も古い過去にアクセスされたデ
ータの位置する側をLRU側と呼ぶ。リプレース時はL
RU側に位置するスロットをリプレース対象とする。
Also, all slot management blocks 204 are ordered according to the LRU algorithm and constitute an LRU list. The side of the LRU list where the most recently accessed data is located is the MRU side (Most Recently
The side where the oldest accessed data is located is called the LRU side. L when replacing
The slot located on the RU side is targeted for replacement.

次に、アクセス済データをキャッシュメモリ内に残留さ
せる期間を設定する、すなわち優先的に破棄されるよう
にする契機を定める一実施例を第1図を用いて示す。
Next, an example of setting a period for which accessed data remains in the cache memory, that is, determining an opportunity to preferentially discard the data, will be described using FIG.

この実施例では,前述のLRUリストをアクセスされる
可能性の高位のものと低位のものに、例えば半々に2分
割する。そのアクセスされる可能性高位のグループすな
わち破棄順位の低いグループを第ILRUリスト301
とし、アクセスされる可能性低位のグループすなわち破
棄順位の高いグループを第2LRUリスト302とする
In this embodiment, the above-mentioned LRU list is divided, for example, in half, into those with a high probability of being accessed and those with a low probability of being accessed. Groups that are likely to be accessed, that is, groups that have a low discard order, are listed in the ILRU list 301.
The second LRU list 302 is a group with a low possibility of being accessed, that is, a group with a high discard order.

通常のランダムアクセスでアクセスされたデータについ
ては、そのアクセス時に第ILRUリスト301のMR
U側に位置付け、キャッシュメモリに新たなデータを格
納する際のリプレース対象としては、第2LRUリスト
のLRtJ側のデータを用いることとする。
For data accessed by normal random access, the MR of the ILRU list 301 at the time of the access
It is assumed that data on the LRtJ side of the second LRU list is used as a replacement target when new data is stored in the cache memory.

一方. I1@次アクセスされるデータについては,そ
のアクセス時にはランダムアクセスと同様、第ILRU
リスト301のMRU側に位置付けるものとし,さらに
前述の先読み処理によりキャッシュ内に格納されたデー
タも同じく第ILRUリスト301のMRU側に位置付
けるものとする。ランダムアクセスされるデータと異な
る点は、以後,所定の契機により第2LRUリスト30
2のMRU側へ遷移させられることにある。
on the other hand. For the data to be accessed next, the first ILRU is used as in the case of random access.
It is assumed that the data is positioned on the MRU side of the list 301, and the data stored in the cache by the above-described prefetch processing is also positioned on the MRU side of the ILRU list 301. The difference from randomly accessed data is that the second LRU list 30 is subsequently accessed at a predetermined timing.
2 to the MRU side.

なお、第2LRUリストに属するデータが第ILRUリ
ストに遷移する場合には、双方のLRUリストに属する
スロット管理ブロックの個数を同数に保つ為に、第IL
RUリストのLRU側に位置するデータを第2LRUリ
ストのMRU側に遷移させる。
Note that when data belonging to the second LRU list transitions to the second ILRU list, in order to keep the number of slot management blocks belonging to both LRU lists the same,
Data located on the LRU side of the RU list is transferred to the MRU side of the second LRU list.

第6図に、LRUリストを2分割した場合のスロット管
理テーブル203の具体的構或例を示す。
FIG. 6 shows a specific example of the structure of the slot management table 203 when the LRU list is divided into two.

このスロット管理テーブル203は,前記第lおよび第
2LRUリスト301,302と,両LRUリストを管
理するLRUリスト管理テーブル303とからなる。
This slot management table 203 consists of the first and second LRU lists 301 and 302, and an LRU list management table 303 that manages both LRU lists.

第ILRUリスト301および第2LRUリスト302
は,それぞれ,複数個のスロット管理テーブル204か
らなり、各リスト内において、すべてのスロット管理テ
ーブル204が相互に順序付けられる。lつのスロット
管理テーブル204は、スロット管理情報の他にフォワ
ード方向ポインタ(FP)とバックワード方向ポインタ
 (Bp)とを有し、次順位および前順位のスロット管
理′ブロック204を指し示す。各ブロック204は、
絶対的な順位を示す情報は保持せず、前後のブロックに
より相対的にその順位が決まるので,特定のブロックの
順位の変更する際には、一部のブロックのポインタFP
,BPを変更すれば足りる。
1st ILRU list 301 and 2nd LRU list 302
Each list consists of a plurality of slot management tables 204, and within each list, all slot management tables 204 are ordered relative to each other. One slot management table 204 has, in addition to slot management information, a forward direction pointer (FP) and a backward direction pointer (Bp), which point to the slot management blocks 204 of the next and previous ranks. Each block 204 is
Information indicating the absolute ranking is not held, and the ranking is determined relatively by the blocks before and after, so when changing the ranking of a particular block, the pointer FP of some blocks must be used.
, it is sufficient to change BP.

LRUリスト管理テーブル303は、第ILRUリスト
301のMRUポインタおよびLRUポインタと,第2
LRUリスト302のMRUポインタおよびLRUポイ
ンタとからなり,それぞれ,第lおよび第2LRUリス
ト301,302のMRU側およびLRU側のスロット
管理ブロックを指し示す。
The LRU list management table 303 includes the MRU pointer and LRU pointer of the first ILRU list 301, and the second
It consists of an MRU pointer of the LRU list 302 and an LRU pointer, which point to slot management blocks on the MRU side and the LRU side of the first and second LRU lists 301 and 302, respectively.

第3図において、ある順次アクセスファイルのトラック
#n(303)に順次アクセスによる入力命令でアクセ
スがあると、該トラックに対応するスロット管理ブロッ
ク305を第ILRUリスト301のMRU側(図中a
)に位置付ける。この際、前述の先読み処理によってト
ラック#n+1(304)以降の数トラックがキャッシ
ュメモリ内に格納される。したがって、トラック#nの
位置はその分LRU側へ移動する。順次アクセスファイ
ルについても初めは第ILRUリストのMRU側に位置
付けられるようにした理由は、通常1トラックには複数
のレコードを含み、1トラックについて複数の入力命令
が発行されることがあるからである。
In FIG. 3, when track #n (303) of a certain sequential access file is accessed by a sequential access input command, the slot management block 305 corresponding to the track is transferred to the MRU side of the ILRU list 301 (a in the figure).
). At this time, several tracks after track #n+1 (304) are stored in the cache memory by the above-described pre-reading process. Therefore, the position of track #n moves to the LRU side by that amount. The reason why sequential access files are initially placed on the MRU side of the ILRU list is because one track usually contains multiple records, and multiple input commands may be issued for one track. .

トラック#nのトラック全域に渡って入力命令でのアク
セスが終了した時、当該トラックに対応するスロット管
理ブロック305(実際にはこの時点で第ILRUリス
トの中位にまで下降している)を第2LRUリストのM
RU側(図中a′)に遷移させる。トラック全域に渡っ
てアクセスが終了したことの認識は、そのトラックの最
終レコードがアクセスされた時を契機としてもよいし,
そのトラックの次のトラック,即ちトラック#n+ 1
 (3 0 4)の先頭レコードがアクセスされた時と
してもよい。
When the access by the input command is completed over the entire track #n, the slot management block 305 corresponding to the track (actually, it has descended to the middle of the ILRU list at this point) is 2LRU list M
A transition is made to the RU side (a' in the figure). The recognition that access to the entire track has ended may be triggered when the last record of the track is accessed, or
The next track after that track, i.e. track #n+1
It may also be when the first record of (3 0 4) is accessed.

第2LRUリストのMRU側に位置付けられたトラック
#nは、該トラックよりも下位のトラックに対するアク
セスや、新たなデータを格納する為のリプレース等によ
って第2LRUリストが変更されるに従いその位置はL
RU側に近づく。該トラックが第2LRUリストのLR
U側に位置付けられてリプレース対象となるまでの間に
、追従する出力命令でのアクセスがあればヒットとなる
Track #n positioned on the MRU side of the second LRU list changes its position as the second LRU list changes due to access to a lower track than the track, replacement to store new data, etc.
Approach the RU side. The track is the LR of the second LRU list
If there is an access with a following output command before it is positioned on the U side and becomes a replacement target, it will be a hit.

またアクセスがなかった場合は、該入力命令は参照を目
的としたものとみなされ,該トラックはリプレースの対
象となる。
If there is no access, the input command is considered to be for reference, and the track becomes a replacement target.

この実施例によると、第2LRUリストのMRUにトラ
ックを位置付けた後は、そのトラックは他のデータへの
アクセス時のLRUリストの変更によって自然のなりゆ
きで下降する為、当該トラックに対し何の操作も必要と
しない。従って,プログラム論理が簡単で済むという利
点を持つ。
According to this embodiment, after a track is positioned in the MRU of the second LRU list, that track naturally moves down due to changes in the LRU list when accessing other data, so nothing can be done to the track. No operation required. Therefore, it has the advantage that the program logic is simple.

次に、アクセス済みトラックを優先的に破棄する契機を
定める他の実施例を第4図を用いて示す。
Next, another embodiment for determining the timing for preferentially discarding accessed tracks will be described with reference to FIG.

第4図は、ある順次アクセスされるファイルの様子を示
す。
FIG. 4 shows a file that is accessed in a certain sequential manner.

同図中、401はトラックであり、先頭に該トラックの
アドレス情報等を持つホームアドレス部(HA)402
があり、以降,レコード403が複数個存在する。
In the figure, 401 is a track, and a home address section (HA) 402 having address information of the track at the beginning.
Thereafter, there are multiple records 403.

順次アクセスにおいては、ファイルの先頭、即ち、ファ
イル中の最も若番のトラックからアクセスが開始され,
以降,レコードの昇順,トラックの昇順に従いアクセス
が進行する。
In sequential access, access starts from the beginning of the file, that is, the lowest track number in the file.
Thereafter, access proceeds in ascending order of records and tracks.

この実施例においては,該ファイルの先頭トラック、即
ちトラック#n(401)は,トラック全域にアクセス
が終了した時点で、キャッシュメモリからより優先的に
リプレースされる様にする。
In this embodiment, the first track of the file, ie, track #n (401), is preferentially replaced from the cache memory when the entire track has been accessed.

この「より優先的にリプレースされる様にする」ことは
、ここではそのトラックを前述のLRUリストのLRU
側に位置付けることによって行う。
This "to be replaced with higher priority" means that the track is replaced by the LRU in the LRU list mentioned above.
This is done by positioning it on the side.

ファイルへのアクセスが更新を目的としたものであった
場合、以降,中央処理装置はレコードの昇順、トラック
の昇順に従い入力命令を発行しながら、入力したデータ
をトラック#n(401)から更新処理を行う。
If the access to the file is for the purpose of updating, the central processing unit updates the input data starting from track #n (401) while issuing input commands in ascending order of records and tracks. I do.

更新されたトラック#n(401)のデータが出力命令
によって出力された時を契機として,その時点までに入
力命令の進行した最後のトラックを捜索し、トラック#
nとの1−ラック数の差を計測する。例えば,トラック
#nに対する出力命令受領時までに入力命令が最後に発
行されたトラックがトラックtt n +m(4 0 
5)であった場合、トラックの隔り数はmトラックとな
る。以降、このファイルについては、トラック全域に渡
って入力命令でのアクセスが終了したトラック、例えば
トラック1jn+mは、それまでの様なより優先的にキ
ャッシュメモリから破棄する様な処理は行わず、そのま
まキャッシュメモリに留めるようにする。
When the updated data of track #n (401) is output by an output command, the last track on which the input command has progressed up to that point is searched, and track #n (401) is output.
Measure the difference in 1-rack number from n. For example, the track to which the input command was last issued before receiving the output command for track #n is track tt n +m (4 0
5), the number of track intervals is m tracks. From now on, for this file, tracks whose entire track has been accessed by input commands, for example track 1jn+m, will not be discarded from the cache memory with higher priority as before, but will be cached as is. keep it in memory.

さらに入力命令でのアクセスが進行し、残しておいたト
ラック、即ちトラック#n+mより前記の隔差mトラッ
ク以上入力命令が先行した時、即ちトラック#n+2m
+1(406)に対して入力命令があった時,トラック
#n+mを,以後、出力命令にてアクセスされる可能性
が低いとみなし、より優先的にキャッシュメモリより破
棄する様にする。
When the access by the input command further progresses and the input command precedes the remaining track, that is, track #n+m, by the distance m tracks or more, that is, track #n+2m.
When there is an input command for +1 (406), track #n+m is considered to be less likely to be accessed by an output command from now on, and is discarded from the cache memory with higher priority.

この実施例によれば,出力命令が発行されるまでは入力
命令の完了したトラツ゛クをより優先的に破棄する様に
する為、該ファイルへの入力命令が参照を目的としたも
のであった場合には出力命令が発行されず,アクセス済
の不必要なデータがキャッシュメモリ内にたまることは
ない。また、入力命令が更新を目的としたものであり出
力命令が追従した場合でも,そのトラック隔たり数分だ
けの猶予期間の後、優先的にキャッシュメモリより破棄
されるので、更新時のヒット率向上を図りながら、キャ
ッシュ内の不要なデータを最小限に抑えることができる
According to this embodiment, until an output command is issued, the completed track of an input command is preferentially discarded, so if the input command to the file is for reference. No output command is issued, and unnecessary accessed data does not accumulate in the cache memory. In addition, even if the input instruction is for updating and the output instruction follows, it will be preferentially discarded from the cache memory after a grace period of several minutes between tracks, improving the hit rate when updating. This allows you to minimize unnecessary data in the cache.

なお,この実施例では出力命令が発行されるまでは、ア
クセス済みトラックを優先的に破棄するようにしたが,
前記トラック隔たり数に初期値を与えておき、計測値に
より変更するようにしてもよい6あるいは、用途によっ
ては固定値どしてもよい。
Note that in this embodiment, accessed tracks are preferentially discarded until an output command is issued.
An initial value may be given to the number of track gaps, and it may be changed according to a measured value6, or it may be returned to a fixed value depending on the application.

次に本発明の第3の実施例を第5図を用いて示す。Next, a third embodiment of the present invention will be shown using FIG.

ある順次アクセスによる入力命令実行時には、ある特定
の制御命令とそのパラメータとによって当該入力命令が
更新処理を目的としたものか、参照処理を目的としたも
のであるかが指示されるものとする。制御装置は,該制
御命令受領時にはそのパラメータ(即ち、更新処理の有
無)を例えばレジスタあるいはメモリに記憶する。順次
アクセスによる入力命令がトラック全域に渡って終了し
た時、該記憶情報に基づき第5図に示す様な以下のアル
ゴリズムにて処理する。
When an input command is executed by sequential access, a specific control command and its parameters indicate whether the input command is intended for update processing or reference processing. When the control device receives the control command, the control device stores the parameter (that is, the presence or absence of update processing) in, for example, a register or memory. When input commands by sequential access are completed over the entire track, processing is performed using the following algorithm as shown in FIG. 5 based on the stored information.

ステップ501においては、該記憶情報に基づき当該ト
ラックのデータが処理装置にて更新されるか否か、即ち
出力命令の追従があるか否かを判断する。前記制御命令
によって更新処理を行うことが指示された場合にはステ
ップ502の処理を行う.また更新処理を行わない事が
指示された場合もしくは前記制御命令の指示が無かった
場合には、ステップ503の処理を行う。
In step 501, it is determined based on the stored information whether the data of the track concerned is updated in the processing device, that is, whether or not the output command is followed. If the control command instructs to perform the update process, the process of step 502 is performed. Further, if there is an instruction not to perform the update process or if there is no instruction from the control command, the process of step 503 is performed.

ステップ502では当該トラックのデータをLRUリス
トのMRU側へ位置付ける。この処理により、当該トラ
ックのデータがキャッシュメモリ内から破棄されるまで
には、他のトラックに対するアクセスや新たなデータを
キャッシュメモリ内に格納する為のリプレース処理等に
よってLRUリストが変更され、当該トラックのデータ
がLRU側に位置付けられるまでの時間が与えられる。
In step 502, the data of the track is positioned on the MRU side of the LRU list. Through this process, before the data of the relevant track is discarded from the cache memory, the LRU list is changed due to access to other tracks, replacement processing to store new data in the cache memory, etc., and the data of the relevant track is discarded from the cache memory. The time required for the data to be located on the LRU side is given.

この間に、当該トラックに対して更新処理後の出力命令
が発行された場合はヒットとなる。
If an output command after update processing is issued to the track during this time, it will be a hit.

本処理ではM R u {IIIに位置付けることによ
り、当該トラックのデータが破棄されるまでには充分な
時間があり、出力命令受領時にヒットとなる可能性は大
きくなる。
In this process, by positioning M R u {III, there is sufficient time until the data in the track is discarded, and the possibility of a hit occurring when an output command is received increases.

ステップ503では当該トラックのデータをLRUリス
トのLRU側へ位置付ける。この処理により、当該トラ
ックのデータはより優先的にキャッシュメモリから破棄
されやすくなる。従って参照を目的とした順次アクセス
で入力され終った不必要なデータが長い間大量にキャッ
シュメモリ内に存在することはなくなる。
In step 503, the data of the track is positioned on the LRU side of the LRU list. This process makes it easier for the data of the track to be preferentially discarded from the cache memory. Therefore, a large amount of unnecessary data that has been input by sequential access for reference purposes will not remain in the cache memory for a long time.

なお、前記各実施例において,アクセス対象のデータの
属性情報(順次アクセスファイルか非順次アクセスファ
イルか)、及びエクステント情報(ディスク装置上の当
該ファイルの記憶範囲)を制御装置が認識することが必
要である。これについては特開昭55−91050号公
報をはじめ多くの公報類で示されており、現行の計算機
システムにおいて実用化されている範囲指定(Defi
ne Extent)コマンドによってソフトウェアか
ら通知されるものを用いてもよい。あるいは、当該ファ
イルに対するアク.セスの順序性(即ち,現在アクセス
されているデータの近傍のデータが、データの並びの昇
順方向へ順番にアクセスされたか否か)を制御装置が観
測する事によって、順次アクセスファイルか否かを認識
するようにしてもよい。
In each of the above embodiments, it is necessary for the control device to recognize the attribute information of the data to be accessed (sequential access file or non-sequential access file) and extent information (storage range of the file on the disk device). It is. This is described in many publications including Japanese Patent Application Laid-Open No. 55-91050, and it is known that the range specification (Defi
ne Extent) command notified from the software may also be used. Or access to the file. The control device can determine whether or not the file is sequentially accessed by observing the orderliness of the accesses (that is, whether data in the vicinity of the currently accessed data has been accessed sequentially in the ascending order of the data arrangement). It may be recognized.

[発明の効果] 以上の説明の様に本発明によれば,上位装置からの順次
アクセスによる入力命令が更新を目的としたものであっ
た場合には、追従する出力命令に対しキャッシュメモリ
をヒットとすることが可能となり,また,参照を目的と
したものであった場合にも不必要なデータを多量にキャ
ッシュメモリ内に残留させることがない為、順次アクセ
スに対しても効率よくキャッシュメモリを使用し、なお
かつ、ヒット率の向上を図ることが可能となる6
[Effects of the Invention] As described above, according to the present invention, if an input instruction by sequential access from a host device is for the purpose of updating, the cache memory is not hit for the following output instruction. In addition, even if the data is for reference, a large amount of unnecessary data will not remain in the cache memory, so the cache memory can be used efficiently even for sequential access. This makes it possible to improve the hit rate6.

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

第1図は本発明の一実施例の構或を示すブロック図,第
2図は一般的なキャッシュメモリおよびそのディレクト
リの構或を示すブロック図、第3図は本発明が適用され
るディスクキャッシュ・システムの構或例を示すブロッ
ク図,第4図は本発明の第2の実施例を説明するための
実施例概念図、第5図は本発明の第3の実施例を説明す
るためのフローチャート、第6図は第1図の実施例の具
体的構成例を示すブロック図である。 105・・・キャッシュメモリ、106・・・キャッシ
ュディレクトリ,203・・・スロット管理テーブル、
204・・・スロット管理ブロック、301・・・第I
LRUリスト、302・・・第2LRUリスト、303
・・・LRUリスト管理テーブル。
Fig. 1 is a block diagram showing the structure of an embodiment of the present invention, Fig. 2 is a block diagram showing the structure of a general cache memory and its directory, and Fig. 3 is a disk cache to which the present invention is applied.・A block diagram showing an example of the system configuration, FIG. 4 is a conceptual diagram of an embodiment for explaining the second embodiment of the present invention, and FIG. 5 is a conceptual diagram for explaining the third embodiment of the present invention. Flowchart FIG. 6 is a block diagram showing a specific example of the configuration of the embodiment of FIG. 1. 105... Cache memory, 106... Cache directory, 203... Slot management table,
204...Slot management block, 301...No. I
LRU list, 302...Second LRU list, 303
...LRU list management table.

Claims (1)

【特許請求の範囲】 1、上位装置からの入力命令にしたがって外部記憶装置
からキャッシュメモリ内に取り込まれたデータが順次ア
クセスファイルである場合、当該入力データを含む前記
キャッシュメモリ上でのデータ管理単位の全データをア
クセスした後に、該データ管理単位をキャッシュメモリ
から優先的に破棄するキャッシュメモリのデータ管理方
式において、 前記データ管理単位を優先的に破棄する際に、当該デー
タ管理単位を直ちに最先破棄対象とはしないことを特徴
とするキャッシュメモリデータ管理方式。 2、ランダムアクセスファイルと順次アクセスファイル
とが混在した外部記憶装置内の記憶内容の一部の写しを
データ管理単位に保持するキャッシュメモリにおけるデ
ータ管理単位のリプレース制御方式であって、 ランダムアクセスファイルについては、最も最近アクセ
スされたデータ管理単位に対して最もリプレースされに
くいリプレース順位を付与し、 順次アクセスファイルについては、最も最近アクセスさ
れたデータ管理単位に対して最もリプレースされにくい
リプレース順位を付与すると共にアクセスが終了したデ
ータ管理単位に対して最先ではないが優先的にリプレー
スされるリプレース順位を付与することを特徴とするリ
プレース制御方式。 3、主記憶装置と外部記憶装置との間に配置され、該外
部記憶装置の記憶内容の一部の写しを保持するキャッシ
ュメモリを用い、上位装置から前記外部記憶装置へのデ
ータ出力時には、一旦、前記キャッシュメモリへデータ
を転送した後、該キャッシュメモリから前記外部記憶装
置へ当該データを転送するライトアフタ型のキャッシュ
制御装置において、 前記キャッシュメモリ上の各データ管理単位に対して破
棄されるべき順に順序付けを行う破棄順序管理手段と、 特定のデータ管理単位についての前記破棄順序管理手段
による破棄順位を、最先に破棄される順位ではないが優
先的に破棄される順位に変更する破棄順序変更手段と を具備したことを特徴とするキャッシュ制御装置。 4、前記破棄順序管理手段は、複数のデータ管理単位を
、破棄順位の低い第1のグループと破棄順位の高い第2
グループとに分割して管理し、前記破棄順序変更手段は
、上位装置からのデータ入力命令が順次アクセスファイ
ルに対する入力命令であった場合、当該入力データを含
むデータ管理単位の全域に渡って前記上位装置への入力
が終了したときに、当該データ管理単位を前記第2グル
ープの最も破棄順位の低い位置に、または前記第1グル
ープの最も破棄順位の高い位置に位置付けることを特徴
とする請求項3記載のキャッシュ制御装置。 5、主記憶装置と外部記憶装置との間に配置され、該外
部記憶装置の記憶内容の一部の写しを保持するキャッシ
ュメモリを用い、上位装置から前記外部記憶装置へのデ
ータ出力時には、一旦、前記キャッシュメモリへデータ
を転送した後、該キャッシュメモリから前記外部記憶装
置へ当該データを転送するライトアフタ型のキャッシュ
制御装置において、 前記キャッシュメモリ上の各データ管理単位に対して破
棄されるべき順に順序付けを行う破棄順序管理手段と、 順次アクセスファイルに対して、入力命令によりキャッ
シュメモリに取り込まれた前記データ管理単位について
、該データ管理単位に対する出力命令が追従することな
く予め定めた数の後続のデータ管理単位に対して入力命
令が発行されたとき、当該データ管理単位を優先的に破
棄するよう前記破棄順序管理手段の破棄順序を変更する
破棄順序変更手段と を備えたことを特徴とするキャッシュ制御装置。 6、前記入力命令によりキャッシュメモリに取り込まれ
たデータ管理単位について、追従する命令が発行される
までに入力命令が発行されるデータ管理単位の数を計測
する計測手段を有し、該計測手段の計測結果により前記
予め定めた数を定めることを特徴とする請求項5記載の
キャッシュ制御装置。 7、ディスク装置の記憶内容の一部の写しを保持するデ
ィスクキャッシュメモリと、上位装置から前記ディスク
装置へのデータ出力時には、一旦、前記キャッシュメモ
リへデータを転送し、その後、該キャッシュメモリから
前記ディスク装置へ当該データを転送するライトアフタ
型のキャッシュ制御装置とを備えるキャッシュメモリシ
ステムにおいて、 前記上位装置からは、順次アクセスによる入力命令で入
力され終わったデータに対し、前記主記憶装置内で更新
処理を行ったあと再度出力命令を発行することを、当該
入力命令実行時点もしくは実行以前の時点において予め
前記キャッシュ制御装置に指示するようにし、 前記キャッシュ制御装置内に、前記キャッシュメモリ内
のデータ管理単位に破棄の順序付けを行う破棄順序管理
手段と、前記上位装置による更新処理を行うことが明示
されなかったデータ管理単位については優先的に破棄す
るよう前記破棄順序管理手段による破棄順位を繰り上げ
る破棄順位変更手段と を設けたことを特徴とするキャッシュメモリシステム。
[Scope of Claims] 1. When data fetched from an external storage device into a cache memory according to an input command from a host device is a sequential access file, a data management unit on the cache memory that includes the input data; In a cache memory data management method in which a data management unit is preferentially discarded from the cache memory after accessing all data in the cache memory, when discarding the data management unit preferentially, the data management unit is immediately discarded first. A cache memory data management method characterized by not discarding data. 2. A replacement control method for a data management unit in a cache memory that holds a copy of a part of the storage contents in an external storage device in which a random access file and a sequential access file are mixed, in a data management unit. gives the most recently accessed data management unit the replacement ranking that is least likely to be replaced, and for sequential access files, the most recently accessed data management unit is given the replacement ranking that is the least likely to be replaced, and A replacement control method is characterized in that a data management unit that has been accessed is given a replacement order in which it is preferentially replaced, although it is not the first one. 3. Using a cache memory that is placed between the main storage device and the external storage device and holds a copy of a part of the storage contents of the external storage device, when outputting data from the host device to the external storage device, , in a write-after type cache control device that transfers data to the cache memory and then transfers the data from the cache memory to the external storage device, wherein each data management unit on the cache memory is discarded. a discard order management means for sequentially arranging the order; and a discard order change for changing the discard order of a specific data management unit by the discard order management means to a discard order that is not the first to be discarded but preferentially discarded. A cache control device comprising: means. 4. The discard order management means divides the plurality of data management units into a first group with a low discard order and a second group with a high discard order.
When a data input command from a higher-level device is an input command for a sequential access file, the discard order changing means manages the data by dividing it into two groups, and when the data input command from a higher-level device is an input command for a sequential access file, 3. When the input to the device is completed, the data management unit is positioned at the lowest discarding position in the second group or at the highest discarding position in the first group. Cache controller as described. 5. Using a cache memory that is placed between the main storage device and the external storage device and holds a copy of a part of the storage contents of the external storage device, when outputting data from the host device to the external storage device, , in a write-after type cache control device that transfers data to the cache memory and then transfers the data from the cache memory to the external storage device, wherein each data management unit on the cache memory is discarded. a discard order management means for performing sequential ordering; and a discard order changing means for changing the discard order of the discard order management means so that the data management unit is preferentially discarded when an input command is issued to the data management unit. Cache controller. 6. A measuring means for measuring the number of data management units to which an input command is issued before a following command is issued, with respect to data management units taken into the cache memory by the input command; 6. The cache control device according to claim 5, wherein the predetermined number is determined based on a measurement result. 7. A disk cache memory that holds a copy of a part of the storage contents of the disk device. When data is output from the host device to the disk device, the data is first transferred to the cache memory, and then the data is transferred from the cache memory to the disk device. In a cache memory system comprising a write-after type cache control device that transfers the data to a disk device, the host device updates the data that has been input by sequential access input commands in the main storage device. The cache control device is instructed in advance to issue an output command again after the processing is executed at or before the execution of the input command, and the cache control device is configured to manage data in the cache memory. a discard order management means for ordering discards in units; and a discard order for moving up the discard order by the discard order management means so that data management units for which it has not been specified that update processing by the host device will be discarded preferentially; What is claimed is: 1. A cache memory system comprising: changing means.
JP01235138A 1989-09-11 1989-09-11 Cache memory data management method and cache control device Expired - Lifetime JP3083530B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP01235138A JP3083530B2 (en) 1989-09-11 1989-09-11 Cache memory data management method and cache control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP01235138A JP3083530B2 (en) 1989-09-11 1989-09-11 Cache memory data management method and cache control device

Publications (2)

Publication Number Publication Date
JPH0397053A true JPH0397053A (en) 1991-04-23
JP3083530B2 JP3083530B2 (en) 2000-09-04

Family

ID=16981618

Family Applications (1)

Application Number Title Priority Date Filing Date
JP01235138A Expired - Lifetime JP3083530B2 (en) 1989-09-11 1989-09-11 Cache memory data management method and cache control device

Country Status (1)

Country Link
JP (1) JP3083530B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721490B1 (en) 1998-09-30 2004-04-13 Kabushiki Kaisha Toshiba Hierarchical storage scheme and data playback scheme for enabling random access to realtime stream data

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5492156B2 (en) 2011-08-05 2014-05-14 株式会社東芝 Information processing apparatus and cache method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6721490B1 (en) 1998-09-30 2004-04-13 Kabushiki Kaisha Toshiba Hierarchical storage scheme and data playback scheme for enabling random access to realtime stream data
US7580610B2 (en) 1998-09-30 2009-08-25 Kabushiki Kaisha Toshiba Hierarchical storage scheme and data playback scheme for enabling random access to realtime stream data

Also Published As

Publication number Publication date
JP3083530B2 (en) 2000-09-04

Similar Documents

Publication Publication Date Title
US5257370A (en) Method and system for optimizing data caching in a disk-based computer system
US5513336A (en) System and method for determining when and what position in cache memory to store data elements utilizing least and last accessed data replacement method
US20030041214A1 (en) Cache control methods and apparatus for hard disk drives
US6381677B1 (en) Method and system for staging data into cache
US4466059A (en) Method and apparatus for limiting data occupancy in a cache
US5134563A (en) Sequentially processing data in a cached data storage system
US6327644B1 (en) Method and system for managing data in cache
US6877065B2 (en) Advanced read cache management
US4974197A (en) Batching data objects for recording on optical disks with maximum object count
US7120759B2 (en) Storage system and method for prestaging data in a cache for improved performance
US20030074525A1 (en) Cache control program and computer for performing cache processes
JPH05303528A (en) Write-back disk cache device
US6775745B1 (en) Method and apparatus for hybrid data caching mechanism
JPH08263380A (en) Disk cache control system
JPH04259048A (en) Pre-read data control system using statistic information
JPH0397053A (en) Cache memory data managing system and cache controller
JP4104283B2 (en) Storage subsystem and information processing system
JP3969809B2 (en) Data buffer management method in storage device
JPH04246746A (en) Storage device system
JP2000285022A (en) Disk controller
KR970004255B1 (en) Faster updating of data on parallel disk
JP3751814B2 (en) Cache memory control method
JP2854667B2 (en) Disk cache control method
JP2681986B2 (en) Computer system
EP0341036B1 (en) A method of operating an information handling system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080630

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080630

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090630

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100630

Year of fee payment: 10

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100630

Year of fee payment: 10