JP3276642B2 - Transactional synchronous access to sequential files - Google Patents

Transactional synchronous access to sequential files

Info

Publication number
JP3276642B2
JP3276642B2 JP14775091A JP14775091A JP3276642B2 JP 3276642 B2 JP3276642 B2 JP 3276642B2 JP 14775091 A JP14775091 A JP 14775091A JP 14775091 A JP14775091 A JP 14775091A JP 3276642 B2 JP3276642 B2 JP 3276642B2
Authority
JP
Japan
Prior art keywords
record
file
transaction
nonvolatile memory
records
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.)
Expired - Fee Related
Application number
JP14775091A
Other languages
Japanese (ja)
Other versions
JPH04370847A (en
Inventor
篤志 山本
宏也 林
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP14775091A priority Critical patent/JP3276642B2/en
Publication of JPH04370847A publication Critical patent/JPH04370847A/en
Application granted granted Critical
Publication of JP3276642B2 publication Critical patent/JP3276642B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は,不揮発性メモリを利用
して順ファイルへのトランザクション同期アクセスを実
現する順ファイルへのトランザクション同期アクセス方
法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for synchronously accessing a sequential file using a non-volatile memory.

【0002】オンライン・トランザクションの処理等に
おいて発生したデータを,順ファイルに格納する場合,
処理性能を向上させ,かつ,記憶媒体におけるスペース
効率を向上させる技術が必要とされる。
[0002] When data generated in the processing of an online transaction is stored in a sequential file,
There is a need for a technology that improves processing performance and space efficiency in a storage medium.

【0003】[0003]

【従来の技術】図5は従来技術の例を示す。図5におい
て,10はアプリケーション・プログラムが走行する空
間(以下,アプリ空間という),13はファイルへのア
クセスの排他制御を行う排他機構,16はページバッフ
ァ,17はシーケンシャルにレコードが格納される順フ
ァイルを表す。
2. Description of the Related Art FIG. 5 shows an example of the prior art. In FIG. 5, reference numeral 10 denotes a space in which an application program runs (hereinafter, referred to as an application space); 13, an exclusion mechanism for performing exclusive control of file access; 16, a page buffer; 17, an order in which records are sequentially stored. Represents a file.

【0004】従来技術では,トランザクション開始後
に,レコードの書き出し要求があると,そのレコードを
揮発性メモリで構成されるページバッファ16上に蓄え
ておき,トランザクション終了時に,排他機構13によ
って順ファイル17への排他的なアクセス権(以下,排
他という)を獲得し,ページバッファ16上に存在する
トランザクション対象のレコードを順ファイル17に書
き出していた。その後,順ファイル17の排他を解放し
ていた。
In the prior art, when a record write request is issued after the start of a transaction, the record is stored in a page buffer 16 composed of a volatile memory, and when the transaction ends, the exclusive mechanism 13 sends the record to the sequential file 17. Exclusive access right (hereinafter, referred to as exclusive), and the transaction target record existing on the page buffer 16 has been written to the sequential file 17. Thereafter, the exclusion of the sequential file 17 was released.

【0005】[0005]

【発明が解決しようとする課題】図6は従来技術の問題
点説明図である。順ファイル17に対して,トランザク
ションが連続して発生する場合,毎回のトランザクショ
ン終了時にファイル媒体への入出力(I/O)が出るた
め,一般にI/Oネックとなるという性能上の問題があ
る。
FIG. 6 is a diagram for explaining the problems of the prior art. When transactions occur consecutively in the sequential file 17, input / output (I / O) to the file medium is output at the end of each transaction, so there is a performance problem that generally causes an I / O bottleneck. .

【0006】例えば,レコードを順ファイル17に反映
するとき,最終レコードの存在するページにレコードを
追加しようとすると,図6の(イ)に示すように,その
ページを,一旦,順ファイル17から読み込み,読み込
んだページにレコードを追加して,そのページを順ファ
イル17に反映するような処理を行う必要がある。しか
し,この処理を行うとレコードを格納するために最低で
も2回のI/Oが出るため,性能上の問題がある。
For example, when a record is reflected in the sequential file 17, if a record is to be added to the page where the last record exists, the page is temporarily transferred from the sequential file 17 as shown in FIG. It is necessary to perform a process of reading, adding a record to the read page, and reflecting the page in the sequential file 17. However, if this processing is performed, at least two I / Os are required to store the record, and there is a performance problem.

【0007】これを1回のI/Oで済むように,図6の
(ロ)に示すように,最終レコードの存在するページの
次のページにレコードを追加する方式も考えられ,用い
られている。しかし,この方式の場合,各ページにレコ
ードがフルに入っていないとファイル効率の悪化を招
く。例えば,1ページを4096バイトとし,格納する
レコードの大きさを512バイトとすると,1ページに
つき(4096−512)バイト分のスペースは空き領
域となり,以降使用されない無駄な領域となる。
As shown in FIG. 6B, a method of adding a record to the page next to the page where the last record exists is conceivable and used so that this can be done by one I / O. I have. However, in the case of this method, if the records are not fully contained in each page, the file efficiency is deteriorated. For example, if one page is 4096 bytes and the size of a record to be stored is 512 bytes, the space of (4096-512) bytes per page becomes an empty area, and becomes a useless area that is not used thereafter.

【0008】本発明は上記問題点の解決を図り,トラン
ザクション終了時の性能向上とファイルのスペース効率
向上を可能とした順ファイルへのトランザクション同期
アクセスを実現することを目的としている。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems and to realize transaction synchronous access to a sequential file which can improve performance at the end of a transaction and improve space efficiency of a file.

【0009】[0009]

【課題を解決するための手段】図1は本発明の原理説明
図である。図1において,10はアプリケーション・プ
ログラムが走行するアプリ空間,11はトランザクショ
ンの開始および終了を制御するトランザクション制御
部,12はファイルに対するアクセス機能を提供するフ
ァイルシステム,13はファイルへのアクセスの排他制
御を行う排他機構,14は揮発性メモリで構成されるレ
コードバッファ,15はレコード格納用不揮発性メモ
リ,16はページバッファ,17はシーケンシャルにレ
コードが格納される順ファイルを表す。
FIG. 1 is a diagram illustrating the principle of the present invention. In FIG. 1, reference numeral 10 denotes an application space in which an application program runs, 11 denotes a transaction control unit that controls the start and end of a transaction, 12 denotes a file system that provides a file access function, and 13 denotes exclusive control of file access. , A record buffer composed of a volatile memory, 15 a nonvolatile memory for storing records, 16 a page buffer, and 17 a sequential file in which records are sequentially stored.

【0010】本発明は,例えばオンライン・データ処理
用の一般的に知られているハードウェア構成による計算
機システムで実現される。本発明では,トランザクショ
ンで書き出されたレコードを一時的に格納するレコード
格納用不揮発性メモリ15を設ける。そして,各トラン
ザクション終了時に,トランザクション終了済のレコー
ドを順ファイル17に反映する代わりに,レコード格納
用不揮発性メモリ15へ格納する。
The present invention is realized, for example, by a computer system having a generally known hardware configuration for online data processing. In the present invention, a record storage nonvolatile memory 15 for temporarily storing records written out in a transaction is provided. Then, at the end of each transaction, instead of reflecting the completed record in the sequential file 17, the record is stored in the record storage nonvolatile memory 15.

【0011】レコード格納用不揮発性メモリ15に格納
されたレコードは,最終的には順ファイル17に反映さ
れることになるが,その契機は,レコード格納用不揮発
性メモリ15へのレコード格納量が所定量以上になった
ときである。例えば,レコード格納用不揮発性メモリ1
5がフル状態,すなわち,これ以上レコードを格納でき
ない状態になったときに,ページバッファ16を介して
順ファイル17に反映する。ページバッファ16から順
ファイル17にページを書き出すときにだけ,排他機構
13により順ファイル17の排他を獲得すればよい。
The records stored in the record storage nonvolatile memory 15 are ultimately reflected in the sequential file 17, but the trigger is that the record storage amount in the record storage nonvolatile memory 15 is limited. This is when the amount has exceeded a predetermined amount. For example, the nonvolatile memory 1 for storing records
When 5 is full, that is, when no more records can be stored, it is reflected on the sequential file 17 via the page buffer 16. Only when a page is written from the page buffer 16 to the sequential file 17, the exclusion mechanism 13 needs to acquire the exclusion of the sequential file 17.

【0012】レコード格納用不揮発性メモリ15上にレ
コードが存在する状態で,システムもしくはトランザク
ションを実行しているアプリケーション・プログラムが
クラッシュしても,レコード格納用不揮発性メモリ15
上のレコードは失われることはないため,リカバリ処理
時に順ファイル17に反映することで,トランザクショ
ン終了済のレコードを保証することができる。
When a system or an application program executing a transaction crashes while a record is present in the record storage nonvolatile memory 15, the record storage nonvolatile memory 15
Since the above record is not lost, by reflecting it in the sequential file 17 at the time of the recovery processing, it is possible to guarantee the record for which the transaction has been completed.

【0013】なお,ファイルは複数(1つ以上)のペー
ジから構成され,各ページは複数(1つ以上)のレコー
ドから構成される。レコードは,アプリケーション・プ
ログラムが認識するデータの単位である。
A file is composed of a plurality of (one or more) pages, and each page is composed of a plurality of (one or more) records. A record is a unit of data recognized by an application program.

【0014】[0014]

【作用】レコード格納用不揮発性メモリ15に空き領域
が存在すれば,毎回のトランザクション終了時にI/O
が出るわけではなく,レコード格納用不揮発性メモリ1
5へのアクセスのみでトランザクション終了処理が完了
する。
If there is an empty area in the record storage nonvolatile memory 15, the I / O is performed at the end of each transaction.
Does not appear, but the nonvolatile memory 1 for storing records
The transaction end process is completed only with access to No. 5.

【0015】このときの処理は,レコード格納用不揮発
性メモリ15へのアクセスのみであるため,従来方式の
ようにファイルに対する排他を獲得する必要もない。な
ぜならば,レコード格納用不揮発性メモリ15を,トラ
ンザクションに対応して獲得することにより,他のトラ
ンザクションとのアクセスの競合がないようにすること
ができるからである。
Since the process at this time is only access to the record storage nonvolatile memory 15, there is no need to obtain exclusion for the file unlike the conventional method. This is because, by acquiring the record storage nonvolatile memory 15 corresponding to a transaction, it is possible to prevent contention for access with another transaction.

【0016】順ファイル17に対してI/Oが出るの
は,原則的には,レコード格納用不揮発性メモリ15が
フル状態になったときだけであるので,複数回のトラン
ザクションが連続して発生する場合,従来方式よりも処
理全体としての性能が向上する。
Since the I / O is issued to the sequential file 17 only in principle when the record storage nonvolatile memory 15 becomes full, a plurality of transactions occur consecutively. In this case, the performance of the entire processing is improved as compared with the conventional method.

【0017】例えば,不揮発性メモリ量を4096バイ
ト長とし,1回のトランザクションで550バイト長の
レコードを1つ書き出す処理を考えると,7レコード処
理時,すなわち7回のトランザクション処理時に,レコ
ード格納用不揮発性メモリ15がフル状態となり,次の
トランザクション処理で順ファイル17への反映が行わ
れる。これにより,7回に1回の割合でしかI/Oが出
ず,毎回I/Oが出されている従来技術よりも格段に性
能が向上する。
For example, when the amount of the non-volatile memory is set to 4096 bytes and a process of writing one 550-byte record in one transaction is considered, the record storage is performed at the time of seven record processing, that is, at the time of seven transaction processing. The non-volatile memory 15 becomes full, and is reflected in the sequential file 17 in the next transaction processing. As a result, I / O is output only once in seven times, and the performance is remarkably improved as compared with the related art in which I / O is output every time.

【0018】また,例えばレコード格納用不揮発性メモ
リ15のサイズを,順ファイル17を構成しているペー
ジ(複数個のレコードを格納する単位)のサイズと合わ
せておくことにより,レコード格納用不揮発性メモリ1
5がフルになった状態で,順ファイル17内のページに
レコードを反映すれば,ファイル媒体上のページには,
フルにレコードが詰まった状態となる。これによって,
媒体上のスペース効率を向上させることも可能となる。
Further, for example, by matching the size of the record storage nonvolatile memory 15 with the size of a page (unit for storing a plurality of records) constituting the sequential file 17, the record storage nonvolatile memory 15 can be used. Memory 1
If the record is reflected on the page in the sequential file 17 in the state where the number 5 is full, the page on the file medium is
The record is full. by this,
It is also possible to improve the space efficiency on the medium.

【0019】[0019]

【実施例】図2はトランザクション同期アクセスでファ
イル反映がない場合の本発明の実施例,図3はトランザ
クション同期アクセスでファイル反映がある場合の本発
明の実施例を示している。
FIG. 2 shows an embodiment of the present invention when there is no file reflection by transaction synchronous access, and FIG. 3 shows an embodiment of the present invention when there is file reflection by transaction synchronous access.

【0020】(a) トランザクション制御部11 トランザクション制御部(以下,LTCという)11
は,トランザクションの開始・終了を制御する機構であ
る。これは,複数ファイルに対してトランザクションを
適用した場合に,該当するすべてのファイルの一貫性を
保証するための調整を行う。
(A) Transaction control unit 11 Transaction control unit (hereinafter referred to as LTC) 11
Is a mechanism that controls the start and end of a transaction. This makes adjustments to ensure consistency of all applicable files when a transaction is applied to multiple files.

【0021】LTC11の基本動作は,以下のとおりで
ある。トランザクション終了時に,LTC11はファイ
ルシステム12に対して1回目の終了要求を出す。これ
をprepare要求という。
The basic operation of the LTC 11 is as follows. At the end of the transaction, the LTC 11 issues a first end request to the file system 12. This is called a prepare request.

【0022】この処理の成功が,ファイルシステム12
からLTC11に通知されると,次にLTC11は2回
目の終了要求をファイルシステム12に出す。これをc
ommit要求という。この完了をもってトランザクシ
ョン終了の処理を完結する。
The success of this process depends on the file system 12
Then, the LTC 11 issues a second end request to the file system 12. This is c
Omit request. With this completion, the transaction end processing is completed.

【0023】複数ファイルに対するトランザクション処
理の場合,LTC11は,すべてのファイルに対してp
repare要求を発行する。すべてのprepare
処理が終了すると,次に全ファイルに対してcommi
t要求を出し,トランザクション終了処理を完結する。
In the case of transaction processing for a plurality of files, the LTC 11
Issue a repair request. All prepare
When the processing is completed, the next
t request is issued to complete the transaction end processing.

【0024】prepare要求に対して1つでも失敗
が通知されたならば,LTC11は全ファイルに対しp
repare無効を発行し,これにより全prepar
eは無効になり,各ファイルは元の状態に戻される。こ
うすることによって,複数ファイルの一貫性を保証す
る。なお,以下の実施例の説明では,説明を簡単にする
ために,対象ファイルが1つの場合を例にして説明す
る。
If at least one failure is notified for the prepare request, the LTC 11
issue a "repair invalid", which causes all prepar
e is invalidated and each file is returned to its original state. This ensures consistency of multiple files. In the following description of the embodiment, for simplification of the description, a case where there is one target file will be described as an example.

【0025】(b) 排他機構13 レコードをファイルに反映するため,対象ファイルの逐
次化を行う機構である。同一ファイルに対して,複数の
トランザクションが同時にアクセスする可能性があるた
め,これらの要求を逐次化する必要がある。
(B) Exclusion mechanism 13 This is a mechanism for serializing the target file in order to reflect the record in the file. Since multiple transactions may access the same file at the same time, it is necessary to serialize these requests.

【0026】レコードを順ファイル17に反映するとき
には,まず排他機構13がファイルの排他を獲得し,レ
コードのEOF(End Of File) 情報を獲得し,更新す
る。ファイルへの反映終了時にファイルの排他を解放す
る。
When the record is reflected in the sequential file 17, the exclusion mechanism 13 first acquires the exclusion of the file, acquires the EOF (End Of File) information of the record, and updates it. Release the lock on the file when the reflection on the file ends.

【0027】(c) レコードバッファ14 トランザクションに同期したレコード書き出し時に,レ
コードを格納するバッファで,揮発性メモリで構成され
る。トランザクション終了時までは,書き出し要求され
たレコードは,このレコードバッファ14に格納され
る。
(C) Record buffer 14 A buffer for storing records when writing records in synchronization with a transaction, and is composed of a volatile memory. Until the end of the transaction, the record requested to be written is stored in the record buffer 14.

【0028】このレコードバッファ14は,ファイルオ
ープン単位に用意される。直接,レコード格納用不揮発
性メモリ15にレコードの格納を行わないで,レコード
バッファ14を経由してレコード格納用不揮発性メモリ
15にレコードを格納するのは,不揮発性メモリへのア
クセス性能が,揮発性メモリで構成されるレコードバッ
ファ14へのアクセス性能より落ちるためである。レコ
ードバッファ14にレコードを蓄え,できるだけレコー
ド格納用不揮発性メモリ15へのアクセス回数を減らす
ようにしている。
The record buffer 14 is prepared for each file open. Storing records in the record storage non-volatile memory 15 via the record buffer 14 without directly storing the records in the record storage non-volatile memory 15 is because the access performance to the non-volatile memory is volatile. This is because the access performance to the record buffer 14 composed of the volatile memory is reduced. Records are stored in the record buffer 14, and the number of accesses to the record storage nonvolatile memory 15 is reduced as much as possible.

【0029】(d) レコード格納用不揮発性メモリ15 トランザクション終了時に,レコードバッファ14のレ
コードを格納するメモリであり,不揮発性メモリで構成
されるため,システム等のクラッシュ時にも内容が保存
される。これもファイルオープン単位に用意される。
(D) Record Storage Non-Volatile Memory 15 This is a memory for storing records in the record buffer 14 at the end of a transaction, and is composed of a non-volatile memory, so that its contents are preserved even in the event of a system crash. This is also prepared for each file open.

【0030】レコード格納用不揮発性メモリ15に格納
されたレコードは,トランザクション終了以降,順ファ
イル17への反映が保証される。実際に,レコード格納
用不揮発性メモリ15のレコードが順ファイル17へ反
映されるのは,レコード格納用不揮発性メモリ15がフ
ル状態になったとき,またはファイルクローズ時であ
る。言い換えれば,トランザクションが終了しても,書
き出し要求されたレコードが,即時に順ファイル17に
反映されるとは限らない。
The records stored in the record storage nonvolatile memory 15 are guaranteed to be reflected in the sequential file 17 after the end of the transaction. Actually, the records in the record storage nonvolatile memory 15 are reflected in the sequential file 17 when the record storage nonvolatile memory 15 becomes full or when the file is closed. In other words, even if the transaction ends, the record requested to be written is not always immediately reflected in the sequential file 17.

【0031】(e) 排他機構13が管理するEOF情報 EOF情報とは,ファイルにおける最終レコードの格納
位置を示す情報である。EOF情報は,不揮発性メモリ
に保存され,排他機構13によって管理される。
(E) EOF information managed by the exclusion mechanism 13 The EOF information is information indicating the storage position of the last record in the file. The EOF information is stored in a non-volatile memory and managed by the exclusion mechanism 13.

【0032】ファイルシステム12は,レコード格納用
不揮発性メモリ15のレコードを順ファイル17に反映
する際に,排他機構13に不揮発性メモリ(EOF情
報)の排他獲得を依頼することで,EOF情報を獲得す
る。獲得したEOF情報をもとに,ページバッファ16
の内容をファイルに書き出す。
The file system 12 requests the exclusion mechanism 13 to acquire exclusive control of the non-volatile memory (EOF information) when reflecting the records in the record storage non-volatile memory 15 in the sequential file 17, thereby storing the EOF information. To win. Based on the acquired EOF information, the page buffer 16
Write the contents of to a file.

【0033】(f) ページバッファ16 レコード格納用不揮発性メモリ15のレコードを,順フ
ァイル17に反映するために使用するI/O用のバッフ
ァである。ページバッファ16は,ファイルの格納形式
に合わされている。
(F) Page buffer 16 This is an I / O buffer used to reflect records in the record storage nonvolatile memory 15 to the sequential file 17. The page buffer 16 is adapted to the file storage format.

【0034】レコード格納用不揮発性メモリ15は,通
常のレコードアクセスで持っているページバッファのよ
うに完全なページ構造を持つものではなく,必要最小限
のページ構造を持つ程度である。したがって,レコード
格納用不揮発性メモリ15をI/O用のバッファとして
使用することができない。そこで,アプリ空間10は,
ページバッファ16を用意するようにしている。
The record storage nonvolatile memory 15 does not have a complete page structure like a page buffer used for ordinary record access, but has only a necessary minimum page structure. Therefore, the record storage nonvolatile memory 15 cannot be used as an I / O buffer. Therefore, the application space 10
A page buffer 16 is prepared.

【0035】以下,図2に示す(1) 〜(5) に従って,ト
ランザクション同期アクセスでファイルが反映がない場
合の処理動作について説明する。 (1) ファイルをオープンすると,レコード格納用不揮発
性メモリ15が割り当てられる。ファイルをオープンし
た時点で,レコードバッファ14,レコード格納用不揮
発性メモリ15は,共に空の状態である。
The processing operation when the file is not reflected by the transaction synchronous access will be described below with reference to (1) to (5) shown in FIG. (1) When a file is opened, the nonvolatile memory 15 for storing records is allocated. When the file is opened, both the record buffer 14 and the record storage nonvolatile memory 15 are empty.

【0036】(2) トランザクションが開始され,レコー
ドの書き出し処理で,書き出し要求のあったレコードを
レコードバッファ14に格納し,レコードの書き出し処
理を完了する。
(2) The transaction is started, and in the record writing process, the record requested to be written is stored in the record buffer 14, and the record writing process is completed.

【0037】(3) トランザクション終了宣言により,L
TC11からファイルシステム12に対しprepar
e要求が発行される。 (4) ファイルシステム12は,prepare要求を受
け付けると,レコードバッファ14のレコードをレコー
ド格納用不揮発性メモリ15に移動し,prepare
処理を完了する。この状態では,prepareを有効
にすることも無効にすることもできる。
(3) When a transaction end declaration is made, L
Preparing from TC 11 to file system 12
An e request is issued. (4) Upon receiving the prepare request, the file system 12 moves the record in the record buffer 14 to the record storage nonvolatile memory 15, and
Complete the process. In this state, the prepare can be made valid or invalid.

【0038】(5) LTC11からのcommit要求に
より,レコード格納用不揮発性メモリ15に移動したレ
コードを有効にする。 次に,図3に示す(1) 〜(10)に従って,トランザクショ
ン同期アクセスでファイルが反映がある場合の処理動作
について説明する。
(5) In accordance with a commit request from the LTC 11, the record moved to the record storage nonvolatile memory 15 is validated. Next, the processing operation when a file is reflected by transaction synchronous access will be described according to (1) to (10) shown in FIG.

【0039】(1) 〜(3) は,上述した図2に示す(1) 〜
(3) と同じである。 (4) ファイルシステム12は,LTC11からのpre
pare要求を受け付けると,レコードバッファ14の
レコードをレコード格納用不揮発性メモリ15に格納し
ようとするが,既にフル状態である。このため,レコー
ド格納用不揮発性メモリ15内のレコードを順ファイル
17に反映する必要があると判断する。なお,レコード
格納用不揮発性メモリ15のレコードは,既にcomm
itが完了しているレコードである。
(1) to (3) correspond to (1) to (3) shown in FIG.
Same as (3). (4) The file system 12 stores the pre-
When the pair request is accepted, the record in the record buffer 14 is to be stored in the record storage non-volatile memory 15, but is already in the full state. Therefore, it is determined that the records in the record storage nonvolatile memory 15 need to be reflected in the sequential file 17. Note that the record in the record storage nonvolatile memory 15 is already
It is a record for which it has been completed.

【0040】(5) ファイルシステム12は,順ファイル
17にレコードを反映するため,排他機構13にファイ
ルの排他獲得を依頼し,ファイルの書き出し位置を知る
ためのEOF情報の獲得を依頼する。
(5) In order to reflect the record in the sequential file 17, the file system 12 requests the exclusion mechanism 13 to obtain exclusion of the file, and requests to obtain the EOF information for knowing the writing position of the file.

【0041】(6) ファイルシステム12は,I/O用の
ページバッファ16にレコード格納用不揮発性メモリ1
5のレコードを移動し,ページ構造(ファイルに反映で
きる構造)を構築する。
(6) The file system 12 stores the record storage nonvolatile memory 1 in the page buffer 16 for I / O.
Move record 5 and build a page structure (a structure that can be reflected in the file).

【0042】(7) 上述した(5) で獲得したEOF情報を
もとに,ページ単位でページバッファ16のレコードを
順ファイル17に反映する。 (8) 順ファイル17へのレコード格納後,EOF情報を
更新し,獲得済みの排他を解放する。
(7) The records in the page buffer 16 are reflected in the sequential file 17 in page units based on the EOF information obtained in (5). (8) After storing the record in the sequential file 17, the EOF information is updated, and the acquired exclusion is released.

【0043】(9) レコード格納用不揮発性メモリ15内
のレコードが順ファイル17に反映されたため,レコー
ド格納用不揮発性メモリ15内のレコードをクリアし,
その後,レコードバッファ14内のレコードをレコード
格納用不揮発性メモリ15に格納して,prepare
処理を完了する。
(9) Since the records in the record storage nonvolatile memory 15 are reflected in the sequential file 17, the records in the record storage nonvolatile memory 15 are cleared.
After that, the record in the record buffer 14 is stored in the record storage nonvolatile memory 15 and prepared.
Complete the process.

【0044】(10)LTC11からのcommit要求に
より,レコード格納用不揮発性メモリ15に移動したレ
コードを有効にする。 図4は,本発明の実施例によるレコードバッファ14内
のレコードをレコード格納用不揮発性メモリ15に移動
するときのフローチャートである。以下の(a)〜(h) の
処理手順となる。
(10) In response to a commit request from the LTC 11, the record moved to the record storage nonvolatile memory 15 is validated. FIG. 4 is a flowchart when a record in the record buffer 14 is moved to the record storage nonvolatile memory 15 according to the embodiment of the present invention. The following processing procedures (a) to (h) are performed.

【0045】(a) レコードバッファ14内レコードをレ
コード格納用不揮発性メモリ15に移動する処理を開始
する。 (b) このとき,レコード格納用不揮発性メモリ15がフ
ル状態であれば,(d)へ進み,フル状態でなければ,(c)
へ進む。
(A) The process of moving the record in the record buffer 14 to the record storage nonvolatile memory 15 is started. (b) At this time, if the record storage nonvolatile memory 15 is full, the process proceeds to (d). If not, (c)
Proceed to.

【0046】(c) レコードバッファ14のレコードをレ
コード格納用不揮発性メモリ15に移動し,処理を終了
する。 (d) レコード格納用不揮発性メモリ15がフル状態であ
れば,排他機構13により,ファイルの排他を獲得し,
EOF情報を獲得する。
(C) The record in the record buffer 14 is moved to the record storage non-volatile memory 15 and the processing is terminated. (d) If the record storage nonvolatile memory 15 is full, the exclusion mechanism 13 acquires exclusion of the file,
Get EOF information.

【0047】(e) レコード格納用不揮発性メモリ15の
レコードを,I/O用のページバッファ16に移動す
る。 (f) ページバッファ16のページを順ファイル17に反
映する。
(E) The record in the record storage nonvolatile memory 15 is moved to the I / O page buffer 16. (f) The pages in the page buffer 16 are reflected in the sequential file 17.

【0048】(g) 排他機構13が管理するEOF情報を
更新し,ファイルの排他を解放する。 (h) レコード格納用不揮発性メモリ15をクリアし,そ
の後,レコードバッファ14のレコードをレコード格納
用不揮発性メモリ15に移動する。
(G) Update the EOF information managed by the exclusion mechanism 13 and release the exclusion of the file. (h) The record storage nonvolatile memory 15 is cleared, and then the record in the record buffer 14 is moved to the record storage nonvolatile memory 15.

【0049】[0049]

【発明の効果】以上説明したように,本発明によれば,
複数回のトランザクション終了済レコードを不揮発性メ
モリに一時格納しておき,一括して目的とする順ファイ
ルに反映することにより,I/O回数を減らして,性能
を向上させることが可能となる。また,ページ単位でま
とめてファイルへの反映を行うことができるため,ファ
イル内の無駄なスペースを大幅に削減できる。
As described above, according to the present invention,
By temporarily storing the transaction completed records in the non-volatile memory and reflecting them in the target sequential file collectively, the number of I / O times can be reduced and the performance can be improved. In addition, since the data can be reflected in the file in units of pages, useless space in the file can be significantly reduced.

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

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】トランザクション同期アクセスでファイル反映
がない場合の本発明の実施例を示す図である。
FIG. 2 is a diagram showing an embodiment of the present invention when there is no file reflection in transaction synchronous access.

【図3】トランザクション同期アクセスでファイル反映
がある場合の本発明の実施例を示す図である。
FIG. 3 is a diagram showing an embodiment of the present invention when a file is reflected in transaction synchronous access.

【図4】本発明の実施例によるレコードバッファ内のレ
コードをレコード格納用不揮発性メモリに移動するとき
のフローチャートである。
FIG. 4 is a flowchart when a record in a record buffer is moved to a record storage nonvolatile memory according to the embodiment of the present invention.

【図5】従来技術の例を示す図である。FIG. 5 is a diagram showing an example of the related art.

【図6】従来技術の問題点説明図である。FIG. 6 is an explanatory diagram of a problem in the related art.

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

10 アプリ空間 11 トランザクション制御部 12 ファイルシステム 13 排他機構 14 レコードバッファ 15 レコード格納用不揮発性メモリ 16 ページバッファ 17 順ファイル Reference Signs List 10 application space 11 transaction control unit 12 file system 13 exclusion mechanism 14 record buffer 15 non-volatile memory for storing records 16 page buffer 17 sequential file

フロントページの続き (56)参考文献 特開 平2−138646(JP,A) 山谷正己,図解 コンピュータシリー ズ ファイル編成入門,日本,株式会社 オーム社,1985年7月30日,P28−P30 (58)調査した分野(Int.Cl.7,DB名) G06F 12/00 514 G06F 12/00 518 Continuation of the front page (56) References JP-A-2-138646 (JP, A) Masami Yamatani, Illustration of Computer Series File Organization, Japan, Ohmsha, July 30, 1985, P28-P30 (58 ) Field surveyed (Int. Cl. 7 , DB name) G06F 12/00 514 G06F 12/00 518

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 トランザクションによって書き出された
レコードを順ファイル(17)に格納する順ファイルへのト
ランザクション同期アクセス方法であって,トランザク
ションで書き出されたレコードを格納するレコード格納
用不揮発性メモリ(15)を設け,複数回のトランザクショ
ン終了済レコードを前記レコード格納用不揮発性メモリ
(15)に一時的に格納しておき,レコード格納用不揮発性
メモリ(15)へのレコードの格納が所定量またはフル状態
になったときに,レコード格納用不揮発性メモリ(15)内
のレコードを一括して順ファイル(17)に反映することを
特徴とする順ファイルへのトランザクション同期アクセ
ス方法。
A method for synchronously accessing a sequential file for storing records written by a transaction in a sequential file, comprising: a record storage nonvolatile memory for storing records written by a transaction; 15), and records the completed records of multiple transactions in the non-volatile memory for storing the records.
(15) is temporarily stored in the non-volatile memory for record storage (15) when the storage of the record in the non-volatile memory for record storage (15) reaches a predetermined amount or becomes full. A transaction synchronous access method to the sequential file, wherein the transaction is reflected in the sequential file (17) in a lump.
JP14775091A 1991-06-20 1991-06-20 Transactional synchronous access to sequential files Expired - Fee Related JP3276642B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14775091A JP3276642B2 (en) 1991-06-20 1991-06-20 Transactional synchronous access to sequential files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14775091A JP3276642B2 (en) 1991-06-20 1991-06-20 Transactional synchronous access to sequential files

Publications (2)

Publication Number Publication Date
JPH04370847A JPH04370847A (en) 1992-12-24
JP3276642B2 true JP3276642B2 (en) 2002-04-22

Family

ID=15437303

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14775091A Expired - Fee Related JP3276642B2 (en) 1991-06-20 1991-06-20 Transactional synchronous access to sequential files

Country Status (1)

Country Link
JP (1) JP3276642B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200390A (en) * 1993-12-28 1995-08-04 Toshiba Corp Data access method
CN102630319B (en) * 2009-09-17 2015-03-25 株式会社东芝 Management device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
山谷正己,図解 コンピュータシリーズ ファイル編成入門,日本,株式会社オーム社,1985年7月30日,P28−P30

Also Published As

Publication number Publication date
JPH04370847A (en) 1992-12-24

Similar Documents

Publication Publication Date Title
Kwon et al. Strata: A cross media file system
US5499367A (en) System for database integrity with multiple logs assigned to client subsets
US8700585B2 (en) Optimistic locking method and system for committing transactions on a file system
US6058054A (en) Method and system for providing an instant backup in a RAID data storage system
JP3526452B2 (en) Disk array device and data backup method
US8499013B2 (en) FAT directory structure for use in transaction safe file system
US20050138312A1 (en) Method for acquiring snapshot
JP2001516099A (en) Data file storage management system for snapshot copy operation
US6415296B1 (en) Method and system for more efficiently providing a copy in a raid data storage system
KR20010050644A (en) Transactional file system for realizing atomic update of plural files by transactions
JPH11345171A (en) Method and system for providing additional address space on disk using virtual data storage subsystem thereof
JPH04245352A (en) Storage device control method and storage device subsystem
CN103198088A (en) Shadow paging based log segment directory
US5953728A (en) System for modifying a database using a transaction log
JP3276642B2 (en) Transactional synchronous access to sequential files
KR100981064B1 (en) A method to maintain software raid consistency using journaling file system
JP4394467B2 (en) Storage system, server apparatus, and preceding copy data generation method
WO2011050451A1 (en) Real-time data transformation to access foreign data sources
US20070106867A1 (en) Method and system for dirty time log directed resilvering
US11237925B2 (en) Systems and methods for implementing persistent data structures on an asymmetric non-volatile memory architecture
JP5665518B2 (en) Database system, information processing method thereof, and program thereof
US7925827B2 (en) Method and system for dirty time logging
JP2002108673A (en) Shared file system and metal data server computer to be applied to the same
WO1993003436A1 (en) Method and apparatus for reducing lock period of shared buffer
JP2767966B2 (en) High-speed file access method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020129

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080208

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090208

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090208

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100208

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees