JP2001184242A - Cache control method and computer system - Google Patents

Cache control method and computer system

Info

Publication number
JP2001184242A
JP2001184242A JP36615899A JP36615899A JP2001184242A JP 2001184242 A JP2001184242 A JP 2001184242A JP 36615899 A JP36615899 A JP 36615899A JP 36615899 A JP36615899 A JP 36615899A JP 2001184242 A JP2001184242 A JP 2001184242A
Authority
JP
Japan
Prior art keywords
cache
data
area
cache area
shared
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
JP36615899A
Other languages
Japanese (ja)
Inventor
Hiroyuki Takabayashi
弘幸 高林
Toshihiro Kiyono
智弘 清野
Tsuneo Iida
恒雄 飯田
Hiroshi Sakagami
弘 坂上
Hiroshi Fukuoka
博 福岡
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 JP36615899A priority Critical patent/JP2001184242A/en
Publication of JP2001184242A publication Critical patent/JP2001184242A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent any cache in a shared region to be used by another application program from being pushed out when any sharing is not generated. SOLUTION: An exclusive cache region is ensured in each user space, and a shared cache region is ensured in a system space, and data read when the program of the user space (for example, B) performs access to an auxiliary memory unit are stored in the exclusive cache region of a user space B when the data are not shared, and when the program of the other user space (for example, A) performs access to the auxiliary memory unit, a cache block management table 407 is retrieved by a retrieving means 409, and when the accessed data are stored in the exclusive cache region of the user space B, the data stored in the exclusive cache region of the user space B are copied to the shared cache region by a copy means 410, and the input and output of the data for the shared cache region is operated.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ハードディスク装
置など主記憶装置に比べてアクセス速度の遅い記憶装置
に対するアクセス回数を減らして、見かけ上のアクセス
速度を向上するためのキャッシュ制御方法および計算機
システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache control method and a computer system for improving the apparent access speed by reducing the number of accesses to a storage device having a lower access speed than a main storage device such as a hard disk device. .

【0002】[0002]

【従来の技術】図18に従来のキャッシュ制御方法に基
づいて実現されたキャッシュ制御部を含む計算機システ
ムの例を示す。図18に示す計算機システムは、扱うデ
ータを記憶しておくために主記憶装置1801と補助記
憶装置1802を持つ。主記憶装置1801はオペレー
ティングシステムが動作するためのシステム空間180
3とユーザアプリケーションが動作するためのユーザ空
間1804から構成される。アプリケーションプログラ
ム1805がシステムコール1806を用いて補助記憶
装置1802のデータブロックにアクセス要求を行う
と、キャッシュ制御部1807はキャッシュブロック管
理テーブル1808とその検索手段1809を用いて、
要求されたデータブロックが主記憶内に存在するかを調
べる。データブロックが存在していれば、キャッシュブ
ロック1810と呼ばれる主記憶内の当該データブロッ
クに入出力手段1811を用いてアクセスを行い処理を
終了する。データブロックが主記憶内に存在していなけ
れば、LRUキュー1812を用いた置き換え手段18
13によって、当該データブロックを置き換え対象のキ
ャッシュブロック1810に読み込んで、キャッシュブ
ロック管理テーブル1808を更新した後、当該キャッ
シュブロックに対してアクセスを行う。
2. Description of the Related Art FIG. 18 shows an example of a computer system including a cache control unit realized based on a conventional cache control method. The computer system shown in FIG. 18 has a main storage device 1801 and an auxiliary storage device 1802 for storing data to be handled. The main storage device 1801 is a system space 180 for operating an operating system.
3 and a user space 1804 for operating a user application. When the application program 1805 makes an access request to a data block in the auxiliary storage device 1802 using a system call 1806, the cache control unit 1807 uses the cache block management table 1808 and its search means 1809 to
Check whether the requested data block exists in main storage. If the data block exists, the data block in the main memory called the cache block 1810 is accessed using the input / output unit 1811, and the process ends. If the data block does not exist in the main storage, the replacement unit 18 using the LRU queue 1812
13 reads the data block into the cache block 1810 to be replaced, updates the cache block management table 1808, and then accesses the cache block.

【0003】一般に限られたキャッシュ領域を効率よく
管理するためのアルゴリズムとしてLRU(Least
Recently Used)を用いる方法がある。
このアルゴリズムは、最近アクセスされたデータほど再
度アクセスされやすい性質を利用して、新しいデータを
蓄えるときに最もアクセス時刻の古いものから置き換え
の対象とするものである。このときアクセス時刻の新し
さを表すデータ構造としてLRUキューが用いられる。
キャッシュ制御に用いられるLRUキューは、キャッシ
ュブロックのアドレス情報をその要素とし、先頭に近い
ほど当該データブロックへのアクセス時刻が最近である
ことを示し、データアクセスがあると当該データに対応
する要素がキューの先頭に移動される。
In general, an LRU (Least) is used as an algorithm for efficiently managing a limited cache area.
(Recently Used).
This algorithm uses the property that data that has been accessed recently is more likely to be accessed again, and replaces the oldest data with the oldest access time when storing new data. At this time, an LRU queue is used as a data structure indicating the new access time.
The LRU queue used for cache control uses the address information of the cache block as its element, and the closer to the head, the more recent the access time to the data block is. If there is data access, the element corresponding to the data is Moved to the head of the queue.

【0004】なお、キャッシュ制御方法の従来技術に関
する文献としては、例えば、1991年6月共立出版株式会
社発行、Maurice J.Bach著、坂本 文・多田好克・村井
純訳、「UNIXカーネルの設計」がある。
As literature relating to the prior art of the cache control method, for example, published by Kyoritsu Shuppan Co., Ltd. in June 1991, written by Maurice J. Bach, translated by Sakamoto Bun, Tada Yoshikatsu and Murai Jun, "Design of UNIX Kernel" There is.

【0005】[0005]

【発明が解決しようとする課題】上述のキャッシュ制御
部では、特定のアプリケーションプログラムが連続して
大きなサイズのデータの入出力を行うことによってキャ
ッシュ領域を占有してしまうことが起こりうる。キャッ
シュ領域が占有されると、他のアプリケーションプログ
ラムはデータをキャッシュから失ってしまいディスク装
置へのアクセス性能が低下することになる。上述のキャ
ッシュ領域占有を防ぐために、特開平8−147218
「キャッシュ制御装置」では、処理手段ごとの専用領域
を設けて共用領域と併用する方法を提案している。
In the above-described cache control unit, a specific application program may occupy a cache area by continuously inputting / outputting data of a large size. When the cache area is occupied, other application programs lose data from the cache, and the performance of accessing the disk device is reduced. To prevent the above-mentioned occupation of the cache area, see Japanese Patent Application Laid-Open No. 8-147218.
The "cache control device" proposes a method in which a dedicated area is provided for each processing means and used together with a shared area.

【0006】しかし上記発明では、同じデータブロック
に対して複数の処理手段からアクセスがあった場合の共
有方法について考慮されていない。上記発明の提案する
方式では、あるデータブロックが処理手段Aによって専
用領域Aにキャッシュされているときに、別の処理手段
Bが同じデータブロックを要求すると、検索手段は専用
領域Bと共用領域しか検索対象としない。そのため処理
手段Aによって専用領域Aのデータブロックが更新され
ていた場合であっても、処理手段Bはディスク装置から
データを読み込むため、更新の結果がディスク装置に反
映されていなければ処理手段Bは更新されたことを知る
ことができない。この状態で処理手段Bも専用領域Bの
キャッシュブロックに更新処理を行ったとすると、ディ
スク装置に対して先に反映した方の更新データは後から
反映したデータに上書きされ無効になってしまう。従っ
てこの方法では、共有が発生した場合にデータの整合性
が保証されないという問題が発生する。本発明の目的
は、共有が発生しない場合には、他のアプリケーション
プログラムが利用する共用領域のキャッシュの追い出し
を防ぐことにある。本発明の他の目的は、同じデータブ
ロックを複数の処理手段から共有することを可能にする
ことにある。
However, the above invention does not consider a sharing method when a plurality of processing units access the same data block. According to the method proposed by the above invention, when a certain data block is cached in the dedicated area A by the processing means A and another processing means B requests the same data block, the search means will only provide the dedicated area B and the shared area. Do not search. Therefore, even if the data block in the dedicated area A has been updated by the processing unit A, the processing unit B reads the data from the disk device, and if the update result is not reflected on the disk device, the processing unit B I can't know that it has been updated. If the processing means B also updates the cache block in the dedicated area B in this state, the updated data that has been reflected earlier in the disk device is overwritten by the data that has been reflected later, and becomes invalid. Therefore, this method has a problem that data consistency cannot be guaranteed when sharing occurs. An object of the present invention is to prevent flushing of a shared area cache used by another application program when sharing does not occur. Another object of the present invention is to enable the same data block to be shared by a plurality of processing means.

【0007】[0007]

【課題を解決するための手段】上記課題を解決するた
め、本発明は、補助記憶装置を備え、主記憶装置をオペ
レーティングシステムの動作するシステム空間とアプリ
ケーションプログラムの動作するユーザ空間に区別して
使用する計算機システムにおけるキャッシュ制御方法で
あり、前記ユーザ空間にアプリケーションプログラムを
実行するための専用キャッシュ領域を確保し、前記シス
テム空間に共用キャッシュ領域を確保し、アプリケーシ
ョンプログラムが前記補助記憶装置にアクセスしたと
き、該補助記憶装置のデータを前記専用キャッシュ領域
に一時的に格納し、該一時的に格納した専用キャッシュ
領域のデータと同じデータに対して他のアプリケーショ
ンプログラムからアクセス要求が発生した場合、該一時
的に格納した専用キャッシュ領域のデータを前記共用キ
ャッシュ領域にコピーするようにしている。
In order to solve the above-mentioned problems, the present invention comprises an auxiliary storage device, and uses a main storage device in a system space where an operating system operates and a user space where an application program runs. A cache control method in a computer system, wherein a dedicated cache area for executing an application program is secured in the user space, a shared cache area is secured in the system space, and when an application program accesses the auxiliary storage device, The data in the auxiliary storage device is temporarily stored in the dedicated cache area, and when an access request is issued from another application program to the same data as the temporarily stored data in the dedicated cache area, the temporary Dedicated card stored in And so as to copy the data Gerhard region in the shared cache area.

【0008】また、前記一時的に格納した専用キャッシ
ュ領域のデータと同じデータに対して他の複数のアプリ
ケーションプログラムからアクセス要求が発生し、該ア
クセス要求の全てが読み込み要求である場合、該一時的
に格納した専用キャッシュ領域のデータを該他の各アプ
リケーションプログラムを実行するための専用キャッシ
ュ領域のそれぞれにコピーするようにしている。
In the case where an access request is issued from a plurality of application programs to the same data as the temporarily stored data in the dedicated cache area, and all of the access requests are read requests, Is copied to each of the dedicated cache areas for executing the other application programs.

【0009】また、補助記憶装置を備え、主記憶装置を
オペレーティングシステムの動作するシステム空間とア
プリケーションプログラムの動作するユーザ空間に区別
して使用する計算機システムにおいて、前記ユーザ空間
にアプリケーションプログラムを実行するための専用キ
ャッシュ領域を確保する手段と、前記システム空間に共
用キャッシュ領域を確保する手段と、アプリケーション
プログラムが前記補助記憶装置にアクセスしたとき、該
補助記憶装置から読み出したデータを前記専用キャッシ
ュ領域に一時的に格納する手段と、該一時的に格納した
専用キャッシュ領域のデータと同じデータに対して他の
アプリケーションプログラムからアクセス要求が発生し
た場合、該一時的に格納した専用キャッシュ領域のデー
タを前記共用キャッシュ領域にコピーする手段を有する
ようにしている。
Also, in a computer system having an auxiliary storage device and using the main storage device separately in a system space in which an operating system operates and a user space in which an application program operates, the computer system is for executing an application program in the user space. Means for reserving a dedicated cache area, means for reserving a shared cache area in the system space, and temporarily storing data read from the auxiliary storage device in the dedicated cache area when an application program accesses the auxiliary storage device. Means for storing, in a case where an access request is issued from another application program to the same data as the temporarily stored data of the dedicated cache area, the temporarily stored data of the dedicated cache area is stored in the shared cache. And to have a means for copying the shoe region.

【0010】また、前記一時的に格納した専用キャッシ
ュ領域のデータと同じデータに対して他の複数のアプリ
ケーションプログラムからアクセス要求が発生し、該ア
クセス要求の全てが読み込み要求である場合、該一時的
に格納した専用キャッシュ領域のデータを該他の各アプ
リケーションプログラムを実行するための専用キャッシ
ュ領域のそれぞれにコピーする手段を有するようにして
いる。
[0010] Further, when an access request is issued from a plurality of application programs to the same data as the temporarily stored data in the dedicated cache area, and all the access requests are read requests, Means for copying the data of the dedicated cache area stored in the dedicated cache area to each of the dedicated cache areas for executing the other application programs.

【0011】[0011]

【発明の実施の形態】本発明の第1の実施例について説
明する。図1は計算機システムにおけるキャッシュ制御
に係わる構成を示し、データを記憶するために主記憶装
置101と補助記憶装置102を備える。主記憶装置1
01はオペレーティングシステムが動作するシステム空
間103とアプリケーションプログラム104が動作す
る複数のユーザ空間105から構成される。システム空
間103には、システムコール106と呼ばれるインタ
フェースが設置され、アプリケーションプログラム10
4は、システム空間103に実現されている機能のうち
システムコール106で提供されるもののみを利用でき
る。システム空間103には他に、キャッシュ制御部1
07、共用キャッシュ領域108、空間制御部109、
タスク制御部110などが設置される。本発明における
キャッシュ制御部107は、キャッシュ領域管理テーブ
ル111、キャッシュブロック管理テーブル112、検
索手段113、コピー手段114などから構成される。
個々の構成要素については後で詳細に述べる。一方ユー
ザ空間105には、専用キャッシュ領域115が確保さ
れ、空間内のアプリケーションプログラム104がデー
タキャッシュを格納するために利用される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A first embodiment of the present invention will be described. FIG. 1 shows a configuration related to cache control in a computer system, and includes a main storage device 101 and an auxiliary storage device 102 for storing data. Main storage device 1
Reference numeral 01 denotes a system space 103 in which an operating system operates and a plurality of user spaces 105 in which application programs 104 operate. An interface called a system call 106 is installed in the system space 103, and the application program 10
4 can use only the functions provided by the system call 106 among the functions realized in the system space 103. In addition to the cache control unit 1 in the system space 103,
07, the shared cache area 108, the space control unit 109,
A task control unit 110 and the like are provided. The cache control unit 107 according to the present invention includes a cache area management table 111, a cache block management table 112, a search unit 113, a copy unit 114, and the like.
The individual components will be described later in detail. On the other hand, a dedicated cache area 115 is secured in the user space 105, and the application program 104 in the space is used for storing a data cache.

【0012】図2は、ユーザ空間A201のプログラム
がシステムコール202を用いてユーザ空間B203を
生成する処理を説明するための図である。ユーザ空間A
201のプログラム204がユーザ空間Bを指定して空
間起動を要求すると、システムコール202は空間制御
部205によってユーザ空間B203を生成し、起動す
る。それと同時に、キャッシュ制御部206を用いて、
特定のサイズでユーザ空間B203の専用キャッシュ領
域207を確保する。上記処理で確保するサイズの決定
方法には、空間を起動するシステムコールを利用すると
きにユーザが指定する方法とシステムの標準値を決めて
おく方法がある。個々のユーザ空間の専用キャッシュ領
域207にはデータブロックを格納するためにキャッシ
ュブロック領域208が確保される。また専用キャッシ
ュ領域207にはキャッシュブロックの置き換えの優先
順位を決定するためにLRUキュー209を設置する。
本実施例ではLRUキューを用いた方法を述べている
が、限られたキャッシュ領域を効率よく利用する管理手
段であれば他の方法で実現することも可能である。キャ
ッシュ制御部206は専用キャッシュ領域207を確保
する際に領域登録手段210を用いてキャッシュ領域管
理テーブル211に領域情報を登録する。また空間終了
システムコールでは、キャッシュ制御部206が掃き出
し手段212を用いて、当該空間の専用キャッシュ領域
にあるキャッシュで更新されているものをすべて補助記
憶装置213に反映する。するとキャッシュ制御部20
6は、登録削除手段214を用いてキャッシュ領域管理
テーブル211から領域情報を削除する。最後に空間制
御部205によって空間が終了する。
FIG. 2 is a diagram for explaining a process in which a program in the user space A 201 generates a user space B 203 using the system call 202. User space A
When the program 204 of 201 designates the user space B and requests space activation, the system call 202 generates and activates the user space B 203 by the space control unit 205. At the same time, using the cache control unit 206,
A dedicated cache area 207 of the user space B203 is secured at a specific size. As a method of determining the size to be secured in the above processing, there are a method specified by a user when using a system call for activating a space and a method in which a system standard value is determined. A cache block area 208 is reserved in the dedicated cache area 207 of each user space for storing data blocks. An LRU queue 209 is provided in the dedicated cache area 207 to determine the priority of replacing the cache block.
In the present embodiment, the method using the LRU queue is described. However, any other management method that efficiently uses a limited cache area can be realized. The cache control unit 206 registers the area information in the cache area management table 211 using the area registration unit 210 when securing the dedicated cache area 207. Further, in the space end system call, the cache control unit 206 uses the flushing unit 212 to reflect in the auxiliary storage device 213 everything updated in the cache in the dedicated cache area of the space. Then, the cache control unit 20
6 deletes the area information from the cache area management table 211 using the registration deletion unit 214. Finally, the space is ended by the space control unit 205.

【0013】キャッシュ領域管理テーブル211の構造
を図3に示す。キャッシュ領域管理テーブルは、アドレ
ス空間識別子301、専用キャッシュ領域の開始アドレ
ス302、専用キャッシュ領域の領域サイズ303、専
用キャッシュ領域のLRUキューを指すポインタ304
から構成され、空間識別子301で示すユーザ空間に確
保したキャッシュ領域に関する情報を記憶する。エント
リの一つはシステム空間内の共用キャッシュ領域に関す
るもので、他のエントリはユーザ空間の専用キャッシュ
領域に関するものである。この場合、共用キャッシュ領
域に関するエントリにおいては、図3における専用キャ
ッシュ領域の開始アドレスは共用キャッシュ領域の開始
アドレスになり、また、専用キャッシュ領域サイズは共
用キャッシュ領域サイズになる。
FIG. 3 shows the structure of the cache area management table 211. The cache area management table includes an address space identifier 301, a start address 302 of the dedicated cache area, an area size 303 of the dedicated cache area, and a pointer 304 indicating the LRU queue of the dedicated cache area.
And stores information on a cache area secured in the user space indicated by the space identifier 301. One of the entries relates to a shared cache area in the system space, and the other entry relates to a dedicated cache area in the user space. In this case, in the entry relating to the shared cache area, the start address of the dedicated cache area in FIG. 3 is the start address of the shared cache area, and the size of the dedicated cache area is the size of the shared cache area.

【0014】図4は入出力処理に関連する機能を説明す
るための図である。ユーザ空間B401のアプリケーシ
ョンプログラム402は、補助記憶装置403に対して
入出力を行うために入出力システムコール404を呼
ぶ。入出力システムコール404はキャッシュ制御部4
05の検索手段406を用いて要求されたブロックがど
こにキャッシュされているかを調べる。ここで検索手段
406はキャッシュ制御部405の持つキャッシュブロ
ック管理テーブル407に対して高速に検索を行う。
FIG. 4 is a diagram for explaining functions related to input / output processing. The application program 402 in the user space B401 calls an input / output system call 404 to perform input / output with respect to the auxiliary storage device 403. The input / output system call 404 is the cache control unit 4
The search unit 406 of step 05 is used to check where the requested block is cached. Here, the search unit 406 searches the cache block management table 407 of the cache control unit 405 at high speed.

【0015】キャッシュブロック管理テーブル407の
エントリは図5に示すように、装置番号501、物理ブ
ロックアドレス502、アドレス空間識別子503、キ
ャッシュブロックアドレス504から構成される。この
内、装置番号501と物理ブロックアドレス502はテ
ーブルの検索キーとなる情報で、検索手段406はこの
2つの情報を指定してエントリを特定する。
As shown in FIG. 5, the entries of the cache block management table 407 are composed of a device number 501, a physical block address 502, an address space identifier 503, and a cache block address 504. Among them, the device number 501 and the physical block address 502 are information serving as search keys for the table, and the search means 406 specifies these two pieces of information to specify an entry.

【0016】検索手段406の比較的高速な実施方法に
ハッシュを用いた方法がある。本実施例の場合、上記2
つの情報を入力とするハッシュ関数を用意し、その値に
よりキャッシュブロック管理テーブルのエントリが格納
されているアドレスを得る。上記検索処理でキャッシュ
されていないと判断されると、キャッシュ制御部405
は、まず領域選択手段408を用いてキャッシュすべき
領域として専用キャッシュ領域411か共用キャッシュ
領域412のいずれかを選択する。
There is a relatively high-speed implementation method of the search means 406 using a hash. In the case of this embodiment, the above 2
A hash function having two pieces of information as input is prepared, and an address where an entry of the cache block management table is stored is obtained based on the value. If it is determined in the above search process that the data is not cached, the cache control unit 405
First selects either the dedicated cache area 411 or the shared cache area 412 as an area to be cached using the area selection means 408.

【0017】選択された領域のLRUキュー413に基
づいて決定したキャッシュブロックに対し、置き換え手
段409を用いてデータブロックをキャッシュする。本
実施例ではLRUキューを各空間毎に所有するためLR
Uキューのエントリは図6のような構造を持つ。前後の
エントリを指すポインタ(601、602)および、キ
ャッシュブロックのアドレス情報603に加えて、キャ
ッシュブロック管理テーブルのエントリを指すポインタ
604を持つ。
The data block is cached using the replacement means 409 for the cache block determined based on the LRU queue 413 in the selected area. In this embodiment, since the LRU queue is owned for each space, LR
The entry of the U queue has a structure as shown in FIG. In addition to pointers (601 and 602) indicating previous and next entries and address information 603 of the cache block, the pointer has a pointer 604 indicating an entry of the cache block management table.

【0018】置き換え手段は上記ポインタを利用するこ
とで、古いキャッシュブロックが置き換えられたことを
キャッシュブロック管理テーブルに反映する。データブ
ロックがキャッシュされると、キャッシュ制御部は入出
力手段414を用いて入出力処理を行う。
The replacement means reflects the replacement of the old cache block in the cache block management table by using the pointer. When the data block is cached, the cache control unit performs input / output processing using the input / output unit 414.

【0019】検索処理でキャッシュがユーザ空間Aの専
用キャッシュ領域415に既にキャッシュされているこ
とが分かった場合には、キャッシュ制御部はコピー手段
410を用いて共用キャッシュ領域412にキャッシュ
ブロックをコピーする。本実施例では、キャッシュ制御
部は特権タスク制御部416の機能を用いて、異なる空
間のアドレスに対してアクセスするための特権命令が使
用可能な処理実行手段(以降特権タスクと称する)を起
動することでコピー手段410を実現する。
If it is found by the search process that the cache is already cached in the dedicated cache area 415 of the user space A, the cache control unit copies the cache block to the shared cache area 412 by using the copy means 410. . In this embodiment, the cache control unit uses the function of the privileged task control unit 416 to activate a processing execution unit (hereinafter, referred to as a privileged task) that can use a privileged instruction for accessing an address in a different space. Thus, the copy unit 410 is realized.

【0020】キャッシュ制御部405の入出力時の処理
の流れを図7に示す。ステップ701で検索手段を用い
た検索処理が行われる。ここでは要求されたデータブロ
ックに対応するキャッシュブロック管理テーブルのエン
トリを検索する。判定部702では、ステップ701の
結果からデータブロックが主記憶に存在するかを判定す
る。キャッシュされていない場合には、ディスクブロッ
クをキャッシュする必要があるが、共有されることが分
かっている場合にはあらかじめ共用キャッシュ領域にキ
ャッシュを行うべきである。判定部703では、領域選
択手段を用いて当該データブロックが共有されるべきか
どうかを判断する。
FIG. 7 shows the flow of processing at the time of input / output of the cache control unit 405. In step 701, a search process using a search unit is performed. Here, the entry of the cache block management table corresponding to the requested data block is searched. The determination unit 702 determines from the result of step 701 whether a data block exists in main storage. If it is not cached, it is necessary to cache the disk block, but if it is known that the disk block is shared, it should be cached in the shared cache area in advance. The determination unit 703 determines whether the data block should be shared using the area selection unit.

【0021】あるデータブロックが共有されるかどうか
は、ファイルに依存する場合が多いため、本実施例にお
けるキャッシュ領域選択手段408は、データブロック
の属するファイルにあらかじめ設定しておくフラグによ
り共有されるべきかの判定を行う。ファイルにフラグを
設定する方法には、ユーザによって明示的に指定する方
法とそうでない方法があり、ユーザが指定する方法では
システムコールの拡張を要する。システムコールの拡張
を行わない領域選択手段の実現方法として、ファイルの
種類によって共有すべきかどうかを判断する方法があ
る。例えば、ファイルの検索に用いるディレクトリ情報
をファイルと同様に扱い、さらにディレクトリが階層構
造を持つようなシステムを考える。このようなシステム
に適用する場合、上位に位置するディレクトリはアクセ
スの共有が発生しやすいためあらかじめ共用領域にキャ
ッシュを行うようにすべきである。またファイルが共有
されたときに、それが共有されたことを履歴情報として
保存しておき、その情報に基づいて共有すべきかの判断
を行うことでも実現可能である。
Whether or not a certain data block is shared often depends on the file. Therefore, the cache area selecting means 408 in this embodiment is shared by a flag which is set in advance for the file to which the data block belongs. Determine if it should. There are two ways to set a flag in a file: one is to explicitly specify the flag by the user, and the other is not. The method specified by the user requires an extension of the system call. As a method of realizing the area selecting means that does not extend the system call, there is a method of determining whether or not the file should be shared depending on the type of the file. For example, consider a system in which directory information used for searching for a file is handled in the same way as a file, and the directory has a hierarchical structure. When the system is applied to such a system, the directory located at a higher level is likely to share access, so that it should be cached in a shared area in advance. Further, when a file is shared, the fact that the file has been shared is stored as history information, and it can be realized by determining whether to share the file based on the information.

【0022】判定部703の判定に従って、704およ
び705で置き換え手段を用いて、領域選択手段で選択
した領域にキャッシュする。ステップ706でキャッシ
ュブロック管理テーブルのエントリを追加して、エント
リを排他ロックする。ここでの排他ロックは、自分がロ
ックを確保している間は、ロックを確保しようとする他
の処理は待ち状態とし、ロックの確保に失敗した場合に
ロックを保持している処理がロックを解除するまで処理
を待ち状態とする。ロックが確保されると、ステップ7
07で入出力手段を用いて当該キャッシュブロックに入
出力処理を行う。最後にステップ708でエントリのロ
ックを解除して処理を終了する。
In accordance with the judgment of the judging unit 703, cache is performed in the area selected by the area selecting means by using the replacing means in 704 and 705. In step 706, an entry in the cache block management table is added, and the entry is exclusively locked. Exclusive lock here means that while you own the lock, other processes that try to acquire the lock wait, and if the lock fails, the process that holds the lock releases the lock. The process is in a waiting state until it is released. When the lock is secured, step 7
At 07, input / output processing is performed on the cache block using the input / output means. Finally, in step 708, the entry is unlocked, and the process ends.

【0023】判定部702で、要求されたデータブロッ
クが既にキャッシュされていた場合にキャッシュ制御部
が行う処理を図8に示す。まず、ステップ801では、
ステップ701で検索手段を用いて得られたキャッシュ
ブロック管理テーブルのエントリを排他ロックする。判
定部802は、キャッシュされている空間が要求元アプ
リケーションを実行するタスクからアクセス可能な空間
であるか判定する。ここで、アクセス可能な空間とは、
すなわち要求元自身の空間の専用キャッシュ領域あるい
はシステム空間の共用キャッシュ領域のいずれかであ
り、これらの空間以外の空間はアクセスできない空間で
ある。アクセス可能な領域であれば、ステップ707で
そのまま当該キャッシュブロックに入出力処理を行い、
ステップ708でエントリのロックを解除する。アクセ
ス可能な領域でなければ、ステップ803でコピー手段
を用いて共用キャッシュ領域にコピーを行った後、ステ
ップ707で共有されたキャッシュブロックに入出力処
理を行い、ステップ708でエントリのロックを解除す
る。上記コピー処理では、キャッシュブロックのコピー
を要求する側のアプリケーション自身はアドレス空間が
異なるためコピー処理を直接行うことはできないため、
特権タスクを起動して処理を依頼する方法を取る。
FIG. 8 shows the processing performed by the cache control unit when the requested data block has already been cached by the determination unit 702. First, in step 801,
At step 701, the entry of the cache block management table obtained by using the search means is exclusively locked. The determination unit 802 determines whether the cached space is a space that can be accessed by a task that executes the request source application. Here, the accessible space is
That is, it is either a dedicated cache area in the space of the request source itself or a shared cache area in the system space, and the space other than these spaces is a space that cannot be accessed. If it is an accessible area, input / output processing is directly performed on the cache block in step 707, and
In step 708, the entry is unlocked. If the area is not an accessible area, copying is performed to the shared cache area using the copying means in step 803, input / output processing is performed on the shared cache block in step 707, and the entry lock is released in step 708. . In the above copy processing, since the application itself requesting the copy of the cache block cannot perform the copy processing directly because the address space is different,
Start the privileged task and request processing.

【0024】図9は、キャッシュ制御部が特権タスクを
起動する部分の処理の流れを示している。ステップ90
1で特権タスクを起動した後、ステップ902でタイマ
を起動してから特権タスクからの応答受信を待つ90
3。キャッシュ制御部の処理は特権タスクからの応答が
あるか、あるいはタイマからの割り込み904によって
待ち状態を解除して処理を再開する。判定部905で、
共用キャッシュ領域に正しくコピーされたことが確認で
きた場合は、ステップ906でキャッシュブロックに対
して入出力処理を行う。タイマ割り込み904が発生し
た場合には、判定部905で、正しくコピーされていな
いと判定される可能性がある。この場合特権タスクが異
常終了した可能性があるため、ステップ907で置き換
え手段を用いて自ら共用キャッシュ領域にディスクブロ
ックを読み込み、キャッシュを行い、ステップ906で
入出力処理をする。
FIG. 9 shows the flow of processing of the part where the cache control unit starts the privileged task. Step 90
After activating the privileged task in step 1, the timer is activated in step 902 and then waiting for a response from the privileged task 90.
3. The process of the cache control unit resumes the process by releasing the wait state by the response from the privileged task or by the interruption 904 from the timer. In the determination unit 905,
If it is confirmed that the data has been correctly copied to the shared cache area, input / output processing is performed on the cache block in step 906. When the timer interrupt 904 occurs, the determination unit 905 may determine that the copy is not correct. In this case, since the privileged task may have terminated abnormally, the disk block is read into the shared cache area by itself using the replacing means in step 907, cached, and input / output processing is performed in step 906.

【0025】コピー手段の実施例として、特権タスクで
行う処理の流れを図10に示す。ステップ1001で共
用キャッシュ領域にコピーを行い、ステップ1002で
キャッシュブロック管理テーブルの空間識別子とキャッ
シュアドレスを共用キャッシュ領域のものに変更する。
ステップ1003でコピー元キャッシュブロックのLR
UキューエントリをLRUキューの最後尾に移動し、置
き換えの候補とする。最後にステップ1004で要求元
タスクに正常にコピーが終了したことを通知する。
FIG. 10 shows a flow of processing performed by a privileged task as an embodiment of the copying means. In step 1001, copying is performed to the shared cache area, and in step 1002, the space identifier and the cache address in the cache block management table are changed to those of the shared cache area.
In step 1003, the LR of the copy source cache block
The U queue entry is moved to the end of the LRU queue and is set as a replacement candidate. Finally, in step 1004, the requesting task is notified that copying has been completed normally.

【0026】図11に置き換え手段が行う処理の流れを
説明する。ステップ1101でLRUキューの最後尾の
エントリを置き換え対象として選択し、ステップ110
2で置き換え対象のエントリに対応するキャッシュブロ
ック管理テーブルのエントリを削除する。置き換え対象
の解放処理が終了すると、ステップ1103でデータブ
ロックをキャッシュブロックアドレスに読み込み、ステ
ップ1104で読み込んだデータブロックに対応するキ
ャッシュブロック管理テーブルのエントリを追加する。
ステップ1105でLRUエントリを更新し、LRUキ
ューの先頭に移動する。
FIG. 11 illustrates the flow of processing performed by the replacing means. In step 1101, the last entry of the LRU queue is selected as a replacement target.
In step 2, the entry in the cache block management table corresponding to the entry to be replaced is deleted. When the replacement target release processing ends, the data block is read into the cache block address in step 1103, and an entry in the cache block management table corresponding to the read data block is added in step 1104.
In step 1105, the LRU entry is updated and moved to the head of the LRU queue.

【0027】以上説明してきたテーブル構造および処理
手段を実現することによってユーザ空間にキャッシュを
行うことが可能となり、共有キャッシュ領域への影響が
軽減される。また、これにより、ユーザは他のアプリケ
ーションプログラムのディスクアクセス性能に影響を及
ぼさないアプリケーションプログラムを作成することが
できる。また、同じデータブロックに対してアクセスが
あった場合に、複数のアプリケーションからデータを共
有することが可能となり、キャッシュブロックにアクセ
スした結果を正しく補助記憶装置に反映させることがで
きる。
By realizing the above-described table structure and processing means, caching can be performed in the user space, and the influence on the shared cache area is reduced. This also allows the user to create an application program that does not affect the disk access performance of other application programs. Further, when the same data block is accessed, data can be shared from a plurality of applications, and the result of accessing the cache block can be correctly reflected on the auxiliary storage device.

【0028】図4におけるコピー手段410の実施例と
して、空間間アクセス機能を持つシステムにおいては、
特権タスク制御部416の代わりに当該機能を用いて実
現することができる。その場合図9および図10の処理
を一つの処理として簡略化できるため、コピー手段41
0の性能を向上させることが可能となる。本発明の第2
の実施例であるキャッシュ制御方法の実施例を以下に説
明する。本実施例でのキャッシュブロック管理テーブル
のエントリは図12に示すような情報で構成される。装
置番号1201および物理ブロックアドレス1202は
請求項1の実施例のものと同様であり、検索のキーとな
る情報である。共用キャッシュブロックアドレス120
3は、エントリの示すデータブロックが共用キャッシュ
領域にキャッシュされている場合にそのアドレスを記憶
する。共用キャッシュ領域にキャッシュされていない場
合の値は0である。実施例2において、一つのキャッシ
ュブロックは複数のユーザ空間が保持する専用キャッシ
ュ領域に対してキャッシュされうるので、キャッシュブ
ロック管理テーブルのエントリには複数のキャッシュ場
所が関連付けられる。そのためにエントリは専用キャッ
シュ領域のアドレスリストへのポインタ1204を持
つ。上記アドレスリストの要素構造は図13に示すよう
に、アドレス空間識別子1301とキャッシュブロック
アドレス1302の情報を持ち、さらに双方向のリスト
を構成するためのポインタ(1303、1304)を持
つ。
As an embodiment of the copying means 410 in FIG. 4, in a system having an inter-space access function,
The function can be realized by using the function in place of the privileged task control unit 416. In this case, since the processing of FIGS. 9 and 10 can be simplified as one processing,
0 can be improved. Second embodiment of the present invention
An embodiment of the cache control method according to the embodiment will be described below. The entry of the cache block management table in the present embodiment is configured with information as shown in FIG. The device number 1201 and the physical block address 1202 are the same as those in the embodiment of the first aspect, and are information serving as search keys. Shared cache block address 120
No. 3 stores the address of the data block indicated by the entry when the data block is cached in the shared cache area. The value is 0 when not cached in the shared cache area. In the second embodiment, since one cache block can be cached in a dedicated cache area held by a plurality of user spaces, a plurality of cache locations are associated with entries in the cache block management table. For this purpose, the entry has a pointer 1204 to the address list of the dedicated cache area. As shown in FIG. 13, the element structure of the address list has information of an address space identifier 1301 and a cache block address 1302, and further has pointers (1303, 1304) for forming a bidirectional list.

【0029】本実施例における入出力処理は、実施例1
における入出力処理でキャッシュが既に存在していた場
合の処理を変更する必要がある。上記処理は図8で示さ
れるが、その部分を図14で示す処理に置き換えること
で実現できる。判定部1401で実行している処理の要
求が書き込み要求であるかを判定する。書き込み要求の
場合はステップ1402でキャッシュブロック管理テー
ブルのエントリを排他ロックし、読み込み要求の場合に
はステップ1403でエントリを共有ロックする。ここ
で、共有ロックを行う処理は別処理により排他ロックが
確保されている場合は待ち状態となるが、別処理による
共有ロックに対しては同時に共有ロックを確保すること
ができる。本実施例では複数の入力処理を同時に行うこ
とが可能であることを示すため共有ロックを用いている
が、共有ロックを提供していないシステムでは排他ロッ
クだけでも実現可能である。
The input / output processing in this embodiment is the same as that in the first embodiment.
It is necessary to change the processing when the cache already exists in the input / output processing in. Although the above processing is shown in FIG. 8, it can be realized by replacing that part with the processing shown in FIG. The determination unit 1401 determines whether the request for the process being executed is a write request. In the case of a write request, the entry in the cache block management table is exclusively locked in step 1402, and in the case of a read request, the entry is shared locked in step 1403. Here, the process for performing the shared lock is in a wait state when the exclusive lock is secured by another process, but the shared lock can be secured for the shared lock by the separate process at the same time. In this embodiment, a shared lock is used to indicate that a plurality of input processes can be performed simultaneously. However, in a system that does not provide a shared lock, it is possible to realize only an exclusive lock.

【0030】判定部1404では、共用キャッシュ領域
にキャッシュが存在するか、即ちエントリの共用キャッ
シュブロックアドレスが0でないかを判定する。存在す
れば共用キャッシュ領域のキャッシュブロックに対して
入出力処理を行いロックを解除し、処理を終了する。
The determination unit 1404 determines whether a cache exists in the shared cache area, that is, whether the shared cache block address of the entry is not 0. If it exists, the input / output processing is performed on the cache block in the shared cache area to release the lock, and the processing ends.

【0031】共有されていない場合、判定部1405で
自分の空間にキャッシュされていないかを判定する。自
分の空間にキャッシュされていた場合、判定部1406
で他の空間にもキャッシュされていないかを判定する。
判定部1406で他の空間に存在しない場合、すなわち
自分の空間にのみキャッシュされている場合には、当該
キャッシュブロックに入出力処理を行い、ロックを解除
して終了する。判定部1406で他の空間にも存在した
場合、ステップ1407で自分の空間に存在するキャッ
シュブロックを共用キャッシュ領域にコピーする。この
ときのコピー処理は、コピー元もコピー先もアクセス可
能であるため特権タスクを起動する必要はない。
If they are not shared, the judging unit 1405 judges whether they are cached in their own space. If cached in its own space, the determination unit 1406
To determine whether or not it is cached in another space.
If the determination unit 1406 does not exist in another space, that is, if it is cached only in its own space, the input / output processing is performed on the cache block, the lock is released, and the processing is terminated. If the determination unit 1406 determines that the cache block exists in another space, the cache block existing in the own space is copied to the shared cache area in step 1407. In the copy processing at this time, since both the copy source and the copy destination are accessible, there is no need to activate the privileged task.

【0032】判定部1405で自空間に存在しなかった
場合、判定部1408で要求が書き込み要求であるか読
み込み要求であるかを判定する。書き込み要求であれ
ば、ステップ1409で共用キャッシュ領域にコピー処
理を行う。このときのコピー処理では図8のステップ8
03と同様に特権タスクを用いてコピーを行う。判定部
1408で読み込み要求の判定の場合、ステップ141
0で自空間の専用キャッシュ領域にコピー処理を行う。
このコピー処理もステップ1407と同様に特権タスク
を用いて行う。
If the request does not exist in the own space, the judgment unit 1405 judges whether the request is a write request or a read request. If it is a write request, a copy process is performed in the shared cache area in step 1409. In the copy processing at this time, step 8 in FIG.
Copying is performed using a privileged task in the same manner as in step 03. If the determination unit 1408 determines a read request, step 141
If 0, the copy processing is performed to the dedicated cache area in the own space.
This copy process is also performed by using a privileged task as in step 1407.

【0033】本実施例におけるコピー手段を実現するた
めに、実施例1で説明した特権タスクを用いた方法につ
いて、図9に示すキャッシュ制御部本体が行う処理手順
を変更したものを図15に示す。ステップ1501で特
権タスクを起動する際にコピー先の領域を指定するよう
に変更し、判定部1505では指定したコピー先に対し
て正しくコピーされたかを判定する。この場合特権タス
クが異常終了した可能性があるため、ステップ1507
で置き換え手段を用いて自ら共用キャッシュ領域にディ
スクブロックを読み込み、キャッシュを行い、ステップ
1506で入出力処理をする。
FIG. 15 shows a modification of the procedure performed by the cache control unit shown in FIG. 9 in the method using the privileged task described in the first embodiment in order to realize the copying means in this embodiment. . In step 1501, a change is made so as to specify the copy destination area when the privileged task is activated, and the determination unit 1505 determines whether the copy has been correctly performed on the specified copy destination. In this case, there is a possibility that the privileged task has terminated abnormally.
In step 1506, the disk block is read into the shared cache area by itself using the replacement means, cached, and input / output processing is performed in step 1506.

【0034】また本実施例のために図10の特権タスク
側の処理手順を変更したものを図16に示す。特権タス
クはステップ1601で起動時に指定されたコピー先の
領域に対してコピーを行い、判定部1602で指定され
た領域を判定する。指定された領域が共用領域であれ
ば、ステップ1603でキャッシュブロック管理テーブ
ルのエントリに共用キャッシュブロックアドレスを設定
する。指定された領域が専用領域であれば、ステップ1
604でキャッシュブロック管理テーブルのエントリの
専用キャッシュブロックアドレスリストに追加を行う。
以上の処理を終えた後、ステップ1605で要求元タス
クに処理がコピー処理が終了したことを通知する。以上
の修正を加えることで本実施例のコピー手段は実現され
る。
FIG. 16 shows a modification of the processing procedure on the privileged task side in FIG. 10 for this embodiment. The privileged task copies to the copy destination area specified at the time of startup in step 1601, and the determination unit 1602 determines the specified area. If the designated area is a shared area, a shared cache block address is set in the entry of the cache block management table in step 1603. If the designated area is a dedicated area, step 1
At 604, an entry in the cache block management table is added to the dedicated cache block address list.
After the above processing is completed, in step 1605, the requesting task is notified that the processing has been completed. By making the above modifications, the copy means of this embodiment is realized.

【0035】図17に本実施例における置き換え手段で
行う処理の流れを示す。まずステップ1701でLRU
キューの最後のエントリを選択し、以降の処理において
当該LRUエントリに対応するキャッシュブロック管理
テーブルのエントリを削除する。判定部1702で置き
換えの発生した領域が共用領域か専用領域かを判定す
る。共用キャッシュ領域であればステップ1703でキ
ャッシュブロック管理テーブルのエントリに持つ全ての
専用キャッシュ領域のLRUエントリを無効エントリに
する。ここで無効エントリとは、対応するキャッシュブ
ロック管理テーブルのエントリが存在しないLRUキュ
ーエントリのことであり、キャッシュブロック管理テー
ブルエントリへのポインタに0を代入することで無効エ
ントリであることを示す。当該キャッシュブロックを保
持するすべての専用キャッシュ領域についてLRUエン
トリを無効にしたら、ステップ1704でキャッシュブ
ロック管理テーブルのエントリを削除する。判定部17
02での判定が専用キャッシュ領域の場合には、判定部
1705でLRUエントリが無効であるかを判定し、無
効でなければステップ1706で対応するキャッシュブ
ロック管理テーブルのエントリから当該専用キャッシュ
領域に関するアドレス情報を削除する。
FIG. 17 shows a flow of processing performed by the replacing means in this embodiment. First, at step 1701, LRU
The last entry in the queue is selected, and in the subsequent processing, the entry in the cache block management table corresponding to the LRU entry is deleted. The determination unit 1702 determines whether the replaced area is a shared area or a dedicated area. If it is a shared cache area, in step 1703, the LRU entries of all the dedicated cache areas included in the entries of the cache block management table are invalidated. Here, an invalid entry is an LRU queue entry for which there is no corresponding cache block management table entry, and indicates that the entry is invalid by substituting 0 into a pointer to the cache block management table entry. When the LRU entry is invalidated for all the dedicated cache areas holding the cache block, the entry in the cache block management table is deleted in step 1704. Judgment unit 17
If the determination at 02 is a dedicated cache area, the determination unit 1705 determines whether the LRU entry is invalid. If not, the address of the dedicated cache area is determined from the entry of the corresponding cache block management table in step 1706 if not invalid. Delete information.

【0036】上記処理で置き換え対象のキャッシュブロ
ックの解放が完了すると、ステップ1707で当該キャ
ッシュブロックにデータブロックを読み込み、ステップ
1708でキャッシュブロック管理テーブルのエントリ
を追加し、ステップ1709でLRUエントリの情報を
更新して、キューの先頭に移動する。
When the release of the cache block to be replaced is completed in the above processing, a data block is read into the cache block in step 1707, an entry in the cache block management table is added in step 1708, and the information of the LRU entry is added in step 1709. Update and move to head of queue.

【0037】本実施例ではデータブロックのキャッシュ
に共用キャッシュ領域を用いることをより制限するため
実施例1に比べて共有されるべきデータの置き換えが発
生し難い。以上に説明してきたように実施例2のキャッ
シュ制御部を実現することによって、共用領域に持つキ
ャッシュに対する影響をさらに減らすことが可能とな
る。特に読み込み要求に比べて書き込み要求がほとんど
発生しないようなシステムでは有効な実施例である。
In this embodiment, replacement of data to be shared is less likely to occur than in the first embodiment in order to further restrict the use of a shared cache area for caching data blocks. As described above, by implementing the cache control unit of the second embodiment, it is possible to further reduce the influence on the cache in the shared area. This embodiment is particularly effective in a system in which a write request hardly occurs as compared with a read request.

【0038】[0038]

【発明の効果】以上説明したように本発明によれば、補
助記憶装置へのアクセス性能を向上するためにキャッシ
ュを持つシステムにおいて、共有が発生しない場合に
は、他のアプリケーションプログラムが利用する共用領
域のキャッシュの追い出しを防ぐことができる。また、
同じデータブロックを複数の処理手段から共有すること
が可能になる。
As described above, according to the present invention, in a system having a cache for improving the access performance to the auxiliary storage device, when sharing does not occur, the sharing used by another application program is not required. Eviction of the area cache can be prevented. Also,
The same data block can be shared by a plurality of processing units.

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

【図1】計算機システムにおける実施例のキャッシュ制
御に係わる構成を示す図である。
FIG. 1 is a diagram illustrating a configuration related to cache control of an embodiment in a computer system.

【図2】ユーザ空間を生成する処理を説明するための図
である。
FIG. 2 is a diagram illustrating a process of generating a user space.

【図3】キャッシュ領域管理テーブルのエントリの例を
示す図である。
FIG. 3 is a diagram illustrating an example of an entry of a cache area management table.

【図4】入出力処理に関連する機能を説明するための図
である。
FIG. 4 is a diagram for explaining functions related to input / output processing;

【図5】キャッシュブロック管理テーブルのエントリの
例を示す図である。
FIG. 5 is a diagram illustrating an example of an entry of a cache block management table.

【図6】各キャッシュ領域に保持するLRUキューのエ
ントリの例を示す図である。
FIG. 6 is a diagram illustrating an example of an entry of an LRU queue held in each cache area.

【図7】入出力処理においてキャッシュ制御部が行う処
理のフローチャートを示す図である。
FIG. 7 is a diagram illustrating a flowchart of processing performed by a cache control unit in input / output processing.

【図8】図7において要求のあったデータブロックが既
に主記憶内に存在する場合の部分処理のフローチャート
を示す図である。
8 is a diagram showing a flowchart of a partial process when the data block requested in FIG. 7 already exists in the main storage.

【図9】コピー手段を実現するために要求側タスクで行
われる部分処理のフローチャートを示す図である。
FIG. 9 is a diagram showing a flowchart of a partial process performed by a requesting task in order to realize a copy unit.

【図10】コピー手段を実現するために特権タスクで行
われる部分処理のフローチャートを示す図である。
FIG. 10 is a diagram showing a flowchart of a partial process performed by a privileged task to realize a copy unit.

【図11】キャッシュ制御部内に設置する置き換え手段
の行う処理のフローチャートを示す図である。
FIG. 11 is a diagram illustrating a flowchart of a process performed by a replacement unit provided in the cache control unit.

【図12】実施例2のキャッシュ制御部内に設置するキ
ャッシュブロック管理テーブルのエントリの例を示す図
である。
FIG. 12 is a diagram illustrating an example of an entry of a cache block management table installed in a cache control unit according to the second embodiment.

【図13】図12に示すキャッシュブロック管理テーブ
ルのエントリに持つキャッシュブロックアドレスリスト
の例を示す図である。
13 is a diagram illustrating an example of a cache block address list included in an entry of the cache block management table illustrated in FIG. 12;

【図14】実施例2のキャッシュ制御部が行う処理で、
要求のあったデータブロックが既に主記憶内に存在する
場合の部分処理のフローチャートを示す図である。
FIG. 14 illustrates processing performed by a cache control unit according to the second embodiment;
FIG. 9 is a diagram showing a flowchart of a partial process when a requested data block already exists in main storage.

【図15】実施例2のキャッシュ制御部が行う処理で、
コピー手段を実現するために要求側タスクで行われる部
分処理のフローチャートを示す図である。
FIG. 15 illustrates processing performed by the cache control unit according to the second embodiment;
FIG. 9 is a diagram showing a flowchart of a partial process performed by a requesting task to realize a copy unit.

【図16】実施例2のキャッシュ制御部において、コピ
ー手段を実現するために特権タスクで行われる部分処理
のフローチャートを示す図である。
FIG. 16 is a diagram illustrating a flowchart of a partial process performed by a privileged task to realize a copy unit in the cache control unit according to the second embodiment.

【図17】実施例2のキャッシュ制御部内に設置される
置き換え手段の行う処理のフローチャートを示す図であ
る。
FIG. 17 is a diagram illustrating a flowchart of a process performed by a replacement unit provided in the cache control unit according to the second embodiment.

【図18】従来のキャッシュ制御部を備えた計算機シス
テムの構成を示す図である。
FIG. 18 is a diagram illustrating a configuration of a computer system including a conventional cache control unit.

【符号の説明】[Explanation of symbols]

101 主記憶装置 102、215、403 補助記憶装置 103 システム空間 104、204、402 アプリケーションプログラム 105、201、203、401 ユーザ空間 106 システムコール 107、206、405 キャッシュ制御部 108、412 共用キャッシュ領域 109、205 空間制御部 110 タスク制御部 111、211 キャッシュ領域管理テーブル 112、407 キャッシュブロック管理テーブル 113、406 検索手段 114、410 コピー手段 115、207、411、415 専用キャッシュ領域 202 空間起動/終了システムコール 208 キャッシュブロック領域 209、413 LRUキュー 210 領域登録手段 212 掃き出し手段 214 登録削除手段 404 入出力システムコール 408 領域選択手段 409 置き換え手段 414 入出力手段 416 特権タスク制御部 101 Main storage device 102, 215, 403 Auxiliary storage device 103 System space 104, 204, 402 Application program 105, 201, 203, 401 User space 106 System call 107, 206, 405 Cache control unit 108, 412 Shared cache area 109, 205 Space control unit 110 Task control unit 111, 211 Cache area management table 112, 407 Cache block management table 113, 406 Search unit 114, 410 Copy unit 115, 207, 411, 415 Dedicated cache area 202 Space start / end system call 208 Cache block area 209, 413 LRU queue 210 Area registration means 212 Sweeping means 214 Registration deletion means 404 Input / output system call 4 8 area selection means 409 replaces unit 414 output unit 416 privileged task control unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 飯田 恒雄 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア事業部内 (72)発明者 坂上 弘 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア事業部内 (72)発明者 福岡 博 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア事業部内 Fターム(参考) 5B005 JJ11 JJ13 JJ23 KK22 LL03 LL04 MM03 MM05 UU32 5B082 FA12  ──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Tsuneo Iida 5030 Totsukacho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture Inside the Software Division, Hitachi, Ltd. (72) Inventor Hiroshi Sakagami 5030 Totsukacho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture Hitachi, Ltd. Software Division (72) Inventor Hiroshi Fukuoka 5030 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture F-term in Hitachi Software Division Software Division (Reference) 5B005 JJ11 JJ13 JJ23 KK22 LL03 LL04 MM03 MM05 UU32 5B082 FA12

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 補助記憶装置を備え、主記憶装置をオペ
レーティングシステムの動作するシステム空間とアプリ
ケーションプログラムの動作するユーザ空間に区別して
使用する計算機システムにおけるキャッシュ制御方法で
あって、 前記ユーザ空間にアプリケーションプログラムを実行す
るための専用キャッシュ領域を確保し、前記システム空
間に共用キャッシュ領域を確保し、 アプリケーションプログラムが前記補助記憶装置にアク
セスしたとき、該補助記憶装置のデータを前記専用キャ
ッシュ領域に一時的に格納し、 該一時的に格納した専用キャッシュ領域のデータと同じ
データに対して他のアプリケーションプログラムからア
クセス要求が発生した場合、該一時的に格納した専用キ
ャッシュ領域のデータを前記共用キャッシュ領域にコピ
ーすることを特徴とするキャッシュ制御方法。
1. A cache control method in a computer system comprising an auxiliary storage device, wherein a main storage device is used separately in a system space in which an operating system operates and a user space in which an application program operates, wherein an application is stored in the user space. A dedicated cache area for executing a program is secured, a shared cache area is secured in the system space, and when an application program accesses the auxiliary storage device, data in the auxiliary storage device is temporarily stored in the dedicated cache area. When an access request is issued from another application program to the same data as the temporarily stored dedicated cache area data, the temporarily stored dedicated cache area data is stored in the shared cache area. Ko A cache control method characterized by:
【請求項2】 請求項1記載のキャッシュ制御方法にお
いて、 前記一時的に格納した専用キャッシュ領域のデータと同
じデータに対して他の複数のアプリケーションプログラ
ムからアクセス要求が発生し、該アクセス要求の全てが
読み込み要求である場合、該一時的に格納した専用キャ
ッシュ領域のデータを該他の各アプリケーションプログ
ラムを実行するための専用キャッシュ領域のそれぞれに
コピーすることを特徴とするキャッシュ制御方法。
2. The cache control method according to claim 1, wherein an access request is issued from a plurality of application programs to the same data as the temporarily stored data in the dedicated cache area, and all of the access requests are generated. Is a read request, the data of the temporarily stored dedicated cache area is copied to each of the dedicated cache areas for executing the other application programs.
【請求項3】 補助記憶装置を備え、主記憶装置をオペ
レーティングシステムの動作するシステム空間とアプリ
ケーションプログラムの動作するユーザ空間に区別して
使用する計算機システムにおいて、 前記ユーザ空間にアプリケーションプログラムを実行す
るための専用キャッシュ領域を確保する手段と、前記シ
ステム空間に共用キャッシュ領域を確保する手段と、 アプリケーションプログラムが前記補助記憶装置にアク
セスしたとき、該補助記憶装置から読み出したデータを
前記専用キャッシュ領域に一時的に格納する手段と、、 該一時的に格納した専用キャッシュ領域のデータと同じ
データに対して他のアプリケーションプログラムからア
クセス要求が発生した場合、該一時的に格納した専用キ
ャッシュ領域のデータを前記共用キャッシュ領域にコピ
ーする手段を有することを特徴とする計算機システム。
3. A computer system comprising an auxiliary storage device, wherein a main storage device is used separately from a system space in which an operating system operates and a user space in which an application program operates. Means for securing a dedicated cache area, means for securing a shared cache area in the system space, and when an application program accesses the auxiliary storage device, data read from the auxiliary storage device is temporarily stored in the dedicated cache area. Means for storing, when an access request is issued from another application program to the same data as the temporarily stored data of the dedicated cache area, the temporarily stored data of the dedicated cache area is shared. Cap A computer system having means for copying to a storage area.
【請求項4】 請求項3記載の計算機システムにおい
て、 前記一時的に格納した専用キャッシュ領域のデータと同
じデータに対して他の複数のアプリケーションプログラ
ムからアクセス要求が発生し、該アクセス要求の全てが
読み込み要求である場合、該一時的に格納した専用キャ
ッシュ領域のデータを該他の各アプリケーションプログ
ラムを実行するための専用キャッシュ領域のそれぞれに
コピーする手段を有することを特徴とする計算機システ
ム。
4. The computer system according to claim 3, wherein an access request is issued from another plurality of application programs to the same data as the temporarily stored data in the dedicated cache area, and all of the access requests are generated. In the case of a read request, a computer system having means for copying the temporarily stored data in the dedicated cache area to each of the dedicated cache areas for executing the other application programs.
JP36615899A 1999-12-24 1999-12-24 Cache control method and computer system Pending JP2001184242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP36615899A JP2001184242A (en) 1999-12-24 1999-12-24 Cache control method and computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP36615899A JP2001184242A (en) 1999-12-24 1999-12-24 Cache control method and computer system

Publications (1)

Publication Number Publication Date
JP2001184242A true JP2001184242A (en) 2001-07-06

Family

ID=18486067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP36615899A Pending JP2001184242A (en) 1999-12-24 1999-12-24 Cache control method and computer system

Country Status (1)

Country Link
JP (1) JP2001184242A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005533324A (en) * 2002-07-17 2005-11-04 オラクル・インターナショナル・コーポレイション System and method for caching data for mobile applications
JP2008269636A (en) * 2008-06-03 2008-11-06 Hitachi Ltd Storage subsystem and control method of storage subsystem
JP4865075B1 (en) * 2010-09-30 2012-02-01 株式会社東芝 Computer and computer system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005533324A (en) * 2002-07-17 2005-11-04 オラクル・インターナショナル・コーポレイション System and method for caching data for mobile applications
JP2008269636A (en) * 2008-06-03 2008-11-06 Hitachi Ltd Storage subsystem and control method of storage subsystem
JP4865075B1 (en) * 2010-09-30 2012-02-01 株式会社東芝 Computer and computer system
US8271717B2 (en) 2010-09-30 2012-09-18 Kabushiki Kaisha Toshiba Computing machine with virtual machine monitor

Similar Documents

Publication Publication Date Title
JP2603369B2 (en) How to ensure consistency between common pages in the local cache
JP3880146B2 (en) Page table updating method and apparatus
US5946711A (en) System for locking data in a shared cache
JP4160255B2 (en) Application programming interface that controls the allocation of physical memory in a virtual storage system by an application program
US5414840A (en) Method and system for decreasing recovery time for failed atomic transactions by keeping copies of altered control structures in main memory
US5983324A (en) Data prefetch control method for main storage cache for protecting prefetched data from replacement before utilization thereof
US7337296B2 (en) Managing physical memory in a virtual memory computer
US6636950B1 (en) Computer architecture for shared memory access
US5822562A (en) Method and apparatus for expansion, contraction, and reapportionment of structured external storage structures
US5410697A (en) Concurrency management using version identification of shared data as a supplement to use of locks
JP3399501B2 (en) Explicit coherence using split-phase control
US5239643A (en) Method for reducing disk I/O accesses in a multi-processor clustered type data processing system
US6202132B1 (en) Flexible cache-coherency mechanism
JP2002268933A (en) Cluster system
US5600596A (en) Data access scheme with simplified fast data writing
JP3485598B2 (en) File allocation method, data multiplexing method, and data processing system
EP0319148B1 (en) Method of operating a multi-processor system for the transfer of data between processor units
Murphy Storage organization and management in TENEX
JP2829115B2 (en) File sharing method
Silberschatz et al. Operating systems
JP3485940B2 (en) Virtual storage control device and method
JPH05210584A (en) Digital data processor having improved paging
JP2001184242A (en) Cache control method and computer system
US7107404B2 (en) Method and system for data processing for controlling a cache memory
JP3107094B2 (en) Method and apparatus for shortening shared buffer lock period

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040317