JPH02166536A - Method and device for controlling main storage - Google Patents

Method and device for controlling main storage

Info

Publication number
JPH02166536A
JPH02166536A JP32263488A JP32263488A JPH02166536A JP H02166536 A JPH02166536 A JP H02166536A JP 32263488 A JP32263488 A JP 32263488A JP 32263488 A JP32263488 A JP 32263488A JP H02166536 A JPH02166536 A JP H02166536A
Authority
JP
Japan
Prior art keywords
memory
acquisition
capacity
unit
free
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
JP32263488A
Other languages
Japanese (ja)
Inventor
Yoshisuke Mimura
義祐 三村
Katsuhiko Masuda
克彦 増田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP32263488A priority Critical patent/JPH02166536A/en
Publication of JPH02166536A publication Critical patent/JPH02166536A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent the abnormal end of a work program by recalculating the remaining idle memory capacity after complying with a memory acquiring request received from an applied work program and giving a warning to an operator in case the calculated idle memory capacity is less than the warning threshold value. CONSTITUTION:An idle memory capacity recalculation part 8 complies with a memory acquiring request received from an applied work program and recalculates the remaining idle memory capacity. A warning part 11 gives a warning to an operator directly in case the calculated memory capacity is less than the designated warning threshold value. Therefore the operator can refrain intentionally from executing the applied work program which requires a new memory area after the reception of the warning. Thus it is possible to prevent the abnormal end of a produced applied work program before it happens since the recovery is difficult to the original steady state in the case the acquisition of a necessary memory area failed.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は有限の主記憶装置を有する計算機システムにお
ける主記憶の管理方法およびその装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a method and apparatus for managing main memory in a computer system having a limited main memory.

従来の技術 近年、あらゆる情報処理の分野で計算機システムが広く
利用されている。これらの計算機システムは一般に中央
演算装置(CPU)、主記憶装置、補助記憶装置、表示
装置、入力装置などから構成されている。これらの構成
要素の中で主記憶装置は一般に半導体素子などを用いた
揮発性メモリによ多構成されておシ、磁気記録媒体など
の不揮発性メモリを用いた補助記憶装置と比較してよシ
高速なアクセスが可能である反面、容量的にはかなり制
限されたハードウェア資源となっている場合が多い。
BACKGROUND OF THE INVENTION In recent years, computer systems have been widely used in all information processing fields. These computer systems generally include a central processing unit (CPU), a main memory, an auxiliary memory, a display, an input device, and the like. Among these components, the main memory device is generally composed of volatile memory using semiconductor elements, etc., and has a lower size than the auxiliary memory device using non-volatile memory such as magnetic recording media. Although high-speed access is possible, hardware resources are often quite limited in terms of capacity.

このような有限のハードウェア資源を有効に活用するた
め、近年の計算機システムにおいては一般にオペレーテ
ィングシステム(O8)とよばれるシステムプログラム
が常駐し、すべてのハードウェア資源を一元管理すると
ともに個々の適用業務プログラムの実行全制御するよう
になっている。
In order to make effective use of such limited hardware resources, modern computer systems generally have a system program called an operating system (O8) resident thereon, which centrally manages all hardware resources and manages individual application tasks. It has full control over program execution.

このシステムプログラムは通常、主記憶の管理・機能を
含んでおシ、補助記憶装置に格納された適用業務プログ
ラムを主記憶上に読み込むためのメモリ領域の獲得や適
用業務プログラムがその実行時に必要とするメモリ領域
の獲得などの制御を行っている。
This system program usually includes main memory management and functions, such as acquisition of memory area for loading application programs stored in auxiliary storage into main memory, and necessary functions for application programs when they are executed. It performs control such as acquisition of memory area to be used.

しかしながら、前述したように主記憶の容量は有限であ
るため、必要とするメモリ領域が必ずしも獲得されると
は限らない。この問題を解決するために大容量の補助記
憶装置を併用することにより見かけ上の主記憶容量を実
際の主記憶容量よりもはるかに大きくすることが可能な
仮想記憶方式を採用した計算機システムも開発されてい
る。このような仮想記憶方式は比較的大型の計算機シス
テムで広く採用されているが、高機能の中央演算装置や
補助記憶装置、高度なシステムプログラムを必要とする
ことからパーソナルコンピュータなどの比較的小型の計
算機システムではあまシ採用されていない。
However, as described above, the capacity of the main memory is finite, so the required memory area may not always be acquired. To solve this problem, we developed a computer system that uses a virtual memory method that can make the apparent main memory capacity much larger than the actual main memory capacity by using a large-capacity auxiliary storage device. has been done. Although such virtual memory methods are widely used in relatively large computer systems, they require a high-performance central processing unit, auxiliary storage, and advanced system programs, so they are not suitable for relatively small computers such as personal computers. It is not widely used in computer systems.

第2図は従来の主記憶管理装置の構成図である。FIG. 2 is a block diagram of a conventional main memory management device.

図中、21はメモリ獲得要求部で、適用業務プログラム
からの要求により主記憶上の新たなメモリ領域の獲得を
指示するものである。メモリ獲得要求部21としては例
えば必要とするメモリの容量を引数とする関数呼び出し
の形で適用業務プログラムとリンクされ、割シ込み処理
によってシステムプログラムを起動するシステムライブ
ラリの形で実現される。22は空きメモリ管理部で、主
記憶上の空きメモリ領域の指定情報を管理するものであ
る。空きメモリ管理部22は後述の空きメモリ容量算出
部23およびメモリ獲得部26によって参照される。メ
モリ領域の指定情報としては例えばその先頭アドレスが
用いられる。23は空きメモリ容量算出部で、前記空き
メモリ管理部22の管理内容を参照し現在の主記憶上の
空きメモリの容量を算出するものである。24はメモリ
獲得可能性判定部で、前記メモリ獲得要求部21により
要求された獲得メモリ容量と前記空きメモリ容量算出部
23により算出された空きメモリ容量とを比較し要求さ
れた容量のメモリが獲得可能であるか否かを判定するも
のである。26はメモリ獲得失敗通知部で、前記メモリ
獲得可能性判定部24により獲得不可能と判定された場
合に要求元の適用業務プログラムに対してメモリ獲得に
失敗した旨の通知に行うものである。メモリ獲得失敗通
知部26としては例えば前述のメモリ獲得要求部210
例で挙げた関数呼び出しに対して負の値の特定のエラー
コード全返す方法などがある。
In the figure, 21 is a memory acquisition request unit that instructs acquisition of a new memory area on the main memory in response to a request from an application program. The memory acquisition request unit 21 is realized, for example, in the form of a system library that is linked with an application program in the form of a function call that takes the required memory capacity as an argument, and that starts a system program by interrupt processing. Reference numeral 22 denotes a free memory management unit that manages designation information of free memory areas on the main memory. The free memory management unit 22 is referenced by a free memory capacity calculation unit 23 and a memory acquisition unit 26, which will be described later. As the designation information of the memory area, for example, its start address is used. Reference numeral 23 denotes a free memory capacity calculation unit, which refers to the management contents of the free memory management unit 22 and calculates the current capacity of free memory on the main memory. Reference numeral 24 denotes a memory acquisition possibility determination unit, which compares the acquisition memory capacity requested by the memory acquisition request unit 21 with the free memory capacity calculated by the free memory capacity calculation unit 23, and acquires the requested capacity of memory. This is to determine whether or not it is possible. Reference numeral 26 denotes a memory acquisition failure notification unit, which notifies the requesting application program that memory acquisition has failed when the memory acquisition possibility determination unit 24 determines that memory acquisition is impossible. As the memory acquisition failure notification section 26, for example, the above-mentioned memory acquisition request section 210 is used.
There is a method to return all specific negative error codes for the function call mentioned in the example.

26はメモリ獲得部で、前記メモリ獲得可能性判定部2
4により獲得可能と判定された場合に実際にそのメモリ
領域を獲得してその指定情報を後述のメモリ獲得成功通
知部27に送出するとともに前記空きメモリ管理部22
の管理内容を更新するものである。27はメモリ獲得成
功通知部で、要求元の適用業務プログラムに対してメモ
リ獲得に成功した旨の通知を行うとともに前記メモリ獲
得部26から送出された獲得メモリ領域の指定情報を返
すものである。メモリ獲得成功通知部27としては例え
ば前述のメモリ獲得要求部210例で挙げた関数呼び出
しに対して負でない値の特定のリターンコードとともに
前記メモリ指定情報を返す方法などがある。実際にはこ
れ以外にも使用中メモリ領域の解放機能などを実現する
ための種々の構成要素を必要とするが1本発明の主眼で
はないので省略する。
26 is a memory acquisition unit, and the memory acquisition possibility determination unit 2
4, when it is determined that the memory area can be acquired, the memory area is actually acquired and its designation information is sent to the memory acquisition success notification unit 27, which will be described later, as well as the free memory management unit 22.
This is to update the management contents of. Reference numeral 27 denotes a memory acquisition success notification unit, which notifies the requesting application program that memory acquisition has been successful, and returns the acquisition memory area designation information sent from the memory acquisition unit 26. As the memory acquisition success notification unit 27, for example, there is a method of returning the memory designation information together with a specific return code of a non-negative value in response to the function call mentioned in the example of the memory acquisition request unit 210 described above. In reality, various other components are required to realize functions such as releasing the memory area in use, but they are not the main focus of the present invention and will therefore be omitted.

前述のように構成された従来の主記憶管理装置の動作を
以下に説明する。
The operation of the conventional main memory management device configured as described above will be described below.

[要求されたメモリ審査が空きメモリ容量よシ大きくな
い場合] (1)  適用業務プログラムはメモリ獲得要求部21
により容量Rのメモリ領域の獲得を要求する。
[If the requested memory review is not larger than the free memory capacity] (1) The application program is executed by the memory acquisition request unit 21
requests acquisition of a memory area of capacity R.

(2)  次に空きメモリ容量算出部23は空きメモリ
管理部22に管理されている空きメモリ領域の先頭アド
レス人を参照し、予め定まっているシステム全体のメモ
リ容量Tを用いて現在の主記憶上の空きメモリの容量E
=(T−人)を算出する。
(2) Next, the free memory capacity calculation unit 23 refers to the first address of the free memory area managed by the free memory management unit 22, and uses the predetermined memory capacity T of the entire system to calculate the current main memory. The amount of free memory above E
Calculate = (T - people).

(3)  続いてメモリ獲得可能性判定部24はメモリ
獲得要求部21により要求された獲得メモリ容量Rと空
きメモリ容量算出部23により算出された空きメモリ容
量Eとを比較し要求された容量のメモリが獲得可能であ
るか否かを判定する。
(3) Next, the memory acquisition possibility determination unit 24 compares the acquired memory capacity R requested by the memory acquisition request unit 21 with the free memory capacity E calculated by the free memory capacity calculation unit 23, and determines the requested capacity. Determine whether memory is available.

この場合、R≦Eであるためメモリが獲得可能であると
判断され、その旨の信号Yをメモリ獲得部2eへ送出す
る。
In this case, since R≦E, it is determined that the memory can be acquired, and a signal Y to that effect is sent to the memory acquisition unit 2e.

(4)次にメモリ獲得部26はアドレス人以降の容量R
のメモリ領域を獲得してその先頭アドレス人をメモリ獲
得成功通知部27に送出するとともに空きメモリ管理部
22に管理されている空きメモリ領域の先頭アドレス人
を(ム十R)に更新する。
(4) Next, the memory acquisition unit 26 stores the capacity R after the address person.
It acquires the memory area of and sends its starting address to the memory acquisition success notification section 27, and updates the starting address of the free memory area managed by the free memory management section 22 to (MuR).

(5)最後にメモリ獲得成功通知部27は要求元の適用
業務プログラムに対してメモリ獲得に成功した旨を示す
リターン値0とともにメモリ獲得部26から送出された
獲得メモリ領域の先頭アドレス人を返す。(おわり) [要求されたメ七す容量が空きメモリ容量より大きい場
合] (6)適用業務プログラムはメモリ獲得要求部21によ
り容量Rのメモリ領域の獲得を要求する。
(5) Finally, the memory acquisition success notification unit 27 returns the starting address of the acquired memory area sent from the memory acquisition unit 26 to the requesting application program along with a return value of 0 indicating that memory acquisition was successful. . (End) [When the requested memory capacity is larger than the free memory capacity] (6) The application program requests acquisition of a memory area of capacity R by the memory acquisition request unit 21.

(力 次に空きメモリ容量算出部23は空きメモリ管理
部22に管理されている空きメモリ領域の先頭アドレス
人を参照し、予め定まってぃ°るシステム全体のメモリ
容#Tを用いて現在の主記憶上の空きメモリの容量E=
(T−A)2算出する。
Next, the free memory capacity calculation unit 23 refers to the first address of the free memory area managed by the free memory management unit 22, and uses the predetermined memory capacity #T of the entire system to determine the current Free memory capacity on main memory E=
Calculate (TA)2.

(8)続いてメモリ獲得可能性判定部24はメモリ獲得
要求部21により要求された獲得メモリ容量Rと空きメ
モリ容量算出部23により算出された空きメモリ容量E
とを比較し要求された容量のメモリが獲得可能であるか
否かを判定する。
(8) Next, the memory acquisition possibility determination unit 24 calculates the acquisition memory capacity R requested by the memory acquisition request unit 21 and the free memory capacity E calculated by the free memory capacity calculation unit 23.
It is determined whether or not the requested capacity of memory can be obtained.

この場合、R)Eであるためメモリが獲得不可能である
と判断され、その旨の信号Niメモリ獲得失敗通知部2
5へ送出する。
In this case, since it is R)E, it is determined that memory cannot be acquired, and a signal Ni to that effect is sent to the memory acquisition failure notification unit 2.
Send to 5.

(9)最後にメモリ獲得失敗通知部25Fi、要求元の
適用業務プログラムに対してメモリ獲得に失敗した旨を
示すリターン値(−1)を返す。(おわL) 発明が解決しようとする課題 従来の主記憶管理方法およびその装置においては前述の
具体例で説明したように、適用業務プログラムからのメ
モリ領域獲得要求の成否は要求元の適用業務プログラム
にのみ通知されるようになっているためオペレータに対
してメモリ領域獲得に失敗した旨の通知を行うためには
個々の適用業務プログラムにおいて新たに必要なプログ
ラムを追加しなければならなかった。また、適用業務プ
ログラムによっては必要なメモリ領域獲得に失敗した場
合に元の定常状態への復旧が困難でプログラム自体を異
常終了してしまわなければならないものもあるが、メモ
リ領域獲得に成功している間はオペレータは次回のメモ
リ領域獲得成功の可能性を知ることができないためオペ
レータの過剰操作によって前述のような適用業務プログ
ラムの異常終了を発生させることがしばしばあった。さ
らにこのような事態を未然に防止するためには個々の適
用業務プログラムにおいてメモリ獲得の都度残りのメモ
リ容量の算出を行い必要に応じて警告を行うようなプロ
グラムを新たに追加しなければならなかった。
(9) Finally, the memory acquisition failure notification unit 25Fi returns a return value (-1) indicating that memory acquisition has failed to the requesting application program. (OwaL) Problems to be Solved by the Invention In the conventional main memory management method and device, as explained in the above-mentioned specific example, the success or failure of a memory area acquisition request from an application program depends on the requesting application. Since only the program is notified, a new necessary program must be added to each application program in order to notify the operator that memory area acquisition has failed. Additionally, if some application programs fail to acquire the necessary memory area, it is difficult to restore the original steady state and the program itself must terminate abnormally. During this time, the operator cannot know the possibility of success in acquiring the memory area next time, and therefore, excessive operations by the operator often result in abnormal termination of the application program as described above. Furthermore, in order to prevent such a situation from occurring, it is necessary to add a new program to each application program that calculates the remaining memory capacity each time memory is acquired and issues a warning as necessary. Ta.

本発明は、従来の主記憶管理方法およびその装置が有し
ていた前記の問題点に鑑み、適用業務プログラムからの
メモリ獲得要求に応じた後に残りの空きメモリ容量の再
算出を行ない、算出された空きメモリ容量があらかじめ
指定された警告しきい値以下である場合にオペレータに
直接その旨の警告を行なうことが可能な主記憶管理方法
およびその装置を提供することを目的とするものである
In view of the above problems that conventional main memory management methods and devices have, the present invention recalculates the remaining free memory capacity after responding to a memory acquisition request from an application program. An object of the present invention is to provide a main memory management method and apparatus that can directly issue a warning to an operator when the free memory capacity is less than a prespecified warning threshold.

課題を解決するための手段 本発明は、前記の目的を達成するために、適用業務プロ
グラムからの要求により主記憶上の新たなメモリ領域の
獲得を指示するメモリ獲得要求部と、現在の主記憶上の
空きメモリの容量を算出する空きメモリ容量算出部と、
前記メモリ獲得要求部により要求された獲得メモリ容量
と前記空きメモリ容量算出部により算出された空きメモ
リ容量とを比較し要求された容量のメモリが獲得可能で
あるか否かを判定するメモリ獲得可能性判定部と、前記
メモリ獲得可能性判定部により獲得不可能と判定された
場合に要求元の適用業務プログラムに対してメモリ獲得
に失敗した旨の通知を行うメモリ獲得失敗通知部と、前
記メモリ獲得可能性判定部により獲得可能と判定された
場合に実際にそのメモリ領域を獲得するメモリ獲得部と
、前記メモリ獲得部により新たなメモリ領域を獲得した
後の主記憶上の空きメモリの容量を再算出する空きメモ
リ容量再算出部と、前記空きメモリ容量再算出部により
算出された空きメモリ容量があらかじめ指定された警告
しきい値以下であるか否かを判定する警告判定部と、前
記警告判定部により警告しきい値以下であると判定され
た場合にオペレータに対して空きメモリ容量が残り少な
い旨の警告を行う警告部とを備えたことを特徴とする主
記憶管理装置を構成する。
Means for Solving the Problems In order to achieve the above object, the present invention provides a memory acquisition request unit that instructs acquisition of a new memory area on main memory in response to a request from an application program, and a free memory capacity calculation unit that calculates the capacity of free memory above;
A memory acquisition function that compares the acquisition memory capacity requested by the memory acquisition request unit with the free memory capacity calculated by the free memory capacity calculation unit and determines whether the requested capacity of memory can be acquired. a memory acquisition failure notification unit that notifies a requesting application program that memory acquisition has failed when memory acquisition is determined to be impossible by the memory acquisition possibility determination unit; A memory acquisition unit that actually acquires the memory area when it is determined that the acquisition possibility determination unit can acquire the memory area, and a memory acquisition unit that determines the capacity of free memory on the main memory after acquiring a new memory area by the memory acquisition unit. a free memory capacity recalculation unit that recalculates; a warning determination unit that determines whether the free memory capacity calculated by the free memory capacity recalculation unit is less than or equal to a prespecified warning threshold; and the warning A main memory management device is provided, comprising: a warning section that warns an operator that free memory capacity is low when the determination section determines that the remaining memory capacity is less than or equal to a warning threshold value.

作用 本発明の主記憶管理装置は前記した構成により、適用業
務プログラムがメモリ獲得要求部によりメモリ領域の獲
得を要求すると空きメモリ容量算出部が現在の主記憶上
の空きメモリの容量を算出し、続いてメモリ獲得可能性
判定部が要求された獲得メモリ容量と空きメモリ容量と
を比較し要求された容量のメモリが獲得可能であるか否
かを判定し、獲得不可能であると判断された場合にはメ
モリ獲得失敗通知部が要求元の適用業務プログラムに対
してメモリ獲得に失敗した旨の通知を行い、要求された
容量のメモリが獲得可能であると判断された場合にはメ
モリ獲得部が要求されたメモリ領域を獲得した後にをき
メモリ容量再算出部が主記憶上の空きメモリの容量を再
算出し、警告判定部が空きメモリ容量があらかじめ指定
された警告しきい値以下であるか否かを判定し、警告し
きい値以下であると判定された場合には警告部がオペレ
ータに対して空きメモリ容量が残り少ない旨の警告を行
うことを可能とするものである。
Operation The main memory management device of the present invention has the above-described configuration, so that when an application program requests acquisition of a memory area by the memory acquisition request unit, the free memory capacity calculation unit calculates the current capacity of free memory on the main memory, Next, the memory acquisition possibility determining unit compares the requested memory capacity to be acquired and the free memory capacity to determine whether the requested capacity of memory can be acquired, and it is determined that the memory cannot be acquired. In this case, the memory acquisition failure notification unit notifies the requesting application program that memory acquisition has failed, and if it is determined that the requested amount of memory can be acquired, the memory acquisition unit After acquiring the requested memory area, the memory capacity recalculation unit recalculates the free memory capacity on the main memory, and the warning judgment unit determines that the free memory capacity is less than the prespecified warning threshold. If it is determined that the amount of memory is below the warning threshold, the warning unit can issue a warning to the operator that free memory capacity is low.

実施例 以下1本発明の主記憶管理装置の一実施例全図面を用い
て説明する。
Embodiment One embodiment of the main memory management device of the present invention will be described below with reference to all the drawings.

第1図は本発明の一実施例における主記憶管理装置の構
成図である。同図において、1はメモリ獲得要求部で、
適用業務プログラムからの要求により主記憶上の新たな
メモリ領域の獲得を指示するものである。メモリ獲得要
求部1としては例えば必要とするメモリの容量を引数と
する関数呼び出しの形で適用業務プログラムとリンクさ
れ、割り込み処理によってシステムプログラムを起動す
るンステムライブラリの形で実現される。2は空きメモ
リ管理部で、主記憶上の空きメモリ領域の指定情報を管
理するものである。メモリ領域の指定情報としては例え
ばその先頭アドレスが用いられる。空きメモリ管理部2
は後述の空きメモリ容量算出部3およびメモリ獲得部6
.空きメモリ容量外算出部8によって参照される。3は
空きメ七り容量算出部で、前記空きメモリ管理部2の管
理内容を参照し現在の主記憶上の空きメモリの容量を算
出するものである。4はメモリ獲得可能性判定部で、前
記メモリ獲得要求部1により要求された獲得メモリ容量
と前記空きメモリ容量算出部3により算出された空きメ
モリ容量とを比較し要求された容量のメモリが獲得可能
であるか否かを判定するものである。6はメモリ獲得失
敗通知部で。
FIG. 1 is a block diagram of a main memory management device in an embodiment of the present invention. In the figure, 1 is a memory acquisition request unit;
This command instructs acquisition of a new memory area on main memory in response to a request from an application program. The memory acquisition request unit 1 is realized, for example, in the form of a system library that is linked with an application program in the form of a function call that takes the required memory capacity as an argument, and starts a system program by interrupt processing. Reference numeral 2 denotes a free memory management unit that manages designation information of free memory areas on the main memory. For example, the starting address is used as the designation information of the memory area. Free memory management section 2
are the free memory capacity calculation unit 3 and the memory acquisition unit 6, which will be described later.
.. It is referred to by the free memory capacity outside calculation unit 8. Reference numeral 3 denotes a free memory capacity calculation unit which refers to the management contents of the free memory management unit 2 and calculates the current free memory capacity on the main memory. Reference numeral 4 denotes a memory acquisition possibility determination unit, which compares the acquisition memory capacity requested by the memory acquisition request unit 1 with the free memory capacity calculated by the free memory capacity calculation unit 3, and acquires the requested capacity of memory. This is to determine whether or not it is possible. 6 is the memory acquisition failure notification section.

前記メモリ獲得可能性判定部4によυ獲得不可能と判定
された場合に要求元の適用業務プログラムに対してメモ
リ獲得に失敗した旨の通知を行うものである。メモリ獲
得失敗通知部6としては例えば前述のメモリ獲得要求部
1の例で挙げた関数呼び出しに対して負の値の特定のエ
ラーコードを返す方法などがある。eはメモリ獲得部で
、前記メモリ獲得可能性判定部4により獲得可能と判定
された場合に実際にそのメモリ領域を獲得してその指定
情報を後述のメモリ獲得成功通知部7に送出するととも
に前記空きメモリ管理部2の管理内容を更新するもので
ある。アはメモリ獲得成功通知部で、要求元の適用業務
プログラムに対してメモリ獲得に成功した旨の通知を行
うとともに前記メモリ獲得部6から送゛出された獲得メ
モリ領域の指定情報を返すものである。メモリ獲得成功
通知部7としては例えば前述のメモリ獲得要求部10例
で挙げた関数呼び出しに対して負でない値の特定のリタ
ーンコードとともに前記メモリ指定情報を返す方法など
がある。8は空きメモリ容量外算出部で、前記空きメモ
リ管理部2の管理内容を参照し前記メそす獲得部6によ
り新たなメモリ領域を獲得した後の主記憶上の空きメモ
リの容量を再算出するものである。9は警告しきい値記
憶部で。
When the memory acquisition possibility determining unit 4 determines that v can not be acquired, the requesting application program is notified that memory acquisition has failed. As the memory acquisition failure notification unit 6, for example, there is a method of returning a specific negative error code in response to the function call mentioned in the example of the memory acquisition requesting unit 1 described above. Reference numeral e denotes a memory acquisition unit, which actually acquires the memory area when it is determined that the memory area can be acquired by the memory acquisition possibility determining unit 4, and sends its designation information to the memory acquisition success notification unit 7, which will be described later. This is to update the management contents of the free memory management section 2. A is a memory acquisition success notification unit that notifies the requesting application program that memory acquisition has been successful, and also returns the acquisition memory area designation information sent from the memory acquisition unit 6. be. As the memory acquisition success notification unit 7, for example, there is a method of returning the memory designation information together with a specific return code of a non-negative value in response to the function call mentioned in the example of the memory acquisition request unit 10 described above. Reference numeral 8 denotes a free memory capacity external calculation unit, which refers to the management contents of the free memory management unit 2 and recalculates the free memory capacity on the main memory after acquiring a new memory area by the memory acquisition unit 6. It is something to do. 9 is the warning threshold storage unit.

空きメモリ容量が残り少ない旨の警告を行なうか否かの
判定のためのしきい値を記憶しているものである。警告
しきい値記憶部9は後述の警告判定部10によって参照
される。1oは警告判定部で、前記空きメモリ容量外算
出部8により算出された空きメモリ容量が前記警告しき
い値記憶部9に記憶されている警告しきい値以下である
か否がを判定するものである。11は警告部で、前記警
告判定部10により警告しきい値以下であると判定され
た場合にオペレータに対して空きメモリ容量が残り少な
い旨の警告を行うものである。警告部11としては例え
ば表示装置上に視覚情報として表示するもの、あるいは
ブザーや音声などの聴覚情報を用いるものなどが考えら
れる。実際にはこれ以外にも使用中メモリ領域の解放機
能などを実現するための種々の構成要素を必要とするが
、本発明の主眼ではないので省略する。
It stores a threshold value for determining whether or not to issue a warning that free memory capacity is low. The warning threshold storage unit 9 is referred to by a warning determination unit 10, which will be described later. 1o is a warning determination unit that determines whether the free memory capacity calculated by the free memory capacity outside calculation unit 8 is less than or equal to the warning threshold value stored in the warning threshold storage unit 9; It is. Reference numeral 11 denotes a warning unit, which warns the operator that free memory capacity is low when the warning determination unit 10 determines that the amount is below the warning threshold. The warning unit 11 may be one that displays visual information on a display device, or one that uses auditory information such as a buzzer or sound. In reality, various other components are required to realize functions such as releasing the memory area in use, but these are not the main focus of the present invention and will therefore be omitted.

前述のように構成された本実施例の主記憶管理装置の動
作全以下に説明する。
The entire operation of the main memory management device of this embodiment configured as described above will be explained below.

[要求されたメモリ容量が空きメモリ容量よ)大きくな
く、その差が警告しきい値より大きい場合] (1)適用業務プログラムはメモリ獲得要求部1により
容量Rのメモリ領域の獲得全要求する。
[When the requested memory capacity is not larger than the free memory capacity and the difference is greater than the warning threshold] (1) The application program requests the memory acquisition request unit 1 to acquire all of the memory area of capacity R.

(2)次に空きメモリ容量算出部3は空きメモリ管理部
2に管理されている空きメモリ領域の先頭アドレスムを
参照し、予め定まっているシステム全体のメモリ容量T
を用いて現在の主記憶上の空き−メモリの容量E=(T
−A)i算出する。
(2) Next, the free memory capacity calculation unit 3 refers to the start address of the free memory area managed by the free memory management unit 2, and calculates the predetermined memory capacity T of the entire system.
Using current free space on main memory - memory capacity E = (T
-A) Calculate i.

(3)続いてメモリ獲得可能性判定部4はメモリ獲得要
求部1により要求された獲得メモリ容量Rと空きメモリ
容量算出部3により算出された空きメモリ容量Eとを比
較し要求された容量のメモリが獲得可能であるか否かを
判定する。この場合、R≦Eであるためメモリが獲得可
能であると判断され、その旨の信号Yをメモリ獲得部6
へ送出する。
(3) Next, the memory acquisition possibility determining unit 4 compares the acquired memory capacity R requested by the memory acquisition requesting unit 1 with the free memory capacity E calculated by the free memory capacity calculating unit 3, and calculates the requested capacity. Determine whether memory is available. In this case, since R≦E, it is determined that the memory can be acquired, and a signal Y to that effect is sent to the memory acquisition unit 6.
Send to.

(4)次にメモリ獲得部6はアドレス人以降の容量Rの
メモリ領域を獲得してその先頭アドレスムをメモリ獲得
成功通知部7に送出するとともに空きメモリ管理部2に
管理されている空きメモリ領域の先頭アドレス人をム°
=(ム+R)に更新する。
(4) Next, the memory acquisition unit 6 acquires a memory area of capacity R after the addressee and sends the first address to the memory acquisition success notification unit 7, and also free memory managed by the free memory management unit 2. Click the first address of the area
=(M+R).

(6)次にメモリ獲得成功通知部7は要求元の適用業務
プログラムに対してメモリ獲得に成功した旨を示すリタ
ーン値0とともにメモリ獲得部6から送出された獲得メ
モリ領域の先頭アドレス人を返す。
(6) Next, the memory acquisition success notification unit 7 returns the start address of the acquired memory area sent from the memory acquisition unit 6 to the requesting application program along with a return value of 0 indicating that memory acquisition was successful. .

(6)続いて空きメモリ容量再算出部8Fi、空きメモ
リ管理部2に管理されている空きメモリ領域の先頭アド
レス人°を参照し、予め定まっているシステム全体のメ
モリ容量Tを用いて新たなメモリ領域を獲得した後の主
記憶上の空きメモリの容量に’=(T−ム° )を再算
出する。
(6) Next, the free memory capacity recalculation unit 8Fi refers to the start address of the free memory area managed by the free memory management unit 2, and uses the predetermined memory capacity T of the entire system to create a new memory capacity. After acquiring the memory area, '=(T-mu°) is recalculated as the free memory capacity on the main memory.

(η 最後に警告判定部1oは再算出された空きメモリ
容量X°が警告しきい値記憶部9に記憶されている警告
しきい値S以下であるか否かを判定する。この場合、K
’)Sであるため警告の必要なしと判定され、処理を終
了する。(おわり)[要求されたメモリ容量が空きメモ
リ容量より大きくなく、その差が警告しきい値より大き
くない場合コ (8)  適用業務プログラムはメモリ獲得要求部1に
より容量Rのメモリ領域の獲得を要求する。
(η Finally, the warning determination unit 1o determines whether the recalculated free memory capacity X° is less than or equal to the warning threshold S stored in the warning threshold storage unit 9. In this case, K
') Since it is S, it is determined that no warning is necessary, and the process ends. (End) [If the requested memory capacity is not larger than the free memory capacity and the difference is not greater than the warning threshold (8) The application program uses the memory acquisition request unit 1 to acquire a memory area of capacity R. request.

(9)前記操作に対して本実施例の主記憶管理装置は前
記(2)〜(6)の動作を行なう。
(9) In response to the above operation, the main memory management device of this embodiment performs the operations (2) to (6) above.

(1o)次に警告判定部10Fj:再算出された空きメ
そり容量X”が警告しきい値記憶部9に記憶されている
警告しきい値S以下であるか否かを判定する。この場合
、X°≦Sであるため警告の必要あシと判定され、その
旨の信号Yを警告部11へ送出する。
(1o) Next, the warning determination unit 10Fj: determines whether the recalculated free memory capacity X” is less than or equal to the warning threshold value S stored in the warning threshold storage unit 9. In this case , X°≦S, it is determined that a warning is necessary, and a signal Y to that effect is sent to the warning unit 11.

(11)最後に警告部11はオペレータに対して空きメ
モリ容量が残り少ない旨のメツセージを表示装置上に出
力し警告を行う。(おわり)[要求されたメモリ容量が
空きメモリ容量より大きい場合] (12)適用業務プログラムはメモリ獲得要求部1によ
り容量Hのメモリ領域の獲得を要求する。
(11) Finally, the warning unit 11 issues a warning to the operator by outputting a message on the display device to the effect that the free memory capacity is low. (End) [When the requested memory capacity is larger than the free memory capacity] (12) The application program requests acquisition of a memory area of capacity H by the memory acquisition request unit 1.

(13)前記操作に対して本実施例の主記憶管理装置は
前記(2)の動作を行なう。
(13) In response to the above operation, the main memory management device of this embodiment performs the operation (2) above.

(14)続いてメモリ獲得可能性判定部4はメモリ獲得
要求部1により要求された獲得メモリ容量Rと空きメモ
リ容量算出部3により算出された空きメモリ容量Xとを
比較し要求された容量のメモリが獲得可能であるか否か
を判定する。この場合、R>Eであるためメモリが獲得
不可能であると判断され、その旨の信号Nt−メモリ獲
得失敗通知部6へ送出する。
(14) Next, the memory acquisition possibility determining unit 4 compares the acquired memory capacity R requested by the memory acquisition request unit 1 with the free memory capacity X calculated by the free memory capacity calculation unit 3, and calculates the requested capacity. Determine whether memory is available. In this case, since R>E, it is determined that memory cannot be acquired, and a signal Nt to that effect is sent to the memory acquisition failure notification unit 6.

(15)最後にメモリ獲得失敗通知部6は要求元の適用
業務プログラムに対してメモリ獲得に失敗した旨を示す
リターン値(−1)を返す。(おわり)上述のように本
実施例の主記憶管理装置においては、適用業務プログラ
ムからのメモリ獲得要求に応じた後に残りの空きメモリ
容量の再算出を行ない、算出された空きメモリ容量があ
らかじめ指定された警告しきい値以下である場合にオペ
レータに対して直接その旨の警告を行なうので、オペレ
ータはこの警告以後に新たなメモリ領域を必要とする適
用業務プログラムの実行を意識的に控えることが可能で
ちゃ、必要なメモリ領域獲得に失敗した場合に元の定常
状態への復旧が困難であるために発生する適用業務プロ
グツムの異常終了を未然に防止することができる。さら
にこの警告が主記憶管理装置からオペレータに直接的に
行なわれることにより個々の適用業務プログラムがオペ
レータにその旨の通知を行なうプログラムを追加する必
要がなく、適用業務プログラムの負担を軽減することが
可能となる。
(15) Finally, the memory acquisition failure notification unit 6 returns a return value (-1) indicating that memory acquisition has failed to the requesting application program. (End) As mentioned above, in the main memory management device of this embodiment, the remaining free memory capacity is recalculated after responding to a memory acquisition request from an application program, and the calculated free memory capacity is specified in advance. If the value is less than the specified warning threshold, the operator is directly warned, so that the operator can consciously refrain from running application programs that require new memory space after receiving this warning. If possible, it is possible to prevent the application program from abnormally terminating because it is difficult to restore the original steady state when acquisition of the necessary memory area fails. Furthermore, since this warning is sent directly to the operator from the main memory management unit, there is no need for each application program to add a program to notify the operator, reducing the burden on the application program. It becomes possible.

なお、本実施例においては主記憶をその先頭から順に獲
得するものとし、使用中メモリ領域の解放を行なわない
ような簡単なものを想定したが、メモリ領域の獲得・解
放を繰シ返すことによって主記憶上の空きメモリ領域が
離散的に存在するような局面においてもその中の連続す
る最大の空きメモリ領域に注目することにより本発明の
主記憶管理方法が適用可能であることは言うまでもない
In addition, in this embodiment, we assume that the main memory is acquired in order from the beginning and that the memory area in use is not released. However, by repeatedly acquiring and releasing the memory area, It goes without saying that the main memory management method of the present invention can be applied even in situations where free memory areas on the main memory exist discretely by focusing on the largest continuous free memory area among them.

さらに、本実施例では実記憶方式の計算機システムを想
定したが、仮想記憶方式の計算機システムにおいても主
記憶装置の容量と退避用補助記憶装置の容量の総和を主
記憶の容量と見なすことにより本発明の主記憶管理方法
が適用可能である。警告しきい値についても本実施例で
は定数であるとしたが、警告しきい値記憶部9の記憶内
容を変更する手段を追加することにより警告開始の時期
を動的に変更することも可能であり、さらに複数のレベ
ルの警告しきい値を設定可能とすることによりレベルを
持たせた警告を行なうことも可能である。メモリ獲得失
敗の通知に関しても同様に要求元の適用業務プログラム
に対してメモリ獲得に失敗した旨を示す情報を送出する
のみならずオペレータに対しても視覚的・聴覚的に直接
通知するようにすることも可能である。
Furthermore, although this example assumes a computer system using a real memory method, the present invention can also be applied to a computer system using a virtual memory method by considering the sum of the main memory capacity and the backup auxiliary memory capacity as the main memory capacity. The main memory management method of the invention is applicable. Although the warning threshold value is also assumed to be a constant in this embodiment, it is also possible to dynamically change the warning start time by adding a means for changing the storage contents of the warning threshold storage section 9. Furthermore, by making it possible to set warning thresholds at multiple levels, it is also possible to issue warnings with different levels. Similarly, regarding notification of memory acquisition failure, not only information indicating that memory acquisition has failed is sent to the requesting application program, but also the operator is directly notified visually and audibly. It is also possible.

発明の効果 本発明の主記憶管理方法およびその装置においては、適
用業務プログラムからのメモリ獲得要求に応じた後に残
りの空きメモリ容量の再算出を行ない、算出された空き
メモリ容量があらかじめ指定された警告しきい値以下で
ある場合にオペレータに直接その旨の警告を行なうので
、オペレータはこの警告以後に新たなメモリ領域を必要
とする適用業務プログラムの実行を意識的に控えること
により適用業務プログラムの異常終了を未然に防止する
ことができるとともに、この警告が主記憶管理装置から
オペレータに直接的に行なわれるため個々の適用業務プ
ログラムがオペレータにその旨の通知を行なうプログラ
ムを追加する必要がなく、適用業務プログラムの負担を
軽減することが可能であるのでその実用的効果は大きい
Effects of the Invention In the main memory management method and device of the present invention, the remaining free memory capacity is recalculated after responding to a memory acquisition request from an application program, and the calculated free memory capacity is specified in advance. If it is below the warning threshold, the operator is directly warned, so the operator can consciously refrain from running application programs that require new memory space after this warning. Abnormal termination can be prevented, and since this warning is sent directly to the operator from the main memory management device, there is no need for each application program to add a program to notify the operator. It has a great practical effect since it is possible to reduce the burden on applied business programs.

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

第1図は本発明の一実施例の主記憶管理装置の構成図、
第2図は従来の主記憶管理装置の構成図である。 1・・・・・・メモリ獲得要求部、3・・・・・・空き
メモリ容量算出部、4・・・・・・メモリ獲得可能性判
定部、6・・・・・・メモリ獲得失敗通知部、6・・・
・・・メモリ獲得部。 8・・・・・・空きメモリ容量再算出部、1o・・・・
−・警告判定部、11・・・・・・警告部。 代理人の氏名 弁理士 粟 野 重 孝 ほか1名図 第2図
FIG. 1 is a configuration diagram of a main memory management device according to an embodiment of the present invention;
FIG. 2 is a block diagram of a conventional main memory management device. 1...Memory acquisition request unit, 3...Free memory capacity calculation unit, 4...Memory acquisition possibility determination unit, 6...Memory acquisition failure notification Part, 6...
...Memory acquisition part. 8... Free memory capacity recalculation unit, 1o...
- Warning determination section, 11... Warning section. Name of agent: Patent attorney Shigetaka Awano and one other person Figure 2

Claims (2)

【特許請求の範囲】[Claims] (1)適用業務プログラムからの要求により主記憶上の
新たなメモリ領域の獲得を指示するメモリ獲得要求段階
と、現在の主記憶上の空きメモリの容量を算出する空き
メモリ容量算出段階と、前記メモリ獲得要求段階で要求
された獲得メモリ容量と前記空きメモリ容量算出段階で
算出された空きメモリ容量とを比較し要求された容量の
メモリが獲得可能であるか否かを判定するメモリ獲得可
能性判定段階と、前記メモリ獲得可能性判定段階により
獲得不可能と判定された場合に要求元の適用業務プログ
ラムに対してメモリ獲得に失敗した旨の通知を行うメモ
リ獲得失敗通知段階と、前記メモリ獲得可能性判定段階
で獲得可能と判定された場合に実際にそのメモリ領域を
獲得するメモリ獲得段階と、前記メモリ獲得段階で新た
なメモリ領域を獲得した後の主記憶上の空きメモリの容
量を再算出する空きメモリ容量再算出段階と、前記空き
メモリ容量再算出段階で算出された空きメモリ容量があ
らかじめ指定された警告しきい値以下であるか否かを判
定する警告判定段階と、前記警告判定段階で警告しきい
値以下であると判定された場合にオペレータに対して空
きメモリ容量が残り少ない旨の警告を行う警告手段とか
らなることを特徴とする主記憶管理方法。
(1) a memory acquisition request step for instructing the acquisition of a new memory area on the main memory in response to a request from an application program; a free memory capacity calculation step for calculating the current free memory capacity on the main memory; memory acquisition possibility, which compares the acquisition memory capacity requested in the memory acquisition request stage with the free memory capacity calculated in the free memory capacity calculation stage and determines whether the requested capacity of memory can be acquired; a memory acquisition failure notification step for notifying the requesting application program that memory acquisition has failed if memory acquisition is determined to be impossible in the memory acquisition possibility determination step; A memory acquisition step in which the memory area is actually acquired if it is determined that the memory area can be acquired in the possibility determination step; and a memory acquisition step in which the free memory capacity on the main memory is restored after acquiring a new memory area in the memory acquisition step. a step of recalculating the free memory capacity; a warning determination step of determining whether the free memory capacity calculated in the step of recalculating the free memory capacity is less than or equal to a predetermined warning threshold; and the warning determination step. 1. A main memory management method comprising: a warning means for warning an operator that free memory capacity is low when it is determined that the remaining free memory capacity is below a warning threshold.
(2)適用業務プログラムからの要求により主記憶上の
新たなメモリ領域の獲得を指示するメモリ獲得要求部と
、現在の主記憶上の空きメモリの容量を算出する空きメ
モリ容量算出部と、前記メモリ獲得要求部により要求さ
れた獲得メモリ容量と前記空きメモリ容量算出部により
算出された空きメモリ容量とを比較し要求された容量の
メモリが獲得可能であるか否かを判定するメモリ獲得可
能性判定部と、前記メモリ獲得可能性判定部により獲得
不可能と判定された場合に要求元の適用業務プログラム
に対してメモリ獲得に失敗した旨の通知を行うメモリ獲
得失敗通知部と、前記メモリ獲得可能性判定部により獲
得可能と判定された場合に実際にそのメモリ領域を獲得
するメモリ獲得部と、前記メモリ獲得部により新たなメ
モリ領域を獲得した後の主記憶上の空きメモリの容量を
再算出する空きメモリ容量再算出部と、前記空きメモリ
容量再算出部により算出された空きメモリ容量があらか
じめ指定された警告しきい値以下であるか否かを判定す
る警告判定部と、前記警告判定部により警告しきい値以
下であると判定された場合にオペレータに対して空きメ
モリ容量が残り少ない旨の警告を行う警告部とを備えた
ことを特徴とする主記憶管理装置。
(2) a memory acquisition request unit that instructs acquisition of a new memory area on the main memory in response to a request from an application program; a free memory capacity calculation unit that calculates the current capacity of free memory on the main memory; memory acquisition possibility, which compares the acquisition memory capacity requested by the memory acquisition request unit with the free memory capacity calculated by the free memory capacity calculation unit and determines whether the requested capacity of memory can be acquired; a determination unit; a memory acquisition failure notification unit that notifies a requesting application program that memory acquisition has failed when memory acquisition is determined to be impossible by the memory acquisition possibility determination unit; A memory acquisition unit that actually acquires the memory area when it is determined that the memory area can be acquired by the possibility determination unit, and a memory acquisition unit that regenerates the capacity of free memory on the main memory after acquiring a new memory area by the memory acquisition unit. a free memory capacity recalculation unit that calculates the free memory capacity; a warning determination unit that determines whether the free memory capacity calculated by the free memory capacity recalculation unit is less than or equal to a prespecified warning threshold; and the warning determination unit. 1. A main memory management device comprising: a warning unit that warns an operator that free memory capacity is low when the unit determines that the remaining memory capacity is below a warning threshold.
JP32263488A 1988-12-21 1988-12-21 Method and device for controlling main storage Pending JPH02166536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32263488A JPH02166536A (en) 1988-12-21 1988-12-21 Method and device for controlling main storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32263488A JPH02166536A (en) 1988-12-21 1988-12-21 Method and device for controlling main storage

Publications (1)

Publication Number Publication Date
JPH02166536A true JPH02166536A (en) 1990-06-27

Family

ID=18145898

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32263488A Pending JPH02166536A (en) 1988-12-21 1988-12-21 Method and device for controlling main storage

Country Status (1)

Country Link
JP (1) JPH02166536A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07319759A (en) * 1994-05-25 1995-12-08 Nec Corp Advance detection system for lack of memory
JP2002077755A (en) * 2000-08-29 2002-03-15 Sharp Corp Agent interface apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07319759A (en) * 1994-05-25 1995-12-08 Nec Corp Advance detection system for lack of memory
JP2002077755A (en) * 2000-08-29 2002-03-15 Sharp Corp Agent interface apparatus

Similar Documents

Publication Publication Date Title
US6618794B1 (en) System for generating a point-in-time copy of data in a data storage system
US7464232B2 (en) Data migration and copying in a storage system with dynamically expansible volumes
US20080005523A1 (en) Detection of out-of-memory and graceful shutdown
US8799906B2 (en) Processing a batched unit of work
US6477591B1 (en) Method and apparatus for storing and copying data via a first path and a second path wherein second path bypasses mirror driver
JPS59195749A (en) Non-synchronous check pointing system for recovery of errors
WO2021139224A1 (en) Method and apparatus for file backup in cloud scenario, and medium and electronic device
JP2004127301A (en) Virtual storage system, virtual storage method, and method of over assigning virtual raid storage system
US20040143657A1 (en) Method for remote data management
CN111309483A (en) Management method, device, equipment and storage medium of server cluster
JPH0630078B2 (en) Terminal device initial load control method
US20070050541A1 (en) Arrangement and Method for Update of Configuration Cache Data
JPH02166536A (en) Method and device for controlling main storage
CN113641640B (en) Data processing method, device, equipment and medium for stream type computing system
CN113867891A (en) Method, device, equipment and storage medium for migrating disk across available area cluster
JPH04102952A (en) Loading system for device driver
JPH08161210A (en) File management method and file management system
CN110727898B (en) OTA website event assisted processing method, system, equipment and storage medium
CN112073492B (en) Request execution method and device, electronic equipment and storage medium
CN117632443A (en) Method, device, equipment and medium for controlling circulation of business process
JP2921501B2 (en) Task execution priority change method under high load in online processing system
JP2002202908A (en) Input/output demand interruption system, input/output demand interruption method and recording medium having input/output demand interruption program recoded thereon
JP2005250751A (en) Memory leak monitoring method and program and device for performing the same
JPH10240594A (en) Data file monitor system
CN117850707A (en) Log printing method, device, equipment, storage medium and vehicle