JP2006350633A - Data management method and data management system - Google Patents

Data management method and data management system Download PDF

Info

Publication number
JP2006350633A
JP2006350633A JP2005175199A JP2005175199A JP2006350633A JP 2006350633 A JP2006350633 A JP 2006350633A JP 2005175199 A JP2005175199 A JP 2005175199A JP 2005175199 A JP2005175199 A JP 2005175199A JP 2006350633 A JP2006350633 A JP 2006350633A
Authority
JP
Japan
Prior art keywords
cache
data
data management
access request
storage device
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
JP2005175199A
Other languages
Japanese (ja)
Inventor
Kunihiro Shiotani
邦浩 塩谷
Norihiro Hara
憲宏 原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP2005175199A priority Critical patent/JP2006350633A/en
Publication of JP2006350633A publication Critical patent/JP2006350633A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To maintain the cache hit rate of frequently accessed data by preventing the data to be accessed frequently from being removed as much as possible. <P>SOLUTION: An application 4 specifies a cache control system according to the type of an access request at each access request, and a data managing device 5 controls a cache 8 according to the specified cache control system. Data to be held in the cache 8 are managed in the order of the time of use. The data managing device 5 holds the used data at the latest time position of the cache, when the cache control system controls data to be accessed frequently to prevent the data from being removed from the cache, and holds the used data at an older predetermined time position in the cache, when the cache control system controls data that are not accessed frequently. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、データ管理方法及びデータ管理システムに係り、特に、外部記憶装置に保持されているファイルデータやデータベースのデータを主記憶装置のキャッシュに保持するために使用して好適なデータ管理方法及びデータ管理システムに関する。   The present invention relates to a data management method and a data management system, and in particular, a data management method suitable for use in holding file data and database data held in an external storage device in a cache of a main storage device, and The present invention relates to a data management system.

外部記憶装置に保持されているファイルデータやデータベースのデータを主記憶装置のキャッシュに保持するための管理に関する従来技術として、例えば、特許文献1等に記載された技術が知られている。   As a conventional technique related to management for holding file data and database data held in an external storage device in a cache of a main storage device, for example, a technique described in Patent Document 1 is known.

特許文献1に記載の従来技術は、外部記憶装置に保持されているファイルデータやデータベースのデータを主記憶装置のキャッシュに読み込むため、すでにキャッシュに読み込まれているデータのいずれかを追い出すものである。このとき、どのデータをキャッシュに残すかの判断基準が必要であり、前述の従来技術は、この判断基準として、特に使用頻度の高いデータをキャッシングするため、ログインするユーザ毎に使用頻度の高いデータに高い優先度を設定し、そのようなデータを高い確率でキャッシュに残すようなキャッシュ管理を行っている。具体的には、ユーザ名とユーザが頻繁にアクセスするデータとを対応づけて記録するアクセス頻度データベースを持ち、キャッシュのデータコピーに優先度を設定している。
特開平7−93205号公報
In the prior art described in Patent Document 1, file data or database data held in an external storage device is read into the cache of the main storage device, and thus any of the data already read into the cache is driven out. . At this time, a criterion for determining which data is left in the cache is necessary, and the above-described conventional technique caches frequently used data as the determination criterion. Therefore, data frequently used for each logged-in user is used. The cache management is performed so that a high priority is set to the data and such data is left in the cache with a high probability. Specifically, it has an access frequency database that records a user name and data frequently accessed by the user in association with each other, and sets a priority for data copy in the cache.
JP-A-7-93205

前述した従来技術は、使用頻度の高いデータを少量に参照や更新を行う場合、キャッシュから優先度の低いデータを追い出し、頻繁にアクセスするデータを追い出さないようにすることができ、データのアクセスに対して高い確率でキャッシュからアクセスすることができるものである。しかし、データに対する作業は多種多様であり、異なるデータにアクセスする別の作業を行うような場合、前述した従来技術は、以前の使用頻度の高いデータに高い優先度が設定してあるため、優先度の設定の変化に対応することができず、使用しないデータがキャッシュから追い出されないので、アクセスするデータに対するキャッシュ容量が少なくなってしまい、データのアクセスに対して頻繁にキャッシュからの追出しの処理と外部記憶装置のデータをキャッシュに取り込む処理とが行われ、システムの性能が劣化してしまうという問題点を生じてしまう。   The above-mentioned conventional technology can expedite low-priority data from the cache and prevent frequently accessed data from being expelled when referring to or updating frequently used data in small quantities. On the other hand, it can be accessed from the cache with a high probability. However, there are a wide variety of operations on data, and when performing different operations to access different data, the above-mentioned conventional technology sets a high priority for data that has been frequently used before. Because it is not possible to cope with the change in the setting of the data and unused data is not evicted from the cache, the cache capacity for the data to be accessed is reduced, and the cache is frequently evicted for data access. And the process of fetching data of the external storage device into the cache is performed, which causes a problem that the performance of the system deteriorates.

また、前述した従来技術は、使用頻度の低いデータを対象とした大量の検索や更新が行われると、キャッシュの容量が有限であるため、高い優先度をもつデータであってもキャッシュから追い出されることに対処することができず、キャッシュ領域から追い出されて、再びキャッシュ領域に読み込まれるまでの間、外部記憶装置に直接読み込みが発生してしまい、システム全体の性能を劣化させてしまうという問題点を有している。   In addition, with the above-described conventional technology, if a large amount of search or update is performed on data with low usage frequency, the capacity of the cache is limited, so even high priority data is evicted from the cache. The problem is that the external storage device will be read directly until it is evicted from the cache area and read again into the cache area, degrading the performance of the entire system. have.

本発明の目的は、前述した従来技術の問題点を解決し、アクセスするデータの作業内容毎に対処することができ、頻繁にアクセスしているデータを定常的にキャッシュ上に残し、アクセスの高速化を図ることができるデータ管理方法及びデータ管理システムを提供することにある。   The object of the present invention is to solve the above-mentioned problems of the prior art, and can cope with each work content of data to be accessed. An object of the present invention is to provide a data management method and a data management system that can be realized.

本発明によれば前記目的は、計算機のアプリケーション実行により、外部記憶装置内のデータを主記憶装置のキャッシュに保持する制御を行うデータ管理方法において、前記アプリケーションが、アクセス要求を行う毎に、アクセス要求の種類に従ったキャッシュ制御方式を指定し、キャッシュの制御を行うデータ管理装置が、指定されたキャッシュ制御方式に従ってキャッシュの制御を行うことにより達成される。   According to the present invention, in the data management method for controlling to hold the data in the external storage device in the cache of the main storage device by executing the application of the computer, the access is performed each time the application makes an access request. This is achieved by a data management apparatus that specifies a cache control method according to the type of request and controls the cache, and controls the cache according to the specified cache control method.

また、前記目的は、計算機のアプリケーション実行により、外部記憶装置内のデータを主記憶装置のキャッシュに保持する制御を行うデータ管理装置を備えるデータ管理システムにおいて、前記アプリケーションが、アクセス要求を行う毎に、アクセス要求の種類に従ったキャッシュ制御方式を指定し、前記データ管理装置が、指定されたキャッシュ制御方式に従ってキャッシュの制御を行うことにより達成される。   In addition, the object is to provide a data management system including a data management device that performs control to hold data in an external storage device in a cache of a main storage device by executing an application of the computer, each time the application makes an access request. This is achieved by designating a cache control method according to the type of access request, and controlling the cache by the data management device according to the designated cache control method.

本発明によれば、頻繁にアクセスするデータをキャッシュからなるべく追い出さないようにして、頻繁にアクセスするデータのキャッシュヒット率を維持することができる。   According to the present invention, it is possible to maintain the cache hit rate of frequently accessed data by preventing frequently accessed data from being expelled from the cache as much as possible.

以下、本発明によるデータ管理方法及びデータ管理システムの実施形態を図面により詳細に説明する。   Embodiments of a data management method and a data management system according to the present invention will be described below in detail with reference to the drawings.

図1は本発明の一実施形態によるデータ管理システムの構成を示すブロック図である。図1において、1は計算機、2は外部記憶装置、3は主記憶装置、4はアプリケーション、5はデータ管理装置、6はアクセス要求制御部、7はキャッシュ管理制御部、8はキャッシュ、9はデータ領域である。   FIG. 1 is a block diagram showing a configuration of a data management system according to an embodiment of the present invention. In FIG. 1, 1 is a computer, 2 is an external storage device, 3 is a main storage device, 4 is an application, 5 is a data management device, 6 is an access request control unit, 7 is a cache management control unit, 8 is a cache, It is a data area.

本発明の実施形態によるデータ管理システムは、図1に示すように、アプリケーション4が実行される計算機1と、アプリケーション4の実行によりアクセスされる外部記憶装置2とにより構成される。計算機1は、その主記憶装置3上にアプリケーション4と、アプリケーション4からの要求を受け付けてデータアクセス要求を行うデータ管理装置5と、共用メモリとしてのキャッシュ8とが格納されている。データ管理装置5は、アクセス要求制御部6とキャッシュ管理制御部7とにより構成され、キャッシュ8を通して外部記憶装置2上のデータ領域9をアクセスする。   As shown in FIG. 1, the data management system according to the embodiment of the present invention includes a computer 1 that executes an application 4 and an external storage device 2 that is accessed when the application 4 is executed. The computer 1 stores on the main storage device 3 an application 4, a data management device 5 that accepts a request from the application 4 and makes a data access request, and a cache 8 as a shared memory. The data management device 5 includes an access request control unit 6 and a cache management control unit 7, and accesses the data area 9 on the external storage device 2 through the cache 8.

前述において、計算機1は、よく知られているように、主記憶装置3の他に、CPUを備えて構成され、本発明の実施形態でのデータ管理装置5を構成するアクセス要求制御部6とキャッシュ管理制御部7とは、外部記憶装置2に格納されたアプリケーションプログラムを主記憶装置3にロードして、OSの下でCPUに実行させることにより実現することができる。   In the foregoing, as is well known, the computer 1 includes a CPU in addition to the main storage device 3, and includes an access request control unit 6 constituting the data management device 5 in the embodiment of the present invention. The cache management control unit 7 can be realized by loading an application program stored in the external storage device 2 into the main storage device 3 and causing the CPU to execute it under the OS.

前述したように構成される本発明の実施形態において、アプリケーション4は、処理アクセス毎に、データ管理装置5に対して外部記憶装置2上に割り当てられれたデータ領域9を要求する。その際、アプリケーション4は、処理アクセス毎にキャッシュ制御方式を示すキャッシュ管理コードを設定し、このキャッシュ管理コードをもデータ管理装置5に渡す。データ管理装置5のアクセス要求制御部6は、アプリケーション4からのデータアクセス要求を解析し、その解析結果に基づいてキャッシュ管理制御部7に対してデータを要求する。キャッシュ管理制御部7は、キャッシュ8上に要求されたデータがあれば、そのデータを読み出して要求元に送信し、要求されたデータがキャッシュ8上にない場合、外部記憶装置2からデータ領域9のデータを読み出してキャッシュ8に書き込むと共に、そのデータを要求元に送信する。その際、キャッシュ管理制御部7は、アプリケーション4からの処理アクセス毎に指定されたキャッシュ管理コードで示されるキャッシュ制御方式に基づいてキャッシュ8へのデータの格納位置を決定する。   In the embodiment of the present invention configured as described above, the application 4 requests the data management device 5 for the data area 9 allocated on the external storage device 2 for each processing access. At that time, the application 4 sets a cache management code indicating a cache control method for each processing access, and also passes this cache management code to the data management apparatus 5. The access request control unit 6 of the data management apparatus 5 analyzes the data access request from the application 4 and requests data from the cache management control unit 7 based on the analysis result. If there is requested data on the cache 8, the cache management control unit 7 reads the data and transmits it to the request source. If the requested data is not on the cache 8, the cache management control unit 7 reads the data area 9 from the external storage device 2. Are read out and written into the cache 8, and the data is transmitted to the request source. At that time, the cache management control unit 7 determines the data storage position in the cache 8 based on the cache control method indicated by the cache management code designated for each processing access from the application 4.

図2は本発明の実施形態において、アプリケーションからのアクセス要求に対して要求されたデータを返送するまでの処理動作を説明するフローチャートであり、次に、これについて説明する。   FIG. 2 is a flowchart for explaining processing operations until data requested in response to an access request from an application is returned in the embodiment of the present invention. Next, this will be described.

(1)計算機1内のアプリケーション4がデータ管理装置5にデータアクセス要求を行うと、データ管理装置5内のアクセス要求制御部6は、データアクセス要求を解析し、その結果に基づいて、対象となるデータをキャッシュ管理制御部7に要求する。アクセスを要求を受けたキャッシュ管理制御部7は、データアクセス制御処理を行い、要求されたデータがキャッシュ8に読み込み済みであるか否かを判定する(ステップS1)。 (1) When the application 4 in the computer 1 makes a data access request to the data management device 5, the access request control unit 6 in the data management device 5 analyzes the data access request, and based on the result, To the cache management control unit 7. The cache management control unit 7 that has received the access request performs data access control processing, and determines whether or not the requested data has been read into the cache 8 (step S1).

(2)ステップS1の判定で、要求されたデータがキャッシュ8に読み込み済みであった場合、キャッシュ管理制御部7は、指定されたキャッシュ制御方式での処理を行って、キャッシュ上の再書き込み位置(再格納位置)の決定を行い、対象のデータをキャッシュ8から読み込んで結果をアプリケーション4に返送する(ステップS2、S3)。 (2) If the requested data has already been read into the cache 8 in the determination in step S1, the cache management control unit 7 performs processing in the designated cache control method, and rewrites the position on the cache. (Restore location) is determined, the target data is read from the cache 8, and the result is returned to the application 4 (steps S2 and S3).

(3)ステップS1の判定で、要求されたデータがキャッシュ8に読み込み済みでなかった場合、キャッシュ管理制御部7は、外部記憶装置2のデータ領域9からデータを読み込み、指定されたキャッシュ制御方式による処理を行ってキャッシュ8上の追い出すデータの位置、外部記憶装置2のデータ領域9から読み込んだデータのキャッシュ8への書き込み位置(格納位置)の決定を行う(ステップS4、S5)。 (3) If it is determined in step S1 that the requested data has not been read into the cache 8, the cache management control unit 7 reads the data from the data area 9 of the external storage device 2 and designates the specified cache control method. Is performed to determine the position of data to be purged on the cache 8 and the write position (storage position) of the data read from the data area 9 of the external storage device 2 in the cache 8 (steps S4 and S5).

(4)その後、キャッシュ管理制御部7は、外部記憶装置2のデータ領域9から読み込んだデータをキャッシュ8のステップS5の処理で決定した位置に書き込んでキャッシュ8を更新すると共に、保持したデータをもとに結果をアプリケーション4に返送する(ステップS6、S7)。 (4) Thereafter, the cache management control unit 7 updates the cache 8 by writing the data read from the data area 9 of the external storage device 2 to the position determined in the process of step S5 of the cache 8, and the held data. The result is sent back to the application 4 (steps S6 and S7).

前述した本発明の実施形態での処理によれば、アプリケーションからのアクセス要求を、要求毎に指定されたキャッシュ管理方式で処理することができ、この処理により、要求が一時的にデータを参照する場合であっても適切なキャッシュ管理方式をアプリケーションが設定することにより、有限なキャッシュを効率よく割り当てることが可能となり、使用頻度の高いデータを、高い確率でキャッシュ領域に残すようなキャッシュの制御を行うことができる。この結果、キャッシュ領域を効率的に使用することができるので、頻繁にアクセスするデータを、定常的にキャッシュ上に残しておくことができデータアクセスの高速化を図ることができる。   According to the processing in the embodiment of the present invention described above, an access request from an application can be processed by a cache management method designated for each request, and the request temporarily refers to data by this processing. Even if this is the case, it is possible to efficiently allocate a finite cache by setting an appropriate cache management method, and control the cache so that frequently used data is left in the cache area with a high probability. It can be carried out. As a result, the cache area can be used efficiently, so that frequently accessed data can be constantly left on the cache, and the speed of data access can be increased.

図3は処理アクセス毎の異なるキャッシュ制御方式によりキャッシュを使用する例について説明する図である。図3に示す例では、アプリケーション4が、少量のデータを参照する業務の場合で、該当データが定常的にキャッシュ上に残っていてアクセス処理の高速化を図ることを期待するキャッシュ制御方式をLRU方式とし、逆に、データを全件処理するケース等の業務の場合で、キャッシュ上にデータが読み込まれてもそれを再利用することが求められないキャッシュ制御方式を非LRU方式として指定することができるものとしている。   FIG. 3 is a diagram illustrating an example in which a cache is used according to a different cache control method for each processing access. In the example shown in FIG. 3, in the case where the application 4 is a business that refers to a small amount of data, the cache control method that expects the corresponding data to remain on the cache and speed up the access processing is LRU. Specify a cache control method that is not required to be reused even if the data is read into the cache in the case of business such as a case where all data is processed, etc., as a non-LRU method It is supposed to be possible.

そして、計算機1上でアプリケーション4のアクセス要求a10によるLRU方式のデータアクセスと、アプリケーション4のアクセス要求b11による非LRU方式のデータアクセスが実行されており、キャッシュ8は、これらのアクセス要求a10、b11で共用されているものとする。   Then, the LRU method data access by the access request a10 of the application 4 and the non-LRU method data access by the access request b11 of the application 4 are executed on the computer 1, and the cache 8 stores these access requests a10 and b11. It is assumed that it is shared with.

図4は異なるキャッシュ制御方式によりキャッシュを共用する場合のキャッシュ内のデータの並びとキャッシュ管理制御部7における処理の概要とを説明する図であり、次に、図4を参照して、キャッシュ8内のデータの並び、キャッシュ管理制御部の制御により、有限なキャッシュ領域を異なるキャッシュ制御方式で有効に使用することができることを説明する。なお、以下では、キャッシュ制御方式として、LRU方式、非LRU方式を例に挙げて説明する。   FIG. 4 is a diagram for explaining the arrangement of data in the cache and the outline of processing in the cache management control unit 7 when the cache is shared by different cache control methods. Next, referring to FIG. It will be described that a finite cache area can be effectively used in different cache control methods by the arrangement of data in the memory and the control of the cache management control unit. In the following description, an LRU method and a non-LRU method will be described as examples of the cache control method.

まず、キャッシュ8内のデータの並びについて説明する。キャッシュ8内に格納されるデータのブロックは、最新1、最新2、……、最古3、最古2、最古1の順で使用された時間順に管理される。このため、各データのブロックは、その格納位置(キャッシュ内のデータ格納アドレス)の情報が図4に矢印で示すように順にチェーンにより接続されて管理される。そして、図4に示す例では、最古3〜最古1のデータブロックの格納位置が非LRU方式で使用されるキャッシュ領域であるとして設定され、最新1〜最古1までの全てのデータブロックの格納位置がLRU方式で使用することができるものとして設定されている。   First, the arrangement of data in the cache 8 will be described. The blocks of data stored in the cache 8 are managed in the order of time used in the order of latest 1, latest 2,..., Oldest 3, oldest 2, and oldest 1. For this reason, each block of data is managed by connecting information of its storage position (data storage address in the cache) in order by a chain as indicated by an arrow in FIG. In the example shown in FIG. 4, the storage position of the oldest 3 to oldest 1 data block is set as a cache area used in the non-LRU method, and all the data blocks from the latest 1 to the oldest 1 are set. Is set so that it can be used in the LRU method.

なお、チェーンにより接続されて管理されるのは、データブロックの格納位置を示すアドレスだけでよく、実際のデータは、キャッシュ8内のどの位置に格納されていてもよい。また、キャッシュ内の各データブロックには、そのデータが最も最近に利用されたときのキャッシュ制御方式が難であったかを示すために、非LRU方式で使用されたデータに非LRUフラグを付与しておくものとする。   Note that only the address indicating the storage location of the data block may be managed by being connected by the chain, and the actual data may be stored in any location in the cache 8. In addition, each data block in the cache is assigned a non-LRU flag to data used in the non-LRU method in order to indicate whether the cache control method was difficult when the data was most recently used. I shall keep it.

キャッシュ管理制御部7は、LRU方式で制御を行う場合、キャッシュに格納されている最古キャッシュデータ、図4に示す例では、最古1のデータを吐き出していき、また、外部記憶装置2からデータを読み込んで書き込む場合も、キャッシュ領域からデータを読み出す場合も、そのデータを常に最新のキャッシュ位置、図4に示す例では、最新1の位置に格納する。これにより、該当データが定常的にキャッシュ8上に残っていていく。   The cache management control unit 7 discharges the oldest cache data stored in the cache, in the example shown in FIG. Whether reading or writing data or reading data from the cache area, the data is always stored in the latest cache position, in the example shown in FIG. As a result, the corresponding data remains on the cache 8 constantly.

また、キャッシュ管理制御部7は、非LRU方式で制御を行う場合、キャッシュに格納されている最古キャッシュデータ、図4に示す例では、最古1のデータを吐き出していき、また、外部記憶装置2からデータを読み込んで書き込む場合も、キャッシュ領域からデータを読み出す場合も、そのデータを非LRU方式で使用するキャッシュ領域の最新のキャッシュ位置、図4に示す例では、最古3の位置に格納する。但し、キャッシュ領域から読み出すデータに前述した非LRUフラグなく、そのデータがLRU方式でキャッシュに書き込まれたものであった場合、そのデータは、最新のキャッシュ位置、図4に示す例では、最新1の位置に格納される。これにより、LRU方式で使用しているキャッシュ上のデータは、非LRU方式で使用された場合にも、キャッシュから吐き出されないようにすることができる。   In addition, the cache management control unit 7 discharges the oldest cache data stored in the cache, in the example shown in FIG. 4, the oldest 1 data when performing control by the non-LRU method. Whether the data is read and written from the device 2 or the data is read from the cache area, the latest cache position of the cache area in which the data is used in the non-LRU method, the oldest 3 position in the example shown in FIG. Store. However, if the data read from the cache area does not have the above-mentioned non-LRU flag and the data is written in the cache by the LRU method, the data is the latest cache location, in the example shown in FIG. Is stored at the position of. Thereby, data on the cache used in the LRU method can be prevented from being discharged from the cache even when used in the non-LRU method.

図5はキャッシュ管理制御部での処理動作を説明するフローチャートであり、次に、これについて説明する。   FIG. 5 is a flowchart for explaining the processing operation in the cache management control unit. Next, this will be explained.

(1)キャッシュ管理制御部は、アクセス要求を受け取ると、アプリケーションにより指定されるキャッシュ管理コードがLRU方式を指定しているか、非LRU方式を指定しているかを判定する(ステップS8)。 (1) Upon receiving the access request, the cache management control unit determines whether the cache management code specified by the application specifies the LRU method or the non-LRU method (step S8).

(2)ステップS8の判定で、アクセス要求a10が指定するLRU方式が指定されていた場合、要求データがキャッシュに読み込み済みか否かを判定し、要求データがキャッシュに読み込み済みの場合、対応データのキャッシュの格納位置の情報を最新の位置、すなわち、図4の最新1の位置に移動させる(ステップS9、S10)。 (2) If the LRU method specified by the access request a10 is specified in step S8, it is determined whether the request data has been read into the cache. If the request data has been read into the cache, the corresponding data The cache storage location information is moved to the latest location, that is, the latest location 1 in FIG. 4 (steps S9 and S10).

(3)ステップS9の判定で、要求データがキャッシュに読み込み済みでなかった場合、外部記憶装置からデータを読み込み、最古のデータがあるキャッシュ位置のデータ、図4の最古1のデータを追い出し、読み込んだデータをキャッシュの最新の位置、図4の最新1の位置に書き込む(ステップS11〜S13)。 (3) If the request data has not been read into the cache in step S9, the data is read from the external storage device, and the data at the cache location with the oldest data and the oldest data in FIG. The read data is written in the latest position of the cache, the latest position of FIG. 4 (steps S11 to S13).

(4)ステップS10、S13及び後述するステップS18の処理の後、対象キャッシュ情報に非LRUフラグがあれば、その非LRUフラグを削除し、キャッシュ上の要求されたデータをアプリケーションに返送する(ステップS14、S15)。 (4) After the processing of steps S10 and S13 and step S18 described later, if the target cache information has a non-LRU flag, the non-LRU flag is deleted, and the requested data on the cache is returned to the application (step) S14, S15).

LRU方式の場合の処理は、前述したように行われて、読み込むデータのキャッシュが常に最新の位置に移動されるため、頻繁にアクセスするデータに対するキャッシュの追い出しが起きず、キャッシュを維持することができる。   The processing in the case of the LRU method is performed as described above, and the cache of the data to be read is always moved to the latest position. Therefore, the cache is not expelled from frequently accessed data, and the cache can be maintained. it can.

(5)ステップS8の判定で、アクセス要求b11が指定する非LRU方式が指定されていた場合、要求データがキャッシュに読み込み済みか否かを判定し、要求データがキャッシュに読み込み済みの場合、対象データのキャッシュ情報に非LRUフラグが設定されているか否かを判定する(ステップS16、S17)。 (5) If the non-LRU method specified by the access request b11 is specified in the determination in step S8, it is determined whether the request data has been read into the cache. If the request data has been read into the cache, the target It is determined whether or not the non-LRU flag is set in the data cache information (steps S16 and S17).

(6)ステップS17の判定で、対象データのキャッシュ情報に非LRUフラグが設定されていなかった場合、そのデータは、以前にLRU方式で利用された頻繁にアクセスするデータであるため、データのキャッシュを最新の位置、図4で説明した最新1の位置に移動し、その後、前述したステップS14からの処理に移行する(ステップS18)。 (6) If it is determined in step S17 that the non-LRU flag is not set in the cache information of the target data, the data is frequently accessed data that was previously used in the LRU method. Is moved to the latest position, that is, the latest position described with reference to FIG. 4, and thereafter, the process proceeds to the process from step S14 described above (step S18).

(7)ステップS17の判定で、対象データのキャッシュ情報に非LRUフラグが設定されていた場合、そのデータは、以前に非LRU方式で読み込まれたデータであり、再読み込みされる可能性の少ないデータであるので、そのデータのキャッシュ位置を非LRU方式で使用されるキャッシュ領域の最も新しい位置、図4に示す最古3の位置に移動する(ステップS19)。 (7) If the non-LRU flag is set in the cache information of the target data in the determination in step S17, the data is data that has been read in the non-LRU method before and is less likely to be read again. Since it is data, the cache position of the data is moved to the newest position of the cache area used in the non-LRU method, the oldest 3 position shown in FIG. 4 (step S19).

(8)ステップS16の判定で、要求データがキャッシュに読み込み済みでなかった場合、外部記憶装置からデータを読み込み、最古のデータがあるキャッシュ位置、図4の最古1の位置のデータを追い出し、読み込んだデータをキャッシュの非LRU方式で使用されるキャッシュ領域の最も新しい位置、図4に示す最古3の位置に書き込む(ステップS20〜S22)。 (8) If the request data has not been read into the cache in the determination at step S16, the data is read from the external storage device, and the cache position where the oldest data is located and the data at the position of the oldest 1 in FIG. Then, the read data is written into the newest position of the cache area used in the non-LRU method of the cache, that is, the oldest 3 position shown in FIG. 4 (steps S20 to S22).

(9)ステップS19、S22の処理の後、対象キャッシュ情報に非LRUフラグを再設定し、キャッシュ上の要求されたデータをアプリケーションに返送する(ステップS23、S24)。 (9) After the processing in steps S19 and S22, the non-LRU flag is reset in the target cache information, and the requested data on the cache is returned to the application (steps S23 and S24).

前述したように、本発明の実施形態での非LRU方式による制御の場合の処理は、LRU方式の制御でキャッシュ内に書き込まれたデータを常に最新の位置に移動させるため、頻繁にアクセスされるデータがキャッシュから追い出されることがなく、キャッシュを維持することができる。また、非LRU方式の制御でキャッシュ内に書き込まれたデータは、非LRU方式で使用されるキャッシュ領域の最も新しい位置に移動させられるので、最小のキャッシュ容量を使用して非LRU方式によるアクセスが行われることになり、頻繁にアクセスするデータがキャッシュから追い出されることがないようにキャッシュを維持することができる。   As described above, the processing in the case of control by the non-LRU method in the embodiment of the present invention is frequently accessed in order to always move the data written in the cache by the control of the LRU method to the latest position. Data is not evicted from the cache and the cache can be maintained. Also, data written in the cache under non-LRU method control is moved to the newest location in the cache area used in the non-LRU method, so that access using the non-LRU method can be performed using the minimum cache capacity. The cache can be maintained so that frequently accessed data is not evicted from the cache.

前述した本発明の実施形態での処理は、プログラムにより構成し、計算機が備えるCPUに実行させることができ、また、それらのプログラムは、FD、CDROM、DVD等の記録媒体に格納して提供することができ、また、ネットワークを介してディジタル情報により提供することができる。   The processing in the above-described embodiment of the present invention is configured by a program and can be executed by a CPU provided in a computer, and these programs are provided by being stored in a recording medium such as an FD, CDROM, or DVD. And can be provided by digital information over a network.

前述した本発明の実施形態によれば、アクセス要求を行う毎に動作するキャッシュ制御方式を変更することができるため、データをキャッシュ領域からなるべく追い出さないようにして、頻繁にアクセスするデータのキャッシュヒット率を維持することができる。また、一時的に全件のデータを参照する場合等では、頻繁にアクセスする対象にならないように、データをキャッシュに読み込んでいくため、頻繁にアクセスするデータをキャッシュから追い出すようなことを防ぐことができる。   According to the above-described embodiment of the present invention, the cache control method that operates every time an access request is made can be changed, so that cache hits of frequently accessed data are avoided so as not to expel data from the cache area as much as possible. The rate can be maintained. In addition, when referring to all data temporarily, the data is read into the cache so that it is not frequently accessed, thus preventing frequently accessed data from being expelled from the cache. Can do.

前述した本発明の実施形態は、キャッシュ内に格納されるデータのブロックをアドレスによりチェーン管理するとして説明したが、本発明は、キャッシュ内に格納されるデータのブロックを時刻管理し、古い書込みデータを破棄していくLRU方式を行っている場合にも、同様に管理することができる。   In the above-described embodiment of the present invention, the block of data stored in the cache is described as being chain-managed by the address. However, the present invention manages the time of the block of data stored in the cache, and the old write data. The same management can be performed when the LRU method of discarding is performed.

また、本発明は、従来技術により説明した特許文献1に記載のように、優先度が設定される制御の場合にも適用することができる。すなわち、この場合、非優先度が設定された制御の場合、キャッシュに読み込まれているデータは優先度をそのまま維持ししてキャッシュに残し、キャッシュに読み込まれていないデータは優先度を強制的に非優先を示す0に設定してそのデータをキャッシュに書き込むようにすればよい。また、高い優先度が設定された制御の場合、キャッシュに読み込まれているデータで優先度0であれば優先度の再設定を行い、キャッシュに読み込まれていないデータには、既存通り優先度を設定してキャッシュに書き込むようにすればよい。   Further, the present invention can also be applied to the case of control in which priority is set as described in Patent Document 1 described in the related art. In other words, in this case, in the case of control in which a non-priority level is set, the data read into the cache is maintained in the priority level and remains in the cache, and the data that has not been read into the cache is forced to have a priority level. What is necessary is just to set to 0 which shows non-priority and to write the data to a cache. Also, in the case of control with a high priority set, if the priority is 0 for data read into the cache, the priority is reset, and the priority for data that has not been read into the cache is set as before. You can set it and write it to the cache.

前述したように、本発明は、種々のキャッシュ管理制御に対しても適用することができ、頻繁にアクセスするデータのキャッシュからの追い出しが起きないように、キャッシュを維持することができる。   As described above, the present invention can be applied to various cache management controls, and the cache can be maintained so that frequently accessed data is not purged from the cache.

本発明の一実施形態によるデータ管理システムの構成を示すブロック図である。It is a block diagram which shows the structure of the data management system by one Embodiment of this invention. 本発明の実施形態において、アプリケーションからのアクセス要求に対して要求されたデータを返送するまでの処理動作を説明するフローチャートである。6 is a flowchart illustrating processing operations until data requested in response to an access request from an application is returned in the embodiment of the present invention. 処理アクセス毎の異なるキャッシュ制御方式によりキャッシュを使用する例について説明する図である。It is a figure explaining the example which uses a cache by the different cache control system for every process access. 異なるキャッシュ制御方式によりキャッシュを共用する場合のキャッシュ内のデータの並びとキャッシュ管理制御部7における処理の概要とを説明する図である。It is a figure explaining the arrangement | sequence of the data in a cache in the case of sharing a cache by a different cache control system, and the outline | summary of the process in the cache management control part 7. FIG. キャッシュ管理制御部での処理動作を説明するフローチャートである。It is a flowchart explaining the processing operation in a cache management control part.

符号の説明Explanation of symbols

1 計算機
2 外部記憶装置
3 主記憶装置
4 アプリケーション
5 データ管理装置
6 アクセス要求制御部
7 キャッシュ管理制御部
8 キャッシュ
9 データ領域
10 アクセス要求a
11 アクセス要求b
DESCRIPTION OF SYMBOLS 1 Computer 2 External storage device 3 Main storage device 4 Application 5 Data management device 6 Access request control part 7 Cache management control part 8 Cache 9 Data area 10 Access request a
11 Access request b

Claims (4)

計算機のアプリケーション実行により、外部記憶装置内のデータを主記憶装置のキャッシュに保持する制御を行うデータ管理方法において、前記アプリケーションは、アクセス要求を行う毎に、アクセス要求の種類に従ったキャッシュ制御方式を指定し、キャッシュの制御を行うデータ管理装置は、指定されたキャッシュ制御方式に従ってキャッシュの制御を行うことを特徴とするデータ管理方法。   In a data management method for performing control to hold data in an external storage device in a cache of a main storage device by executing an application on a computer, the application performs a cache control method according to the type of access request each time an access request is made A data management method characterized in that a data management device that designates the cache and controls the cache controls the cache according to the designated cache control method. 前記キャッシュに保持されるデータは、使用された時間順に管理され、前記データ管理装置は、前記キャッシュ制御方式が、頻繁にアクセスされるデータに対するものであり、データをキャッシュから追い出されにくいように制御するものである場合、使用したデータをキャッシュの最も最近の時間位置に保持し、また、前記キャッシュ制御方式が、頻繁にはアクセスされないデータに対するものである場合、使用したデータをキャッシュの時間的に古い予め定めた時間位置に保持するようにキャッシュの制御を行うことを特徴とする請求項1記載のデータ管理方法。   The data held in the cache is managed in the order of time used, and the data management device controls the cache control method so that it is not frequently evicted from the cache because it is for frequently accessed data. The used data is kept at the most recent time position in the cache, and if the cache control method is for data that is not frequently accessed, the used data is 2. The data management method according to claim 1, wherein the cache is controlled so as to be held at an old predetermined time position. 前記頻繁にアクセスされるデータに対するアクセス制御方式がLRU方式であり、前記頻繁にはアクセスされないデータに対するアクセス制御方式が非LRU方式であることを特徴とする請求項1または2記載のデータ管理方法。   3. The data management method according to claim 1, wherein an access control method for the frequently accessed data is an LRU method, and an access control method for the data that is not frequently accessed is a non-LRU method. 計算機のアプリケーション実行により、外部記憶装置内のデータを主記憶装置のキャッシュに保持する制御を行うデータ管理装置を備えるデータ管理システムにおいて、前記アプリケーションは、アクセス要求を行う毎に、アクセス要求の種類に従ったキャッシュ制御方式を指定し、前記データ管理装置は、指定されたキャッシュ制御方式に従ってキャッシュの制御を行うことを特徴とするデータ管理システム。   In a data management system including a data management device that performs control to hold data in an external storage device in a cache of a main storage device by executing a computer application, each time an access request is made, the application sets the type of access request. A data management system according to claim 1, wherein the cache control method is designated, and the data management device controls the cache according to the designated cache control method.
JP2005175199A 2005-06-15 2005-06-15 Data management method and data management system Pending JP2006350633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005175199A JP2006350633A (en) 2005-06-15 2005-06-15 Data management method and data management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005175199A JP2006350633A (en) 2005-06-15 2005-06-15 Data management method and data management system

Publications (1)

Publication Number Publication Date
JP2006350633A true JP2006350633A (en) 2006-12-28

Family

ID=37646411

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005175199A Pending JP2006350633A (en) 2005-06-15 2005-06-15 Data management method and data management system

Country Status (1)

Country Link
JP (1) JP2006350633A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012081720A1 (en) * 2010-12-13 2012-06-21 日本電気株式会社 Data management device, system, program, and method
US9301178B2 (en) 2013-04-25 2016-03-29 Fujitsu Limited Data extraction method and data extraction device
JP2018086383A (en) * 2018-02-20 2018-06-07 株式会社三洋物産 Game machine
JP2020121197A (en) * 2020-04-15 2020-08-13 株式会社三洋物産 Game machine
JP2020138040A (en) * 2020-04-08 2020-09-03 株式会社三洋物産 Game machine

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012081720A1 (en) * 2010-12-13 2012-06-21 日本電気株式会社 Data management device, system, program, and method
JP5849969B2 (en) * 2010-12-13 2016-02-03 日本電気株式会社 Data management apparatus, system, program, and method
US9301178B2 (en) 2013-04-25 2016-03-29 Fujitsu Limited Data extraction method and data extraction device
JP2018086383A (en) * 2018-02-20 2018-06-07 株式会社三洋物産 Game machine
JP2020138040A (en) * 2020-04-08 2020-09-03 株式会社三洋物産 Game machine
JP2020121197A (en) * 2020-04-15 2020-08-13 株式会社三洋物産 Game machine

Similar Documents

Publication Publication Date Title
JP5351046B2 (en) Method and system for facilitating fast startup of a flash memory system
JP4317531B2 (en) System and method for balancing multiple memory buffer sizes
US8504792B2 (en) Methods and apparatuses to allocate file storage via tree representations of a bitmap
US9177028B2 (en) Deduplicating storage with enhanced frequent-block detection
US9733991B2 (en) Deferred re-MRU operations to reduce lock contention
US8572325B2 (en) Dynamic adjustment of read/write ratio of a disk cache
US10521123B2 (en) Additive library for data structures in a flash memory
US9514041B2 (en) Memory controller and memory system
JP4186509B2 (en) Disk system and its cache control method
US11809330B2 (en) Information processing apparatus and method
US20190243565A1 (en) Linked lists in flash memory
US11106373B2 (en) Flash interface for processing dataset
JP2010198610A (en) Data processing apparatus and method
CN107665095B (en) Apparatus, method and readable storage medium for memory space management
WO2015065449A1 (en) Cache controller for non-volatile memory
JP2005148868A (en) Data prefetch in storage device
US20130304972A1 (en) Control device, storage device, and storage control method
US20080301372A1 (en) Memory access control apparatus and memory access control method
JP2006350633A (en) Data management method and data management system
US11093408B1 (en) System and method for optimizing write amplification of non-volatile memory storage media
US7234039B1 (en) Method, system, and apparatus for determining the physical memory address of an allocated and locked memory buffer
US20200364151A1 (en) Hash tables in flash memory
US11481143B2 (en) Metadata management for extent-based storage system
JP2005352711A (en) Cache control method, data processing system, and processing program therefor
US11467730B1 (en) Method and system for managing data storage on non-volatile memory media