JP2713079B2 - Recovery assistance method when memory is insufficient - Google Patents

Recovery assistance method when memory is insufficient

Info

Publication number
JP2713079B2
JP2713079B2 JP5034640A JP3464093A JP2713079B2 JP 2713079 B2 JP2713079 B2 JP 2713079B2 JP 5034640 A JP5034640 A JP 5034640A JP 3464093 A JP3464093 A JP 3464093A JP 2713079 B2 JP2713079 B2 JP 2713079B2
Authority
JP
Japan
Prior art keywords
memory
program
recovery
shortage
recovery assistance
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
JP5034640A
Other languages
Japanese (ja)
Other versions
JPH06231036A (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.)
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 JP5034640A priority Critical patent/JP2713079B2/en
Publication of JPH06231036A publication Critical patent/JPH06231036A/en
Application granted granted Critical
Publication of JP2713079B2 publication Critical patent/JP2713079B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、情報処理装置の主記憶
からメモリ領域を順次確保しながら処理を進めるアプリ
ケーションプログラムがメモリ不足に遭遇した際、なお
も一定量のメモリをそのアプリケーションプログラムに
対して割り当てることができるようにして、そのアプリ
ケーションプログラムがその割り当てられたメモリを使
って、作成中データの外部記憶媒体への保存といったリ
カバリ処理を確実に行えるようにしたメモリ不足時にお
けるリカバリ援助方法に関する。
BACKGROUND OF THE INVENTION The present invention relates to an application program which proceeds with processing while sequentially securing a memory area from a main memory of an information processing apparatus when a memory shortage is encountered. A recovery assisting method in the event of a memory shortage, so that the application program can reliably use the allocated memory to perform a recovery process such as saving data being created to an external storage medium. .

【0002】[0002]

【従来の技術】中央処理装置,主記憶(メモリ)等を含
む情報処理装置においては、主記憶の容量に物理的な上
限があることから、メモリ不足に対する対策が必要とな
る。そこで、従来から下記のような、種々の状況の下で
のメモリ不足に対する対策が講じられている。
2. Description of the Related Art In an information processing apparatus including a central processing unit, a main memory (memory), and the like, there is a physical upper limit to the capacity of the main memory. Therefore, countermeasures against a memory shortage under various circumstances as described below have conventionally been taken.

【0003】従来方式(1) プログラムの起動指令があったときにそのプログラムの
実行に必要なメモリ量と現在使用可能なメモリ量とをチ
ェックし、必要なメモリ量が確保できなければそのプロ
グラムを起動しないことにより、実行途中でメモリ不足
に遭遇して異常終了することを防止する(例えば特開平
2−260049号公報参照)。
Conventional method (1) When there is a command to start a program, the amount of memory necessary for executing the program and the amount of memory currently available are checked. By not starting up, it is possible to prevent a memory shortage during execution and abnormal termination (see, for example, JP-A-2-260049).

【0004】従来方式(2) 呼び出し,被呼び出しといった関係にあるプログラムに
おいて、或るプログラムを呼び出した呼び出し元プログ
ラムが、別のプログラムを呼び出す際にその呼び出すプ
ログラムをロードするだけのメモリ量が主記憶に存在し
ないときに、既に呼び出していたプログラムのうち不要
なプログラムをキャンセルして空き領域を作り、呼び出
しを可能にする(例えば特開平1−173233号公報
参照)。
Conventional method (2) In a program which has a relationship of calling and being called, a main memory has a memory capacity for loading a calling program when a calling program that calls a certain program calls another program. When there is no such program, an unnecessary program among the programs that have already been called is canceled to create an empty area, and the program can be called (for example, see Japanese Patent Application Laid-Open No. 1-173233).

【0005】[0005]

【発明が解決しようとする課題】ところで、情報処理装
置の主記憶上でデータの作成を行っているアプリケーシ
ョンプログラムが、メモリを大量に消費して実行中にメ
モリ不足に遭遇すると、処理を継続することができない
ばかりか、一般にメモリ上のデータを磁気ディスク等の
外部記憶媒体に保存するといったリカバリ処理を行う際
にはそれ用のメモリ領域が新たに必要となる為、リカバ
リ処理さえも行えず、作成されたデータが無駄になって
しまう。
By the way, if an application program that creates data on the main memory of the information processing apparatus consumes a large amount of memory and encounters a shortage of memory during execution, the processing is continued. Not only is it not possible, but in general, when performing recovery processing such as saving data in memory to an external storage medium such as a magnetic disk, a new memory area is required for it, so even recovery processing cannot be performed. The created data is wasted.

【0006】このような事態は、情報処理装置の有効利
用につながらないので、何等かの対策が必要であるが、
アプリケーションプログラムが、処理の過程において必
要となるメモリ領域を順次に確保しながら処理を進める
プログラムの場合、最終的にどの程度のメモリ量を必要
とするか不明なため、従来方式(1)では、起動,未起
動の正確な判断が困難であり、そのプログラムの実行に
本来必要なメモリ量を確保できないのに実行してしまっ
たり、その逆に本来必要なメモリ量を確保できるのに実
行しなかったりするという問題がある。
[0006] Such a situation does not lead to the effective use of the information processing apparatus, so that some countermeasures are necessary.
In the case where the application program is a program that performs processing while sequentially securing memory areas required in the course of processing, it is not clear how much memory is finally required. It is difficult to accurately determine whether the program has been started or not, and the program is executed when the amount of memory originally required for execution of the program cannot be secured. Problem.

【0007】また、従来方式(2)では、他のプログラ
ムをキャンセルすることによりアプリケーションプログ
ラムを実行するためのメモリ領域を積極的に確保するよ
うにしているが、この方式(2)においても、最終的に
どの程度のメモリ量を必要とするか不明なアプリケーシ
ョンプログラムの場合、そのプログラムの実行に本来必
要なメモリ量を確保できないのに実行してしまうという
問題がある。
In the conventional method (2), a memory area for executing an application program is positively secured by canceling another program. In the case of an application program for which it is unclear how much memory space is required, there is a problem that the program is executed even though the memory space originally required for executing the program cannot be secured.

【0008】本発明はこのような事情に鑑みて為された
ものであり、メモリ領域を順次確保しながら処理を進め
るアプリケーションプログラムの場合はメモリ不足に遭
遇することは避けられないとの前提に立ち、若しメモリ
不足が生じた場合にはリカバリ処理を行えるだけのメモ
リ領域だけは確保可能にしておき、メモリ不足を契機に
アプリケーションプログラムがリカバリ処理を開始する
ことにより、リカバリ処理すら行えずにアプリケーショ
ンプログラムが終了してしまうことがないようにするこ
とを目的としている。
The present invention has been made in view of such circumstances, and it is based on the premise that in the case of an application program which performs processing while sequentially securing a memory area, it is inevitable that a memory shortage will be encountered. If a memory shortage occurs, only a memory area that can perform the recovery process should be able to be secured, and the application program starts the recovery process when the memory is insufficient, so that the application process can not even perform the recovery process. The purpose is to prevent the program from ending.

【0009】[0009]

【課題を解決するための手段】本発明のメモリ不足時に
おけるリカバリ援助方法は上記の目的を達成するため
に、図1の原理説明図に示すように、メモリ領域を確保
しながら処理を進めるアプリケーションプログラムAP
の実行と並行して、起動されることにより予め定められ
た量のメモリを確保すると共にアプリケーションプログ
ラムAPからメモリ不足通知が出されると自プログラム
を終了することにより前記確保したメモリを解放するリ
カバリ援助プログラムBを実行しておき、アプリケーシ
ョンプログラムAPは処理の過程においてメモリ領域の
確保に失敗したとき、リカバリ援助プログラムBにメモ
リ不足通知を出し、所定時間経過後に再度メモリの確保
を試みるか、または、メモリの確保を数回にわたって試
み、該試みによってメモリ領域が確保された場合に該確
保したメモリ領域を使ってメモリ上のデータを外部記憶
媒体へ保存するリカバリ処理を行うようにしている。
According to the present invention, there is provided a method for assisting recovery in the event of a memory shortage, in order to achieve the above object, as shown in a principle explanatory diagram of FIG. Program AP
And run in parallel in advance while securing a defined amount of memory the low memory notification from the application program AP is issued own program by being activated
The application program AP issues a memory shortage notification to the recovery assistance program B when the securing of the memory area has failed in the course of processing, by executing the recovery assistance program B for releasing the secured memory by ending the processing . Reallocating memory after a predetermined time has elapsed
Or try to allocate memory several times.
If the memory area is secured by the attempt,
Externally store data in memory using the saved memory area
A recovery process for saving the data on a medium is performed.

【0010】また、本発明は、リカバリ援助プログラム
Bの終了後に一定量のメモリを確保できるか否かをチェ
ックし、一定量のメモリを確保できる場合にリカバリ援
助プログラムBを再起動するリカバリ援助起動プログラ
ムCを実行するようにしている。
Also, the present invention checks whether or not a certain amount of memory can be secured after the completion of the recovery assistance program B, and restarts the recovery assistance program B when a certain amount of memory can be secured. The program C is executed.

【0011】[0011]

【作用】リカバリ援助プログラムBは起動されると、情
報処理装置のオペレーティング・システムを通じて予め
定められた量のメモリを確保する。アプリケーションプ
ログラムAPは起動後、処理に必要なメモリ領域をオペ
レーティング・システムを通じて順次確保してデータの
作成等の処理を行う。アプリケーションプログラムAP
がオペレーティング・システムに対してメモリの割り当
てを要求したとき、空きメモリが不足しているとメモリ
領域の確保は失敗に終わる。このとき、アプリケーショ
ンプログラムAPはリカバリ援助プログラムBにメモリ
不足通知を出す。これによりリカバリ援助プログラムB
は自プログラムで確保したメモリ領域を解放するため、
メモリの空き領域が増える。従って、その後アプリケー
ションプログラムAPが再度メモリの確保を試みると、
メモリ領域を確保できることになり、この確保したメモ
リ領域を使って作成データの補助記憶媒体への保存など
のリカバリ処理が可能となる。
When the recovery assisting program B is started, a predetermined amount of memory is secured through the operating system of the information processing apparatus. After starting, the application program AP sequentially secures a memory area required for processing through an operating system and performs processing such as data creation. Application program AP
Requests the operating system to allocate memory, and if there is not enough free memory, securing the memory area will fail. At this time, the application program AP issues a memory shortage notification to the recovery assistance program B. The recovery assistance program B
Releases the memory area allocated by the program itself,
Free memory space increases. Therefore, when the application program AP subsequently tries to secure memory again,
A memory area can be secured, and a recovery process such as saving created data in an auxiliary storage medium can be performed using the secured memory area.

【0012】また、アプリケーションプログラムAPが
リカバリ援助プログラムBの解放したメモリ領域を使っ
てしまうと、同様な別のアプリケーションプログラムが
メモリ不足に遭遇したときに対処できなくなるため、リ
カバリ援助起動プログラムCは、リカバリ援助プログラ
ムBの終了後、リカバリ援助プログラムBによって解放
されたメモリ量を超える予め定められた量のメモリを確
保できるか否かをチェックし、確保できる場合にリカバ
リ援助プログラムBを再起動することにより、複数のア
プリケーションプログラムAPが実行される環境に対処
できるようにしている。
Further, if the application program AP uses the memory area released by the recovery assistance program B, it will not be possible to cope with another similar application program when it encounters a memory shortage. After completion of the recovery assistance program B, it is checked whether or not a predetermined amount of memory exceeding the amount of memory released by the recovery assistance program B can be secured, and if it can be secured, the recovery assistance program B is restarted. Thus, it is possible to cope with an environment in which a plurality of application programs AP are executed.

【0013】[0013]

【実施例】次に本発明の実施例について図面を参照して
詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0014】図2は本発明のメモリ不足時におけるリカ
バリ援助方法を実施する情報処理装置の一例を示すブロ
ック図であり、CPU1と、そのバス2に接続された主
記憶(メモリ)3,磁気ディスク制御部4および入出力
インタフェイス部5と、磁気ディスク制御部4に接続さ
れたプログラムファイル6およびデータファイル7と、
入出力インタフェイス部5に接続されたCRT8および
キーボード9とで構成されている。
FIG. 2 is a block diagram showing an example of an information processing apparatus for implementing the recovery assisting method in the case of a memory shortage according to the present invention. The information processing apparatus includes a CPU 1, a main memory (memory) 3 connected to a bus 2, and a magnetic disk. A control unit 4 and an input / output interface unit 5, a program file 6 and a data file 7 connected to the magnetic disk control unit 4,
It comprises a CRT 8 and a keyboard 9 connected to the input / output interface unit 5.

【0015】プログラムファイル6には、当該情報処理
装置で実行する各種のプログラムが格納されている。本
実施例の場合、データ処理用の複数のアプリケーション
プログラムAP1,AP2と、リカバリ援助プログラム
Bと、リカバリ援助起動プログラムCとが格納されてお
り、それらの起動時には磁気ディスク制御部4を通じて
プログラムファイル6から図示の如く主記憶3にロード
される。
The program file 6 stores various programs executed by the information processing apparatus. In the case of the present embodiment, a plurality of data processing application programs AP1 and AP2, a recovery assistance program B, and a recovery assistance activation program C are stored. Is loaded into the main memory 3 as shown in FIG.

【0016】なお、主記憶3中のOSはUNIX等のオ
ペレーティング・システムであり、主記憶3のメモリ領
域管理等、システム全体の管理と制御を行う。
The OS in the main memory 3 is an operating system such as UNIX, and manages and controls the entire system such as memory area management of the main memory 3.

【0017】アプリケーションプログラムAP1,AP
2は、作業用のメモリ領域を確保しながらデータの作成
等の処理を進める、例えばC言語系のプログラムであ
り、例えば図3に示すように、データの作成等の処理の
ためにメモリ領域の確保を行ったところ確保に失敗した
場合、S1〜S7のような処理を行うようにプログラミ
ングされている。
Application programs AP1, AP
Reference numeral 2 denotes a C-language-based program which advances processing such as data creation while securing a working memory area. As shown in FIG. 3, for example, as shown in FIG. If the reservation fails when the reservation is performed, processing such as S1 to S7 is performed.

【0018】リカバリ援助プログラムBは、起動される
ことにより予め定められた量のメモリを確保する、例え
ばC言語系のアプリケーションプログラムである。ここ
で確保するメモリ量は1つのアプリケーションプログラ
ムAP1,AP2がリカバリ処理を十分に行える量であ
り、本実施例では例えば1Mバイトである。また、リカ
バリ援助プログラムBは、アプリケーションプログラム
AP1,AP2からメモリ不足通知が出されたとき、自
プログラムを終了することによりメモリの解放を行う。
図4にリカバリ援助プログラムBの処理の一例を示す。
The recovery assistance program B is, for example, an application program of the C language system which secures a predetermined amount of memory when activated. The amount of memory to be secured here is such that one application program AP1 or AP2 can sufficiently perform the recovery processing, and is, for example, 1 Mbyte in this embodiment. Further, when the memory shortage notification is issued from the application programs AP1 and AP2, the recovery assistance program B releases its memory by terminating its own program.
FIG. 4 shows an example of the processing of the recovery assistance program B.

【0019】リカバリ援助起動プログラムCは、リカバ
リ援助プログラムBの初期起動およびその終了後の再起
動を行う、例えばC言語系のアプリケーションプログラ
ムであり、例えば図5に示すような処理を行う。
The recovery assistance activation program C is, for example, a C-language application program for performing the initial activation of the recovery assistance program B and restarting after the termination, and performs, for example, processing as shown in FIG.

【0020】以下、本実施例の動作を説明する。The operation of this embodiment will be described below.

【0021】利用者は、アプリケーションプログラムA
P1,AP2を起動する場合、それに先立ってキーボー
ド9の操作等によりリカバリ援助起動プログラムCを起
動する。
[0021] The user can use the application program A
When activating P1 and AP2, the recovery assistance activation program C is activated by operating the keyboard 9 or the like prior to the activation.

【0022】実際の起動はオペレーティング・システム
OSによって行われる。即ち、オペレーティング・シス
テムOSはプログラムファイル6からリカバリ援助起動
プログラムCを主記憶3にロードし、制御をそのプログ
ラムに移す。
The actual activation is performed by the operating system OS. That is, the operating system OS loads the recovery assistance start program C from the program file 6 into the main memory 3 and transfers control to the program.

【0023】リカバリ援助起動プログラムCは起動され
ると、図5に示すように、所定量のメモリを確保できる
か否かをオペレーティング・システムOSに空きメモリ
量を問い合わせることによりチェックする(S21)。
ここで、所定量のメモリとは、リカバリ援助プログラム
Bのサイズとそれが確保するメモリ領域(今の例では1
Mバイト)との合計αより大きな量、例えば2Mバイト
のメモリ量である。これは、リカバリ援助プログラムB
の実行を可能にすると共に、後述するようにリカバリ援
助プログラムBによって解放されたメモリ領域をアプリ
ケーションプログラムが確保する前に、再びリカバリ援
助プログラムBが起動されて一旦解放されたメモリ領域
を再び使用してしまうことを防止するためである。
When the recovery assistance activation program C is activated, as shown in FIG. 5, it checks whether or not a predetermined amount of memory can be secured by inquiring of the operating system OS about the amount of free memory (S21).
Here, the predetermined amount of memory is the size of the recovery assistance program B and the memory area secured by it (1 in this example).
(M bytes), which is larger than the sum α, for example, 2 M bytes of memory. This is Recovery Aid Program B
And before the application program secures the memory area released by the recovery assistance program B as described later, the recovery assistance program B is started again to use the once released memory area again. This is to prevent that.

【0024】リカバリ援助起動プログラムCは所定量の
メモリを確保できると判断すると(S21でYES)、
オペレーティング・システムOSに対してリカバリ援助
プログラムBの起動を要求し(S22)、その後、リカ
バリ援助プログラムBが終了するのを待ち合わせる(S
23)。また、所定量のメモリ領域を確保できないとき
は(S21でNO)、所定時間の待ち合わせを行い(S
24)、その後処理S21に戻り、上述した処理を繰り
返す。
When the recovery assistance activation program C determines that a predetermined amount of memory can be secured (YES in S21),
It requests the operating system OS to start the recovery assistance program B (S22), and then waits for the recovery assistance program B to end (S22).
23). If a predetermined amount of memory area cannot be secured (NO in S21), a wait for a predetermined time is performed (S21).
24) Then, the process returns to step S21 to repeat the above-described processing.

【0025】今、所定量のメモリ領域が確保可能なこと
からリカバリ援助プログラムBの起動要求がリカバリ援
助起動プログラムCから出されたとすると、オペレーテ
ィング・システムOSによりリカバリ援助プログラムB
がプログラムファイル6から主記憶3にロードされ、そ
れに制御が渡される。
Now, assuming that a predetermined amount of memory area can be secured, the recovery assisting program B is requested to be started from the recovery assisting program C by the operating system OS.
Is loaded from the program file 6 into the main memory 3 and control is passed to it.

【0026】リカバリ援助プログラムBは起動される
と、図4に示すように、一定量(今の例では1Mバイ
ト)のメモリ領域の確保をオペレーティング・システム
OSに要求する。
When the recovery assisting program B is started, it requests the operating system OS to secure a certain amount (1 Mbytes in this example) of a memory area as shown in FIG.

【0027】オペレーティング・システムOSは主記憶
3のメモリ領域を一元管理しており、要求されたサイズ
に見合った空き領域が主記憶3に存在する場合、要求さ
れたサイズのメモリ領域をリカバリ援助プログラムBに
割り当てる。図2のメモリ領域DEはそのようにしてリ
カバリ援助プログラムBに割り当てられたメモリ領域を
示す。
The operating system OS centrally manages the memory area of the main memory 3. If there is a free area corresponding to the requested size in the main memory 3, the operating system OS replaces the memory area of the requested size with a recovery assistance program. Assign to B. The memory area DE in FIG. 2 indicates the memory area allocated to the recovery assistance program B in such a manner.

【0028】リカバリ援助プログラムBは、メモリ領域
DEを確保すると(S12でYES)、メモリ不足通知
の受信待ちとなる(S13)。なお、一定量のメモリ領
域の確保に失敗したときは(S12でNO)、本実施例
の場合、自プログラムを終了するようにしている(S1
5)。
When the memory area DE is secured (YES in S12), the recovery assistance program B waits for a memory shortage notification (S13). If it is failed to secure a certain amount of memory area (NO in S12), in the present embodiment, the own program is terminated (S1).
5).

【0029】利用者は、リカバリ援助起動プログラムC
の起動操作を終了すると、次にアプリケーションプログ
ラムAP1,AP2の起動をキーボード9からの操作な
どによって行う。これにより、アプリケーションプログ
ラムAP1,AP2がオペレーティング・システムOS
の制御の下にプログラムファイル6から主記憶3に図2
の如くロードされ、制御がそれらに渡される。
The user starts the recovery assistance starting program C
Is completed, the application programs AP1 and AP2 are started by operating the keyboard 9 or the like. As a result, the application programs AP1 and AP2 are operated by the operating system OS.
2 from the program file 6 to the main memory 3 under the control of FIG.
And control is passed to them.

【0030】アプリケーションプログラムAP1,AP
2は起動されると、データファイル7に格納されたデー
タを更新する等の所定のデータ処理を行う。その際、デ
ータ処理のためにメモリ領域が必要になると、オペレー
ティング・システムOSに対してメモリ領域の確保を要
求し、確保したメモリ領域を使用しながらデータ処理を
進める。
Application programs AP1, AP
2 is activated, and performs predetermined data processing such as updating data stored in the data file 7. At this time, when a memory area is required for data processing, a request is made to the operating system OS to secure the memory area, and the data processing proceeds while using the secured memory area.

【0031】さて、アプリケーションプログラムAP
1,AP2のうち例えばアプリケーションプログラムA
P1が、オペレーティング・システムOSに対してメモ
リ領域の確保を要求したとき、その時点で主記憶3に空
き領域が不足していたためにオペレーティング・システ
ムOSからメモリ領域を確保できない旨が返却されたと
すると、アプリケーションプログラムAP1は、図3に
示すように、メモリ不足通知をリカバリ援助プログラム
Bに出力する(S1)。
Now, the application program AP
1 and AP2, for example, application program A
When P1 requests the operating system OS to secure a memory area, it is assumed that the operating system OS returns a message that the memory area cannot be secured because the free area is insufficient in the main memory 3 at that time. The application program AP1 outputs a memory shortage notification to the recovery assistance program B as shown in FIG. 3 (S1).

【0032】リカバリ援助プログラムBは、アプリケー
ションプログラムAP1から出されたメモリ不足通知を
図4の処理S13で受信すると、通知の形式等が正しい
ものか否かをチェックし、正しくなければ無視するが
(S14でNO)、正しければ(S14でYES)、自
プログラムを終了させる(S15)。
When the recovery assistance program B receives the memory shortage notification from the application program AP1 in step S13 in FIG. 4, it checks whether the format of the notification is correct or not, and ignores it if it is not correct ( If it is correct (NO in S14), the program is terminated (S15).

【0033】リカバリ援助プログラムBが終了すると、
オペレーティング・システムOSはリカバリ援助プログ
ラムBがロードされていたメモリ領域およびリカバリ援
助プログラムBが確保していたメモリ領域DEを解放す
る。これによって、主記憶3の空き領域が増大すること
になる。
When the recovery assistance program B ends,
The operating system OS releases the memory area in which the recovery assistance program B has been loaded and the memory area DE secured by the recovery assistance program B. As a result, the free area of the main memory 3 increases.

【0034】アプリケーションプログラムAP1は、メ
モリ不足通知を出力した後、所定時間の待ち合わせを行
い(S2)、その後、再度メモリ確保を要求する(S
3)。
After outputting the memory shortage notification, the application program AP1 waits for a predetermined time (S2), and then requests the memory reservation again (S2).
3).

【0035】前述のように、メモリ不足通知によってリ
カバリ援助プログラムBは終了し、それが占有していた
メモリ領域が解放されるので、アプリケーションプログ
ラムAP1から処理S3で出されたメモリ確保要求はほ
ぼ成功することになり(S4でYES)、アプリケーシ
ョンプログラムAP1は処理S3の要求で確保したメモ
リ領域を使って作成データのデータファイル7への保存
といったリカバリ処理を行う(S5)。また、その後、
メモリ不足に遭遇したためにデータの保存を行った旨等
を示すエラーメッセージのCRT8への表示や、不要と
なったメモリ領域の解放等を行う。
As described above, the recovery assistance program B is terminated by the memory shortage notification, and the memory area occupied by the recovery assistance program B is released, so that the memory reservation request issued in the processing S3 from the application program AP1 is almost successful. (YES in S4), and the application program AP1 performs a recovery process such as saving the created data in the data file 7 using the memory area secured by the request in the process S3 (S5). And then,
An error message is displayed on the CRT 8 indicating that data has been saved due to memory shortage, etc., and an unnecessary memory area is released.

【0036】なお、処理S3のメモリ確保要求が何等か
の理由で失敗に終わった場合(S4でNO)、メモリ確
保要求のリトライを行う(S6でYES)。そして、数
回リトライしても成功しなかったとき(S6でNO)、
本実施例では、メモリ不足に遭遇し且つリカバリ処理が
行えなかった旨等のエラーメッセージをCRT8に出力
するようにしている(S7)。
If the memory reservation request in step S3 fails for some reason (NO in S4), the memory reservation request is retried (YES in S6). If the retry is not successful even after several retries (NO in S6),
In the present embodiment, an error message indicating that a memory shortage was encountered and the recovery process could not be performed is output to the CRT 8 (S7).

【0037】他方、リカバリ援助プログラムBが終了す
ると、オペレーティング・システムOSによってその起
動元であるリカバリ援助起動プログラムCに制御が戻さ
れる。この結果、リカバリ援助起動プログラムCは、図
5の処理S23から処理S24へ進み、ここで一定時間
待ち合わせた後、処理S21へ進み、所定量のメモリ
(今の例では2Mバイト)が確保できるか否かをチェッ
クし、確保できる場合には処理S22でリカバリ援助プ
ログラムBを再び起動する。また、所定量のメモリを確
保できない場合は処理S24へ進み、上述した処理を繰
り返す。
On the other hand, when the recovery assistance program B ends, the operating system OS returns control to the recovery assistance activation program C, which is the activation source. As a result, the recovery assistance activation program C proceeds from the processing S23 in FIG. 5 to the processing S24, waits for a predetermined time, and then proceeds to the processing S21, and determines whether a predetermined amount of memory (2 Mbytes in this example) can be secured. It is checked whether it is possible or not, and if it can be secured, the recovery assistance program B is started again in step S22. If a predetermined amount of memory cannot be secured, the process proceeds to step S24, and the above-described process is repeated.

【0038】従って、アプリケーションプログラムAP
1がリカバリ処理後に自プログラムを終了したり、或い
は図示しない他のプログラムの終了等により主記憶3の
空き領域が所定量に達すると、リカバリ援助起動プログ
ラムCにより、一度終了したリカバリ援助プログラムB
がその後自動的に再起動されることになる。
Therefore, the application program AP
1, when the free space of the main memory 3 reaches a predetermined amount due to the termination of its own program after the recovery processing, or the termination of another program (not shown), the recovery assistance start program C once terminates the recovery assistance program B
Will then be automatically restarted.

【0039】リカバリ援助プログラムBが再起動される
と、図4に示した処理が再び実行される。これにより、
再び一定量のメモリ領域が確保される。このため、残り
のアプリケーションプログラムAP2がメモリ不足に遭
遇した場合においてもリカバリ処理が可能となる。
When the recovery assistance program B is restarted, the processing shown in FIG. 4 is executed again. This allows
Again, a fixed amount of memory area is secured. Therefore, even when the remaining application program AP2 encounters a memory shortage, a recovery process can be performed.

【0040】なお、図3の例において、アプリケーショ
ンプログラムAP1がメモリ不足通知を出力後、所定時
間待ってメモリ確保要求を出しているのは、メモリ不足
通知の出力からリカバリ援助プログラムBの終了,メモ
リの解放までの時間を考慮したためであるが、メモリ確
保を何度か試みる構成では、メモリ不足通知の出力後直
ちにメモリ確保要求を送出する構成にしても良い。
In the example of FIG. 3, the application program AP1 outputs a memory shortage notification and then issues a memory reservation request after waiting for a predetermined period of time. This is because the time until the release of the memory is taken into consideration. However, in a configuration in which the memory allocation is attempted several times, a configuration may be adopted in which the memory allocation request is sent immediately after the memory shortage notification is output.

【0041】[0041]

【発明の効果】以上説明したように、本発明によれば、
以下のような効果を得ることができる。
As described above, according to the present invention,
The following effects can be obtained.

【0042】アプリケーションプログラムはメモリ領域
の確保に失敗したとき、メモリ不足通知を出し、リカバ
リ援助プログラムはメモリ不足通知を受けると自ら確保
していたメモリ領域を解放するので、アプリケーション
プログラムはメモリ不足通知の出力後に再度メモリ領域
の確保を試みることによりメモリ領域を確保でき、それ
を利用して作成データの外部記憶媒体への保存といった
リカバリ処理を行うことが可能となり、アプリケーショ
ンプログラムの信頼性が高まる。
When the application program fails to secure the memory area, the application program issues a memory shortage notification. When the recovery assistance program receives the memory shortage notification, the application program releases the memory area secured by itself. Attempting to secure the memory area again after the output makes it possible to secure the memory area. Using this, it is possible to perform recovery processing such as saving the created data in an external storage medium, thereby increasing the reliability of the application program.

【0043】例えばオペレーティング・システム側で予
備的なメモリ領域を確保しておき、メモリ不足時にその
予備的なメモリ領域の割り当てを行うような構成では、
オペレーティング・システムを大幅に改造する必要があ
るが、本発明ではそのような問題は生じない。
For example, in a configuration in which a spare memory area is reserved on the operating system side and the spare memory area is allocated when the memory is insufficient,
Significant modification of the operating system is required, but the present invention does not cause such a problem.

【0044】例えばアプリケーションプログラム側で事
前にリカバリ処理用のメモリ領域を確保するような構成
では、同種のアプリケーションプログラムが複数稼動す
る場合、個々のアプリケーションプログラム毎にリカバ
リ処理用のメモリ領域が確保されるため、本来の処理に
必要なメモリ領域が減少し過ぎるが、本発明ではそのよ
うな問題は生じない。
For example, in a configuration in which a memory area for recovery processing is secured in advance on the application program side, when a plurality of application programs of the same type are operated, a memory area for recovery processing is secured for each individual application program. Therefore, the memory area required for the original processing is excessively reduced, but such a problem does not occur in the present invention.

【0045】リカバリ援助プログラムのメモリ解放後
に、リカバリ援助プログラムを再起動するリカバリ援助
起動プログラムを使用することにより、リカバリ処理用
のメモリ領域の再確保が自動的に行われるため、複数の
アプリケーションプログラムが実行される環境に対処す
ることができる。
After the memory of the recovery assistance program is released, the recovery assistance startup program that restarts the recovery assistance program automatically re-allocates the memory area for the recovery processing. Can handle the environment in which it runs.

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

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

【図2】本発明を実施する情報処理装置の一例を示すブ
ロック図である。
FIG. 2 is a block diagram illustrating an example of an information processing apparatus that implements the present invention.

【図3】アプリケーションプログラムの処理の一例を示
すフローチャートである。
FIG. 3 is a flowchart illustrating an example of processing of an application program.

【図4】リカバリ援助プログラムの処理の一例を示すフ
ローチャートである。
FIG. 4 is a flowchart illustrating an example of processing of a recovery assistance program.

【図5】リカバリ援助起動プログラムの処理の一例を示
すフローチャートである。
FIG. 5 is a flowchart illustrating an example of processing of a recovery assistance start program.

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

AP,AP1,AP2…アプリケーションプログラム B…リカバリ援助プログラム C…リカバリ援助起動プログラム 1…CPU 2…バス 3…主記憶(メモリ) 4…磁気ディスク制御部 5…入出力インタフェイス部5 6…プログラムファイル 7…データファイル 8…CRT 9…キーボード AP, AP1, AP2 ... Application program B ... Recovery assistance program C ... Recovery assistance activation program 7 Data file 8 CRT 9 Keyboard

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 メモリ領域を確保しながら処理を進める
アプリケーションプログラムの実行と並行して、起動さ
れることにより予め定められた量のメモリを確保すると
共に前記アプリケーションプログラムからメモリ不足通
知が出されると自プログラムを終了することにより前記
確保したメモリを解放するリカバリ援助プログラムを実
行しておき、 前記アプリケーションプログラムは処理の過程において
メモリ領域の確保に失敗したとき、前記リカバリ援助プ
ログラムにメモリ不足通知を出し、所定時間経過後に再
度メモリの確保を試み、該試みによってメモリ領域が確
保された場合に該確保したメモリ領域を使ってメモリ上
のデータを外部記憶媒体へ保存するリカバリ処理を行う
ことを特徴とするメモリ不足時におけるリカバリ援助方
法。
[Claim 1] In parallel with the execution of the application program to proceed with processing while ensuring the memory region, the memory shortage report is issued from the application program while securing the amount of memory that has been predetermined by being activated A recovery assistance program that releases the secured memory by terminating its own program is executed, and the application program issues a memory shortage notification to the recovery assistance program when it fails to secure a memory area in the course of processing. After a predetermined time has elapsed.
Attempt to secure memory, and the memory area is confirmed by the attempt.
If it is kept, it will be stored in memory using the secured memory area.
A recovery process for storing a shortage of data in an external storage medium .
【請求項2】 メモリ領域を確保しながら処理を進める
アプリケーションプログラムの実行と並行して、起動さ
れることにより予め定められた量のメモリを確保すると
共に前記アプリケーションプログラムからメモリ不足通
知が出されると自プログラムを終了することにより前記
確保したメモリを解放するリカバリ援助プログラムを実
行しておき、 前記アプリケーションプログラムは処理の過程において
メモリ領域の確保に失敗したとき、前記リカバリ援助プ
ログラムにメモリ不足通知を出した後、メモリの確保を
数回にわたって試み、該試みによってメモリ領域が確保
された場合に該確保したメモリ領域を使ってメモリ上の
データを外部記憶媒体へ保存するリカバリ処理を行うこ
とを特徴とするメモリ不足時におけるリカバリ援助方
法。
2. The process proceeds while securing a memory area.
In parallel with the execution of the application program,
To secure a predetermined amount of memory
In both cases, the application program reports a memory shortage.
When the knowledge is issued, by ending the program,
Run a recovery aid program to release the allocated memory.
The application program is executed in the process
When securing the memory area fails, the recovery
After issuing a memory shortage notification to the program, secure the memory.
Try several times, and secure memory area
In the event that the
Perform recovery processing to save data to external storage media.
Recovery assistance method in case of memory shortage characterized by
Law.
【請求項3】 前記リカバリ援助プログラムの終了後に
前記リカバリ援助プログラムを再起動するリカバリ援助
起動プログラムを実行することを特徴とする請求項1ま
たは2記載のメモリ不足時におけるリカバリ援助方法。
3. A process according to claim 1, characterized in that to perform the recovery assistance start program to restart the recovery assistance program after completion of the recovery assistance programs or
Or the recovery assisting method at the time of memory shortage described in 2 .
【請求項4】 前記リカバリ援助起動プログラムは、一
定量のメモリを確保できるか否かをチェックし、一定量
のメモリを確保できる場合に前記リカバリ援助プログラ
ムを起動することを特徴とする請求項記載のメモリ不
足時におけるリカバリ援助方法。
Wherein said recovery assistance launcher claim 3, characterized in that to check whether it is possible to secure a certain amount of memory, activates the recovery assistance program if it can ensure a certain amount of memory The recovery assistance method at the time of memory shortage described.
JP5034640A 1993-01-29 1993-01-29 Recovery assistance method when memory is insufficient Expired - Fee Related JP2713079B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5034640A JP2713079B2 (en) 1993-01-29 1993-01-29 Recovery assistance method when memory is insufficient

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5034640A JP2713079B2 (en) 1993-01-29 1993-01-29 Recovery assistance method when memory is insufficient

Publications (2)

Publication Number Publication Date
JPH06231036A JPH06231036A (en) 1994-08-19
JP2713079B2 true JP2713079B2 (en) 1998-02-16

Family

ID=12420029

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5034640A Expired - Fee Related JP2713079B2 (en) 1993-01-29 1993-01-29 Recovery assistance method when memory is insufficient

Country Status (1)

Country Link
JP (1) JP2713079B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007052443A1 (en) * 2005-10-31 2007-05-10 Sony Computer Entertainment Inc. Information processing method and information processing apparatus
WO2007052442A1 (en) * 2005-10-31 2007-05-10 Sony Computer Entertainment Inc. Information processing method and information processing apparatus

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020063459A (en) * 2001-01-29 2002-08-03 팜팜테크 주식회사 Unused Page Collection Scheme for Embedded Linux Operationg System
ATE375553T1 (en) * 2003-06-24 2007-10-15 Research In Motion Ltd DETECTION OF LACK OF MEMORY AND FINE SHUTDOWN
JP2012155218A (en) 2011-01-27 2012-08-16 Kyocera Document Solutions Inc Image forming apparatus
KR102516940B1 (en) 2018-03-06 2023-04-04 삼성전자주식회사 Electronic device for performing a booting and method of operating the same
JP7188988B2 (en) * 2018-11-16 2022-12-13 ファナック株式会社 Numerical controller and control method for numerical controller

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007052443A1 (en) * 2005-10-31 2007-05-10 Sony Computer Entertainment Inc. Information processing method and information processing apparatus
WO2007052442A1 (en) * 2005-10-31 2007-05-10 Sony Computer Entertainment Inc. Information processing method and information processing apparatus
US8161161B2 (en) 2005-10-31 2012-04-17 Sony Computer Entertainment, Inc. Information processing method and information processing apparatus
US8490104B2 (en) 2005-10-31 2013-07-16 Sony Corporation Method and apparatus for reservation and reallocation of surplus resources to processes in an execution space by a local resource manager after the execution space is generated succeeding the initialization of an application for which the execution space is created and the resources are allocated to the execution space by a global resource manager prior to application execution

Also Published As

Publication number Publication date
JPH06231036A (en) 1994-08-19

Similar Documents

Publication Publication Date Title
JP3386823B2 (en) File management method and device
JP2713079B2 (en) Recovery assistance method when memory is insufficient
JPH07175728A (en) Disk cache data maintenance system
CN118069192A (en) Firmware upgrading method and device
JPH0370253B2 (en)
JP3265108B2 (en) Data processing system
JP3604171B2 (en) Process automatic restart processing method
JP2000259452A (en) Method and device for managing storage area
JPH11338838A (en) Parallel dump extraction method and system for fault information in multiprocessor system
US6842900B2 (en) Information processing apparatus executing processing corresponding to new thread by reusing arrangement for previous thread
JPH03225434A (en) Job reactuation system
JPH09114673A (en) Device and method for program loading
JP3263987B2 (en) Automatic IPL initial setting processing method
JPH07152574A (en) Program loading system
JP2003308253A (en) Information processor
JPH07160651A (en) Backup mode for system data
JP2752818B2 (en) Data I / O asynchronous processing method
JP2909128B2 (en) Startup processing takeover processor
JPH11212917A (en) Transaction recovery system and its program recording medium
JP2705522B2 (en) Business execution management method
CN117421284A (en) Transaction log processing method, device, equipment and medium
JP3509705B2 (en) Automatic restart processing system and restart processing method in switching system
JP2604706B2 (en) Duplex file control method
JP4051644B2 (en) Relay processing unit control method in network connection device
JPH09245098A (en) Slip preparation system and slip printing control method therefor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees