JPH05314010A - System for selecting substitution object data - Google Patents
System for selecting substitution object dataInfo
- Publication number
- JPH05314010A JPH05314010A JP4113585A JP11358592A JPH05314010A JP H05314010 A JPH05314010 A JP H05314010A JP 4113585 A JP4113585 A JP 4113585A JP 11358592 A JP11358592 A JP 11358592A JP H05314010 A JPH05314010 A JP H05314010A
- Authority
- JP
- Japan
- Prior art keywords
- data
- lru
- storage device
- speed storage
- accessed
- 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
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
(57)【要約】
【目的】 LRU(Least Recently U
sed)管理テーブルを複数段に階層化することで、高
速にLRU近似方式を実現し、各LRUテーブル毎に占
有権管理を行なうことで、複数のデータ・アクセス要求
に対する処理を同時行なう。
【構成】 LRUテーブルを複数段に階層化し、各階層
においてLRU近似方式を実行することで、低速記憶装
置との置換処理を行なうデータを決定する手段と、各L
RUテーブル毎に施錠フラグを設け、各LRUテーブル
へのアクセスが終了した時点でそのLRUテーブルの占
有権を放棄する(即ち、LRUテーブルの施錠を解除す
る)手段とを備える。
(57) [Abstract] [Purpose] LRU (Least Recent U)
sed) The LRU approximation method is realized at high speed by hierarchizing the management table in a plurality of stages, and the exclusive right management is performed for each LRU table, whereby the processes for a plurality of data access requests are simultaneously performed. The LRU table is hierarchized in a plurality of stages, and the LRU approximation method is executed in each layer to determine data for replacement processing with a low-speed storage device, and each LRU table.
A lock flag is provided for each RU table, and when the access to each LRU table is completed, the exclusive right of the LRU table is abandoned (that is, the lock of the LRU table is released).
Description
【0001】[0001]
【産業上の利用分野】本発明は、並列計算機システムに
おいて、高速記憶装置と低速記憶装置間のデータの置換
方式に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data replacement system between a high speed storage device and a low speed storage device in a parallel computer system.
【0002】[0002]
【従来の技術】計算機システムなどの情報処理装置で
は、低速記憶装置上のデータの一部を高速記憶装置にコ
ピーして、データの参照をその高速記憶装置に対して行
なうようにして、処理の高速化をはかる方式がある。高
速記憶装置と低速記憶装置には、二次記憶と主記憶、主
記憶とキャッシュ装置などがある。2. Description of the Related Art In an information processing apparatus such as a computer system, a part of data on a low-speed storage device is copied to a high-speed storage device so that the data can be referred to the high-speed storage device. There is a method to increase the speed. The high speed memory device and the low speed memory device include a secondary memory and a main memory, a main memory and a cache device, and the like.
【0003】この高速記憶装置に対するアクセスは、あ
るデータのアクセス要求に対して高速記憶装置内を検索
し、存在すればそのデータにアクセスが行なわれ、存在
しなければ高速記憶装置内のあるデータを低速記憶装置
に書き込み、その位置に低速記憶装置からアクセス要求
のあったデータを高速記憶装置に読み出す。この高速記
憶装置と低速記憶装置間の置換において、高速記憶装置
内のどのデータを低速記憶装置に書き出すかという方式
に、従来から、最も以前に参照されたデータを置換する
LRU(Least Recently Used)方
式がある。To access the high-speed storage device, the high-speed storage device is searched in response to an access request for certain data, and if it exists, the data is accessed. If it does not exist, the certain data in the high-speed storage device is accessed. The data is written in the low-speed storage device, and the data requested to be accessed from the low-speed storage device at that position is read into the high-speed storage device. In this replacement between the high-speed storage device and the low-speed storage device, the method of writing out the data in the high-speed storage device to the low-speed storage device has a conventional method of replacing the most recently referenced data with LRU (Least Recently Used). There is a method.
【0004】LRU方式は正確に実現するのは難しく、
近似方式により代用することが多い。従来、この近似方
式として例えば、前川 守著、岩波講座 ソフトウェア
科学6オペレーティングシステム、岩波書店発行の26
1ページから264ページに示されたものがあった。The LRU system is difficult to realize accurately,
The approximation method is often used instead. Conventionally, as this approximation method, for example, Mamoru Maekawa, Iwanami Course Software Science 6 Operating System, 26 published by Iwanami Shoten
Some were shown on pages 1 to 264.
【0005】図8は、従来のLRU近似方式を示す構成
図であり、1はデータを読み込む要求元プログラム、4
は高速記憶装置、5は低速記憶装置、13はLRUテー
ブルである。なお、LRUテーブル13は、LRU近似
方式を実現するために、データを検索する際に用いるデ
ータ識別子を格納するデータ識別子部22、データが前
回の置換処理から参照されたかを示す1ビットの情報を
格納する参照ビット部19、置換処理時に参照ビット部
19が0であった回数を格納するカウンタ部20から構
成される。また、参照ビット部19及びカウンタ部20
の初期状態は、全て0である。FIG. 8 is a block diagram showing a conventional LRU approximation method, where 1 is a request source program for reading data and 4 is a request source program.
Is a high speed storage device, 5 is a low speed storage device, and 13 is an LRU table. It should be noted that the LRU table 13 stores a data identifier portion 22 that stores a data identifier used when searching for data in order to realize the LRU approximation method, and 1-bit information indicating whether the data is referred to from the previous replacement process. The reference bit unit 19 for storing and the counter unit 20 for storing the number of times the reference bit unit 19 is 0 at the time of replacement processing. Further, the reference bit unit 19 and the counter unit 20
The initial state of is all 0.
【0006】このような構成のシステムにおいては、図
9に示すフローチャートに基づいて、LRU近似方式が
行なわれる。まず、要求元プログラム1に必要なデータ
の読み込み要求が発生すると、ステップ1で読み込みた
いデータを特定するためのデータ識別子(以下参照識別
子という)を基に高速記憶装置4を検索し、該当データ
が高速記憶装置4内に存在すれば当該データを取り出す
と共にステップ2へ進みLRUテーブル13の参照デー
タに対応する参照ビット部をセットし、存在しなければ
ステップ3へ進み置換処理を行なう。ステップ2では、
参照識別子をキーとしてLRUテーブル13を検索し、
該当するエントリの参照ビット部19を1にする。これ
により、検索データに対応する参照ビットのセットが終
了する。ステップ3では、LRUテーブル13の全ての
エントリに対して、参照ビット部19が0ならばカウン
タ部20を1増化し、参照ビット部19が1ならば参照
ビット部19を0にすると共にカウンタ部20を0にす
る。次に、LRUテーブル13内でカウンタ部20の値
が最大のエントリを検索し、検索されたエントリのデー
タ識別子部22の値を取り出し、それを置換対象のデー
タ識別子とし、このエントリを削除し、ステップ4へ進
む。ステップ4では、ステップ3により求められた置換
対象のデータ識別子を基に置換データを高速記憶装置4
から取り出し低速記憶装置5へ書き戻す。次に、参照識
別子を基に低速記憶装置5から検索データを読み出すと
共に、高速記憶装置4へそのデータを書き込み、ステッ
プ5に進み参照データの登録を行なう。ステップ5で
は、データ識別子部22の値を検索識別子、参照ビット
部19の値を0、カウンタ部20の値を0とした新たな
エントリをLRUテーブル13に登録する。In the system having such a configuration, the LRU approximation method is performed based on the flowchart shown in FIG. First, when a request to read the required data is issued to the request source program 1, the high-speed storage device 4 is searched based on the data identifier (hereinafter referred to as a reference identifier) for identifying the data to be read in step 1, and the corresponding data is found. If it exists in the high-speed storage device 4, the data is taken out and the process proceeds to step 2 to set the reference bit portion corresponding to the reference data in the LRU table 13. If it does not exist, the process proceeds to step 3 to perform the replacement process. In step 2,
Search the LRU table 13 using the reference identifier as a key,
The reference bit part 19 of the corresponding entry is set to 1. This completes the setting of the reference bits corresponding to the search data. In step 3, for all the entries in the LRU table 13, if the reference bit part 19 is 0, the counter part 20 is incremented by 1. If the reference bit part 19 is 1, the reference bit part 19 is set to 0 and the counter part is Set 20 to 0. Next, the LRU table 13 is searched for the entry with the maximum value of the counter section 20, the value of the data identifier section 22 of the searched entry is taken out, and it is set as the data identifier to be replaced, and this entry is deleted. Go to step 4. In step 4, the replacement data is stored in the high-speed storage device 4 based on the replacement target data identifier obtained in step 3.
It is taken out from and written back to the low speed storage device 5. Next, the search data is read from the low speed storage device 5 based on the reference identifier, the data is written in the high speed storage device 4, and the process proceeds to step 5 to register the reference data. In step 5, a new entry in which the value of the data identifier portion 22 is the search identifier, the value of the reference bit portion 19 is 0, and the value of the counter portion 20 is 0 is registered in the LRU table 13.
【0007】このように従来の方式では、参照ビット部
19により前回置換が行なわれた時からそのデータが参
照されたかを示し、カウンタ部20により置換が起きる
ごとに参照されなかった数をカウントすることで、カウ
ンタ部20の値が最も大きいデータを最も長い間参照さ
れなかったと判断することで、LRU方式を近似してい
る。As described above, in the conventional method, the reference bit unit 19 indicates whether or not the data has been referenced since the previous replacement, and the counter unit 20 counts the number of unreferenced data every replacement. Thus, the LRU method is approximated by determining that the data having the largest value in the counter unit 20 has not been referred to for the longest time.
【0008】[0008]
【発明が解決しようとする課題】以上のような従来のL
RU近似方式においては、置換時にLRUテーブル内の
全エントリについて参照ビット部を操作し、更にカウン
タ部の最大のエントリを検索しているが、高速記憶装置
のサイズが大きくなるにつれLRUテーブルのサイズも
大きくなり、LRUテーブルの全エントリに対する操作
に非常に時間がかかるため、置換処理が高速に行なえな
いという課題があった。また、並列計算機においては、
要求元プログラムが複数存在し、複数のデータ・アクセ
ス要求が同時に発行される場合があり、従来方式では、
1つの要求のために長時間LRUテーブルを占有するこ
とになり、並列度を減少されるという課題もある。DISCLOSURE OF THE INVENTION Problems to be Solved by the Invention
In the RU approximation method, the reference bit part is manipulated for all entries in the LRU table at the time of replacement, and the maximum entry of the counter part is searched. However, as the size of the high speed storage device increases, the size of the LRU table also increases. Since the size becomes large and the operation for all entries of the LRU table takes a very long time, there is a problem that the replacement process cannot be performed at high speed. Also, in a parallel computer,
There may be multiple request source programs and multiple data access requests may be issued at the same time. In the conventional method,
There is also a problem in that the parallelism is reduced because the LRU table is occupied for a long time for one request.
【0009】特開昭61−156446号の発明におい
ては、置換処理の管理テーブルを複数に分割すること
で、この課題を解決しようとしているが、この方式で
は、最大でも記憶装置のサイズの平方根倍程度の高速化
しか行なえない。In the invention of Japanese Patent Laid-Open No. 61-156446, this problem is solved by dividing the management table for the replacement process into a plurality of parts. However, in this method, at most, the square root of the size of the storage device is multiplied. You can only speed things up.
【0010】[0010]
【課題を解決するための手段】本発明に係る並列計算機
に適した置換対象データの選択方式においては、LRU
テーブルを複数段に階層化し、各階層においてLRU近
似方式を実行することで、低速記憶装置との置換処理を
行なうデータを決定する手段と、各LRUテーブル毎に
施錠フラグを設け、各LRUテーブルへのアクセスが終
了した時点でそのLRUテーブルの占有権を放棄する
(即ち、LRUテーブルの施錠を解除する)手段からな
るものである。In the replacement target data selection method suitable for a parallel computer according to the present invention, an LRU is selected.
The table is hierarchized into a plurality of stages, and means for determining the data to be replaced with the low-speed storage device by executing the LRU approximation method in each layer and a lock flag for each LRU table are provided to each LRU table. When the access to the LRU table is completed, the exclusive right of the LRU table is relinquished (that is, the lock of the LRU table is released).
【0011】[0011]
【作用】本発明においては、LRUテーブルを複数段に
階層化することで、各LRUテーブルのサイズが階層数
根分の1と非常に小さくなり、高速にLRU近似方式を
実現でき、各LRUテーブル毎に施錠フラグを設け、各
LRUテーブルへのアクセスが終了した時点でそのLR
Uテーブルの施錠を解除することで、他の要求元プログ
ラムがそのLRUテーブルに対してアクセス可能とな
り、複数の要求元プログラムの置換処理を並列に実行す
ることを可能としている。In the present invention, the LRU table is hierarchized in a plurality of stages, so that the size of each LRU table is very small, which is a fraction of the number of hierarchies, and the LRU approximation method can be realized at high speed. A lock flag is provided for each LR, and when the access to each LRU table ends, the LR
By unlocking the U table, another request source program can access the LRU table, and the replacement processing of a plurality of request source programs can be executed in parallel.
【0012】[0012]
【実施例】図1はこの発明の一実施例を示す構成図であ
り、1〜3は並列に動作するデータを読み込む要求元プ
ログラム、4は高速記憶装置、5は低速記憶装置、6〜
12はLRUセット・テーブル、13〜16はLRUテ
ーブルである。LRUセット・テーブルは、LRU近似
方式を実現するための情報及び下位のLRUセット・テ
ーブルまたはLRUテーブルが格納されている。また、
LRUテーブルは、LRU近似方式を実現するための情
報及びデータ識別子が格納されている。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing an embodiment of the present invention. 1 to 3 are request source programs for reading data operating in parallel, 4 is a high speed storage device, 5 is a low speed storage device, and 6 to 6.
Reference numeral 12 is an LRU set table, and 13 to 16 are LRU tables. The LRU set table stores information for realizing the LRU approximation method and a lower LRU set table or LRU table. Also,
The LRU table stores information and data identifiers for realizing the LRU approximation method.
【0013】なお、本実施例では、高速記憶装置4及び
低速記憶装置5は、データをそのデータと一対一で対応
して付されたデータ識別子と共に記憶しており、32ビ
ットのデータ識別子を基に、記憶装置のサイズに依存し
ない時間でデータを取り出すことが可能である。高速記
憶装置4のサイズは1メガワード(即ち、2の20乗ワ
ード)で、LRUテーブルの階層段数が4段としてあ
る。従って、LRUセット・テーブルは、32エントリ
から構成される。In this embodiment, the high speed storage device 4 and the low speed storage device 5 store the data together with the data identifier assigned in a one-to-one correspondence with the data, and based on the 32-bit data identifier. Moreover, it is possible to retrieve data in a time that does not depend on the size of the storage device. The size of the high-speed storage device 4 is 1 megaword (that is, 2 to the 20th power word), and the number of hierarchical layers of the LRU table is four. Therefore, the LRU set table consists of 32 entries.
【0014】図2は、1つのLRUセット・テーブルを
示す構成図であり、17は施錠フラグ、18はキー部、
19は参照ビット部、20はカウンタ部、21は下位テ
ーブル部であり、17はLRUセット・テーブルに1
つ、18〜21はエントリ毎に(即ち、32個)存在す
る。なお、施錠フラグ17は、あるプログラムによりL
RUセット・テーブルが使用されているかどうかを示す
1ビットの情報を格納するもので、その値が0であれば
未使用状態(即ち、解錠状態)、1であれば使用状態
(即ち、施錠状態)を表す。キー部18は、0から31
までの数値が格納されており、参照ビット部19は、前
回の置換処理からそのエントリが参照されたかを示す1
ビットの情報を格納するもので、その値が0であれば未
参照、1であれば参照されたことを表す。また、カウン
タ部20は置換処理に参照ビット部19が0であった回
数を格納するものであり、下位テーブル部は1階層下の
LRUセット・テーブルまたはLRUテーブルを格納す
るものである。なお、キー部18の値を基にしたLRU
セット・テーブルの検索は、固定時間で行なえるものと
する。また、施錠フラグ17、参照ビット部19、カウ
ンタ部20は、全て値0で初期化されているものとす
る。FIG. 2 is a block diagram showing one LRU set table, where 17 is a lock flag, 18 is a key section,
Reference numeral 19 is a reference bit portion, 20 is a counter portion, 21 is a lower table portion, and 17 is 1 in the LRU set table.
18 to 21 exist for each entry (that is, 32 entries). The lock flag 17 is set to L by a program.
It stores 1-bit information indicating whether or not the RU set table is used. If the value is 0, it is an unused state (that is, unlocked state), and if it is 1, it is a used state (that is, locked state). State). The key part 18 is from 0 to 31
Are stored, and the reference bit part 19 indicates whether the entry has been referred to since the previous replacement process.
Bit information is stored. If the value is 0, it is not referred to, and if the value is 1, it indicates that it is referred to. The counter unit 20 stores the number of times the reference bit unit 19 is 0 in the replacement process, and the lower table unit stores the LRU set table or LRU table one level lower. The LRU based on the value of the key part 18
The set table can be searched in a fixed time. Further, it is assumed that the lock flag 17, the reference bit unit 19, and the counter unit 20 are all initialized to the value 0.
【0015】図3は、1つのLRUテーブルを示す構成
図であり、17,19,20は、図2におけるLRUセ
ット・テーブルと同様のものであり、22はデータ識別
子部であり、データの識別子を格納するものである。FIG. 3 is a block diagram showing one LRU table. Reference numerals 17, 19 and 20 are the same as the LRU set table shown in FIG. 2, and 22 is a data identifier section, which is a data identifier. Is stored.
【0016】このような構成のシステムにおいては、図
4〜図7に示すフローチャートに基づいてLRU近似方
式が行なわれる。まず、要求元プログラム1に必要なデ
ータの読み込み要求が発生すると、ステップ1で読み込
みたいデータを特定するためのデータ識別子(即ち、参
照識別子)を基に高速記憶装置4を検索し、該当データ
が高速記憶装置4内に存在すれば当該データを取り出す
と共に第1層のLRUセット・テーブル6を対象として
ステップ2へ進み、参照ビット部をセットし、存在しな
ければ第1層のLRUセット・テーブル6を対象として
ステップ3へ進み置換処理を行なう。In the system having such a configuration, the LRU approximation method is performed based on the flow charts shown in FIGS. First, when a request for reading necessary data is issued to the request source program 1, the high-speed storage device 4 is searched based on the data identifier (that is, the reference identifier) for specifying the data to be read in step 1, and the corresponding data is found. If it exists in the high-speed storage device 4, the data is taken out and the LRU set table 6 of the first layer is targeted, and the process proceeds to step 2 to set the reference bit part, and if it does not exist, the LRU set table of the first layer. In step 6, the replacement process is performed for step 6.
【0017】ステップ2では、対象とするテーブルの施
錠フラグ17が0ならば(即ち、施錠されていなけれ
ば)ステップ2aへ進み、施錠フラグ17が1ならば
(即ち、施錠されていれば)施錠フラグ17が0になる
まで待ち、ステップ2aへ進む。ステップ2aでは、施
錠フラグ17を1にし、参照識別子の第1ビットから第
5ビットまでの5ビットの情報をキーとして対象テーブ
ル(即ち、LRUセット・テーブルまたはLRUテーブ
ル)を検索し、該当するエントリの参照ビット部19を
1にすると共に、対象テーブルがLRUセット・テーブ
ルであればステップ2bへ進み、対象テーブルがLRU
テーブルであれば、ステップ2cへ進む。ステップ2b
では、上記該当するエントリの下位テーブル部21から
下位のテーブルを取り出し施錠フラグ17を0にし、そ
の下位のテーブルを対象としてステップ2へ進むが、キ
ーを基にエントリを検索する際のキー値が階層のレベル
により異なり、その対象テーブルが第2層であれば参照
識別子の第6ビットから第10ビットまでの5ビットの
情報をキーにし、第3層であれば、参照識別子の第11
ビットから第15ビットまでの5ビットの情報をキーに
し、第4層であれば(即ち、次回の対象テーブルがLR
Uテーブルの場合)参照識別子をキーとする。ステップ
2cでは、施錠フラグを0にする。これにより、検索デ
ータに対応する参照ビットのセットが終了する。In step 2, if the lock flag 17 of the target table is 0 (that is, it is not locked), the process proceeds to step 2a, and if the lock flag 17 is 1 (that is, it is locked), it is locked. Wait until the flag 17 becomes 0 and proceed to step 2a. In step 2a, the lock flag 17 is set to 1, the 5-bit information from the 1st bit to the 5th bit of the reference identifier is used as a key to search the target table (that is, the LRU set table or the LRU table), and the corresponding entry is searched. The reference bit part 19 of the above is set to 1, and if the target table is the LRU set table, the process proceeds to step 2b, and the target table is the LRU.
If it is a table, go to step 2c. Step 2b
Then, the lower table is taken out from the lower table part 21 of the corresponding entry, the lock flag 17 is set to 0, and the process proceeds to step 2 for the lower table, but the key value when searching for an entry based on the key is Depending on the level of the hierarchy, if the target table is the second layer, 5-bit information from the 6th bit to the 10th bit of the reference identifier is used as a key, and if it is the 3rd layer, the 11th of the reference identifier is used.
If the 5th bit information from the 15th bit to the 15th bit is used as a key and it is the 4th layer (that is, the next target table is LR
In the case of U table) The reference identifier is used as a key. In step 2c, the lock flag is set to 0. This completes the setting of the reference bits corresponding to the search data.
【0018】ステップ3では、対象とするテーブルの施
錠フラグ17が0ならばステップ3aへ進み、施錠フラ
グ17が1ならば施錠フラグ17が0になるまで待ち、
ステップ3aへ進む。ステップ3aでは、施錠フラグ1
7を1にし、対象テーブルの全てのエントリに対して、
参照ビット部19が0ならばカウンタ部20を1増加
し、参照ビット部19が1ならば参照ビット部19を0
にすると共にカウンタ部20を0にする。次に、対象テ
ーブル内でカウンタ部20の値が最大のエントリを検索
し、対象テーブルがLRUセット・テーブルであればス
テップ3bへ進み、LRUテーブルであればステップ3
cへ進む。ステップ3bでは、上記で検索されたエント
リの下位テーブル部21から下位のテーブルを取り出し
施錠フラグ17を0にし、その下位のテーブルを対象と
してステップ3へ進む。ステップ3cでは、上記で検索
されたエントリのデータ識別子部22の値を取り出し、
それを置換対象のデータ識別子とし、そのエントリを削
除すると共に施錠フラグ17を0にし、ステップ4へ進
む。In step 3, if the lock flag 17 of the target table is 0, the process proceeds to step 3a, and if the lock flag 17 is 1, waits until the lock flag 17 becomes 0,
Go to step 3a. In step 3a, the lock flag 1
7 is set to 1, and for all entries in the target table,
If the reference bit part 19 is 0, the counter part 20 is incremented by 1, and if the reference bit part 19 is 1, the reference bit part 19 is set to 0.
And the counter unit 20 is set to 0. Next, the entry having the maximum value of the counter unit 20 is searched in the target table, and if the target table is the LRU set table, the process proceeds to step 3b, and if the LRU table, the step 3 is performed.
Go to c. In step 3b, the lower table is taken out from the lower table portion 21 of the entry searched above, the lock flag 17 is set to 0, and the process proceeds to step 3 for the lower table. In step 3c, the value of the data identifier portion 22 of the entry searched above is taken out,
It is used as a data identifier to be replaced, the entry is deleted, the lock flag 17 is set to 0, and the process proceeds to step 4.
【0019】ステップ4では、ステップ3により求めら
れた置換対象のデータ識別子を基に置換データを高速記
憶装置4から取り出し低速記憶装置5へ書き戻す。次
に、参照識別子を基に低速記憶装置5から参照データを
読み出すと共に、高速記憶装置4へそのデータを書き込
み、第1層LRUテーブル6を対象としてステップ5に
進み参照データの登録を行なう。In step 4, the replacement data is taken out from the high speed storage device 4 and written back to the low speed storage device 5 based on the data identifier of the replacement target obtained in step 3. Next, the reference data is read from the low-speed storage device 5 based on the reference identifier, the data is written to the high-speed storage device 4, and the first layer LRU table 6 is targeted to proceed to step 5 to register the reference data.
【0020】ステップ5では、対象とするテーブルがL
RUセット・テーブルであればステップ5aへ進み、L
RUテーブルであればステップ5bへ進む。ステップ5
aでは、参照識別子の第1ビットから第5ビットまでの
5ビットの情報をキーとして対象テーブルを検索し、該
当するエントリの下位テーブル部21から下位のテーブ
ルを検索し、該当するエントリの下位テーブル部21か
ら下位のテーブルを取り出し、その下位のテーブルを対
象としてステップ5へ進むが、キーを基にエントリを検
索する際のキー値が階層のレベルにより異なり、その対
象テーブルが第2層であれば参照識別子の第6ビットか
ら第10ビットまでの5ビットの情報をキーにし、第3
層であれば、参照識別子の第11ビットから第15ビッ
トまでの5ビットの情報をキーにする。ステップ5bで
は、対象テーブルの施錠フラグ17が0ならばステップ
5cへ進み、施錠フラグ17が1ならば施錠フラグ17
が0になるまで待ち、ステップ5cへ進む。ステップ5
cでは施錠フラグ17を1にし、識別子部22の値を参
照識別子、参照ビット部19の値を0、カウンタ部20
の値を0とした新たなエントリを対象テーブルに登録
し、施錠フラグ17を0にする。これにより、参照デー
タのLRUテーブルへの登録が終了する。In step 5, the target table is L
If it is a RU set table, proceed to step 5a, L
If it is the RU table, the process proceeds to step 5b. Step 5
In a, the target table is searched using the 5-bit information from the first bit to the fifth bit of the reference identifier as a key, the lower table is searched from the lower table part 21 of the corresponding entry, and the lower table of the corresponding entry is searched. The lower table is taken out from the section 21 and the process proceeds to step 5 for the lower table. However, the key value when searching for an entry based on the key differs depending on the level of the hierarchy, and the target table is the second layer. For example, using the information of 5 bits from the 6th bit to the 10th bit of the reference identifier as a key,
In the case of a layer, 5-bit information from the 11th bit to the 15th bit of the reference identifier is used as a key. In step 5b, if the lock flag 17 of the target table is 0, the process proceeds to step 5c, and if the lock flag 17 is 1, the lock flag 17 is set.
Until 0 becomes 0, and proceed to step 5c. Step 5
In c, the lock flag 17 is set to 1, the value of the identifier portion 22 is the reference identifier, the value of the reference bit portion 19 is 0, and the counter portion 20.
A new entry with the value of 0 set to 0 is registered in the target table, and the lock flag 17 is set to 0. This completes the registration of the reference data in the LRU table.
【0021】このように、LRUテーブルを4階層に階
層化することで、1つのテーブルのサイズを32エント
リという小さなサイズにしているために、LRU近似方
式を高速に行なうことができる。更に、並列計算機にお
いて、要求元プログラム1に対する処理を行なっている
途中で他の要求元プログラムも読み込みを行なおうとし
た場合、各テーブル毎に施錠フラグ17により占有権管
理を行なっているので、要求元プログラム1のあるテー
ブル(即ち、LRUセット・テーブルまたはLRUテー
ブル)へのアクセスが終了した時点で、他の要求元プロ
グラム2,3がそのテーブルにアクセスすることがで
き、複数の並列に実行されるプログラムで低速記憶装置
と高速記憶装置間のデータ置換処理を同時に実行でき
る。As described above, by arranging the LRU table into four layers, the size of one table is as small as 32 entries, so that the LRU approximation method can be performed at high speed. Further, in the parallel computer, if another request source program is also attempted to be read in the middle of processing the request source program 1, the lock flag 17 is used to manage the exclusive right for each table. When the access to a table (that is, the LRU set table or the LRU table) of the original program 1 is completed, other requesting programs 2 and 3 can access the table, and the requesting programs 2 and 3 are executed in parallel. The data replacement process between the low-speed storage device and the high-speed storage device can be simultaneously executed by the program.
【0022】なお、本実施例では、LRUテーブルの階
層化の段数を4段、高速記憶装置のサイズを1メガ・ワ
ードにした例を用いて説明を行なっているが、階層化の
段数及び高速記憶装置のサイズはどんな値であっても良
い。Although the present embodiment has been described by using an example in which the number of stages of hierarchization of the LRU table is 4 and the size of the high speed storage device is 1 mega word, the number of stages of hierarchization and high speed are explained. The size of the storage device can be any value.
【0023】[0023]
【発明の効果】以上のようにこの発明によれば、LRU
テーブルを複数段に階層化し1つのLRUテーブルのサ
イズを小さくすることで、高速にLRU近似方式を実行
でき、各LRUテーブル毎に施錠フラグを設け占有権管
理を行なうことで、複数の要求元プログラムの置換処理
を並列に実行することを可能としている。As described above, according to the present invention, the LRU
The LRU approximation method can be executed at a high speed by hierarchizing the table into a plurality of stages and reducing the size of one LRU table, and by providing a lock flag for each LRU table and managing the exclusive right, a plurality of request source programs can be obtained. It is possible to execute the replacement processing of in parallel.
【図1】この発明の一実施例を示す全体構成図である。FIG. 1 is an overall configuration diagram showing an embodiment of the present invention.
【図2】LRUセット・テーブルを示す構成図である。FIG. 2 is a configuration diagram showing an LRU set table.
【図3】LRUテーブルを示す構成図である。FIG. 3 is a configuration diagram showing an LRU table.
【図4】この実施例の動作を示すフローチャートであ
る。FIG. 4 is a flowchart showing the operation of this embodiment.
【図5】この実施例の動作を示すフローチャートであ
る。FIG. 5 is a flowchart showing the operation of this embodiment.
【図6】この実施例の動作を示すフローチャートであ
る。FIG. 6 is a flowchart showing the operation of this embodiment.
【図7】この実施例の動作を示すフローチャートであ
る。FIG. 7 is a flowchart showing the operation of this embodiment.
【図8】従来のLRU近似方式を示す構成図である。FIG. 8 is a configuration diagram showing a conventional LRU approximation method.
【図9】その動作を示すフローチャートである。FIG. 9 is a flowchart showing the operation.
1〜3 要求元プログラム 4 高速記憶装置 5 低速記憶装置 6〜12 LRUセット・テーブル 13〜16 LRUテーブル 17 施錠フラグ 18 キー部 19 参照ビット部 20 カウンタ部 21 下位テーブル 22 データ識別部 1-3 Request Source Program 4 High Speed Storage Device 5 Low Speed Storage Device 6-12 LRU Set Table 13-16 LRU Table 17 Locking Flag 18 Key Part 19 Reference Bit Part 20 Counter Part 21 Lower Table 22 Data Identification Part
Claims (2)
装置及び低速記憶装置を具備し、アクセスするデータが
高速記憶装置内に存在する場合はそのデータをアクセス
し、上記データが存在しない場合は高速記憶装置内の適
当なデータを低速記憶装置内のアクセスすべきデータと
置換する記憶管理システムにおいて、高速記憶装置内の
各データのアクセス順序を管理するテーブルを複数段に
階層化し、高速記憶装置内にアクセスすべきデータが存
在した場合には上記階層化された管理テーブル及び参照
データの参照順序情報を更新する第1の手段と、高速記
憶装置内にアクセスすべきデータが存在しない場合には
上記階層化された管理テーブル及びデータの内最も過去
にアクセスされたと判断されるものを低速記憶装置と置
換を行なう第2の手段を備えたことを特徴とする置換対
象データの選択方式。1. A high-speed storage device comprising a plurality of entries and a low-speed storage device, wherein when the data to be accessed exists in the high-speed storage device, the data is accessed, and when the data does not exist, the high-speed storage device is accessed. In a storage management system that replaces appropriate data in a storage device with data to be accessed in a low-speed storage device, a table that manages the access order of each data in the high-speed storage device is hierarchized in a plurality of stages, If there is data to be accessed, the first means for updating the hierarchical management table and the reference order information of the reference data, and if there is no data to be accessed in the high-speed storage device, then The second method of replacing the hierarchized management table and the data judged to be accessed most recently with the low-speed storage device. A method for selecting replacement target data, which is characterized by having steps.
た各管理テーブル毎に施錠フラグを設け、管理テーブル
にアクセスする場合、上記施錠フラグが解錠状態であれ
ば施錠状態にしアクセスを行ないアクセスが終了した時
点で解錠状態にする第1の手段と、施錠フラグが施錠状
態であれば解錠状態になるまで待ってからアクセスを行
なう第2の手段を備えたことを特徴とする置換対象デー
タの選択方式。2. In the storage management method, when a locking flag is provided for each hierarchical management table and the management table is accessed, if the locking flag is in the unlocked state, the locked state is set and the access is performed. Replacement target data comprising first means for making an unlocked state at the time of completion, and second means for making an access after waiting until the unlocked state if the locking flag is in the locked state. Selection method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4113585A JPH05314010A (en) | 1992-05-06 | 1992-05-06 | System for selecting substitution object data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4113585A JPH05314010A (en) | 1992-05-06 | 1992-05-06 | System for selecting substitution object data |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH05314010A true JPH05314010A (en) | 1993-11-26 |
Family
ID=14615953
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4113585A Pending JPH05314010A (en) | 1992-05-06 | 1992-05-06 | System for selecting substitution object data |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH05314010A (en) |
-
1992
- 1992-05-06 JP JP4113585A patent/JPH05314010A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0303231B1 (en) | Method and device for enabling concurrent access of indexed sequential data files | |
| EP1540533B1 (en) | Controlling visibility in multi-version database systems | |
| US4864497A (en) | Method of integrating software application programs using an attributive data model database | |
| JP3674117B2 (en) | Exclusive control method, data management system using the same, and recording medium | |
| US7613683B2 (en) | System and method for retrieving information from a database | |
| US6631366B1 (en) | Database system providing methodology for optimizing latching/copying costs in index scans on data-only locked tables | |
| US5430869A (en) | System and method for restructuring a B-Tree | |
| US4914569A (en) | Method for concurrent record access, insertion, deletion and alteration using an index tree | |
| JPH05210637A (en) | Method of simultaneously controlling access | |
| JPH04337850A (en) | Data base transaction and collation processing system | |
| CA2302303A1 (en) | System for accessing database tables mapped into memory for high performance | |
| JPH05128072A (en) | Inter-system exclusive control method | |
| CN114328500B (en) | A data access method, device, equipment and computer readable storage medium | |
| CN108694230B (en) | Management of unique identifiers in a database | |
| CN111581123B (en) | Class-based locking of memory allocations | |
| JP3621433B2 (en) | Database exclusive control method | |
| US20040243624A1 (en) | Undrop objects and dependent objects in a database system | |
| CN118051502B (en) | Index processing method, device and equipment of database and readable storage medium | |
| JP2009265840A (en) | Cache system for database | |
| US6327597B1 (en) | Method, memory system, and computer program product for implementing lock based delayed space recycle control | |
| JPH05314010A (en) | System for selecting substitution object data | |
| US7107404B2 (en) | Method and system for data processing for controlling a cache memory | |
| JPH02212949A (en) | Reorganization processing system for data base in on-line operation | |
| CN114791913B (en) | Shared memory buffer pool processing method, storage medium and device for database | |
| US8510269B2 (en) | Uninterrupted database index reorganization/movement |