JPH04102118A - Buffer flash mechanism - Google Patents

Buffer flash mechanism

Info

Publication number
JPH04102118A
JPH04102118A JP2219089A JP21908990A JPH04102118A JP H04102118 A JPH04102118 A JP H04102118A JP 2219089 A JP2219089 A JP 2219089A JP 21908990 A JP21908990 A JP 21908990A JP H04102118 A JPH04102118 A JP H04102118A
Authority
JP
Japan
Prior art keywords
buffer
file
data
storage device
auxiliary storage
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
JP2219089A
Other languages
Japanese (ja)
Inventor
Seiichiro Naka
誠一郎 中
Hidetoshi Mukaida
向井田 英俊
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 JP2219089A priority Critical patent/JPH04102118A/en
Publication of JPH04102118A publication Critical patent/JPH04102118A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To reduce the danger of erasing data by providing a means to retrieve a buffer, which is allocated to a file to be closed and stores data not reflected on an auxiliary storage device yet, from a table and to output the data of all the buffers like this to the auxiliary storage device. CONSTITUTION:A managing means 2 manages the allocating condition of buffers and the reflecting condition showing whether the data stored in the respective buffers are outputted to an auxiliary storage device 8 or not for each file according to management information on a table 10 and when a file close request is outputted since a user process completes the use of the file, a file close time buffer flash means retrieves the buffer, which is allocated to the file to be closed and stores data not reflected on the auxiliary storage device yet, from the table 10 and outputs the data of all the buffers like this to the auxiliary storage device 8. Thus, the danger of erasing data is reduced.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理装置のファイル管理システムに関し、
特に、補助記憶装置内のデータ格納領域を一定サイズの
ブロックに分割してファイル領域割り当ての単位および
入出力の単位とし且つブロック単位にバッファを使用し
て遅延書き込みを行うファイル管理システムにおいて、
バッファ内の未出力データを補助記憶装置に出力するバ
ッファフラッシュ機構に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a file management system for an information processing device,
In particular, in a file management system that divides the data storage area in an auxiliary storage device into blocks of a fixed size as the unit of file area allocation and input/output, and performs delayed writing using a buffer for each block.
The present invention relates to a buffer flush mechanism that outputs unoutput data in a buffer to an auxiliary storage device.

〔従来の技術〕[Conventional technology]

磁気ディスク装置等の補助記憶装置内のデータ格納領域
を一定サイズのブロックに分割してファイル領域割り当
ての単位および入出力の単位とし且つブロック単位にバ
ッファを使用したファイル管理システムにおいては、デ
ータを出力する場合、その時点では補助記憶装置への出
力は行わず、バッファへデータを書き込んだ時点でユー
ザプロセスに出力処理の終了を通知し、バ・ンファのデ
ータを補助記憶装置へ実際に出力する処理は後の別のタ
イミングでユーザプロセスと非同期に行うことニヨって
、ユーザプロセスに対してデータの出力処理を高速化し
て見せるという遅延書き込みが行われている。
In a file management system that divides the data storage area in an auxiliary storage device such as a magnetic disk device into blocks of a fixed size as the unit of file area allocation and input/output unit, and uses a buffer for each block, data is output. In this case, the process does not output to the auxiliary storage device at that point, but notifies the user process of the end of output processing when the data is written to the buffer, and actually outputs the data in the buffer to the auxiliary storage device. Delayed writing is performed to speed up data output processing to the user process, with the intention of performing it asynchronously with the user process at a later time.

このような遅延書き込みを行うことにより出力処理の高
速化を図ることができるが、その反面、ユーザプロセス
が出力要求したデータが補助記憶装置へ出力されておら
ずバッファ上にのみ存在するという状況が発生し得る。
By performing such delayed writing, it is possible to speed up the output processing, but on the other hand, there is a situation where the data requested by the user process is not output to the auxiliary storage device and exists only in the buffer. It can occur.

若し、このような状況下でシステムダウン等の障害が発
生した場合、ユーザプロセスが書き込んだはずのデータ
が失われてしまうことになる。
If a failure such as a system shutdown occurs under such circumstances, data that would have been written by the user process will be lost.

そこで、従来のこの種のファイル管理システムでは、バ
ッファが他のブロックに割り当てられ内容が書き換えら
れる時やシステムを終了する時等の如くバッファを使用
する上で基本的に必要となる時以外に、ユーザがバッフ
ァ上のデータ書き出し要求を出した時にもバッファ上の
データを補助記憶装置に出力、即ちバッファフラッシュ
することができるように構成されている。
Therefore, in conventional file management systems of this type, in addition to the times when the buffer is basically needed, such as when the buffer is allocated to another block and its contents are rewritten, or when the system is terminated, etc. The configuration is such that even when a user issues a request to write data on the buffer, the data on the buffer can be output to the auxiliary storage device, that is, the buffer can be flushed.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述のような構成によれば、バッファのフラッシュをユ
ーザからの要求によって行うことができるので、ユーザ
自身がバッファ上のデータ書き出し要求を適切に出すこ
とにより、ユーザプロセスが出力要求したデータがバッ
ファ上にのみ存在するという状況の発生期間を極力短く
することが可能となる。しかしながら、その為にはデー
タ書き出し要求を適切に出すことが必要なためにユーザ
の負担が大きく、そのような要求を出し忘れると、ユー
ザプロセスの出力処理が終了した後長い期間にわたって
データがバッファから補助記憶装置へ出力されていない
という状況が発生し、データ消失の危険性が高まる。
According to the above configuration, the buffer can be flushed upon request from the user, so that the user can properly issue a request to write data on the buffer, and the data requested to be output by the user process will be flushed on the buffer. This makes it possible to shorten as much as possible the period during which a situation occurs that only exists. However, this requires a large burden on the user as it is necessary to issue data write requests appropriately, and if such a request is forgotten, data may be left out of the buffer for a long time after the user process finishes outputting. A situation may occur where data is not being output to the auxiliary storage device, increasing the risk of data loss.

本発明はこのような事情に鑑みて為されたもので、その
目的は、使用を終えたファイルのデータを格納したバッ
ファの中で補助記憶装置にデータが書き出されていない
バッファだけを自動的に検出してフラッシュするバッフ
ァフラッシュ機構を提供することにある。
The present invention was made in view of the above circumstances, and its purpose is to automatically delete only those buffers that store data of files that are no longer in use and for which no data has been written to the auxiliary storage device. The objective is to provide a buffer flush mechanism that detects and flushes the buffer.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は上記の目的を達成するために、補助記憶装置内
のデータ格納領域を一定サイズのブロックに分割してフ
ァイル領域割り当ての単位および入出力の単位とし、ブ
ロック単位にバッファを使用して遅延書き込みを行うこ
とによって入出力の高速化を図った情報処理装置におい
て、バッファの割り当て状況と各バッファに格納されて
いるデータの前記補助記憶装置への反映状況とをテーブ
ル上の管理情報によって各ファイル毎に管理する管理手
段と、 クローズ処理すべきファイルに割り当てられたバッファ
であって未だ補助記憶装置に反映されていないデータを
格納しているバッファを前記テーブルより検索してそれ
ら全てのバッファのデータを前記補助記憶装置に出力す
るファイルクローズ時バッファフラッシュ手段とを備え
ている。
In order to achieve the above object, the present invention divides a data storage area in an auxiliary storage device into blocks of a fixed size to serve as a unit of file area allocation and a unit of input/output, and uses a buffer for each block to delay In an information processing device that speeds up input/output by writing data, the status of buffer allocation and the status of reflection of data stored in each buffer on the auxiliary storage device are determined for each file using management information on a table. A management means for managing each file, and a management means that searches the table for buffers that are allocated to files to be closed and that store data that has not yet been reflected in the auxiliary storage device, and retrieves the data of all those buffers. and buffer flush means for outputting the file to the auxiliary storage device.

〔作用〕[Effect]

本発明のバッファフラッシュ機構においては、補助記憶
装置内のデータ格納領域を一定サイズのブロックに分割
してファイル領域割り当ての単位および入出力の単位と
しブロック単位にバッファを使用して遅延書き込みを行
っている際に、管理手段が、各ファイルにどのバッファ
が割り当てられているかというバッファの割り当て状況
と、各バッファに格納されているデータが補助記憶装置
へ出力されているか或いは未だ出力されていないという
反映状況とを、テーブル上の管理情報によって各ファイ
ル毎に管理しており、ユーザプロセスがファイルの使用
を終えたことからファイルクローズ要求を出すと、ファ
イルクローズ時ハ、ファフラノンユ手段が、そのクロー
ズ処理すべきファイルに割り当てられたバッファであっ
て未だ補助記憶装置に反映されていないデータを格納(
7ているバッファを前記テーブルより検索してそれら全
てのバッファのデータを前記補助記憶装置に出力する。
In the buffer flush mechanism of the present invention, the data storage area in the auxiliary storage device is divided into blocks of a fixed size, which are used as the unit of file area allocation and the unit of input/output, and delayed writing is performed using a buffer in block units. When the data is stored in the auxiliary storage device, the management means reflects the buffer allocation status, which buffer is allocated to each file, and whether the data stored in each buffer has been output to the auxiliary storage device or has not been output yet. The status is managed for each file using management information on a table, and when a user process issues a file close request after finishing using the file, when the file is closed, the faranonyu means handles the closing process. A buffer that is allocated to a file that should be saved and stores data that has not yet been reflected in the auxiliary storage device (
7 buffers are searched from the table and the data of all those buffers is output to the auxiliary storage device.

(実施例〕 次に、本発明の実施例について図面を参照(7て詳細に
説明する。
(Example) Next, an example of the present invention will be described in detail with reference to the drawings.

第1図は本発明の一実施例の構成図である。同図におい
て、ユーザインタフェイス1は図示しないユーザプロセ
スとの間のインタフェイスであり、このユーザインタフ
ェイス1にユーザプロセスからの要求によってファイル
の入出力を管理するファイル入出力管理手段2が接続さ
れ、このファイル入出力管理手段2にバッファ割り当て
手段3およびファイルデータチェーン作成手段4が順次
接続されている。また、ファイルのクローズ処理を行う
ファイルクローズ手段5がユーザインクフェイス1に接
続され、このファイルクローズ手段5にバッファ管理テ
ーブル検索手段6が接続され、このバッファ管理テーブ
ル検索手段6とファイル入出力管理手段2にバッファデ
ータ入出力手段7が接続されている。このバッファデー
タ入出力手段7に接続された補助記憶装置8は磁気ディ
スク装置等であり、データ格納領域は一定サイズのブロ
ックに分割されてファイル領域割り当ての単位および入
出力の単位とされている。更に、各手段から参照、更新
される二つのテーブル即ちファイル管理テーブル9とバ
ッファ管理テーブル10とが設けられている。
FIG. 1 is a block diagram of an embodiment of the present invention. In the figure, a user interface 1 is an interface with a user process (not shown), and a file input/output management means 2 that manages file input/output according to requests from the user process is connected to this user interface 1. , buffer allocation means 3 and file data chain creation means 4 are sequentially connected to this file input/output management means 2. Further, a file closing means 5 for performing file closing processing is connected to the user ink face 1, a buffer management table search means 6 is connected to the file closing means 5, and the buffer management table search means 6 and the file input/output management means A buffer data input/output means 7 is connected to 2. The auxiliary storage device 8 connected to this buffer data input/output means 7 is a magnetic disk device or the like, and the data storage area is divided into blocks of a fixed size, which are used as the unit of file area allocation and the unit of input/output. Furthermore, two tables are provided, namely a file management table 9 and a buffer management table 10, which are referred to and updated by each means.

第2図はファイル管理テーブル9の内容例を示す、ファ
イル管理テーブル9は、ユーザが使用しているファイル
にかかる各種の管理情報を格納するテーブルであり、複
数のエントリで構成されている。各エントリには、ファ
イル毎に割り当てられているファイル識別番号fnl〜
fnnや様々なファイル管理情報が格納されると共に、
バッファ管理テーブルエントリのアドレスffl〜ff
n、fbl〜fbnが格納される。本実施例では、使用
されているファイルに現在どのバッファb<割り当てら
れているかを各ファイル毎の双方向のチェーン(前方向
チェーンと後方向チェーン)で管理するものであり、フ
ァイル管理テーブル9の各エントリの一方のアドレスf
f1〜ffnは前方向チェーンの出発点となり、他方の
アドレスfb1〜fbnは後方向チェーンの出発点とな
る。
FIG. 2 shows an example of the contents of the file management table 9. The file management table 9 is a table that stores various management information regarding files used by users, and is composed of a plurality of entries. Each entry has a file identification number fnl~ assigned to each file.
fnn and various file management information are stored,
Buffer management table entry addresses ffl to ff
n, fbl to fbn are stored. In this embodiment, which buffer b< is currently allocated to the file being used is managed by a bidirectional chain (forward chain and backward chain) for each file, and the file management table 9 One address f of each entry
The addresses f1 to ffn are the starting points of the forward chain, and the other addresses fb1 to fbn are the starting points of the backward chain.

第3図はバッファ管理テーブル10の内容例を示す、バ
ッファ管理テーブル10は、ファイルに割り当てるバッ
ファにかかる各種の管理情報を格納するテーブルであり
、バッファと1対1に対応する複数のエントリで構成さ
れている。各エントリには、そのバッファが格納してい
るブロックの番号bnl−bnm、データ格納領域への
ポインタであるデータ格納領域アドレスdtl〜dtm
FIG. 3 shows an example of the contents of the buffer management table 10. The buffer management table 10 is a table that stores various management information related to buffers allocated to files, and is composed of a plurality of entries in one-to-one correspondence with the buffers. has been done. Each entry includes the block number bnl-bnm in which the buffer stores, and the data storage area address dtl-dtm, which is a pointer to the data storage area.
.

バッファ管理テーブルエントリのアドレスbfl〜b 
f m、  b b 1〜b bm、 ハッ7ア内ノデ
ータが補助記憶装置8へ反映済みか否かを示ずフラグf
1gl〜f1gm、その他のバッファ管理情報が格納さ
れる。ここで、一方のバッファ管理テーブルエントリの
アドレスbf1〜bfmは前方向チェーン中の次のエン
トリを指示するアドレス、他方のバッファ管理テーブル
エントリのアドレスbbl〜bbmは後方向チェーン中
の次のエントリを指示するアドレスである。
Buffer management table entry address bfl~b
f m, b b 1 to b bm, flag f indicates whether or not the data in 7a has been reflected in the auxiliary storage device 8.
1gl to f1gm and other buffer management information are stored. Here, the addresses bf1 to bfm of one buffer management table entry indicate the next entry in the forward chain, and the addresses bbl to bbm of the other buffer management table entry indicate the next entry in the backward chain. This is the address to be used.

次に、上述のように構成された本実施例の動作を説明す
る。
Next, the operation of this embodiment configured as described above will be explained.

第1図において、図示しないユーザプロセスよりファイ
ルデータの入出力要求がユーザインタフェイス1を通じ
て行われると、ファイル入出力管理手段2はその入出力
要求をブロック単位に分割し、最初の1つのブロック単
位に割り当てるバッファを確保するために、そのブロッ
ク番号と割り当てるファイルのファイル管理テーブル9
のエントリ(そのファイルのファイル識別番号が格納さ
れたエントリ)のアドレスとを指定して、バッファ割り
当て手段3を呼び出す。
In FIG. 1, when a file data input/output request is made by a user process (not shown) through the user interface 1, the file input/output management means 2 divides the input/output request into blocks, and divides the input/output request into blocks. In order to secure the buffer to be allocated to the block number and the file to be allocated, file management table 9
The buffer allocation means 3 is called by specifying the address of the entry (the entry in which the file identification number of the file is stored).

バッファ割り当て手段3は、バッファ管理テーブル10
中のその他のバッファ管理情報を調べて使用可能なバッ
ファを検索し、1つのバッファをファイル入出力管理手
段2から要求されたブロックのために確保する。即ち、
空きバッファが見つかった場合にはそのバッファ対応の
バッファ管理テーブル10のエントリのブロック番号欄
にファイル入出力管理手段2より指定されたブロック番
号を格納し、使用中等の情報をその他のバッファ管理情
報に格納する。また、空きバッファが存在しない場合に
は例えば最も古いデータを格納するバッファの内容を補
助記憶装置8に出力して空きバッファを確保し、そのバ
ッファ対応のバッファ管理テーブル10のエントリに対
し所定の情報を格納する0次にバッファ割り当て手段3
は、確保したバッファを、指定されたファイル管理テー
ブル9のエントリからチェーン付けるために、ファイル
データチェーン作成手段4を呼び出す。
The buffer allocation means 3 uses the buffer management table 10
Other buffer management information in the file is checked to search for a usable buffer, and one buffer is reserved for the block requested by the file input/output management means 2. That is,
If an empty buffer is found, the block number specified by the file input/output management means 2 is stored in the block number column of the entry in the buffer management table 10 corresponding to the buffer, and information such as usage is stored in other buffer management information. Store. In addition, if there is no free buffer, for example, the contents of the buffer storing the oldest data are output to the auxiliary storage device 8 to secure a free buffer, and predetermined information is added to the entry in the buffer management table 10 corresponding to the buffer. Zero-order buffer allocation means 3 for storing
calls the file data chain creation means 4 in order to chain the secured buffer from the specified entry in the file management table 9.

ファイルデータチェーン作成手段4は、バッファ割り当
て手段3で割り当てられたバッファを、ファイル管理テ
ーブル9およびバッファ管理テーブル10を史新するこ
とにより、上記指定されたファイル管理テーブル9のエ
ントリからのチェーンにつなげる。例えば、ファイル識
別番号fnlのファイルのデータを持ったバッファが1
つも存在しない状態で、そのファイルのブロック番号b
n2のブロックに対しバッファが割り当てられた場合、
ファイルデータチェーン作成手段4は、第2図のファイ
ル識別番号fnlが格納されたファイル管理テーブル9
のエントリにおけるバッファ管理テーブルエントリのア
ドレスff1.fblに、ブロック番号bn2が格納さ
れている第3図のバッファ管理テーブル10のエントリ
のアドレスを格納し、そのエントリのbf2.bb2に
は、ファイル識別番号fnlを持ったファイル管理テー
ブル9のエントリのアドレスを格納する。
The file data chain creation means 4 connects the buffer allocated by the buffer allocation means 3 to the chain starting from the specified entry of the file management table 9 by updating the file management table 9 and the buffer management table 10. . For example, there is one buffer containing the data of the file with file identification number fnl.
block number b of the file that never exists
If a buffer is allocated for block n2,
The file data chain creation means 4 includes a file management table 9 in which file identification numbers fnl shown in FIG. 2 are stored.
The address of the buffer management table entry in the entry ff1. The address of the entry in the buffer management table 10 of FIG. 3 in which block number bn2 is stored is stored in bf2.fbl of the entry. bb2 stores the address of the entry in the file management table 9 having the file identification number fnl.

上記のバッファ割り当て手段3およびファイルデータチ
ェーン作成手段4の処理が終了すると、ファイル入出力
管理手段2は、バッファ割り当て手段3で割り当てられ
たバッファを使用して入出力を行う、このとき、実際に
補助記憶装置8との入出力を行う場合は、バッファデー
タ入出力手段7が呼び出され、上記割り当てられたバッ
ファと補助記憶装置8との間の入出力が行われるが、遅
延書き込みの場合は、バッファにデータを書き込む処理
のみを行い、補助記憶装置8に未だデータが出力されて
いないことを示すフラグを第3図のブロック番号bn2
を格納したエントリのフラグf1g2に立て、書き込み
処理を終了する。なお、遅延書き込み後、上記バッファ
のデータが補助記憶装置8に出力された場合には、フラ
グfIg2は出力済みを示すように変更される。
When the processes of the buffer allocation means 3 and file data chain creation means 4 described above are completed, the file input/output management means 2 performs input/output using the buffer allocated by the buffer allocation means 3. When performing input/output with the auxiliary storage device 8, the buffer data input/output means 7 is called, and input/output is performed between the allocated buffer and the auxiliary storage device 8. However, in the case of delayed writing, Only the process of writing data to the buffer is performed, and a flag indicating that data has not yet been output to the auxiliary storage device 8 is set to block number bn2 in FIG.
The flag f1g2 is set for the entry storing , and the write process ends. Note that when the data in the buffer is output to the auxiliary storage device 8 after delayed writing, the flag fIg2 is changed to indicate that the data has been output.

次に、ブロック番号bn2のブロックへの入出力が終了
した後、ファイル入出力管理手段2からバッファ割り当
て手段3へ例えばブロック番号bn3のブロックへのバ
ッファ割り当てが要求されたとすると、ブロック番号b
n2のブロックにバッファが確保された場合と同様にバ
ッファが確保され、バッファ管理テーブル10の上記確
保されたバッファに対応するエントリにブロック番号b
n3が書き込まれると共に、その他のバッファ管理情報
に必要な情報が書き込まれる。また、遅延書き込みを行
う場合は、同エントリのフラグf1g3にバッファデー
タが出力されていないことを示すフラグが立てられる。
Next, after the input/output to the block with block number bn2 is completed, if the file input/output management means 2 requests the buffer allocation means 3 to allocate a buffer to the block with block number bn3, for example, then block number b
A buffer is secured in the same way as when a buffer is secured in block n2, and the block number b is entered in the entry corresponding to the secured buffer in the buffer management table 10.
At the same time as n3 is written, other necessary information for buffer management information is written. Furthermore, when performing delayed writing, a flag indicating that buffer data has not been output is set in the flag f1g3 of the same entry.

更に、ファイルデータチェーン作成手段4によって、フ
ァイル管理テーブル9のファイル識別番号fnlを持つ
エントリのfflにブロック番号bn3を持つバッファ
管理テーブル10のエントリのアドレスが格納され、そ
のエントリのbf3にはブロック番号bn2を持つバッ
ファ管理テーブル10のエントリのアドレスが格納され
、bb3にはファイル識別番号fn1を持ったファイル
管理テーブル9のエントリのアドレスが格納され、ブロ
ック番号bn2を持ったバッファ管理テーブル10のエ
ントリのbb2には、ブロック番号bn3を持ったバッ
ファ管理テーブル10のエントリのアドレスが格納され
る。
Furthermore, the file data chain creation means 4 stores the address of the entry in the buffer management table 10 having the block number bn3 in ffl of the entry with the file identification number fnl in the file management table 9, and the address of the entry in the buffer management table 10 having the block number bn3 is stored in bf3 of the entry. The address of the entry in the buffer management table 10 with block number bn2 is stored in bb3, the address of the entry in the file management table 9 with the file identification number fn1 is stored in bb3, and the address of the entry in the buffer management table 10 with block number bn2 is stored in bb3. The address of the entry in the buffer management table 10 having the block number bn3 is stored in bb2.

上記の処理の結果、ファイル識別番号fnlのファイル
管理テーブル9のエントリと、ブロック番号bn2.b
n3のバッファ管理テーブル10のエントリとの双方向
チェーンが作成される。このときのファイル管理テーブ
ル9とバッファ管理テーブル10のチェーンの状態を示
したのが第4図である。
As a result of the above processing, the entry of the file management table 9 with the file identification number fnl and the block number bn2. b
A bidirectional chain with the entry of the buffer management table 10 of n3 is created. FIG. 4 shows the state of the chain of the file management table 9 and buffer management table 10 at this time.

さて、その後、ファイル識別番号fnlのファイルのク
ローズを行うため、ユーザインタフェイス1を通じてユ
ーザプロセスからファイルクローズ要求が出されると、
ファイルクローズ手段5が呼び出される。
After that, when a file close request is issued from the user process through the user interface 1 to close the file with the file identification number fnl,
File closing means 5 is called.

ファイルクローズ手段5は、ファイルの使用終了処理の
なかで、バッファ管理テーブル検索手段6を呼び出す。
The file closing means 5 calls the buffer management table retrieval means 6 during the file usage termination process.

バッファ管理テーブル検索手段6は、ファイル識別番号
fnlを持ったファイル管理テーブル9のエントリにお
けるバッファ管理テーブルエントリのアドレスfflを
参照し、それが指し示すバッファ管理テーブル10のエ
ントリ即ちプロ・ツク番号bn3のブロックを格納する
バッファを管理しているエントリにおけるフラグf1g
3の内容を判定する。そして、フラグf1g3がバッフ
ァの内容が未出力であることを示している場合には、こ
のエントりが管理しているバッファの出力要求をバッフ
ァデータ入出力手段7に出し、バッファデータ入出力手
段7は当該バッファのデータを補助記憶装置8の該当す
るブロックに出力する。バッファ管理テーブル検索手段
6はブロック番号bn3のデータの出力が終了するか、
或いはフラグf1g3が出力済みを示していた場合には
、ブロック番号bn3を持つエントリのbf3が指し示
すバッファ管理テーブルIOのエントリ(ブロック番号
bn2を持つエントリ)を参照し、そのフラグf1g2
の判定を行って上述と同様の処理を繰り返す、その後、
バッファ管理テーブル検索手段6は、bf2を参照し、
次のエントリを得ようとするが、bf2はファイル管理
テーブル9のエントリを指しているため、バッファ管理
テーブルエントリの検索を終了する0以上の処理により
、ファイルがクローズされた時、そのファイルの為に使
用されていて且つ未だフラッシュされていなかった全て
のバッファの内容が補助記憶装置8に書き出される。そ
のため、ファイルクローズ後にシステムダウン等が発生
しても、ファイルのデータが保証されるや 〔発明の効果〕 以上説明したように、本発明のバッファフラッシュ機構
によれば、ファイルクローズ要求が出すれたファイルに
割り当てられていたバッファであって未だ補助記憶装置
に反映されていないデータを格納しているバッファにつ
いては自動的にフラッシュが行われて全てのバッファの
データが補助記憶装置に出力されるので、ユーザに負担
をかけることなく、ファイルの使用終了時にそのファイ
ルのデータを持ったバッファの中で補助記憶装置にデー
タが書き出されていないバッファだけを確実にフラッシ
ュすることが可能となる。従って、データ消失の危険性
を少なくすることができ、ファイルデータの信頼性を高
めることができる。
The buffer management table search means 6 refers to the address ffl of the buffer management table entry in the file management table 9 entry having the file identification number fnl, and finds the entry in the buffer management table 10 that it points to, that is, the block with the program number bn3. Flag f1g in the entry that manages the buffer that stores
Determine the contents of 3. If the flag f1g3 indicates that the contents of the buffer have not yet been output, an output request for the buffer managed by this entry is sent to the buffer data input/output means 7, and the buffer data input/output means 7 outputs the data in the buffer to the corresponding block in the auxiliary storage device 8. The buffer management table search means 6 determines whether the output of the data of block number bn3 has been completed or not.
Alternatively, if the flag f1g3 indicates that the output has been completed, refer to the buffer management table IO entry (the entry with the block number bn2) pointed to by bf3 of the entry with the block number bn3, and select the flag f1g2.
After that, repeat the same process as above, and then
The buffer management table search means 6 refers to bf2,
An attempt is made to obtain the next entry, but bf2 points to the entry in file management table 9, so when the file is closed by 0 or more processes that end the search for buffer management table entries, The contents of all buffers that have been used and have not yet been flushed are written to the auxiliary storage device 8. Therefore, even if a system down occurs after a file is closed, file data is guaranteed. [Effect of the Invention] As explained above, according to the buffer flush mechanism of the present invention, when a file close request is issued, Buffers that have been allocated to files and that store data that has not yet been reflected in the auxiliary storage device will be automatically flushed and all buffer data will be output to the auxiliary storage device. , it becomes possible to reliably flush only the buffers having data of the file whose data has not been written to the auxiliary storage device when the use of the file ends, without imposing a burden on the user. Therefore, the risk of data loss can be reduced and the reliability of file data can be increased.

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

第1図は本発明の一実施例の構成図、 第2図はファイル管理テーブルの内容例を示す図、 第3図はバッファ管理テーブルの内容例を示す図および
、 第4図はファイル管理テーブルとバッファ管理テーブル
との間に作成されたバッファ管理用のヂエーンの一例を
示す図である。 図において、 1・・・ユーザインクフェイス 2・・・ファイル入出力管理手段 3・・・バッファ割り当て手段 4・・・ファイルデータヂエ・−ン作成手段5・・・フ
ァイルクローズ手段 6・・・バッフ1管理テーブル検索手段7・・・バッフ
1データ入出力手段 8・・・補助記憶装置 9・・・ファイル管理テーブル 10・・・バッファ管理テーブル
Fig. 1 is a block diagram of an embodiment of the present invention, Fig. 2 is a diagram showing an example of the contents of a file management table, Fig. 3 is a diagram showing an example of the contents of a buffer management table, and Fig. 4 is a diagram showing an example of the contents of a file management table. FIG. 4 is a diagram showing an example of a buffer management chain created between the buffer management table and the buffer management table. In the figure, 1...User ink face 2...File input/output management means 3...Buffer allocation means 4...File data engine creation means 5...File closing means 6...Buffer 1 Management table search means 7... Buffer 1 Data input/output means 8... Auxiliary storage device 9... File management table 10... Buffer management table

Claims (2)

【特許請求の範囲】[Claims] (1)補助記憶装置内のデータ格納領域を一定サイズの
ブロックに分割してファイル領域割り当ての単位および
入出力の単位とし、ブロック単位にバッファを使用して
遅延書き込みを行うことによって入出力の高速化を図っ
た情報処理装置において、 バッファの割り当て状況と各バッファに格納されている
データの前記補助記憶装置への反映状況とをテーブル上
の管理情報によって各ファイル毎に管理する管理手段と
、 クローズ処理するファイルに割り当てられたバッファで
あって未だ前記補助記憶装置に反映されていないデータ
を格納しているバッファを前記テーブルより検索してそ
れら全てのバッファのデータを前記補助記憶装置に出力
するファイルクローズ時バッファフラッシュ手段とを備
えることを特徴とするバッファフラッシュ機構。
(1) The data storage area in the auxiliary storage device is divided into blocks of a fixed size, which are used as the unit of file area allocation and the unit of input/output, and a buffer is used for each block to perform delayed writing, thereby increasing the speed of input/output. In an information processing device that is designed to be configurable, there is provided a management means for managing the buffer allocation status and the reflection status of data stored in each buffer in the auxiliary storage device for each file using management information on a table; A file that searches the table for buffers that are allocated to the file to be processed and stores data that has not yet been reflected in the auxiliary storage device, and outputs the data of all those buffers to the auxiliary storage device. A buffer flush mechanism characterized by comprising: buffer flush means when closed.
(2)前記管理手段は、各バッファ対応のエントリを有
するバッファ管理テーブルにおける同一ファイルに割り
当てられているバッファ対応のエントリとファイル管理
テーブルのファイル対応のエントリとをチェーン付ける
と共に、バッファ管理テーブルの各エントリに格納した
フラグによって各バッファに格納されているデータが前
記補助記憶装置に反映されているか否かを管理する構成
を有する請求項1記載のバッファフラッシュ機構。
(2) The management means chains an entry corresponding to a buffer allocated to the same file in a buffer management table having an entry corresponding to each buffer and an entry corresponding to a file in the file management table, and 2. The buffer flush mechanism according to claim 1, further comprising a configuration for managing whether or not data stored in each buffer is reflected in the auxiliary storage device based on a flag stored in an entry.
JP2219089A 1990-08-22 1990-08-22 Buffer flash mechanism Pending JPH04102118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2219089A JPH04102118A (en) 1990-08-22 1990-08-22 Buffer flash mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2219089A JPH04102118A (en) 1990-08-22 1990-08-22 Buffer flash mechanism

Publications (1)

Publication Number Publication Date
JPH04102118A true JPH04102118A (en) 1992-04-03

Family

ID=16730087

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2219089A Pending JPH04102118A (en) 1990-08-22 1990-08-22 Buffer flash mechanism

Country Status (1)

Country Link
JP (1) JPH04102118A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07248883A (en) * 1994-03-11 1995-09-26 Nec Corp Prior buffer flash system
JPH08106418A (en) * 1994-10-06 1996-04-23 Honda Motor Co Ltd Protecting method for data input
JP2011008570A (en) * 2009-06-26 2011-01-13 Buffalo Inc Storage device, information processing system, and computer program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07248883A (en) * 1994-03-11 1995-09-26 Nec Corp Prior buffer flash system
JPH08106418A (en) * 1994-10-06 1996-04-23 Honda Motor Co Ltd Protecting method for data input
JP2011008570A (en) * 2009-06-26 2011-01-13 Buffalo Inc Storage device, information processing system, and computer program

Similar Documents

Publication Publication Date Title
US5237661A (en) Buffer management method and system therefor using an I/O buffer on main memory and utilizing virtual memory and page fixing
US6023744A (en) Method and mechanism for freeing disk space in a file system
US5761536A (en) System and method for reducing memory fragmentation by assigning remainders to share memory blocks on a best fit basis
US5448728A (en) Storage medium control system for controlling a write-once read-many storage medium
US6349372B1 (en) Virtual uncompressed cache for compressed main memory
US6779045B2 (en) System and apparatus for increasing the number of operations per transmission for a media management system
US4680703A (en) Data processing system with reorganization of disk storage for improved paging
CN109800185B (en) Data caching method in data storage system
US11580162B2 (en) Key value append
JP3612339B2 (en) Data processing method and apparatus
US20120158674A1 (en) Indexing for deduplication
US7849060B2 (en) System and method for managing log information for transaction
JPH04213129A (en) Memory control system and memory control method
US11886401B2 (en) Database key compression
EP0493012A2 (en) Control system for cache storage unit
US7672980B2 (en) System, apparatus and method for reading data
US8332595B2 (en) Techniques for improving parallel scan operations
CN108804571B (en) Data storage method, device and equipment
JPH04102118A (en) Buffer flash mechanism
US20210240687A1 (en) Reducing requests using probabilistic data structures
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
KR100489412B1 (en) Data output method of external storage device
US11526474B2 (en) Reducing requests using probabilistic data structures
JP2735400B2 (en) Asynchronous I / O control method
JPH06110741A (en) Computer device