JPH05108388A - Process restoration system - Google Patents
Process restoration systemInfo
- Publication number
- JPH05108388A JPH05108388A JP3266668A JP26666891A JPH05108388A JP H05108388 A JPH05108388 A JP H05108388A JP 3266668 A JP3266668 A JP 3266668A JP 26666891 A JP26666891 A JP 26666891A JP H05108388 A JPH05108388 A JP H05108388A
- Authority
- JP
- Japan
- Prior art keywords
- copy
- checkpoint
- data
- page
- restoration
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Retry When Errors Occur (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】この発明は、オペレーティングシ
ステムにおいて、プロセスが更新したデータを最も近い
チェックポイント時に復旧するプロセス復旧方式に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a process recovery system for recovering data updated by a process at the nearest checkpoint in an operating system.
【0002】[0002]
【従来の技術】プロセス実行中にエラーなどによってプ
ロセスの実行が継続できなくなったときに、そのプロセ
スの実行中に適宜チェックポイントを設定しておき、プ
ロセスの実行が継続できなくなった時点で最も最近のチ
ェックポイントまでデータを復旧し、そのチェックポイ
ントからプロセスを再実行させる必要が生じる場合があ
る。2. Description of the Related Art When a process cannot be continued due to an error during execution of the process, a checkpoint is set appropriately during the process, and the latest checkpoint is made when the process cannot be continued. It may be necessary to recover the data up to that checkpoint and restart the process from that checkpoint.
【0003】例えばデータベースシステムにおいて、ト
ランザクション実行中にデッドロックが発生した場合に
は、最も最近のコミットポイントからデッドロックが起
きた時点までに更新したデータをもとに戻し、そのコミ
ットポイントから実行を再開する必要がある。For example, in a database system, when a deadlock occurs during execution of a transaction, the data updated from the most recent commit point to the time when the deadlock occurs is returned to the original and the execution is executed from that commit point. Need to restart.
【0004】また、複数のプロセッサが1つの実行キュ
ーからプロセスを取り、実行するようなマルチプロセッ
サシステムにおいて、あるプロセッサがハードウェアの
故障などによりプロセスの実行が継続できなくなった場
合、プロセスがディスパッチされてから変更したデータ
をもとに戻し、プロセスの状態を実行した時点の状態に
戻して実行キューにつなぐことにより、他のプロセッサ
によって実行させることができる。In a multiprocessor system in which a plurality of processors take a process from one execution queue and execute the process, when a certain processor cannot continue execution due to a hardware failure or the like, the process is dispatched. It can be executed by another processor by returning the changed data to the original state, returning the state of the process to the state at the time of execution, and connecting it to the execution queue.
【0005】このようなプロセス復旧方式において、プ
ロセスが更新したデータを最も最近のチェックポイント
時まで復元する方法には、以下の2つのようなものがあ
る。 (1)チェックポイントにおいて、プロセスの持ってい
るデータイメージ(データ領域)全体をコピーし、復旧
の必要が生じたときには、その時点のデータイメージを
無効にし、コピーしたデータイメージを有効にする方
法。In such a process recovery method, there are the following two methods for restoring the data updated by the process up to the latest checkpoint. (1) A method of copying the entire data image (data area) of the process at the checkpoint, invalidating the data image at that point in time when restoration is necessary, and validating the copied data image.
【0006】(2)プロセスがどのデータをどの様に変
更したかというデータ更新の履歴を取っておき、その履
歴をもとにチェックポイント時のデータイメージを復旧
する方法。(2) A method of retrieving a data image at the time of checkpoint based on the history of data update which keeps track of which data the process changed and how.
【0007】しかしながら(1)の方法では、チェック
ポイントでのデータイメージを保存しなければならず、
データイメージ保存のためのメモリ領域を必要とし、又
コピーの為のオーバヘッドが大きくなってしまう。However, in the method (1), the data image at the checkpoint must be saved,
A memory area for storing the data image is required, and the overhead for copying becomes large.
【0008】また、(2)の方法では、プロセスのデー
タ更新の履歴を取る必要があり履歴のコピーのオーバヘ
ッドは元より、復旧時にはその履歴をもとにデータを復
旧するための手間がかかる。Further, in the method (2), it is necessary to take a history of data update of the process, the overhead of copying the history is a source, and at the time of restoration, it takes time and effort to restore the data based on the history.
【0009】[0009]
【発明が解決しようとする課題】このように従来の方法
では、データイメージの保存、プロセスのデータ更新履
歴の保存及びその履歴に基づくデータの復旧のオーバヘ
ッドが大きくなっていた。本発明は上記のような従来技
術の欠点を除去し、プロセス復旧のためのオーバヘッド
を小さくするプロセス復旧方式を提供することを目的と
するものである。As described above, in the conventional method, the overhead of saving the data image, saving the data update history of the process, and restoring the data based on the history is large. SUMMARY OF THE INVENTION It is an object of the present invention to eliminate the above-mentioned drawbacks of the prior art and provide a process restoration method that reduces the overhead for process restoration.
【0010】[0010]
【課題を解決するための手段】上記目的を達成するため
に本発明においては、MMU(メモリ・マネージメント
・ユニット)のライト・プロテクト機能によりプロセス
実行中の書き込みを検出し、書き込みが起こった部分の
コピーを作成し、そのコピーに対して更新を行う。ま
た、MMUのページテーブルを操作することにより、プ
ロセス実行中のチェックポイント通過時には前記コピー
をコピー元に反映し、プロセスが更新したデータを最も
最近のチェックポイント時に復旧する場合には前記コピ
ーを無効にすることによりプロセスの復旧を行う。In order to achieve the above object, in the present invention, a write protect function of an MMU (memory management unit) is used to detect writing during process execution, and to detect a portion where writing has occurred. Make a copy and make updates to it. Also, by manipulating the page table of the MMU, the copy is reflected in the copy source when the checkpoint passes during the process execution, and the copy is invalid when the data updated by the process is restored at the latest checkpoint. To restore the process.
【0011】[0011]
【作用】このような方式においては、チェックポイント
でのファイルイメージ全体をコピーせず、更新された部
分のみをコピーする。また、復旧時には、プロセスの実
行の履歴は必要なく、コピーを無効にするのみでよいた
め、プロセス復旧のためのオーバヘッドを軽減できる。In such a system, the entire file image at the checkpoint is not copied, but only the updated part is copied. Further, at the time of restoration, the history of process execution is not required and it is only necessary to invalidate the copy, so the overhead for restoration of the process can be reduced.
【0012】[0012]
【実施例】以下本発明の一実施例を図面を参照して説明
する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.
【0013】図1は本実施例の構成図を示したものであ
る。オペレーティングシステム(OS)101内には、書
き込みトラップ処理部102,チェックポイント処理部
103,プロセス復旧部104が存在する。オペレーテ
ィングシステム101はMMU105によって仮想記憶
を実現している。また、主記憶(MM)上106にはペー
ジテーブル107、コピー管理テーブル108がある。FIG. 1 shows a block diagram of this embodiment. The operating system (OS) 101 includes a write trap processing unit 102, a checkpoint processing unit 103, and a process restoration unit 104. The operating system 101 realizes virtual storage by the MMU 105. Further, on the main memory (MM) 106, there are a page table 107 and a copy management table 108.
【0014】図1の動作を図2のフローを用いて説明す
る。図2(a)は「書き込み」、(b)は「チェックポ
イント」、(c)は「プロセス復旧」のイベントに対す
る処理の流れを示している。「書き込み」のイベントが
起こった場合、予めMMU105によりライト・プロテ
クトをかけておきMMUに例外(割り込み)を発生させ
る(ステップ1)。その例外はMMU105からの書き
込みトラップにより書き込みトラップ処理部102に入
力する。書き込みトラップ処理部102では、コピー管
理テーブル108を調べコピーが存在するか否かを検出
する(ステップ2)。コピーが存在しなければ書き込み
が起こったページのコピーを作成し(ステップ3)、ペ
ージテーブル107を更新する(ステップ4)。この更
新はページテーブル107内の書き込みが起こったペー
ジを指している部分が、新たに作成したコピーを指すよ
うに変更するものであって、この後コピー管理テーブル
108は変更内容を保存し管理する(ステップ5)。こ
の後、ステップ6においてコピーに対し更新を行う。The operation of FIG. 1 will be described with reference to the flow of FIG. 2A shows the flow of processing for the event of "write", (b) shows "checkpoint", and FIG. 2C shows the flow of processing for "process recovery" event. When a "write" event occurs, write protection is applied in advance by the MMU 105 to generate an exception (interrupt) in the MMU (step 1). The exception is input to the write trap processing unit 102 by the write trap from the MMU 105. The write trap processor 102 checks the copy management table 108 to detect whether or not a copy exists (step 2). If there is no copy, a copy of the page in which the writing has occurred is made (step 3) and the page table 107 is updated (step 4). This update is to change the portion of the page table 107 that points to the page where the writing has occurred to point to the newly created copy. After that, the copy management table 108 stores and manages the changes. (Step 5). Then, in step 6, the copy is updated.
【0015】次に「チェックポイント」のイベントにつ
いて説明する。チェックポイントの処理は、チェックポ
イント処理部103で行われる。この処理部103で
は、コピー管理テーブル108をクリアーすることによ
りコピーを有効にする。又「プロセス復旧」はプロセッ
サからの復旧命令をプロセス復旧部104に入力し、コ
ピー管理テーブル108の内容をページテーブル107
に書き戻すことによりコピーを無効化し、プロセスを最
も近いチェックポイントから再実行するようにする。Next, the "checkpoint" event will be described. The checkpoint processing is performed by the checkpoint processing unit 103. The processing unit 103 enables the copy by clearing the copy management table 108. In the “process recovery”, a recovery command from the processor is input to the process recovery unit 104, and the contents of the copy management table 108 are changed to the page table 107.
Disable the copy by writing it back to and restart the process from the closest checkpoint.
【0016】図3は仮想空間及び実空間(メインメモ
リ)との対応及びページテーブル,コピー管理テーブル
の内容を示す図である。今、実空間302上のページ番
号Raにマッピングされているページ番号Vaに対する
書き込みが起こり(仮想空間301上のa→a´)実空
間302上のページRaのコピーRa´を作成し更新し
た時点を考える。この場合、図3(b)に示すようにペ
ージテーブルのページ番号はVaからRa´に更新さ
れ、又コピー管理テーブルのページ番号はVaからRa
に変更されている。FIG. 3 is a diagram showing the correspondence between the virtual space and the real space (main memory) and the contents of the page table and copy management table. At this point, a write operation for the page number Va mapped to the page number Ra in the real space 302 occurs (a → a ′ in the virtual space 301), and a copy Ra ′ of the page Ra in the real space 302 is created and updated. think of. In this case, the page number of the page table is updated from Va to Ra ′ as shown in FIG. 3B, and the page number of the copy management table is Va to Ra.
Has been changed to.
【0017】以上の説明をあるプロセスPがファイルF
の内容を複数ページにわたって更新する様子について詳
細に説明することにする。図4はプロセスPの流れを示
し、チェックポイント1の通過後、チェックポイント2
の間でページaがa´にbがb´に、cがc´に更新さ
れたとする。As described above, the process P is the file F.
A detailed description will be given of the manner in which the content of is updated over a plurality of pages. FIG. 4 shows the flow of the process P. After passing through the checkpoint 1, the checkpoint 2
During this period, it is assumed that page a is updated to a ', b to b', and c to c '.
【0018】図5はプロセスpの実行の対象となるファ
イルFの仮想空間及び実空間のイメージを示したもので
ある。仮想空間上のページ番号Pa,Pb,Pcの内容
はそれぞれa,b,cで、実空間のページ番号Ra,R
b,Rcにマッピングされている。図6はファイルFの
ページテーブルの一部を示したものである。プロセスp
はチェックポイント1の後、ページ番号Paの内容aを
変更してa´にする。同様にページ番号Pbの内容bを
b´に、ページ番号Pcの内容cをc´に変更しチェッ
クポイント2に達するものとする。ファイルイメージは
コミットポイント1の後ライト・プロテクトされ、それ
以降に書き込みが起こると、それを処理するトラップ・
ルーチンにより書き込みが起こったページのコピーが作
成され、ページテーブルにつながれ更新される。また、
トラップ・ルーチンは更新されたページが更新前にどの
実空間にマッピングされていたかをコピー管理テーブル
に登録する。すなわち、チェックポイント2の直前で
は、ファイルイメージは図7のようになっている。ペー
ジテーブル,コピー管理テーブルはそれぞれ図8,図9
の様になっている。その後、チェックポイント2を通過
した時点で、コピー管理テーブルをクリアすることによ
り更新が有効になる。図10は、図4中の時刻tのファ
イルイメージを示したものである。図11は時刻tのペ
ージテーブルである。図12は時刻tのコピー管理テー
ブルである。この時刻においてデッドロックなどが起こ
った場合、コピー管理テーブルの内容をページテーブル
を書き戻す事により、ページテーブルは図6のようにな
り、コピーしたページRa´,Rb´は無効になる。そ
の後プロセスpの実行をチェックポイント1から再開す
ることにより復旧が可能になる。FIG. 5 shows an image of the virtual space and the real space of the file F which is the target of execution of the process p. The page numbers Pa, Pb, and Pc in the virtual space have contents a, b, and c, respectively, and the page numbers Ra and R in the real space are included.
It is mapped to b and Rc. FIG. 6 shows a part of the page table of the file F. Process p
Changes the content a of the page number Pa to a'after the checkpoint 1. Similarly, the content b of the page number Pb is changed to b ′, the content c of the page number Pc is changed to c ′, and the checkpoint 2 is reached. The file image is write protected after commit point 1 and a trap file is processed to handle any subsequent writes.
The routine makes a copy of the page that was written to, updates the page table. Also,
The trap routine registers in the copy management table which real space the updated page was mapped to before the update. That is, immediately before the checkpoint 2, the file image is as shown in FIG. The page table and copy management table are shown in FIG. 8 and FIG. 9, respectively.
It looks like. After that, when the check point 2 is passed, the update becomes effective by clearing the copy management table. FIG. 10 shows a file image at time t in FIG. FIG. 11 is a page table at time t. FIG. 12 shows the copy management table at time t. When a deadlock or the like occurs at this time, the page table becomes as shown in FIG. 6 by writing back the contents of the copy management table to the page table, and the copied pages Ra 'and Rb' are invalidated. After that, by restarting the execution of the process p from the checkpoint 1, it becomes possible to recover.
【0019】[0019]
【発明の効果】以上述べたきたように、本発明によれ
ば、チェックポイントでのファイルイメージ全体(領域
全体)をコピーせず、更新された部分(ページ)のみを
コピーし、また復旧時には、プロセスの実行の履歴は必
要なく、コピーを無効にするのみでよいため、プロセス
復旧のためのオーバヘッドを軽減できる。As described above, according to the present invention, the entire file image (entire area) at the checkpoint is not copied, only the updated portion (page) is copied, and at the time of restoration, Since the history of process execution is not required and only the copy is invalidated, the overhead for process recovery can be reduced.
【図1】 本発明の一実施例を示す構成図。FIG. 1 is a configuration diagram showing an embodiment of the present invention.
【図2】 処理の流れを示すフロー図。FIG. 2 is a flowchart showing the flow of processing.
【図3】 書き込みが起こった場合の状態を示す図。FIG. 3 is a diagram showing a state in which writing has occurred.
【図4】 プロセスpの実行の流れを示す図。FIG. 4 is a diagram showing a flow of execution of a process p.
【図5】 ファイルFのファイルイメージを示す図。FIG. 5 is a diagram showing a file image of file F.
【図6】 ファイルFのページテーブルの一部を示す
図。FIG. 6 is a diagram showing a part of a page table of file F.
【図7】 チェックポイント2の直前のファイルイメー
ジを示す図。FIG. 7 is a diagram showing a file image immediately before checkpoint 2.
【図8】 チェックポイント2の直前のページテーブル
を示す図。FIG. 8 is a diagram showing a page table immediately before checkpoint 2.
【図9】 チェックポイント2の直前のコピー管理テー
ブルを示す図。FIG. 9 is a diagram showing a copy management table immediately before checkpoint 2.
【図10】 時刻tのファイルイメージを示す図。FIG. 10 is a diagram showing a file image at time t.
【図11】 時刻tのページテーブルを示す図。FIG. 11 is a diagram showing a page table at time t.
【図12】 時刻tのコピー管理テーブルを示す図。FIG. 12 is a diagram showing a copy management table at time t.
101…オペレーティングシステム 102…書き込みトラップ処理ルーチン 103…チェックポイント処理部 104…プロセス復旧部 105…MMU 106…主記憶 107…ページテーブル 108…コピー管理テーブル 101 ... Operating system 102 ... Write trap processing routine 103 ... Checkpoint processing unit 104 ... Process recovery unit 105 ... MMU 106 ... Main memory 107 ... Page table 108 ... Copy management table
Claims (1)
を設定しながら実行し、プロセス実行中にプロセスの実
行継続できなくなった場合に、プロセスの実行が継続で
きなくなった時点から最も近いチェックポイントまでデ
ータを復旧し、このチェックポイントからプロセスを再
実行するプロセス復旧方式において、メモリ・マネージ
メント・ユニットを用いプロセス実行中のメモリへの書
き込みを検出し、書き込みが起こったページのコピーを
作成し、このコピーに対して更新を行い、メモリ・マネ
ージメント・ユニットの使用するページテーブルを操作
して前記コピーをコピー元に対して有効または無効に
し、プロセス実行中のチェックポイント時に前記コピー
をコピー元に反映し、プロセスが更新したデータを最も
近いチェックポイント時に復旧する場合は前記コピーを
無効にすることを特徴とするプロセス復旧方式。1. When a predetermined process is executed while setting check points as appropriate, and when the process cannot continue to be executed during process execution, data is collected from the time when the process cannot be continued to the closest check point. In the process recovery method that recovers and re-executes the process from this checkpoint, the memory management unit is used to detect the writing to the memory during the process execution and make a copy of the page where the writing occurred Update, and operate the page table used by the memory management unit to enable or disable the copy to the copy source, and reflect the copy to the copy source at the checkpoint during the process execution. Checkpoint the data updated by A process recovery method characterized in that the copy is invalidated when it is recovered at times.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3266668A JPH05108388A (en) | 1991-10-16 | 1991-10-16 | Process restoration system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3266668A JPH05108388A (en) | 1991-10-16 | 1991-10-16 | Process restoration system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH05108388A true JPH05108388A (en) | 1993-04-30 |
Family
ID=17434035
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3266668A Pending JPH05108388A (en) | 1991-10-16 | 1991-10-16 | Process restoration system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH05108388A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08249224A (en) * | 1995-03-10 | 1996-09-27 | Toshiba Corp | Transaction management device |
WO2014064547A1 (en) * | 2012-10-24 | 2014-05-01 | International Business Machines Corporation | In-memory continuous data protection |
JP2015064696A (en) * | 2013-09-24 | 2015-04-09 | 富士通株式会社 | Symbolic execution method, symbolic execution device, and symbolic execution program |
-
1991
- 1991-10-16 JP JP3266668A patent/JPH05108388A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08249224A (en) * | 1995-03-10 | 1996-09-27 | Toshiba Corp | Transaction management device |
WO2014064547A1 (en) * | 2012-10-24 | 2014-05-01 | International Business Machines Corporation | In-memory continuous data protection |
US10055304B2 (en) | 2012-10-24 | 2018-08-21 | International Business Machines Corporation | In-memory continuous data protection |
JP2015064696A (en) * | 2013-09-24 | 2015-04-09 | 富士通株式会社 | Symbolic execution method, symbolic execution device, and symbolic execution program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Memaripour et al. | Atomic in-place updates for non-volatile main memories with kamino-tx | |
EP0900420B1 (en) | Main memory system and checkpointing protocol for fault-tolerant computer system using a read buffer | |
JP2916420B2 (en) | Checkpoint processing acceleration device and data processing method | |
EP0827079B1 (en) | Checkpoint computer system | |
US5751939A (en) | Main memory system and checkpointing protocol for fault-tolerant computer system using an exclusive-or memory | |
EP0566966B1 (en) | Method and system for incremental backup copying of data | |
US7840768B2 (en) | Memory-controller-embedded apparatus and procedure for achieving system-directed checkpointing without operating-system kernel support | |
US20130339569A1 (en) | Storage System and Method for Operating Thereof | |
US6766428B2 (en) | Method and apparatus for storing prior versions of modified values to facilitate reliable execution | |
US20020147890A1 (en) | Method and apparatus for checkpointing to facilitate reliable execution | |
US9087006B2 (en) | Destaging cached data in multiple recurrences in a storage system | |
US8990159B2 (en) | Systems and methods for durable database operations in a memory-mapped environment | |
JPH05210555A (en) | Method and device for zero time data-backup-copy | |
CN1099631C (en) | Backout logic for dual execution unit processor | |
JP4095139B2 (en) | Computer system and file management method | |
Brown | Asynchronous multicaches | |
JPH05108388A (en) | Process restoration system | |
JP3070453B2 (en) | Memory failure recovery method and recovery system for computer system | |
KR100365891B1 (en) | Backup/recovery Apparatus and method for non-log processing of real-time main memory database system | |
JPH03265951A (en) | Trouble recovery type computer | |
USRE45632E1 (en) | Memory-controller-embedded apparatus and procedure for achieving system-directed checkpointing without operating-system kernel support | |
JP2001188690A (en) | Computer system and checkpoint information preserving method | |
JPH05165663A (en) | Data processor | |
JP3804823B2 (en) | Cache system with failure recovery function and cache control method thereof | |
JPH06214848A (en) | Data base managing system |