JPH06236301A - Method for writing data in file - Google Patents

Method for writing data in file

Info

Publication number
JPH06236301A
JPH06236301A JP5041751A JP4175193A JPH06236301A JP H06236301 A JPH06236301 A JP H06236301A JP 5041751 A JP5041751 A JP 5041751A JP 4175193 A JP4175193 A JP 4175193A JP H06236301 A JPH06236301 A JP H06236301A
Authority
JP
Japan
Prior art keywords
size
virtual memory
file
data
mapped
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
JP5041751A
Other languages
Japanese (ja)
Inventor
Toshiki Okiyama
俊樹 沖山
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP5041751A priority Critical patent/JPH06236301A/en
Publication of JPH06236301A publication Critical patent/JPH06236301A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide the method which can write the output data of a difference file in secondary storage device without any abnormal ending. CONSTITUTION:When date in an unaltered part of an original file are written, the size of the unaltered part is counted. Then it is decided whether or not the size of the unaltered part can be mapped in a virtual memory at a time. When it is decided that the size of the unaltered part can be mapped in the virtual memory 14 at a time, the unaltered part is mapped in the virtual memory 14 as it is and then the unaltered data are written. When it is decided that the size of the unaltered part can not be mapped in the virtual memory 14 at a time, the size of the unaltered part is divided by (n). Then files of the unaltered parts divided by (n) are mapped in the virtual memory 14 sequentially and then the unaltered data are written.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、仮想メモリを使用した
ファイルへのデータ書き込み方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of writing data to a file using virtual memory.

【0002】[0002]

【従来の技術】図3は従来例におけるファイルへのデー
タ書き込み方法を説明するための図である。図3におい
て、オリジナルファイル31は、複数のページ311、
312、313、314、315、・・・31nから構
成され、図示されていない二次記憶装置に格納されてい
る。また、オリジナルファイル31は、必要に応じて、
追加、変更、あるいは削除が行なわれる。このように、
オリジナルファイル31におけるページ311ないし3
1nには、追加、変更、あるいは削除等の処理が行なわ
れる。たとえば、図3に示すハッチングを施した部分の
ページ311′、313′、314′は、変更されたこ
とを示している。
2. Description of the Related Art FIG. 3 is a diagram for explaining a conventional method of writing data to a file. In FIG. 3, the original file 31 includes a plurality of pages 311,
31n, and is stored in a secondary storage device (not shown). Also, the original file 31 can be
Additions, changes, or deletions are made. in this way,
Pages 311 to 3 in the original file 31
Processing such as addition, change, or deletion is performed on 1n. For example, the hatched portions of pages 311 ', 313', and 314 'shown in FIG. 3 indicate that they have been changed.

【0003】一般に、ファイルへのデータ書き込み、た
とえばデータの追加、変更、あるいは削除があった場
合、オリジナルファイルと差分ファイルとで、データを
管理しているアプリケーションでは、その変更領域の分
だけ差分ファイル331を拡張し、図示されていない仮
想メモリにマップしてから変更データが書き込まれる。
次に、変更されたファイル32の内、未変更ページ31
2、315、・・・31nの数をカウントし、そのペー
ジ数分差分ファイル332を拡張する。そして、変更さ
れたファイルを保存する際に、拡張された差分ファイル
332は、前記仮想メモリにマップされ、オリジナルフ
ァイルの未変更部分のデータが書き込まれる。
Generally, when data is written in a file, for example, when data is added, changed, or deleted, an application that manages data between an original file and a difference file has a difference file corresponding to the changed area. Change data is written after expanding 331 and mapping it to a virtual memory (not shown).
Next, the unmodified page 31 of the modified file 32
.., 31n are counted, and the difference file 332 is expanded by the number of pages. Then, when saving the changed file, the expanded difference file 332 is mapped to the virtual memory, and the data of the unmodified portion of the original file is written.

【0004】また、たとえば、特開平2−235134
号公報における外部記憶装置管理方式では、システム内
で決定されている利用者識別子と、出力データ書き込み
異常終了時に要求者に通知するために使用する領域であ
る結果通知領域へのアドレスとの対応表を備えている。
そして、外部記憶装置へのデータ書き込みが失敗する
と、上記対応表を用いて、書き込み終了処理結果通知手
段は、要求受付手段により管理されている要求情報の一
つである要求者の利用識別子に対応する結果通知領域を
検索し、失敗の旨を要求者に通知する。また、特開平4
−52826号公報に記載されている世代付きロードモ
ジュールライブラリの差分管理処理方式は、即時実行可
能な世代付きロードモジュールライブラリを差分管理す
ることによって、記憶媒体の使用容量を削減することが
できる。
Further, for example, Japanese Patent Laid-Open No. 2-235134.
In the external storage device management method in the publication, a correspondence table between the user identifier determined in the system and the address to the result notification area, which is an area used to notify the requester when the output data writing ends abnormally Is equipped with.
When the data writing to the external storage device fails, the writing end processing result notifying means uses the correspondence table to correspond to the usage identifier of the requester, which is one of the request information managed by the request receiving means. The result notification area is searched, and the requester is notified of the failure. In addition, JP-A-4
The difference management processing method of the load module library with generation described in Japanese Patent No. 52826 can reduce the used capacity of the storage medium by performing difference management of the load module library with generation that can be immediately executed.

【0005】[0005]

【発明が解決しようとする課題】しかし、残されている
仮想メモリのサイズと比較して、オリジナルファイルの
未変更部分のサイズが著しく大きい場合には、仮想メモ
リ34にマップできないことがある。このような場合
に、差分ファイルには、データを書き込むことができな
いため、差分ファイルを削除しなければならなくなる。
たとえば、前記特開平2−235134号公報に示され
ている外部記憶装置管理方式では、出力処理バッファが
オバーフローするような出力データの要求があると、要
求者に対して異常終了の通知を出す。すなわち、異常終
了の通知が出た場合には、差分ファイルを保存すること
ができないという問題を有した。
However, when the size of the unmodified portion of the original file is significantly larger than the size of the remaining virtual memory, it may not be possible to map it to the virtual memory 34. In such a case, since data cannot be written in the difference file, the difference file must be deleted.
For example, in the external storage device management method disclosed in Japanese Patent Laid-Open No. 2-235134, when there is a request for output data that causes the output processing buffer to overflow, a notification of abnormal termination is issued to the requester. That is, there is a problem that the difference file cannot be saved when the notification of abnormal termination is given.

【0006】本発明は、以上のような課題を解決するた
めのもので、オリジナルファイルの未変更部分のサイズ
が仮想メモリに残された量よりも大きい場合、異常終了
を出さずに、差分ファイルの出力データを二次記憶装置
内に書き込むことができるファイルへのデータ書き込み
方法を提供することを目的とする。
The present invention is intended to solve the above problems, and when the size of the unmodified portion of the original file is larger than the amount left in the virtual memory, the difference file is output without abnormal termination. It is an object of the present invention to provide a data writing method to a file in which the output data of the above can be written in the secondary storage device.

【0007】[0007]

【課題を解決するための手段】前記目的を達成するため
に、本発明におけるファイルへのデータ書き込み方法
は、オリジナルファイル内のデータ変更により差分ファ
イルを発生する拡張サイズ分の領域を仮想メモリにマッ
プし、オリジナルファイルの未変更部分のデータを書き
込む際に、オリジナルファイルの未変更部分のサイズを
カウントし、カウントされたサイズが仮想メモリに1度
にマップできるか否かを判定し、オリジナルファイルの
未変更部分のサイズが1度にマップできると判定された
場合、そのまま仮想メモリにマップして書き込み、オリ
ジナルファイルの未変更部分のサイズが1度にマップで
きないと判定された場合、前記未変更部分のサイズを1
/nに分割し、分割された1/nサイズのファイルを順
次仮想メモリに書き込むことを特徴とする。
In order to achieve the above object, a method of writing data to a file according to the present invention is such that an area of an extension size for generating a difference file by changing data in an original file is mapped to a virtual memory. Then, when writing the data of the unmodified portion of the original file, the size of the unmodified portion of the original file is counted, and it is determined whether the counted size can be mapped to the virtual memory at a time. If it is determined that the size of the unmodified portion can be mapped at one time, it is mapped and written in the virtual memory as it is, and if it is determined that the size of the unmodified portion of the original file cannot be mapped at once, the unmodified portion is The size of 1
/ N, and the divided 1 / n size file is sequentially written to the virtual memory.

【0008】[0008]

【作 用】オリジナルファイルへデータが書き込まれ
た場合、オリジナルファイル内のデータは、変更領域の
分だけ、差分ファイルを拡張し、仮想メモリにマップし
てから書き込まれる。オリジナルファイルの未変更部分
のデータを書き込む際に、オリジナルファイルの未変更
部分のサイズがカウントされる。次に、カウントされた
オリジナルファイルの未変更部分のサイズが仮想メモリ
に一度にマップされるか否かが判定される。オリジナル
ファイルの未変更部分のサイズが仮想メモリに一度にマ
ップできると判定された場合、オリジナルファイルの未
変更部分は、そのまま仮想メモリにマップしてから未変
更データが書き込まれる。オリジナルファイルの未変更
部分のサイズが仮想メモリに一度にマップできないと判
定された場合、オリジナルファイルの未変更部分のサイ
ズを1/nに分割する。その後、1/nに分割された未
変更部分のファイルは、順次仮想メモリにマップしてか
ら未変更データが書き込まれる。
[Operation] When data is written to the original file, the data in the original file is written after expanding the difference file by the changed area and mapping it to virtual memory. When writing the data of the unmodified portion of the original file, the size of the unmodified portion of the original file is counted. Next, it is determined whether the size of the counted unmodified portion of the original file is mapped into virtual memory at one time. When it is determined that the size of the unmodified portion of the original file can be mapped to the virtual memory at one time, the unmodified portion of the original file is mapped to the virtual memory as it is before the unmodified data is written. If it is determined that the size of the unchanged part of the original file cannot be mapped to the virtual memory at once, the size of the unchanged part of the original file is divided into 1 / n. After that, the unchanged files divided into 1 / n are sequentially mapped to the virtual memory, and the unchanged data are written.

【0009】[0009]

【実 施 例】図1は本発明における一実施例を示すブ
ロック構成図である。図1において、データ書き込み装
置は、データを入力するキーボードと入力されたデータ
を表示するディスプレイとからなる入出力部11と、入
力されたデータを後述の二次記憶装置に書き込むための
制御を行なう制御部12と、入力されたデータを格納す
る、たとえばディスク等の二次記憶装置13と、仮想メ
モリ14とから構成される。
[Embodiment] FIG. 1 is a block diagram showing an embodiment of the present invention. In FIG. 1, the data writing device performs an input / output unit 11 including a keyboard for inputting data and a display for displaying the input data, and control for writing the input data in a secondary storage device described later. It comprises a control unit 12, a secondary storage device 13 for storing input data, such as a disk, and a virtual memory 14.

【0010】また、前記制御部12は、データの書き込
みおよび制御部12を制御する制御手段121と、未変
更部分のサイズをカウントするサイズカウント手段12
2と、未変更部分のサイズが残されている仮想メモリ内
に一度にマップできるか否かを判定する判定手段123
と、当該判定手段123によって未変更部分のサイズが
残されている仮想メモリ内に一度にマップできないと判
定された場合、未変更部分のサイズを分割する分割手段
124と、未変更部分を一度に、あるいは分割された部
分を順次仮想メモリ14に書き込む書き込み手段125
とから構成される。
The control unit 12 controls the data writing and control unit 12 and the size counting unit 12 that counts the size of the unmodified portion.
2 and the determination means 123 for determining whether or not the size of the unmodified portion can be mapped at once in the virtual memory.
If the determination unit 123 determines that the size of the unmodified portion cannot be mapped at once in the virtual memory, the dividing unit 124 that divides the size of the unmodified portion and the unmodified portion at the same time , Or a writing unit 125 that sequentially writes the divided portions into the virtual memory 14.
Composed of and.

【0011】図2は本発明における一実施例であるデー
タ書き込み方法を説明するためのフローチャートであ
る。図2に示すフローチャートは、オリジナルファイル
の未変更部のサイズがSページの場合の例で、図1およ
び図2を参照して、本実施例におけるファイルへのデー
タ書き込み方法を説明する。たとえば、使用者は、二次
記憶装置13からデータをディスプレイに読み出し、キ
ーボードによって追加、変更、あるいは削除が施された
後、ファイルのデータを二次記憶装置13に保存する
(ステップ21)。
FIG. 2 is a flow chart for explaining a data writing method which is an embodiment of the present invention. The flowchart shown in FIG. 2 is an example in which the size of the unmodified portion of the original file is S pages, and the method of writing data to the file in this embodiment will be described with reference to FIGS. For example, the user reads the data from the secondary storage device 13 to the display, adds, changes, or deletes the data with the keyboard, and then saves the data of the file in the secondary storage device 13 (step 21).

【0012】制御手段121の命令により、サイズカウ
ント手段122は、オリジナルファイルの未変更部のサ
イズをカウントし、たとえば、未変更部をSページ分カ
ウントする(ステップ22)。制御手段121は、サイ
ズカウント手段122のカウントしたSページ分、差分
ファイルを拡張する(ステップ23)。制御手段121
は、仮想メモリ14内に使用していない連続した領域を
捜す。そして、判定手段123は、前記連続した仮想メ
モリ14の領域と、前記サイズカウント手段122によ
ってカウントされたSページ分とのサイズを比較し、S
ページ分が仮想メモリ14にマップできるか否かを判定
する(ステップ24)。
In response to an instruction from the control means 121, the size counting means 122 counts the size of the unmodified portion of the original file, for example, the unmodified portion for S pages (step 22). The control means 121 expands the difference file by the S pages counted by the size counting means 122 (step 23). Control means 121
Searches for unused contiguous areas in virtual memory 14. Then, the judging means 123 compares the size of the continuous area of the virtual memory 14 with the size of S pages counted by the size counting means 122, and S
It is determined whether pages can be mapped in the virtual memory 14 (step 24).

【0013】判定手段123によって、仮想メモリ14
内に、前記Sページ分がマップできると判定された場
合、Sページ分は、仮想メモリ14内にマップされる
(ステップ25)。その後、書き込み手段125は、制
御手段121の制御の基に、オリジナルファイルの未変
更部分のデータがSページ分仮想メモリ14に書き込ま
れる(ステップ26)。制御手段121は、前記Sペー
ジ分のデータを仮想メモリ14に書き込む際に、前記分
割手段124により、1/nに分割されているか否かを
調べる(ステップ27)。分割手段124によりSペー
ジ分が分割されていない場合、すなわち、n=0の場
合、ファイルの保存は終了する(ステップ28)。
By the judging means 123, the virtual memory 14
If it is determined that the S pages can be mapped, the S pages are mapped in the virtual memory 14 (step 25). After that, the writing unit 125 writes the data of the unmodified portion of the original file into the virtual memory 14 for S pages under the control of the control unit 121 (step 26). When writing the data for the S pages into the virtual memory 14, the control unit 121 checks whether or not the data is divided into 1 / n by the dividing unit 124 (step 27). When S pages have not been divided by the dividing means 124, that is, when n = 0, the file saving ends (step 28).

【0014】ステップ24において、判定手段123
が、前記Sページ分を仮想メモリ14内の連続した領域
にマップできないと判定した場合、分割手段124は、
「n」に「1」を足す(ステップ29)。ステップ29
において、「n」は「2」となり、分割手段124は、
Sページを1/2に分割する。その後、ステップ24に
戻り、判定手段123は、S/2ページが仮想メモリ1
4内の連続領域にマップできるか否かを調べる。分割手
段124は、判定手段123が仮想メモリ14内の連続
領域にマップできるまで、「n」に「1」ずつ足して分
割を試みる。
At step 24, the judging means 123
However, when it is determined that the S pages cannot be mapped to the continuous area in the virtual memory 14, the dividing unit 124
"1" is added to "n" (step 29). Step 29
, “N” becomes “2”, and the dividing means 124
Divide the S page in half. After that, the process returns to step 24, and the determining unit 123 determines that the S / 2 page is the virtual memory 1
Check whether it can be mapped to the continuous area within 4. The dividing unit 124 tries to divide by adding “1” to “n” until the determining unit 123 can map the continuous area in the virtual memory 14.

【0015】前記Sページは、1/nに分割され後、仮
想メモリ14内の連続領域にマップできるようになった
場合、前述のごとく、ステップ25およびステップ26
によって、仮想メモリ14にマップされた後、1/nの
データが書き込まれる。制御手段121は、ステップ2
7において、「n」が「0」であるか否かを調べる。
「n」が「0」でない場合、制御手段121は、「n」
から「1」を引く(ステップ30)。そして、ステップ
25に戻し、S/nページが仮想メモリ14にマップさ
れる。制御手段121は、「n」が「0」になるまで、
この処理を繰り返す。すなわち、S/nページは、n回
マッピングと書き込みとによりSページが書き込まれる
ため、ファイルの保存が終了する(ステップ28)。
When the S page is divided into 1 / n and can be mapped to a continuous area in the virtual memory 14, steps 25 and 26 are executed as described above.
After being mapped to the virtual memory 14, 1 / n of data is written. The control means 121 performs step 2
At 7, it is checked whether "n" is "0".
When “n” is not “0”, the control unit 121 determines “n”.
"1" is subtracted from (step 30). Then, returning to step 25, the S / n page is mapped to the virtual memory 14. The control means 121, until “n” becomes “0”,
This process is repeated. That is, as for the S / n page, the S page is written by mapping and writing n times, so that the saving of the file ends (step 28).

【0016】[0016]

【発明の効果】以上説明したごとく、本発明によれば、
未変更部のサイズが仮想メモリ内に連続した領域より大
きくとも、未変更部のサイズを分割し、分割したサイズ
を繰り返して保存することにより、異常終了を行なうこ
となく、出力データを記憶装置内に書き込むことができ
る。
As described above, according to the present invention,
Even if the size of the unmodified part is larger than the continuous area in the virtual memory, the size of the unmodified part is divided, and the divided size is repeatedly saved, so that the output data can be stored in the storage device without abnormal termination. Can be written on.

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

【図1】 本発明における一実施例を示すブロック構成
図である。
FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】 本発明における一実施例であるデータ書き込
み方法を説明するためのフローチャートである。
FIG. 2 is a flowchart for explaining a data writing method that is an embodiment of the present invention.

【図3】 従来例におけるファイルへのデータ書き込み
方法を説明するための図である。
FIG. 3 is a diagram for explaining a method of writing data to a file in a conventional example.

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

11・・・入出力 12・・・制御部 13・・・二次記憶装置 14・・・仮想メモリ 121・・・制御手段 122・・・サイズカウント手段 123・・・判定手段 124・・・分割手段 125・・・書き込み手段 11 ... Input / output 12 ... Control unit 13 ... Secondary storage device 14 ... Virtual memory 121 ... Control means 122 ... Size counting means 123 ... Determination means 124 ... Division Means 125 ... Writing means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 オリジナルファイル内のデータ変更によ
り差分ファイルを発生する拡張サイズ分の領域を仮想メ
モリにマップし、オリジナルファイルの未変更部分のデ
ータを書き込むファイルへのデータ書き込み方法におい
て、 オリジナルファイルの未変更部分のサイズをカウント
し、 カウントされたサイズが仮想メモリに1度にマップでき
るか否かを判定し、 オリジナルファイルの未変更部分のサイズが1度にマッ
プできると判定された場合、そのまま仮想メモリにマッ
プして書き込み、 オリジナルファイルの未変更部分のサイズが1度にマッ
プできないと判定された場合、前記未変更部分のサイズ
を1/nに分割し、 分割された1/nサイズのファイルを順次仮想メモリに
書き込むことを特徴とするファイルへのデータ書き込み
方法。
1. A method for writing data to a file in which an area of an extension size for generating a difference file due to data change in the original file is mapped to a virtual memory and data of an unmodified portion of the original file is written to the original file. Counts the size of the unmodified portion, determines whether the counted size can be mapped to virtual memory at a time, and if it is determined that the unmodified portion of the original file can be mapped at one time, If it is determined that the size of the unchanged part of the original file cannot be mapped at one time by mapping to the virtual memory and writing, the size of the unchanged part is divided into 1 / n, and the divided 1 / n size A method for writing data to a file, which comprises sequentially writing the file to a virtual memory.
JP5041751A 1993-02-08 1993-02-08 Method for writing data in file Pending JPH06236301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5041751A JPH06236301A (en) 1993-02-08 1993-02-08 Method for writing data in file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5041751A JPH06236301A (en) 1993-02-08 1993-02-08 Method for writing data in file

Publications (1)

Publication Number Publication Date
JPH06236301A true JPH06236301A (en) 1994-08-23

Family

ID=12617131

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5041751A Pending JPH06236301A (en) 1993-02-08 1993-02-08 Method for writing data in file

Country Status (1)

Country Link
JP (1) JPH06236301A (en)

Similar Documents

Publication Publication Date Title
JPH039494B2 (en)
JPH07220400A (en) Information control method of write-once storage device
JPH06236301A (en) Method for writing data in file
JP2912657B2 (en) File access processor
JPH02151944A (en) Data processor
JP2507399B2 (en) Database equipment
JP2861846B2 (en) Magnetic disk control system
JPH06324925A (en) File system with data compressing function
JP2903605B2 (en) File area management processing method
JP2605476B2 (en) Dump collection processing method
JP3068451B2 (en) Electronic computer
JPH0337748A (en) External storage accessing system utilizing main storage
KR940005774B1 (en) Extended memory access method
JPH05165686A (en) Data store control system
JPH08263389A (en) Data backup method
JP3368378B2 (en) Storage content management method and data processing device
JPH0546641A (en) On-line data succeeding system
JP3092663B2 (en) Main memory swapping method
JPH04336638A (en) Disk exchange system in system working mode
JPH02257282A (en) Table preparation processor
JPH0535557A (en) Common information access system
JPH0380471A (en) Defective track substitution system
JPH06168079A (en) Data backup system
JPS61156450A (en) Dynamic buffer control system
JPH06337808A (en) Memory management system