JPH05181721A - Method for reusing and retrieving shared buffer - Google Patents

Method for reusing and retrieving shared buffer

Info

Publication number
JPH05181721A
JPH05181721A JP3334557A JP33455791A JPH05181721A JP H05181721 A JPH05181721 A JP H05181721A JP 3334557 A JP3334557 A JP 3334557A JP 33455791 A JP33455791 A JP 33455791A JP H05181721 A JPH05181721 A JP H05181721A
Authority
JP
Japan
Prior art keywords
shared buffer
buffer
shared
queue
magnetic disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP3334557A
Other languages
Japanese (ja)
Inventor
Kenji Yokoyama
憲治 横山
Hiroyuki Yoshida
浩幸 吉田
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP3334557A priority Critical patent/JPH05181721A/en
Publication of JPH05181721A publication Critical patent/JPH05181721A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To eliminate the necessity of access time to a magnetic disk device at the time of reusing it and to attain rapid access by determining a shared buffer which is not in an updating state as a shared buffer for reuse. CONSTITUTION:This system is provided with a CPU 1 including a shared buffer retrieving means 10 and an asynchronous input procedure 11, a main storage device 2 including a shared buffer storing part 12 and a magnetic disk device 13 as an external storage device. Shared buffers are connected to a queue in an access time sequence from the oldest buffer up to the newest one and the existence of updating state is successively retrieved and judged from the queue. If the updating status exists at the time of purging a certain shared buffer from the device 2, the buffer is asynchronously written in the device 13, and at the time of accessing the device 13, the retrieval and judgement of the succeeding queue can be continued without waiting the completion of the writing. Since the contents with that of the device 13, the unupdated shared buffer can be determined as a shared buffer for reuse without accessing the device 13.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ファイルシステムにお
ける共有ファイルの共有バッファ管理に関するものであ
り、特に共有バッファの再利用時の高速化に効果的な共
有バッファの再利用検索方法である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to shared buffer management of shared files in a file system, and more particularly to a shared buffer reuse search method effective for speeding up the shared buffer reuse.

【0002】[0002]

【従来の技術】共有ファイルにおける共有バッファの管
理は、外部記憶装置としての磁気ディスク装置へのアク
セスを減らし、ファイルアクセスを高速にするための手
法である。共有バッファは、複数のプログラムからアク
セスされるファイルの内容を主記憶装置上に記録してい
るバッファのことである。プログラムからのアクセス
は、主記憶装置でのメモリ転送時間だけですむため磁気
ディスク装置からのアクセスに比べると10倍以上の高
速になる。磁気ディスク装置の内容をすべて主記憶装置
上に共有バッファとして置いておくことで高速化するこ
とが可能である。しかし、共有バッファの数量には、主
記憶装置のメモリの制限があるためシステム構築したと
きに一定の値に決定される。このため、共有バッファに
は、磁気ディスク装置内の内容の一部を管理することに
なる。共有バッファは、ブロック単位でディスクの内容
を管理する。ブロックは、磁気ディスクと入出力するた
めの単位である。通常、ブロックは、長さが固定の値と
なる。
2. Description of the Related Art Management of a shared buffer in a shared file is a technique for reducing access to a magnetic disk device as an external storage device and speeding up file access. The shared buffer is a buffer in which the contents of files accessed by a plurality of programs are recorded in the main storage device. Since the access from the program only requires the memory transfer time in the main storage device, the access speed is 10 times or more as high as the access from the magnetic disk device. It is possible to increase the speed by placing all the contents of the magnetic disk device in the main storage device as a shared buffer. However, the number of shared buffers is limited to a fixed value when the system is constructed because the memory of the main storage device is limited. Therefore, the shared buffer manages a part of the contents in the magnetic disk device. The shared buffer manages the contents of the disk in blocks. A block is a unit for inputting / outputting with a magnetic disk. Normally, the block has a fixed length.

【0003】限られた数量の共有バッファを効率よく管
理するためにLRU(Least Recently Used )手法が使
用される。LRU手法は、ブロックのアクセス順に共有
バッファを並べ、最も古くアクセスした共有バッファを
主記憶装置から追い出す方法である。一度アクセスした
バッファを再度アクセスした場合には、最後に並べ換え
られる。共有バッファを追い出す際に、ブロックに変更
があった場合には、磁気ディスク装置への書き込みのア
クセス時間がかかるが、変更がなかった場合には、共有
バッファをすぐ再利用することができる。以降の説明で
は、主記憶装置から追い出して別のブロックのために使
用することをバッファの再利用と呼ぶこととする。ブロ
ックに変更があったかどうかは、共有バッファに書き込
みがあったときに更新したことを示す状態を持つものと
する。
An LRU (Least Recently Used) method is used to efficiently manage a limited number of shared buffers. The LRU method is a method of arranging shared buffers in the order of block access, and expelling the oldest accessed shared buffer from the main storage device. When the buffer that has been accessed once is accessed again, it is rearranged last. When the shared buffer is expelled, if there is a change in the block, it takes time to access the magnetic disk drive for writing, but if there is no change, the shared buffer can be reused immediately. In the following description, eviction from the main memory and using it for another block will be referred to as buffer reuse. Whether or not the block has changed shall have a state indicating that the block has been updated when the shared buffer was written.

【0004】[0004]

【発明が解決しようとする課題】しかし、前述の共有バ
ッファの管理方法では、共有バッファの再利用の際に磁
気ディスク装置への書き込みのためのアクセス時間を省
くことができない。このため、共有バッファのアクセス
の利点を損なうこととなる。すなわち、磁気ディスク装
置へのアクセス時間がそのままファイルのアクセス時間
になってしまうという欠点があった。
However, the above-mentioned shared buffer management method cannot eliminate the access time for writing to the magnetic disk device when the shared buffer is reused. Therefore, the advantage of accessing the shared buffer is lost. That is, there is a drawback that the access time to the magnetic disk device is the same as the file access time.

【0005】本発明の目的は、共有バッファの再利用で
の磁気ディスク装置のアクセス時間を排除し、共有バッ
ファのアクセスの高速化を図ることを目的とする。
It is an object of the present invention to eliminate the access time of the magnetic disk device when reusing the shared buffer and to speed up the access to the shared buffer.

【0006】[0006]

【課題を解決するための手段】上記課題を解決するため
本発明に係る共有バッファの再利用検索方法は、共有バ
ッファのキューから更新状態であるか更新状態でないか
を順次検索判断し、更新状態の共有バッファを非同期で
外部記憶装置に書き出し、更新状態でない共有バッファ
を再利用の共有バッファに決定する。
In order to solve the above-mentioned problems, a method for reusing a shared buffer according to the present invention sequentially searches the shared buffer queue to determine whether it is in an updated state or not, and updates the state. The shared buffer of is asynchronously written to the external storage device, and the shared buffer that is not in the updated state is determined as the reused shared buffer.

【0007】上記方法において、キューの最後まで共有
バッファが更新状態である場合に、キューの先頭共有バ
ッファを再利用の共有バッファに決定するとしてもよ
い。
In the above method, when the shared buffer is in the updated state until the end of the queue, the head shared buffer of the queue may be determined as the reused shared buffer.

【0008】[0008]

【作用】共有バッファは、アクセスの時系列で古い順に
キューにつながれ、キューから更新状態の有無が順次検
索判断される。共有バッファを主記憶装置から追い出す
際に更新があった場合は、非同期で外部記憶装置装置へ
書き出し、外部記憶装置のアクセス時に完了待ちをせず
に、次のキューについて検索判断を続けることができ
る。更新状態でない場合は、共有バッファの内容と外部
記憶装置の内容は一致しているため、外部記憶装置にア
クセスしないで、更新状態でない共有バッファを再利用
の共有バッファに決定する。
The shared buffer is connected to the queue in the order of oldness of access, and the presence or absence of the update state is sequentially searched and determined from the queue. If there is an update when flushing the shared buffer from the main storage device, it can be asynchronously written to the external storage device, and the search judgment for the next queue can be continued without waiting for completion when accessing the external storage device. . If it is not in the updated state, the contents of the shared buffer and the contents of the external storage device match, so the external storage device is not accessed and the shared buffer that is not in the updated state is determined as the reused shared buffer.

【0009】キューの最後まで共有バッファが更新状態
である場合には、キューの先頭共有バッファの非同期書
き出し完了を待って、これを再利用の共有バッファに決
定して、CPUの有効使用を図る。
When the shared buffer is in the updated state up to the end of the queue, the completion of the asynchronous writing of the head shared buffer of the queue is waited for, and this is determined as the shared buffer for reuse to make effective use of the CPU.

【0010】[0010]

【実施例】以下本発明の実施例を図により説明する。図
1は、本発明に係る再利用手順の一実施例を示すフロー
チャートである。図2は、共有バッファの再利用のため
の機能ブロック図であり、CPU1内に、共有バッファ
検索手段10と非同期入出力手順11を備え、主記憶装
置2内に共有バッファ格納部12をおき、外部記憶装置
として磁気ディスク装置13を備える。図3は共有バッ
ファのアクセス順並び(キュー)の状態を示す図であ
る。共有バッファは、図3(a),(b)に示す通りア
クセスの時系列で古い順にキューにつながれている。キ
ューは、先頭から1個ずつ共有バッファを指し、最後に
は最後NULL14がある。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a flow chart showing an embodiment of a reuse procedure according to the present invention. FIG. 2 is a functional block diagram for reusing a shared buffer. In the CPU 1, a shared buffer search means 10 and an asynchronous input / output procedure 11 are provided, and a shared buffer storage unit 12 is provided in the main storage device 2. A magnetic disk device 13 is provided as an external storage device. FIG. 3 is a diagram showing a state in which the shared buffers are arranged in the order of access (queue). As shown in FIGS. 3A and 3B, the shared buffers are queued in chronological order of access in the order of oldness. The queue points to the shared buffer one by one from the beginning, and the last NULL 14 is at the end.

【0011】まず、図3(a)のように、キューに、更
新の状態を持つa1,a2,a3と更新がないb1,b
2とが並んでいる場合について説明する。再利用する場
合に、キューの先頭から共有バッファa1を選択する
(図1、ステップP1)。キューの最後か否かを調べ
(ステップP2)、noに進む。a1の更新の状態を調
べ(ステップP3)、更新状態であるためyesに進
む。ここで、図2の非同期入出力手順11を用いて、非
同期に共有バッファ格納手段12から磁気ディスク装置
13に書き出す(ステップP4)。非同期の書き出し
は、磁気ディスク装置13のアクセス時に完了待ちをし
ないため、共有バッファ検索手段10の手順実行を続け
ることができる。次の共有バッファa2をキューから選
択する(ステップP5)。ステップP2に戻り、a2
は、キューの最後でないためa1と同じ処理を繰り返
し、ステップP5で次の共有バッファb1を選択する。
さらに、ステップP2に戻り、キューの最後でないた
め、ステップP3で更新状態かを調べる。b1は、更新
がないため、noに進む。b1の内容は更新されていな
いため、共有バッファの内容と磁気ディスク装置13の
内容は一致している。このため、磁気ディスク装置13
にアクセスしないで、共有バッファの内容を廃棄するこ
とができる。そこで、b1を再利用共有バッファに決定
(ステップP8)する。
First, as shown in FIG. 3 (a), the queue has a1, a2, and a3 that have an update status and b1 and b that have no update.
The case where 2 and 2 are lined up will be described. When reusing, the shared buffer a1 is selected from the head of the queue (FIG. 1, step P1). It is checked whether it is the end of the queue (step P2), and the process goes to no. The update status of a1 is checked (step P3), and since it is the update status, the process proceeds to yes. Here, the asynchronous input / output procedure 11 of FIG. 2 is used to asynchronously write from the shared buffer storage means 12 to the magnetic disk device 13 (step P4). Since asynchronous writing does not wait for completion when the magnetic disk device 13 is accessed, the procedure execution of the shared buffer search means 10 can be continued. The next shared buffer a2 is selected from the queue (step P5). Return to step P2, a2
Repeats the same processing as a1 since it is not the last in the queue, and selects the next shared buffer b1 in step P5.
Furthermore, the process returns to step P2, and since it is not the end of the queue, it is checked in step P3 if it is in the updated state. Since b1 is not updated, the process proceeds to no. Since the contents of b1 have not been updated, the contents of the shared buffer and the contents of the magnetic disk device 13 match. Therefore, the magnetic disk device 13
You can discard the contents of the shared buffer without accessing. Therefore, b1 is determined as the reuse shared buffer (step P8).

【0012】次に、図3(b)のように、キューの最後
まで更新がない場合について説明する。図3(b)で
は、キューに更新状態を持つc1,c2,c3,c4,
c5が並んでいる。キューの先頭から共有バッファc1
を選択し、順次共有バッファをc2,c3,c4,c5
と選択する手順は、前記の通りである。c5の共有バッ
ファでステップP5の次の共有バッファを選択すると、
キューの最後NULL14になる。ステップP2でキュ
ーの最後NULL14のためyesに進む。更新がない
共有バッファが見つからない場合である。このときは、
最も古い、先頭の共有バッファc1を再利用の対象にす
る。非同期入出力手順11を用いて、先頭の共有バッフ
ァc1の非同期書き出しの完了が磁気ディスク装置13
から通知されるのを待つ(ステップP6)。書き出しが
完了したら、先頭の共有バッファc1を選択する(ステ
ップP7)。ステップP8でc1を再利用バッファに決
定する。
Next, as shown in FIG. 3B, a case where there is no update until the end of the queue will be described. In FIG. 3B, c1, c2, c3, c4 having update status in the queue.
c5 are lined up. Shared buffer c1 from the beginning of the queue
To select the shared buffers in sequence as c2, c3, c4, c5
The procedure for selecting is as described above. When the next shared buffer in step P5 is selected in the shared buffer c5,
It becomes NULL 14 at the end of the queue. At step P2, since the last NULL 14 in the queue, the process proceeds to yes. This is the case when the shared buffer that is not updated cannot be found. At this time,
The oldest shared buffer c1 at the head is reused. Using the asynchronous input / output procedure 11, the completion of the asynchronous writing of the shared buffer c1 at the head is completed by the magnetic disk device 13
Waits for notification from (step P6). When the writing is completed, the top shared buffer c1 is selected (step P7). In step P8, c1 is determined as the reuse buffer.

【0013】[0013]

【発明の効果】以上説明した通り、本発明によれば共有
バッファを再利用する時に磁気ディスク装置のアクセス
時間を短縮し、高速にアクセスすることができる。ま
た、非同期入出力によって、最も古いバッファを書き出
しているためCPUを有効に使用することができる。
As described above, according to the present invention, when the shared buffer is reused, the access time of the magnetic disk device can be shortened and high speed access can be achieved. Further, the asynchronous input / output allows the CPU to be effectively used because the oldest buffer is written.

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

【図1】本発明に係る再利用手順の一実施例を示すフロ
ーチャートである。
FIG. 1 is a flowchart showing an embodiment of a reuse procedure according to the present invention.

【図2】共有バッファの再利用のための機能ブロック図
である。
FIG. 2 is a functional block diagram for reusing a shared buffer.

【図3】共有バッファのアクセス順並び(キュー)の状
態を示す図である。
FIG. 3 is a diagram showing a state of an access order arrangement (queue) of a shared buffer.

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

10 共有バッファ検索手段 11 非同期入出力手順 12 共有バッファ格納部 13 磁気ディスク装置(外部記憶装置) 10 shared buffer search means 11 asynchronous input / output procedure 12 shared buffer storage unit 13 magnetic disk device (external storage device)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 共有バッファのキューから更新状態であ
るか更新状態でないかを順次検索判断し、更新状態の共
有バッファを非同期で外部記憶装置に書き出し、更新状
態でない共有バッファを再利用の共有バッファに決定す
ることを特徴とする共有バッファの再利用検索方法。
1. A shared buffer in which a shared buffer in an updated state is asynchronously written to an external storage device, and a shared buffer that is not in an updated state is reused. A method for reusing a shared buffer for reusing a shared buffer.
【請求項2】 共有バッファのキューから更新状態であ
るか更新状態でないかを順次検索判断し、更新状態の共
有バッファを非同期で外部記憶装置に書き出し、更新状
態でない共有バッファを再利用の共有バッファに決定す
る共有バッファの再利用検索方法において、キューの最
後まで共有バッファが更新状態である場合に、キューの
先頭共有バッファを再利用の共有バッファに決定するこ
とを特徴とする共有バッファの再利用検索方法。
2. A shared buffer in which the shared buffer in the updated state is asynchronously written to an external storage device, and the shared buffer in the non-updated state is reused. In the shared buffer reuse search method determined in step 1, when the shared buffer is in an updated state up to the end of the queue, the shared buffer for reuse is characterized in that the first shared buffer in the queue is determined as the shared buffer for reuse. retrieval method.
JP3334557A 1991-11-25 1991-11-25 Method for reusing and retrieving shared buffer Withdrawn JPH05181721A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3334557A JPH05181721A (en) 1991-11-25 1991-11-25 Method for reusing and retrieving shared buffer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3334557A JPH05181721A (en) 1991-11-25 1991-11-25 Method for reusing and retrieving shared buffer

Publications (1)

Publication Number Publication Date
JPH05181721A true JPH05181721A (en) 1993-07-23

Family

ID=18278739

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3334557A Withdrawn JPH05181721A (en) 1991-11-25 1991-11-25 Method for reusing and retrieving shared buffer

Country Status (1)

Country Link
JP (1) JPH05181721A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017013701A1 (en) * 2015-07-17 2017-01-26 株式会社日立製作所 Computer system and database management method
JP2018173865A (en) * 2017-03-31 2018-11-08 オムロン株式会社 Control device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017013701A1 (en) * 2015-07-17 2017-01-26 株式会社日立製作所 Computer system and database management method
JPWO2017013701A1 (en) * 2015-07-17 2018-03-22 株式会社日立製作所 Computer system and database management method
US11321302B2 (en) 2015-07-17 2022-05-03 Hitachi, Ltd. Computer system and database management method
JP2018173865A (en) * 2017-03-31 2018-11-08 オムロン株式会社 Control device

Similar Documents

Publication Publication Date Title
KR100278328B1 (en) Cache miss buffer
KR930022222A (en) Apparatus and method for providing multiple outstanding operations in a multiprocessor computer system with a consistent cache
KR100955433B1 (en) Cache Memory with Pipeline Structure and Method of Controlling the Same
JPS619722A (en) Apparatus for rearranging page with track in disc memory
EP1035477B1 (en) Improved cache memory and system
JP2005258789A (en) Storage apparatus, storage controller, and write-back cache control method
JPH05181721A (en) Method for reusing and retrieving shared buffer
JP7661656B2 (en) Fast Skiplist Purge
JPH11112564A (en) List management system, method and storage medium, and packet switch
US5717918A (en) Method for concurrently performing a physical sequential scan of a database into a database buffer which is queued until a preceding scan is completed
JP5534912B2 (en) Data storage device
JP2009199384A (en) Data processing apparatus
JP3585264B2 (en) Database system and data retrieval method
JPH0588954A (en) Data base updating method
JPH086829A (en) Simultaneous all search method of database
JP2972451B2 (en) Cache memory control method by hardware control software
JP2004288213A (en) Data processing system and data processing method
JP2743849B2 (en) Update buffer management device
JPH0346033A (en) Inter-job data transfer control method
JP2636564B2 (en) Move-in control method for cache memory
JP4371043B2 (en) Storage system, snapshot control method and program
JPH06301600A (en) Storage device
JPH0659947A (en) Competition management system for receiving processing
JPH0682334B2 (en) Management processing device for management table
JPH06119219A (en) File data precedence read-in system

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990204