JPH03296841A - Cache control system - Google Patents

Cache control system

Info

Publication number
JPH03296841A
JPH03296841A JP2099741A JP9974190A JPH03296841A JP H03296841 A JPH03296841 A JP H03296841A JP 2099741 A JP2099741 A JP 2099741A JP 9974190 A JP9974190 A JP 9974190A JP H03296841 A JPH03296841 A JP H03296841A
Authority
JP
Japan
Prior art keywords
control means
cache
block
buffer
file
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
JP2099741A
Other languages
Japanese (ja)
Inventor
Takahiro Okonogi
小此木 崇弘
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2099741A priority Critical patent/JPH03296841A/en
Publication of JPH03296841A publication Critical patent/JPH03296841A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To leave effective data blocks in a cache memory as much as possible and to improve a cache hit rate by connecting all buffer cache blocks to a free list at the time of deleting a certain file and lowering all priority levels down to the lowest levels. CONSTITUTION:A file control means 1 outputs information relating to file deletion. A free buffer control means 4 receiving the information connects a buffer header to the free list 120 so that its buffer cache block is made a free state and allocated to another data block. A cache block priority control means 7 lowers the priority of the cache block header down to the lowest level and immediately allocates the disk cache block to another data block.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュ制御方式に関し、特に計算機システ
ムのファイルシステムにおいてバッファキャッシュメモ
リおよび磁気ディスクキャッシュメモリの制御を行うキ
ャッシュ制御方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a cache control method, and particularly to a cache control method for controlling a buffer cache memory and a magnetic disk cache memory in a file system of a computer system.

〔従来の技術〕[Conventional technology]

計算機システムのファイルシステムには、メモリ間のデ
ータブロックの転送の速度と、磁気ディスク装置とメモ
リとの間のデータブロックの転送の速度との差を縮める
目的で、メモリの一部をバッファキャッシュメモリとし
て用い、さらにメモリの他の一部を磁気ディスクキャッ
シュメモリとして用いるものがある。
In the file system of a computer system, part of the memory is used as a buffer cache memory for the purpose of reducing the difference between the speed of data block transfer between memories and the speed of data block transfer between the magnetic disk device and memory. In some cases, the memory is used as a magnetic disk cache memory, and another part of the memory is used as a magnetic disk cache memory.

このようなファイルシステムにおいては、あるデータブ
ロックに対する読み込み要求に基づいて磁気ディスク装
置から利用者プログラムメモリ空間にデータブロックの
転送が行われる際には、磁気ディスク装置から読み込ま
れたデータブロックが一度磁気ディスクキャッシュメモ
リ上に保存され、さらにバッファキャッシュメモリ上に
格納されてから、利用者プログラムメモリ空間に転送さ
れていた。
In such a file system, when a data block is transferred from the magnetic disk device to the user program memory space based on a read request for a certain data block, the data block read from the magnetic disk device is once magnetically transferred. It was stored on the disk cache memory, further stored on the buffer cache memory, and then transferred to the user program memory space.

これによって、再び同じデータブロックに対する読み込
み要求が発生した場合に、そのデータブロックがバッフ
ァキャッシュメモリ上に残っている場合(バソファキャ
ソシュヒソトの場合)またはバッファキャッシュメモリ
には残っていなくとも磁気ディスクキャッシュメモリ上
に残っている場合(ディスクキャッシュヒントの場合)
には、磁気ディスク装置から利用者プログラムメモリ空
間へのブロックデータの転送はバッファキャッシュメモ
リおよび磁気ディスクキャッシュメモリのどちらかから
利用者プログラムメモリ空間への転送で済み(磁気ディ
スク装置からの転送を必要とせず)、そのデータブロッ
クの転送(データ入出力)に要する時間の短縮が可能に
なっていた。
As a result, when a read request for the same data block occurs again, if the data block remains on the buffer cache memory (in the case of a buffer cache) or even if it does not remain on the buffer cache memory, the magnetic disk If it remains in cache memory (for disk cache hints)
, block data can be transferred from the magnetic disk device to the user program memory space by transferring it from either the buffer cache memory or the magnetic disk cache memory to the user program memory space (transfer from the magnetic disk device is not required). ), it was possible to shorten the time required to transfer the data block (data input/output).

このようなファイルシステムにおいてバッファキャッシ
ュメモリおよび磁気ディスクキャッシュメモリの制御を
行うキャッシュ制御方式では、バッファキャッシュメモ
リの構成要素であるバッファキャッシュブロック(−船
釣に、データブロックの1つに割り当てられる領域)や
、磁気ディスクキャッシュメモリの構成要素であるディ
スクキャッシュブロック(−船釣に、データブロックの
正整数倍個に割り当てられる領域)は、その使用頻度が
考慮されて管理されている。
In the cache control method that controls the buffer cache memory and magnetic disk cache memory in such a file system, the buffer cache block (an area allocated to one of the data blocks) which is a component of the buffer cache memory In addition, disk cache blocks (an area allocated to a positive integer multiple of data blocks for boat fishing), which is a component of a magnetic disk cache memory, are managed in consideration of their frequency of use.

すなわち、バッファキャッシュメモリ上のバッファキャ
ッシュブロックの管理情報を持つバッファヘッダは、ハ
ツシュテーブルおよびフリーリストにより管理されてい
る(第2図<a>および(b)参照)、ここで、フリー
リストにその時点で使用されていない(有効なデータブ
ロックが格納されていない)バッファキャッシュブロッ
クのバッファヘッダが接続されることにより、バッファ
キャッシュブロックの使用頻度が考慮されている。
In other words, buffer headers containing management information for buffer cache blocks on the buffer cache memory are managed by a hash table and a free list (see Figure 2 <a> and (b)). The frequency of use of a buffer cache block is taken into consideration by connecting the buffer headers of buffer cache blocks that are not used at that time (no valid data blocks are stored).

なお、ハツシュテーブルの各エントリの値(第2図(a
)および(b)における0−N (Nは正整数))は、
そのエントリに接続されているバッファヘッダ(次のバ
ッファヘッダへのポインタを前のバッファヘッダまたは
エントリが持つことにより接続が形成されている)に対
応するバッファキャッシュブロックに格納されているデ
ータブロックのブロック番号を一定値で除したときの剰
余に該当する。
Note that the values of each entry in the hash table (Figure 2 (a)
) and (b), 0-N (N is a positive integer)) is
A block of data blocks stored in the buffer cache block corresponding to the buffer header connected to that entry (the connection is formed by the previous buffer header or entry having a pointer to the next buffer header) It corresponds to the remainder when a number is divided by a fixed value.

また、磁気ディスクキャッシュメモリ上のディスクキャ
ッシュブロックの管理情報を持つキャッシュフ゛ロンク
ヘソダは、プライオリティテーブルにより管理されてい
る(第3図(a)および(b)参照)。ここで、プライ
オリティテーブルにおいては、磁気ディスクキャッシュ
メモリ上のディスクキャッシュブロックの使用頻度に応
じてそのディスクキャッシュブロックに対応するキャン
シュブロフクヘッダのプライオリティ (第3図(a)
および(b)における0〜M (Mは正整数))が決め
られており、これによりディスクキャッシュブロックの
使用頻度が考慮されている。
Further, the cache link header having management information of disk cache blocks on the magnetic disk cache memory is managed by a priority table (see FIGS. 3(a) and 3(b)). Here, in the priority table, the priority of the cache block header corresponding to the disk cache block on the magnetic disk cache memory is determined according to the frequency of use of the disk cache block (Figure 3 (a)
and 0 to M (M is a positive integer) in (b) are determined, and the frequency of use of the disk cache block is taken into consideration.

従来、この種のキャッシュ制御方式では、実際のデータ
入出力要求(データブロックの転送要求)に起因した制
御(バッファキャッシュメモリまたは磁気ディスクキャ
ッシュメモリへのデータブロックの書き込みやバッファ
キャッシュメモリまたは磁気ディスクキャッシュメモリ
からのデータブロックの読み出しに関する制W) L、
か行われていない。
Conventionally, in this type of cache control method, control caused by actual data input/output requests (data block transfer requests) (writing data blocks to buffer cache memory or magnetic disk cache memory, buffer cache memory or magnetic disk cache Regulations for reading data blocks from memory W) L,
or has not been done.

したがって、ファイル制御手段の制御によっであるファ
イルが削除された際に、そのファイルで使用されていた
データブロックがバッファキャッシュメモリまたは磁気
ディスクキャッシュメモリ上に存在していた場合には、
バッファキャッシュメモリまたは磁気ディスクキャッシ
ュメモリ上の領域が足りなくなってそのデータブロック
に割り当てられていたノくツファキャッシュブロ・ツク
またはディスクキャッシュブロックが他のデータブロッ
クのために置き換えられるまではそのデータブロックが
バッファキャッシュブロックまたはディスクキャッシュ
フ゛ロックに割り当てられ続けていた。
Therefore, when a file is deleted under the control of the file control means, if the data block used by that file exists on the buffer cache memory or magnetic disk cache memory,
A data block is used until the buffer cache memory or magnetic disk cache memory runs out of space and the buffer cache block or disk cache block allocated to that data block is replaced by another data block. continued to be allocated to buffer cache blocks or disk cache blocks.

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

上述した従来のキャッシュ制御方式では、ファイルが削
除された際にそのファイルで使用されていたデータブロ
ックがバッファキャッシュメモリまたは磁気ディスクキ
ャッシュメモリ上に存在していた場合に、すぐにはその
データブロックに割り当てられていたバッファキャッジ
エフ゛ロックまたはディスクキャッシュブロックに対す
る制御が行われないので、フリーリストにより管理され
ていないバンファヘソダに対応するバッファキャッシュ
ブロックやプライオリティテーブル中の高いプライオリ
ティを示すエントリに接続されているキャッシュブロッ
クヘッダに対応するディスクキャッシュブロックに格納
されているデータブロックに係るファイルが削除された
場合には、すてり−不要となったデータブロックが他の
データブロックよりも長くバッファキャッシュメモリや
磁気ディスクキャッシュメモリ上に残ることになり (
有効なデータブロックが先に追い出されるという事態が
生じる)、バッファキャッシュメモリや磁気ディスクキ
ャッシュメモリにおけるキャッシュヒント率が悪くなる
という欠点がある。
In the conventional cache control method described above, if a data block used by a file is present in the buffer cache memory or magnetic disk cache memory when the file is deleted, the data block is immediately deleted. Since there is no control over the allocated buffer cache block or disk cache block, the buffer cache block corresponding to the buffer header that is not managed by the free list or the cache connected to the entry indicating a high priority in the priority table If a file related to a data block stored in a disk cache block corresponding to a block header is deleted, the data block that is no longer needed will be stored in the buffer cache memory or magnetic disk for a longer time than other data blocks. It will remain in the cache memory (
(A valid data block may be evicted first), and the cache hint rate in buffer cache memory and magnetic disk cache memory is poor.

本発明の目的は、上述の点に鑑み、あるファイルが削除
された際にそのファイルで使用されていたデータブロッ
クが格納されているバッファキャッシュブロックの全て
をフリーリストに接続し、そのようなデータブロックが
格納されているディスクキャッシュブロックの全てのプ
ライオリティを最も低くすることにより、有効なデータ
ブロックをなるべくバッファキャッシュメモリや磁気デ
ィスクキャッシュメモリ上に残してキャツシュヒツト率
の向上を図るキャッシュ制御方式を提供することにある
In view of the above, an object of the present invention is to connect all buffer cache blocks in which data blocks used by a certain file are stored when the file is deleted to a free list, and to remove such data. To provide a cache control method that improves the cash hit rate by leaving as many valid data blocks as possible on a buffer cache memory or magnetic disk cache memory by setting all the priorities of disk cache blocks in which blocks are stored to the lowest level. There is a particular thing.

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

本発明のキャッシュ制御方式は、磁気ディスク装置上の
ファイルの作成および削除等の管理制御を行うファイル
制御手段と、このファイル制御手段により管理制御が行
われるファイルとそのファイルに使用されるデータブロ
ックとの対応を管理し利用者プログラムメモリ空間とバ
ッファキャッシュメモリとの間のデータブロックの転送
の制御を行うファイルブロック制御手段と、データブロ
ックの転送の際に未使用のバッファキャッシュブロック
を確保しファイルの削除に係る通知を受けた場合にその
ファイルに使用されていたデータブロックに割り当てら
れていたバッファキャッシュブロックのバッファヘフグ
をフリーリストに接続するフリーバッファ制御手段と、
ハフシュテーブル制御手段および前記フリーバッファ制
御手段による制御に基づきデータブロックの転送に使用
すべきバッファキャッシュブロックを選択して前記ファ
イルブロック制御手段に提供しバッファキャッシュメモ
リと磁気ディスクキャッシュメモリとの間のデータブロ
ックの転送の制御を行うバッファキャッシュ制御手段と
、ブライオリティテーブルにおいて管理されるディスク
キャッシュフロックのプライオリティを制御しファイル
の削除に係る通知を受けた場合にそのファイルに使用さ
れていたデータブロックに割り当てられていたディスク
キャッシュブロックのプライオリティを最も低くする制
御を行うキャッシュブロックプライオリティ制御手段と
、磁気ディスクキャッシュブロック制御手段および前記
キャッシュブロックプライオリティ制御手段による制御
に基づきデータブロックの転送に使用すべきディスクキ
ャッシュブロックを選択して前記バッファキャッシュ制
御手段に提供し磁気ディスク装置制御手段を用いて磁気
ディスクキャッシュメモリと磁気ディスク装置との間の
データブロックの転送の制御を行う磁気ディスクキャン
シュ制御手段と、前記ファイル制御手段によりファイル
が削除された場合にそのファイルの削除に係る通知を前
記フリーバッファ制御手段および前記キャッシュブロッ
クプライオリティ制御手段に提供するファイル管理情報
伝達手段とを有する。
The cache control method of the present invention includes a file control means that performs management control such as creation and deletion of files on a magnetic disk device, a file that is managed and controlled by this file control means, and a data block used for the file. a file block control means that manages the correspondence between the user program memory space and the buffer cache memory and controls the transfer of data blocks between the user program memory space and the buffer cache memory; a free buffer control means that connects a buffer of a buffer cache block allocated to a data block used for the file to a free list when a deletion notification is received;
Based on the control by the huff table control means and the free buffer control means, a buffer cache block to be used for data block transfer is selected and provided to the file block control means, and a buffer cache block is selected and provided to the file block control means. A buffer cache control means that controls the transfer of data blocks, and controls the priority of disk cache flocks managed in a priority table, so that when a file deletion notification is received, the data blocks used for that file are a cache block priority control means for controlling the assigned disk cache block to have the lowest priority; and a disk cache to be used for data block transfer based on control by the magnetic disk cache block control means and the cache block priority control means. magnetic disk cache control means for selecting a block and providing it to the buffer cache control means and controlling the transfer of data blocks between the magnetic disk cache memory and the magnetic disk device using the magnetic disk device control means; and file management information transmitting means for providing a notification regarding deletion of a file to the free buffer control means and the cache block priority control means when the file is deleted by the file control means.

〔作用〕[Effect]

本発明のキャッシュ制御方式では、ファイル制御手段が
磁気ディスク装置上のファイルの作成および削除等の管
理制御を行い、ファイルブロック制御手段がファイル制
御手段により管理制御が行われるファイルとそのファイ
ルに使用されるデータブロックとの対応を管理し利用者
プログラムメモリ空間とバッファキャッシュメモリとの
間のデータブロックの転送の制御を行い、フリーバッフ
ァ制御手段がデータブロックの転送の際に未使用のバッ
ファキャッシュブロックを確保しファイルの削除に係る
通知を受けた場合にそのファイルに使用されていたデー
タブロックに割り当てられていたバッファキャンシュブ
ロックのバッファヘンダをフリーリストに接続し、バッ
ファキャッシュ制御手段がハツシュテーブル制御手段お
よびフリーバッファ制御手段による制御に基づきデータ
ブロックの転送に使用すべきバッファキャッシュフロ・
7りを選択してファイルブロック制御手段に提供しバッ
ファキャッシュメモリと磁気ディスクキ中フシュメモリ
との間のデータブロックの転送の制御を行い、キャッシ
ュブロックプライオリティ制御手段がプライオリティテ
ーブルにおいて管理されるディスクキャッシュブロック
のプライオリティを制御しファイルの削除に係る通知を
受けた場合にそのファイルに使用されていたデータブロ
ックに割り当てられていたディスクキャッシュブロック
のプライオリティを最も低くする制御を行い、磁気ディ
スクキャッシュ制御手段が磁気ディスクキャッシュブロ
ック制御手段およびキャッシュブロックプライオリティ
制御手段による制御に基づきデータブロックの転送に使
用すべきディスクキャッシュブロックを選択してバッフ
ァキャッシュ制御手段に提供し磁気ディスク装置制御手
段を用いて磁気ディスクキャッシュメモリと磁気ディス
ク装置との間のデータブロックの転送の制御を行い、フ
ァイル管理情報伝達手段がファイル制御手段によりファ
イルが削除された場合にそのファイルの削除に係る通知
をフリーバッファ制御手段およびキャッシュブロックプ
ライオリティ制御手段に提供する。
In the cache control method of the present invention, the file control means performs management control such as creation and deletion of files on the magnetic disk device, and the file block control means is used for the files and files whose management control is performed by the file control means. The free buffer control means manages the correspondence with the data blocks that are used and controls the transfer of data blocks between the user program memory space and the buffer cache memory, and the free buffer control means uses unused buffer cache blocks when transferring data blocks. When a file deletion notification is received, the buffer cache control means connects the buffer header of the buffer cache block allocated to the data block used for that file to the free list, and the buffer cache control means performs hash table control. The buffer cache flow to be used for data block transfer based on the control by the free buffer control means and the free buffer control means.
7 is selected and provided to the file block control means to control the transfer of data blocks between the buffer cache memory and the magnetic disk storage memory, and the cache block priority control means selects and provides the file block control means with respect to the disk cache blocks managed in the priority table. When a file deletion notification is received, the magnetic disk cache control means controls the priority of the disk cache block assigned to the data block used for that file to be the lowest. Based on the control by the disk cache block control means and the cache block priority control means, a disk cache block to be used for data block transfer is selected and provided to the buffer cache control means, and the magnetic disk device control means is used to select the disk cache block to be used for data block transfer, and to use the magnetic disk device control means to select the disk cache block to be used for data block transfer. The file management information transmission means controls the transfer of data blocks to and from the magnetic disk device, and when a file is deleted by the file control means, the file management information transmission means sends a notification regarding the deletion of the file to the free buffer control means and the cache block priority. control means.

〔実施例〕〔Example〕

次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be explained in detail with reference to the drawings.

第1図は、本発明のキャッシュ制御方式の一実施例の構
成を示すブロック図である0本実施例のキャッシュ制御
方式は、ファイル制御手段1と、ファイル管理情報伝達
手段2と、バッファキャッシュ制御手段3と、フリーバ
ッファ制御手段4と、磁気ディスクキャッシュ制御手段
5と、磁気ディスクキャッシュブロック制御手段6と、
キャッシュブロックプライオリティ制御手段7と、ハツ
シュテーブル制御手段8と、ファイルブロック制御手段
9と、磁気ディスク装置制御手段10と、プライオリテ
ィテーブル11と、ハツシュテーブル12 (フリーリ
スト120が付設されている)と、バッファヘッダ群1
3と、キャッシュブロックヘッダ群14と、利用者プロ
グラムメモリ空間15と、バッファキャッシュメモリ1
6と、磁気ディスクキャッシュメモリ17と、磁気ディ
スク装置18とを含んで構成されている。
FIG. 1 is a block diagram showing the configuration of an embodiment of the cache control method of the present invention. means 3, free buffer control means 4, magnetic disk cache control means 5, magnetic disk cache block control means 6,
Cache block priority control means 7, hash table control means 8, file block control means 9, magnetic disk device control means 10, priority table 11, hash table 12 (free list 120 is attached) and buffer header group 1
3, cache block header group 14, user program memory space 15, and buffer cache memory 1
6, a magnetic disk cache memory 17, and a magnetic disk device 18.

第2図(a)および(b)は、ハツシュテーブル12お
よびフリーリスト120によるバッファヘッダ群13の
管理の態様の具体例を示す図である。第2図(a)中の
フリーリスト120に接続されているバッファヘッダG
およびHに対応するバッファキャッシュブロックがフリ
ーな状S(使用されていない状jli)にあり、バッフ
ァキャッシュブロックの使用要求が発生するとこれらの
バッファキャッシュブロックから先に割り当てられる。
FIGS. 2(a) and 2(b) are diagrams showing a specific example of how the buffer header group 13 is managed by the hash table 12 and free list 120. Buffer header G connected to free list 120 in FIG. 2(a)
Buffer cache blocks corresponding to and H are in a free state S (unused state jli), and when a request to use a buffer cache block occurs, these buffer cache blocks are allocated first.

第3図(a)および(b)は、プライオリティテーブル
11によるキャッシュブロックヘッダ群14の管理の態
様の具体例を示す図である。第3図(a)において、エ
ントリOに接続されているキャッシュブロックヘッダA
′に対応するディスクキャッシュブロックのプライオリ
ティが最低であり、エントリMに接続されているキャッ
シュフロックヘッダE′およびF′に対応するディスク
キャッシュブロックのプライオリティが最高であり、プ
ライオリティの低いものから順に他のデータブロックに
割り当てられていく。
FIGS. 3A and 3B are diagrams showing specific examples of how the cache block header group 14 is managed by the priority table 11. In FIG. 3(a), cache block header A connected to entry O
′ has the lowest priority, and the disk cache blocks corresponding to cache block headers E′ and F′ connected to entry M have the highest priority. Allocated to data blocks.

次に、このように構成された本実施例のキャッシュ制御
方式の動作について説明する。
Next, the operation of the cache control system of this embodiment configured as described above will be explained.

初めに、ファイル制御手段1およびファイルブロック制
御手段9の制御によって、ファイルの作成や既存のファ
イルに対するデータ入出力に基づいてデータブロックの
転送が行われる場合の動作について説明する。
First, the operation when a data block is transferred based on file creation or data input/output to an existing file under the control of the file control means 1 and the file block control means 9 will be described.

ファイル制御手段1を介した利用者プログラムからのフ
ァイルの作成やファイルに対するデータ入出力の要求に
より、ファイルブロック制御手段9はバッファキャッシ
ュ制御手段3に対しである特定のデータブロックの転送
のために使用できるバッファキャッシュメモリ16上の
バッファキャッシュブロックを要求する。
The file block control means 9 is used to transfer a specific data block to the buffer cache control means 3 in response to a request for file creation or data input/output to a file from a user program via the file control means 1. request a buffer cache block on buffer cache memory 16 that is available.

この要求を受けたバッファキャッシュ制御手段3は、ハ
ツシュテーブル制御手段8に制御を渡す。
Upon receiving this request, the buffer cache control means 3 passes control to the hash table control means 8.

ハツシュテーブル制御手段8は、すでにそのデータブロ
ックに割り当てられているバッファキャッシュブロック
があるか否かをハツシュテーブル12およびハツシュテ
ーブル12により管理されているバッファヘッダ群13
を参照して探索する。
The hash table control means 8 checks the hash table 12 and the buffer header group 13 managed by the hash table 12 to determine whether there is a buffer cache block already allocated to the data block.
Browse and explore.

すでにそのデータブロックに割り当てられているバッフ
ァキャッシュブロックがあると判断した場合には、ハツ
シュテーブル制御手段8はバッファキャッシュ制御手段
3およびファイルブロック制御手段9(バッファキャッ
シュ制御手段3を介して)にそのバッファキャッシュブ
ロックに対応するバッファヘッダへのポインタを渡す。
If it is determined that there is a buffer cache block already allocated to the data block, the hash table control means 8 sends a message to the buffer cache control means 3 and the file block control means 9 (via the buffer cache control means 3). Passes a pointer to the buffer header corresponding to the buffer cache block.

まだそのデータブロックに割り当てられているバッファ
キャッシュブロックがないと判断した場合には、ハツシ
ュテーブル制御手段8はバッファキャッシュ制御手段3
を介してフリーバッファ制御手段4に制御を渡す。
If it is determined that there is no buffer cache block allocated to that data block yet, the hash table control means 8 controls the buffer cache control means 3.
Control is passed to the free buffer control means 4 via.

フリーバッファ制御手段4は、フリーリスト120を参
照して1ノインフアキヤフシユメモリ16上の未使用の
バッファキャッシュプロ、りに対応するバッファへ7ダ
へのポインタをバッファキャッシュ制御手段3およびフ
ァイルブロック制御手段9(バッファキャッシュ制御手
段3を介して)に渡す。
The free buffer control means 4 refers to the free list 120 and transfers a pointer to the buffer corresponding to the unused buffer cache program on the buffer memory 16 to the buffer cache control means 3 and the file. It is passed to the block control means 9 (via the buffer cache control means 3).

バッファへラダへのポインタを受は取ったファイルブロ
ック制御手段9は、そのバッファヘッダに対応するバッ
ファキャッシュブロックを使用して、利用者プログラム
メモリ空間15とバッファキャッシュメモリ16との間
のデータブロックの転送を制御する。
The file block control means 9, which has received the pointer to the buffer ladder, uses the buffer cache block corresponding to the buffer header to control the data block between the user program memory space 15 and the buffer cache memory 16. Control transfers.

次に、バッファキャッシュ制御手段3は、磁気ディスク
キャッシュ制御手段5に対して、上述の特定のデータブ
ロックの転送のために使用できる磁気ディスクキャッシ
ュメモリ17上のディスクキャッシュブロックを要求す
る。
Next, the buffer cache control means 3 requests the magnetic disk cache control means 5 for a disk cache block on the magnetic disk cache memory 17 that can be used for transferring the above-mentioned specific data block.

この要求を受けた磁気ディスクキャッシュ制御手段5は
、磁気ディスクキャッシュブロック制御手段6に制御を
渡す。
Upon receiving this request, the magnetic disk cache control means 5 passes control to the magnetic disk cache block control means 6.

磁気ディスクキャッシュブロック制御手段6は、キャッ
シュブロックプライオリティ制御手段7を介して、すで
にそのデータブロックに割り当てられているディスクキ
ャッシュブロックがあるか否かをプライオリティテーブ
ル11により管理されているキャッシュブロックヘッダ
群14を参照して探索する。
The magnetic disk cache block control means 6 checks the cache block header group 14 managed by the priority table 11 via the cache block priority control means 7 to determine whether there is a disk cache block already allocated to the data block. Browse and explore.

すでにそのデータフ゛口7りに割り当てられているディ
スクキャッシュブロックがあると判断した場合には、磁
気ディスクキャンシュブロック制御手段6は磁気ディス
クキ中ンシェ制御手段5およびバッファキャッシュ制御
手段3(磁気ディスクキャッシュ制御手段5を介して)
にそのディスクキャッシュブロックに対応するキャッシ
ュブロックヘッダへのポインタを渡す。
If it is determined that there is a disk cache block already allocated to the data file 7, the magnetic disk cache block control means 6 controls the magnetic disk cache control means 5 and the buffer cache control means 3 (magnetic disk cache block control means 6). via control means 5)
a pointer to the cache block header corresponding to that disk cache block.

まだそのデータブロックに割り当てられているディスク
キャッシュブロックがないと判断した場合には、磁気デ
ィスクキャッシュブロック制御手段6はキャツシュプロ
7クブライオリテイ制御手段7の制御によりプライオリ
ティテーブル11を参照して磁気ディスクキャッシュメ
モリ17上の最もプライオリティの低いディスクキャッ
シュブロックに対応するキャッシュブロックヘッダへの
ポインタを磁気ディスクキャッシュ制御手段5およびバ
ッファキャッシュ制御手段3(M1気ディスクキャッシ
ュ制御手段5を介して)に渡す。
If it is determined that there is no disk cache block allocated to the data block yet, the magnetic disk cache block control means 6 refers to the priority table 11 under the control of the cache processor 7 disk priority control means 7 and assigns the magnetic disk cache memory 17 A pointer to the cache block header corresponding to the disk cache block with the lowest priority above is passed to the magnetic disk cache control means 5 and the buffer cache control means 3 (via the M1 disk cache control means 5).

磁気ディスクキャッシュメモリ17上のディスクキャッ
シュブロックのプライオリティは、キャッシュブロック
プライオリティ制御手段7によって制御されており、使
用頻度の高いディスクキャッシュブロックはプライオリ
ティが高くなり使用頻度の低いディスクキャッシュブロ
ックはプライオリティが低くなるように制御されている
The priorities of the disk cache blocks on the magnetic disk cache memory 17 are controlled by the cache block priority control means 7, with frequently used disk cache blocks having a high priority and less frequently used disk cache blocks having a low priority. It is controlled as follows.

キャッシュフ゛ロンクヘッダへのポインタを受は取った
バッファキャッシュ制御手段3は、そのキャッシュブロ
ックヘッダに対応するディスクキャッシュブロックおよ
び上述したようにハツシュテーブル制御手段8から受は
取ったバッファヘッダに対応するバッファキャッシュブ
ロックを使用して・バフファキャソシュメモリ16と磁
気ディスクキャンシュメモリ17との−のデータブロッ
クの転送を制御する。
The buffer cache control means 3 which has received the pointer to the cache block header corresponds to the disk cache block corresponding to the cache block header and the buffer header received from the hash table control means 8 as described above. The buffer cache block is used to control the transfer of data blocks between the buffer cache memory 16 and the magnetic disk cache memory 17.

また、キャッシュブロックヘッダへのポインタを受は取
った磁気ディスクキャッシュ制御手段5は、そのキャッ
シュブロックヘッダに対応するディスクキャッシュブロ
ックを使用して、磁気ディスクキャッシュメモリ17と
磁気ディスク装置18との間のデータブロックの転送(
磁気ディスクキャッシュメモリ17から磁気ディスク装
置18への非同期な書き込みおよび磁気ディスク装置[
18から磁気ディスクキャンシュメモリ17への読み出
し)を制御する(Wa気ディスク装置制御手段10によ
る制御を用いて行う)。
Further, the magnetic disk cache control means 5 that has received the pointer to the cache block header uses the disk cache block corresponding to the cache block header to control the communication between the magnetic disk cache memory 17 and the magnetic disk device 18. Transferring data blocks (
Asynchronous writing from the magnetic disk cache memory 17 to the magnetic disk device 18 and magnetic disk device [
18 to the magnetic disk cache memory 17) (performed using control by the Wa disk device control means 10).

続いて、ファイル制御手段1の制御によって、あるファ
イルが削除された場合の動作について説明する。
Next, the operation when a certain file is deleted under the control of the file control means 1 will be explained.

この場合には、そのファイルに使用されていたデータブ
ロックには転送要求が起こらないために、上述のような
手順によってフリーバッファ制御手段4やキャッシュブ
ロックプライオリティ制御手段7を呼び出すことはでき
ない。
In this case, since no transfer request is made to the data block used for the file, the free buffer control means 4 and cache block priority control means 7 cannot be called by the procedure described above.

そこで、ファイル制御手段1は、ファイル管理情報伝達
手段2を介して、フリーバッファ制御手段4およびキャ
ッシュブロックプライオリティ制御手段7に対し、その
ファイルの削除に係る通知(削除されたファイルに使用
されていたデータブロックのブロック番号等)を提供す
る。
Therefore, the file control means 1 sends a notification regarding the deletion of the file to the free buffer control means 4 and the cache block priority control means 7 via the file management information transmission means 2. data block number, etc.).

この通知を受けたフリーバッファ制御手段4は、そのデ
ータブロックに割り当てられているバッファキャッシュ
ブロックがある場合には(ここでは、第2図(a)中の
バッファヘッダFに対応するパフファキャッシュフ゛ロ
ックが該当するものとする)、そのバッファキャッシュ
ブロックのバッファヘッダFをフリーリスト120に接
続しく第2図(b)参照)、そのバッファキャッシュブ
ロックをフリーな状態のバッファキャッシュブロックと
して他のデータブロックに割り当てることができるよう
にする。
The free buffer control means 4 that has received this notification, if there is a buffer cache block allocated to the data block (here, the puffer cache block corresponding to the buffer header F in FIG. 2(a)) ), connect the buffer header F of the buffer cache block to the free list 120 (see FIG. 2(b)), and transfer the buffer cache block to other data blocks as a free buffer cache block. be able to be assigned.

上述の通知を受けたキャッシュブロックプライオリティ
制御手段7は、そのデータブロックに割り当てられてい
るディスクキャンシュフ゛ロンクがある場合には(ここ
では、第3図(a)中のキャッシュブロックヘッダC′
に対応するディスクキャッシュフロックが8亥当するも
のとする)、そのディスクキャッシュブロックのキャッ
シュブロックヘッダC′のプライオリティを最低にしく
第3図(b)参照、キャンンユブロックヘッダC′は最
低のプライオリティのキャッシュブロックヘッダの接続
の先頭に挿入され、キャッシュブロックヘッダC′に対
応するディスクキャッシュブロックはキャッシュブロッ
クヘッダA′に対応するディスクキャッシュブロックよ
りも先に他のデータブロックに割り当てられる)、その
ディスクキャッシュブロックをすぐに他のデータブロッ
クに割り当てることができるようにする。
When the cache block priority control means 7 receives the above notification, if there is a disk cache link assigned to the data block (here, the cache block header C' in FIG. 3(a)
8), the cache block header C' of that disk cache block has the lowest priority, and as shown in FIG. 3(b), the cache block header C' has the lowest priority. (the disk cache block corresponding to cache block header C' is allocated to other data blocks before the disk cache block corresponding to cache block header A'), and the disk cache block corresponding to cache block header C' is allocated to other data blocks before the disk cache block corresponding to cache block header A') To enable cache blocks to be immediately allocated to other data blocks.

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

以上説明したように本発明は、ファイルの削除によって
不要となったデータブロックに割り当てられていたバッ
ファキャッシュブロックおよびディスクキャッシュブロ
ックをなるべく早く他のデータブロックに割り当てるた
めのキャッシュ制御を行うことにより、不要となったデ
ータブロックがまだバッファキャッシュメモリや磁気デ
ィスクキャッシュメモリ上に残っているうちに有効なデ
ータブロックがバッファキャッシュメモリや磁気ディス
クキャッシュメモリから追い出されてしまうという事態
を防ぐことができ、キャッシュヒント率を向上すること
ができ、データ入出力時間を短縮することができるとい
う効果がある。
As explained above, the present invention performs cache control to allocate buffer cache blocks and disk cache blocks that were allocated to data blocks that are no longer needed due to file deletion to other data blocks as soon as possible. It is possible to prevent a situation in which a valid data block is evicted from the buffer cache memory or magnetic disk cache memory while the data block that has become invalid still remains in the buffer cache memory or magnetic disk cache memory. This has the effect of improving efficiency and reducing data input/output time.

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

第1図は本発明の一実施例の構成を示すブロック図、 第2図(a)および(b)は第1図中のハフシュテーブ
ルおよびフリーリストによるバッファヘッダ群の管理の
態様を説明するための図、第3図(a)および(b)は
第1図中のプライオリティテーブルによるキャッシュブ
ロックヘッダ群の管理の態様を説明するための図である
。 図において、 1・・・ファイル制御手段、 2・・・ファイル管理情報伝達手段、 3・・・バッファキャッシュ制御手段、4・・・フリー
バッファ制御手段、 5・・・磁気ディスクキャッシュ制御手段、6・・・磁
気ディスクキャッシュブロック制御手段、 7・・・キャッシュブロックブライオリティ制御手段、 8・・・ハツシュテーブル制御手段、 9・・・ファイルブロック制御手段、 10・・磁気ディスク装置制御手段、 11・・プライオリティテーブル、 12・・ハフシュテーブル、 13・・バッファヘッダ群、 14・・キャッシュブロックヘッダ群、15・・利用者
プログラムメモリ空間、16・・バッファキャッシュメ
モリ、 17・・磁気ディスクキャッシュメモリ、18・・磁気
ディスク装置、 120・フリーリストである。 第2図(Q) 第2図(b)
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, and FIGS. 2(a) and (b) explain the manner in which buffer header groups are managed by the Huffsh table and free list in FIG. 1. FIGS. 3(a) and 3(b) are diagrams for explaining the manner in which cache block header groups are managed by the priority table in FIG. 1. In the figure, 1... File control means, 2... File management information transmission means, 3... Buffer cache control means, 4... Free buffer control means, 5... Magnetic disk cache control means, 6 ...Magnetic disk cache block control means, 7.. Cache block priority control means, 8.. Hash table control means, 9.. File block control means, 10.. Magnetic disk device control means, 11. ...Priority table, 12.. Huffsh table, 13.. Buffer header group, 14.. Cache block header group, 15.. User program memory space, 16.. Buffer cache memory, 17.. Magnetic disk cache memory. , 18...Magnetic disk device, 120. Free list. Figure 2 (Q) Figure 2 (b)

Claims (1)

【特許請求の範囲】 磁気ディスク装置上のファイルの作成および削除等の管
理制御を行うファイル制御手段と、このファイル制御手
段により管理制御が行われるファイルとそのファイルに
使用されるデータブロックとの対応を管理し利用者プロ
グラムメモリ空間とバッファキャッシュメモリとの間の
データブロックの転送の制御を行うファイルブロック制
御手段と、 データブロックの転送の際に未使用のバッファキャッシ
ュブロックを確保し、ファイルの削除に係る通知を受け
た場合にそのファイルに使用されていたデータブロック
に割り当てられていたバッファキャッシュブロックのバ
ッファヘッダをフリーリストに接続するフリーバッファ
制御手段と、ハッシュテーブル制御手段および前記フリ
ーバッファ制御手段による制御に基づきデータブロック
の転送に使用すべきバッファキャッシュブロックを選択
して前記ファイルブロック制御手段に提供し、バッファ
キャッシュメモリと磁気ディスクキャッシュメモリとの
間のデータブロックの転送の制御を行うバッファキャッ
シュ制御手段と、プライオリティテーブルにおいて管理
されるディスクキャッシュブロックのプライオリティを
制御し、ファイルの削除に係る通知を受けた場合にその
ファイルに使用されていたデータブロックに割り当てら
れていたディスクキャッシュブロックのプライオリティ
を最も低くする制御を行うキャッシュブロックプライオ
リティ制御手段と、磁気ディスクキャッシュブロック制
御手段および前記キャッシュブロックプライオリティ制
御手段による制御に基づきデータブロックの転送に使用
すべきディスクキャッシュブロックを選択して前記バッ
ファキャッシュ制御手段に提供し、磁気ディスク装置制
御手段を用いて磁気ディスクキャッシュメモリと磁気デ
ィスク装置との間のデータブロックの転送の制御を行う
磁気ディスクキャッシュ制御手段と、 前記ファイル制御手段によりファイルが削除された場合
にそのファイルの削除に係る通知を前記フリーバッファ
制御手段および前記キャッシュブロックプライオリティ
制御手段に提供するファイル管理情報伝達手段と を有することを特徴とするキャッシュ制御方式。
[Scope of Claims] A file control means that performs management control such as creation and deletion of files on a magnetic disk device, and a correspondence between files that are managed and controlled by this file control means and data blocks used for the files. a file block control means for managing the data block and controlling the transfer of data blocks between the user program memory space and the buffer cache memory; a free buffer control means for connecting a buffer header of a buffer cache block allocated to a data block used in the file to a free list when a notification related to the file is received; a hash table control means; and the free buffer control means. A buffer cache that selects a buffer cache block to be used for data block transfer based on control by the buffer cache block and provides the selected buffer cache block to the file block control means, and controls data block transfer between the buffer cache memory and the magnetic disk cache memory. A control means controls the priority of the disk cache block managed in the priority table, and when a notification regarding deletion of a file is received, the priority of the disk cache block assigned to the data block used for the file is determined. Cache block priority control means performs control to make the lowest priority, magnetic disk cache block control means and said buffer cache control means select a disk cache block to be used for data block transfer based on control by said cache block priority control means. a magnetic disk cache control means for controlling the transfer of data blocks between the magnetic disk cache memory and the magnetic disk device using the magnetic disk device control means; and when a file is deleted by the file control means; and file management information transmitting means for providing a notification regarding deletion of the file to the free buffer control means and the cache block priority control means.
JP2099741A 1990-04-16 1990-04-16 Cache control system Pending JPH03296841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2099741A JPH03296841A (en) 1990-04-16 1990-04-16 Cache control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2099741A JPH03296841A (en) 1990-04-16 1990-04-16 Cache control system

Publications (1)

Publication Number Publication Date
JPH03296841A true JPH03296841A (en) 1991-12-27

Family

ID=14255441

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2099741A Pending JPH03296841A (en) 1990-04-16 1990-04-16 Cache control system

Country Status (1)

Country Link
JP (1) JPH03296841A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06149510A (en) * 1992-07-06 1994-05-27 Internatl Business Mach Corp <Ibm> Device and method for displaying and changing attribute on screen
JPH11327979A (en) * 1998-03-27 1999-11-30 Navigation Technol Corp Improved memory managemnt for navigation system
CN105740167A (en) * 2016-01-28 2016-07-06 浪潮(北京)电子信息产业有限公司 File system cache deletion method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61251944A (en) * 1985-04-30 1986-11-08 Usac Electronics Ind Co Ltd Buffer area control system
JPS63244243A (en) * 1987-03-30 1988-10-11 インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン Opening of file
JPH01211143A (en) * 1988-02-19 1989-08-24 Nec Corp Input/output buffer area control system
JPH01253024A (en) * 1988-04-01 1989-10-09 Oki Electric Ind Co Ltd Buffer control method for data base management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61251944A (en) * 1985-04-30 1986-11-08 Usac Electronics Ind Co Ltd Buffer area control system
JPS63244243A (en) * 1987-03-30 1988-10-11 インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン Opening of file
JPH01211143A (en) * 1988-02-19 1989-08-24 Nec Corp Input/output buffer area control system
JPH01253024A (en) * 1988-04-01 1989-10-09 Oki Electric Ind Co Ltd Buffer control method for data base management

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06149510A (en) * 1992-07-06 1994-05-27 Internatl Business Mach Corp <Ibm> Device and method for displaying and changing attribute on screen
JPH11327979A (en) * 1998-03-27 1999-11-30 Navigation Technol Corp Improved memory managemnt for navigation system
CN105740167A (en) * 2016-01-28 2016-07-06 浪潮(北京)电子信息产业有限公司 File system cache deletion method and system
CN105740167B (en) * 2016-01-28 2018-12-07 浪潮(北京)电子信息产业有限公司 A kind of method and system that file system cache is deleted

Similar Documents

Publication Publication Date Title
US4603380A (en) DASD cache block staging
US6032224A (en) Hierarchical performance system for managing a plurality of storage units with different access speeds
US6094605A (en) Virtual automated cartridge system
US5893097A (en) Database management system and method utilizing a shared memory
US6047356A (en) Method of dynamically allocating network node memory&#39;s partitions for caching distributed files
JP4176341B2 (en) Storage controller
JP2005293205A (en) Storage control device, control method, and control program
US7032093B1 (en) On-demand allocation of physical storage for virtual volumes using a zero logical disk
US7545746B2 (en) Computer system for controlling routed data amount
US20050235005A1 (en) Computer system configuring file system on virtual storage device, virtual storage management apparatus, method and signal-bearing medium thereof
JPH01142964A (en) Memory management
US6256711B1 (en) Method for purging unused data from a cache memory
US7155492B2 (en) Method and system for caching network data
US6549982B1 (en) Buffer caching method and apparatus for the same in which buffer with suitable size is used
JPH03296841A (en) Cache control system
US6834281B1 (en) Method and apparatus to support multi-node direct access to file system data
US7430649B2 (en) Input/output device, computer, computer system, input/output control program, OS, page management program, and page management method
JPH08106443A (en) Data processing system and parallel computer
US5623630A (en) Data processor with application program buffer to cache buffer copy capability to prevent mismatches
JP3111912B2 (en) Disk cache control method
KR100950356B1 (en) Data transfer unit with support for multiple coherency granules
JP2636470B2 (en) Data transfer path selection method
US6594726B1 (en) Digital data storage subsystem including arrangement for efficiently controlling fast write storage operation
JPH11149455A (en) Memory disk sharing method and its executing device
JP3098802B2 (en) Electronic file device data transfer method