JPH09319652A - Look-ahead control method - Google Patents

Look-ahead control method

Info

Publication number
JPH09319652A
JPH09319652A JP9076809A JP7680997A JPH09319652A JP H09319652 A JPH09319652 A JP H09319652A JP 9076809 A JP9076809 A JP 9076809A JP 7680997 A JP7680997 A JP 7680997A JP H09319652 A JPH09319652 A JP H09319652A
Authority
JP
Japan
Prior art keywords
data
read
read request
area
prefetch
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
JP9076809A
Other languages
Japanese (ja)
Inventor
Toshiyuki Ukai
敏之 鵜飼
Masaaki Shimizu
正明 清水
Fujio Fujita
不二男 藤田
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 JP9076809A priority Critical patent/JPH09319652A/en
Publication of JPH09319652A publication Critical patent/JPH09319652A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To decrease the replacement of data locked aheard by a main memory with the other data. SOLUTION: When an operating system (OS) judges a read request from a user process to a secondary storage device as successive access, before looking ahead data following the data designated by that request, it is judged whether or not look-ahead is to be stopped. That judgement is executed so that these following data looked ahead in the cache area of the main memory can be prevented from being replaced with the other data. Namely, the data requested by this read request are already looked-ahead data (62), and it is judged whether these data are already replaced with the other data or not (63). When these two conditions are satisfied, look-ahead is wasted. Look-ahead added to this read request is not executed but a look-ahead stop flag is set (64) and concerning the following successive access, look-ahead is inhibited by this look-ahead stop flag.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、二次記憶装置から
プロセッサ用の主記憶内に設けられたキャッシュ領域に
データをそのデータが要求される前に読み出す先読み動
作を制御する方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for controlling a read-ahead operation for reading data from a secondary storage device into a cache area provided in a main memory for a processor before the data is requested.

【0002】[0002]

【従来の技術】通常の多くのコンピュータシステムで
は、ユーザプロセスが要求したデータの2次記憶装置か
らの読み出しあるいはそこへのデータの書き込みは、オ
ペレーティングシステム(OS)により主記憶内に設け
られたキャッシュ領域を介して行われている。ワークス
テーションでよく使用されている代表的なオペレーティ
ングシステム(OS)として、 X/Open Com
panyが開発し、ライセンスしているUNIXが知ら
れている。“The Design and Impl
ementation of the 4.3 BSD
UNIX Operating System”,
Addison−Wesley Publishing
Company, Inc.第29頁から第37頁、
第172頁から177頁、第191頁から第193頁、
第208頁から第211頁、(1989)(以下、参考
文献1と呼ぶ)参照。
2. Description of the Related Art In many ordinary computer systems, reading of data requested by a user process from a secondary storage device or writing data to the secondary storage device is performed by a cache provided in a main storage by an operating system (OS). It is done through the area. As a typical operating system (OS) often used in workstations, X / Open Com
UNIX, which is developed and licensed by pany, is known. "The Design and Impl
element of the 4.3 BSD
UNIX Operating System ”,
Addison-Wesley Publishing
Company, Inc. Pages 29 to 37,
Pages 172 to 177, pages 191 to 193,
See pages 208 to 211, (1989) (hereinafter referred to as reference 1).

【0003】このOSの下では、2次記憶装置からのデ
ータの先読みも行われている。すなわち、OSは、ユー
ザプロセスからの読み出し要求を処理するとき、そのユ
ーザプロセスが、たとえば、同じファイルに対する逐次
アクセスをしているか否かを判断する。もし、ユーザプ
ロセスが逐次アクセスをしていると判断されたときに
は、その読み出し要求を実行するとともに、ユーザプロ
セスが次に発行する入出力要求を予測し、予測したブロ
ックの読み出し要求も非同期的に2次記憶装置に対して
発行する。次にユーザプロセスがこの先読みされたデー
タに対する読み出し要求を発行したときには、そのデー
タはキャッシュ領域から直ちにユーザプロセスに転送さ
れる。このとき、さらに次のデータの先読みも実行され
る。この先読みは、このユーザプロセスが要求した読み
出し要求の処理と並行して実行される。たとえば、“E
xtent−like Performance fr
oma UNIX File System”、Pro
ceedings ofthe Winter 19
91、 USENIX Conference、第33
頁から第42頁(1991)(以下、参考文献2と呼
ぶ)参照。
Under this OS, prefetching of data from the secondary storage device is also performed. That is, when the OS processes a read request from a user process, the OS determines whether the user process is sequentially accessing the same file, for example. If it is determined that the user process is making sequential access, the read request is executed, the I / O request issued next by the user process is predicted, and the predicted block read request is also asynchronously set to 2 Issued to the next storage device. Next, when the user process issues a read request for the prefetched data, the data is immediately transferred from the cache area to the user process. At this time, prefetch of the next data is also executed. This prefetching is executed in parallel with the processing of the read request requested by this user process. For example, "E
xtent-like Performance fr
oma UNIX File System ", Pro
ceedings of the Winter 19
91, USENIX Conference, No. 33
See pages 42 to 1991 (hereinafter referred to as reference 2).

【0004】[0004]

【発明が解決しようとする課題】本発明者達による検討
の結果、従来技術による先読み方法では、先読みされた
データが、ユーザプロセスに使用される前に他のデータ
により置換されることが発生する可能性があることとを
見いだした。このような置換が発生すると、先読みされ
たこと自体が無駄になる。さらに、そのような無駄な先
読みが多数発生すると、2次記憶装置に対する読み出し
性能が低下する。
As a result of studies by the present inventors, in the prefetching method according to the prior art, the prefetched data may be replaced by other data before being used by the user process. I found that it was possible. When such replacement occurs, the prefetching itself becomes useless. Furthermore, if a large number of such useless prefetches occur, the read performance with respect to the secondary storage device deteriorates.

【0005】具体的には、多数のユーザプロセスが同時
に走行し、それらのプロセスのための多くのファイルが
開かれ、かつ、それらのユーザプロセスがそれらのファ
イルをほぼ同時期に逐次アクセスする場合、オペレーテ
ィングシステムが使用しようとするキャッシュエントリ
数が総キャッシュエントリ数を上回ることがある。この
ときに上記置換が発生する。
Specifically, if many user processes run simultaneously, many files for those processes are opened, and those user processes access those files sequentially at about the same time, The operating system may try to use more cache entries than the total cache entries. At this time, the above replacement occurs.

【0006】例えば、参考文献1の第208頁には、利
用可能なメインメモリの量に応じて、10から1000
の間の任意の数のキャッシュエントリを組み込むことが
できると記載されている。ここではキャッシュのエント
リ数を1000と仮定する。また、ユーザプロセスが読
み出しの際に使用するデータ量は、8ブロック分である
と仮定する。参考文献2の記載から、一回に先読みする
データ量は、7ブロックと仮定する。上記OSでは、2
次記憶装置に記憶されたブロックは論理ブロックと呼ば
れ、ここでは論理ブロックの大きさは8キロバイトと仮
定する。ユーザプロセスが60個存在し、それぞれが同
時に別々のファイルに対する読み出しを発生すると仮定
する。以上の仮定では、同時に使用されるキャッシュの
エントリ数は、900(8ブロック×60ファイル+7
ブロック×60ファイル)エントリとなる。このエント
リ数は、仮定したキャッシュの総エントリ数1000を
越えない。したがって、仮定した状況では先読みされた
データが実際に使用されるまでキャッシュ上に載ってい
ることが期待できる。
[0006] For example, page 208 of Ref. 1 has a range of 10 to 1000 depending on the amount of main memory available.
It is stated that any number of cache entries in between can be incorporated. Here, it is assumed that the number of cache entries is 1000. It is also assumed that the amount of data used by the user process for reading is 8 blocks. From the description in Reference Document 2, it is assumed that the amount of data to be prefetched at one time is 7 blocks. In the above OS, 2
The block stored in the next storage device is called a logical block, and here it is assumed that the size of the logical block is 8 kilobytes. Suppose there are 60 user processes, each of which simultaneously issues a read to a different file. Based on the above assumption, the number of cache entries used simultaneously is 900 (8 blocks x 60 files + 7
(Block × 60 files) entry. The number of entries does not exceed the assumed total number of cache entries of 1000. Therefore, in the assumed situation, it can be expected that the prefetched data remains on the cache until it is actually used.

【0007】しかし、読み出しのために同時に開かれて
いるファイル数がさらに多い場合、オペレーティングシ
ステムが使用しようとするキャッシュエントリ数が総キ
ャッシュエントリ数を上回ることがある。たとえば、同
時に読み出されるファイル数が120と仮定する。この
とき同時に使用されるキャッシュのエントリ数が180
0(8ブロック×120ファイル+7ブロック×120
ファイル)となる。この数と仮定したキャッシュのエン
トリ数1000を比較すると、仮定した状況では必要な
エントリ数がキャッシュの総エントリ数より大きくな
る。この結果、ユーザプロセスが要求した読み出しデー
タを含む論理ブロックのデータあるいは先読みされる論
理ブロックのデータをキャッシュに格納するときに、キ
ャッシュ領域内には、空きエントリあるいは使用済みの
データを保持するエントリが存在しなくなる。上記参考
文献1に記載の従来のキャッシュのエントリの管理で
は、このような場合、先読みされたデータがいずれかの
ユーザプロセスによりまだアクセスされていないときで
も、先読みされたデータを保持するエントリが、他のユ
ーザプロセスが要求したデータを保持するのに使用され
る。こうして、先読みされたデータが使用される前に、
他のデータに置換されることになる。
However, when the number of files that are simultaneously opened for reading is larger, the number of cache entries that the operating system tries to use may exceed the total number of cache entries. For example, assume that the number of files read simultaneously is 120. The number of cache entries used at this time is 180
0 (8 blocks x 120 files + 7 blocks x 120
File). Comparing this number with the assumed number of entries in the cache, 1000, the required number of entries is larger than the total number of entries in the cache in the assumed situation. As a result, when the data of the logical block including the read data requested by the user process or the data of the logical block to be read in advance is stored in the cache, an empty entry or an entry holding the used data is stored in the cache area. Cease to exist. In the conventional cache entry management described in Reference 1, in such a case, even if the prefetched data has not been accessed by any user process, the entry holding the prefetched data is Used to hold data requested by other user processes. Thus, before the prefetched data is used,
It will be replaced with other data.

【0008】本発明者達は、この問題は、同時に読み出
すファイル数が多いときだけでなく、ファイル数が比較
的少ない場合でも、ファイル毎に先読みするデータ量を
大きくしたときにも発生することを見いだした。前述の
仮定で、同時にファイルをアクセスするユーザプロセス
の数を60に減少する一方、先読みするデータ量を16
ブロックに増大すると、同時に使用されるキャッシュの
エントリ数が1440(8ブロック×60ファイル+1
6ブロック×60ファイル)となる。このエントリ数
は、仮定したキャッシュの総エントリ数1000を越え
る。この結果、先読みされたデータが実際に使用される
までキャッシュに載っていることが期待できなくなる。
The inventors of the present invention have found that this problem occurs not only when the number of files read simultaneously is large, but also when the number of files to be read ahead is large for each file even when the number of files is relatively small. I found it. Based on the above assumption, the number of user processes that access the file at the same time is reduced to 60, while the amount of data to be read ahead is reduced to 16
If the number of cache entries used simultaneously increases to 1440 (8 blocks x 60 files + 1)
6 blocks x 60 files). This number of entries exceeds the assumed total number of cache entries of 1000. As a result, it can no longer be expected that the prefetched data will remain in the cache until it is actually used.

【0009】本発明の目的は、このような先読みされた
データがユーザプロセスにより使用される前に他のデー
タにより置換されるのを抑制可能にするデータ先読み方
法を提供することにある。
An object of the present invention is to provide a data read-ahead method capable of suppressing such read-ahead data from being replaced by other data before being used by a user process.

【0010】本発明のより具体的な目的は、先読みされ
たデータの他のデータによる置換の発生を増大させない
データ先読み方法を提供することである。
A more specific object of the present invention is to provide a data prefetching method that does not increase the occurrence of replacement of prefetched data with other data.

【0011】本発明のより具体的な他の目的は、先読み
されたデータの他のデータによる置換の発生を防止可能
なデータ先読み方法を提供することである。
Another more specific object of the present invention is to provide a data prefetching method capable of preventing occurrence of replacement of prefetched data with other data.

【0012】[0012]

【課題を解決するための手段】上記課題を解決するため
に、本発明による先読み制御方法は、上記先読みを実行
する前に、上記読み出し要求が予め定められた先読み停
止条件を満たすか否かを判別し、上記読み出し要求が上
記条件を満たすとき、上記先読みを停止するステップを
有する。ここで、上記条件は、後続のデータが先読みさ
れた場合に上記後続のデータが、上記2次記憶装置から
上記キャッシュ領域に後に読み出されるであろう他のデ
ータにより置換されるのを回避するための条件である。
In order to solve the above problem, the prefetch control method according to the present invention determines whether the read request satisfies a predetermined prefetch stop condition before executing the prefetch. If the read request satisfies the above condition, the prefetching is stopped. Here, the condition is to prevent the subsequent data from being replaced by other data that will be read later from the secondary storage device into the cache area when the subsequent data is read ahead. Is the condition.

【0013】本発明のより具体的な態様では、すでに先
読みされたデータが、ユーザプロセスに転送される前に
他のいずれかのデータにより上記キャッシュ領域内で置
換されたことが検出されたとき、その後は先読みが停止
される。
In a more specific aspect of the present invention, when it is detected that already prefetched data has been replaced in the cache area by any other data before being transferred to the user process, After that, prefetching is stopped.

【0014】本発明のより具体的な他の態様では、先読
みされたデータを保持するキャッシュ領域を他のデータ
に割り当てないようにキャッシュ領域の割り当てが制御
される。先読みデータに割り当てるべきキャッシュ領域
が存在しないときには、先読みが停止される。
In another more specific aspect of the present invention, the allocation of the cache area is controlled so that the cache area holding the prefetched data is not allocated to other data. When there is no cache area to be allocated to the prefetch data, the prefetch is stopped.

【0015】[0015]

【発明の実施の形態】本発明に係るデータ先読み方法
を、図面に示したいくつかの実施の形態を参照してさら
に詳細に説明する。なお、以下においては、同じ参照番
号は同じもの若しくは類似のものを表すものとする。ま
た、第2の発明の実施の形態以降では、第1の発明の実
施の形態との相違点を説明するに止める。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The data prefetching method according to the present invention will be described in more detail with reference to some embodiments shown in the drawings. In the following, the same reference numbers represent the same or similar items. Further, in the second and subsequent embodiments of the invention, only the differences from the first embodiment of the invention will be described.

【0016】<発明の実施の形態1> (1)動作の概要 図1において、コンピュータシステムは、上位装置であ
るプロセッサ1と2次記憶装置としての磁気ディスク記
憶装置2から構成される。2次記憶装置は実際には複数
の磁気ディスク記憶装置から構成されてもよく、あるい
はアレイディスクから構成されてもよい。プロセッサ1
は、命令を実行する命令ユニット、主記憶、主記憶を制
御する記憶制御装置等から構成されるが、これらの回路
は簡単化のために図示していない。代わりに、図には、
プロセッサ1のブロック内に、走行している一つのユー
ザプロセス3とオペレーティングシステム(以下OS)
4を示している。プロセッサ1上には実際には多数のユ
ーザプロセスが同時に走行しているが、図には簡単化の
ために一つのユーザプロセス3のみを示す。これらのユ
ーザプロセスの数は、1よりはるかに多い数、たとえば
60程度とする。
<First Embodiment of the Invention> (1) Outline of Operation In FIG. 1, a computer system is composed of a processor 1 which is a host device and a magnetic disk storage device 2 which is a secondary storage device. The secondary storage device may actually be composed of a plurality of magnetic disk storage devices, or may be composed of array disks. Processor 1
Is composed of an instruction unit for executing instructions, a main memory, a storage control device for controlling the main memory, etc., but these circuits are not shown for simplification. Instead, the figure
One running user process 3 and operating system (hereinafter OS) in the block of the processor 1.
4 is shown. Although a large number of user processes are actually running on the processor 1 at the same time, only one user process 3 is shown in the figure for simplification. The number of these user processes is much larger than 1, for example, about 60.

【0017】ユーザプロセス3が、2次記憶装置2内の
あるファイルに対する読み出し要求5を発行したとき、
OS4が読み出し処理6を実行する。こうして、ユーザ
プロセス3が要求したデータを含む論理ブロックのデー
タ(要求対象ブロックデータ)2aが磁気ディスク記憶
装置2から読み出され、OS4が管理するキャッシュ領
域10内に格納される。要求対象ブロックデータ2a中
の、ユーザプロセスが要求したデータ(要求対象デー
タ)は、ユーザプロセス3が用意したユーザバッファ8
に転送される。読み出し処理6は、上記読み出し要求の
実行と並行して、この読み出し要求5に対応する先読み
を実行するか否かを判定する。先読みが実行されたとき
には、複数の論理ブロックのデータが先読みされる。こ
の先読み論理ブロック数は、1よりかなり多い数、たと
えば、7ブロック程度と仮定する。先読みされた論理ブ
ロックのデータ(先読み対象ブロックデータ)2bが、
キャッシュ領域10内に格納される。これにより、ユー
ザプロセス3からの読み出し要求に関する読み出し処理
を終了する。
When the user process 3 issues a read request 5 for a file in the secondary storage device 2,
The OS 4 executes the read process 6. Thus, the logical block data (request target block data) 2a including the data requested by the user process 3 is read from the magnetic disk storage device 2 and stored in the cache area 10 managed by the OS 4. The data requested by the user process (request target data) in the request target block data 2a is the user buffer 8 prepared by the user process 3.
Is forwarded to The read processing 6 determines whether or not the prefetch corresponding to the read request 5 is executed in parallel with the execution of the read request. When the prefetch is executed, the data of a plurality of logical blocks is prefetched. It is assumed that the number of prefetch logical blocks is considerably larger than 1, for example, about 7 blocks. The pre-read logical block data (pre-read target block data) 2b is
It is stored in the cache area 10. As a result, the read process related to the read request from the user process 3 ends.

【0018】読み出し処理6は、先読みを実行するか否
かを判定するために、この読み出し要求5が逐次読み出
し要求であるか否かを判別する。本実施の形態に特徴的
なことは、この読み出し要求が逐次読み出し要求である
場合でも、この読み出し要求が要求するデータの後続の
データの先読みを直ちに実行するのではなく、先読み停
止判定処理47により、先読みを停止すべきか否かを判
定するところにある。具体的には、停止判定処理47で
は、この読み出し要求が、すでにキャッシュ領域10に
先読みされたデータに対する読み出し要求であって、か
つ、そのデータが他のデータにより置換されているとい
う先読み停止条件を満たすか否かが判別される。この条
件が満たされた場合には、この読み出し要求が要求する
データの後続のデータの先読みが停止される。さらに、
その後のこのファイルに対する逐次読み出し要求に対し
ても先読みが停止される。
The read processing 6 determines whether or not the read request 5 is a sequential read request in order to determine whether or not to perform prefetching. What is characteristic of this embodiment is that even if this read request is a sequential read request, the prefetch of the data subsequent to the data requested by this read request is not executed immediately, but rather by the prefetch stop determination processing 47. , Is to determine whether or not prefetching should be stopped. Specifically, in the stop determination process 47, this read request is a read request for the data that has already been read in advance in the cache area 10, and the read-ahead stop condition that the data has been replaced by other data is set. Whether or not it is satisfied is determined. When this condition is satisfied, prefetching of data subsequent to the data requested by this read request is stopped. further,
Prefetching is also stopped for subsequent sequential read requests for this file.

【0019】後述するように、本実施の形態が採用する
キャッシュ領域10の管理方法では、この条件が満たさ
れたことは、先読みされたデータがユーザプロセスによ
り利用される前に、他のデータに置換されたことを示す
ので、この先読みは無駄になっている。このような条件
が満たされるのは、多くのファイルが同時にオープンさ
れ、多くのユーザプロセスが逐次読み出し要求をそれら
のファイルに対して発行しているときである。したがっ
て、本実施の形態では、このような他のデータによる先
読みデータの置換が発生したときには、その後は先読み
はしないように先読みを制御する。したがって、本実施
の形態では、一つのファイルに対して、一度は他のデー
タによる先読みデータの置換が発生するが、その後の同
じような無駄なデータの先読みをなくすことができる。
As will be described later, in the management method of the cache area 10 adopted in this embodiment, the fact that this condition is satisfied means that the prefetched data is stored in other data before being used by the user process. This look-ahead is wasted because it indicates a replacement. This condition is met when many files are open simultaneously and many user processes are issuing sequential read requests to those files. Therefore, in the present embodiment, when such replacement of the prefetch data with other data occurs, the prefetch is controlled so that the prefetch is not performed thereafter. Therefore, in the present embodiment, although the read-ahead data is replaced with another data once for one file, the same useless data read-ahead thereafter can be eliminated.

【0020】(2)OSにおけるファイル管理 OS4は、以下に述べるiノードに記憶された新しいい
くつかの情報を使用して先読み停止判定処理47を実行
する以外は公知の手順で磁気ディスク記憶装置2内の複
数のファイルを管理する。たとえば、参考文献1を参
照。具体的には、ユーザプロセス3は、ファイル入出力
をするために、最初にオープンシステムコールを発行す
る。OSは磁気ディスク記憶装置2に保持された複数の
ファイルを大域的に管理するファイル表182とそれぞ
れ一つのファイルに対するいずれか一つのユーザプロセ
スからのアクセスを実行するための情報を含む複数のi
ノード9と、ユーザプロセスごとに設けられたファイル
記述子表181とを有する。
(2) File management in OS The OS 4 uses a known procedure except that the read-ahead stop determination process 47 is executed using some new information stored in the inode described below. Manage multiple files in. For example, see reference 1. Specifically, the user process 3 first issues an open system call to input / output a file. The OS globally manages a plurality of files held in the magnetic disk storage device 2 and a plurality of i including information for executing an access from any one user process to each one file.
It has a node 9 and a file descriptor table 181 provided for each user process.

【0021】OSは、このシステムコールで要求された
ファイルをオープンすると、そのファイルに対するiノ
ード9を生成する。具体的には、OSは、磁気ディスク
記憶装置2上に格納されているiノードを主記憶に読み
出す。以下、本明細書でiノードというときには主記憶
に読み出されたiノードのことを指す。OSは、その
後、それ自体公知のファイル表182にエントリ183
を追加し、そのユーザプロセス3に対応するファイル記
述子表181内にエントリを追加し、ユーザプロセス3
にこのファイル記述子表181に追加されたエントリの
内容を返す。この内容はファイル記述子と呼ばれ、ファ
イル表182に追加されたエントリ183に対するポイ
ンタからなる。
When the OS opens the file requested by this system call, the OS creates the inode 9 for the file. Specifically, the OS reads the i-node stored in the magnetic disk storage device 2 into the main memory. Hereinafter, the term “i-node” used in this specification refers to an i-node read into the main memory. The OS then makes an entry 183 in the file table 182 known per se.
Is added, an entry is added in the file descriptor table 181 corresponding to the user process 3,
The contents of the entry added to this file descriptor table 181 are returned to. This content is called a file descriptor and consists of a pointer to the entry 183 added to the file table 182.

【0022】iノード9は、公知のiノードと同様に、
ファイルの所有者、アクセス権、ファイルの大きさなど
のファイルを管理するためのファイル管理情報と、磁気
ディスク記憶装置2上のデータを格納している論理ブロ
ックをアクセスするための論理ブロックへの指標を有す
る。本実施の形態のiノード9は、公知のiノードと異
なり、上記先読み停止判定処理47のために、最終アク
セス位置22と、最終先読み位置23と、先読み停止フ
ラグ24も有する。最終アクセス位置22と最終先読み
位置23は、対応するファイルに対して、同じユーザプ
ロセス3が最終にアクセス要求を発行した位置とそのユ
ーザプロセス3のために最終に先読みされた位置を表
す。先読み停止フラグ24は、対応するファイルに対し
て、先読みが禁止されたときにセットされる。
The inode 9 is similar to the known inode,
File management information for managing the file such as the file owner, access right, and file size, and an index to the logical block for accessing the logical block storing the data on the magnetic disk storage device 2. Have. Unlike the known i-node, the i-node 9 of the present embodiment also has a final access position 22, a final pre-read position 23, and a pre-read stop flag 24 for the pre-read stop determination process 47. The final access position 22 and the final look-ahead position 23 represent the position to which the same user process 3 finally issued an access request for the corresponding file and the position to which the pre-reading process was last performed for that user process 3. The prefetch stop flag 24 is set when prefetch is prohibited for the corresponding file.

【0023】公知のファイル表と同じく、ファイル表1
82のエントリ183は、プロセスからの参照数、次の
入出力の開始点と予期されるファイル中のバイトオフセ
ット、オープンしているプロセスに対するアクセス権
(読み出し、書き込み)、オープンしたファイルのiノ
ード9を指すポインタを含む。このバイトオフセットが
そのファイル内で次に読み書きする位置を決定する。例
えば、ファイルのオープン時、ファイルの先頭から読み
書きする場合は、ファイル表中のバイトオフセットは0
に設定される。また、ユーザプロセスが追加書き込みモ
ードでファイルをオープンすれば、ファイル表中のバイ
トオフセットはファイルの大きさに設定される。ユーザ
プロセス3からのその後の入出力要求は、readある
いはwriteシステムコールを使って行われる。この
とき、これらシステムコールは、ファイル記述子、ユー
ザプロセス空間内のバッファアドレス、データの大きさ
を引数として含む。つまり、readあるいはwrit
eシステムコールでは、ファイル内での読み書きすべき
オフセットを指定しない。ファイルデータの読み出しお
よび書き込みが行われると、ファイル表182内のバイ
トオフセットが転送されたデータの大きさだけ更新され
る。ファイル表中のバイトオフセットは、lseekシ
ステムコールによって、ユーザプロセスが直接設定する
こともできる。
The file table 1 as well as the known file table
The entry 183 of 82 is the number of references from the process, the starting point of the next input / output and the byte offset in the expected file, the access right (read / write) to the opened process, the inode 9 of the opened file. Contains a pointer to. This byte offset determines the next read / write position within the file. For example, when reading or writing from the beginning of the file when opening the file, the byte offset in the file table is 0.
Is set to If the user process opens the file in the additional write mode, the byte offset in the file table is set to the size of the file. Subsequent input / output requests from the user process 3 are made using read or write system calls. At this time, these system calls include the file descriptor, the buffer address in the user process space, and the data size as arguments. That is, read or writ
The e system call does not specify the offset to read or write in the file. When the file data is read and written, the byte offset in the file table 182 is updated by the size of the transferred data. The byte offset in the file table can also be directly set by the user process by the lseek system call.

【0024】ファイル表182中にファイルのバイトオ
フセットを保有することの利点は、同じファイルに対し
て複数のユーザプロセスがバイトオフセットを共有した
り、あるいは別々のバイトオフセットに持つことができ
ることである。つまり、複数のユーザプロセス用の複数
のファイル記述子表181に属する複数のエントリがフ
ァイル表182の一つのエントリを指すように、それら
の複数のエントリのファイル記述子を決定することがで
きる。この場合、それらのユーザプロセスからファイル
入出力を実行する際、これらのユーザプロセスは、この
共有されたエントリ内の同じバイトオフセットを共有で
きる。また、複数のユーザプロセス用の複数のファイル
記述子表181に属する複数のエントリがファイル表1
82の異なるエントリ183を指すように、これらのフ
ァイル記述子表181の上記複数のエントリのファイル
記述子を決定し、さらに、ファイル表182のこれらの
エントリ183が一つのファイルに対するiノード9を
指すようにファイル表182内の上記異なるエントリ内
のiノードへのポインタを決定することもできる。この
場合には、これらのユーザプロセスは、同じファイルに
対して別々のバイトオフセットを持つことができる。
The advantage of having a file byte offset in the file table 182 is that multiple user processes can share the byte offset for the same file, or have different byte offsets. That is, it is possible to determine the file descriptors of the plurality of entries so that the plurality of entries belonging to the plurality of file descriptor tables 181 for the plurality of user processes point to one entry of the file table 182. In this case, when performing file I / O from those user processes, these user processes can share the same byte offset within this shared entry. Further, a plurality of entries belonging to the plurality of file descriptor tables 181 for the plurality of user processes are the file table 1
82 determine the file descriptors of the plurality of entries in the file descriptor table 181 to point to different entries 183, and further, these entries 183 in the file table 182 point to the inode 9 for a file. Thus, it is possible to determine the pointer to the inode in the different entry in the file table 182. In this case, these user processes can have different byte offsets for the same file.

【0025】(3)データ読み出し処理6 ユーザプロセス3が読み出し要求5を発行したときに、
OS4が読み出し処理6を実行する。ユーザプロセス3
が要求するブロックの数は一般には1よりかなり多い複
数であり、ここでは8程度と仮定する。図3を参照する
に、この処理6では、まず、ユーザからの読み出し要求
がファイルにおけるブロックの相対位置であるファイル
ブロック番号に変換される(ステップ41)。さらに、
ユーザプロセス3からの読み出し要求5が指定するファ
イル名から該当するファイルのiノードが判別される。
さらに、読み出し要求5が指定するファイル内のブロッ
ク(ファイルブロック)の位置を示すファイルブロック
番号が、そのファイルブロックの磁気ディスク記憶装置
2上での格納位置を示す論理ブロック番号にiノード9
内の情報を使用して変換される(ステップ42)。
(3) Data read processing 6 When the user process 3 issues a read request 5,
The OS 4 executes the read process 6. User process 3
The number of blocks required by the above is generally a number considerably larger than 1, and here it is assumed that it is about 8. Referring to FIG. 3, in the process 6, first, a read request from the user is converted into a file block number which is a relative position of a block in the file (step 41). further,
From the file name specified by the read request 5 from the user process 3, the inode of the corresponding file is determined.
Further, the file block number indicating the position of the block (file block) in the file designated by the read request 5 is converted to the logical block number indicating the storage position of the file block on the magnetic disk storage device 2 by the inode 9
It is transformed using the information in (step 42).

【0026】次に、ユーザプロセスからの読み出し要求
が指定するデータを含む要求対象論理ブロックデータの
読み出し要求が非同期で磁気ディスク記憶装置2に対し
て発行される(ステップ43)。この要求対象論理ブロ
ックデータの読み出し要求を磁気ディスク記憶装置2に
発行する前に、この要求対象論理ブロックデータの読み
出し要求に対して公知の方法で、キャッシュ10に対し
てヒットチェックが行われる。具体的には、ヒットチェ
ックは、次の方法により行われる。有効なデータを持つ
キャッシュエントリは、論理ブロック番号の関数として
ハッシュされた個々のハッシュ待ち行列(図示せず)上
に存在する。OSは、要求対象データが格納された論理
ブロックを見出し、それを基にハッシュ待ち行列をたど
る。論理ブロックがハッシュ待ち行列から見つかればキ
ャッシュはヒットしたことになる。もし、この読み出し
要求に対してキャッシュ10がヒットした場合、そのヒ
ットしたキャッシュエントリに保持されたデータがユー
ザプロセス3内のユーザバッファ8に転送され、上記非
同期の読み出し要求は発行されない。もし、キャッシュ
10がヒットしなかったときには、この要求対象論理ブ
ロックデータを保持するためのキャッシュエントリが後
に説明する方法でキャッシュ10から探索される。
Next, a read request for the requested logical block data including the data specified by the read request from the user process is asynchronously issued to the magnetic disk storage device 2 (step 43). Before issuing the read request for the request target logical block data to the magnetic disk storage device 2, a hit check is performed on the cache 10 by a known method for the read request for the request target logical block data. Specifically, the hit check is performed by the following method. Cache entries with valid data reside on individual hash queues (not shown) that are hashed as a function of logical block number. The OS finds the logical block storing the requested data and traces the hash queue based on the logical block. If the logical block is found in the hash queue, the cache has been hit. If the cache 10 hits the read request, the data held in the hit cache entry is transferred to the user buffer 8 in the user process 3, and the asynchronous read request is not issued. If the cache 10 does not hit, the cache entry for holding the requested logical block data is searched from the cache 10 by the method described later.

【0027】その後、この読み出し要求が逐次読み出し
要求かどうかが判断される(ステップ45)。本実施の
形態では逐次読み出し要求かどうかは、現在のアクセス
位置が最終アクセス位置22(図1)の次のアドレス位
置かどうかで判断される。後にステップ52および53
で説明されるように、iノード9に対応するファイルに
対していずれかのユーザプロセスから要求された読み出
し要求により磁気ディスク記憶装置2がアクセスされる
ごとに、その要求によりアクセスされた最後のファイル
ブロックの番号が最終アクセス位置22に書き込まれ
る。ここで、その読み出し対象ブロックが複数のブロッ
クからなるときには、最後に読み出されるブロックのフ
ァイルブロック番号が書き込まれる。この結果、この逐
次アクセスの判定方法は、アクセスするプロセスの数と
は独立にファイル単位で行われる。したがって、二つの
ユーザプロセスがそれぞれ異なるバイトオフセットで、
交互に同じファイル内の連続するブロックをアクセスす
るような場合は、これらのアクセスは逐次アクセスとは
みなされない。
Thereafter, it is judged whether this read request is a sequential read request (step 45). In the present embodiment, whether or not the sequential read request is made is determined by whether or not the current access position is the address position next to the final access position 22 (FIG. 1). Later steps 52 and 53
As will be described in Section 3, every time the magnetic disk storage device 2 is accessed by a read request requested by any user process for the file corresponding to the inode 9, the last file accessed by that request The block number is written in the final access position 22. Here, when the read target block is composed of a plurality of blocks, the file block number of the last read block is written. As a result, this sequential access determination method is performed in file units independently of the number of processes to access. Therefore, two user processes have different byte offsets,
If alternating blocks are accessed consecutively in the same file, then these accesses are not considered sequential.

【0028】現在の読み出し要求がステップ45で逐次
的アクセスではないと判断された場合は、最終先読み位
置23が要求対象ブロックのファイルブロック番号でも
って更新される(ステップ52)。要求対象ブロックが
複数のブロックからなるときには、それらのブロックの
内の最後のブロックのファイルブロック番号がこの更新
に使用される。この更新は、後に逐次アクセスが発生し
た場合に停止判定処理47をその逐次アクセスに対して
実行できるようにするために行われる。一方、逐次的ア
クセスであるときには、先読み停止判定処理47が実行
され、先読みを実行するか否かが判定される。従って、
逐次アクセスに対して直には先読みは行われない。先読
み停止判定処理47は本実施の形態の特徴的な部分であ
り、その詳細は後に説明する。
When it is determined in step 45 that the current read request is not sequential access, the final prefetch position 23 is updated with the file block number of the requested block (step 52). When the requested block consists of multiple blocks, the file block number of the last block of those blocks is used for this update. This update is performed so that the stop determination process 47 can be executed for the sequential access when the sequential access occurs later. On the other hand, when the access is a sequential access, the prefetch stop determination processing 47 is executed to determine whether or not the prefetch is executed. Therefore,
Prefetch is not performed directly for sequential access. The prefetch stop determination processing 47 is a characteristic part of the present embodiment, and its details will be described later.

【0029】先読み停止判定処理47で先読みを停止す
ると判定された場合は、すでに述べたステップ52が実
行される。先読み停止判定処理47において先読みを行
うと判定された場合、先読みするデータのサイズ(先読
み論理ブロック数)が決定される(ステップ46)。こ
の決定は、読み出し処理6を実行する毎に次のようにし
て行われる。アクセス対象のファイルに対してすでに先
読みされた論理ブロック数があらかじめ定められたる閾
値を下回ったときは、先読み論理ブロック数がシステム
であらかじめ決まっている適当な数に設定され、この設
定された複数の論理ブロックの先読みが一括して行われ
る。すでに先読みされた論理ブロック数が上記閾値を上
回っているときは、先読み論理ブロック数が0に設定さ
れ、今回の読み出し処理における先読みが抑制される。
一般に、磁気ディスク記憶装置2などでは、一回に入出
力するデータ量を大きくする方が転送が効率的になる。
すなわち、複数のブロックをまとめて読み出すと、OS
の入出力要求の発行処理や入出力完了の割り込み処理の
回数も減り、このためデータ量あたりの入出力処理時間
が短縮される。なお、このように複数のブロックを一括
して読み出すには、参考文献2の第38頁に記載の技術
が使用可能である。
When it is determined in the prefetch stop determination processing 47 that the prefetch is stopped, the above-described step 52 is executed. When it is determined in the prefetch stop determination process 47 that prefetching is performed, the size of the data to be prefetched (the number of prefetch logical blocks) is determined (step 46). This determination is made as follows each time the reading process 6 is executed. When the number of pre-read logical blocks for the file to be accessed falls below a predetermined threshold, the number of pre-read logical blocks is set to an appropriate number that is predetermined by the system, and this set of multiple Pre-reading of logical blocks is performed collectively. When the number of pre-read logical blocks exceeds the threshold value, the number of pre-read logical blocks is set to 0, and pre-read in the current read processing is suppressed.
In general, in the magnetic disk storage device 2 or the like, the larger the amount of data input / output at one time, the more efficient the transfer.
That is, when a plurality of blocks are read together, the OS
The number of I / O request issuance processes and I / O completion interrupt processes is also reduced, which reduces the I / O processing time per data amount. The technique described on page 38 of Reference 2 can be used to collectively read out a plurality of blocks.

【0030】すでに述べたとおり、この先読み論理ブロ
ック数は、1よりかなり多い数、たとえば、7ブロック
程度と仮定している。この場合、今回の読み出し処理に
おける先読みを行うかどうかの閾値は、7以下の数に設
定される。例えば、閾値を1とすれば、先読みした最終
の論理ブロックのデータがユーザプロセスの要求対象と
なったときに、次の7ブロックの先読みが開始される。
また、例えば、閾値を7とすれば、先読みした最初の論
理ブロックのデータがユーザプロセスの要求対象となっ
たときに、先読みした最終の論理ブロックの次の7ブロ
ックの先読みが開始される。設定された論理ブロック数
のデータの先読みを実行するために、先読み対象論理ブ
ロックの読み出し要求が非同期で磁気ディスク記憶装置
2に対して発行される(ステップ48)。なお、この先
読み対象データの読み出し要求の発行前に、この先読み
対象データを保持するためのキャッシュエントリが後に
説明する方法により確保される。
As described above, it is assumed that the number of prefetch logical blocks is considerably larger than 1, for example, 7 blocks. In this case, the threshold value of whether or not to perform pre-reading in this read processing is set to a number of 7 or less. For example, if the threshold value is set to 1, the prefetch of the next 7 blocks is started when the data of the final prefetched logical block is requested by the user process.
Further, for example, if the threshold value is set to 7, when the data of the first prefetched logical block is the target of the user process, prefetching of the next 7 blocks of the prefetched final logical block is started. In order to execute the prefetch of the set number of logical blocks of data, a read request of the prefetch target logical block is asynchronously issued to the magnetic disk storage device 2 (step 48). Before issuing the read request for the prefetch target data, a cache entry for holding the prefetch target data is secured by a method described later.

【0031】さらに、最終先読み位置23が先読み対象
ブロックのファイルブロック番号でもって更新される
(ステップ49)。先読み対象ブロックが複数のブロッ
クからなるときには、最後に先読みされるブロックのフ
ァイルブロック番号がこの更新に使用される。さらに、
最終アクセス位置22が最後に読み出したファイルブロ
ック番号で更新される(ステップ53)。ステップ43
で実行したユーザプロセスの要求対象論理ブロックのデ
ータが、磁気ディスク記憶装置2からキャッシュ領域1
0に読み出されるのが待たれる(ステップ50)。この
要求対象論理ブロックデータが読み出されたときに、後
に説明するように、ステップ43の実行前に探索された
キャッシュエントリのブロックデータ領域に格納され
る。このブロックデータのうち、ユーザプロセスの要求
対象データがユーザバッファ8へ転送される(ステップ
51)。この先読み対象ブロックが読み出されると、こ
こでは図示しないが、後に説明するように、ステップ4
8の実行前に確保されたキャッシュエントリのブロック
データ領域にそのデータが格納される。
Further, the final prefetch position 23 is updated with the file block number of the prefetch target block (step 49). When the prefetch target block consists of a plurality of blocks, the file block number of the last prefetched block is used for this update. further,
The last access position 22 is updated with the last read file block number (step 53). Step 43
Data of the logical block requested by the user process executed in
It is waited for the data to be read out to 0 (step 50). When this requested logical block data is read, it is stored in the block data area of the cache entry searched before the execution of step 43, as will be described later. Of the block data, the data requested by the user process is transferred to the user buffer 8 (step 51). When this prefetch target block is read, although not shown here, as will be described later, step 4
The data is stored in the block data area of the cache entry secured before the execution of 8.

【0032】(4)キャッシュ管理 要求対象データ2aおよび先読み対象データ2bはキャ
ッシュ領域10内で以下のように管理される。キャッシ
ュ領域10には複数のキャッシュエントリが格納され
る。各キャッシュエントリは、図5に示すように、キャ
ッシュエントリヘッダ81とブロックデータ領域82か
らなる。キャッシュエントリヘッダ81は、キャッシュ
エントリの管理情報やブロックデータ領域82を指すブ
ロックデータ領域へのポインタ83、ハッシュ待ち行列
を構成するためのポインタ、後述する複数の自由リスト
のいずれか一つにおける、前のキャッシュエントリおよ
び後のキャッシュエントリを指すポインタ84、85、
ハッシュ待ち行列へのポインタ87などからなる。ハッ
シュ待ち行列はキャッシュエントリの高速検索用に用い
られる。このハッシュ待ち行列は、前述のステップ43
における説明のように、キャッシュヒットのチェックに
使われる。キャッシュエントリは、一つの論理ブロック
に対して、一つ使用される。従って、論理ブロックデー
タ領域82は、最大で論理ブロックサイズと同じサイズ
を持つ。前述のごとく、複数の論理ブロックが一括して
読み出される場合は、論理ブロックの数だけキャッシュ
エントリが必要となる。
(4) Cache Management The request target data 2a and the prefetch target data 2b are managed in the cache area 10 as follows. A plurality of cache entries are stored in the cache area 10. Each cache entry includes a cache entry header 81 and a block data area 82, as shown in FIG. The cache entry header 81 includes a cache entry management information, a pointer 83 to a block data area pointing to the block data area 82, a pointer for forming a hash queue, and one of a plurality of free lists described later. Pointers 84 and 85 pointing to the subsequent cache entry and the subsequent cache entry,
It consists of a pointer 87 to the hash queue and the like. The hash queue is used for fast retrieval of cache entries. This hash queue is created in step 43 above.
Used to check for cache hits, as described in. One cache entry is used for one logical block. Therefore, the maximum size of the logical block data area 82 is the same as the logical block size. As described above, when a plurality of logical blocks are read collectively, as many cache entries as the number of logical blocks are required.

【0033】OSは、ある論理ブロックデータの入出力
を行う際、その論理ブロックのデータを格納するため
に、キャッシュエントリを割り当て、そのブロックデー
タ領域に論理ブロックのデータを保持するのである。上
記複数のキャッシュエントリは複数の自由リストを用い
て管理される。本実施の形態で使用する自由リストとそ
れらを用いたキャッシュエントリの管理方法は、参考文
献1の第208頁から第213頁に記載されているもの
と基本的に同じである。
When inputting and outputting certain logical block data, the OS allocates a cache entry to store the data of the logical block and holds the logical block data in the block data area. The plurality of cache entries are managed using a plurality of free lists. The free lists used in the present embodiment and the cache entry management method using them are basically the same as those described on page 208 to page 213 of the reference document 1.

【0034】本実施の形態に関係する自由リストは、最
長不使用(LRU)リスト、AGEリスト、EMPTY
リストである。図6に示すように、LRU自由リスト3
10は、LRU自由リストヘッダ31と複数のキャッシ
ュエントリから成る。各キャッシュエントリは、すでに
述べたごとくキャッシュエントリヘッダ81とブロック
データ領域82とからなり、キャッシュエントリヘッダ
81がLRU自由リストヘッダ32に接続され、キャッ
シュエントリヘッダ81にブロックデータ領域82が接
続されている。LRU自由リスト310には、いずれか
のユーザプロセスにより要求され、ユーザプロセスにす
でに転送され、そのユーザプロセスにより再使用される
見込みがある論理ブロックデータが登録される。LRU
自由リスト310は、名前が示す通り、複数のキャッシ
ュエントリをLRUアルゴリズムにより管理する。LR
U自由リスト310にいずれかのキャッシュエントリが
登録されるときに、LRU自由リスト310の最後にそ
のキャッシュエントリが接続される。別の論理ブロック
データを保持するために新たなキャッシュエントリが必
要なり、LRU自由リスト310に接続されたいずれか
のキャッシュエントリが取り出されるときには、LRU
自由リスト310の先頭にあるキャッシュエントリが取
り出される。これによってLRU自由リスト310はL
RUアルゴリズムを実現する。
Free lists related to the present embodiment include the longest unused (LRU) list, AGE list, and EMPTY.
It is a list. As shown in FIG. 6, LRU free list 3
10 comprises an LRU free list header 31 and a plurality of cache entries. Each cache entry is composed of the cache entry header 81 and the block data area 82 as described above. The cache entry header 81 is connected to the LRU free list header 32, and the cache entry header 81 is connected to the block data area 82. . The LRU free list 310 contains logical block data requested by any user process, already transferred to the user process, and likely to be reused by that user process. LRU
The free list 310, as the name implies, manages multiple cache entries with the LRU algorithm. LR
When any cache entry is registered in the U free list 310, that cache entry is connected to the end of the LRU free list 310. When a new cache entry is needed to hold another logical block of data and any cache entry attached to the LRU free list 310 is retrieved, the LRU
The cache entry at the head of the free list 310 is fetched. As a result, the LRU free list 310 is L
Implement the RU algorithm.

【0035】AGE自由リスト320は、AGE自由リ
ストヘッダ32と複数のキャッシュエントリから成る。
AGE自由リスト320には、近く使用されると予期さ
れる論理ブロックデータまたはユーザプロセスにより要
求され、そのユーザプロセスにすでに転送され、そのユ
ーザプロセスにより再使用される見込みがない論理ブロ
ックデータが登録される。近く使用されると予期される
論理ブロックのデータは、代表的には先読みされたデー
タである。ユーザプロセスにより使用済みで再使用の見
込みがないデータを保持するキャッシュエントリは、A
GE自由リスト320の先頭に接続され、先読みされた
データを保持するキャッシュエントリはそのリストの最
後尾に接続される。あるデータが再使用される見込みが
あるか否かの判断は、それ自体公知の方法により行うこ
とができる。例えば、参照文献1の第212頁参照。ま
た、例えば逐次アクセスされるファイルにおいて、一つ
の論理ブロックに含まれるデータの終端へのユーザプロ
セスからのアクセスが終わったときに、その論理ブロッ
クデータは再使用される見込みがないと判断してもよ
い。その論理ブロックに含まれるデータの終端より前の
データしかまだアクセスされていないときには、その論
理ブロックデータは再使用される可能性があると判断し
てもよい。
The AGE free list 320 comprises an AGE free list header 32 and a plurality of cache entries.
The AGE free list 320 contains logical block data that is expected to be used in the near future or logical block data that has been requested by a user process, has already been transferred to that user process, and is unlikely to be reused by that user process. It The data in logical blocks expected to be used in the near future is typically prefetched data. A cache entry that holds data that has been used by the user process and is unlikely to be reused is A
The cache entry connected to the head of the GE free list 320 and holding the prefetched data is connected to the tail of the list. The judgment as to whether or not a certain data is likely to be reused can be made by a method known per se. See page 212 of ref. 1, for example. Further, for example, even if it is determined that the logical block data is not likely to be reused when the end of the data included in one logical block in the file that is sequentially accessed is terminated by the user process. Good. When only the data before the end of the data included in the logical block has been accessed, it may be determined that the logical block data may be reused.

【0036】最後のEMPTY自由リスト330は、E
MPTY自由リストヘッダ33と複数のキャッシュエン
トリから成る。EMPTY自由リスト330は、空きの
キャッシュエントリのリストである。空きのキャッシュ
エントリは、ブロックデータ領域用の仮想アドレス空間
に、十分な物理メモリが割り当てられていないエントリ
である。例えば参照文献1の第211頁参照。このた
め、図6では、便宜上、ブロックデータ領域は示されて
いない。
The final EMPTY free list 330 is E
It is composed of the MPTY free list header 33 and a plurality of cache entries. The EMPTY free list 330 is a list of empty cache entries. The empty cache entry is an entry in which sufficient physical memory is not allocated in the virtual address space for the block data area. See page 211 of ref. 1, for example. Therefore, in FIG. 6, the block data area is not shown for convenience.

【0037】これらの自由リストに登録されたキャッシ
ュエントリは次のように管理される。以下では、ある論
理ブロックを含むキャッシュエントリをLRU自由リス
ト310またはAGE自由リスト320に登録する場
合、単にその論理ブロックを登録すると言い、そのキャ
ッシュエントリをその自由リストから削除する場合、単
にその論理ブロックを削除すると言うことがある。いず
れかのユーザプロセスがデータ読み出し要求を発行した
場合、その要求が指定するユーザ要求対象のデータを保
持する論理ブロックのデータが先読みされているか否か
がまずチェックされる。このチェック結果に依存して、
その後のキャッシュ管理が異なる。
The cache entries registered in these free lists are managed as follows. Hereinafter, when registering a cache entry including a logical block in the LRU free list 310 or the AGE free list 320, it is simply referred to as registering the logical block, and when deleting the cache entry from the free list, the logical block is simply registered. May be said to be deleted. When any of the user processes issues a data read request, it is first checked whether or not the data of the logical block holding the user request target data designated by the request has been read in advance. Depending on the result of this check,
The cache management after that is different.

【0038】(a)読み出し要求が指定するデータがま
だ先読みされていない場合 (a1)EMPTY自由リスト330上にキャッシュエ
ントリがあった場合 その読み出し要求が指定する論理ブロックのデータを保
持するのに十分な空き領域がキャッシュ領域10内にあ
るか否かがチェックされる。もし、十分な空き領域があ
る場合には、その空き領域から、その論理ブロックデー
タを保持するに必要な大きさの領域が確保され、EMP
TY自由リスト330に登録されたキャッシュエントリ
ヘッダ81がその読み出し要求のために取り出され、そ
の確保された領域をポイントする。その要求対象データ
が磁気ディスク記憶装置2から読み出されたときに、そ
の領域にその要求対象データが書き込まれる。その要求
対象データが、要求元のユーザプロセス3用のユーザバ
ッファ8に転送される。このように、キャッシュ領域1
0内のデータがユーザプロセス3に転送されることを、
そのデータがユーザプロセス3に使用されると呼ぶ。そ
のデータの転送が完了したときそのデータは使用済みに
なったと呼ぶ。
(A) When the data specified by the read request has not been pre-read yet (a1) When there is a cache entry on the EMPTY free list 330 Sufficient to hold the data of the logical block specified by the read request It is checked whether there is any free area in the cache area 10. If there is a sufficient free area, an area of a size necessary to hold the logical block data is secured from the free area, and the EMP
The cache entry header 81 registered in the TY free list 330 is fetched for the read request and points to the reserved area. When the request target data is read from the magnetic disk storage device 2, the request target data is written in the area. The requested data is transferred to the user buffer 8 for the requesting user process 3. Thus, cache area 1
That the data in 0 is transferred to the user process 3,
The data is called used by the user process 3. When the transfer of the data is completed, the data is said to be used.

【0039】さて、この転送後に、その論理ブロックデ
ータに対する読み出し要求がそのユーザプロセスにより
再度発行される可能性があるか否かが所定の公知の方法
で判断される。このように、使用済みのデータに対して
読み出し要求が後に同じユーザプロセスから発行される
可能性をそのデータが再使用される可能性と呼ぶ。も
し、そのデータが再使用される可能性があると判断され
たときには、上記取り出されたキャッシュエントリヘッ
ダとその論理ブロックデータとからなるキャッシュエン
トリが、LRU自由リスト310の最後尾に接続され
る。もし、その論理ブロックのデータが再使用される見
込みがないと判断されたときには、そのキャッシュエン
トリは、AGE自由リスト320の先頭に接続される。
After this transfer, it is determined by a predetermined known method whether or not a read request for the logical block data may be issued again by the user process. Thus, the possibility that a read request for the used data will be issued later from the same user process is called the possibility that the data will be reused. If it is determined that the data may be reused, the cache entry including the fetched cache entry header and the logical block data is connected to the end of the LRU free list 310. If it is determined that the data of the logical block is unlikely to be reused, the cache entry is connected to the head of the AGE free list 320.

【0040】(a2)EMPTY自由リスト330上に
キャッシュエントリがなかった場合 AGE自由リスト320に登録されたキャッシュエント
リが、このリストの先頭から順次探索される。もし、こ
のリストにいずれかのキャッシュエントリが登録されて
いるときには、そのキャッシュエントリをこのリストか
ら削除する。この要求対象データが磁気ディスク記憶装
置2から読み出されたときに、このデータがその削除さ
れたキャッシュエントリのブロックデータ領域に書き込
まれる。その後、このデータおよびこのキャッシュエン
トリは、上記(1a)の場合と同様に処理される。も
し、AGE自由リスト320にいずれのキャッシュエン
トリも登録されていない場合、LRU自由リスト310
の先頭にあるキャッシュエントリがそのリストから削除
され、使用される。その後は、すでに述べた場合と同じ
である。
(A2) When there is no cache entry in the EMPTY free list 330 The cache entries registered in the AGE free list 320 are searched sequentially from the head of this list. If any cache entry is registered in this list, that cache entry is deleted from this list. When this requested data is read from the magnetic disk storage device 2, this data is written in the block data area of the deleted cache entry. Thereafter, this data and this cache entry are processed in the same manner as in the above case (1a). If no cache entry is registered in the AGE free list 320, the LRU free list 310
The cache entry at the beginning of is removed from the list and is used. After that, it is the same as the case already described.

【0041】(b)要求されたデータがすでに先読みさ
れ、キャッシュヒットした場合 AGE自由リスト320に登録されたヒットしたキャッ
シュエントリが、このリストから削除される。そのキャ
ッシュエントリの論理ブロックのデータが、要求元のユ
ーザプロセスに転送される。磁気ディスク記憶装置2か
らのデータ読み出しは行われない。その後の処理はすで
に述べた場合と同じである。
(B) When the requested data is already prefetched and a cache hit occurs. The hit cache entry registered in the AGE free list 320 is deleted from this list. The data of the logical block of the cache entry is transferred to the requesting user process. No data is read from the magnetic disk storage device 2. The subsequent processing is the same as that already described.

【0042】上記キャッシュ管理方法において、総キャ
ッシュエントリ数に比べて、読み出しを行うユーザプロ
セスの数が比較的少ない場合や一回の先読みで読み出さ
れるブロックの数が比較的少ない場合は、以下のように
正常に動作する。すなわち、通常は、AGE自由リスト
320の先頭部分に再使用見込みのないデータブロック
を含む複数のキャッシュエントリが存在する。いろいろ
のユーザプロセスからのデータ読み出し要求が発生した
場合、それらのデータ読み出し要求に対してはEMPT
Y自由リスト330内のキャッシュエントリあるいはA
GE自由リスト320の先頭部分にある上記再使用見込
みのないデータブロックを含む複数のキャッシュエント
リが使用される。したがって、それらのキャッシュエン
トリがなくなる前に、AGE自由リスト320の最後尾
に接続された先読みされた論理ブロックのデータを要求
する読み出し要求がユーザプロセスから発行されると、
それらの先読みされたデータは有効に使用されることに
なる。
In the above cache management method, when the number of user processes for reading is relatively small compared to the total number of cache entries, or when the number of blocks read in one prefetch is relatively small, the following is performed. Works fine. That is, normally, there are a plurality of cache entries including data blocks that are not likely to be reused at the head of the AGE free list 320. When data read requests from various user processes occur, EMPT is issued for those data read requests.
A cache entry in the Y free list 330 or A
A plurality of cache entries including the data blocks that are not likely to be reused at the head of the GE free list 320 are used. Therefore, when the user process issues a read request for the data of the prefetched logical block connected to the end of the AGE free list 320 before the cache entries are exhausted,
The prefetched data will be effectively used.

【0043】しかし、総キャッシュエントリ数に比べ
て、読み出しを行うプロセス数が比較的多い場合や、一
回の先読みで読み出されるブロックの数が比較的多い場
合は、次の問題が生じる。すなわち、AGE自由リスト
320の最後尾に接続された先読みされた論理ブロック
のデータを要求する読み出し要求がユーザプロセスから
発行される前に、いろいろのユーザプロセスが発行した
データ読み出し要求に対してはEMPTY自由リスト3
30内のキャッシュエントリあるいはAGE自由リスト
320の先頭部分にある上記再使用見込みのないデータ
ブロックを含む複数のキャッシュエントリが使用し尽さ
れてしまうことが生じる。このため、新たに発生した読
み出し要求のための、先読みデータを保持するキャッシ
ュエントリもAGE自由リスト320から削除され、そ
の新たな読み出し要求あるいは他の先読みのために磁気
ディスク記憶装置2から読み出されたデータを保持する
ために使用される。こうして、先読みデータを保持する
ブロックデータ領域が、要求対象ブロックあるいは他の
先読み対象ブロックにより置換される。この結果、先読
み自体が無駄になる。
However, if the number of processes for reading is relatively large compared to the total number of cache entries, or if the number of blocks read in one pre-read is relatively large, the following problem occurs. That is, before a read request requesting the data of the prefetched logical block connected to the end of the AGE free list 320 is issued by the user process, the EMPTY for the data read requests issued by various user processes. Free list 3
The cache entries in 30 or the plurality of cache entries including the above-not-reusable data block in the head portion of the AGE free list 320 may be used up. Therefore, the cache entry holding the prefetch data for the newly generated read request is also deleted from the AGE free list 320, and read from the magnetic disk storage device 2 for the new read request or another prefetch. Used to hold the data stored. In this way, the block data area holding the prefetch data is replaced by the request target block or another prefetch target block. As a result, prefetching itself becomes useless.

【0044】(5)先読み読み停止判定処理47 先読み停止判定処理47は、このような置換が発生して
いいるか否かを検出して、この置換が発生している場合
には、読み出し処理6中の逐次アクセス判定処理45
(図3)において逐次アクセスと判断された読み出し要
求に対しても、先読みを実行しないように先読みの実行
を制御する。図4において、すでに先読みが停止されて
いるか否かを後に説明する停止フラグ24がアクセス対
象のファイルに対するiノード9(図2)にセットされ
ているかに基づいて判定する(ステップ61)。このフ
ラグ24がセットされていれば、先読みはすでに停止さ
れているのでこの先読み停止判定処理47は終了し、ス
テップ52(図3)が実行される。先読み停止フラグ2
4がまだセットされていなければ、今回の読み出し要求
が先読み停止条件を満たすかどうかが以下のように判定
される。まず、ユーザプロセス3の要求対象ブロックの
データがすでに先読みされているかどうかが判定される
(ステップ62)。逐次アクセスと判断された読み出し
要求の要求対象ブロックのデータがまだ先読みされてい
ないのは、この逐次アクセスが、同じファイルに対する
一連の逐次アクセスの最初のアクセスである場合であ
る。この判定は、対応するiノード9に記憶された最終
先読み位置23が、現在の読み出し要求が指定するアド
レス以上であるか否かにより判断される。
(5) Read-ahead read stop determination processing 47 The read-ahead stop determination processing 47 detects whether or not such replacement has occurred, and if this replacement has occurred, the read processing 6 is executed. Access determination processing 45 of
Even if the read request is determined to be the sequential access in (FIG. 3), the execution of the prefetch is controlled so that the prefetch is not performed. In FIG. 4, determination is made based on whether the stop flag 24, which will be described later, has already been set in the inode 9 (FIG. 2) for the file to be accessed (step 61). If this flag 24 is set, the prefetching has already been stopped, so this prefetching stop determination processing 47 ends and step 52 (FIG. 3) is executed. Prefetch stop flag 2
If 4 is not set yet, it is determined whether the read request this time satisfies the prefetch stop condition as follows. First, it is determined whether or not the data of the request target block of the user process 3 has already been prefetched (step 62). The data of the requested block of the read request that is determined to be the sequential access is not prefetched yet when this sequential access is the first access of a series of sequential access to the same file. This determination is made based on whether or not the final prefetch position 23 stored in the corresponding i-node 9 is equal to or greater than the address designated by the current read request.

【0045】要求対象ブロックのデータがまだ先読みさ
れていないときには、この停止判定処理47が終了し、
先読みを行うためにステップ48(図3)が実行され
る。要求対象のデータがすでに先読みされているときに
は、その先読みされたデータが他の読み出し要求対象の
データにより置換されているか否かが判定される(ステ
ップ63)。この置換の発生は、この読み出し要求対象
のデータがキャッシュ領域10内に存在するか、すなわ
ち、その読み出し要求対象に対してキャッシュ領域10
がヒットするか否かにより判定される。このヒットチェ
ックは、それ自体公知の方法で行われる。
When the data of the requested block has not been prefetched yet, this stop determination processing 47 ends,
Step 48 (FIG. 3) is performed to perform the lookahead. When the request target data has already been prefetched, it is determined whether the prefetched data has been replaced by another read request target data (step 63). This replacement occurs when the data of the read request target exists in the cache area 10, that is, when the read request target data is in the cache area 10.
Is determined by whether or not hit. This hit check is performed by a method known per se.

【0046】もし、置換が発生していないときには、こ
の停止判定処理47を終了し、ステップ48(図3)に
より先読みが実行される。もし、この置換が発生してい
るときには、要求対象ブロックデータあるいは先読み対
象ブロックデータを保持するためのキャッシュエントリ
が不足していると判断され、先読みが停止される。すな
わち、iノード9内の先読み停止フラグ24(図3)が
セットされ、この停止判定処理47が終了し、先読みを
実行しないときの処理52(図3)が実行される。この
フラグ24がセットされたときには、現在アクセス中の
ファイルに対するその後の先読みはステップ61により
禁止される。このようにして、先読みされたデータに対
する上書きが発生し、先読みが無駄になった場合に、そ
の先読みされたデータを含むファイルに対する先読みを
停止することができる。
If the replacement has not occurred, the stop determination processing 47 is terminated, and prefetching is executed in step 48 (FIG. 3). If this replacement occurs, it is determined that the cache entry for holding the request target block data or the prefetch target block data is insufficient, and the prefetch is stopped. That is, the prefetch stop flag 24 (FIG. 3) in the inode 9 is set, the stop determination process 47 ends, and the process 52 (FIG. 3) when prefetch is not executed is executed. When this flag 24 is set, subsequent prefetching of the file currently being accessed is prohibited by step 61. In this way, when the pre-read data is overwritten and the pre-read becomes useless, the pre-read for the file including the pre-read data can be stopped.

【0047】すでに述べた仮定と同様に、キャッシュの
エントリ数を1000、ユーザプロセスが読み出しの際
に使用するデータ量は8ブロックであり、ユーザプロセ
スの数が60で、それぞれのユーザプロセスは同時に互
いに異なるファイルに対する読み出し要求を発生し、先
読みするデータ量を16ブロックであると仮定する。こ
のとき、各ユーザプロセスが発行する読み出し要求の要
求対象データを保持するのに使うキャッシュエントリの
量が480(8ブロック×60ファイル)となり、残り
の520エントリに対して、先読みされたデータの置換
が発生しない適切な数のユーザプロセスのみが先読みを
許されることになる。ここでの適切な数は、520エン
トリ÷16ブロック=16となり、この数のユーザプロ
セスに対して先読みが行われ、残りの28個のユーザプ
ロセスに対しては先読みが行われないことになる。この
ようにして1000のキャッシュエントリを効率的に使
用することができるようになる。
Similar to the above-mentioned assumption, the number of entries in the cache is 1000, the amount of data used by the user process for reading is 8 blocks, the number of user processes is 60, and each user process simultaneously It is assumed that read requests for different files are generated and the amount of data to be read ahead is 16 blocks. At this time, the amount of cache entries used to hold the request target data of the read request issued by each user process becomes 480 (8 blocks × 60 files), and the remaining 520 entries are replaced with the prefetched data. Only a reasonable number of user processes that do not occur will be allowed to read ahead. The appropriate number here is 520 entries / 16 blocks = 16, and prefetching is performed for this number of user processes, and prefetching is not performed for the remaining 28 user processes. In this way, 1000 cache entries can be efficiently used.

【0048】本実施の形態では、このように他のデータ
による先読みされたデータの置換が一部のユーザプロセ
スに対して一度は発生するが、従来技術のキャッシュ管
理アルゴリズムの変更なしに、先読みデータのその後の
置換を防止できる。なお、先読みされたデータが将来使
用されるとは必ずしも限らない。したがって、AGE自
由リスト320が将来使われる見込みのない先読みされ
たデータで満たされることも起こりうる。この場合、本
実施の形態では、AGE自由リスト320に登録された
多数の先読みされたデータが順に新たな要求対象データ
あるいは先読み対象データにより置換されるため、この
ような無用な先読みデータの削除を自動的に行えること
になる。
In the present embodiment, the replacement of the prefetched data with other data occurs once for some user processes in this manner, but the prefetched data can be replaced without changing the cache management algorithm of the prior art. Subsequent replacement of can be prevented. Note that the prefetched data is not always used in the future. Therefore, it is possible that the AGE free list 320 is filled with prefetched data that is unlikely to be used in the future. In this case, in the present embodiment, a large number of prefetched data registered in the AGE free list 320 is sequentially replaced by new request target data or prefetch target data, and thus such unnecessary prefetch data is deleted. It can be done automatically.

【0049】<発明の実施の形態1の変形例> (1)発明の実施の形態1では、iノード中にそのファ
イルの最終アクセス位置22や最終先読み位置23や先
読み停止フラグ24を保持していたため、複数のプロセ
スが一つのファイルの入出力を行っている場合でも、フ
ァイル毎に先読みの開始や停止の制御を行っていた。し
かし、これらの情報を、ファイル表182のエントリ1
83に保持することも可能である。この際、このエント
リ183を異なるユーザプロセスが共有するのを禁止す
る。この結果、複数のユーザプロセスが同一のファイル
入出力を行っている場合でも、ユーザプロセス毎に先読
み開始や停止を制御できる。なお、これらの情報をユー
ザプロセス毎に別々に保持することができるファイル表
182以外の場所に保持することも可能である。
<Modification of First Embodiment of the Invention> (1) In the first embodiment of the invention, the final access position 22, the final prefetch position 23, and the prefetch stop flag 24 of the file are held in the inode. Therefore, even when a plurality of processes are inputting / outputting one file, the pre-reading start / stop control is performed for each file. However, this information is converted to the entry 1 of the file table 182.
It is also possible to hold at 83. At this time, sharing of this entry 183 by different user processes is prohibited. As a result, even when a plurality of user processes perform the same file input / output, it is possible to control the start and stop of prefetch for each user process. It should be noted that these pieces of information can be held in a place other than the file table 182, which can be held separately for each user process.

【0050】(2)最終アクセス位置22と、最終先読
み位置23の代わりに他の情報を使用してもよい。例え
ば、先読み開始位置と先読み量でもよい。また、先読み
量が別の手段により特定できれば、先読み開始位置だけ
でもよい。
(2) Instead of the final access position 22 and the final look-ahead position 23, other information may be used. For example, the prefetch start position and the prefetch amount may be used. Further, if the prefetch amount can be specified by another means, only the prefetch start position may be used.

【0051】(3)図3の逐次アクセス判定処理45
を、ユーザプロセス毎に行うことも原理的には可能であ
る。ユーザプロセス毎に現在のアクセスが逐次アクセス
か否かを判定をする場合には、あるファイルに対するあ
るユーザプロセス固有の最終アクセス位置に対してその
ユーザプロセスの現在のアクセス位置が連続しているか
どうかで判定すればよい。
(3) Sequential access determination processing 45 of FIG.
It is also possible in principle to carry out for each user process. When determining whether or not the current access is sequential access for each user process, it is determined whether the current access position of the user process is continuous with respect to the final access position specific to a user process for a certain file. Just make a decision.

【0052】(4)この逐次アクセス判定処理45は、
最終アクセス位置以外の情報を使用することも可能であ
る。例えば、参考文献2の第35頁および第39頁に記
載されているように、まず、現在アクセス中のファイル
ブロック番号+現在のクラスタ(ブロックのまとまり)
のサイズがiノード中に記憶される。次のアクセスのと
き、アクセス中のファイルブロック番号とこの記憶され
たファイルブロック番号が比較される。それらが一致し
ていれば、OSは当該次のアクセスが逐次アクセスと判
断する。
(4) This sequential access determination processing 45
It is also possible to use information other than the last access position. For example, as described on page 35 and page 39 of Reference 2, first, the file block number currently being accessed + the current cluster (group of blocks)
Is stored in the inode. At the next access, the file block number being accessed is compared with the stored file block number. If they match, the OS determines that the next access is a sequential access.

【0053】(5)図3の先読み論理ブロック数決定処
理46は、先読み論理ブロック数を動的に変化しても差
し支えない。例えば、この処理46は、読み出し処理6
を実行する毎に次の制御を行ってもよい。すなわち、一
般に、磁気ディスク記憶装置2などで一回に入出力する
量を大きくした方が効率的な転送が可能になるため、逐
次アクセスが連続した場合は、逐次アクセスが次回以降
も続く可能性が高い。従って、一括して先読みするブロ
ック数を増やすように先読みブロック数を制御してもよ
い。また、このように上記連続した複数の逐次アクセス
に対して一括して先読みするブロック数を増やした後、
逐次でない要求が発生した場合には、以降で再び逐次ア
クセスが発生するときのために、一旦増やした一括して
先読みするブロック数を減らすように先読みブロック数
を制御することもできる。
(5) The read-ahead logical block number determination process 46 in FIG. 3 may dynamically change the read-ahead logical block number. For example, this process 46 is the read process 6
The following control may be performed each time. That is, in general, the larger the amount of input / output at one time in the magnetic disk storage device 2 or the like, the more efficient the transfer becomes. Therefore, if the sequential access is continuous, the sequential access may continue from the next time onward. Is high. Therefore, the number of prefetch blocks may be controlled so as to increase the number of blocks to be prefetched collectively. In addition, after increasing the number of blocks to be prefetched collectively for a plurality of consecutive accesses as described above,
When a non-sequential request is generated, the number of pre-read blocks can be controlled so as to reduce the number of blocks to be pre-read collectively, which has been increased once, in case a subsequent sequential access occurs again.

【0054】<発明の実施の形態2>発明の実施の形態
1は、先読みされたデータが他のデータにより置換され
たことを検知し、その後の先読みを停止するのに対し、
本実施の形態は、先読みされたデータを保持するのに使
用できるキャッシュエントリがあるかどうかを検査し、
そのようなキャッシュエントリがないときには、先読み
を停止する。本実施の形態では他のデータによる先読み
データの置換が発生しない。
<Second Embodiment of the Invention> In the first embodiment of the present invention, it is detected that the prefetched data has been replaced by another data, and the prefetching thereafter is stopped.
This embodiment checks if there is a cache entry that can be used to hold the prefetched data,
If there is no such cache entry, read ahead is stopped. In the present embodiment, replacement of prefetch data with other data does not occur.

【0055】本実施の形態でのキャッシュ管理は、以下
の点で実施の形態1と異なる。発明の実施の形態1で
は、AGE自由リスト320に先読みされた論理ブロッ
クデータを保持するキャッシュエントリと使用見込みの
ない論理ブロックデータを保持するキャッシュエントリ
の両方を接続していたのに対して、本実施の形態では、
このAGE自由リスト320に代えて、図7に示すよう
に、先読みされた論理ブロックデータを登録するための
先読み自由リスト910と、使用見込みのない論理ブロ
ックデータを登録するための使用見込みなし自由リスト
920を用いる。91、92はそれぞれのリストのヘッ
ダである。先読み自由リスト910に連結されたキャッ
シュエントリが保持する論理ブロックデータがユーザ読
み出し要求の対象となると、そのキャッシュエントリは
先読み自由リスト910からはずされ、そのデータがユ
ーザプロセスに転送される。その後、そのデータが再使
用される可能性があるか否かに依存して、そのキャッシ
ュエントリは、LRU自由リスト310あるいは使用見
込みなし自由リストに接続される。使用見込みなし自由
リスト92は、読み出し処理6でユーザプロセスへ転送
され、再使用の見込みがないと判断されたデータを保持
するキャッシュエントリを連結する。
The cache management in this embodiment differs from that in the first embodiment in the following points. In the first embodiment of the invention, both the cache entry holding the prefetched logical block data and the cache entry holding the logical block data which is not expected to be used are connected to the AGE free list 320. In the embodiment,
Instead of the AGE free list 320, as shown in FIG. 7, a prefetch free list 910 for registering prefetched logical block data and a no-use-free free list for registering logic block data that is not expected to be used. 920 is used. Reference numerals 91 and 92 are headers of the respective lists. When the logical block data held by the cache entry linked to the prefetch free list 910 is the target of the user read request, the cache entry is removed from the prefetch free list 910 and the data is transferred to the user process. Thereafter, depending on whether the data may be reused, the cache entry is connected to the LRU free list 310 or the no-use free list. The no-usage-free list 92 is transferred to the user process in the read process 6 and concatenates the cache entries holding the data determined not to be reused.

【0056】ユーザプロセス3からの読み出し要求が指
定した要求対象データを含む論理ブロックデータを保持
するために用いるキャッシュエントリは、EMPTY自
由リスト330から探索され、それが空であったときに
は使用見込みなし自由リスト920から探索される。こ
れらのいずれもが空であるときに限ってLRU自由リス
ト310の先頭のキャッシュエントリが用いられる。こ
の要求対象論理ブロックのためには、先読み自由リスト
910は探索されない。このときのキャッシュエントリ
の探索は、発明の実施の形態1におけるAGE自由リス
ト320の代わりに、使用済み自由リスト920のみを
用いたのと同様な管理になる。一方、先読みされた論理
ブロックデータを保持するのに用いるキャッシュエント
リは、同様にまずEMPTY自由リスト330から探索
され、続いて使用見込みなし自由リスト920から探索
される。しかし、これらの自由リスト330、920が
いずれも空であるときは、LRU自由リスト310は探
索されない。先読みする論理ブロックデータを保持する
ためのキャッシュエントリは割り当てられず、先読みは
行われない。この先読みデータに対するキャッシュエン
トリの探索は実施の形態1では、ステップ48において
実行されたが、本実施の形態では先読み停止判定処理4
7により以下のように行われる。
The cache entry used to hold the logical block data including the requested data specified by the read request from the user process 3 is searched from the EMPTY free list 330, and when it is empty, there is no possibility of use. The list 920 is searched. The first cache entry of the LRU free list 310 is used only when any of these is empty. The prefetch free list 910 is not searched for this requested logical block. The search for the cache entry at this time is performed by the same management as when only the used free list 920 is used instead of the AGE free list 320 in the first embodiment of the invention. On the other hand, the cache entry used to hold the prefetched logical block data is similarly searched first from the EMPTY free list 330, and then from the no-usage-free list 920. However, when both free lists 330, 920 are empty, LRU free list 310 is not searched. A cache entry for holding the logical block data to be prefetched is not allocated and prefetching is not performed. In the first embodiment, the search for the cache entry for the prefetch data is executed in step 48, but in the present embodiment, the prefetch stop determination process 4 is performed.
7 is performed as follows.

【0057】本実施の形態では、先読み停止判定処理4
7は図8に従って実行される。EMPTY自由リスト3
30が空かどうかが検査される(ステップ101)。こ
のEMPTY自由リスト330が空でなければ、先読み
が実行される(ステップ46(図3))。そのリスト3
30中のキャッシュエントリが取り出され、その先読み
データが磁気ディスク記憶装置2から読み出されたとき
に、その取り出されたキャッシュエントリにそのデータ
が格納される。その先読みされたデータがユーザプロセ
ス3に転送された後に、そのキャッシュエントリは使用
見込みなし自由リスト920に無条件に接続される。リ
スト330が空であれば、使用見込みなし自由リストが
空かどうかが検査される(ステップ102)。この自由
リスト920が空でなければ、先読みが実行され(ステ
ップ46(図3))、その自由リスト920中のキャッ
シュエントリが先読みされたデータを保持するのに使用
される。このリスト920が空ならば、先読み用に確保
できるキャッシュエントリはないと判断され、先読みは
実行されない。以上から明らかなように、本実施の形態
では、先読み停止判定処理47では、iノードに記憶さ
れた最終先読み位置23、先読みフラグ24は使用する
必要はない。ただし、最終先読み位置23は、ステップ
48(図3)で、次の先読みを開始する位置を決定する
ことに用いられる。
In the present embodiment, prefetch stop determination processing 4
7 is executed according to FIG. EMPTY Free List 3
It is checked whether 30 is empty (step 101). If this EMPTY free list 330 is not empty, prefetching is performed (step 46 (FIG. 3)). The list 3
When the cache entry in 30 is taken out and the prefetched data is read from the magnetic disk storage device 2, the data is stored in the taken out cache entry. After the prefetched data is transferred to the user process 3, the cache entry is unconditionally connected to the no-use-free list 920. If the list 330 is empty, then it is checked whether the free-for-use free list is empty (step 102). If the free list 920 is not empty, prefetching is performed (step 46 (FIG. 3)) and the cache entry in the free list 920 is used to hold the prefetched data. If this list 920 is empty, it is determined that there is no cache entry that can be reserved for prefetching, and prefetching is not executed. As is apparent from the above, in the present embodiment, in the prefetch stop determination processing 47, it is not necessary to use the final prefetch position 23 and the prefetch flag 24 stored in the inode. However, the final prefetch position 23 is used in step 48 (FIG. 3) to determine the position to start the next prefetch.

【0058】なお、先読み自由リスト910に登録され
た先読みデータはユーザプロセスにより将来必ず使われ
るという保証がない。そのため、本実施の形態では、キ
ャッシュ領域のほとんどが、将来使われる見込みのない
先読みされた論理ブロックデータによって満たされる状
況が生じることが考えられる。このため、本実施の形態
では、先読み後一定時間以上経過した時点で先読み自由
リスト910に登録されたままになっている先読みされ
たデータを保持するキャッシュエントリを解放するなど
の制御を別に行う。
There is no guarantee that the prefetch data registered in the prefetch free list 910 will always be used by the user process in the future. Therefore, in the present embodiment, it is conceivable that most of the cache area will be filled with pre-read logical block data that is unlikely to be used in the future. Therefore, in the present embodiment, control such as releasing the cache entry holding the prefetched data that is still registered in the prefetch free list 910 at the time when a predetermined time or more has elapsed after prefetching is separately performed.

【0059】このようにして、EMPTY自由リスト3
30あるいは使用見込みなし自由リスト920にキャッ
シュエントリがある場合のみ先読みが実施され、先読み
されるデータの総量が制限される。一方、ユーザプロセ
スが発行した読み出し要求が指定する要求対象のデータ
を保持するためのキャッシュエントリが、EMPTY自
由リスト330あるいは使用見込みなし自由リスト92
0から探索できないときでも、そのキャッシュエントリ
は先読み自由リスト910からは探索されない。したが
って、実施の形態1と異なり、先読みされたデータが後
に要求対象データにより置換されることは生じない。
In this way, the EMPTY free list 3
30 or prefetching is performed only when there is a cache entry in the free list 920 without possibility of use, and the total amount of prefetched data is limited. On the other hand, the cache entry for holding the requested data designated by the read request issued by the user process is the EMPTY free list 330 or the no-use-free list 92.
Even if it cannot be searched from 0, the cache entry is not searched from the prefetch free list 910. Therefore, unlike the first embodiment, the prefetched data will not be replaced later by the request target data.

【0060】すでに述べた仮定と同様に、キャッシュの
エントリ数を1000、ユーザプロセスが読み出しの際
に使用するデータ量は8ブロックであり、ユーザプロセ
スの数が60で、それぞれのユーザプロセスは同時に互
いに異なるファイルに対する読み出し要求を発生し、先
読みするデータ量を16ブロックであると仮定する。こ
のとき、本実施の形態では、各プロセスの読み出しによ
り、1000エントリ÷(8ブロック+16ブロック)
=41個のユーザプロセスまでは従来と同様に先読みが
可能である。しかし、それら以外のユーザプロセスに対
しては、使用見込みがなくなったキャッシュエントリが
使用見込みなし自由リスト920に登録されるのを待っ
て、先読みを行うことになる。このようにして、先読み
されたデータの置換が発生しないように、1000のキ
ャッシュエントリを効率的に使用することができるよう
になる。また、先読みされたデータ保持用に用いるキャ
ッシュエントリを選択するときに、EMPTY自由リス
ト330と使用見込みなし自由リスト920だけを調べ
ればよい。このため先読み停止判定処理が高速になる。
Similar to the above-mentioned assumption, the number of cache entries is 1000, the amount of data used by a user process for reading is 8 blocks, the number of user processes is 60, and each user process is mutually It is assumed that read requests for different files are generated and the amount of data to be read ahead is 16 blocks. At this time, in this embodiment, 1000 entries / (8 blocks + 16 blocks) are read by each process.
Up to 41 user processes can be prefetched as in the conventional case. However, for the user processes other than those, prefetching is performed after the cache entries that are no longer expected to be used are registered in the no-use expected free list 920. In this way, 1000 cache entries can be efficiently used so that replacement of prefetched data does not occur. Further, when selecting the cache entry used for holding the prefetched data, it is sufficient to check only the EMPTY free list 330 and the no-use-free list 920. Therefore, the prefetch stop determination processing becomes faster.

【0061】<発明の実施の形態3>本実施の形態も、
実施の形態2と同様に、先読みされたデータが後に要求
対象データにより置換されないことを確保する。実施の
形態2は、先読みされたデータ保持用に用いるキャッシ
ュエントリのみを登録する先読み自由リスト910を使
用し、ユーザプロセスからの読み出し要求が指定する要
求対象データを保持するキャッシュエントリは、このリ
スト910以外のリスト310、330、920から探
索することにより、この置換を防止していた。しかし、
本実施の形態は、各キャッシュエントリにそれが保持し
ているデータが先読みされたデータかどうかを示すフラ
グを持たせ、ユーザプロセスからの読み出し要求が指定
する要求対象データを保持するキャッシュエントリを探
索するときには、このフラグが先読みデータを保持して
いることを示していないキャッシュエントリを探索す
る。さらに、実施の形態2は、先読みされたデータ保持
用に用いるキャッシュエントリを、特定の自由リスト3
30、920上に存在するキャッシュエントリに制限
し、それによって、先読みされたデータの保持に用いる
キャッシュエントリの数を制限していた。これに対し
て、本実施の形態は、先読みされたデータを保持してい
るキャッシュエントリの実際の数を予め定めた上限値以
下にする。
<Third Embodiment of the Invention> This embodiment also includes
As in the second embodiment, it is ensured that the prefetched data is not replaced later by the request target data. The second embodiment uses the prefetch free list 910 that registers only the cache entry used for holding the prefetched data, and the cache entry that holds the request target data specified by the read request from the user process is the list 910. This replacement was prevented by searching from lists 310, 330, and 920 other than. But,
In the present embodiment, each cache entry is provided with a flag indicating whether or not the data it holds is prefetched data, and a cache entry holding the requested data specified by the read request from the user process is searched. When this is done, a search is made for a cache entry in which this flag does not indicate that prefetch data is held. Further, in the second embodiment, the cache entry used for holding the prefetched data is specified as the specific free list 3.
It has been limited to the cache entries existing on 30, 920, thereby limiting the number of cache entries used for holding the prefetched data. On the other hand, in the present embodiment, the actual number of cache entries holding prefetched data is set to be equal to or less than a predetermined upper limit value.

【0062】本実施の形態では、図9に示す先読みキャ
ッシュ管理表126をOS4が予め用意する。この表1
26は、先読みキャッシュエントリ数上限121と現在
の先読みキャッシュエントリ数122からなる。現在の
先読みキャッシュエントリ数122は、新たに先読みデ
ータに対する読み出し要求がステップ48(図3)にお
いて磁気ディスク記憶装置2に対して発行されるとき
に、そのデータを保持するために用意された複数のキャ
ッシュエントリの属性が調べられて、その複数のキャッ
シュエントリのうち、前回先読みデータ保持用に使用さ
れていなかったエントリ数分だけカウントアップされ
る。また、前回先読みデータ保持用に使用された複数の
キャッシュエントリが、今回他のデータ保持用に再使用
されるときに、その現在の先読みキャッシュエントリ数
122は、先読みデータ保持用に使用されなかったエン
トリ数分だけカウントダウンされる。
In this embodiment, the OS 4 prepares the prefetch cache management table 126 shown in FIG. 9 in advance. This table 1
26 includes an upper limit 121 of the number of prefetch cache entries and a current number 122 of prefetch cache entries. The current read-ahead cache entry number 122 is set to a plurality of values prepared to hold the read-ahead data when a new read request for the read-ahead data is issued to the magnetic disk storage device 2 in step 48 (FIG. 3). The attributes of the cache entry are checked, and the cache entries are counted up by the number of entries that have not been used for holding the prefetch data last time among the plurality of cache entries. Further, when the plurality of cache entries used for holding the prefetch data last time are reused for holding other data this time, the current number 122 of the prefetch cache entries is not used for holding the prefetch data. It is counted down by the number of entries.

【0063】さらに、本実施の形態では、図10に示す
ように、各キャッシュエントリヘッダ81に先読みフラ
グ88および使用予定フラグ89がさらに追加される。
この先読みフラグ88は、そのキャッシュエントリが先
読みされたデータを保持したときにセットされ、そのキ
ャッシュエントリが、ユーザプロセスが要求した要求対
象データを保持したときにリセットされる。使用予定フ
ラグ89は、そのキャッシュエントリが、先読みデータ
を保持したときにセットされる。後にそのデータに対す
る読み出し要求がユーザプロセス3から発行され、その
データがユーザバッファ8に転送され、さらにそのデー
タが使用済みと判定されたときに、その使用予定フラグ
89はリセットされる。
Further, in the present embodiment, as shown in FIG. 10, a prefetch flag 88 and a usage schedule flag 89 are further added to each cache entry header 81.
The prefetch flag 88 is set when the cache entry holds the prefetched data, and is reset when the cache entry holds the requested data requested by the user process. The usage schedule flag 89 is set when the cache entry holds prefetch data. After that, a read request for the data is issued from the user process 3, the data is transferred to the user buffer 8, and when it is determined that the data has been used, the usage schedule flag 89 is reset.

【0064】本実施の形態においては、実施の形態1と
同じく、LRU自由リスト310、AGE自由リスト3
20、EMPTY自由リスト330が使用され、LRU
自由リスト310、AGE自由リスト320にそれぞれ
に接続されるキャッシュエントリの種類も実施の形態1
と同じである。ユーザプロセス3が発行した読み出し要
求が指定する要求対象論理ブロックデータを格納するた
めのキャッシュエントリは、実施の形態1と同様に、ま
ずEMPTY自由リスト330に登録されたキャッシュ
エントリが探索され、そのキャッシュエントリがない場
合に、AGE自由リスト320が探索される。しかし,
このAGE自由リスト320からの探索では、使用見込
みのないデータを保持するキャッシュエントリもしくは
使用済みの先読みデータを保持するキャッシュエントリ
が探索される点で実施の形態1と異なる。
In this embodiment, the LRU free list 310 and the AGE free list 3 are the same as in the first embodiment.
20, EMPTY free list 330 used, LRU
The types of cache entries connected to the free list 310 and the AGE free list 320 are also the first embodiment.
Is the same as Similar to the first embodiment, the cache entry registered in the EMPTY free list 330 is searched for the cache entry for storing the requested logical block data specified by the read request issued by the user process 3, and the cache entry is searched. If there are no entries, the AGE free list 320 is searched. However,
This search from the AGE free list 320 differs from the first embodiment in that a cache entry holding data that is unlikely to be used or a cache entry holding used prefetch data is searched.

【0065】ここで、使用見込みのないデータ82A
は、先読みフラグ88がリセットされているキャッシュ
エントリ81Aに保持されるデータである。使用済みの
先読みデータ82Bは、先読みフラグ88がセットさ
れ、使用予定フラグ89がリセットされているキャッシ
ュエントリ81Bに保持されるデータである。したがっ
て、このAGE自由リスト320での探索では、先読み
フラグ88がセットされ、使用予定フラグ89がセット
されているキャッシュエントリ81Cに保持されるデー
タ82Cは探索対象に含まれない。これにより、先読み
され、まだユーザプロセスに使用されていないデータ
は、要求対象データにより置換されることはない。
Here, the data 82A which is not expected to be used
Is data held in the cache entry 81A in which the prefetch flag 88 is reset. The used readahead data 82B is data held in the cache entry 81B in which the readahead flag 88 is set and the usage schedule flag 89 is reset. Therefore, in the search on the AGE free list 320, the data 82C held in the cache entry 81C in which the prefetch flag 88 is set and the usage schedule flag 89 is set is not included in the search target. As a result, the prefetched data that has not been used in the user process is not replaced by the request target data.

【0066】一方、先読みされた論理ブロックデータを
保持するためのキャッシュエントリは、実施の形態1と
異なり、先読み停止判定処理47の中で以下のように実
行され、ステップ48(図3)では探索されない。図1
0において、まず、AGE自由リスト320中で、先読
みされ、かつ、使用済みのデータを保持するキャッシュ
エントリが探索される。すなわち、先読みフラグ88が
セットされ、使用予定フラグ89がリセットされている
キャッシュエントリが探索される(ステップ141)。
そのようなキャッシュエントリがあれば、そのキャッシ
ュエントリが先読み用に用いられ、先読みの実行のため
にステップ46(図3)が実行される。そのようなキャ
ッシュエントリがなければ、EMPTY自由リスト33
0が空かどうかが調べられる(ステップ142)。
On the other hand, unlike the first embodiment, the cache entry for holding the prefetched logical block data is executed as follows in the prefetch stop determination processing 47 and is searched in step 48 (FIG. 3). Not done. FIG.
At 0, first, the AGE free list 320 is searched for a cache entry that holds prefetched and used data. That is, the cache entry in which the prefetch flag 88 is set and the usage schedule flag 89 is reset is searched (step 141).
If there is such a cache entry, then that cache entry is used for prefetching and step 46 (FIG. 3) is performed to perform the prefetching. If there is no such cache entry, the EMPTY free list 33
It is checked if 0 is empty (step 142).

【0067】このリスト330が空であれば、AGE自
由リスト320中で、使用見込みのない論理ブロックデ
ータを保持するキャッシュエントリ、すなわち、先読み
フラグ88がリセットされているキャッシュエントリが
あるかどうかが判定される(ステップ144)。そのよ
うなキャッシュエントリがなければ、先読みが実行され
ず、ステップ52(図3)が実行される。
If this list 330 is empty, it is determined whether or not there is a cache entry in the AGE free list 320 that holds logical block data that is unlikely to be used, that is, a cache entry in which the prefetch flag 88 is reset. (Step 144). If there is no such cache entry, prefetch is not executed and step 52 (FIG. 3) is executed.

【0068】ステップ142において、EMPTYリス
ト330が空きでないと判断されたときおよびステップ
144で使用見込みのない論理ブロックデータを保持す
るキャッシュエントリがあると判断されたときには、現
在の先読みキャッシュエントリ数122が先読みキャッ
シュエントリ数上限121に達しているかどうかの判定
が行われる。現在の先読みキャッシュエントリ数121
が、先読みキャッシュエントリ数122に達していれ
ば、先読みは行われないでステップ53が実行される。
現在の先読みキャッシュエントリ数121が、先読みキ
ャッシュエントリ数122に達していなければ、ステッ
プ142で探索されたEMPTYリスト330の一つの
キャッシュエントリあるいはステップ144で探索され
たAGE自由リスト320の一つのキャッシュエントリ
が先読みデータ用に使用される。先読みを行うため、ス
テップ46が実行される。
When it is determined in step 142 that the EMPTY list 330 is not empty, and when it is determined in step 144 that there is a cache entry holding logical block data that is not expected to be used, the current read-ahead cache entry number 122 is set. It is determined whether or not the prefetch cache entry number upper limit 121 has been reached. Current number of read-ahead cache entries 121
However, if the number of prefetch cache entries 122 has been reached, prefetch is not performed and step 53 is executed.
If the current read-ahead cache entry number 121 does not reach the read-ahead cache entry number 122, one cache entry in the EMPTY list 330 searched in step 142 or one cache entry in the AGE free list 320 searched in step 144. Is used for look-ahead data. In order to perform prefetching, step 46 is executed.

【0069】なお、先読みキャッシュエントリ数上限
は、システム毎に適当に決めればよい。例えば、実施の
形態2で示した効果と同様の効果を獲得するためには、
先読みキャッシュエントリ数上限を520(1000エ
ントリ−8ブロック×60ファイル)とすればよい。こ
の場合、32ファイル(520エントリ÷16ブロッ
ク)分の先読みが可能になる。
The upper limit of the number of read-ahead cache entries may be determined appropriately for each system. For example, to obtain the same effect as the effect shown in the second embodiment,
The upper limit of the number of prefetch cache entries may be set to 520 (1000 entries-8 blocks x 60 files). In this case, prefetching of 32 files (520 entries / 16 blocks) becomes possible.

【0070】こうして、本実施の形態でも先読みされた
データがその後の要求対象データにより置換されること
が防止され、さらに、先読みデータを保持するキャッシ
ュエントリの総数がOSが設定した数以下に制限され
る。また、実施の形態2では先読みされたデータを登録
するための特定の自由リストを用意する必要があった
が、本実施の形態は、そのような特定の自由リストを必
要としない。
As described above, also in the present embodiment, the prefetched data is prevented from being replaced by the subsequent request target data, and the total number of cache entries holding the prefetched data is limited to the number set by the OS or less. It Further, in the second embodiment, it is necessary to prepare a specific free list for registering prefetched data, but the present embodiment does not need such a specific free list.

【0071】なお、本発明は、以上に述べた本発明の実
施の形態に限定されるのではなく、すでに記載した実施
の形態1の変形例およびその他の変形例によっても実現
可能である。また、以上の実施の形態では、逐次アクセ
スは、連続するアドレスの複数のブロックを順次アクセ
スする一連のアクセスであった。しかし、これらの連続
するアドレスのブロックを一定数ごとにアクセスする動
作も、逐次アクセスと考えることができる。さらに、よ
り一般的には、ある規則に従って順序づけられた複数の
論理ブロックを順次アクセスするアクセス動作も、逐次
アクセスと考えることができる。本発明はこれらの一般
的な逐次アクセスにも適用できる。さらに、以上の実施
の形態では、一つのプロセッサ内で実行される複数のユ
ーザプロセスから、そのプロセッサを制御するOSにフ
ァイル読み出し要求を送出したが、本発明は、例えば、
ネットワークで接続された複数のプロセッサからなる計
算機システムにも適用できる。すなわち、それらのプロ
セッサのいずれか一つ上で実行されているユーザプロセ
スが、それらのプロセッサのうちの他のプロセッサを制
御するOSに、当該他のプロセッサに接続された磁気デ
ィスク記憶装置内のファイルに対する読み出し要求を送
出する場合にも、全く同様に適用できる。
The present invention is not limited to the above-described embodiments of the present invention, and can be realized by the modifications of the first embodiment described above and other modifications. Further, in the above embodiments, the sequential access is a series of accesses for sequentially accessing a plurality of blocks having consecutive addresses. However, the operation of accessing these blocks of consecutive addresses in a fixed number can also be considered as sequential access. Furthermore, more generally, an access operation of sequentially accessing a plurality of logical blocks ordered according to a certain rule can be considered as a sequential access. The present invention can also be applied to these general sequential accesses. Further, in the above embodiment, a plurality of user processes executed in one processor send a file read request to the OS controlling the processor.
It can also be applied to a computer system consisting of multiple processors connected by a network. That is, a user process executed on any one of those processors causes an OS controlling another processor among those processors to cause a file in a magnetic disk storage device connected to the other processor. The same can be applied to the case of sending a read request to the.

【0072】[0072]

【発明の効果】本発明によれば、先読みされたデータが
他のデータにより置換されるという無駄を減らすかある
いはなくすことができる。
According to the present invention, it is possible to reduce or eliminate the waste of replacing prefetched data with other data.

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

【図1】本発明に係る先読み制御方法が実行される計算
機システムとその方法の概略手順を示す図である。
FIG. 1 is a diagram showing a computer system in which a prefetch control method according to the present invention is executed and a schematic procedure of the method.

【図2】図1の計算機システムを制御するOSが使用す
るいろいろの表を示す図である。
FIG. 2 is a diagram showing various tables used by an OS controlling the computer system of FIG.

【図3】図1の計算機システムで実行される読み出し処
理のフローチャートである。
3 is a flowchart of a read process executed by the computer system of FIG.

【図4】図3の読み出し処理で実行される先読み停止判
定処理のフロ−チャートである。
4 is a flowchart of a prefetch stop determination process executed in the read process of FIG.

【図5】図1の計算機システムで使用されるキャッシュ
エントリの概略構造を示す図である。
5 is a diagram showing a schematic structure of a cache entry used in the computer system of FIG. 1. FIG.

【図6】図1の計算機システムで使用される複数の自由
リストの構造の説明図である。
6 is an explanatory diagram of a structure of a plurality of free lists used in the computer system of FIG.

【図7】本発明に係る先読み制御方法の第2の実施の形
態で使用される複数の自由リストの構造の説明図であ
る。
FIG. 7 is an explanatory diagram of a structure of a plurality of free lists used in the second embodiment of the prefetch control method according to the present invention.

【図8】本発明に係る先読み制御方法の第2の実施の形
態で実行される先読み停止判定処理のフローチャートで
ある。
FIG. 8 is a flowchart of a pre-reading stop determination process executed in the second embodiment of the pre-reading control method according to the present invention.

【図9】本発明に係る先読み制御方法の第3の実施の形
態で実行される先読みキャッシュ管理表に保持される複
数の情報を示す図である。
FIG. 9 is a diagram showing a plurality of pieces of information held in a prefetch cache management table executed in the third embodiment of the prefetch control method according to the present invention.

【図10】本発明に係る先読み制御方法の上記第3の実
施の形態で使用されるキャッシュエントリの概略構造を
示す図である。
FIG. 10 is a diagram showing a schematic structure of a cache entry used in the third embodiment of the prefetch control method according to the present invention.

【図11】本発明に係る先読み制御方法の上記第2の実
施の形態で実行される先読み停止判定処理のフローチャ
ートである。
FIG. 11 is a flowchart of a prefetch stop determination process executed in the second embodiment of the prefetch control method according to the present invention.

Claims (20)

【特許請求の範囲】[Claims] 【請求項1】プロセッサと、主記憶と、複数のユーザプ
ロセスによりアクセス可能な複数のファイルを保持する
少なくとも一つの二次記憶装置を有し、上記主記憶は、
上記二次記憶装置と上記複数のユーザプロセスの間で転
送されるべきデータを一時的に保持するキャッシュ領域
を有し、上記複数のユーザプロセスのいずれか一つが発
行した読み出し要求が指定したデータを上記複数のファ
イルのいずれかの一つから読み出し、上記読み出された
データを上記キャッシュ領域を経由して上記一つのユー
ザプロセスに転送し、さらに、上記読み出し要求が、上
記一つのファイル内の順序づけられた複数のデータを逐
次アクセスする逐次アクセスのための読み出し要求であ
るときには、上記逐次アクセスにより後に読み出される
可能性がある後続のデータを上記一つのファイルから上
記キャッシュ領域に先読みする計算機システムにおい
て、 上記読み出し要求が逐次アクセスのための読み出し要求
であるときに、上記先読みを実行する前に、上記読み出
し要求が予め定められた先読み停止条件を満たすか否か
を判別し、 上記読み出し要求が上記条件を満たすとき、上記後続の
データの上記先読みを停止するステップを有し、 上記条件は、上記後続のデータが先読みされた場合に、
当該後続のデータが、上記2次記憶装置から上記キャッ
シュ領域に後に読み出されるであろういずれかの他のデ
ータにより置換されるのを回避するための条件である先
読み制御方法。
1. A processor, a main memory, and at least one secondary storage device holding a plurality of files accessible by a plurality of user processes, the main memory comprising:
It has a cache area for temporarily holding data to be transferred between the secondary storage device and the plurality of user processes, and stores data designated by a read request issued by any one of the plurality of user processes. Read from any one of the plurality of files, transfer the read data to the one user process via the cache area, and further, the read request is ordered in the one file. When the request is a read request for sequential access to sequentially access the plurality of data, a computer system that prefetches subsequent data that may be read later by the sequential access from the one file into the cache area, When the read request is a read request for sequential access, Before executing the prefetch, it is determined whether the read request satisfies a predetermined prefetch stop condition, and when the read request satisfies the above condition, the prefetch of the subsequent data is stopped. The above condition has the following conditions when the following data is prefetched:
A read-ahead control method which is a condition for preventing the subsequent data from being replaced with any other data that will be read later from the secondary storage device into the cache area.
【請求項2】上記計算機システムは、上記読み出された
後続のデータおよび上記先読みされたデータをそれぞれ
格納するためのデータ領域を予め定められたデータ領域
選択手順に従って選択するように構成され、 上記条件は、上記データ領域選択手順に依存して定めら
れている請求項1記載の先読み制御方法。
2. The computer system is configured to select a data area for storing each of the read subsequent data and the prefetched data according to a predetermined data area selection procedure. The prefetch control method according to claim 1, wherein the condition is determined depending on the data area selection procedure.
【請求項3】上記条件は、上記後続のデータが先読みさ
れた場合、先読みされた上記後続のデータが、第1,第
2のデータのいずれかによって置換されるのを回避する
ための条件であり、 上記第1のデータは、上記複数のユーザプロセスのいず
れか一つが上記後続のデータの先読みの後に発行するで
あろう読み出し要求に対して上記2次記憶装置から上記
キャッシュ領域に読み出されるであろう他の後続のデー
タであり、 上記第2のデータは、その読み出し要求に付随して上記
2次記憶装置から上記キャッシュ領域に先読みされるで
あろう他のさらに後続のデータである請求項1記載の先
読み制御方法。
3. The condition is a condition for avoiding replacement of the read-ahead subsequent data by any one of the first and second data when the subsequent data is read-ahead. Yes, the first data may be read from the secondary storage device to the cache area in response to a read request that any one of the plurality of user processes will issue after prefetching the subsequent data. The second data may be other subsequent data that may be present, and the second data may be other subsequent data that may be prefetched from the secondary storage device to the cache area in association with the read request. 1. The prefetch control method described in 1.
【請求項4】プロセッサと、主記憶と、複数のユーザプ
ロセスによりアクセス可能な複数のファイルを保持する
少なくとも一つの二次記憶装置を有し、上記主記憶は、
上記二次記憶装置と上記複数のユーザプロセスの間で転
送されるべきデータを一時的に保持するキャッシュ領域
を有し、上記複数のユーザプロセスのいずれか一つが発
行した読み出し要求が指定したデータを上記複数のファ
イルのいずれかの一つから読み出し、上記読み出された
データを上記キャッシュ領域を経由して上記一つのユー
ザプロセスに転送し、さらに、上記読み出し要求が、上
記一つのファイル内の順序づけられた複数のデータを逐
次アクセスする逐次アクセスのための読み出し要求であ
るときには、上記逐次アクセスにより後に読み出される
可能性がある後続のデータを上記一つのファイルから上
記キャッシュ領域に先読みする計算機システムにおい
て、 いずれか一つのユーザプロセスがすでに発行したデータ
読み出し要求に応答して上記2次記憶装置から上記キャ
ッシュ領域にすでに先読みされたいずれか一つのデータ
が、そのデータが当該ユーザプロセスに転送される前に
他のいずれかのデータにより上記キャッシュ領域内で置
換されたか否かを検出し、 上記一つのデータが当該ユーザプロセスに転送される前
に他のいずれかのデータにより置換されたことが検出さ
れたとき、上記複数のユーザプロセスの内のいずれか一
つが発行した逐次アクセスのための読み出し要求のため
にデータの先読みの実行を停止するステップを有する先
読み制御方法。
4. A processor, a main memory, and at least one secondary storage device holding a plurality of files accessible by a plurality of user processes, the main memory comprising:
It has a cache area for temporarily holding data to be transferred between the secondary storage device and the plurality of user processes, and stores data designated by a read request issued by any one of the plurality of user processes. Read from any one of the plurality of files, transfer the read data to the one user process via the cache area, and further, the read request is ordered in the one file. When the request is a read request for sequential access to sequentially access the plurality of data, a computer system that prefetches subsequent data that may be read later by the sequential access from the one file into the cache area, The data read request already issued by any one user process In response, any one of the data already prefetched from the secondary storage device to the cache area is replaced in the cache area by any other data before the data is transferred to the user process. Whether or not one of the plurality of user processes is detected when it is detected that the one data is replaced by any other data before being transferred to the user process. A prefetch control method having a step of stopping the prefetch of data in response to an issued read request for sequential access.
【請求項5】上記検出ステップは、上記複数のユーザプ
ロセスの内のいずれか一つが発行した逐次アクセスのた
めの上記読み出し要求に応答して行われる請求項4記載
の先読み制御方法。
5. The prefetch control method according to claim 4, wherein said detecting step is performed in response to said read request for sequential access issued by any one of said plurality of user processes.
【請求項6】上記検出ステップは、上記複数のユーザプ
ロセスの内のいずれか一つが発行した逐次アクセスのた
めの上記読み出し要求が要求するデータが属する、上記
2次記憶装置に保持されたファイルからすでに先読みさ
れたデータに関して行われる請求項5記載の先読み制御
方法。
6. The detecting step is performed from a file held in the secondary storage device to which data requested by the read request for sequential access issued by any one of the plurality of user processes belongs. The prefetch control method according to claim 5, wherein the prefetch control method is performed on data that has already been prefetched.
【請求項7】上記検出ステップは、上記一つのユーザプ
ロセスが発行した逐次アクセスのための上記読み出し要
求が要求するデータが、上記2次記憶装置から上記キャ
ッシュ領域にすでに先読みされたデータであるときに、
そのデータに関して実行される請求項5記載の先読み制
御方法。
7. The detecting step, wherein the data requested by the read request for sequential access issued by the one user process is data that has been prefetched from the secondary storage device into the cache area. To
The prefetch control method according to claim 5, which is executed for the data.
【請求項8】上記停止ステップにより上記先読みが停止
されたときには、上記一つのファイルに対応して定めら
れた先読み停止フラグをセットし、 上記一つのファイルに対する逐次アクセスのための後続
の読み出し要求が上記一つのユーザプロセスから発行さ
れたときに、上記フラグがセットされているか否かを検
出し、 上記フラグがセットされているときには、逐次アクセス
のための上記後続の読み出し要求に対して上記検出ステ
ップを実行しないで、その後続の読み出し要求が要求す
るデータのさらに後続のデータの先読みを停止するステ
ップをさらに有する請求項5記載の先読み制御方法。
8. When the prefetch is stopped by the stopping step, a prefetch stop flag set corresponding to the one file is set, and a subsequent read request for sequential access to the one file is issued. When issued from the one user process, it detects whether or not the flag is set. When the flag is set, the detection step for the subsequent read request for sequential access is performed. 6. The prefetch control method according to claim 5, further comprising the step of: stopping the prefetch of the data subsequent to the data requested by the subsequent read request without executing the above.
【請求項9】上記検出ステップは、 上記一つのユーザプロセスが発行した読み出し要求が、
逐次アクセスのための読み出し要求であるか否かを検出
し、 上記一つのユーザプロセスが発行した読み出し要求が、
逐次アクセスのための読み出し要求であるときに、その
読み出し要求が要求するデータが、上記2次記憶装置か
ら上記キャッシュ領域にすでに先読みされているか否か
を検出し、 その読み出し要求が要求するデータが上記2次記憶装置
から上記キャッシュ領域にすでに先読みされていると
き、そのデータが上記キャッシュ領域内に存在するか否
かを検出するステップからなる請求項5記載の先読み制
御方法。
9. The read step issued by the one user process is:
It is detected whether the read request is for sequential access, and the read request issued by the one user process is
When it is a read request for sequential access, it is detected whether or not the data requested by the read request has been prefetched from the secondary storage device into the cache area, and the data requested by the read request is detected. 6. The prefetch control method according to claim 5, further comprising the step of detecting whether or not the data is present in the cache area when the data is already prefetched from the secondary storage device to the cache area.
【請求項10】プロセッサと、主記憶と、複数のユーザ
プロセスによりアクセス可能な複数のファイルを保持す
る少なくとも一つの二次記憶装置を有し、上記主記憶
は、上記二次記憶装置と上記複数のユーザプロセスの間
で転送されるべきデータを一時的に保持するキャッシュ
領域を有し、上記複数のユーザプロセスのいずれか一つ
が発行した読み出し要求が指定したデータを上記複数の
ファイルのいずれかの一つから読み出し、上記読み出さ
れたデータを上記キャッシュ領域を経由して上記一つの
ユーザプロセスに転送し、さらに、上記読み出し要求
が、上記一つのファイル内の順序づけられた複数のデー
タを逐次アクセスする逐次アクセスのための読み出し要
求であるときには、上記逐次アクセスにより後に読み出
される可能性がある後続のデータを上記一つのファイル
から上記キャッシュ領域に先読みする計算機システムに
おいて、 上記一つの読み出し要求により要求されたデータを上記
2次記憶装置から読み出す前に、その要求されたデータ
を保持するための第1のデータ領域として、先読み済み
未使用のデータを保持するデータ領域以外のデータ領域
を上記キャッシュ領域から選択し、 上記一つの読み出し要求が逐次アクセスである場合に、
上記後続のデータの先読みを実行する前に、当該後続の
データを保持するための第2のデータ領域として、先読
み済み未使用のデータを保持するデータ領域以外のデー
タ領域を上記キャッシュ領域から選択するステップを有
し、 ここで、上記先読み済み未使用のデータは、いずれかの
ユーザプロセスがすでに発行したデータ読み出し要求に
応答して上記キャッシュ領域にすでに先読みされたが、
当該ユーザプロセスに転送されていないデータである先
読み制御方法。
10. A processor, a main memory, and at least one secondary storage device holding a plurality of files accessible by a plurality of user processes, wherein the main storage is the secondary storage device and the plurality of the secondary storage devices. Has a cache area for temporarily holding data to be transferred between the user processes, and the data specified by the read request issued by any one of the plurality of user processes is stored in one of the plurality of files. Read from one, transfer the read data to the one user process via the cache area, and further, the read request sequentially accesses a plurality of ordered data in the one file. If the request is a read request for sequential access, it may be read later by the sequential access. In a computer system that pre-reads the data in the cache area from the one file to hold the requested data before reading the data requested by the one read request from the secondary storage device. When the data area other than the data area holding the pre-read unused data is selected as the first data area from the cache area and the one read request is sequential access,
Before performing the pre-reading of the subsequent data, a data area other than the data area holding the pre-read unused data is selected from the cache area as the second data area for holding the subsequent data. Where the prefetched unused data has already been prefetched into the cache area in response to a data read request already issued by one of the user processes,
A prefetch control method that is data that has not been transferred to the user process.
【請求項11】上記第1のデータ領域を選択するステッ
プは、第1種から第3種のデータ領域から上記第2のデ
ータ領域を選択するステップからなり、 ここで、第1種のデータ領域は、先読み済み未使用のデ
ータ以外の予め定められた第1種のデータを保持し、 上記第2種のデータ領域は、先読み済み未使用のデータ
以外の予め定められた第2種のデータを保持し、 上記第3種のデータ領域は、データの保持に使用されて
いないデータ領域であり、 上記方法は、いずれの第2種のデータ領域およびいずれ
の第3種のデータ領域も上記キャッシュ領域内にないと
きには、上記後続のデータのための先読みを停止するス
テップをさらに有する請求項10記載の先読み制御方
法。
11. The step of selecting the first data area comprises the step of selecting the second data area from the first-type to third-type data areas, wherein the first-type data area is selected. Holds data of a predetermined first type other than pre-read and unused data, and the second-type data area stores data of a predetermined second type other than pre-read and unused data. And the third type data area is a data area that is not used for holding data, and the second method is any of the second type data area and any of the third type data area is the cache area. 11. The prefetch control method according to claim 10, further comprising the step of stopping the prefetch for the subsequent data when not in the range.
【請求項12】上記第1種のデータは、いずれかのユー
ザプロセスがすでに発行した読み出し要求に応答して上
記2次記憶装置から上記キャッシュ領域にすでに読み出
され、いずれかのユーザプロセスがその後発行した読み
出し要求に応答してそのユーザプロセスに転送され、さ
らに、そのユーザプロセスにより再使用される可能性が
あるデータであり、 上記第2種のデータは、いずれかのユーザプロセスがす
でに発行した読み出し要求に応答して上記2次記憶装置
から上記キャッシュ領域にすでに読み出され、いずれか
のユーザプロセスがその後発行した読み出し要求に応答
してそのユーザプロセスにすでに転送され、さらに、そ
のユーザプロセスにより再使用される可能性がないデー
タである請求項11記載の先読み制御方法。
12. The data of the first type has already been read from the secondary storage device to the cache area in response to a read request already issued by any of the user processes, and any of the user processes thereafter. Data that is transferred to the user process in response to the issued read request and may be reused by the user process. The above-mentioned second type data has already been issued by one of the user processes. In response to a read request, the data has already been read from the secondary storage device into the cache area, and has already been transferred to that user process in response to a read request issued by one of the user processes. The prefetch control method according to claim 11, wherein the prefetch control method is data that is not likely to be reused.
【請求項13】いずれかの第2種のデータ領域およびい
ずれかの第3種のデータ領域が上記キャッシュ領域内に
あるとき、先読みデータ領域の数が予め定められた限界
値に達しているか否かを検出し、 上記先読みデータ領域の数が上記限界値に達していると
きには、上記第2のデータ領域の選択ステップの実行を
停止し、上記後続のデータの先読みを停止するステップ
をさらに有し、 ここで、上記先読みデータ領域は、いずれかのユーザプ
ロセスからすでに発行された読み出し要求に応答して上
記2次記憶装置から上記キャッシュ領域にすでに先読み
されたデータを保持する領域である請求項11記載の先
読み制御方法。
13. When any of the second type data areas and any of the third type data areas are in the cache area, whether the number of prefetch data areas has reached a predetermined limit value or not. If the number of the prefetch data areas has reached the limit value, the step of stopping the execution of the selecting step of the second data area and stopping the prefetch of the subsequent data is further included. The read-ahead data area is an area for holding data that has been read ahead in the cache area from the secondary storage device in response to a read request issued from any of the user processes. The prefetch control method described.
【請求項14】各先読みデータ領域は、未使用の先読み
データと使用済みの先読みデータの一方を保持し、 ここで、上記未使用の先読みデータは、いずれかのユー
ザプロセスからすでに発行された読み出し要求に応答し
て上記2次記憶装置から上記キャッシュ領域にすでに先
読みされたが、そのユーザプロセスにまだ転送されてい
ないデータであり、 上記使用済みの先読みデータは、いずれかのユーザプロ
セスからすでに発行された読み出し要求に応答して上記
2次記憶装置から上記キャッシュ領域にすでに先読みさ
れた、さらにそのユーザプロセスにすでに転送されたデ
ータである請求項13記載の先読み制御方法。
14. Each pre-read data area holds one of unused pre-read data and used pre-read data, wherein the unused pre-read data is read from one of the user processes. Data that has been prefetched from the secondary storage device to the cache area in response to the request but has not yet been transferred to the user process, and the used prefetched data has already been issued by any of the user processes. 14. The prefetch control method according to claim 13, wherein the prefetch control data is data that has been prefetched from the secondary storage device to the cache area in response to the read request and that has already been transferred to the user process.
【請求項15】上記第1種のデータは、いずれかのユー
ザプロセスがすでに発行した読み出し要求に応答して上
記2次記憶装置から上記キャッシュ領域にすでに読み出
され、いずれかのユーザプロセスがその後発行した読み
出し要求に応答してそのユーザプロセスにすでに転送さ
れ、さらに、そのユーザプロセスにより再使用される可
能性があるデータであり、 上記第2種のデータは、いずれかのユーザプロセスがす
でに発行した読み出し要求に応答して上記2次記憶装置
から上記キャッシュ領域にすでに読み出され、いずれか
のユーザプロセスがその後発行した読み出し要求に応答
してそのユーザプロセスにすでに転送され、さらに、そ
のユーザプロセスにより再使用される可能性がないデー
タである請求項13記載の先読み制御方法。
15. The first type data is already read from the secondary storage device to the cache area in response to a read request already issued by any user process, and one of the user processes is subsequently read. The second type of data is data that has already been transferred to the user process in response to the issued read request and may be reused by the user process. Read from the secondary storage device to the cache area in response to the read request, and any user process has already transferred to the user process in response to the read request issued by the user process. 14. The prefetch control method according to claim 13, wherein the prefetch control data is data that cannot be reused by the user.
【請求項16】上記第2のデータ領域を選択するステッ
プは、第2種のデータ領域、第3種のおよび第4種のデ
ータ領域から上記第2のデータ領域を選択するステップ
からなり、 上記停止するステップは、いずれの第2種のデータ領
域、いずれの第3種のデータ領域およびいずれの第4種
のデータ領域も上記キャッシュ領域内にないときには、
上記後続のデータのための先読みを停止するステップを
有し、 ここで、上記第4種のデータ領域は、いずれかのユーザ
プロセスからすでに発行された読み出し要求に応答して
上記2次記憶装置から上記キャッシュ領域にすでに先読
みされ、そのユーザプロセスにすでに転送されたデータ
を保持する請求項11記載の先読み制御方法。
16. The step of selecting the second data area comprises the step of selecting the second data area from a second type data area, a third type and a fourth type data area, and The stopping step is performed when none of the second-type data areas, the third-type data areas, and the fourth-type data areas are in the cache area.
Stopping the read-ahead for the subsequent data, wherein the fourth type of data area is from the secondary storage device in response to a read request already issued by any of the user processes. 12. The prefetch control method according to claim 11, wherein data prefetched in the cache area and already transferred to the user process are held.
【請求項17】上記第1種のデータは、いずれかのユー
ザプロセスがすでに発行した読み出し要求に応答して上
記2次記憶装置から上記キャッシュ領域にすでに読み出
され、いずれかのユーザプロセスがその後発行した読み
出し要求に応答してそのユーザプロセスにすでに転送さ
れ、さらに、そのユーザプロセスにより再使用される可
能性があるデータであり、 上記第2種のデータは、いずれかのユーザプロセスがす
でに発行した読み出し要求に応答して上記2次記憶装置
から上記キャッシュ領域にすでに読み出され、いずれか
のユーザプロセスがその後発行した読み出し要求に応答
してそのユーザプロセスにすでに転送され、さらに、そ
のユーザプロセスにより再使用される可能性がないデー
タである請求項16記載の先読み制御方法。
17. The data of the first type has already been read from the secondary storage device to the cache area in response to a read request issued by any of the user processes, and any one of the user processes thereafter. The second type of data is data that has already been transferred to the user process in response to the issued read request and may be reused by the user process. Read from the secondary storage device to the cache area in response to the read request, and any user process has already transferred to the user process in response to the read request issued by the user process. 17. The prefetch control method according to claim 16, wherein the prefetch control data is data that cannot be reused by the user.
【請求項18】いずれの第4種のデータ領域も上記キャ
ッシュ領域内になく、いずれかの第2種のデータ領域お
よびいずれかの第3種のデータ領域が上記キャッシュ領
域内にあるとき、先読みデータ領域の数が予め定められ
た限界値に達しているか否かを検出し、 上記先読みデータ領域の数が上記限界値に達していると
きには、上記第2のデータ領域の選択ステップの実行を
停止し、上記後続のデータの先読みを停止するステップ
をさらに有する請求項16記載の先読み制御方法。
18. A read-ahead when none of the fourth-type data areas is in the cache area and any of the second-type data areas and any of the third-type data areas are in the cache area. It is detected whether or not the number of data areas has reached a predetermined limit value, and when the number of prefetch data areas has reached the above limit value, execution of the step of selecting the second data area is stopped. The prefetch control method according to claim 16, further comprising the step of stopping the prefetch of the subsequent data.
【請求項19】上記第1種のデータは、いずれかのユー
ザプロセスがすでに発行した読み出し要求に応答して上
記2次記憶装置から上記キャッシュ領域にすでに読み出
され、いずれかのユーザプロセスがその後発行した読み
出し要求に応答してそのユーザプロセスにすでに転送さ
れ、さらに、そのユーザプロセスにより再使用される可
能性があるデータであり、 上記第2種のデータは、いずれかのユーザプロセスがす
でに発行した読み出し要求に応答して上記2次記憶装置
から上記キャッシュ領域にすでに読み出され、いずれか
のユーザプロセスがその後発行した読み出し要求に応答
してそのユーザプロセスにすでに転送され、さらに、そ
のユーザプロセスにより再使用される可能性がないデー
タである請求項18記載の先読み制御方法。
19. The data of the first type has already been read from the secondary storage device to the cache area in response to a read request issued by any of the user processes, and any one of the user processes thereafter. The second type of data is data that has already been transferred to the user process in response to the issued read request and may be reused by the user process. Read from the secondary storage device to the cache area in response to the read request, and any user process has already transferred to the user process in response to the read request issued by the user process. 19. The prefetch control method according to claim 18, wherein the prefetch control data is data that cannot be reused by the user.
【請求項20】プロセッサと、主記憶と、複数のユーザ
プロセスによりアクセス可能な複数のファイルを保持す
る少なくとも一つの二次記憶装置を有し、上記主記憶
は、上記二次記憶装置と上記複数のユーザプロセスの間
で転送されるべきデータを一時的に保持するキャッシュ
領域を有し、上記複数のユーザプロセスのいずれか一つ
が発行した読み出し要求が指定したデータを上記複数の
ファイルのいずれかの一つから読み出し、上記読み出さ
れたデータを上記キャッシュ領域を経由して上記一つの
ユーザプロセスに転送し、さらに、上記読み出し要求
が、上記一つのファイル内の順序づけられた複数のデー
タを逐次アクセスする逐次アクセスのための読み出し要
求であるときには、上記逐次アクセスにより後に読み出
される可能性がある後続のデータを上記一つのファイル
から上記キャッシュ領域に先読みする計算機システムに
おいて、 先読みデータ領域の数が予め定められた限界値に達して
いるか否かを検出し、 上記先読みデータ領域の数が上記限界値に達していると
きには、上記後続のデータの先読みを停止するステップ
を有し、 ここで、上記先読みデータ領域は、いずれかのユーザプ
ロセスからすでに発行された読み出し要求に応答して上
記2次記憶装置から上記キャッシュ領域にすでに先読み
されたデータを保持する領域である先読み制御方法。
20. A processor, a main memory, and at least one secondary storage device holding a plurality of files accessible by a plurality of user processes, wherein the main storage is the secondary storage device and the plurality of storage devices. Has a cache area for temporarily holding data to be transferred between the user processes, and the data specified by the read request issued by any one of the plurality of user processes is stored in one of the plurality of files. Read from one, transfer the read data to the one user process via the cache area, and further, the read request sequentially accesses a plurality of ordered data in the one file. If the request is a read request for sequential access, it may be read later by the sequential access. In a computer system that pre-reads the data of the one file from the one file to the cache area, it is detected whether the number of pre-read data areas has reached a predetermined limit value, and the number of pre-read data areas is the limit value. The prefetching of the subsequent data is stopped when the prefetching data area is reached in response to a read request already issued from any of the user processes. To a pre-reading control method, which is an area for holding the pre-read data in the cache area.
JP9076809A 1996-03-28 1997-03-28 Look-ahead control method Pending JPH09319652A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9076809A JPH09319652A (en) 1996-03-28 1997-03-28 Look-ahead control method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8-73610 1996-03-28
JP7361096 1996-03-28
JP9076809A JPH09319652A (en) 1996-03-28 1997-03-28 Look-ahead control method

Publications (1)

Publication Number Publication Date
JPH09319652A true JPH09319652A (en) 1997-12-12

Family

ID=26414753

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9076809A Pending JPH09319652A (en) 1996-03-28 1997-03-28 Look-ahead control method

Country Status (1)

Country Link
JP (1) JPH09319652A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007207246A (en) * 2006-02-03 2007-08-16 Internatl Business Mach Corp <Ibm> Self prefetching l2 cache mechanism for instruction line
WO2008093399A1 (en) * 2007-01-30 2008-08-07 Fujitsu Limited Information processing system and information processing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007207246A (en) * 2006-02-03 2007-08-16 Internatl Business Mach Corp <Ibm> Self prefetching l2 cache mechanism for instruction line
WO2008093399A1 (en) * 2007-01-30 2008-08-07 Fujitsu Limited Information processing system and information processing method
JPWO2008093399A1 (en) * 2007-01-30 2010-05-20 富士通株式会社 Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus
JP4491500B2 (en) * 2007-01-30 2010-06-30 富士通株式会社 Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus
US8671246B2 (en) 2007-01-30 2014-03-11 Fujitsu Limited Information processing system and information processing method

Similar Documents

Publication Publication Date Title
US5983324A (en) Data prefetch control method for main storage cache for protecting prefetched data from replacement before utilization thereof
EP2478442B1 (en) Caching data between a database server and a storage system
US6216199B1 (en) Hardware mechanism for managing cache structures in a data storage system
US5761536A (en) System and method for reducing memory fragmentation by assigning remainders to share memory blocks on a best fit basis
US5555392A (en) Method and apparatus for a line based non-blocking data cache
KR100240912B1 (en) Stream filter
US5410653A (en) Asynchronous read-ahead disk caching using multiple disk I/O processes and dynamically variable prefetch length
JP3323212B2 (en) Data prefetching method and apparatus
JP4298800B2 (en) Prefetch management in cache memory
US6782454B1 (en) System and method for pre-fetching for pointer linked data structures
JP7340326B2 (en) Perform maintenance operations
JP2007011523A (en) Data look-ahead method and computer system
JPH10269142A (en) Reorganization of collisions in hash bucket of a hash table for improving system performance
JPH0612386A (en) Method and system for synchronizing thread in process
US20020178176A1 (en) File prefetch contorol method for computer system
US20070079070A1 (en) Cache controller
US20130132679A1 (en) Storage system, control program and storage system control method
US6434553B1 (en) File prefetch control method for computer system
CN107562806B (en) Self-adaptive sensing acceleration method and system of hybrid memory file system
US6782444B1 (en) Digital data storage subsystem including directory for efficiently providing formatting information for stored records
JPH06202951A (en) Cash memory system
US7836248B2 (en) Methods and systems for managing persistent storage of small data objects
US20010032297A1 (en) Cache memory apparatus and data processing system
WO2002027498A2 (en) System and method for identifying and managing streaming-data
JPH09319652A (en) Look-ahead control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040304

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040304

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070109

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070508