JP2000148587A - Storage device and method for determining storage area - Google Patents

Storage device and method for determining storage area

Info

Publication number
JP2000148587A
JP2000148587A JP10327249A JP32724998A JP2000148587A JP 2000148587 A JP2000148587 A JP 2000148587A JP 10327249 A JP10327249 A JP 10327249A JP 32724998 A JP32724998 A JP 32724998A JP 2000148587 A JP2000148587 A JP 2000148587A
Authority
JP
Japan
Prior art keywords
access
storage area
storage
data
cache
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
JP10327249A
Other languages
Japanese (ja)
Inventor
Masaya Suenaga
雅也 末永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP10327249A priority Critical patent/JP2000148587A/en
Publication of JP2000148587A publication Critical patent/JP2000148587A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • G06F12/0886Variable-length word access

Abstract

PROBLEM TO BE SOLVED: To improve the efficiency of an access by determining a storage area suited to the contents of an access to a storage area and using the determined storage area. SOLUTION: A cache memory 4 is provided with two sorts of cache memories 4a, 4b having respectively different page sizes and these cache memories 4a, 4b are properly used in accordance with the sort of an access from a host computer 1 or the quantity of data for the access. In the case of accessing data of large capacity when the cache memory 4b having large page size is used, the umber of cache pages to be opened can be reduced. In the case of a sequential access, the efficiency of a cache can be improved by prereading data supposed to be accessed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、記憶装置および記
憶領域の切り替え方法に関し、特に、複数の記憶容量の
異なる記憶領域に格納された所定のデータに対して所定
のアクセスが実行された場合に、このアクセスに対応し
た記憶領域を決定するとともに、この決定した記憶領域
にてアクセスに対応する処理を実行する記憶装置および
記憶領域の決定方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a storage device and a storage area switching method, and more particularly to a method for performing a predetermined access to predetermined data stored in a plurality of storage areas having different storage capacities. The present invention also relates to a storage device that determines a storage area corresponding to this access, and executes a process corresponding to the access in the determined storage area, and a storage area determination method.

【0002】[0002]

【従来の技術】従来、この種の記憶装置として、特開平
6−44139号公報に開示されているものが知られて
いる。同公報において、記憶装置はキャッシュメモリを
使用したディスクキャッシュシステムであって、読み出
し用のデータを格納する揮発性の半導体メモリと、書き
込み用のデータを格納する不揮発性の半導体メモリとを
備えている。そして、読み出し要求または書き込み要求
に対応して、アクセス先の半導体メモリをそれぞれ振り
分ける。このとき、LRUに基づくページの置き換えに
おいては、所定の連続回数によって、外部記憶装置のデ
ータの不一致の未書き込みページの書き戻しを制御する
メモリ制御部を備えている。
2. Description of the Related Art Conventionally, as this type of storage device, one disclosed in Japanese Patent Application Laid-Open No. 6-44139 is known. In this publication, a storage device is a disk cache system using a cache memory, which includes a volatile semiconductor memory for storing read data and a nonvolatile semiconductor memory for storing write data. . Then, in response to the read request or the write request, the access destination semiconductor memory is allocated. At this time, when replacing pages based on the LRU, a memory control unit is provided which controls the write-back of unwritten non-matched pages of data in the external storage device by a predetermined number of consecutive times.

【0003】[0003]

【発明が解決しようとする課題】上述した従来の記憶装
置においては、読み出し要求や書き込み要求に対応して
メモリを切り替えてはいるものの、この読み出し要求や
書き込み要求おけるデータに容量に関わりなく、それぞ
れの単一のメモリに対して、データの読み出しや書き込
みを実行するため、メモリの効率的な利用をすることが
できないという課題があった。
In the above-mentioned conventional storage device, the memory is switched in response to a read request or a write request, but the data in the read request or the write request is not changed regardless of the capacity. Since data is read or written to or from a single memory, there is a problem that the memory cannot be used efficiently.

【0004】本発明は、上記課題にかんがみてなされた
もので、記憶領域に対するアクセスの内容に適合した記
憶領域を決定するとともに、この決定した記憶領域を使
用することによりアクセス効率を向上させることが可能
な記憶装置および記憶領域の決定方法の提供を目的とす
る。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and it is an object of the present invention to determine a storage area suitable for the contents of access to a storage area and to improve access efficiency by using the determined storage area. It is an object of the present invention to provide a possible storage device and a storage area determination method.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するた
め、請求項1にかかる発明は、所定のデータを格納する
記憶容量の異なる複数の記憶領域と、この記憶領域に対
して所定のデータの読み出しおよび書き込みのアクセス
を実行するアクセス手段と、このアクセス手段からのア
クセスを入力しつつ、このアクセスがシーケンシャルア
クセスかランダムアクセスかを判別するとともに、この
アクセスに対応するデータサイズを判別するアクセス入
力判別手段と、このアクセス入力判別手段が入力しつつ
判別したアクセス手段によるアクセスに応じて複数の記
憶領域から所定の記憶領域を決定するとともに、この決
定した記憶領域に切り替える記憶領域決定手段とを具備
する構成としてある。
In order to achieve the above object, the invention according to claim 1 comprises a plurality of storage areas having different storage capacities for storing predetermined data; Access means for executing read and write access, and access input determination for determining whether the access is a sequential access or a random access while receiving the access from the access means, and determining a data size corresponding to the access Means for determining a predetermined storage area from a plurality of storage areas in accordance with an access by the access means determined while input by the access input determination means, and switching to the determined storage area. There is a configuration.

【0006】上記のように構成した請求項1にかかる発
明において、記憶装置は所定のデータを格納する記憶領
域として記憶容量の異なる複数の領域を有する記憶領域
を備えている。ここで、アクセス手段から所定のデータ
の読込みおよび書き込みのアクセスが実行され、このア
クセスをアクセス入力判別手段が入力すると、アクセス
入力判別手段は、このアクセスがランダムアクセスであ
るか、シーケンシャルアクセスであるかを判別するとと
もに、このアクセスによるデータサイズを判別する。そ
して、記憶領域決定手段は、このアクセス入力判別手段
にて判別されたアクセスの内容およびデータサイズに応
じて、領域の大きさが異なる複数の記憶領域から適当な
記憶領域を選択して、このアクセスに対応する所定のデ
ータの読み込みまたは書き込みを行う。
In the invention according to claim 1 configured as described above, the storage device includes a storage area having a plurality of areas having different storage capacities as a storage area for storing predetermined data. Here, access for reading and writing of predetermined data is executed from the access means, and when this access is input by the access input determining means, the access input determining means determines whether the access is a random access or a sequential access. And the data size due to this access is determined. The storage area determining means selects an appropriate storage area from a plurality of storage areas having different sizes according to the contents of access and the data size determined by the access input determining means. Or reading or writing of predetermined data corresponding to.

【0007】すなわち、複数の大きさが異なる領域を有
する記憶領域からアクセスに適合する大きさを有する記
憶領域を選択しつつ、この選択した記憶領域にて読み込
みまたは書き込みを実行するため効率よく記憶領域を利
用することが可能になる。
That is, a storage area having a size suitable for access is selected from a plurality of storage areas having different sizes, and reading or writing is performed in the selected storage area, so that the storage area is efficiently provided. Can be used.

【0008】また、請求項2にかかる発明は、請求項1
に記載の記憶装置において、上記アクセス入力判別手段
は、アクセス手段により入力したアクセスがランダムア
クセスであると、このランダムアクセスに対応するデー
タサイズを検出する構成としてある。
[0008] The invention according to claim 2 is based on claim 1.
In the storage device described in (1), when the access input by the access unit is a random access, the access input determining unit detects a data size corresponding to the random access.

【0009】上記のように構成した請求項2にかかる発
明において、アクセス入力判別手段にてアクセス手段に
より入力したアクセスがランダムアクセスである場合
は、このランダムアクセスに対応するデータのデータサ
イズを検出する。
In the invention according to claim 2 configured as described above, when the access input by the access means is random access, the data size of data corresponding to the random access is detected. .

【0010】これにより、このデータが第一の記憶領域
に存在する場合は、複数の第一の記憶領域からデータサ
イズに適した領域を有する記憶領域を選択することが可
能になる。そこで、請求項3にかかる発明は、請求項2
に記載の記憶装置において、上記アクセス入力判別手段
は、このアクセスに対応するデータが記憶領域に格納さ
れていることが判別すると、上記記憶領域決定手段は、
この検出したデータサイズに基づいて複数の記憶領域か
ら所定の記憶領域を決定する構成としてある。
Thus, when this data exists in the first storage area, it becomes possible to select a storage area having an area suitable for the data size from the plurality of first storage areas. Therefore, the invention according to claim 3 is based on claim 2
In the storage device according to the above, when the access input determination means determines that data corresponding to the access is stored in the storage area, the storage area determination means,
A predetermined storage area is determined from a plurality of storage areas based on the detected data size.

【0011】上記のように構成した請求項3にかかる発
明において、アクセス入力判別手段は、このアクセスに
対応するデータが記憶領域に格納されていることが判別
すると、記憶領域決定手段は、この検出したデータサイ
ズに基づいて複数の記憶領域から所定の記憶領域を決定
する。
In the invention according to claim 3 configured as described above, when the access input determining means determines that the data corresponding to the access is stored in the storage area, the storage area determining means performs the detection. A predetermined storage area is determined from the plurality of storage areas based on the obtained data size.

【0012】上記記憶領域を構成する具体的な一例とし
て、請求項4にかかる発明は、請求項1〜請求項3のい
ずれかに記載の記憶装置において、上記記憶領域は、キ
ャッシュメモリにて構成してある。上記のように構成し
た請求項4にかかる発明において、記憶領域を構成する
キャッシュメモリは、複数であってもよいし、その大き
さは適宜変更可能である。
As a specific example of configuring the storage area, the invention according to claim 4 is the storage device according to any one of claims 1 to 3, wherein the storage area is configured by a cache memory. I have. In the invention according to claim 4 configured as described above, the number of cache memories constituting the storage area may be plural, and the size thereof can be changed as appropriate.

【0013】また、このキャッシュメモリの構成とし
て、請求項5にかかる発明は、請求項4に記載の記憶装
置において、上記キャッシュメモリは、複数の記憶領域
の境界を変化可能に構成してある。上記のように構成し
た請求項5にかかる発明において、キャッシュメモリは
複数の大きさが異なる記憶領域を備え、状況に従ってこ
の複数の記憶領域の境界を変化させることにより、各記
憶領域の大きさを適宜変更可能になっている。
According to a fifth aspect of the present invention, in the storage device according to the fourth aspect, the cache memory is configured so that boundaries of a plurality of storage areas can be changed. In the invention according to claim 5 configured as described above, the cache memory includes a plurality of storage areas having different sizes, and by changing boundaries of the plurality of storage areas according to the situation, the size of each storage area is reduced. It can be changed as needed.

【0014】このように、複数の記憶容量の異なる記憶
領域に格納された所定のデータに対して所定のアクセス
が実行された場合に、このアクセスに対応した記憶領域
を決定するとともに、この決定した記憶領域にてアクセ
スに対応する処理を実行する記憶領域の決定手法は必ず
しも実体のある装置に限られる必要はなく、その方法と
しても機能することは容易に理解できる。
As described above, when a predetermined access is performed to predetermined data stored in a plurality of storage areas having different storage capacities, a storage area corresponding to the access is determined, and the determined storage area is determined. The method of determining a storage area for executing a process corresponding to an access in the storage area is not necessarily limited to a substantial device, and it can be easily understood that the method also functions as the method.

【0015】このため、請求項6にかかる発明は、複数
の記憶容量の異なる記憶領域に格納された所定のデータ
に対して所定のアクセスが実行された場合に、このアク
セスに対応した記憶領域を決定するとともに、この決定
した記憶領域にてアクセスに対応する処理を実行する記
憶領域の決定方法であって、所定のデータを格納する記
憶容量の異なる複数の記憶領域と、この記憶領域に対し
て所定のデータの読み出しおよび書き込みのアクセスを
実行するアクセス工程と、このアクセス工程からのアク
セスを入力しつつ、このアクセスがシーケンシャルアク
セスかランダムアクセスかを判別するとともに、このア
クセスに対応するデータサイズを判別するアクセス入力
判別工程と、このアクセス入力判別工程が入力しつつ判
別したアクセス工程によるアクセスに応じて複数の記憶
領域から所定の記憶領域を決定するとともに、この決定
した記憶領域を使用してこのアクセスに対応する記憶領
域決定工程とを具備する構成としてある。すなわち、必
ずしも実体のある装置に限らず、その方法としても有効
であることに相違はない。
Therefore, according to the present invention, when a predetermined access is performed to predetermined data stored in a plurality of storage areas having different storage capacities, the storage area corresponding to the access is changed. A method for determining a storage area for executing a process corresponding to an access in the determined storage area, comprising: a plurality of storage areas having different storage capacities for storing predetermined data; An access step of executing read and write access to predetermined data; determining whether the access is a sequential access or a random access while inputting the access from the access step; and determining a data size corresponding to the access. Access input discriminating step, and an access process discriminated while inputting in the access input discriminating step. And it determines the predetermined storage area of a plurality of storage areas in response to the access by, it is constituted comprising a storage area determination step of using the determined storage area corresponding to this access. That is, there is no difference that the method is not necessarily limited to a substantial device and is effective as a method.

【0016】[0016]

【発明の実施の形態】以下、図面にもとづいて本発明の
実施形態を説明する。図1は、本発明の一実施形態にか
かる記憶装置を適用したメモリシステムをブロック図に
より示している。同図において、本メモリシステムはホ
ストコンピュータ1と、ホストアダプタ2と、キャッシ
ュ用コントローラ3と、キャッシュメモリ4と、ディレ
クトリ領域5と、ディスクアダプタ6と、ハードディス
ク7とから構成されている。ここで、ホストアダプター
2は、ホストコンピュータ1とキャッシュメモリ4との
インターフェース部であり、キャッシュメモリ4との間
のデータ転送を制御している部分である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a memory system to which a storage device according to an embodiment of the present invention is applied. In FIG. 1, the memory system comprises a host computer 1, a host adapter 2, a cache controller 3, a cache memory 4, a directory area 5, a disk adapter 6, and a hard disk 7. Here, the host adapter 2 is an interface between the host computer 1 and the cache memory 4, and controls data transfer between the host computer 1 and the cache memory 4.

【0017】ここで、ホストコンピュータ1から読み出
し要求や、書き込み要求のアクセスがあると、ディレク
トリ領域5において、このアクセスに伴うデータがハー
ドディスク6あるいはキャッシュメモリ4の何れに格納
されているかを確認するとともに、次の情報が確認され
る。 (1)データのタイプ(ディスクにすでに書き込みが終
わったか等)。 (2)書き込まれているデータのサイズはどのくらい
か。 (3)どのキャッシュページが現在アクセスされている
か。 (4)それぞれのキャッシュページの開始アドレスはど
こか。
When a read request or a write request is accessed from the host computer 1, the directory area 5 checks whether the data associated with the access is stored in the hard disk 6 or the cache memory 4, and The following information is confirmed. (1) Data type (whether data has already been written to the disk, etc.). (2) What is the size of the written data? (3) Which cache page is currently being accessed. (4) Where is the start address of each cache page?

【0018】すなわち、このディレクトリ領域5はキャ
ッシュページ4を検索するために必要な情報を管理する
機能を備えている。本実施形態においては、キャッシュ
メモリ4を8KBおよび64KBの二種類のキャッシュ
ページからなる記憶容量を有するキャッシュメモリ4
a,4bから構成する。
That is, the directory area 5 has a function of managing information necessary for searching the cache page 4. In the present embodiment, the cache memory 4 has a storage capacity of two types of cache pages of 8 KB and 64 KB.
a, 4b.

【0019】そして、キャッシュ用コントローラ3は、
このディレクトリ領域5を参照するとともに、キャッシ
ュメモリ4上にデータがあるかをチェックする。そし
て、キャッシュメモリ4上にアクセスされたデータが存
在すれば(キャッシュヒット)、キャッシュメモリ4か
ら該当するデータをホストコンピュータ1に転送する。
従って、ホストコンピュータ1からのアクセスに伴うデ
ータの転送を高速に実現することが可能となる。
The cache controller 3
This directory area 5 is referred to, and it is checked whether data exists in the cache memory 4. Then, if the accessed data exists in the cache memory 4 (cache hit), the corresponding data is transferred from the cache memory 4 to the host computer 1.
Therefore, data transfer accompanying access from the host computer 1 can be realized at high speed.

【0020】また、キャッシュ用コントローラ3はキャ
ッシュメモリ4上にデータが存在しなければ(キャッシ
ュミス)、ディスクアダプタ6と呼ばれるハードディス
ク7とキャッシュメモリ4との間のデータ転送を制御し
ている部分を介して、ハードディスク7から該当するデ
ータを取得するとともに、ホストアダプタ2を介してこ
の取得したデータをホストコンピュータ1に転送する。
その際に、キャッシュ用コントローラ3は、それまでの
ホストコンピュータ1のアクセスに関する履歴などを参
照しつつ、キャッシュメモリ4a,4bの何れか一方に
対して、上述したハードディスク7から取得したデータ
を格納する。これにより、以降、同じデータについてホ
ストコンピュータ1からアクセスがされたときは、この
キャッシュメモリ4a,4bの何れか一方に格納したデ
ータをホストコンピュータ1に転送することが可能にな
る。
If there is no data on the cache memory 4 (cache miss), the cache controller 3 controls a portion called a disk adapter 6 which controls data transfer between the hard disk 7 and the cache memory 4. Via the host adapter 2, the acquired data is transferred to the host computer 1 via the host adapter 2.
At this time, the cache controller 3 stores the data acquired from the hard disk 7 in one of the cache memories 4a and 4b while referring to the history of the access of the host computer 1 so far. . Thus, when the same data is accessed from the host computer 1 thereafter, the data stored in one of the cache memories 4a and 4b can be transferred to the host computer 1.

【0021】従って、このキャッシュメモリ4a,4b
が記憶領域を構成するとともに、ホストコンピュータ1
およびホストアダプタ2がアクセス手段を構成し、キャ
ッシュ用コントローラ3が記憶領域決定手段を構成し、
ディレクトリ領域5がアクセス入力判別手段を構成す
る。
Therefore, the cache memories 4a and 4b
Constitutes a storage area, and the host computer 1
And the host adapter 2 constitute an access means, the cache controller 3 constitutes a storage area determining means,
The directory area 5 constitutes an access input determining means.

【0022】次に、図2および図3を参照して本実施形
態の動作を説明する。最初に大きなページサイズを有す
るキャッシュメモリ4bと小さなページサイズを有する
キャッシュメモリ4aとのどちらかを使用するかを決定
する処理内容について図2のフローチャートを参照して
説明する。
Next, the operation of the present embodiment will be described with reference to FIGS. First, the process of determining whether to use the cache memory 4b having a large page size or the cache memory 4a having a small page size will be described with reference to the flowchart of FIG.

【0023】同図において、ホストコンピュータ1から
読み出し要求あるいは書き込み要求のアクセスコマンド
の受信を待機するとともに、どちらかのページサイズの
キャッシュメモリ4a,4bを使用するかを決定する所
定の要求の受信を待機する(ステップA1)。そして、
アクセスコマンドを受信すると、上述した所定の要求が
シーケンシャルアクセスであるかランダムアクセスであ
るかを判別する(ステップA2)。これは、シーケンシ
ャルアクセスとランダムアクセスによって、キャッシュ
メモリ4a,4bを選択するためである。また、このと
き、それまでのホストコンピュータ1からのアクセスの
履歴などを参照してキャッシュ用コントローラ3がどち
らのアクセス方法であるか、すなわち、シーケンシャル
アクセスあるいはランダムアクセスかを判断する(ステ
ップA2)。
Referring to FIG. 2, the system waits for reception of an access command for a read request or a write request from the host computer 1 and receives a predetermined request for deciding which of the page sizes of the cache memories 4a and 4b to use. It waits (step A1). And
When the access command is received, it is determined whether the predetermined request is a sequential access or a random access (step A2). This is because the cache memories 4a and 4b are selected by the sequential access and the random access. At this time, the cache controller 3 determines which access method is used, that is, whether it is a sequential access or a random access, by referring to a history of accesses from the host computer 1 so far (step A2).

【0024】ここで、シーケンシャルアクセスであると
判断した場合は、大きなページサイズのキャッシュメモ
リ4bを採用するとともに、図4に示すようにキャッシ
ュページより必要なデータが小さく、データの無い部分
が存在した場合は将来のアクセスがあると予想される必
要なデータの周りのデータも一緒に先読みしておくこと
で、先読みしたデータへのアクセスが合った場合に、キ
ャッシュヒットするためキャッシュ効率を上げることが
できる。このようにシーケンシャルアクセスであると判
断した場合は、キャッシュメモリ4bにページサイズ分
のデータを転送する(ステップA3)。
If it is determined that the access is a sequential access, the cache memory 4b having a large page size is employed, and the required data is smaller than the cache page as shown in FIG. In this case, by reading ahead the data around the necessary data that is expected to be accessed in the future, it is possible to increase the cache efficiency because a cache hit occurs when the access to the pre-read data matches. it can. When it is determined that the access is a sequential access, data of a page size is transferred to the cache memory 4b (step A3).

【0025】かかる場合、キャッシュメモリ4bにおい
ては、このキャッシュメモリ4bのキャッシュサイズの
キャッシュメモリ4aとキャッシュメモリ4bとの境界
を変化させることを考慮し、この境界から一番離れてい
るキャッシュページから優先して使用する。ところで、
ランダムアクセスでは、キャッシュページが書き換えら
れる前に同じキャッシュページにアクセスする確率が低
いため、ページ数が足りなくなり、将来アクセスがある
と予想して先読みしておいたページを書き換えなければ
いけない回数が減るようにページサイズを減らし、ペー
ジ数を増やした方がキャッシュ効率が上がる。一方、デ
ータが大きい場合は、開かなければならないページサイ
ズの量が増え、かえって効率が上がらなくなってしま
う。
In such a case, in the cache memory 4b, in consideration of changing the boundary between the cache memory 4a and the cache memory 4b having the cache size of the cache memory 4b, priority is given to the cache page farthest from the boundary. To use. by the way,
In random access, since the probability of accessing the same cache page before the cache page is rewritten is low, the number of pages becomes insufficient, and the number of times that the page read ahead in anticipation of future access must be rewritten is reduced. Thus, reducing the page size and increasing the number of pages increases the cache efficiency. On the other hand, when the data is large, the amount of the page size to be opened increases, and the efficiency cannot be improved.

【0026】そこで、ステップA2においてランダムア
クセスであると判断した場合、大きなページサイズのキ
ャッシュメモリ4bを採用するとともに、データの大き
さがこのページサイズの量の半分以上であるかを判別す
る(ステップA4)。ただし、ランダムアクセスの場合
は、図4に示すようにデータの量がキャッシュページサ
イズより小さくデータの無い部分が存在しているときに
シーケンシャルファイルのように先読みしてもよいが、
そのページが書き換えられてしまう前に同じページのデ
ータにアクセスがある可能性が低いため、先読みは行わ
ず、必要なデータだけを転送する。
If it is determined in step A2 that the access is a random access, the cache memory 4b having a large page size is employed, and it is determined whether the data size is half or more of the page size (step A2). A4). However, in the case of random access, as shown in FIG. 4, when there is a portion where the amount of data is smaller than the cache page size and there is no data, the data may be read ahead like a sequential file.
Since it is unlikely that data on the same page will be accessed before the page is rewritten, prefetching is not performed and only necessary data is transferred.

【0027】ここで、データの大きさがページサイズの
半分以上である場合は大きなページを使用することにな
るが、大きいページサイズのキャッシュメモリ4bはシ
ーケンシャルアクセスにて使用した方が効率が良いた
め、不必要なページ(最後にアクセスがあってから長時
間たったページ、アクセス頻度の少ないページ、ランダ
ムアクセスで一時的に作成したページ、サイズの異なる
境界付近のページ等でもう必要ないと判断したページ)
があるか否かを確かめる(ステップA5)。そして、不
必要なページがあれば大きなページサイズのキャッシュ
メモリ4bを使用する(ステップA3)。
Here, when the data size is half or more of the page size, a large page is used. However, it is more efficient to use the large page size cache memory 4b by sequential access, so that it is more efficient. , Unnecessary pages (pages that have been in use for a long time since they were last accessed, pages that are accessed infrequently, pages that are temporarily created by random access, pages that are near the border with different sizes, etc. )
It is checked whether or not there is (step A5). If there is an unnecessary page, the cache memory 4b having a large page size is used (step A3).

【0028】一方、大きなページサイズの量が半分以下
である場合、または大きなページサイズのキャッシュメ
モリ4bに不必要なページが無いと判断した場合は、小
さなページサイズのキャッシュメモリ4aを使用する
(ステップA6)。次に、それぞれのページサイズの不
必要なページ率(消してしまってもかまわないと判断し
たページ数の割合)を求め(ステップA7)、小さなペ
ージサイズのキャッシュメモリ4aが大きなページサイ
ズのキャッシュメモリ4bに比べて不必要なページ率が
かなり大きい場合は、小さなページサイズの不必要なペ
ージの量が減るようにページサイズの境界を変更する
(ステップA8)。
On the other hand, when the amount of the large page size is less than half or when it is determined that there is no unnecessary page in the large page size cache memory 4b, the small page size cache memory 4a is used (step). A6). Next, an unnecessary page ratio of each page size (a ratio of the number of pages determined to be erasable) is obtained (step A7), and the cache memory 4a having the small page size is replaced with the cache memory having the large page size. If the unnecessary page rate is considerably larger than that of 4b, the page size boundary is changed so that the amount of unnecessary pages having a small page size is reduced (step A8).

【0029】同様に大きなページサイズの方が小さなペ
ージサイズの方に比べて不必要なページ率がかなり大き
い場合は、大きなページサイズの不必要なページサイズ
の不必要なページ量が減るようにページサイズの境界を
変更する(ステップA9)。
Similarly, when the unnecessary page rate of the large page size is considerably larger than that of the small page size, the unnecessary page size of the large page size is reduced so that the unnecessary page amount is reduced. The size boundary is changed (step A9).

【0030】一方、小さなページサイズと大きいページ
サイズの不必要なページ率のあまり差がない場合は、ペ
ージサイズの境界を変更せずにそのまま終了する。
On the other hand, if there is not much difference between the unnecessary page rate of the small page size and the unnecessary page rate of the large page size, the process is terminated without changing the page size boundary.

【0031】次に、図3を参照してホストコンピュータ
1からの読み出し要求または書き込み要求のアクセスが
発生した場合におけるそれぞれの動作について説明す
る。最初に読み出し要求のアクセスが発生したときの動
作を説明する。同図において、ホストコンピュータ1か
らコマンドを受信し(ステップB1)、読み出し要求の
コマンドであるか否かを確認する(ステップB2)。そ
して、読み出し要求のコマンドを確認すると、データが
キャッシュメモリ4上に存在しているかどうかをそれぞ
れの大きさのキャッシュメモリ4a,4bのディレクト
リ領域5を参照しながら検索する(ステップB3)。こ
こで、データがキャッシュメモリ4上に存在していた場
合は、キャッシュメモリ4からホストコンピュータ1に
データを転送する(ステップB6)。
Next, each operation when a read request or a write request is accessed from the host computer 1 will be described with reference to FIG. First, the operation when a read request access occurs will be described. In the figure, a command is received from the host computer 1 (step B1), and it is confirmed whether or not the command is a read request command (step B2). When the command of the read request is confirmed, whether or not the data exists in the cache memory 4 is searched with reference to the directory areas 5 of the cache memories 4a and 4b of the respective sizes (step B3). If the data exists in the cache memory 4, the data is transferred from the cache memory 4 to the host computer 1 (step B6).

【0032】一方、データがキャッシュメモリ4上に存
在していなかった場合は、上述した「大きなページサイ
ズのキャッシュメモリ4bと小さなページサイズのキャ
ッシュメモリ4aの何れかを使用するかを決定する処
理」を実行して、使用するキャッシュメモリ4a,4b
を決定する(ステップB5)。このとき、決定したキャ
ッシュメモリ4a,4bに対してハードディスク7から
データを転送するとともに(ステップB9)、ディレク
トリ領域5を更新する(ステップB11)。
On the other hand, if the data does not exist in the cache memory 4, the above-mentioned "process for determining whether to use the cache memory 4b having a large page size or the cache memory 4a having a small page size" is described above. And the cache memories 4a and 4b to be used
Is determined (step B5). At this time, data is transferred from the hard disk 7 to the determined cache memories 4a and 4b (step B9), and the directory area 5 is updated (step B11).

【0033】次に、書き込み要求のアクセスが発生した
場合における動作を説明する。同図において、ホストコ
ンピュータ1からコマンドを受信し(ステップB1)、
書き込み要求のコマンドであるか否かを確認する(ステ
ップB2)。そして、書き込み要求のコマンドと確認す
ると、データがキャッシュメモリ4上に存在しているか
どうかをそれぞれの大きさのキャッシュメモリ4a,4
bのディレクトリ領域5を参照しながら検索する(ステ
ップB4)。
Next, the operation when a write request access occurs will be described. In the figure, a command is received from the host computer 1 (step B1),
It is checked whether the command is a write request command (step B2). Then, when it is confirmed that the command is a write request command, it is determined whether data exists in the cache memory 4 or not.
The search is performed with reference to the directory area 5 of step b (step B4).

【0034】ここで、データがキャッシュメモリ4上に
存在していた場合は、キャッシュメモリ4からホストコ
ンピュータ1にデータを転送する(ステップB7)。
If the data exists in the cache memory 4, the data is transferred from the cache memory 4 to the host computer 1 (step B7).

【0035】一方、データがキャッシュメモリ4上に存
在していなかった場合は、上述した「大きなページサイ
ズのキャッシュメモリ4bと小さなページサイズのキャ
ッシュメモリ4aの何れかを使用するかを決定する処
理」を実行して、使用するキャッシュメモリ4a,4b
を決定する(ステップB8)。このとき、決定したキャ
ッシュメモリ4a,4bに対してホストコンピュータ1
からデータを書き込む(ステップB10)とともに、デ
ィレクトリ領域5を更新し(ステップB12)、ディス
クアダプタ6がタイミングをみてハードディスク7につ
いて変更した内容を更新する(ステップB13)。
On the other hand, if the data does not exist in the cache memory 4, the above-mentioned "process for determining whether to use the cache memory 4b having a large page size or the cache memory 4a having a small page size" is described above. And the cache memories 4a and 4b to be used
Is determined (step B8). At this time, the host computer 1 stores the determined cache memories 4a and 4b.
(Step B10), the directory area 5 is updated (step B12), and the contents changed by the disk adapter 6 with respect to the hard disk 7 in view of the timing (step B13).

【0036】本実施の形態においては、ページサイズの
異なるキャッシュメモリ4a,4bについて、8KB、
64KBの大きさのキャッシュページを採用したが、も
ちろん、このような大きさのキャッシュメモリ4a,4
bに限定されるものではなく、メモリシステムに適合し
た任意の大きさに適宜変更可能である。
In this embodiment, the cache memories 4a and 4b having different page sizes have 8 KB,
Although a cache page of 64 KB is employed, of course, the cache memories 4a, 4
The size is not limited to b, and can be changed to any size suitable for the memory system.

【0037】また、本実施の形態においては二種類のペ
ージサイズからなるキャッシュメモリ4a,4bを使用
する構成を採用しているが、もちろん、このような二種
類に限定されるものではなく、メモリシステムに適合し
た任意の数種類のページサイズから構成するようにして
もよい。
Although the present embodiment employs a configuration in which the cache memories 4a and 4b having two types of page sizes are used, it is needless to say that the present invention is not limited to such two types of memory. Any number of page sizes suitable for the system may be used.

【0038】さらに、上述したようにランダムアクセス
であった場合に、図2に示すステップA4において、ど
ちらかのページサイズを使用した方が効率が良いかを判
断するデータの量は、メモリシステムによって異なるた
めことはいうまでもない。従って、この判断に使用する
データの量は適宜変更可能である。
Further, in the case of random access as described above, in step A4 shown in FIG. 2, the amount of data used to determine which page size to use is more efficient depends on the memory system. Needless to say, they are different. Therefore, the amount of data used for this determination can be changed as appropriate.

【0039】このように、キャッシュメモリ4において
ページサイズが異なる二種類のキャッシュメモリ4a,
4bを備えるとともに、ホストコンピュータ1からのア
クセスの種類やアクセスに伴うデータの量に応じて、こ
のキャッシュメモリ4a,4bを使い分けることによっ
て、ページサイズの大きいキャッシュメモリ4bを使用
したとき、大容量のデータのアクセスの場合は開くキャ
ッシュページの数を減少させることができるとともに、
シーケンシャルアクセスの場合はアクセスが予想される
データを先読みさせることによりキャッシュ効率を向上
させることが可能になる。
As described above, two types of cache memories 4a, 4a,
4b, the cache memories 4a and 4b are selectively used in accordance with the type of access from the host computer 1 and the amount of data accompanying the access, so that when the cache memory 4b having a large page size is used, a large capacity In the case of data access, the number of open cache pages can be reduced,
In the case of sequential access, it is possible to improve the cache efficiency by pre-reading the data that is expected to be accessed.

【0040】また、ページサイズの小さいキャッシュメ
モリ4aを使用したとき、無駄な記憶領域を省くことが
できるとともに、ランダムアクセスの場合にキャッシュ
ページ数が足りなくなることによって発生するキャッシ
ュメモリの内容の書き換えを行うキャッシュページ数を
削減することが可能になる。
When the cache memory 4a having a small page size is used, a useless storage area can be omitted, and the rewriting of the contents of the cache memory caused by a shortage of cache pages in the case of random access can be prevented. It is possible to reduce the number of cache pages to be performed.

【0041】[0041]

【発明の効果】以上説明したように本発明は、記憶領域
に対するアクセスの内容に適合した記憶領域にに切り替
えるとともに選択することにより、このアクセスに伴う
記憶領域への読込みまたは書き込み効率を向上させるこ
とが可能な記憶装置を提供する1ことができる。また、
請求項2または請求項3にかかる発明によれば、ランダ
ムアクセスにおけるデータサイズを検出することのよ
り、このデータサイズに応じた記憶領域を選択すること
が可能になる。
As described above, according to the present invention, by switching to and selecting a storage area suitable for the contents of access to the storage area, the efficiency of reading or writing to the storage area accompanying this access is improved. 1 capable of providing a storage device capable of performing the following operations. Also,
According to the second or third aspect of the present invention, it is possible to select a storage area according to the data size by detecting the data size in random access.

【0042】さらに、請求項4にかかる発明によれば、
第一の記憶領域にキャッシュメモリを採用することによ
り簡易に記憶装置を構成することができる。さらに、請
求項5にかかる発明によれば、第二の記憶領域にハード
ディスクを採用することにより簡易に記憶装置を構成す
ることができる。さらに、請求項6にかかる発明によれ
ば、記憶領域に対するアクセスの内容に適合した記憶領
域に切り替えるとともに選択することにより、このアク
セスに伴う記憶領域への読込みまたは書き込み効率を向
上させることが可能な記憶領域の切り替え方法の提供す
ることができる。
Further, according to the invention according to claim 4,
By employing a cache memory as the first storage area, a storage device can be easily configured. Further, according to the invention of claim 5, the storage device can be easily configured by adopting a hard disk as the second storage area. Furthermore, according to the invention of claim 6, by switching and selecting a storage area suitable for the contents of the access to the storage area, it is possible to improve the efficiency of reading or writing to the storage area due to this access. A storage area switching method can be provided.

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

【図1】本発明の一実施形態にかかる記憶装置を適用し
たメモリシステムのブロック図である。
FIG. 1 is a block diagram of a memory system to which a storage device according to an embodiment of the present invention is applied.

【図2】キャッシュメモリ4a,4bの何れか一方を選
択する処理の処理内容を示したフローチャートである。
FIG. 2 is a flowchart showing a process of selecting one of cache memories 4a and 4b.

【図3】ホストコンピュータ1からアクセスが発生した
場合に本メモリシステムが実行する処理の処理内容を示
したフローチャートである。
FIG. 3 is a flowchart showing processing contents of processing executed by the memory system when an access occurs from a host computer 1;

【図4】シーケンシャルアクセスの場合にキャッシュメ
モリに対して先読みを実施した場合のキャッシュメモリ
の状態を示した図である。
FIG. 4 is a diagram showing a state of the cache memory when a prefetch is performed on the cache memory in the case of a sequential access.

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

1 ホストコンピュータ 2 ホストアダプタ 3 キャッシュ用コントローラ 4 キャッシュメモリ 4a キャッシュメモリ 4b キャッシュメモリ 5 ディレクトリ領域 6 ディスクアダプタ 7 ハードディスク DESCRIPTION OF SYMBOLS 1 Host computer 2 Host adapter 3 Cache controller 4 Cache memory 4a Cache memory 4b Cache memory 5 Directory area 6 Disk adapter 7 Hard disk

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 所定のデータを格納する記憶容量の異な
る複数の記憶領域と、 この記憶領域に対して所定のデータの読み出しおよび書
き込みのアクセスを実行するアクセス手段と、 このアクセス手段からのアクセスを入力しつつ、このア
クセスがシーケンシャルアクセスかランダムアクセスか
を判別するとともに、このアクセスに対応するデータサ
イズを判別するアクセス入力判別手段と、 このアクセス入力判別手段が入力しつつ判別したアクセ
ス手段によるアクセスに応じて複数の記憶領域から所定
の記憶領域を決定するとともに、この記憶領域に切り替
える記憶領域決定手段とを具備することを特徴とする記
憶装置。
A plurality of storage areas having different storage capacities for storing predetermined data; access means for executing read and write access of predetermined data to the storage areas; and access from the access means. While inputting, access input determining means for determining whether the access is sequential access or random access and determining a data size corresponding to the access, and access by the access means determined while inputting by the access input determining means. A storage area determining means for determining a predetermined storage area from a plurality of storage areas in accordance with the storage area and switching to the storage area.
【請求項2】 上記請求項1に記載の記憶装置におい
て、 上記アクセス入力判別手段は、アクセス手段により入力
したアクセスがランダムアクセスであると、このランダ
ムアクセスに対応するデータサイズを検出することを特
徴とする記憶装置。
2. The storage device according to claim 1, wherein the access input determination means detects a data size corresponding to the random access when the access input by the access means is a random access. Storage device.
【請求項3】 上記請求項2に記載の記憶装置におい
て、 上記アクセス入力判別手段は、このアクセスに対応する
データが記憶領域に格納されていることが判別すると、
上記記憶領域決定手段は、この検出したデータサイズに
基づいて複数の記憶領域から所定の記憶領域を決定する
ことを特徴とする記憶装置。
3. The storage device according to claim 2, wherein the access input determining means determines that data corresponding to the access is stored in a storage area.
The storage device, wherein the storage area determination means determines a predetermined storage area from a plurality of storage areas based on the detected data size.
【請求項4】 上記請求項1〜請求項3のいずれかに記
載の記憶装置において、 上記記憶領域は、キャッシュメモリにて構成することを
特徴とする記憶装置。
4. The storage device according to claim 1, wherein said storage area is constituted by a cache memory.
【請求項5】 上記請求項4に記載の記憶装置におい
て、 上記キャッシュメモリは、複数の記憶領域の境界を変化
可能に構成することを特徴とする記憶装置。
5. The storage device according to claim 4, wherein the cache memory is configured so that boundaries of a plurality of storage areas can be changed.
【請求項6】 複数の記憶容量の異なる記憶領域に格納
された所定のデータに対して所定のアクセスが実行され
た場合に、このアクセスに対応した記憶領域を決定する
とともに、この決定した記憶領域にてアクセスに対応す
る処理を実行する記憶領域の決定方法であって、 所定のデータを格納する記憶容量の異なる複数の記憶領
域と、 この記憶領域に対して所定のデータの読み出しおよび書
き込みのアクセスを実行するアクセス工程と、 このアクセス工程からのアクセスを入力しつつ、このア
クセスがシーケンシャルアクセスかランダムアクセスか
を判別するとともに、このアクセスに対応するデータサ
イズを判別するアクセス入力判別工程と、 このアクセス入力判別工程が入力しつつ判別したアクセ
ス工程によるアクセスに応じて複数の記憶領域から所定
の記憶領域を決定するとともに、この決定した記憶領域
を使用してこのアクセスに対応する記憶領域決定工程と
を具備することを特徴とする記憶領域の決定方法。
6. When predetermined access is performed to predetermined data stored in a plurality of storage areas having different storage capacities, a storage area corresponding to the access is determined, and the determined storage area is determined. A method for determining a storage area for executing processing corresponding to an access, comprising: a plurality of storage areas having different storage capacities for storing predetermined data; and an access for reading and writing of predetermined data with respect to the storage area. An access input determining step of determining whether the access is a sequential access or a random access while inputting the access from the access step, and determining a data size corresponding to the access; and According to the access by the access step determined while the input determination step is And determines the predetermined storage area from 憶領 zone, the method for determining the storage area using the determined storage area, characterized by comprising a storage area determination step corresponding to this access.
JP10327249A 1998-11-17 1998-11-17 Storage device and method for determining storage area Pending JP2000148587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10327249A JP2000148587A (en) 1998-11-17 1998-11-17 Storage device and method for determining storage area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10327249A JP2000148587A (en) 1998-11-17 1998-11-17 Storage device and method for determining storage area

Publications (1)

Publication Number Publication Date
JP2000148587A true JP2000148587A (en) 2000-05-30

Family

ID=18197008

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10327249A Pending JP2000148587A (en) 1998-11-17 1998-11-17 Storage device and method for determining storage area

Country Status (1)

Country Link
JP (1) JP2000148587A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005276198A (en) * 2004-03-23 2005-10-06 Internatl Business Mach Corp <Ibm> System and method for balancing multiple memory buffer sizes
JP2006309581A (en) * 2005-04-28 2006-11-09 Aisin Aw Co Ltd Navigation system, cache memory and cache management method
WO2016203629A1 (en) * 2015-06-19 2016-12-22 株式会社日立製作所 Storage system and method for controlling cache

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005276198A (en) * 2004-03-23 2005-10-06 Internatl Business Mach Corp <Ibm> System and method for balancing multiple memory buffer sizes
JP2006309581A (en) * 2005-04-28 2006-11-09 Aisin Aw Co Ltd Navigation system, cache memory and cache management method
JP4725181B2 (en) * 2005-04-28 2011-07-13 アイシン・エィ・ダブリュ株式会社 Navigation system and cache management method
WO2016203629A1 (en) * 2015-06-19 2016-12-22 株式会社日立製作所 Storage system and method for controlling cache
JPWO2016203629A1 (en) * 2015-06-19 2017-11-24 株式会社日立製作所 Storage system and cache control method

Similar Documents

Publication Publication Date Title
US7613870B2 (en) Efficient memory usage in systems including volatile and high-density memories
US5218685A (en) System for write once read many optical storage devices to appear rewritable
CN100362462C (en) Method for managing magnetic disk array buffer storage
US6782454B1 (en) System and method for pre-fetching for pointer linked data structures
US4500954A (en) Cache bypass system with post-block transfer directory examinations for updating cache and/or maintaining bypass
JP4044067B2 (en) Priority-based flash memory control device for XIP in serial flash memory, memory management method using the same, and flash memory chip using the same
US7203815B2 (en) Multi-level page cache for enhanced file system performance via read ahead
JP4988215B2 (en) Adaptive flash memory controller employing multiple mapping techniques and flash memory system including the same
US6578111B1 (en) Cache memory system and method for managing streaming-data
US6948033B2 (en) Control method of the cache hierarchy
JP3898782B2 (en) Information recording / reproducing device
US6516389B1 (en) Disk control device
US20070005904A1 (en) Read ahead method for data retrieval and computer system
JPH11282631A (en) Input and output control device and method
US7975099B2 (en) Data storage system including respective buffers for non-volatile memory and disc recording medium, and data access method thereof
EP1269305A1 (en) Using an access log for disk drive transactions
EP0273665A2 (en) System for write once read many optical storage devices to appear rewritable
US20040059873A1 (en) Stream-down prefetching cache
KR102321346B1 (en) Data journaling method for large solid state drive device
JPH08137754A (en) Disk cache device
CN106980471A (en) A kind of method and device for the hard disk write performance for improving smart machine
WO2002027498A2 (en) System and method for identifying and managing streaming-data
JP2000148587A (en) Storage device and method for determining storage area
JPH07129464A (en) Information processor
JP3111912B2 (en) Disk cache control method