JPH03263145A - Magnetic disk controller - Google Patents

Magnetic disk controller

Info

Publication number
JPH03263145A
JPH03263145A JP2061117A JP6111790A JPH03263145A JP H03263145 A JPH03263145 A JP H03263145A JP 2061117 A JP2061117 A JP 2061117A JP 6111790 A JP6111790 A JP 6111790A JP H03263145 A JPH03263145 A JP H03263145A
Authority
JP
Japan
Prior art keywords
value
lru
cache
initial value
magnetic disk
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
JP2061117A
Other languages
Japanese (ja)
Inventor
Akihiko Furuya
古谷 彰彦
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2061117A priority Critical patent/JPH03263145A/en
Publication of JPH03263145A publication Critical patent/JPH03263145A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To prevent the performance from being deteriorated due to a disk access and to effectively utilize a cache by constituting the controller so that it is not initialized by a smaller value than the present (Least Recently Used) (LRU) value even when accesses of different LRU initial values compete with each other. CONSTITUTION:A magnetic disk controller 101 is constituted of an interface control part (HOST I/F) 103, a CPU 104, a ROM (F/W ROM) 105, a disk cache memory (CACHE MEM) 106, an interface control part (DRIVE I/F) 108, a data transfer control part (DMA CONTROL) 109, a buffer memory (BUFFER MEM) 110, and a (DIR MEM) 111. In such a state, even when accesses of different LRU initial values compete with each other, it does not occur that the controller is initialized by a smaller value than the present LRU value. In such a way, deterioration of the performance can be prevented, and a cache can be utilized effectively.

Description

【発明の詳細な説明】 [発明の目的コ (産業上の利用分野) 本発明は、ディスクキャッシュメモリを内蔵し、キャッ
ジニブロックの置換アルゴリズムとしてL RU (L
east RecentIy Used )制御方式を
用いた磁気ディスク制御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention (Industrial Application Field) The present invention has a built-in disk cache memory and uses L RU (L
The present invention relates to a magnetic disk control device using a control method.

(従来の技術) ディスクキャッシュメモリを内蔵し、キャッシュブロッ
クの置換アルゴリズムとして、LRU制御方式を用いた
磁気ディスク制御装置に於いて、ディスクキャッシュの
有効利用を図る目的で、LRHの初期値を可変にする方
法か考えられる。
(Prior art) In a magnetic disk control device that has a built-in disk cache memory and uses an LRU control method as a cache block replacement algorithm, the initial value of LRH is made variable in order to make effective use of the disk cache. I can think of a way to do it.

LRUの更新は、第4図に示すように、キャツシュヒツ
トあるいは新規登録した場合に、LRUをある初期値に
設定し、ミスした場合は、現在の値から「1」を引くと
いう処理であるが、初期値を可変にすること(例えば、
4段階の初期値を選べるというようなこと)により、キ
ャッシュ内に常駐する時間を制御することが可能となる
。利用回数が少なく、すぐに不要になるようなデータブ
ロックに対しては、LRU初期値を小さくしておき、短
時間でキャッシュからはき出されるようにする。
As shown in Figure 4, the LRU update is a process in which the LRU is set to a certain initial value when a request is made or a new registration is made, and if a mistake is made, "1" is subtracted from the current value. Making the initial value variable (for example,
By being able to select four levels of initial values), it is possible to control the amount of time the cache remains resident. For data blocks that are used less often and become unnecessary soon, the initial LRU value is set small so that they can be flushed out of the cache in a short time.

逆に利用回数が多い場合には、LRU初期値を大きくし
ておき、キャッシュ内の常駐時間を長くする(これはあ
くまでも−例である)。
On the other hand, if the number of uses is large, the initial LRU value is increased and the residence time in the cache is lengthened (this is just an example).

初期値の指定は、例えば、リードライトコマンドにパラ
メータとして持たせたり、別なコマンドにて設定したり
する方法が考えられる。
The initial value can be specified, for example, by providing it as a parameter in the read/write command, or by setting it in a separate command.

(発明が解決しようとする課題) ところが、同一ブロックに対して複数の異なるLRU初
期値のアクセスが重なった場合、従来のアルゴリズムで
は、大きい初期値で設定されていたとき、小さい初期値
のアクセスがあると、小さい初期値に設定されてしまい
、場合によっては、短時間のうちにキャッシュからはき
出されてしまうという問題があった。
(Problem to be Solved by the Invention) However, when multiple different LRU initial values are accessed at the same time for the same block, in the conventional algorithm, when a large initial value is set, access to a small initial value is If it exists, it will be set to a small initial value, and depending on the case, there is a problem that it will be flushed out of the cache within a short time.

第5図は、この様子を表わしたものであり、あるキャッ
シュブロックのLRU値の時間的変化を示している。こ
こでは、LRUの初期値としてLRUO〜3の4段階の
設定が可能であり、LRUOとLRU3が競合する場合
を考える。
FIG. 5 shows this situation and shows the change over time in the LRU value of a certain cache block. Here, the initial value of LRU can be set in four stages from LRUO to LRU3, and a case will be considered in which LRUO and LRU3 conflict with each other.

1)、tOのアクセスにてLRU3で新規登録される。1), a new registration is made in LRU3 upon access by tO.

2)、tl〜t4のアクセスに於いて、キャツシュヒツ
トし、LRU3の値に再設定される。
2) In accesses from tl to t4, the data is cached and reset to the value of LRU3.

3)、t5でLRUOのアクセスがあり、LRU値がL
RUOに設定される。
3), there is an LRUO access at t5, and the LRU value is L.
Set to RUO.

4)、tOまで同ブロックに対するアクセスがないため
に、t6の他のブロックアクセスにより、キャッシュか
ら追い出される。
4) Since there is no access to the same block until tO, it is evicted from the cache by another block access at t6.

5)、t7でLRU3のアクセスがあり、ミスヒツトで
LRU3に新規登録される。
5), there is an access from LRU3 at t7, and a new registration is made in LRU3 due to a miss.

従って、上記5)に於いて、ディスクアクセスが・発生
し、性能低下となってしまう。これは4)に於いて、現
在のLRU値よりも小さい値で初期化されるという不都
合が原因である。この際の従来技術による処理フローを
第4図に示している。
Therefore, in 5) above, disk access occurs, resulting in performance degradation. This is due to the inconvenience in 4) that the LRU value is initialized with a smaller value than the current LRU value. The processing flow according to the prior art at this time is shown in FIG.

上記したように、同一ブロックに対して複数の異なるL
RU初期値のアクセスが重なった場合、従来のアルゴリ
ズムでは、大きい初期値で設定されていたとき、小さい
初期値のアクセスがあると、小さい初期値に設定されて
しまい、場合によっては、短時間のうちにキャッシュか
らはき出されてしまうという問題があった。
As mentioned above, multiple different L
When accesses to the RU initial value overlap, in the conventional algorithm, when a large initial value was set, if there is an access to a small initial value, the initial value is set to a small initial value, and in some cases, the initial value is set to a small initial value. We had a problem with it being kicked out of our cache.

本発明は上記実情に鑑みなされたもので、ディスクキャ
ッシュメモリを内蔵し、キャッシュブロックの置換アル
ゴリズムとしてLRU制御方式を用いた磁気ディスク制
御装置に於いて、異なるLRU初期値のアクセスが競合
した場合に、現状のLRU値よりも小さい値で初期化さ
れてしまうことにより生ずる性能低下を解決する手段を
備えた磁気ディスク制御装置を提供することを目的とす
る。
The present invention has been made in view of the above-mentioned circumstances.In a magnetic disk control device that includes a built-in disk cache memory and uses an LRU control method as a cache block replacement algorithm, when accesses of different initial LRU values conflict, It is an object of the present invention to provide a magnetic disk control device equipped with means for solving performance degradation caused by initialization with a value smaller than the current LRU value.

[発明の構成] (課題を解決するための手段及び作用)本発明は、キャ
ツシュヒツト時及び新規登録時のLRU初期化に於いて
、現在のLRU値と初期値を比較し、現在のLRU値が
初期値よりも小さいか等しいときは初期値を設定し、現
在のLRU値が初期値よりも大きいときは、現在のLR
U値から1を引いた値を設定することにより、異なるL
RU初期値のアクセスが競合した場合でも、現在のLR
U値よりも小さい値で初期化されてしまうことがないの
で、従来のようなディスクアクセスに伴う性能低下が防
止でき、キャッシュの有効利用を図ることができる。
[Structure of the Invention] (Means and Effects for Solving the Problems) The present invention compares the current LRU value with the initial value during LRU initialization at the time of cash hit and new registration, and determines whether the current LRU value is If it is less than or equal to the initial value, set the initial value, and if the current LRU value is greater than the initial value, set the current LR
By setting a value that subtracts 1 from the U value, different L
Even if access to the initial RU value conflicts, the current LR
Since it is not initialized with a value smaller than the U value, it is possible to prevent performance degradation associated with conventional disk access, and to make effective use of the cache.

(実施例) 以下図面を参照して本発明の一実施例を説明する。(Example) An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例に於ける磁気ディスク制御装
置の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a magnetic disk control device in one embodiment of the present invention.

第1図に於いて、101は磁気ディスク制御装置であり
、102乃至112はそれぞれ磁気ディスク制御装置1
01の構成要素をなすもので、102は上位装置11(
との間の伝送路となるインターフェイスライン、103
はこのインターフェイスライン102を介して上位装置
113との間で情報をやり取りするインターフェイス制
御部(HO8T I/F)である。
In FIG. 1, 101 is a magnetic disk control device, and 102 to 112 are magnetic disk control devices 1, respectively.
01, and 102 is a component of the host device 11 (
interface line, 103, which serves as a transmission path between
is an interface control unit (HO8T I/F) that exchanges information with the host device 113 via this interface line 102.

104はROM 105に格納されたプログラムの命令
を解読し実行するCPUであり、ここでは第3図及び第
4図に示すような処理制御を行なう。105はCP U
 104により実行されるプログラムの命令を格納す!
ROM (F/V ROM ) テあル、106は制御
の対象となるディスクキャッシュメモリ(CACHE 
MEN )である。107は内部バスである。
A CPU 104 decodes and executes instructions of a program stored in the ROM 105, and here performs processing control as shown in FIGS. 3 and 4. 105 is CPU
Stores the instructions of the program executed by 104!
ROM (F/V ROM) 106 is the disk cache memory (CACHE) that is the subject of control.
MEN). 107 is an internal bus.

108は磁気ディスク装置114との間で情報をやり取
りするインターフェイス制御部(DRIVE I/F 
)である。109は磁気ディスク装置114 、上位装
置l13、バッファメモリ11O1およびディスクキャ
ッシュメモリ106間のデータ転送制御部(DMAC0
NTR0L )である。110は磁気ディスク装置11
4と上位装置113との間のデータ転送速度差を吸収す
るための緩衝用メモリ(BLIFFERMEN)である
108 is an interface control unit (DRIVE I/F) that exchanges information with the magnetic disk device 114.
). 109 is a data transfer control unit (DMAC0) between the magnetic disk device 114, the host device l13, the buffer memory 11O1 and the disk cache memory 106;
NTR0L). 110 is a magnetic disk device 11
This is a buffer memory (BLIFFERMEN) for absorbing the data transfer rate difference between the data transfer rate of the host device 113 and the host device 113.

111はディスクキャッシュメモリ106内のデータの
有無を記憶するメモリ(DLRMEN )である。
111 is a memory (DLRMEN) that stores the presence or absence of data in the disk cache memory 106;

112は磁気ディスク装置114との間の伝送路となる
インターフェイスラインである。113は上位装置(ホ
スト側装置) 、114は磁気ディスク装置(DRIV
E )である。
Reference numeral 112 denotes an interface line serving as a transmission path between the magnetic disk device 114 and the magnetic disk device 114 . 113 is a host device (host side device), 114 is a magnetic disk device (DRIV)
E).

第2図は本発明の実施例に於けるデイレクトリサーチの
処理フローを第4図に示す従来技術によるデイレクトリ
サーチの処理フローと対比して示すフローチャートであ
る。
FIG. 2 is a flowchart showing the processing flow of direct search in the embodiment of the present invention in comparison with the processing flow of direct search according to the prior art shown in FIG.

第3図は本発明の実施例に於けるキャッシュブロックの
LRU値の時間的な変化を第5図に示す従来技術による
キャッシュブロックのLRU値の時間的な変化と対比し
て示すタイムチャートである。
FIG. 3 is a time chart showing the temporal change in the LRU value of the cache block in the embodiment of the present invention in comparison with the temporal change in the LRU value of the cache block according to the prior art shown in FIG. .

ここで第1図乃至第3図を参照して本発明の一実施例に
於ける動作を説明する。
The operation of an embodiment of the present invention will now be described with reference to FIGS. 1 to 3.

第2図に示す処理フローが第4図に示す従来の技術の処
理フローと特に異なる点は、ヒツト(HIT)あるいは
新規登録のLRU初期化、更新(ステップSS)で、現
在のLRU値をLRUとし、初期値をXとすると、LR
U≦XならばXを設定しくステップS7 、S8 )、
LRU>XならばLRU−1を設定する(ステップS9
)。
The processing flow shown in FIG. 2 is particularly different from the processing flow of the conventional technology shown in FIG. and the initial value is X, then LR
If U≦X, set X (steps S7, S8),
If LRU>X, set LRU-1 (step S9
).

次に第3図を用いて本発明の一実施例に於ける動作を説
明する。
Next, the operation in one embodiment of the present invention will be explained using FIG.

1)、tOのアクセスにてLRU3で新規登録される。1), a new registration is made in LRU3 upon access by tO.

2)、tl−t4に於けるアクセスにてキャツシュヒツ
トし、LRU3の値に再設定される。
2), it is cached in the access at tl-t4 and reset to the value of LRU3.

3)、t5でLRUOのアクセスがあり、現在のLRU
値>LRUなので、「現在の値−1」が設定される。
3), there is an access to LRUO at t5, and the current LRU
Since value>LRU, "current value - 1" is set.

4)、t7でLRU3のアクセスがあり、ヒラ) (I
T )したため、LRU3で初期化される。
4), there is an access from LRU3 at t7, and Hira) (I
T ), it is initialized to LRU3.

この第3図に示す処理が第5図に示す従来の技術と異な
る点は、3)でLRUOに設定されないことと、4)で
ミスヒツトしないことである。
The process shown in FIG. 3 differs from the conventional technique shown in FIG. 5 in that LRUO is not set in 3) and that a miss does not occur in 4).

上記したように、キャツシュヒツト時及び新規登録時の
LRU初期化に於いて、現在のLRU値と初期値を比較
し、現在のLRU値が初期値よりも小さいか等しいなら
ば初期値を設定し、現在のLRU値が初期値より大きい
ならば現在のLRU値から1を引いた値を設定すること
により、異なるLRU初期値のアクセスが競合した場合
でも、現在のLRU値よりも小さい値で初期化されてし
まうことがないので、従来のような性能低下が防止でき
、キャッシュの有効利用を図ることができる。
As mentioned above, in LRU initialization at the time of cash hit and new registration, the current LRU value and the initial value are compared, and if the current LRU value is smaller than or equal to the initial value, the initial value is set, If the current LRU value is larger than the initial value, by setting a value that subtracts 1 from the current LRU value, even if accesses of different initial LRU values conflict, initialization is performed with a value smaller than the current LRU value. This prevents the performance from deteriorating as in the conventional case, and makes effective use of the cache.

尚、上記した実施例では、LRU初期化時に、現在のL
RU値が初期値より大きいとき、現在のLRU値から1
を引いた値を設定しているが、例えばキャッシュミスを
生じた際に現在のLRU値に1又は特定の値を加えてゆ
< LRU更新手段を採る装置に於いては、LRU初羽
化時、現在のLRU値が初期値より小さいとき、現在の
LRU値から1(又は特定の値)を加える構成とすれば
よい。
Note that in the above embodiment, when initializing the LRU, the current L
When the RU value is larger than the initial value, 1 from the current LRU value
For example, when a cache miss occurs, 1 or a specific value is added to the current LRU value. When the current LRU value is smaller than the initial value, 1 (or a specific value) may be added to the current LRU value.

[発明の効果] 以上詳記したように本発明によれば、ディスクキャッシ
ュメモリを内蔵し、キャッシュブロックの置換アルゴリ
ズムとして初期値を可変に設定できるLRU制御方式を
用いた磁気ディスク制御装置に於いて、キャツシュヒツ
ト時及び新規登録時のLRU初期化に於いて現在のLR
U値と初期値を比較し、現在のLRU値が初期値よりも
小さいか等しいならば初期値を設定し、現在のLRU値
が初期値よりも大きいならば、現在のLRU値から初期
値より小さい特定の値を減じた値(例えば現在のLRU
値から1を引いた値)を設定する手段を備えてなる構成
としたことにより、異なるLRU初期値のアクセスが競
合した場合でも現在のLRU値よりも小さい値に初期化
されることがないため、性能が低下せず、キャッシュの
有効利用を図ることができる。
[Effects of the Invention] As detailed above, according to the present invention, a magnetic disk control device incorporating a disk cache memory and using an LRU control method in which an initial value can be variably set as a cache block replacement algorithm is provided. The current LR is
Compare the U value with the initial value, and if the current LRU value is less than or equal to the initial value, set the initial value, and if the current LRU value is greater than the initial value, set the U value to the initial value. The value obtained by subtracting a small specific value (for example, the current LRU
By having a configuration that includes means for setting a value (value minus 1), even if there is a conflict of access to different LRU initial values, the LRU value will not be initialized to a smaller value than the current LRU value. , the cache can be used effectively without degrading performance.

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

第1図は本発明の一実施例に於ける磁気ディスク制御装
置の構成を示すブロック図、第2図は上記実施例に於け
るデイレクトリサーチの処理フローを示すフローチャー
ト、第3図は上記実施例に於けるキャッシュブロックの
LRU値の時間的な変化を示すタイムチャート、第4図
は従来の技術に於けるデイレクトリサーチの処理フロー
を示すフローチャート、第5図は従来の技術に於けるキ
ャッシュブロックのLRU値の時間的な変化を示すタイ
ムチャートである。 101・・・磁気ディスク制御装置、102 、112
・・・インターフェイスライン、103・・・インター
フェイス制御部(HOST I/F)  104・・・
CPU、105・・・ROM (P/V ROM ) 
、106−・・ディスクキ+ ツシュメモリ(CACH
E MAN ) 、107・・・内部バス、108・・
・インターフェイス制御部(DI?lVE I/P )
 、109・、。 データ転送制御部(DMA C0NTR0L )  1
10・・・緩衝用メモリ(BUFFERMEN)  1
11・・・メモリ(DIRHEM ) 、113・・・
上位装置(ホスト側装置)、114・・・磁気ディスク
装置(DRIVE )。
FIG. 1 is a block diagram showing the configuration of a magnetic disk control device in one embodiment of the present invention, FIG. 2 is a flowchart showing the processing flow of direct search in the above embodiment, and FIG. 3 is a flowchart showing the processing flow of a direct search in the above embodiment. Figure 4 is a flowchart showing the processing flow of direct search in the conventional technology. 3 is a time chart showing temporal changes in LRU values. 101...Magnetic disk control device, 102, 112
...Interface line, 103...Interface control unit (HOST I/F) 104...
CPU, 105...ROM (P/V ROM)
, 106-... Disk key + Tush memory (CACH
E MAN), 107...internal bus, 108...
・Interface control unit (DI?lVE I/P)
, 109・. Data transfer control unit (DMA C0NTR0L) 1
10...Buffer memory (BUFFERMEN) 1
11...Memory (DIRHEM), 113...
Upper device (host side device), 114... magnetic disk device (DRIVE).

Claims (1)

【特許請求の範囲】[Claims] ディスクキャッシュメモリを内蔵し、キャッシュブロッ
クの置換アルゴリズムとして初期値を可変設定できるL
RU制御方式を用いた磁気ディスク制御装置に於いて、
キャッシュヒット時及び新規登録時のLRU初期化に於
いて、現在のLRU値と初期値を比較する手段と、同比
較の結果、現在のLRU値が初期値以下であるとき初期
値を設定し、現在のLRU値が初期値より大きいとき現
在のLRU値から初期値より小さい特定の値を減じた値
を設定する手段とを具備してなることを特徴とする磁気
ディスク制御装置。
L has a built-in disk cache memory and can variably set the initial value as a cache block replacement algorithm.
In a magnetic disk control device using the RU control method,
In LRU initialization at the time of cache hit and new registration, means for comparing the current LRU value and the initial value, and setting the initial value when the current LRU value is less than the initial value as a result of the comparison, A magnetic disk control device comprising: means for setting a value obtained by subtracting a specific value smaller than the initial value from the current LRU value when the current LRU value is larger than the initial value.
JP2061117A 1990-03-14 1990-03-14 Magnetic disk controller Pending JPH03263145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2061117A JPH03263145A (en) 1990-03-14 1990-03-14 Magnetic disk controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2061117A JPH03263145A (en) 1990-03-14 1990-03-14 Magnetic disk controller

Publications (1)

Publication Number Publication Date
JPH03263145A true JPH03263145A (en) 1991-11-22

Family

ID=13161813

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2061117A Pending JPH03263145A (en) 1990-03-14 1990-03-14 Magnetic disk controller

Country Status (1)

Country Link
JP (1) JPH03263145A (en)

Similar Documents

Publication Publication Date Title
US6948033B2 (en) Control method of the cache hierarchy
JPH0512116A (en) Cache memory controller
JPH10207768A (en) Method and device for accessing flash memory during operation of engine
JP3900025B2 (en) Hit determination control method for shared cache memory and hit determination control method for shared cache memory
JPH0285960A (en) Information processing system
JPH04242848A (en) System for controlling cache memory by running mode
US5572700A (en) Cache access controller and method for permitting caching of information in selected cache lines
JPH04100158A (en) Cache control system
JPH03263145A (en) Magnetic disk controller
US7805572B2 (en) Cache pollution avoidance
JP3381079B2 (en) Exclusive control system using cache memory
EP0864983A2 (en) Computer system including memory adress management circuit for protecting memory from illegal writing
JPH0628258A (en) Microprocessor
JPS5847784B2 (en) key storage system
JPH1139218A (en) Cache system
JPH03230238A (en) Cache memory control system
JPS59217284A (en) System controllr of data processor
JPS63147248A (en) Information processor containing buffer memory
JPH06161896A (en) Semiconductor memory device and address storing system
JP2020149597A (en) Control device and control method
JPH0488537A (en) Information processing system
JPS63234336A (en) Information processor
JPS6367668A (en) Multiprocessor system
JP2002024088A (en) Data processor
JPH06110787A (en) Semiconductor storage device and its storage control method