JP2003131938A - Method and system for managing memory - Google Patents

Method and system for managing memory

Info

Publication number
JP2003131938A
JP2003131938A JP2001324102A JP2001324102A JP2003131938A JP 2003131938 A JP2003131938 A JP 2003131938A JP 2001324102 A JP2001324102 A JP 2001324102A JP 2001324102 A JP2001324102 A JP 2001324102A JP 2003131938 A JP2003131938 A JP 2003131938A
Authority
JP
Japan
Prior art keywords
memory
application
capacity
reservation
reserved
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
JP2001324102A
Other languages
Japanese (ja)
Inventor
Takuya Matsumoto
拓矢 松本
Toyoji Kuroda
豊治 黒田
Kiyoshi Owada
清志 大和田
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 JP2001324102A priority Critical patent/JP2003131938A/en
Publication of JP2003131938A publication Critical patent/JP2003131938A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a method and a system for managing memory, which can effectively utilize the unutilized capacity of more than a half of the memory during the execution of an application program when the memory is reserved and guaranteed for executing the application program run on a computer system. SOLUTION: A method and a device for managing memory comprise a memory reservation unit 10 that adds the quantity of memory to the standard quantity of reservation memory Rx when an application program reserves the capacity of the memory, and specifies the capacity limit for the memory Lx to be acquired according to the capacity of the memory not utilized for the execution of the application program. A memory acquisition unit 20, then, acquires a memory region up to the capacity limit for the memory Lx to be acquired if there exists the enough memory being not utilized even though the acquisition unit 20 receives a new demand for acquiring the memory region under a condition of the total capacity of the memory utilized for the application program is beyond the capacity of the reservation memory Rx.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、計算機システムに
おいてメモリ管理を行うメモリ管理装置及びメモリ管理
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory management device and a memory management method for managing memory in a computer system.

【0002】[0002]

【従来の技術】従来、情報処理分野で使用される計算機
システムには、一般にオペレーティングシステム(O
S)とよばれるシステムプログラムが常駐し、OSは計
算機システムのハードウェア資源を一元管理しており、
個々のアプリケーションプログラム(以下、「アプリケ
ーション」)はOSが管理する資源を使用して動作す
る。OSの主な役割の1つに、限られたメモリ資源を有
効に活用するためのメモリ管理がある。
2. Description of the Related Art Conventionally, an operating system (O
A system program called S) is resident, and the OS centrally manages the hardware resources of the computer system.
Each application program (hereinafter, “application”) operates using resources managed by the OS. One of the main roles of the OS is memory management for effectively utilizing limited memory resources.

【0003】ここで言うメモリ管理の対象となるメモリ
は以下の2種類である。1つはOS上で動作するアプリ
ケーションに対して、その格納や演算処理の実行に使用
される第1のメモリ領域である。もう1つは、セマフォ
による排他制御機能、プロセス間通信機能、メモリ管理
機能など、実行時にソフトウェア資源を動的に生成する
機能について管理情報を格納する制御ブロック用の第2
のメモリ領域である。
There are the following two types of memories to be subject to memory management. One is a first memory area used for storing and executing arithmetic processing for an application running on the OS. The other is a second control block that stores management information for functions that dynamically generate software resources during execution, such as semaphore exclusive control functions, interprocess communication functions, and memory management functions.
Memory area.

【0004】第1のメモリ領域については、OSが、ア
プリケーションの実行単位であるプロセスやタスクの開
始要求を受け付ける度に主記憶上に獲得し、終了時に解
放する。獲得の際、OSは、要求に含まれるメモリ容量
と自身が管理する主記憶上の空きメモリ容量とから獲得
の可否を判定する。また、第2のメモリ領域について
も、機能実行開始の要求に応じて獲得し、同様に、ブロ
ックの容量と空きメモリ容量とから獲得の可否を判定す
る。
The OS acquires the first memory area in the main memory each time the OS receives a request to start a process or task that is an execution unit of an application, and releases it at the end. At the time of acquisition, the OS determines whether acquisition is possible based on the memory capacity included in the request and the free memory capacity in the main memory managed by itself. Further, the second memory area is also acquired in response to the request to start the function execution, and similarly, the availability of the acquisition is determined from the block capacity and the free memory capacity.

【0005】こうした方式でメモリを獲得していると、
主記憶の容量が限られているため、複数のアプリケーシ
ョンがそれぞれにメモリ獲得を行う場合、要求された容
量のメモリ領域が必ずしも獲得できるとは限らない。例
えば、メモリ獲得動作を保証したい(優先度の高い)ア
プリケーションAP1と、それほど重要でなく優先度が
低いアプリケーションAP2が並存している場合、アプ
リケーションAP2が先に大量のメモリを獲得したため
に、アプリケーションAP1が要求したメモリを獲得で
きないという事態が生じる。
When memory is acquired by such a method,
Since the capacity of the main memory is limited, when a plurality of applications each acquire memory, the memory area of the requested capacity cannot always be acquired. For example, when an application AP1 that wants to guarantee a memory acquisition operation (high priority) and an application AP2 that is less important and has a lower priority coexist, the application AP1 has acquired a large amount of memory first, and thus the application AP1 A situation occurs in which the memory requested by is unable to be obtained.

【0006】そこで、従来技術として、アプリケーショ
ンのメモリ領域獲得については、μITRONにおける
サービスコールcre_mplの仕様(「μITRON
3.0標準ハンドブック」(社団法人トロン協会編、パ
ーソナルメディア株式会社)を参照)にあるように、使
用が予測される容量のメモリ領域を実行開始前に予約し
ておき、予約したメモリ領域からタスク実行のタイミン
グで逐次メモリ獲得を行う、という方法がある。
Therefore, as a conventional technique, for obtaining a memory area of an application, the specification of the service call cre_mpl in μITRON (“μITRON
As described in "3.0 Standard Handbook" (edited by TRON Association, Personal Media Co., Ltd.), a memory area with a capacity expected to be used is reserved before execution, and the reserved memory area is used. There is a method of sequentially acquiring memory at the timing of task execution.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上記の
予約方法では、予約した容量がアプリケーションの獲得
できるメモリ容量の上限となってしまい、システム上の
メモリ資源の利用が効率的に行われない場合が起こりう
る。これは、アプリケーションの実行時、システムに空
きメモリが多くある場合でも、当該アプリケーションは
予約した容量以上のメモリを獲得できないためであり、
さらに、予約するメモリの容量は、他アプリケーション
への影響を考えて必要最小限とする傾向が強いためであ
る。つまり、予約分に加えてもう少しメモリ領域を使用
すればアプリケーションの処理効率の向上が期待でき、
しかも実際にメモリ領域に空きがあるにも関わらず、こ
の空きメモリが使用されない、という事態が起こりうる
のである。
However, in the above reservation method, the reserved capacity may be the upper limit of the memory capacity that can be acquired by the application, and the memory resources on the system may not be efficiently used. It can happen. This is because even when there is a lot of free memory in the system when the application is executed, the application cannot acquire more memory than the reserved capacity.
In addition, the reserved memory capacity tends to be the minimum necessary considering the influence on other applications. In other words, if you use a little more memory area in addition to the reserved amount, you can expect to improve the processing efficiency of the application,
Moreover, there is a possibility that the free memory is not used even though the free memory area is actually available.

【0008】本発明は、上記課題に鑑み、アプリケーシ
ョン実行用及び機能管理ブロック用に必要なメモリ領域
を予め確保するだけでなく、実行時にシステム上の空き
メモリ領域をアプリケーションが効率よく使用できる形
でメモリ獲得を行う、メモリ管理装置及びメモリ管理方
法を提供することを目的とする。
In view of the above problems, the present invention not only secures a memory area required for application execution and a function management block in advance, but also makes it possible for an application to efficiently use a free memory area on the system at the time of execution. An object of the present invention is to provide a memory management device and a memory management method for acquiring a memory.

【0009】[0009]

【課題を解決するための手段】上記課題を解決するため
に、本発明は、アプリケーションが動作するコンピュー
タシステム上で、アプリケーション実行時に使用される
メモリ領域を管理するメモリ管理装置であって、アプリ
ケーションの実行前に、前記アプリケーション用に予め
保証される予約メモリ容量の予約を受け付ける予約受付
手段と、前記アプリケーションの実行開始後に当該アプ
リケーションが処理実行に伴って使用する実行用メモリ
領域を、前記予約メモリ容量の範囲内で獲得する予約分
メモリ獲得手段と、前記コンピュータシステム上のメモ
リ資源に関し、アプリケーション用に予約も獲得もされ
ていない空きメモリの容量を管理する空きメモリ管理手
段と、前記アプリケーションが前記予約メモリ容量を超
えてメモリ領域を使用しようとする場合に前記空きメモ
リの容量を参照し、前記空きメモリの容量に応じて前記
空きメモリから追加のメモリ領域を獲得する追加分メモ
リ獲得手段と、を有すること、を特徴とする構成となっ
ている。
In order to solve the above problems, the present invention is a memory management device for managing a memory area used when an application is executed on a computer system in which the application operates. A reservation accepting unit that accepts a reservation of a reserved memory capacity that is guaranteed in advance for the application before execution, and an execution memory area used by the application for execution of processing after the execution of the application is used as the reserved memory capacity. Reserved memory acquisition means for acquiring within the range of, and free memory management means for managing the amount of free memory that has not been reserved or acquired for an application with respect to the memory resources on the computer system; Memory area beyond memory capacity An additional memory acquisition unit for acquiring an additional memory area from the free memory according to the free memory capacity when the user intends to use the free memory. Has become.

【0010】これによれば、アプリケーションに対し、
最小限必要と見積もられる容量のメモリ領域を予約メモ
リ容量として確保すると共に、実行時のシステム上の空
きメモリの状態に応じて獲得できるメモリ容量を上乗せ
することができるので、アプリケーションは予約分のメ
モリ領域を確実に確保したうえで、システム上の空きメ
モリを効率よく使用することができる。
According to this, for the application,
The application reserves the amount of memory for the reservation because it reserves the minimum required memory area as the reserved memory capacity and also adds the memory capacity that can be acquired according to the free memory status on the system at the time of execution. It is possible to use the free memory on the system efficiently after ensuring the area.

【0011】[0011]

【発明の実施の形態】以下、本発明のメモリ管理装置の
実施の形態について、図面を参照しながら説明する。 (構成)先ず、本実施の形態におけるメモリ管理装置の
構成について説明する。本実施の形態におけるメモリ管
理装置は、パーソナルコンピュータや携帯端末などで動
作する小型計算機システムにおいてOS上でアプリケー
ションの実行に使用される主記憶装置のメモリ管理に関
する処理を行うものである。本メモリ管理装置では、ア
プリケーションは必要な容量のメモリ領域を予約できる
だけでなく、実行時点でシステム上に空きメモリがあれ
ば、予約分を上回るメモリ領域を獲得、使用できる。た
だし、予約分を超えて獲得できるメモリ容量について
は、メモリ予約時に上限を定めておく。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of a memory management device of the present invention will be described below with reference to the drawings. (Configuration) First, the configuration of the memory management device according to the present embodiment will be described. The memory management device according to the present embodiment performs a process related to memory management of a main storage device used for executing an application on an OS in a small computer system operating on a personal computer, a mobile terminal, or the like. In this memory management device, the application can not only reserve a memory area of a required capacity, but also obtain and use a memory area exceeding the reserved amount if there is a free memory on the system at the time of execution. However, for the memory capacity that can be acquired beyond the reserved amount, an upper limit is set at the time of memory reservation.

【0012】図1は、本実施の形態におけるメモリ管理
装置1の構成を示す。メモリ管理装置1は、大きく分け
て、アプリケーション単位でメモリ領域の予約を行うメ
モリ予約部10と、アプリケーション実行時にメモリ予
約の内容に応じて実際にアプリケーションのためにメモ
リ領域の獲得を行うメモリ獲得部20から成る。メモリ
予約部10、メモリ獲得部20はいずれも、アプリケー
ションから関数呼び出しの形で起動され、予約/獲得処
理結果の内容を関数リターンの形でアプリケーションに
返す。以下、メモリ予約部10、メモリ獲得部20の順
序で、構成を説明する。 (メモリ予約部10の構成)このうち、メモリ予約部1
0は、システム上にあるアプリケーションから実行に要
するメモリの予約要求を受け付ける予約要求受付部11
と、要求されたメモリ予約の実行可否を判定する予約可
否判定部12、要求されたメモリ予約の実行可否の結果
をそれぞれアプリケーションに通知する予約失敗通知部
13及び予約成功通知部14、メモリ予約の内容を管理
するための予約管理情報を生成する予約情報登録部1
5、予約管理情報を参照可能な形で保持しておく予約情
報記憶部16、予約対象である主記憶装置のメモリ容量
やメモリ使用状態に関する情報を管理している空きメモ
リ管理部17を有する。
FIG. 1 shows the configuration of a memory management device 1 according to this embodiment. The memory management device 1 is roughly divided into a memory reservation unit 10 that reserves a memory area for each application, and a memory acquisition unit that actually acquires a memory area for an application according to the contents of the memory reservation when the application is executed. It consists of 20. The memory reservation unit 10 and the memory acquisition unit 20 are both activated by the application in the form of a function call, and return the contents of the reservation / acquisition processing result to the application in the form of a function return. The configuration will be described below in the order of the memory reservation unit 10 and the memory acquisition unit 20. (Configuration of the memory reservation unit 10) Of these, the memory reservation unit 1
0 is a reservation request receiving unit 11 that receives a reservation request for a memory required for execution from an application on the system.
And a reservation availability determination unit 12 that determines whether the requested memory reservation can be executed, a reservation failure notification unit 13 and a reservation success notification unit 14 that notify the application of the results of the execution availability of the requested memory reservation, and the memory reservation Reservation information registration unit 1 for generating reservation management information for managing contents
5, a reservation information storage unit 16 that holds the reservation management information in a referable form, and a free memory management unit 17 that manages information regarding the memory capacity and memory usage state of the main storage device that is the reservation target.

【0013】予約要求受付部11は、システム上のアプ
リケーションからメモリ予約要求を受け付け、その内容
を予約可否判定部12に伝える。メモリ予約要求には、
アプリケーション実行に最小限必要と見積もられるメモ
リの容量である「予約メモリ容量Rx」、アプリケーシ
ョンを快適に実行させるために望ましいメモリの容量で
あるとともに、これ以上のメモリを求めないという上限
値を示す「獲得限界メモリ容量Lx」という2つのパラ
メータが付加されている。予約要求受付部11は、上記
2つのパラメータを有する関数呼び出しの形でアプリケ
ーションとリンクされ、割込み処理によってシステムプ
ログラムを起動するシステムライブラリの形で実現され
る。
The reservation request acceptance unit 11 accepts a memory reservation request from an application on the system, and informs the reservation permission / inhibition judgment unit 12 of the content thereof. For memory reservation request,
The "reserved memory capacity Rx", which is the memory capacity estimated to be the minimum required for executing the application, is the desired memory capacity for comfortably executing the application, and indicates the upper limit value that does not require any more memory. Two parameters "acquisition limit memory capacity Lx" are added. The reservation request receiving unit 11 is linked with an application in the form of a function call having the above two parameters, and is realized in the form of a system library that activates a system program by interrupt processing.

【0014】予約可否判定部12は、予約要求受付部1
1が受け付けたメモリ領域の予約要求について、要求さ
れた予約メモリ容量Rxとシステム空きメモリの容量E
(空きメモリ管理部17が保持)とを比較し、要求され
たメモリ予約が可能か否かを判定する。なお、空きメモ
リとは、システム上の主記憶装置のメモリのうち、判定
時点で使用されておらず、また、いずれかのアプリケー
ションに予約もされていない部分のことを言う。
The reservation approval / disapproval determination unit 12 is a reservation request reception unit 1
1 for the reservation request for the memory area, the requested reserved memory capacity Rx and the system free memory capacity E
(Held by the free memory management unit 17) is compared to determine whether the requested memory reservation is possible. The free memory refers to a portion of the memory of the main storage device on the system that is not used at the time of determination and is not reserved for any application.

【0015】予約可否判定部12は、予約要求受付部1
1から得た予約メモリ容量Rxを、空きメモリ容量Eと
比較する。比較の結果が「Rx>E」であった場合、す
なわち、新たに予約を要求されたメモリの容量よりも、
現在予約可能なメモリの容量の方が小さい場合、予約可
否判定部12は、予約の実行は不可能と判定し、予約失
敗通知部13に要求元アプリケーションの識別情報を渡
し、当該要求元アプリケーションにメモリ予約失敗を通
知させる。逆に、比較の結果が「Rx≦E」であった場
合、すなわち、現在予約可能なメモリの容量が新たに予
約を要求されたメモリの容量以上であった場合、予約可
否判定部12は、予約情報登録部15に「予約メモリ容
量Rx」、「獲得限界メモリ容量Lx」、要求発行元の
アプリケーションの識別情報を渡し、メモリ予約の具体
的な処理の実行を指示する。
The reservation availability determination unit 12 is a reservation request reception unit 1
The reserved memory capacity Rx obtained from 1 is compared with the free memory capacity E. When the result of the comparison is “Rx> E”, that is, the memory capacity requested to be newly reserved is
When the currently reservable memory capacity is smaller, the reservation availability determination unit 12 determines that the reservation cannot be executed, passes the identification information of the request source application to the reservation failure notification unit 13, and notifies the request source application of the identification information. Notify that the memory reservation has failed. On the other hand, when the comparison result is “Rx ≦ E”, that is, when the capacity of the currently reservable memory is equal to or larger than the capacity of the memory for which a new reservation is requested, the reservation availability determination unit 12 The "reserved memory capacity Rx", "acquisition limit memory capacity Lx", and identification information of the request issuing application are passed to the reservation information registration unit 15 to instruct execution of a specific process of memory reservation.

【0016】予約情報登録部15は、予約可否判定部1
2が可能と判定した予約要求に対して、予約内容を管理
する予約管理情報を生成し、予約情報記憶部16が保持
する予約情報テーブルに格納する。図2は、予約情報登
録部15が生成した予約管理情報が格納される予約管理
情報テーブル200を示す図である。予約管理情報テー
ブル200内の予約管理情報は、識別情報である予約メ
モリ識別子が格納された予約メモリID欄210と、予
約メモリ容量Rxの値が格納される予約メモリ容量欄2
20、空きメモリの状態に応じて予約メモリ容量Rx以
上のメモリを獲得する場合のメモリ容量上限値である獲
得限界メモリ容量Lxの値が格納される獲得限界メモリ
容量欄230、予約元アプリケーションが実行時に獲得
したメモリ領域の容量の合計値である獲得済みメモリ容
量Gxが格納される獲得済みメモリ容量欄240から成
る。
The reservation information registration unit 15 includes a reservation availability determination unit 1
In response to the reservation request determined as No. 2, reservation management information for managing the reservation content is generated and stored in the reservation information table held by the reservation information storage unit 16. FIG. 2 is a diagram showing a reservation management information table 200 in which the reservation management information generated by the reservation information registration unit 15 is stored. The reservation management information in the reservation management information table 200 includes a reserved memory ID column 210 that stores a reserved memory identifier that is identification information and a reserved memory capacity column 2 that stores the value of the reserved memory capacity Rx.
20, the acquisition limit memory capacity column 230 in which the value of the acquisition limit memory capacity Lx, which is the upper limit of the memory capacity when acquiring the memory of the reserved memory capacity Rx or more according to the state of the free memory, is executed by the reservation source application. The acquired memory capacity column 240 stores the acquired memory capacity Gx, which is the total value of the acquired memory area capacities.

【0017】予約情報登録部15は、予約管理情報の
「予約メモリ容量欄220」には、予約要求に付加され
た「予約メモリ容量Rx」の値を、「獲得限界メモリ容
量欄230」には、予約要求に付加された「獲得限界メ
モリ容量Lx」の値を、「獲得済みメモリ容量欄24
0」には初期値の「0」を設定する(当欄の値はアプリ
ケーション実行時にメモリ獲得部20が設定する)。そ
して、「予約メモリID欄210」には、ユニークな予
約メモリ識別子Ixを生成して設定する。
The reservation information registration unit 15 stores the value of the "reserved memory capacity Rx" added to the reservation request in the "reserved memory capacity column 220" of the reservation management information and the "acquired limit memory capacity column 230". , The value of the “acquired limit memory capacity Lx” added to the reservation request is set in the “acquired memory capacity column 24
The initial value "0" is set to "0" (the value in this column is set by the memory acquisition unit 20 when the application is executed). Then, a unique reserved memory identifier Ix is generated and set in the "reserved memory ID column 210".

【0018】さらに、予約情報登録部15は、空きメモ
リ管理部17が管理している空きメモリ容量Eの値を新
たに予約されたメモリ領域の分だけ減らす。具体的に
は、「更新後の空きメモリ容量E=更新前の空きメモリ
容量E−Rx」とする。そして、予約情報登録部15
は、生成した予約メモリ識別子Ixと要求元アプリケー
ションの識別情報とを予約成功通知部14に送って、要
求元アプリケーションに予約成功を通知させる。
Further, the reservation information registration unit 15 reduces the value of the free memory capacity E managed by the free memory management unit 17 by the amount of the newly reserved memory area. Specifically, it is assumed that “free memory capacity E after update = free memory capacity E-Rx before update”. Then, the reservation information registration unit 15
Sends the generated reserved memory identifier Ix and the identification information of the request source application to the reservation success notifying unit 14 to notify the request source application of the reservation success.

【0019】予約成功通知部14は、要求元のアプリケ
ーションに対してメモリ予約に成功した旨の通知を行
う。そして同時に、予約情報登録部15が予約メモリに
付与した予約メモリ識別子Ixを当該アプリケーション
に返す。予約成功通知部14が行う成功通知の具体的方
法としては、前述の予約要求受付部11に対する関数呼
び出しに応じる形で、特定の負でない値のエラーコード
を、前記予約メモリ識別子と共に返す、というものが考
えられる。
The reservation success notifying unit 14 notifies the requesting application that the memory reservation has succeeded. At the same time, the reservation information registration unit 15 returns the reserved memory identifier Ix given to the reserved memory to the application. As a concrete method of the success notification performed by the reservation success notification unit 14, a specific non-negative error code is returned together with the reservation memory identifier in response to the function call to the reservation request reception unit 11 described above. Can be considered.

【0020】予約失敗通知部13は、前記予約可否判定
部12によって実行不能と判定された予約要求につい
て、要求元アプリケーションにメモリ予約の失敗を通知
する。予約失敗通知部13が行う失敗通知の具体的方法
としては、前述の予約要求受付部11に対する関数呼び
出しに応じる形で、特定の負の値のエラーコードを返
す、というものが考えられる。予約失敗通知部13がア
プリケーションに送った予約失敗の通知は、OS経由で
管理者又は利用者にも示され、システム上のアプリケー
ション数の削減、システム構成の見直しなどの対応を促
す。
The reservation failure notifying unit 13 notifies the requesting application of the failure of the memory reservation with respect to the reservation request judged by the reservation possibility judging unit 12 to be unexecutable. As a concrete method of the failure notification performed by the reservation failure notification unit 13, it is conceivable to return a specific negative error code in response to the function call to the reservation request reception unit 11 described above. The reservation failure notification sent by the reservation failure notification unit 13 to the application is also shown to the administrator or the user via the OS, and prompts a response such as a reduction in the number of applications on the system and a review of the system configuration.

【0021】空きメモリ管理部17は、システムの主記
憶装置上の空きメモリについて、容量Eやアドレスなど
の情報を保持している。 (メモリ獲得部20の構成)メモリ獲得部20は、シス
テム上にあるアプリケーションから実行単位のタスク毎
にメモリの獲得要求を受け付ける獲得要求受付部21
と、要求されたメモリ獲得の実行可否を判定する獲得可
否判定部22、要求されたメモリ予約の実行可否の結果
をそれぞれアプリケーションに通知する獲得失敗通知部
23及び獲得成功通知部24、獲得可能と判定された獲
得要求に従って主記憶上にメモリ領域を獲得するメモリ
獲得処理部25を有する。
The free memory management unit 17 holds information such as the capacity E and the address of the free memory on the main storage device of the system. (Configuration of Memory Acquisition Unit 20) The memory acquisition unit 20 includes an acquisition request reception unit 21 that receives a memory acquisition request from an application on the system for each task of an execution unit.
An acquisition availability determination unit 22 that determines whether the requested memory acquisition is executable, an acquisition failure notification unit 23 and an acquisition success notification unit 24 that notify the application of the results of whether the requested memory reservation is executable, It has a memory acquisition processing unit 25 for acquiring a memory area in the main memory according to the determined acquisition request.

【0022】獲得要求受付部21は、システム上で実行
中のアプリケーションからメモリ獲得要求を受け付け、
その内容を獲得可否判定部22に伝える。アプリケーシ
ョンからは、処理単位であるタスクの実行開始のたびに
要求が発行される。メモリ獲得要求には、実行開始しよ
うとするタスクに必要なメモリ領域の容量である「獲得
要求メモリ容量S」とメモリ予約装置10によって要求
元アプリケーション用に予約されたメモリ領域に付与さ
れた「予約メモリ識別子Ix(図2参照)」という2つ
のパラメータが付加されている。獲得要求受付部21
は、上記のパラメータを有する関数呼び出しの形でアプ
リケーションとリンクされ、割込み処理によってシステ
ムプログラムを起動するシステムライブラリの形で実現
される。
The acquisition request receiving unit 21 receives a memory acquisition request from an application running on the system,
The content is transmitted to the acquisition propriety determination unit 22. The application issues a request each time the task, which is a processing unit, starts executing. For the memory acquisition request, the “acquisition request memory capacity S” which is the capacity of the memory area required for the task to be executed, and the “reservation” given to the memory area reserved for the request source application by the memory reservation device 10. Two parameters "memory identifier Ix (see FIG. 2)" are added. Acquisition request reception unit 21
Is realized in the form of a system library that is linked with an application in the form of a function call having the above parameters and that activates a system program by interrupt processing.

【0023】獲得可否判定部22は、獲得要求受付部2
1が受け付けたメモリ獲得要求について、要求元アプリ
ケーション用に予約されたメモリの予約管理情報と、空
きメモリ管理部17が保持する空きメモリ容量Eの情報
とをもとに、実行の可否を判断する。獲得可否判定部2
2は、先ず第1段階(予約分メモリ獲得)の判定とし
て、予約メモリの残量(「予約メモリ容量Rx−獲得済
みメモリ容量Gx」)を基準として、新たに獲得要求さ
れた容量のメモリが予約メモリ残量の範囲で獲得できる
か否か判定する。予約メモリを使い切っていて獲得要求
に応じられない場合、獲得可否判定部22は、第2段階
(追加分メモリ獲得)の判定として、システムの空きメ
モリのうちから要求されたメモリ領域を獲得できないか
判定する。以下、さらに具体的に説明する。
The acquisition propriety determination unit 22 is an acquisition request reception unit 2
Regarding the memory acquisition request received by the first request, whether or not to execute can be determined based on the reservation management information of the memory reserved for the request source application and the information of the free memory capacity E held by the free memory management unit 17. . Acquisition propriety determination unit 2
In the second step, first, in the determination of the first stage (acquisition of reserved memory), based on the remaining amount of reserved memory (“reserved memory capacity Rx−acquired memory capacity Gx”), the memory of the newly requested capacity is determined. It is determined whether the reserved memory remaining amount can be acquired. When the reserved memory is used up and the acquisition request cannot be satisfied, the acquisition availability determination unit 22 determines whether the requested memory area can be acquired from the free memory of the system as the determination of the second step (additional memory acquisition). judge. Hereinafter, it will be described more specifically.

【0024】獲得可否判定部22は、先ず、獲得要求受
付部21から得た予約メモリ識別子Ixに対応する予約
管理情報を予約情報記憶部16内の予約管理情報テーブ
ル200から読み出す。そして、獲得要求受付部21か
ら得た「獲得要求メモリ容量S」と前記予約管理情報の
うち「獲得済みメモリ容量欄240の値(Gx)」との
和を、前記予約管理情報のうち「予約メモリ容量欄22
0の値(Rx)」と比較する。「S+Gx≦Rx」であ
れば、新たに容量Sのメモリ領域を獲得しても予約メモ
リ容量Rxの範囲内におさまるので、獲得可否判定部2
2は、当該メモリ獲得要求は実行可能と判定し、メモリ
獲得処理部25に、予約管理情報、獲得要求メモリ容量
Sを渡し、領域獲得処理の実行を指示する。
The acquisition availability determination unit 22 first reads the reservation management information corresponding to the reservation memory identifier Ix obtained from the acquisition request reception unit 21 from the reservation management information table 200 in the reservation information storage unit 16. Then, the sum of the “acquisition request memory capacity S” obtained from the acquisition request receiving unit 21 and the “value (Gx) of the acquired memory capacity column 240” of the reservation management information is the “reservation” of the reservation management information. Memory capacity column 22
0 value (Rx) ”. If “S + Gx ≦ Rx”, even if a memory area of the capacity S is newly acquired, it will fall within the range of the reserved memory capacity Rx. Therefore, the acquisition availability determination unit 2
2 determines that the memory acquisition request is executable, passes the reservation management information and the acquisition request memory capacity S to the memory acquisition processing unit 25, and instructs the memory acquisition processing unit 25 to execute the area acquisition process.

【0025】上の比較判定で、「S+Gx>Rx」とな
った場合、これは、要求された容量Sのメモリ領域を新
たに獲得すると予約メモリ容量Rxを超えてしまうこと
を示すので、獲得可否判定部22は、システム上の空き
メモリを使って要求分のメモリ領域が獲得できるか否か
判定する。ただし、空きメモリを使って予約分以上に獲
得できるメモリ領域はアプリケーション毎に予約管理情
報の「獲得限界メモリ容量欄230の値(Lx)」によ
って制限されているので、獲得可否判定部22は、先
ず、この限界値に基づくチェックを行う。具体的には、
獲得要求メモリ容量Sと獲得済みメモリ容量Gxとの和
を獲得限界メモリ容量Lxと比較する。「S+Gx>L
x」であれば、獲得要求通りに容量Sのメモリ領域を獲
得した場合、限界値を超えてしまうことになるので、獲
得可否判定部22は、空きメモリを使っても当該メモリ
獲得要求を実行することは不可と判定する。そして、獲
得失敗通知部23に指示して、要求元アプリケーション
に領域獲得の失敗を通知させる。
In the above comparison judgment, if "S + Gx>Rx", this means that if the memory area of the requested capacity S is newly acquired, it exceeds the reserved memory capacity Rx. The determination unit 22 determines whether or not the required memory area can be acquired by using the free memory on the system. However, since the memory area that can be acquired more than the reserved amount by using the free memory is limited by the “value (Lx) of the acquisition limit memory capacity column 230” of the reservation management information for each application, the acquisition availability determination unit 22 First, a check is performed based on this limit value. In particular,
The sum of the acquisition request memory capacity S and the acquired memory capacity Gx is compared with the acquisition limit memory capacity Lx. "S + Gx> L
In the case of “x”, if the memory area of the capacity S is acquired according to the acquisition request, the limit value will be exceeded. Therefore, the acquisition availability determination unit 22 executes the memory acquisition request even if the free memory is used. It is determined that it is impossible to do. Then, it instructs the acquisition failure notification unit 23 to notify the request source application of the area acquisition failure.

【0026】逆に、上の比較判定で、「S+Gx≦L
x」となった場合、これは、獲得要求通りに容量Sのメ
モリ領域を獲得しても、限界値の範囲内におさまること
を意味する。その場合、獲得可否判定部22は、システ
ムの空きメモリ容量Eの容量をチェックする。すなわ
ち、獲得要求メモリ容量Sを空きメモリ容量Eと比較
し、「S>E」であれば、要求された容量Sのメモリ領
域は現在の空きメモリの容量では獲得できないので、獲
得失敗通知部23に要求元アプリケーションの識別情報
を渡し、領域獲得の失敗を通知させる。一方、「S≦
E」であれば、システム上の空きメモリから獲得要求の
あった容量Sのメモリ領域を獲得できるので、獲得可否
判定部22は、メモリ獲得処理部25に、予約管理情
報、獲得要求メモリ容量Sを渡し、領域獲得処理の実行
を指示する。
On the contrary, in the above comparison judgment, "S + Gx≤L"
In the case of “x”, this means that even if the memory area of the capacity S is acquired according to the acquisition request, it is within the range of the limit value. In that case, the acquisition propriety determination unit 22 checks the free memory capacity E of the system. That is, the acquisition request memory capacity S is compared with the free memory capacity E. If “S> E”, the memory area of the requested capacity S cannot be acquired with the current free memory capacity. The identification information of the request source application is passed to and the area acquisition failure is notified. On the other hand, “S ≦
If it is “E”, the memory area of the requested capacity S can be acquired from the free memory on the system. Therefore, the acquisition permission / inhibition determination unit 22 notifies the memory acquisition processing unit 25 of the reservation management information and the acquisition request memory capacity S. To instruct execution of area acquisition processing.

【0027】獲得失敗通知部23は、獲得可否判定部2
2によって実行不能と判定された獲得要求について、要
求元アプリケーションにメモリ獲得の失敗を通知する。
獲得失敗通知部23が行う失敗通知の具体的方法として
は、前述の獲得要求受付部21に対する関数呼び出しに
応じる形で、特定の負の値のエラーコードを返す、とい
うものが考えられる。
The acquisition failure notifying section 23 is provided with the acquisition propriety judging section 2
Regarding the acquisition request determined to be unexecutable by 2, the request source application is notified of the memory acquisition failure.
As a specific method of the failure notification performed by the acquisition failure notification unit 23, it is conceivable to return a specific negative error code in response to the function call to the acquisition request reception unit 21 described above.

【0028】メモリ獲得処理部25は、獲得可否判定部
22からの指示に従い、実際にシステムの主記憶上にメ
モリ領域を獲得する。メモリ獲得処理部25は、獲得可
否判定部22から「予約管理情報」、「獲得要求メモリ
容量S」を取得し、空きメモリ管理部17からは、獲得
可能なメモリ領域のアドレスを読み出す。そして、獲得
メモリ容量Sが示す容量のメモリ領域を獲得すると、こ
の獲得したメモリ領域の先頭アドレスを指定情報として
獲得成功通知部23に送出する。
The memory acquisition processing section 25 actually acquires a memory area in the main memory of the system in accordance with the instruction from the acquisition possibility determination section 22. The memory acquisition processing unit 25 acquires “reservation management information” and “acquisition request memory capacity S” from the acquisition permission / inhibition determination unit 22, and reads the address of the memory area that can be acquired from the free memory management unit 17. When the memory area having the capacity indicated by the acquired memory capacity S is acquired, the start address of the acquired memory area is sent to the acquisition success notifying unit 23 as the designation information.

【0029】次いで、メモリ獲得処理部25は、獲得結
果に応じて予約管理情報と空きメモリ容量Eとを更新す
る。空きメモリ容量Eの値は「更新後の容量E=更新前
の容量E−獲得メモリ容量S」という形で更新する。さ
らに、予約管理情報のうち「獲得済みメモリ容量欄24
0」の値Gxを「更新後のGx=更新前のGx+獲得メ
モリ容量S」という形で更新する。
Next, the memory acquisition processing section 25 updates the reservation management information and the free memory capacity E according to the acquisition result. The value of the free memory capacity E is updated in the form of “capacity after update = capacity before update E−acquired memory capacity S”. Further, in the reservation management information, the “acquired memory capacity column 24
The value Gx of "0" is updated in the form of "Gx after update = Gx before update + acquired memory capacity S".

【0030】獲得成功通知部24は、メモリ獲得処理部
25から通知された要求元アプリケーションに対してメ
モリ獲得に成功した旨の通知を行う。そして同時に、メ
モリ獲得処理部25から得た獲得領域の指定情報(先頭
アドレス)を当該アプリケーションに返す。獲得成功通
知部24が行う成功通知の具体的方法としては、前述の
獲得要求受付部21に対する関数呼び出しに応じる形
で、特定の負でない値のエラーコードを、前記獲得領域
の指定情報と共に返す、というものが考えられる。 (動作)以下、本実施の形態におけるメモリ管理装置1
の動作について図面を参照しながら説明する。アプリケ
ーションごとにメモリ領域の予約を行う際の動作、予約
したメモリ領域から実行中のアプリケーションがタスク
単位でメモリ領域を実際に獲得する際の動作、に分けて
説明する。
The acquisition success notifying unit 24 notifies the request source application notified from the memory acquisition processing unit 25 that the memory acquisition has succeeded. At the same time, the designation information (start address) of the acquisition area obtained from the memory acquisition processing unit 25 is returned to the application. As a concrete method of the success notification performed by the acquisition success notification unit 24, a specific non-negative error code is returned together with the specification information of the acquisition region in response to the function call to the acquisition request reception unit 21 described above. Can be considered. (Operation) Hereinafter, the memory management device 1 according to the present embodiment
The operation will be described with reference to the drawings. The operation for reserving the memory area for each application and the operation for actually acquiring the memory area for each task by the running application from the reserved memory area will be described separately.

【0031】(予約時の動作)まず、メモリ予約時の動
作について説明する。図3は、メモリ管理装置1のメモ
リ予約処理の動作を示すフローチャートである。メモリ
予約は、メモリ管理装置1が含まれるシステムの起動時
に、システム上にあるアプリケーションに対して行われ
るとともに、インストールやダウンロードによって新た
なアプリケーションがシステムに追加される際にも、こ
の追加分のアプリケーションに対して行われる。
(Reservation Operation) First, the memory reservation operation will be described. FIG. 3 is a flowchart showing the operation of the memory reservation process of the memory management device 1. The memory reservation is performed for an application on the system when the system including the memory management device 1 is started up, and when a new application is added to the system by installation or download, the additional application is added. Done against.

【0032】先ず、予約要求受付部11が、1つのアプ
リケーションからメモリ予約要求を受け付ける(S30
1)。予約要求受付部11は、要求に付加された情報
(「予約メモリ容量Rx」、「獲得限界メモリ容量L
x」)を予約可否判定部12に渡し、当該要求の実行可
否を判定するよう指示する。予約可否判定部12は、空
きメモリ管理部17から、その時点での「空きメモリ容
量E」の値を得て、これを予約メモリ容量Rxと比較す
る(S302)。
First, the reservation request receiving unit 11 receives a memory reservation request from one application (S30).
1). The reservation request receiving unit 11 receives the information (“reserved memory capacity Rx”, “acquisition limit memory capacity L”) added to the request.
x ”) is passed to the reservation availability determination unit 12 to instruct to determine whether or not the request can be executed. The reservability determination unit 12 obtains the value of the "free memory capacity E" at that time from the free memory management unit 17 and compares this with the reserved memory capacity Rx (S302).

【0033】比較の結果が「Rx>E」であった場合、
すなわち、新たに予約を要求されたメモリ領域の容量よ
りも、現在予約可能な空きメモリの容量の方が小さい場
合(S303:No)、予約可否判定部12は、予約失敗
通知部13に指示して、要求元アプリケーションにメモ
リ予約失敗を通知させる(S307)。逆に、比較の結
果が「Rx≦E」であった場合、すなわち、現在予約可
能な空きメモリの容量が新たに予約を要求されたメモリ
の容量S以上であった場合(S303:Yes)、予約可
否判定部12は、予約情報登録部15に指示して、メモ
リ予約の具体的な処理を実行させる。
When the comparison result is "Rx>E",
In other words, if the currently reservable free memory capacity is smaller than the newly reserved memory area capacity (S303: No), the reservation availability determination unit 12 instructs the reservation failure notification unit 13. Then, the request source application is notified of the memory reservation failure (S307). On the contrary, when the comparison result is “Rx ≦ E”, that is, when the currently reservable free memory capacity is equal to or larger than the newly reserved memory capacity S (S303: Yes), The reservation availability determination unit 12 instructs the reservation information registration unit 15 to execute a specific process of memory reservation.

【0034】先ず、予約情報登録部15は、当該予約メ
モリ用の予約管理情報(図2参照)を生成して、予約情
報記憶部16が保持する予約管理情報テーブル200に
追加格納する(S304)。「予約メモリ容量欄22
0」には、予約要求に付加された「予約メモリ容量R
x」の値を、「獲得限界メモリ容量欄230」には、予
約要求に付加された「獲得限界メモリ容量Lx」の値を
それぞれ設定し、「獲得済みメモリ容量欄240」には
初期値の「0」を設定する。そして、ユニークな予約メ
モリ識別子Ixを「予約メモリ識別子欄210」に設定
する。
First, the reservation information registration unit 15 generates the reservation management information for the reservation memory (see FIG. 2) and additionally stores it in the reservation management information table 200 held by the reservation information storage unit 16 (S304). . "Reserved memory capacity column 22
"0" indicates the "reserved memory capacity R added to the reservation request.
x ", the" acquisition limit memory capacity column 230 "is set with the value of the" acquisition limit memory capacity Lx "added to the reservation request, and the" acquired memory capacity column 240 "is set to the initial value. Set "0". Then, the unique reserved memory identifier Ix is set in the "reserved memory identifier column 210".

【0035】さらに、予約情報登録部15は、空きメモ
リ管理部17が管理している空きメモリ容量Eを予約メ
モリ容量Rxの分だけ更新する(S305)。「更新後
のE=更新前のE−Rx」となる。そして最後に、予約
情報登録部15は、ステップS304で生成した予約メ
モリ識別子Ixを予約成功通知部14に送る。予約成功
通知部14は、メモリ予約に成功した旨の通知を、前記
予約メモリ識別子Ixとともに要求元アプリケーション
に送る(S306)。
Further, the reservation information registration unit 15 updates the free memory capacity E managed by the free memory management unit 17 by the reserved memory capacity Rx (S305). "E after update = E-Rx before update". Finally, the reservation information registration unit 15 sends the reservation memory identifier Ix generated in step S304 to the reservation success notification unit 14. The reservation success notifying unit 14 sends a notification that the memory reservation has been successful to the request source application together with the reserved memory identifier Ix (S306).

【0036】そして、上記のステップS301〜S30
7の処理は、メモリ予約の対象となるアプリケーション
全てに対して実行される(S308)。 (獲得時の動作)次いで、メモリ獲得時の動作について
説明する。図4は、1つのアプリケーションがタスク単
位でメモリ領域の獲得を要求してくるのに応じて、メモ
リ管理装置1が行う動作を示すフローチャートである。
Then, the above steps S301 to S30
The process of 7 is executed for all the applications for which the memory reservation is made (S308). (Operation at Acquisition) Next, the operation at memory acquisition will be described. FIG. 4 is a flowchart showing an operation performed by the memory management device 1 in response to one application requesting acquisition of a memory area in units of tasks.

【0037】先ず、獲得要求受付部21が、実行中のア
プリケーションから、タスクの実行開始などに伴なうタ
イミングでメモリ獲得要求を受け付ける。獲得要求受付
部21は、要求に付加された「予約メモリ識別子Ix」
(要求元アプリケーションが予約した予約メモリの識別
子)、獲得要求メモリ容量Sを獲得可否判定部22に送
り、要求された容量Sのメモリ領域が獲得可能か否かの
判定を指示する(S401)。
First, the acquisition request receiving section 21 receives a memory acquisition request from a running application at a timing accompanying the start of execution of a task. The acquisition request reception unit 21 uses the “reserved memory identifier Ix” added to the request.
(The identifier of the reserved memory reserved by the requesting application) and the acquisition request memory capacity S are sent to the acquisition permission / inhibition determination unit 22 to instruct whether or not the memory area of the requested capacity S can be acquired (S401).

【0038】これを受けて、獲得可否判定部22は、予
約メモリ識別子Ixをキーにして予約情報記憶部16が
保持する予約管理情報テーブル200から、要求元アプ
リケーションが予約していた予約メモリに関する予約管
理情報を取得する(S402)。そして先ず、第1の判
定処理として、獲得可否判定部22は、「獲得要求メモ
リ容量S」に「獲得済みメモリ容量Gx」を加えた値と
「予約メモリ容量Rx」と比較する。これは、要求元ア
プリケーションが予約したメモリ領域に、まだ獲得要求
メモリ容量Sの分だけメモリ領域を確保できるだけの余
りがあるか否かを判定するものである。
In response to this, the acquisition permission / inhibition decision unit 22 uses the reserved memory identifier Ix as a key to make a reservation regarding the reserved memory reserved by the requesting application from the reservation management information table 200 held in the reservation information storage unit 16. The management information is acquired (S402). Then, as a first determination process, the acquisition availability determination unit 22 compares the value obtained by adding the “acquired memory capacity Gx” to the “acquisition request memory capacity S” with the “reserved memory capacity Rx”. This is to determine whether or not the memory area reserved by the requesting application still has a sufficient memory area for the acquisition request memory capacity S.

【0039】「S+Gx≦Rx」であった場合、すなわ
ち、予約メモリ容量の残り部分から要求された容量Sの
メモリが獲得できる場合(S403:Yes)、獲得可否
判定部22はメモリ獲得処理部25に、ステップS40
2で得た予約管理情報、獲得要求メモリ容量Sを渡し、
メモリ獲得処理を実行させる。メモリ獲得処理部25は
先ず、空きメモリ管理部17から獲得可能なメモリ領域
のアドレスを取得し、当該領域から獲得メモリ容量Sが
示す容量のメモリ領域を獲得する。そして、獲得したメ
モリの先頭アドレスを獲得成功通知部24に送出する
(S407)。獲得成功通知部24は、受け取った獲得
メモリ領域の先頭アドレスを要求元アプリケーションに
送り、メモリ獲得に成功した旨を通知する(S40
8)。その後、メモリ獲得処理部25は、予約管理情報
のうち「獲得済みメモリ容量欄240」の値Gxを更新
する。更新の内容は、「更新後のGx=更新前のGx+
獲得メモリ容量S」となる(S409)。
When “S + Gx ≦ Rx”, that is, when the memory of the requested capacity S can be acquired from the remaining portion of the reserved memory capacity (S403: Yes), the acquisition availability determination unit 22 causes the memory acquisition processing unit 25 to perform the acquisition. Then, in step S40
Pass the reservation management information and the acquisition request memory capacity S obtained in 2,
Execute memory acquisition processing. The memory acquisition processing unit 25 first acquires an address of a memory area that can be acquired from the free memory management unit 17, and acquires a memory area having a capacity indicated by the acquisition memory capacity S from the area. Then, the acquired start address of the memory is sent to the acquisition success notification unit 24 (S407). The acquisition success notification unit 24 sends the start address of the received acquisition memory area to the request source application to notify that the memory acquisition has succeeded (S40).
8). After that, the memory acquisition processing unit 25 updates the value Gx of the “acquired memory capacity column 240” in the reservation management information. The content of the update is “Gx after update = Gx before update +
The acquired memory capacity is S ”(S409).

【0040】一方、ステップS403の判定で「S+G
x>Rx」であった場合、すなわち、予約メモリ容量の
範囲では要求された容量Sのメモリ領域が獲得できない
場合(S403:No)、獲得可否判定部22は、「獲得
要求メモリ容量S」に「獲得済みメモリ容量Gx」を加
えた値を、さらに「獲得限界メモリ容量Lx」と比較す
る。
On the other hand, in the determination of step S403, "S + G
x> Rx ”, that is, when the memory area of the requested capacity S cannot be acquired within the reserved memory capacity range (S403: No), the acquisition availability determination unit 22 sets“ acquisition request memory capacity S ”. The value obtained by adding the “acquired memory capacity Gx” is further compared with the “acquired limit memory capacity Lx”.

【0041】比較の結果が「S+Gx≦Lx」となった
場合は(S404:Yes)、今回要求のあった容量Sの
メモリを、システム内に容量Sを上回る空きメモリがあ
る場合に限って獲得できることを意味する。そこで、獲
得可否判定部22は先ず、空きメモリ管理部17からシ
ステム内の空きメモリ容量Eの情報を取得する。そし
て、空きメモリ容量Eを獲得要求メモリ容量Sと比較す
る(S405)。
When the comparison result is "S + Gx≤Lx" (S404: Yes), the memory of the requested capacity S is acquired only when the system has free memory exceeding the capacity S. It means that you can do it. Therefore, the acquisition availability determination unit 22 first acquires information on the free memory capacity E in the system from the free memory management unit 17. Then, the free memory capacity E is compared with the acquisition request memory capacity S (S405).

【0042】「S≦E」である場合、獲得要求されたメ
モリ容量Sよりも大きな空きメモリがシステムに残って
いるので、獲得可否判定部22はメモリ獲得処理部25
に指示して、ステップS407〜S409に示したメモ
リ獲得処理を実行させる。なお、この場合、メモリ獲得
処理部25はステップS407の処理に先立って、空き
メモリ容量Eの値を更新し、更新後の値を空きメモリ管
理部17に返す(S406)。更新処理は、「更新後の
E=更新前のE−S」となる。
If “S ≦ E”, there is a free memory larger than the memory capacity S requested to be acquired in the system, and therefore the acquisition availability determination unit 22 causes the memory acquisition processing unit 25.
To execute the memory acquisition process shown in steps S407 to S409. In this case, the memory acquisition processing section 25 updates the value of the free memory capacity E before the processing of step S407 and returns the updated value to the free memory management section 17 (S406). The update process is “E after update = ES before update”.

【0043】なお、ステップS404又はS405の判
定の結果、獲得要求された容量のメモリが獲得できない
場合、すなわち、ステップS404で比較結果が「S+
Gx>Lx」となった場合は(S404:No)、あるい
は、ステップS405で比較結果が「S>E」となった
場合(S405:No)、獲得可否判定部22は、獲得失
敗通知部23に指示し、要求元アプリケーションに獲得
失敗を通知させる(S410)。なお、この場合、獲得
可否判定部22は、獲得失敗の原因(S404でのエラ
ーか、S405でのエラーか)を示すエラーコードを獲
得失敗通知部23に渡すものとする。これは、S405
での獲得失敗が、システムの空きメモリの不足という、
その判定時点の状況によるものであるのに対し、ステッ
プS404での獲得失敗は、予約時に想定した「限界
値」を超えたメモリ要求をアプリケーションが行ったこ
とが原因だからである。前者の場合は実行中の他アプリ
ケーションを終了させるなどすれば対応できるが、後者
の現象は、当該アプリケーションに関するメモリ需要の
見積もりに誤りがあったこと、あるいはバグなどの障害
によって必要以上のメモリ要求が発行されたことを意味
するので、システムの見直しが必要となる。エラーコー
ドによってどちらの要因であるかを示せば、利用者又は
管理者が適切な処置を取る手がかりとなる。
As a result of the determination in step S404 or S405, if the memory of the requested capacity cannot be acquired, that is, the comparison result is "S +" in step S404.
Gx> Lx ”(S404: No) or the comparison result in step S405 is“ S> E ”(S405: No), the acquisition possibility determination unit 22 determines the acquisition failure notification unit 23. To notify the request source application of the acquisition failure (S410). In this case, the acquisition propriety determination unit 22 passes an error code indicating the cause of the acquisition failure (whether it is an error in S404 or an error in S405) to the acquisition failure notification unit 23. This is S405
The acquisition failure in is that the system has insufficient free memory,
The reason for this is that the acquisition failure in step S404 is due to the application making a memory request that exceeds the "limit value" assumed at the time of reservation, while it depends on the situation at the time of the determination. In the case of the former, it can be dealt with by terminating other applications that are running, but in the case of the latter, there is an error in the estimation of the memory demand for the application, or an excessive memory request occurs due to a failure such as a bug. Since it means that it has been issued, it is necessary to review the system. If the error code indicates which factor is the cause, the user or administrator will be able to take appropriate action.

【0044】以上のステップS401〜S410の処理
は、当該要求元アプリケーションが終了するまで繰り返
される(S411)。なお、本図には示していないが、
上記の処理の途中で、先に実行されていたタスクが終了
して、当該タスクの実行用に獲得されたメモリの解放が
行われる場合がある。その時は、解放に伴なって予約メ
モリ管理情報(獲得済みメモリ容量Gx)や空きメモリ
容量Eの更新が行われる。これを行うのはメモリ獲得処
理部25であり、いずれも開放されたメモリ領域の容量
分だけ増加する形で値が更新される。 (まとめ)上記の通り、本実施の形態のメモリ管理装置
は、アプリケーションが予約するメモリ領域の容量につ
いて、基準となる予約メモリ容量Rxに加え、実行時点
でのシステム上の空きメモリ容量に応じて予約メモリ容
量Rxに上乗せして獲得できるメモリ容量を獲得限界メ
モリ容量Lxとして定めておく。そして、アプリケーシ
ョンの実行時、アプリケーションの同時に使用するメモ
リの容量合計が予約メモリ容量Rxを超える状況で、新
たにメモリ領域獲得要求を受けた場合でも、システムに
充分な空きメモリがあれば、前記獲得限界メモリ容量L
xを上限として、メモリ領域を獲得する。よって、アプ
リケーションは、予約分のメモリ領域を確実に利用でき
るとともに、空きメモリを有効に使用することができ
る。
The above steps S401 to S410 are repeated until the request source application is completed (S411). Although not shown in this figure,
In the middle of the above process, the task that was previously executed may be terminated and the memory acquired for the execution of the task may be released. At that time, the reserved memory management information (acquired memory capacity Gx) and the free memory capacity E are updated along with the release. This is performed by the memory acquisition processing unit 25, and the value is updated in such a manner as to increase by the capacity of the released memory area. (Summary) As described above, the memory management device according to the present embodiment determines the capacity of the memory area reserved by the application in addition to the reference reserved memory capacity Rx and the free memory capacity on the system at the time of execution. A memory capacity that can be acquired by adding the reserved memory capacity Rx is defined as an acquisition limit memory capacity Lx. When an application is executed and the total memory capacity used simultaneously by the applications exceeds the reserved memory capacity Rx, even if a new memory area acquisition request is received, if the system has sufficient free memory, the acquisition is performed. Limit memory capacity L
A memory area is acquired with x being the upper limit. Therefore, the application can reliably use the reserved memory area and can effectively use the free memory.

【0045】なお、ここではメモリ管理装置について
は、プログラムとして実現可能である。また、管理の対
象を主記憶装置のメモリとして説明したが補助記憶装置
など他の記憶装置にも適用することが可能である。な
お、上の説明では、アプリケーション実行時に必要とな
るメモリ領域について説明したが、セマフォなどソフト
ウェア資源の動的生成に伴なって必要となるメモリ領域
(制御ブロック用のメモリ領域など)の予約、獲得につ
いても、同様の構成で対応できる。その場合、予約の主
体はソフトウェア資源の動的生成を要求するアプリケー
ションとなり、獲得は、当該アプリケーションが実行時
に動的生成を要求するタイミングで行われる。
The memory management device can be implemented as a program here. Further, although the target of management has been described as the memory of the main storage device, it can be applied to other storage devices such as an auxiliary storage device. In the above explanation, the memory area required for executing the application was explained, but the reservation and acquisition of the memory area (memory area for control block etc.) required for the dynamic generation of software resources such as semaphores. The same configuration can be applied to the above. In this case, the main entity of the reservation is the application requesting the dynamic generation of the software resource, and the acquisition is performed at the timing when the application requests the dynamic generation at the execution.

【0046】以下、本実施の形態のメモリ管理装置1
が、ソフトウェア資源動的生成の一例として、排他制御
機能を担うセマフォのためのメモリ領域に対する予約、
獲得を行う場合について説明する。上記の説明と異なる
のは、獲得されるメモリ領域がアプリケーションによっ
て直接使用されるものではなく、セマフォ管理ブロック
用である点のみである。
Hereinafter, the memory management device 1 of the present embodiment
However, as an example of dynamic generation of software resources, a reservation for a memory area for a semaphore that has an exclusive control function,
The case of acquisition will be described. The only difference from the above description is that the acquired memory area is not used directly by the application but for the semaphore management block.

【0047】図5は、セマフォ生成用のメモリ領域を予
約メモリ領域から獲得するメモリ管理装置1を、獲得要
求元のセマフォ生成装置30と共に示す図である。メモ
リ管理装置1は、実施の形態に示したメモリ予約部1と
同じ構成を有し、各構成部の処理内容も基本的に同一で
ある。ただし、獲得要求はアプリケーションからメモリ
獲得部20に発行されるのでなく、セマフォ生成の主体
となるアプリケーションから指示を受けたセマフォ生成
装置30からメモリ獲得部20に対して発行される。
FIG. 5 is a diagram showing the memory management device 1 for acquiring the memory area for semaphore generation from the reserved memory area together with the semaphore generation device 30 which is the acquisition request source. The memory management device 1 has the same configuration as the memory reservation unit 1 shown in the embodiment, and the processing content of each component is basically the same. However, the acquisition request is not issued to the memory acquisition unit 20 from the application, but is issued to the memory acquisition unit 20 from the semaphore generation device 30 instructed by the application that is the main body of the semaphore generation.

【0048】セマフォ生成装置30は、アプリケーショ
ンのいずれかからセマフォの動的生成の要求を受け付け
ると、メモリ管理装置1に要求してセマフォ管理ブロッ
ク用のメモリ領域を獲得させ、そのメモリ領域にセマフ
ォ管理情報の初期値を設定した上で、当該メモリ領域
(管理ブロック)に割り当てたユニークな識別情報(I
D)を要求元アプリケーションに返す。セマフォ生成装
置30は、セマフォ生成要求受付部31、セマフォ生成
失敗通知部32、セマフォ生成部33を有する。
When the semaphore generation device 30 receives a request for dynamic generation of a semaphore from any of the applications, the semaphore management device 1 requests the memory management device 1 to acquire a memory area for the semaphore management block, and manages the semaphore in the memory area. After setting the initial value of the information, the unique identification information (I
D) is returned to the requesting application. The semaphore generation device 30 includes a semaphore generation request reception unit 31, a semaphore generation failure notification unit 32, and a semaphore generation unit 33.

【0049】セマフォ生成要求受付部31は、アプリケ
ーションから新たなセマフォ資源の生成要求を受け付け
ると、これに基づいたメモリ獲得要求をメモリ獲得部2
0に発行する。この獲得要求には、要求元アプリケーシ
ョン用の「予約メモリ識別子Ix」、「獲得メモリ容量
S」(ここでは、当該セマフォの制御ブロック用のメモ
リ領域容量)を付加する。セマフォ生成要求受付部31
の実体は、例えば、動的生成しようとするセマフォの属
性やその他情報、および予約メモリ識別子Ixを引数と
する関数呼び出しの形でアプリケーションとリンクさ
れ、割込み処理によってシステムプログラムを起動する
システムライブラリの形で実現できる。
Upon receiving a new semaphore resource generation request from the application, the semaphore generation request reception unit 31 issues a memory acquisition request based on this request to the memory acquisition unit 2.
Issue to 0. A "reserved memory identifier Ix" for the request source application and an "acquired memory capacity S" (here, the memory area capacity for the control block of the semaphore in question) are added to the acquisition request. Semaphore generation request reception unit 31
The entity of is linked with the application in the form of a function call with the semaphore attribute and other information to be dynamically created and the reserved memory identifier Ix as an argument, and is in the form of a system library that activates the system program by interrupt processing. Can be achieved with.

【0050】セマフォ生成失敗通知部32は、セマフォ
生成要求受付部31が発行したメモリ領域獲得要求に対
してメモリ獲得部20(獲得失敗通知部23)からメモ
リ獲得不可を示す信号が送出されてきた場合に、要求元
アプリケーションに対してセマフォ資源の動的生成失敗
の通知を行う。セマフォ生成失敗通知部32の実体とし
ては、例えば、前述のセマフォ生成要求受付部31の例
であげたのと同様のものが考えられる。ただし、ここで
は関数呼び出しに対して負の値の特定のエラーコード
(失敗を示すもの)を返す。
In response to the memory area acquisition request issued by the semaphore generation request reception section 31, the semaphore generation failure notification section 32 sends a signal indicating that memory acquisition is impossible from the memory acquisition section 20 (acquisition failure notification section 23). In this case, the request source application is notified of the failure to dynamically create the semaphore resource. As the substance of the semaphore generation failure notifying unit 32, for example, the same one as the example of the semaphore generation request receiving unit 31 described above can be considered. However, here, a specific error code with a negative value (indicating failure) is returned to the function call.

【0051】セマフォ生成部33は、メモリ獲得部20
(獲得成功通知部24)からメモリ獲得の通知が送出さ
れてきた場合に、通知とともに送られてくるメモリ領域
の指定情報(アドレス)が指し示すメモリ領域に、セマ
フォ管理情報の初期値を格納した上で、要求元アプリケ
ーションに対してセマフォ資源の動的生成が成功した旨
の通知を行う。通知には当該管理ブロックのユニークな
識別情報を付加しておく。セマフォ生成部33の実体と
しては、例えば、前述のセマフォ生成要求受付部31で
あげたのと同様のものが考えられる。ただし、ここでは
関数呼び出しに対して負でない値の特定のエラーコード
(成功を示すもの)を返す。
The semaphore generator 33 has a memory acquisition unit 20.
When a memory acquisition notification is sent from the (acquisition success notification unit 24), the initial value of the semaphore management information is stored in the memory area indicated by the specified information (address) of the memory area sent together with the notification. Then, it notifies the request source application that dynamic generation of the semaphore resource has succeeded. Unique identification information of the management block is added to the notification. As the substance of the semaphore generation unit 33, for example, the same ones as those mentioned above in the semaphore generation request reception unit 31 can be considered. However, here, a specific non-negative error code (indicating success) is returned to the function call.

【0052】なお、上の説明では、セマフォ管理ブロッ
ク用のメモリ領域は、他のメモリ領域と一括して予約さ
れたものとしたが、セマフォなど資源動的生成機能に関
するメモリ領域は別個に予約することとしてもよい。な
お、ここではセマフォ動的生成装置についてのみ説明を
行ったが、アプリケーションの実行単位であるプロセス
やタスク、プロセス間通信機能、メモリ管理機能といっ
たOSに付随するすべてのソフトウェア資源の動的生成
機構もセマフォ動的生成装置30の部分をほぼ同等の機
能を担う他の物に入れ替えることで同様に実現できる。
In the above description, the memory area for the semaphore management block is reserved together with other memory areas, but the memory area for the resource dynamic generation function such as the semaphore is reserved separately. It may be that. Although only the semaphore dynamic generation device has been described here, a dynamic generation mechanism for all software resources associated with the OS, such as processes and tasks that are execution units of applications, interprocess communication functions, and memory management functions, is also included. The same can be achieved by replacing the part of the semaphore dynamic generation device 30 with another object having substantially the same function.

【0053】また、メモリ領域の予約のタイミングは、
上記の説明ではシステム起動時としているが、システム
の構築時に全アプリケーションに対して、あるいは、シ
ステム上で新たなアプリケーションが起動する度に個々
のアプリケーション毎に、行うこととしてもよい。ま
た、上記の実施の形態において、予約メモリ容量を超え
た容量のメモリ領域をアプリケーション用に確保する場
合の上限値は、アプリケーション側で予約時に設定した
獲得限界メモリ容量によって決まるものとしているが、
メモリ管理装置側で上限値を決めることも考えられる。
例えば、「空きメモリ容量の半分」、「空きメモリ容量
を起動中アプリケーションの個数で割った値」などを上
限値とすることが考えられる。
The timing for reserving the memory area is
In the above description, the system is started up, but it may be performed for all applications when the system is constructed, or for each individual application each time a new application is started up on the system. Further, in the above-described embodiment, the upper limit value when allocating a memory area having a capacity exceeding the reserved memory capacity for an application is determined by the acquisition limit memory capacity set at the time of reservation on the application side.
It is also possible to determine the upper limit value on the memory management device side.
For example, it is conceivable that "half the free memory capacity", "a value obtained by dividing the free memory capacity by the number of running applications", and the like are set as the upper limit values.

【0054】また、上記の実施の形態において、メモリ
予約は個々のアプリケーション単位で行うこととしてい
るが、複数アプリケーションで一括してメモリ予約を行
うことも考えられる。例えば、他のアプリケーションか
ら呼び出される形でのみ実行されるアプリケーションに
ついては、呼び出し元のアプリケーション用のメモリ領
域と一括して予約することにしてもよい。また、並行し
て同時に実行される可能性のない複数のアプリケーショ
ンがある場合、これらアプリケーションには1つの予約
メモリ領域を共有させることができる。
Further, in the above embodiment, the memory reservation is made for each individual application, but it is also possible to make the memory reservation collectively for a plurality of applications. For example, an application that is executed only by being called by another application may be reserved together with the memory area for the calling application. Also, if there are multiple applications that may not be executed concurrently in parallel, these applications can share one reserved memory area.

【0055】また、本実施の形態におけるメモリ管理処
理には、アプリケーション毎に設定されている優先度を
利用した形の変形例が考えられる。例えば、優先度の高
いアプリケーション用にメモリ領域予約を行おうとして
空きメモリ不足が発生した場合、優先度の低いアプリケ
ーション用に既に予約済みのメモリ領域の一部又は全部
について予約を取り消して、優先度の高いアプリケーシ
ョンのメモリ予約を実行する、という処理方法が考えら
れる。あるいは、優先度の高いアプリケーションの実行
中に必要となったメモリ領域の領域が予約メモリ容量内
に収まらず、しかも、空きメモリを利用しても足りない
場合、優先度の低いアプリケーションの予約メモリの一
部又は全部について予約を取り消し、優先度の高いアプ
リケーションのメモリ獲得を実行する、という処理方法
が考えられる。このようにすれば、優先度の高いアプリ
ケーションは確実にメモリの予約、獲得を行うことがで
きる。
Further, in the memory management processing of this embodiment, a modification in which the priority set for each application is used can be considered. For example, if a free memory shortage occurs when you try to reserve a memory area for a high-priority application, cancel the reservation for some or all of the memory areas already reserved for the low-priority application, and A processing method of executing a memory reservation of a high application can be considered. Alternatively, if the memory area required during the execution of a high-priority application does not fit within the reserved memory capacity and the free memory is insufficient, the reserved memory of the low-priority application A processing method of canceling reservations for some or all of them and executing memory acquisition for high-priority applications can be considered. By doing so, the application with high priority can reliably reserve and acquire the memory.

【0056】また、本実施の形態では、予約、獲得され
る空きメモリが1つの場合を例に説明しているが、複数
の空きメモリからメモリ領域の予約、獲得を行うことも
可能である。その場合、本実施の形態の空きメモリ管理
部は、空きメモリ管理情報を空きメモリの数だけ保持
し、メモリ予約、メモリ獲得時に要求やその応答には、
予約、獲得される空きメモリのIDをパラメータなどと
して付加する。
In the present embodiment, the case where one free memory is reserved and acquired is explained as an example, but it is also possible to reserve and acquire a memory area from a plurality of free memories. In that case, the free memory management unit of the present embodiment holds free memory management information by the number of free memories, and when requesting or responding to a memory reservation or memory acquisition,
The ID of the reserved and acquired free memory is added as a parameter.

【0057】[0057]

【発明の効果】以上の説明から明らかな通り、本発明の
メモリ管理装置は、アプリケーションが動作するコンピ
ュータシステム上で、アプリケーション実行時に使用さ
れるメモリ領域を管理するメモリ管理装置であって、ア
プリケーションの実行前に、前記アプリケーション用に
予め保証される予約メモリ容量の予約を受け付ける予約
受付手段と、前記アプリケーションの実行開始後に当該
アプリケーションが処理実行に伴って使用する実行用メ
モリ領域を、前記予約メモリ容量の範囲内で獲得する予
約分メモリ獲得手段と、前記コンピュータシステム上の
メモリ資源に関し、アプリケーション用に予約も獲得も
されていない空きメモリの容量を管理する空きメモリ管
理手段と、前記アプリケーションが前記予約メモリ容量
を超えてメモリ領域を使用しようとする場合に前記空き
メモリの容量を参照し、前記空きメモリの容量に応じて
前記空きメモリから追加のメモリ領域を獲得する追加分
メモリ獲得手段と、を有することを特徴とする。
As is apparent from the above description, the memory management device of the present invention is a memory management device that manages a memory area used when an application is executed on a computer system in which the application operates. A reservation accepting unit that accepts a reservation of a reserved memory capacity that is guaranteed in advance for the application before execution, and an execution memory area used by the application for execution of processing after the execution of the application is used as the reserved memory capacity. Reserved memory acquisition means for acquiring within the range of, and free memory management means for managing the amount of free memory that has not been reserved or acquired for an application with respect to the memory resources on the computer system; The memory area is exceeded It refers to the capacity of the free memory when attempting to use, and having a a further portion memory acquisition means for acquiring additional memory area from the free memory in accordance with the capacity of the free memory.

【0058】この構成によれば、アプリケーションに対
し、必要な容量のメモリ領域を予約メモリ容量として確
保すると共に、実行時のシステム上の空きメモリの状態
に応じて獲得できるメモリ容量を上乗せすることができ
るので、必要なメモリ領域を確保したうえでシステム上
のメモリ資源を効率よく使用することができる。特に、
限られた容量の主記憶を用いて処理を行う必要があるシ
ステムにおいて効果は顕著になる。
According to this structure, the required memory area can be secured as the reserved memory capacity for the application, and the memory capacity that can be acquired according to the state of the free memory on the system at the time of execution can be added. Therefore, it is possible to efficiently use the memory resources on the system after securing the necessary memory area. In particular,
The effect is remarkable in a system that needs to perform processing using a limited capacity of main memory.

【0059】なお、この効果は、アプリケーションが動
作するコンピュータシステム上で、前記アプリケーショ
ンの実行前に、前記アプリケーション用に予め保証され
る予約メモリ容量の予約を受け付けておいて、前記アプ
リケーション実行時にメモリ領域を獲得するメモリ管理
装置であって、前記アプリケーションが処理実行に伴っ
て使用する実行用メモリ領域を、前記予約メモリ容量の
範囲内で獲得する予約分メモリ獲得手段と、前記コンピ
ュータシステム上のメモリ資源に関し、アプリケーショ
ン用に予約も獲得もされていない空きメモリの容量を管
理する空きメモリ管理手段と、前記アプリケーションが
前記予約メモリ容量を超えてメモリ領域を使用しようと
する場合に前記空きメモリの容量を参照し、前記空きメ
モリの容量に応じて前記空きメモリから追加のメモリ領
域を獲得する追加分メモリ獲得手段と、を有することを
特徴とするメモリ管理装置、によっても実現できる。
It should be noted that this effect is that, on the computer system in which the application operates, a reservation of the reserved memory capacity guaranteed in advance for the application is accepted before the application is executed, and the memory area is reserved when the application is executed. A memory management device for acquiring an execution memory area used by the application for execution of processing within a range of the reserved memory capacity, and a memory resource on the computer system. With regard to the above, regarding free memory management means for managing the amount of free memory that has not been reserved or acquired for an application, and the free memory capacity when the application tries to use a memory area exceeding the reserved memory capacity. Refer to, depending on the amount of free memory It is realized by the memory management device, characterized by having a a further portion memory acquisition means for acquiring additional memory area from the free memory.

【0060】また、前記予約受付手段は、更に、獲得限
界メモリ容量を受け付け、前記追加分メモリ獲得手段
は、前記予約メモリ容量を超えたメモリ領域について
は、前記獲得限界メモリ容量の範囲内で獲得する、とす
ることもできる。この構成によれば、1つのアプリケー
ションが獲得できるメモリ領域の総容量は獲得限界メモ
リ容量によって制限されるので、特定のアプリケーショ
ンが空きメモリを独占的に使用する事態は発生せず、複
数のアプリケーションが空きメモリを有効利用できる。
Further, the reservation receiving means further receives the acquisition limit memory capacity, and the additional memory acquiring means acquires the memory area exceeding the reservation memory capacity within the acquisition limit memory capacity. Yes, you can. With this configuration, the total capacity of the memory area that can be acquired by one application is limited by the acquisition limit memory capacity, so that a situation in which a specific application does not exclusively use the free memory does not occur, Free memory can be effectively used.

【0061】なお、上記の効果は、アプリケーションが
動作するコンピュータシステム上で、前記アプリケーシ
ョンの実行前に、前記アプリケーション用に予め保証さ
れる予約メモリ容量の予約を受け付けておいて、前記ア
プリケーション実行時にメモリ領域を獲得するメモリ管
理装置であって、アプリケーションの実行前に、前記ア
プリケーション用に予め保証される予約メモリ容量と、
アプリケーション用に予約も獲得もされていない空きメ
モリの範囲内で前記予約メモリ容量を超えてメモリ領域
を獲得する場合の上限値である獲得限界メモリ容量とを
受け付ける予約受付手段を有することを特徴とするメモ
リ管理装置、によっても実現できる。
It should be noted that the above effect is that, on the computer system in which the application operates, the reservation of the reserved memory capacity guaranteed for the application is accepted before the application is executed, and the memory is stored when the application is executed. A memory management device for acquiring an area, and a reserved memory capacity guaranteed in advance for the application before executing the application,
Reservation receiving means for receiving an acquisition limit memory capacity which is an upper limit value when the memory area is acquired beyond the reserved memory capacity within the range of free memory not reserved or acquired for the application, It can also be realized by a memory management device that operates.

【0062】また、具体的には、前記アプリケーション
の処理に必要なメモリ領域とは、アプリケーションが処
理実行に直接使用する第1のメモリ領域、および、アプ
リケーションが処理実行のために利用するソフトウェア
資源動的生成装置のために必要となる第2のメモリ領域
のうち少なくとも一方である、とすることもできる。こ
れによれば、アプリケーションの実行に直接使用される
メモリ領域についても、セマフォなどソフトウェア資源
の動的生成に伴なって必要となるメモリ領域(制御ブロ
ック用のメモリ領域など)についても、上記の効果が得
られる。
Further, specifically, the memory area required for the processing of the application is the first memory area directly used by the application for executing the processing, and the software resource operation used by the application for executing the processing. It may be at least one of the second memory areas required for the dynamic generation device. According to this, the above effect can be achieved for the memory area directly used for executing the application as well as the memory area (memory area for the control block, etc.) necessary for dynamically generating software resources such as semaphores. Is obtained.

【0063】また、同様の効果は、アプリケーションが
動作するコンピュータシステム上で、アプリケーション
実行時に使用されるメモリ領域を管理するメモリ管理方
法であって、アプリケーションの実行前に、前記アプリ
ケーション用に予め保証される予約メモリ容量の予約を
受け付ける予約受付ステップと、前記アプリケーション
の実行開始後に当該アプリケーションが処理実行に伴っ
て使用する実行用メモリ領域を、前記予約メモリ容量の
範囲内で獲得する予約分メモリ獲得ステップと、前記コ
ンピュータシステム上のメモリ資源に関し、アプリケー
ション用に予約も獲得もされていない空きメモリの容量
を算出する空きメモリ算出ステップと、前記アプリケー
ションが前記予約メモリ容量を超えてメモリ領域を使用
しようとする場合に前記空きメモリの容量を参照し、前
記空きメモリの容量に応じて前記空きメモリから追加の
メモリ領域を獲得する追加分メモリ獲得ステップと、を
有することを特徴とする方法、によっても実現できる。
A similar effect is a memory management method for managing a memory area used at the time of executing an application on a computer system in which the application operates, and is guaranteed in advance for the application before the execution of the application. A reservation acceptance step of accepting a reservation of a reserved memory capacity to be reserved, and a reserved memory acquisition step of acquiring an execution memory area used by the application after the execution of the application for processing execution within the range of the reserved memory capacity. A free memory calculating step for calculating the amount of free memory that has not been reserved or acquired for an application with respect to the memory resources on the computer system; and the application tries to use a memory area exceeding the reserved memory capacity. When to The reference to the amount of free memory, the method characterized by having a a further portion memory acquisition step to acquire additional memory area from the free memory in accordance with the capacity of the free memory can be realized by.

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

【図1】本発明に関わるメモリ管理装置の実施の形態に
おける構成を関連する外部構成と共に示す図である。
FIG. 1 is a diagram showing a configuration in an embodiment of a memory management device according to the present invention together with a related external configuration.

【図2】同実施の形態における予約管理情報テーブルの
構成と内容とを示す図である。
FIG. 2 is a diagram showing a configuration and contents of a reservation management information table according to the same embodiment.

【図3】同実施の形態におけるメモリ管理装置のメモリ
予約時の動作を示すフローチャートである。
FIG. 3 is a flowchart showing an operation at the time of memory reservation of the memory management device according to the same embodiment.

【図4】同実施の形態におけるメモリ管理装置のメモリ
獲得時の動作を示すフローチャートである。
FIG. 4 is a flowchart showing an operation when a memory is acquired by the memory management device according to the same embodiment.

【図5】同実施の形態におけるメモリ管理装置につい
て、セマフォ用にメモリ領域を獲得する場合の構成を示
す図である。
FIG. 5 is a diagram showing a configuration of the memory management device according to the embodiment when a memory area is acquired for a semaphore.

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

1 メモリ管理装置 10 メモリ予約部 11 予約要求受付部 12 予約可否判定部 13 予約失敗通知部 14 予約成功通知部 15 予約情報登録部 16 予約情報記憶部 17 空きメモリ管理部 20 メモリ獲得部 21 獲得要求受付部 22 獲得可否判定部 23 獲得失敗通知部 24 獲得成功通知部 25 メモリ獲得処理部 30 セマフォ生成装置 31 セマフォ生成要求受付部 32 セマフォ生成失敗通知部 33 セマフォ生成成功通知部 1 Memory management device 10 Memory reservation section 11 Reservation request reception section 12 Reservation availability judgment section 13 Reservation failure notification section 14 Reservation success notification section 15 Reservation information registration section 16 Reservation information storage section 17 Free memory management unit 20 memory acquisition unit 21 Acquisition Request Reception Unit 22 Acquirability determination unit 23 Acquisition failure notification section 24 Acquisition success notification section 25 Memory acquisition processing unit 30 Semaphore generator 31 Semaphore generation request reception unit 32 Semaphore generation failure notification section 33 Semaphore generation success notification unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 大和田 清志 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 Fターム(参考) 5B060 AA06 AA09 AC05    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Kiyoshi Owada             1006 Kadoma, Kadoma-shi, Osaka Matsushita Electric             Sangyo Co., Ltd. F-term (reference) 5B060 AA06 AA09 AC05

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 アプリケーションが動作するコンピュー
タシステム上で、アプリケーション実行時に使用される
メモリ領域を管理するメモリ管理装置であって、 アプリケーションの実行前に、前記アプリケーション用
に予め保証される予約メモリ容量の予約を受け付ける予
約受付手段と、 前記アプリケーションの実行開始後に当該アプリケーシ
ョンが処理実行に伴って使用する実行用メモリ領域を、
前記予約メモリ容量の範囲内で獲得する予約分メモリ獲
得手段と、 前記コンピュータシステム上のメモリ資源に関し、アプ
リケーション用に予約も獲得もされていない空きメモリ
の容量を管理する空きメモリ管理手段と、 前記アプリケーションが前記予約メモリ容量を超えてメ
モリ領域を使用しようとする場合に前記空きメモリの容
量を参照し、前記空きメモリの容量に応じて前記空きメ
モリから追加のメモリ領域を獲得する追加分メモリ獲得
手段と、を有すること、 を特徴とするメモリ管理装置。
1. A memory management device that manages a memory area used when an application is executed on a computer system in which the application runs, wherein a reserved memory capacity guaranteed in advance for the application before the application is executed. Reservation accepting means for accepting a reservation, and an execution memory area used by the application for execution of processing after the execution of the application is started,
A reserved memory acquisition unit that acquires within the reserved memory capacity range; an empty memory management unit that manages the amount of free memory that has not been reserved or acquired for an application with respect to the memory resources on the computer system; When the application tries to use the memory area beyond the reserved memory capacity, the free memory capacity is referred to, and an additional memory area is acquired from the free memory according to the free memory capacity. A memory management device comprising:
【請求項2】 前記予約受付手段は、更に、獲得限界メ
モリ容量を受け付け、 前記追加分メモリ獲得手段は、前記予約メモリ容量を超
えたメモリ領域については、前記獲得限界メモリ容量の
範囲内で獲得すること、 を特徴とする請求項1に記載のメモリ管理装置。
2. The reservation receiving means further receives an acquisition limit memory capacity, and the additional memory acquisition means acquires a memory area exceeding the reserved memory capacity within the acquisition limit memory capacity. The memory management device according to claim 1, wherein:
【請求項3】 前記アプリケーションの処理に必要なメ
モリ領域とは、アプリケーションが処理実行に直接使用
する第1のメモリ領域、および、アプリケーションが処
理実行のために利用するソフトウェア資源動的生成装置
のために必要となる第2のメモリ領域のうち少なくとも
一方であること、 を特徴とする請求項1又は2に記載のメモリ管理装置。
3. The memory area required for the processing of the application is a first memory area used directly by the application for processing execution, and a software resource dynamic generation device used by the application for processing execution. The memory management device according to claim 1 or 2, wherein the memory management device is at least one of the second memory areas required for the above.
【請求項4】 アプリケーションが動作するコンピュー
タシステム上で、アプリケーション実行時に使用される
メモリ領域を管理するメモリ管理方法であって、 アプリケーションの実行前に、前記アプリケーション用
に予め保証される予約メモリ容量の予約を受け付ける予
約受付ステップと、 前記アプリケーションの実行開始後に当該アプリケーシ
ョンが処理実行に伴って使用する実行用メモリ領域を、
前記予約メモリ容量の範囲内で獲得する予約分メモリ獲
得ステップと、 前記コンピュータシステム上のメモリ資源に関し、アプ
リケーション用に予約も獲得もされていない空きメモリ
の容量を算出する空きメモリ算出ステップと、 前記アプリケーションが前記予約メモリ容量を超えてメ
モリ領域を使用しようとする場合に前記空きメモリの容
量を参照し、前記空きメモリの容量に応じて前記空きメ
モリから追加のメモリ領域を獲得する追加分メモリ獲得
ステップと、を有すること、 を特徴とするメモリ管理装置。
4. A memory management method for managing a memory area used at the time of executing an application on a computer system in which the application operates, wherein a reserved memory capacity guaranteed in advance for the application before the application is executed. A reservation receiving step for receiving a reservation, and an execution memory area used by the application for execution of processing after the execution of the application is started,
A reserved memory acquisition step of acquiring within the reserved memory capacity range; a free memory calculation step of calculating a free memory capacity not reserved or acquired for an application with respect to the memory resources on the computer system; When the application tries to use the memory area beyond the reserved memory capacity, the free memory capacity is referred to, and an additional memory area is acquired from the free memory according to the free memory capacity. A memory management device, comprising:
【請求項5】 アプリケーションが動作するコンピュー
タシステム上で、前記アプリケーションの実行前に、前
記アプリケーション用に予め保証される予約メモリ容量
の予約を受け付けておいて、前記アプリケーション実行
時にメモリ領域を獲得するメモリ管理装置であって、 前記アプリケーションが処理実行に伴って使用する実行
用メモリ領域を、前記予約メモリ容量の範囲内で獲得す
る予約分メモリ獲得手段と、 前記コンピュータシステム上のメモリ資源に関し、アプ
リケーション用に予約も獲得もされていない空きメモリ
の容量を管理する空きメモリ管理手段と、 前記アプリケーションが前記予約メモリ容量を超えてメ
モリ領域を使用しようとする場合に前記空きメモリの容
量を参照し、前記空きメモリの容量に応じて前記空きメ
モリから追加のメモリ領域を獲得する追加分メモリ獲得
手段と、を有すること、 を特徴とするメモリ管理装置。
5. A memory for accepting a reservation of a reserved memory capacity guaranteed in advance for the application before executing the application on a computer system in which the application runs and acquiring a memory area when the application is executed. A management apparatus, which comprises a reserved memory acquisition unit for acquiring an execution memory area used by the application in executing a process within a range of the reserved memory capacity, and a memory resource on the computer system for an application. A free memory management unit that manages a free memory capacity that is neither reserved nor acquired, and refers to the free memory capacity when the application tries to use a memory area exceeding the reserved memory capacity, Depending on the amount of free memory, the free memory And an additional memory acquisition unit for acquiring an additional memory area from the memory management device.
【請求項6】 アプリケーションが動作するコンピュー
タシステム上で、前記アプリケーションの実行前に、前
記アプリケーション用に予め保証される予約メモリ容量
の予約を受け付けておいて、前記アプリケーション実行
時にメモリ領域を獲得するメモリ管理装置であって、 アプリケーションの実行前に、前記アプリケーション用
に予め保証される予約メモリ容量と、アプリケーション
用に予約も獲得もされていない空きメモリの範囲内で前
記予約メモリ容量を超えてメモリ領域を獲得する場合の
上限値である獲得限界メモリ容量とを受け付ける予約受
付手段を有すること、 を特徴とするメモリ管理方法。
6. A memory which, on a computer system in which an application operates, accepts a reservation of a reserved memory capacity guaranteed in advance for the application before executing the application and acquires a memory area when the application is executed. The management device is a memory area that exceeds the reserved memory capacity within a range of a reserved memory capacity that is guaranteed in advance for the application before the execution of the application and a free memory that is neither reserved nor acquired for the application. A memory management method, comprising: a reservation reception unit that receives an acquisition limit memory capacity that is an upper limit value when acquiring.
JP2001324102A 2001-10-22 2001-10-22 Method and system for managing memory Pending JP2003131938A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001324102A JP2003131938A (en) 2001-10-22 2001-10-22 Method and system for managing memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001324102A JP2003131938A (en) 2001-10-22 2001-10-22 Method and system for managing memory

Publications (1)

Publication Number Publication Date
JP2003131938A true JP2003131938A (en) 2003-05-09

Family

ID=19140891

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001324102A Pending JP2003131938A (en) 2001-10-22 2001-10-22 Method and system for managing memory

Country Status (1)

Country Link
JP (1) JP2003131938A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9335946B2 (en) 2012-12-31 2016-05-10 Samsung Electronics Co., Ltd. Method and apparatus for managing memory

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9335946B2 (en) 2012-12-31 2016-05-10 Samsung Electronics Co., Ltd. Method and apparatus for managing memory

Similar Documents

Publication Publication Date Title
US9537726B2 (en) System and method for providing threshold-based access to compute resources
US8091088B2 (en) Method and system for hierarchical resource management involving hard and soft resource limits
US7032222B1 (en) Method and system for determining resource allocation to users by granting request based on user associated different limits and resource limit
US8413163B2 (en) Program control device including per-timeslot switching of thread execution
US7770177B2 (en) System for memory reclamation based on thread entry and release request times
JPH0628053B2 (en) Resource allocation control method for multiprocessor system
US7353515B1 (en) Method and apparatus for dynamic allocation and management of semaphores for accessing shared resources
CN108874549B (en) Resource multiplexing method, device, terminal and computer readable storage medium
JP4407956B2 (en) Information processing method and information processing apparatus
JP3832341B2 (en) Memory pool management method
JPH11327934A (en) Semaphore for computer system
CN116185623A (en) Task allocation method and device, electronic equipment and storage medium
CN112148480A (en) Task processing method, device and equipment based on multithreading and storage medium
CN108667940B (en) Resource allocation method and device of cloud platform and computer readable storage medium
CN114461385A (en) Thread pool scheduling method, device and equipment and readable storage medium
CN117056080A (en) Distribution method and device of computing resources, computer equipment and storage medium
JP2009237858A (en) Server task management program and server task management method
JP2003131938A (en) Method and system for managing memory
JP2006107197A (en) Memory control method and program and terminal equipment
CN114237818B (en) Method, system, computing device and storage medium for sharing resources among virtual machines
CN114706663A (en) Computing resource scheduling method, medium and computing device
JPH08305560A (en) Licence management system
CN113419839A (en) Resource scheduling method and device for multi-type jobs, electronic equipment and storage medium
JPH11175357A (en) Task management method
JPH06243077A (en) Distributed transaction processing system