JP2008146516A - Data read-ahead processing method for recorder - Google Patents
Data read-ahead processing method for recorder Download PDFInfo
- Publication number
- JP2008146516A JP2008146516A JP2006335247A JP2006335247A JP2008146516A JP 2008146516 A JP2008146516 A JP 2008146516A JP 2006335247 A JP2006335247 A JP 2006335247A JP 2006335247 A JP2006335247 A JP 2006335247A JP 2008146516 A JP2008146516 A JP 2008146516A
- Authority
- JP
- Japan
- Prior art keywords
- data
- read
- cache memory
- prefetch
- recording medium
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、記録装置上にデータを格納し、それを読み出す処理プログラムにおいて、データを事前に記録装置内部キャッシュメモリ上に読み込ませることにより、記録装置からのデータ読み出し時間を短縮可能にした処理プログラムと記録装置に関するものである。 The present invention relates to a processing program for storing data on a recording device and reading the data, and by causing the data to be read in advance on the internal cache memory of the recording device so that the time for reading data from the recording device can be shortened. And the recording apparatus.
コンピュータシステムでは、一般にコンピュータ内部でのデータ処理に要する時間に比べ、記録装置とコンピュータ内部のメモリとの間のデータの読み出しおよび書き込みに要する時間が非常に大きい。関連性のあるデータを連続的に読み出すコンピュータシステムでは、このデータの読み出し処理を効率化することでシステムの処理性能を向上させることができる。 In a computer system, generally, a time required for reading and writing data between a recording device and a memory inside a computer is much longer than a time required for data processing inside the computer. In a computer system that continuously reads related data, the processing performance of the system can be improved by improving the efficiency of the data reading process.
そのための方法として、記録装置内部のキャッシュメモリを効率的に利用し、読み出し要求への応答時間を短縮する手法と、コンピュータシステムにおいて、読み出し済みのデータに対する表示や検索などの処理を行っている間の空き時間に、後に必要となるデータを記録装置からあらかじめ読み出す手法がある。 As a method for this, a method for efficiently using the cache memory in the recording device and shortening the response time to the read request, and a process of displaying or searching the read data in the computer system are performed. There is a method of reading data required later from the recording device in advance during the idle time.
図1は、このコンピュータシステムの概略を示すブロック構成図であり、利用者の検索指示を受付け、データの検索、加工および出力を制御する制御装置10と、データを格納する記録装置11から構成される。制御装置10は、データの検索および加工などのデータ操作と、記録装置へのデータ入出力処理の制御を行うデータ処理部101、利用者からの検索指示を受け取る入力部102、データ処理部101で生成された情報を利用者に向けて出力する出力部103、記録装置11から読み出したデータを一時的に蓄えるメモリ104から構成され、記録装置11は、実際にデータを格納する記録媒体111、この記録媒体111から読み出したデータを保持するキャッシュメモリ112、記録媒体111からの読み出しとキャッシュメモリ112へのデータ格納を制御する入出力制御部113から構成される。
FIG. 1 is a block diagram showing the outline of this computer system, which is composed of a
図2に一般的なキャッシュ機能を備えた記録装置11でのデータ読み出し処理を示す。入出力制御部113は、指定データがキャッシュメモリ112上に格納されているかを確認し(ステップ201)、格納されていなければ記録媒体111から読み出し(ステップ202)、キャッシュメモリ112上に保持する(ステップ203)。このデータを要求元の制御システムに転送し(ステップ204)、読み出し処理は完了する(ステップ205)。ここで入出力制御部113は、記録媒体111上で最後にアクセスしたデータに位置的に連続したものが近い将来にアクセスされる可能性が高いことを利用して、要求されたデータだけでなくそれに位置的に連続するデータもあらかじめ記録媒体111から読み出し(ステップ202)、キャッシュメモリ112上に保持しておく(ステップ203)。このため、後続の読み出し要求では、取得対象データがキャッシュメモリ112上に保持されている場合は記録媒体111へアクセスせずに、読み出し要求に高速に応答することができる(ステップ201、204、および205)。例えば、文献管理システムなどでは、一連の文献データを記録媒体111上に物理的に連続格納することによって、記録装置11の先読み効果を利用して検索性能を向上している。
FIG. 2 shows a data reading process in the
カーナビゲーションシステムでは、目的地を設定したルート走行において自車の移動に従って移動先の地図データを読み出し、遅延なく地図画像を表示する必要がある。しかし、2次元的な広がりを持つ地図データを、あらかじめ予測できないルートに従って連続的に記録媒体111上に配置することはできないため、記録装置11の先読み効果を利用することはできない。そこで、制御装置10では、データ処理部101および出力部103が読み出し済みデータの処理および表示を行っている間の空き時間を利用して、以後必要とされる可能性のあるデータをあらかじめ記録装置11から読み出し、メモリ104に保持しておく。この処理は記録媒体111からの読み出し(ステップ202)を伴うため処理時間がかかるが、データ処理部101が対象データを必要とした時点での記録装置11へのアクセスが不要となり、速やかにデータの処理および表示を行うことができる。
In a car navigation system, it is necessary to read out map data of a destination in accordance with the movement of the host vehicle in a route traveling with a destination set and display a map image without delay. However, since the map data having a two-dimensional extent cannot be continuously arranged on the recording medium 111 according to a route that cannot be predicted in advance, the prefetch effect of the
なお、本発明に関連する公知技術文献としては下記の特許文献1がある。 In addition, there exists the following patent document 1 as a well-known technical document relevant to this invention.
カーナビゲーションシステムの例のように、格納位置の連続性はないが関連性のある複数のデータを記録装置から読み出す処理を行うシステムにおいては、記録装置が持つ従来の先読みキャッシュの機能については効果が期待できない。そこで、記録装置上のデータをあらかじめ制御装置側のメモリ上に読み出す方式を使用することになるが、この方式には以下の問題がある。
(1)将来必要になるデータを事前に記録装置から読み出す処理では、対象データが記録装置の持つキャッシュメモリ上に存在せずに記録媒体からの読み出しを伴う可能性が高く、その完了を待つ必要があるため、制御装置の処理に十分な空き時間が必要である。
(2)記録装置から先読みしたデータを、使用されるまで制御装置のメモリ領域上に保持するため、その間はメモリ領域の一部が占有される。
In a system that reads a plurality of related data from a recording device that does not have continuity of storage positions, as in the case of a car navigation system, the conventional prefetch cache function of the recording device is effective. I can't expect it. Therefore, a method of reading data on the recording device in advance to the memory on the control device side is used, but this method has the following problems.
(1) In the process of reading data that will be required in the future from the recording device in advance, there is a high possibility that the target data does not exist in the cache memory of the recording device and is read from the recording medium, and it is necessary to wait for its completion Therefore, sufficient free time is required for processing of the control device.
(2) Since the prefetched data from the recording device is held in the memory area of the control device until it is used, a part of the memory area is occupied during that time.
本発明の目的は、上記問題点を解決した上で、格納位置に連続性のないデータの先読みを効率的に行うことができるデータの先読み処理方式を提供することにある。 An object of the present invention is to provide a data prefetching processing method that can efficiently perform prefetching of data having no continuity at storage positions after solving the above-mentioned problems.
上記目的を達成するために、本発明のデータの先読み処理方式は、利用者の要求データの読み出し処理を行う処理プログラムと、内部キャッシュ機構を備えた記録装置であって、処理プログラムからの先読み要求を受け付ける手段と、先読み要求データを記録媒体から記録装置内部のキャッシュメモリに読み込む手段とを備え、前記処理プログラムは、要求データの読み出し処理を行う処理プログラムであって、利用者の指示する先読みが必要な複数のデータの先読み要求を受け付ける手段と、受け付けた要求を元に記録装置へ先読み指示を行う手段と、記録装置が先読み処理を行うことと並行して読み出し済みデータの処理を行う手段を備え、前記記録装置は、処理プログラムからの先読み指示に従い、要求データの先読みを行う記録装置であって、先読み指示を受け付けた時点で記録媒体からの読み出し処理を開始すると同時に要求元への要求受け付け完了報告を行う手段と、要求のあったデータを要求元へは返却せず、記録媒体から記録装置内部キャッシュメモリへの読み出しのみを行う手段と、処理プログラムからの読み出し指示によりキャッシュメモリ上に読み出し済みのデータを要求元へ転送する手段を設けたものである。 In order to achieve the above object, the data prefetch processing method of the present invention is a processing program that performs a read process of user request data, and a recording device including an internal cache mechanism, and a prefetch request from the processing program. And a means for reading prefetch request data from a recording medium into a cache memory inside the recording apparatus, and the processing program is a processing program for performing a read process of the request data. Means for receiving a prefetch request for a plurality of necessary data, means for instructing a prefetch to the recording device based on the accepted request, and means for processing the read data in parallel with the prefetch processing performed by the recording device A recording apparatus that pre-reads request data in accordance with a pre-read instruction from a processing program. When the pre-reading instruction is received, the reading process from the recording medium is started, and at the same time, a request acceptance completion report to the request source is sent, and the requested data is not returned to the request source, but from the recording medium. There are provided means for only reading to the internal cache memory of the recording apparatus and means for transferring the data already read on the cache memory to the request source in accordance with a read instruction from the processing program.
本発明のデータの先読み処理方式によれば、次のような効果がある。 According to the data prefetching processing method of the present invention, the following effects are obtained.
データがインデクス部とデータ部に分かれて管理されている、またはデータがチェイン構造で管理されているなどのように、記録媒体上の格納位置に連続性がなく、従来の記録装置の先読みキャッシュの効果が低いような配置でデータを格納するシステムにおいて、記録装置による先読み機能を利用できる。 The storage location on the recording medium is not continuous, as in the case where the data is managed separately in the index part and the data part, or the data is managed in the chain structure. In a system that stores data in an arrangement that has a low effect, the prefetch function by the recording device can be used.
記録媒体上の格納位置に連続性がない複数のデータの読み出し処理において、制御装置でのデータ処理と並列して記録装置内部で先読み処理を行うことにより、制御装置での処理時間を消費せずに先読み処理を実現し、高速なデータアクセスができる。 In the read processing of a plurality of data where the storage positions on the recording medium are not continuous, the processing time in the control device is not consumed by performing the pre-read processing in the recording device in parallel with the data processing in the control device. Pre-read processing is realized, and high-speed data access is possible.
記録媒体上の格納位置に連続性がない複数のデータの読み出し処理において、記録装置内部のキャッシュメモリに先読みデータを保持することにより、制御装置のメモリ領域を使用せずに先読み処理を実現し、高速なデータアクセスができる。 In the read processing of a plurality of data where the storage position on the recording medium has no continuity, prefetch processing is realized without using the memory area of the control device by holding the prefetch data in the cache memory inside the recording device, High-speed data access is possible.
記録装置において、利用者が指示した先読み要求に従いデータを記録媒体から読み出してキャッシュメモリに格納する際に、記録媒体からの読み出し順を最適に並べ替えることにより、利用者の指定した順で読み出しを行う方法よりも高速に記録媒体からの読み出しを完了する。 In the recording device, when data is read from the recording medium and stored in the cache memory according to the prefetch request instructed by the user, the data is read in the order specified by the user by optimally rearranging the reading order from the recording medium. Reading from the recording medium is completed faster than the method to be performed.
記録装置において、利用者が指示した先読み要求で読み出したデータについて、優先度をつけてキャッシュメモリ内に他のデータ領域より長く保持するか、実際に読み出されるまでキャッシュメモリ内に保持することにより、通常のキャッシュ管理方式よりもキャッシュヒット率を向上させることができる。 In the recording device, the data read by the prefetch request instructed by the user is given a priority and is held longer than the other data area in the cache memory, or is held in the cache memory until it is actually read, The cache hit rate can be improved as compared with the normal cache management method.
以下、本発明を適用した検索システムの一実施の形態について説明する。 Hereinafter, an embodiment of a search system to which the present invention is applied will be described.
図3は、本発明の実施の形態の一例を示すシステム構成図であり、本検索システムは、地図データを格納した記録装置31と、このデータに対する検索、表示処理を行う制御装置30から構成されるカーナビゲーションシステムである。この制御装置30はデータの検索、加工などの処理を行うデータ処理部301と、利用者からの操作やGPS(Global Positioning System)の位置情報を取得する入力部302と、地図画像を表示する出力部303と、データを一時的に保持するメモリ304から構成される。
FIG. 3 is a system configuration diagram showing an example of an embodiment of the present invention. This search system is composed of a
記録装置31には、地図データを格納した記録媒体311と、キャッシュメモリ312と、入出力制御部313と、先読み制御部314が内蔵されている。制御装置30と記録装置31との間のインタフェースは、必要ならば記録装置インタフェース回路を使用する。入出力制御部313は、記録媒体311からのデータの読み出しを行う読み出しコマンドを含む一般的なアクセス用コマンドを受け付け、記録媒体311とキャッシュメモリ312のデータ入出力処理を制御する。先読み制御部314は、記録媒体311からデータを読み出しキャッシュメモリ312へデータを格納するための先読みコマンドを受け付け、入出力制御部313と相互作用し、記録媒体311とキャッシュメモリ312のデータ入出力処理を制御する。
The
図4は、記録媒体311に格納された地図データの物理的な配置と、意味的な関連性を示す。地図データはインデクス部43とデータ部44に分かれて管理され、記録媒体311に格納されている。また、データ部44は地図データを固定サイズ単位に分割した地図区画データで構成される。現在位置41の近傍をあらわす地図区画データ421〜427は意味的には隣接した地図情報を表すが、記録媒体311上での物理的な配置には必ずしも連続性がない。
FIG. 4 shows the physical arrangement of map data stored in the
本システムの制御装置30における検索処理のフローを図5に示し、先読み制御部314が先読みコマンドを受け付けた際のデータの先読み処理のフローを図6に示す。入出力制御部313が読み出しコマンドを受け付けた際のデータの読み出し処理は図2と同様である。
FIG. 5 shows a flow of search processing in the
まず、データ処理部301は現在位置41に対応する地図情報を検索し、該当する地図区画データ424を記録装置31から読み出し、メモリ304に格納する(ステップ501)。このデータを元に地図画像を生成し、出力部303が表示処理を行う。
First, the
データ処理部301は入力部302の入力情報に従い、次に読み出すべき地図画像を決定する(ステップ502)。現在位置と進行方向の経路情報から、次に必要となるデータは地図区画422および425であると予測される。ここで、地図区画425は読み出し済みの地図区画424と記録媒体311上での格納位置が連続しているため、記録装置31の先読みによりキャッシュメモリ312に格納されている可能性が高いが、地図区画422は格納位置が離れているため、その可能性は低い。
The
データ処理部301は、現在位置の近傍の地図区画データ421の範囲内の情報を表示している間に、記録装置31に対して、地図区画422および425のデータを指定して先読みコマンドを発行する(ステップ503)。記録装置の先読み制御部314はコマンドを受け付けるとすぐに、要求元に受付完了の通知を行う(ステップ601)。このためデータ処理部301はコマンド発行後すぐに、メモリ304上に格納済みの現在位置近傍のデータを使用し、画像の生成および表示処理を続行できる(ステップ504)。
The
データ処理部301が処理を続行しているのに並行して、記録装置の先読み制御部314は先読みコマンドの処理を続行する。指定データがキャッシュメモリ312に格納されているかを確認し(ステップ602)、格納されていない場合は記録媒体311から対象データを読み出し(ステップ603)、キャッシュメモリ312に格納する(ステップ604)。この時点ではキャッシュメモリ312への読み出しのみを行い、要求元への転送は行わない。
In parallel with the
ここで、連続して発行された先読みコマンドについて、先読み制御部314は要求されたデータの物理的な配置にしたがってその要求を並べ替え、記録媒体311へのアクセスを最適化してから、実際の読み出し処理を行う。コマンドの発行元では、先読みコマンドを発行する際に、対象データの配置およびコマンドの発行順序を意識する必要がない。
Here, for the pre-read commands issued continuously, the
現在位置41が遷移しデータ処理部301が地図区画422および225のデータを必要となったとき、データ処理部301は記録装置31に対して読み出しコマンドを発行し、対象データを記録装置31から読み出し、メモリ304に格納する(ステップ505)。この時点では、あらかじめ発行しておいた先読みコマンドは処理を完了しており、記録装置のキャッシュメモリ312に対象データが格納されている。したがって、読み出しコマンドを受け付けた入出力制御部313は、記録媒体311へアクセスせずにキャッシュメモリ312から制御装置のメモリ304へのデータ転送のみを行い、コマンドは短時間で完了する。これにより、データ処理部301および出力部303は現在位置41の移動に伴う地図画像の表示を遅延なく行うことができる。
When the
このように、記録装置31に対して指定データをキャッシュメモリ312に格納する指示をあらかじめ出しておくことにより、制御装置30におけるデータ処理と記録装置31における記録媒体311からの読み出し処理が並列化され、記録媒体311上で位置的に分散して格納されているデータへのアクセスの高速化を図ることができる。この先読み処理方式は、インデクス管理のデータ構造だけではなく、チェーン管理のデータなど、読み出すデータを線形に並べづらく単純な先読みキャッシュでは効果が小さいようなデータへのアクセスを行う様々なシステムに適応することができる。
In this way, by giving an instruction to store the designated data in the
図7は、読み出し処理および先読み処理における、記録装置31内蔵のキャッシュメモリ312へのデータ格納の処理を表す。これは読み出し処理のステップ203、および先読み処理のステップ604に相当する処理である。
FIG. 7 shows a process of storing data in the
まずキャッシュメモリ312に空き領域があるかを判定し(ステップ701)、空き領域があればそれをデータ格納領域とする(ステップ703)。空きがなければ格納済みデータの中でもっとも優先度の低いデータを破棄対象として選択し、その領域を新たなデータの格納領域とする(ステップ702)。このように選択したキャッシュメモリ312上の格納領域にデータを格納する(ステップ704)。
First, it is determined whether there is a free area in the cache memory 312 (step 701). If there is a free area, it is set as a data storage area (step 703). If there is no free space, the data with the lowest priority among the stored data is selected as the discard target, and the area is set as a new data storage area (step 702). Data is stored in the storage area on the
一般的な記録装置では、データ領域の読み出し頻度の高いものや、格納時期の新しいものなどを優先するというアルゴリズムに基づき格納データに優先度を設定し、キャッシュ満杯時には優先度の低いデータを破棄する処理を行う。本発明では、特に先読みコマンドを用いて読み出したデータ領域に対して、他のキャッシュ上のデータよりも高い優先度を設定する(ステップ705および706)ことで、破棄対象データの選択処理(ステップ702)において、先読みコマンドで読み出されたデータを他のデータよりも優先的に残すようにする。これにより、先読みコマンドで指定したデータが、通常の読み出し要求を受け付けた時点でキャッシュメモリ312に格納されている確率を上げることができる。
In general recording devices, priorities are set for stored data based on an algorithm that gives priority to data areas that are read frequently or data that has a new storage time, and discards low priority data when the cache is full. Process. In the present invention, the data area read using the prefetch command is set to a higher priority than the data on the other caches (
また、先読みコマンドを用いて読み出したデータ領域には、保護フラグを設定する(ステップ707)。キャッシュメモリ312が満杯になった際の破棄対象データの選択時(ステップ702)には、保護フラグが設定されている領域を破棄しないとすることにより、先読みコマンドを発行して(ステップ503)読み出したデータ領域が実際のデータ読み出し時点(ステップ505)までにキャッシュメモリ312から破棄されることを防ぐことができる。この保護フラグは、実際にキャッシュから該当データ領域が読み出された際に解除する。また、保護フラグが設定されたデータが読み出されないままキャッシュメモリ312上に蓄積され続けた場合は、その割合が閾値を超えた際に、優先度の最も低いものを選択し設定を解除する。
Also, a protection flag is set in the data area read using the prefetch command (step 707). When selecting the data to be discarded when the
優先度によるキャッシュメモリ312の管理と、保護フラグによるキャッシュメモリ312の管理は、それぞれ単独で適用することも、両者を併用することもできる。
The management of the
このように、記録装置31の内蔵キャッシュメモリ312へ格納したデータ領域の管理方法を改良することにより、本発明の先読みコマンドを利用してキャッシュメモリ312の利用効率を向上させることができる。
As described above, by improving the management method of the data area stored in the built-in
30…制御装置、301…データ処理部、302…入力部、303…出力部、304…メモリ、31…記録装置、311…記録媒体311…キャッシュメモリ、313…入出力制御部、314…先読み制御部。
DESCRIPTION OF
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006335247A JP2008146516A (en) | 2006-12-13 | 2006-12-13 | Data read-ahead processing method for recorder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006335247A JP2008146516A (en) | 2006-12-13 | 2006-12-13 | Data read-ahead processing method for recorder |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008146516A true JP2008146516A (en) | 2008-06-26 |
Family
ID=39606601
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006335247A Pending JP2008146516A (en) | 2006-12-13 | 2006-12-13 | Data read-ahead processing method for recorder |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008146516A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011044056A (en) * | 2009-08-24 | 2011-03-03 | Fujitsu Ltd | Storage system, device and method for controlling cache |
JP2012084156A (en) * | 2010-10-14 | 2012-04-26 | Sony Corp | Near field communication device and method for near field communication |
-
2006
- 2006-12-13 JP JP2006335247A patent/JP2008146516A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011044056A (en) * | 2009-08-24 | 2011-03-03 | Fujitsu Ltd | Storage system, device and method for controlling cache |
JP2012084156A (en) * | 2010-10-14 | 2012-04-26 | Sony Corp | Near field communication device and method for near field communication |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103562843B (en) | Method and apparatus for the data in supervisory sequence access storage device | |
US8639883B2 (en) | Reducing write amplification in a cache with flash memory used as a write cache | |
US7203815B2 (en) | Multi-level page cache for enhanced file system performance via read ahead | |
KR101095740B1 (en) | Memory system and controller | |
JP2007241927A (en) | Data storage device and method | |
JP2007011523A (en) | Data look-ahead method and computer system | |
US20090265506A1 (en) | Storage device | |
JPH06289999A (en) | Disk control system | |
JP2012128815A (en) | Memory system | |
JPWO2008149453A1 (en) | Storage device, storage control device, and control method | |
US9471227B2 (en) | Implementing enhanced performance with read before write to phase change memory to avoid write cancellations | |
JP2008146516A (en) | Data read-ahead processing method for recorder | |
JP2017072981A (en) | Information processing apparatus, cache control method, and cache control program | |
CN109478163B (en) | System and method for identifying a pending memory access request at a cache entry | |
CN116069752A (en) | Mixed prefetching method for distributed file system | |
JP4374956B2 (en) | Cache memory control device and cache memory control method | |
US20120257880A1 (en) | Reproducing apparatus and reproducing method | |
US20060047901A1 (en) | Access control method, disk control unit and storage apparatus | |
JP2001117818A (en) | Memory managing device, managing method, and recording medium recorded with managing program | |
US11656993B2 (en) | LBNs prefetching per CPU | |
JPH07271958A (en) | Image file device and image file access method | |
JP2009087460A (en) | Command processing method for disk storage device | |
KR101831126B1 (en) | The controlling method of the data processing apparatus in storage | |
JP2002244816A (en) | Disk device | |
JP2000035918A (en) | Cache memory device |