JPH0248751A - Buffer controlling system for data control system - Google Patents

Buffer controlling system for data control system

Info

Publication number
JPH0248751A
JPH0248751A JP63200820A JP20082088A JPH0248751A JP H0248751 A JPH0248751 A JP H0248751A JP 63200820 A JP63200820 A JP 63200820A JP 20082088 A JP20082088 A JP 20082088A JP H0248751 A JPH0248751 A JP H0248751A
Authority
JP
Japan
Prior art keywords
page
buffer
address
management table
read
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
JP63200820A
Other languages
Japanese (ja)
Inventor
Toshiro Nakajima
利朗 中島
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 JP63200820A priority Critical patent/JPH0248751A/en
Publication of JPH0248751A publication Critical patent/JPH0248751A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To effectively use a buffer, and to improve processing efficiency by setting priority order to leave a page in the buffer according to the distinction of the page such as the higher order page, the lower order page and the page of data of an index when the page is read in. CONSTITUTION:A page number to be read in and a buffer request level number of the page from a page requesting person are inputted from an inputting/ outputting means 7. A buffer control table controlling means 4 searches for the requested page from a buffer control table 1, and if the page is not present, it searches for the page of the oldest access history among the pages of the largest level number, and releases the buffer 2 corresponding to it, and rewrites the page number and a page request level, and returns a status and the address of the released buffer 2 to a control part 5. The control part 5 makes the designated page be read in the designated address, and returns the address to the inputting/outputting means 7. Thus, the buffer can be used effectively, and the processing efficiency can be improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、電子計算機システム内で運用されるデータベ
ース管理システムのバッファ管理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a buffer management method for a database management system operated within a computer system.

〔概要〕〔overview〕

本発明はファイルからランダムにページ単位の読み込み
を行い、メモリ上にバッファを確保し、確保されたバッ
ファの数だけ読み込んだページをメモリに残すデータ管
理システムのバッファ管理方式において、 ページを読み込むときに索引の上位のページ、下位のペ
ージ、データのページの別によってバッファ内に残す優
先順位を設定することにより、バッファを有効に活用し
、処理効率を向上させるようにしたものである。
The present invention is a buffer management method for a data management system that reads pages randomly from a file, reserves buffers in memory, and leaves read pages in memory for the number of reserved buffers. By setting the priorities for leaving pages in the buffer depending on whether they are upper pages in the index, lower pages, or data pages, the buffer can be used more effectively and processing efficiency can be improved.

〔従来の技術〕[Conventional technology]

通常、ランダム編成のファイルに対してランダムな読み
込みを行う場合には、−度読み込んだページに対し、も
う−度読み込み要求がきた場合に、できるだけ物理的人
出力を少なくし、処理の効率を上げるために何ページ分
かのバッファをメモリ上に確保しておき、バッファ内に
要求ページがあれば、物理的人出力を行わずに、ページ
要求者にアドレスのみを返却するように構成されている
Normally, when randomly reading a randomly organized file, if a page that has been read once is requested to be read again, the physical human output is reduced as much as possible to improve processing efficiency. A buffer for several pages is reserved in memory for this purpose, and if there is a requested page in the buffer, it is configured so that only the address is returned to the page requester without any physical output. .

この場合、バッファが全部使われた状態にあるときに、
バッファ上に無いページに対して読み込み要求があると
いずれかのバッファを解放しなければならず、どのバッ
ファを解放するかが、どれだけ物理的人出力を削減でき
るかに直結し、性能を向上させる上で非常に大きな問題
となっている。
In this case, when the buffer is fully used,
When there is a read request for a page that is not in the buffer, one of the buffers must be released, and which buffer is released is directly linked to how much physical human output can be reduced, improving performance. This has become a very big problem.

従来どのバッファを解放するかを決める方式としては、
一番アクセス履歴の古いバッファを解放するLRU制御
方式が一般的である。
Conventionally, the method for deciding which buffer to release is as follows:
A common LRU control method is to release the buffer with the oldest access history.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

一つのデータレコードに対し、複数のフィールドに索引
を生成することができるデータ管理システムを扱う場合
に、索引付きの複数のフィールドに対して条件を付加し
た検索やデータレコードのストアを繰り返すと、一般的
な処理としては、データページの読み込みと索引の個数
分の上位の索引ページの読み込みと下位の索引ページの
読み込みを繰り返し行うことになる。
When dealing with a data management system that can generate indexes on multiple fields for one data record, it is common to repeatedly search with conditions on multiple indexed fields or store data records. The process is to repeatedly read the data page, read the upper index pages for the number of indexes, and read the lower index pages.

このような場合、最上位の索引ページは検索やストアの
回数分掌に読み込まれ、下位の索引ページも再使用の可
能性が非常に高いにもかかわらず、(索引の個数×索引
の階層)+1以上のバッファがなければ、読み込み時点
ですべての索引ページは解放の対象となっており、バッ
ファ数が少ない場合には、バッファが有効に活用されず
、ページの読み込みがすべて物理読み込みとなってしま
い性能が非常に悪くなる欠点がある。
In such a case, the top index page is loaded every time a search or store is performed, and the lower index pages are also very likely to be reused. If there are no more buffers, all index pages will be released at the time of reading, and if there are fewer buffers, the buffers will not be used effectively and all page reads will be physical reads. The drawback is that the performance is very poor.

本発明はqのような欠点を除去するもので、バッファを
有効に活用し、処理効率を向上させることができる方式
を提供することを目的とする。
The present invention eliminates the drawbacks such as q, and aims to provide a method that can effectively utilize buffers and improve processing efficiency.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、メモリ上に確保されたバッファと、ファイル
からページ単位の読み込みを行うファイル入出力手段と
を備えたデータ管理システムのバッファ管理方式におい
て、ページの番号、対応するバッファのアドレス、バッ
ファのアクセス履歴およびバッファ要求レベル番号を格
納するバッファ管理テーブルと、前記バッファ管理テー
ブル内に要求されたページが存在すればそのアドレスを
返却し、存在しなければ前記バッファ管理テーブル内で
レベル番号が一番大きい物の中で一番アクセス履歴の古
いページのあるバッファを解放しそのアドレスを返却す
るバッファ管理テーブル制御手段と、ページ要求者から
の読み込むページ番号と当該ページのバッファ要求度を
示すバッファ要求レベル番号とを入力しページの読み込
まれているアドレスを返却する入出力手段と、前記バッ
ファ管理テーブル制御手段、前記入出力手段および前記
ファイル入出力手段を制御する制御部とを備えたことを
特徴とする。
The present invention provides a buffer management method for a data management system that includes a buffer secured in memory and a file input/output means that reads page units from a file. A buffer management table that stores access history and buffer request level numbers, and if the requested page exists in the buffer management table, its address is returned; if it does not exist, the page with the highest level number in the buffer management table is returned. A buffer management table control means that releases a buffer containing a page with the oldest access history among large items and returns its address, and a buffer request level that indicates the page number to be read from the page requester and the degree of buffer request for the page. The present invention is characterized by comprising an input/output means for inputting a page number and returning an address from which a page has been read, and a control section for controlling the buffer management table control means, the input/output means, and the file input/output means. do.

〔作用〕[Effect]

入出力手段からページ要求者からの読み込むページ番号
と当該ページのバッファ要求度を示すバッファ要求レベ
ル番号とを入力する。制御部がこの要求ページ番号と要
求レベル番号をバッファ管理テーブル制御手段に渡す。
The page number to be read from the page requester and the buffer request level number indicating the degree of buffer request for the page are input from the input/output means. The control unit passes the request page number and request level number to the buffer management table control means.

バッファ管理テーブル制御手段はバッファ管理テーブル
から要求ページを探し、存在すればそのスティタスとア
ドレスを制御部に返却し、存在しなければレベル番号が
一番大きなものの中からアクセス歴の一番古いページを
探し、見つかったページに対するバッファを開放し、ペ
ージ番号とページ要求レベルを書き換え、ページが存在
しなかったことを示すスティタスと開放されたバッファ
のアドレスを制御部に返す。
The buffer management table control means searches for the requested page from the buffer management table, and if it exists, returns its status and address to the control unit, and if it does not exist, selects the page with the oldest access history from among those with the highest level number. It searches for the page, releases the buffer for the found page, rewrites the page number and page request level, and returns a status indicating that the page does not exist and the address of the released buffer to the control unit.

制御部はこれらのスティタスとアドレスを受け、バッフ
ァ上に存在するか否かを判断し、存在する場合にはアド
レスを入出力手段に返却し、存在しない場合にはファイ
ル入出力手段にアドレスと要求ページを渡して指定され
たページを指定されたアドレスに読み込ませて、そのア
ドレスを入出力手段に返却する。
The control unit receives these statuses and addresses, determines whether they exist on the buffer, returns the address to the input/output means if it exists, and sends the address and request to the file input/output means if it does not exist. Pass the page, read the specified page at the specified address, and return the address to the input/output means.

これにより、バッファを有効に活用することができ、処
理効率を向上させることができる。
Thereby, the buffer can be used effectively and processing efficiency can be improved.

〔実施例〕〔Example〕

次に、本発明実施例を図面に基づいて説明する。 Next, embodiments of the present invention will be described based on the drawings.

第1図は本発明実施例の構成を示すブロック図である。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

図中実線は制御の流れを示し、破線はデータの流れを示
す。
In the figure, solid lines indicate the flow of control, and dashed lines indicate the flow of data.

本発明実施例は、メモリ上に確保されたバッファ2と、
ファイル3と、ページ要求者から読み込むページ番号と
当該ページのバッファ要求度を示すバッファ要求レベル
番号を入力しページの読み込まれているアドレスを返却
する入出力手段7と、ページ番号、対応するバッファの
アドレス、バッファのアクセス履歴およびバッファ要求
レベル番号を格納するバッファ管理テーブル1と、バッ
ファ管理テーブル1内に要求されたページが存在すれば
そのアドレスを返却し、存在しなければバッファ管理テ
ーブル1内でレベル番号が一番大きな物の中で一番アク
セス履歴の古いページのあるバッファを解放しそのアド
レスを返却するバッファ管理テーブル制御手段4と、フ
ァイル内の指定されたページを指定されたアドレスに読
み込むファイル入出力手段6と、バッファ管理テーブル
制御手段4、入出力手段7およびファイル入出力手段6
を制御する制御部5とを備える。
The embodiment of the present invention includes a buffer 2 secured on memory,
A file 3, an input/output means 7 for inputting a page number to be read from a page requester and a buffer request level number indicating the degree of buffer request for the page, and returning the address from which the page is being read; Buffer management table 1 stores addresses, buffer access history, and buffer request level numbers, and if the requested page exists in buffer management table 1, the address is returned, and if it does not exist, it is stored in buffer management table 1. A buffer management table control means 4 that releases the buffer containing the page with the oldest access history among those with the largest level number and returns its address, and reads a specified page in the file to a specified address. File input/output means 6, buffer management table control means 4, input/output means 7, and file input/output means 6
A control section 5 is provided.

第2図は本発明実施例のバッファ管理テーブル1の構成
図であり、バッファ管理テーブル1はページ番号と、ペ
ージ要求レベル番号と、ページに対するアクセス履歴と
、該当ページが読み込まれているバッファのアドレスに
より構成される。
FIG. 2 is a configuration diagram of the buffer management table 1 according to the embodiment of the present invention, and the buffer management table 1 includes page numbers, page request level numbers, access history for pages, and addresses of buffers in which the corresponding pages are read. Consisted of.

次に、制御部5およびバッファ管理テーブル制御手段4
での処理について説明する。第3図は本発明実施例の制
御部5の処理の手順を示すフローチャート、第4図は本
発明実施例のバッファ管理テーブル4の処理の手順を示
すフローチャートである。
Next, the control section 5 and the buffer management table control means 4
The processing will be explained below. FIG. 3 is a flowchart showing the processing procedure of the control unit 5 according to the embodiment of the present invention, and FIG. 4 is a flowchart showing the processing procedure of the buffer management table 4 according to the embodiment of the invention.

まず、第3図において、制御部5はステップ301でペ
ージ要求者から入出力手段7を通して要求ページ番号と
ページ要求レベルを入力する。次に、ステップ302で
要求ページ番号とページ要求レベルをバッファ管理テー
ブル制御手段4に渡し、次に、ステップ303でバッフ
ァ管理テーブル制御手段4から要求されたページがバッ
ファ2上にあるか否かのステータスとバッファのアドレ
スを受は取る。次に、ステップ304で要求されたペー
ジがバッファ2上にあるか否かの判定を行い、バッファ
2上にあると判定されればステップ306へ制御を移し
、ステップ306ではバッファ管理テーブル制御手段4
から受は取ったアドレスを入出力手段7を通して、ペー
ジ要求者に通知し、処理を終了する。
First, in FIG. 3, the control unit 5 inputs the requested page number and page request level from the page requester through the input/output means 7 in step 301. Next, in step 302, the requested page number and page request level are passed to the buffer management table control means 4, and then, in step 303, it is determined from the buffer management table control means 4 whether or not the requested page is on the buffer 2. Receives status and buffer address. Next, in step 304, it is determined whether or not the requested page is on buffer 2. If it is determined that the page is on buffer 2, control is transferred to step 306, and in step 306, the buffer management table control means 4
The receiver notifies the page requester of the received address through the input/output means 7, and ends the process.

次に、ステップ304で要求ページがバッファ上に無い
と判定された場合には、ステップ305へ制御を移し、
このステップ305では、ファイル入出力手段6に読み
込むバッファのアドレスとページ番号を渡し、ファイル
3から要求されたページを読み込む。次に、ステップ3
06ではバッファ管理テーブル制御手段4から受は取っ
たアドレスを入出力手段7を通して、ページ要求者に通
知し、処理を終了する。
Next, if it is determined in step 304 that the requested page is not on the buffer, control is transferred to step 305,
In this step 305, the address and page number of the buffer to be read are passed to the file input/output means 6, and the requested page is read from the file 3. Next, step 3
At step 06, the address received from the buffer management table control means 4 is notified to the page requester through the input/output means 7, and the process is terminated.

次に、バッファ管理テーブル制御手段4は、第4図に示
すように、ステップ401で制御部5からページ番号と
ページ要求レヴル番号を受は取る。
Next, as shown in FIG. 4, the buffer management table control means 4 receives the page number and page request level number from the control section 5 in step 401.

ステップ402でバッファ管理テーブル1から要求ペー
ジを探す。ステップ403で要求ページがバッファ上に
存在するか否かの判定を行い、ページが存在すると判定
されれば、ステップ404に制御を移し、ステップ40
4では、ページが存在することを示すステップとそのア
ドレスを制御部5に返し、処理を終了する。
In step 402, the requested page is searched from the buffer management table 1. In step 403, it is determined whether or not the requested page exists on the buffer. If it is determined that the page exists, control is transferred to step 404, and step 40
In step 4, the step indicating that the page exists and its address are returned to the control unit 5, and the process ends.

ステップ403でページがバッファ上に存在しないと判
定されれば、ステップ405へ制御を移す。
If it is determined in step 403 that the page does not exist on the buffer, control is transferred to step 405.

ステップ405では、バッファ管理テーブル1からレベ
ル番号が一番大きい物の中からアクセス履歴の一番古い
ものを探す。ステップ406ではステ・ツブ405で見
つかったページを解放対象とし、バ・ソファ管理テーブ
ル1中のページ番号とページ要求レベルを書き換える。
In step 405, the buffer management table 1 is searched for the one with the oldest access history among those with the largest level number. In step 406, the page found in step 405 is targeted for release, and the page number and page request level in bath management table 1 are rewritten.

ステップ407では、ページが存在しなかったことを示
すスティタスとステ・ツブ406で解放されたバッファ
のアドレスを制御部5に返し、処理を終了する。
In step 407, the status indicating that the page does not exist and the address of the buffer released in step 406 are returned to the control unit 5, and the process ends.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明によれば、データ管理システ
ムにおいて、ページを読み込むときに索引の上位のペー
ジ、下位のページ、データのページの別によってバッフ
ァ内に残す優先順位を設定することができるため、従来
のバッファ管理方式の抱えていたバッファ数の少ない場
合に上位の索引ページのように何度も読み込まれるにも
かかわらず、他のページと同じように扱われてしまうた
めに何度も解放の対象となり、読み込みのたびに物理読
み込みが発生して処理の効率を著しく悪くする欠点を解
消する効果がある。
As explained above, according to the present invention, in a data management system, when reading a page, it is possible to set the priority order of pages to be left in the buffer depending on whether the pages are higher in the index, lower pages, or data pages. , when conventional buffer management methods have a small number of buffers, even though they are read many times like the top index page, they are released many times because they are treated like other pages. This has the effect of eliminating the drawback that physical reading occurs every time a read is performed, which significantly reduces processing efficiency.

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

第1図は本発明実施例の構成を示すブロック図。 第2図は本発明実施例のバッファ管理テーブルの構造例
を示す図。 第3図は本発明実施例の制御部の処理手順を示すフロー
チャート。 第4図は本発明実施例の管理テーブル制御手段の処理手
順を示すフローチャート。 1・・・バッファ管理テーブノペ2・・・バッファ、3
・・・ファイノペ4・・・バッファ管理テーブル制御手
段、5・・・制御部、6・・・ファイル入出力手段、7
・・・入出力手段。 特許出願人 日本電気株式会社9゜ 代理人  弁理士 井 出 直 孝 第  1  図 実施例 実施例 バッファ管理テーブル構造側 第2図 第 図
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a diagram showing an example of the structure of a buffer management table according to an embodiment of the present invention. FIG. 3 is a flowchart showing the processing procedure of the control unit according to the embodiment of the present invention. FIG. 4 is a flowchart showing the processing procedure of the management table control means according to the embodiment of the present invention. 1...Buffer management tabletop 2...Buffer, 3
... Finope 4... Buffer management table control means, 5... Control unit, 6... File input/output means, 7
...Input/output means. Patent Applicant NEC Corporation 9゜ Agent Patent Attorney Takashi Ide 1 Figure 1 Embodiment Example Buffer management table structure side Figure 2 Figure

Claims (1)

【特許請求の範囲】 1、メモリ上に確保されたバッファと、 ファイルからページ単位の読み込みを行うファイル入出
力手段と を備えたデータ管理システムのバッファ管理方式におい
て、 ページの番号、対応するバッファのアドレス、バッファ
のアクセス履歴およびバッファ要求レベル番号を格納す
るバッファ管理テーブルと、前記バッファ管理テーブル
内に要求されたページが存在すればそのアドレスを返却
し、存在しなければ前記バッファ管理テーブル内でレベ
ル番号が一番大きい物の中で一番アクセス履歴の古いペ
ージのあるバッファを解放しそのアドレスを返却するバ
ッファ管理テーブル制御手段と、 ページ要求者からの読み込むページ番号と当該ページの
バッファ要求度を示すバッファ要求レベル番号とを入力
しページの読み込まれているアドレスを返却する入出力
手段と、 前記バッファ管理テーブル制御手段、前記入出力手段お
よび前記ファイル入出力手段を制御する制御部と を備えたことを特徴とするデータ管理システムのバッフ
ァ管理方式。
[Claims] 1. In a buffer management method of a data management system that includes a buffer secured in memory and a file input/output means that reads page units from a file, A buffer management table that stores addresses, buffer access history, and buffer request level numbers, and if the requested page exists in the buffer management table, the address is returned, and if it does not exist, the level A buffer management table control means that releases the buffer containing the page with the oldest access history among those with the largest number and returns its address, and the page number to be read from the page requester and the buffer request degree of the page. an input/output means for inputting a buffer request level number indicated and returning an address from which a page is read; and a control section for controlling the buffer management table control means, the input/output means, and the file input/output means. A buffer management method for a data management system characterized by the following.
JP63200820A 1988-08-10 1988-08-10 Buffer controlling system for data control system Pending JPH0248751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63200820A JPH0248751A (en) 1988-08-10 1988-08-10 Buffer controlling system for data control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63200820A JPH0248751A (en) 1988-08-10 1988-08-10 Buffer controlling system for data control system

Publications (1)

Publication Number Publication Date
JPH0248751A true JPH0248751A (en) 1990-02-19

Family

ID=16430747

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63200820A Pending JPH0248751A (en) 1988-08-10 1988-08-10 Buffer controlling system for data control system

Country Status (1)

Country Link
JP (1) JPH0248751A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0535844A (en) * 1991-07-30 1993-02-12 Matsushita Graphic Commun Syst Inc Electronic filing device
US6209057B1 (en) 1997-10-31 2001-03-27 Fujitsu Limited Storage device having data buffer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0535844A (en) * 1991-07-30 1993-02-12 Matsushita Graphic Commun Syst Inc Electronic filing device
US6209057B1 (en) 1997-10-31 2001-03-27 Fujitsu Limited Storage device having data buffer

Similar Documents

Publication Publication Date Title
US6308169B1 (en) Method of storing elements in a database
JPH07113903B2 (en) Cache storage control method
JPS62113234A (en) Sorting of record set
US8332595B2 (en) Techniques for improving parallel scan operations
JPH0581337A (en) Data processing device
JPS6143338A (en) How to search sparse databases using associative techniques
JP2586610B2 (en) File creation method
JPS6120154A (en) Memory access control device
JP2923952B2 (en) Merge processing method
JP2002297897A (en) Method and program for storing data
JP2560610B2 (en) Data processing device
JPH0457127A (en) Version managing device
JP2787107B2 (en) Buffer control system and device
JPH04257062A (en) Data processor using hash queue
JPH05334362A (en) Processor controlling message
JPH0314073A (en) Vector processing system
Omiecinski Concurrent file reorganization: Clustering, conversion and maintenance
JPH03231339A (en) Data base access system
JPS62186328A (en) Sort processing system
JP2588932B2 (en) Sorting device
JPS6380349A (en) High speed page input/output system
JPS62145441A (en) Updating processing system for key-sequenced data set
JPH01228022A (en) Tow-dimensional data storing system
JPS63307526A (en) Data processor
JPS6383821A (en) Buffer control system