JP2006107197A - Memory control method and program and terminal equipment - Google Patents

Memory control method and program and terminal equipment Download PDF

Info

Publication number
JP2006107197A
JP2006107197A JP2004294071A JP2004294071A JP2006107197A JP 2006107197 A JP2006107197 A JP 2006107197A JP 2004294071 A JP2004294071 A JP 2004294071A JP 2004294071 A JP2004294071 A JP 2004294071A JP 2006107197 A JP2006107197 A JP 2006107197A
Authority
JP
Japan
Prior art keywords
memory
application program
amount
system memory
released
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
JP2004294071A
Other languages
Japanese (ja)
Inventor
Takashi Kadohiro
崇 角廣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2004294071A priority Critical patent/JP2006107197A/en
Publication of JP2006107197A publication Critical patent/JP2006107197A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide terminal equipment enhancing the use efficiency of a memory by complying with an application program. <P>SOLUTION: A memory securement section 11 receives a securement request for a memory from application. A memory amount management section 13 verifies whether the requested memory has the possibility of memory amount securement and secures the requested amount when possibility is found. A memory release section 12 receives a release request for the memory from the application to release the memory and informs the memory amount management section 13 of the release of the memory. The memory amount management section 13 manages the residual memory amount of a system and the used memory amount of each application. When the residual memory amount of the system is below the securement request for the memory, a memory forced release section 14 selects the appropriate application and releases part or all of the memories used by the application. The memory forced release section 14 requests the objective application to execute forced release for part or all of the memories, thereby executing the forced release. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、メモリ負荷制御方法およびプログラムならびに端末装置に関し、特に複数のアプリケーションソフトがメモリを使用する際のメモリの制御方法およびプログラムならびにこの制御方法を実行する端末装置に関する。   The present invention relates to a memory load control method, a program, and a terminal device, and more particularly to a memory control method and program when a plurality of application software uses a memory, and a terminal device that executes the control method.

従来のページングやスワッピングなどシステムのメモリ負荷制御を行うためには二次記憶を必要とする。しかし、端末装置、特に携帯端末装置(モバイル端末機器)などでは、耐久性、サイズ、重量、消費電力などの制約からハードディスクのような低価格かつ大容量の二次記憶装置を備えることが困難なため、いわゆるメモリ負荷制御機能を有していない。メモリ負荷制御機能が無いような装置では、一度払い出したメモリは、より優先度の高い処理のためであっても、取り上げる(ページングやスワッピングしてスチールする)ことができなかった。そこで従来の携帯端末装置などの多くは、予め優先度の高い処理のためにメモリを予約しておき、あるいは、アプリケーション(各用途)毎に使用するメモリを予約しておき、互いに予約したメモリを侵食しないことでメモリ量を保証する方法をとっている。   In order to perform memory load control of the system such as conventional paging and swapping, secondary storage is required. However, it is difficult to provide a low-cost and large-capacity secondary storage device such as a hard disk in a terminal device, particularly a mobile terminal device (mobile terminal device), due to restrictions on durability, size, weight, power consumption, and the like. Therefore, it does not have a so-called memory load control function. In a device that does not have a memory load control function, a memory that has been paid out cannot be picked up (stealed by paging or swapping) even for higher priority processing. Therefore, many of the conventional portable terminal devices reserve memory in advance for high-priority processing, or reserve memory to be used for each application (each application), and use memory reserved for each other. A method of guaranteeing the amount of memory by not eroding is taken.

すなわち、従来の携帯端末装置では、優先度の高い処理が発生した場合の動作のためのメモリの確保を保証するために、次のような方法を採っている。(1)メモリ領域をアプリケーション毎に分割し、互いに侵食しないことで一定のメモリ量を確保する。必ずしもすべてのアプリケーションについて分割するのではなく、優先度の高いものとそれ以外という緩やかな分割方式もある。(2)アプリケーション毎の上限値を設定し、これを超えての確保を制限することで上限値までの確保を保証する。(2)の方法は、(1)のように領域を陽に分割はしないが、メモリ量は各アプリケーションの上限値の合計値をシステムとして用意する必要がある点で同様である。   That is, in the conventional portable terminal device, the following method is adopted in order to guarantee the memory for the operation when the high priority processing occurs. (1) A memory area is divided for each application, and a certain amount of memory is secured by not eroding each other. Not all applications are necessarily divided, but there are also gradual division methods of high priority and others. (2) An upper limit value is set for each application, and securing beyond the upper limit value is guaranteed by limiting the securing beyond this. The method (2) does not divide the area explicitly as in (1), but the memory amount is the same in that it is necessary to prepare the total value of the upper limit values of each application as a system.

ところで、情報処理装置等にあっては、メモリの効率的な資源管理を行う装置が知られている。例えば、特許文献1には、メインメモリと、このメインメモリに展開されているプログラムの中から一つ以上のプログラムを選択し、この選択したプログラムに割り当てられたメインメモリ内のページフレームを解放した後、スリープ状態となるメモリ解放プログラムとを備えた情報処理システムに使用される資源管理装置が記載されている。この装置は、メインメモリ内の空きページフレーム数を取得し、取得された空きページフレーム数が所定のページフレーム数を下回っているときに、メモリ解放プログラムを実行可能状態とするものである。   By the way, in an information processing apparatus or the like, an apparatus that performs efficient resource management of a memory is known. For example, in Patent Document 1, one or more programs are selected from the main memory and the programs expanded in the main memory, and the page frame in the main memory allocated to the selected program is released. A resource management device used in an information processing system including a memory release program that enters a sleep state later is described. This apparatus acquires the number of empty page frames in the main memory, and makes the memory release program executable when the acquired number of empty page frames is below a predetermined number of page frames.

また、特許文献2には、ページスチールを行うジョブグループを予め設定したジョブの重要度等に基づいて決定し、該決定に基づいて空きページを確保することにより、重要度の高いジョブ群に対する主記憶不足を回避するメモリ管理装置が記載されている。この装置は、中央処理装置と、重要度に応じてジョブをグループ化して形成したジョブグループにジョブを登録するジョブグループ判断部、実ページの割り当てを行うメモリ割り当て処理部およびメモリの解放を行うメモリ補給処理部を備えたメモリ管理部、並びに主記憶の使用状況を監視するメモリ監視部を備えた主記憶装置とからなる。メモリ監視部は、メモリの空きページ数が不足したとき、ページスチールを行うジョブグループおよびジョブを予め設定したジョブの重要度に基づいて決定する。この決定に基づいて重要度の低いグループに属するジョブから段階的にメモリ補給部を介して実ページを解放して空きページを確保するものである。   Further, in Patent Document 2, a job group for performing page stealing is determined based on the importance level of a preset job, and a free page is secured based on the determination, so that a main job group with high importance level is secured. A memory management device that avoids memory shortage is described. This apparatus includes a central processing unit, a job group determination unit that registers jobs in a job group formed by grouping jobs according to importance, a memory allocation processing unit that allocates real pages, and a memory that releases memory The memory management unit includes a replenishment processing unit, and the main storage device includes a memory monitoring unit that monitors the use state of the main memory. When the number of free pages in the memory is insufficient, the memory monitoring unit determines a job group to perform page stealing and a job based on the job importance set in advance. Based on this determination, a real page is released from a job belonging to a group of low importance step by step through the memory replenishment unit to secure a free page.

一方、PDA(Personal Data Assistance,Personal Digital Assistants)等の情報端末装置にあっても、例えば、特許文献3にあるように、複数のアプリケーションソフトを起動する場合でのメモリの容量不足を解消する情報端末装置が知られている。この装置は、複数のアプリケーションソフトを備え、起動対象として指定されたアプリケーションソフトを所定のメモリに展開して起動する情報端末装置である。この装置は、アプリケーション起動時にその起動対象として指定されたアプリケーションソフトの実行エリアをメモリに確保できるか否かを判断する実行エリア判断部と、この実行エリア判断部により指定されたアプリケーションソフトの実行エリアをメモリに確保できないと判断された場合に、優先順位の低い順に該当するアプリケーションソフトを強制終了してメモリから開放し、指定されたアプリケーションソフトの実行エリアをメモリに確保するメモリ管理部とを備える。   On the other hand, even in an information terminal device such as a PDA (Personal Data Assistance, Personal Digital Assistants), for example, as disclosed in Patent Document 3, information that solves the shortage of memory capacity when a plurality of application software is started A terminal device is known. This apparatus is an information terminal device that includes a plurality of application software, and starts up the application software designated as the activation target in a predetermined memory. This apparatus includes an execution area determination unit that determines whether or not an execution area of application software specified as an activation target when the application is started can be secured in a memory, and an execution area of application software specified by the execution area determination unit A memory management unit that forcibly terminates the corresponding application software in ascending order of priority and releases it from the memory, and secures the designated application software execution area in the memory .

特開2000−215099号公報 (図2)Japanese Patent Laid-Open No. 2000-215099 (FIG. 2) 特開2002−244869号公報 (図1、図2)Japanese Patent Laid-Open No. 2002-244869 (FIGS. 1 and 2) 特開2003−15892号公報 (図1、図7)JP 2003-15892 A (FIGS. 1 and 7)

しかし、従来の携帯端末装置におけるメモリの制御技術には、次のような問題点があった。第1の問題点は、メモリの使用効率が悪く、より大きな実装メモリ量が必要となるということである。その理由は、予めメモリ領域を分割する、または上限値を定めることで、メモリの分割損が発生するためである。   However, the memory control technology in the conventional portable terminal device has the following problems. The first problem is that the use efficiency of the memory is poor and a larger amount of mounting memory is required. The reason is that a memory division loss occurs when the memory area is divided in advance or an upper limit value is set.

また、第2の問題点は、アプリケーションが状況によって動作しないことがあるということである。その理由は、アプリケーションのメモリ使用量が制限されているため、例えメモリが空いていても上限を超えての動作ができないからである。   The second problem is that the application may not operate depending on the situation. The reason is that the memory usage of the application is limited, so that even if the memory is free, operation exceeding the upper limit cannot be performed.

以上のような問題点を解決するために、端末装置のシステムメモリに対し、情報処理装置等における二次記憶によるメモリ負荷制御方法を適用しようとすると、メモリの使用効率が極めて悪くなるか、アプリケーションプログラムが動作しないことが発生する。すなわち、二次記憶では、ページといった大きな単位でのメモリの取得・解放を行うために、端末装置のシステムメモリのような小さなサイズにおけるメモリ管理に適用するのは困難である。   In order to solve the above problems, if the memory load control method by secondary storage in the information processing device or the like is applied to the system memory of the terminal device, the memory use efficiency becomes extremely poor or the application The program may not work. In other words, secondary storage is difficult to apply to memory management in a small size such as the system memory of a terminal device in order to acquire and release memory in large units such as pages.

一方、特許文献3の情報端末装置は、小さなサイズにおけるメモリ管理が可能であるが、アプリケーション起動時におけるメモリ管理に限定されている。さらに、携帯端末装置等にあっては、メモリの解放を行う際にアプリケーションプログラムの種別によって解放の程度(全てを解放するか一部か)に違いがあるが、これに対応するようには構成されておらず、メモリの利用効率が悪い。   On the other hand, the information terminal device of Patent Document 3 is capable of memory management in a small size, but is limited to memory management at the time of application activation. Furthermore, in mobile terminal devices, etc., there is a difference in the degree of release (whether to release all or part) depending on the type of application program when releasing memory, but it is configured to handle this It is not, and the memory utilization efficiency is bad.

本発明の目的は、アプリケーションプログラムに対応してメモリの利用効率を高めるメモリ制御方法およびプログラムならびに端末装置を提供することにある。   An object of the present invention is to provide a memory control method, a program, and a terminal device that increase the memory utilization efficiency corresponding to an application program.

前記目的を達成する本発明の一つのアスペクトに係る端末装置は、システムメモリを制御してアプリケーションプログラムを実行する端末装置である。この端末装置は、システムメモリ残量と各アプリケーションプログラムの使用メモリ量とを管理し、システムメモリ残量がメモリの確保要求量を下回る際に、選択した所定のアプリケーションプログラムの使用するシステムメモリの一部もしくはすべてを解放するようにメモリ強制解放部に通知するメモリ量管理部を備える。また、アプリケーションプログラムからメモリの確保要求を受け、メモリ量管理部に要求メモリ量が確保可能かのチェックを依頼して確保可能であれば要求メモリ量を確保するメモリ確保部と、アプリケーションプログラムからシステムメモリの解放要求を受けて使用しているシステムメモリを解放し、メモリ量管理部にシステムメモリを解放したことを通知するメモリ解放部と、をそなえる。さらに、メモリ量管理部からの通知を受けて、選択したアプリケーションプログラムに対しシステムメモリを強制解放させるメモリ強制解放部を備える。   A terminal device according to one aspect of the present invention that achieves the above object is a terminal device that controls a system memory to execute an application program. This terminal device manages the remaining amount of system memory and the amount of memory used by each application program. When the remaining amount of system memory falls below the required amount of memory reservation, one of the system memories used by the selected application program selected. A memory amount management unit that notifies the memory forced release unit so as to release all or all of them. In addition, when a memory allocation request is received from an application program, a request is made to the memory amount management unit to check whether the required memory amount can be secured, and if it can be secured, a memory securing unit that secures the required memory amount and a system from the application program A memory release unit is provided that releases a system memory used in response to a memory release request and notifies the memory amount management unit that the system memory has been released. In addition, a memory forced release unit is provided that forcibly releases the system memory for the selected application program in response to a notification from the memory amount management unit.

第1の展開形態の端末装置において、メモリ量管理部は、アプリケーションプログラム毎に対応付けられた優先度を記憶する記憶部を備え、記憶されている優先度に基づいて所定のアプリケーションプログラムを選択するようにしてもよい。   In the terminal device according to the first development mode, the memory amount management unit includes a storage unit that stores a priority associated with each application program, and selects a predetermined application program based on the stored priority. You may do it.

第2の展開形態の端末装置において、システムのメモリ過負荷時にアプリケーションプログラムの使用中のシステムメモリを解放する場合に、アプリケーションが最低限動作可能なシステムメモリを残して解放するようにしてもよい。   In the terminal device of the second development form, when the system memory in use of the application program is released when the system memory is overloaded, the system memory that can be operated at least by the application may be left and released.

第3の展開形態の端末装置において、メモリ量管理部は、アプリケーションプログラムの使用するシステムメモリをnレベル(nは2以上の整数)に分けて管理し、メモリ確保部は、システムメモリを確保の際にnレベルの一つを指定し、メモリ解放部は、アプリケーションプログラムの使用中のシステムメモリを解放する際にnレベルの一つを指定するようにしてもよい。   In the terminal device according to the third development mode, the memory amount management unit manages the system memory used by the application program in n levels (n is an integer of 2 or more), and the memory securing unit secures the system memory. At this time, one of the n levels may be designated, and the memory releasing unit may designate one of the n levels when releasing the system memory being used by the application program.

第4の展開形態の端末装置において、メモリ量管理部は、システムメモリを、アプリケーションプログラム毎にアプリケーションプログラムが最低限動作するのに必要な第1のメモリと、処理を中断すれば解放可能な第2のメモリとに分けて管理するようにしてもよい。   In the terminal device according to the fourth development mode, the memory amount management unit can release the system memory, the first memory necessary for the minimum operation of the application program for each application program, and the first memory that can be released if the process is interrupted. It is also possible to manage by dividing into two memories.

第5の展開形態の端末装置において、メモリ量管理部は、アプリケーションプログラムの使用中のシステムメモリを解放する際に第2のメモリを優先的に解放するように制御するようにしてもよい。   In the terminal device of the fifth development mode, the memory amount management unit may control to preferentially release the second memory when releasing the system memory in use of the application program.

本発明の一つのアスペクトに係るメモリ制御方法は、端末装置がシステムメモリを制御する方法である。この方法は、アプリケーションプログラムからシステムメモリの確保要求を確保要求量と共に受け取るステップと、システムメモリ残量と各アプリケーションプログラムの使用メモリ量とを管理し、システムメモリ残量が確保要求量を下回るか否かをチェックするステップと、確保要求量を下回る場合に、優先度に応じて選択した所定のアプリケーションプログラムの使用するシステムメモリの一部もしくはすべてを解放するステップと、を含む。   A memory control method according to one aspect of the present invention is a method in which a terminal device controls a system memory. This method manages the step of receiving a system memory allocation request from an application program together with the allocation request amount, the remaining system memory amount and the amount of memory used by each application program, and whether or not the remaining system memory amount is less than the allocation request amount. And a step of releasing a part or all of the system memory used by a predetermined application program selected in accordance with the priority when the amount is less than the secured request amount.

第1の展開形態のメモリ制御方法において、システムメモリは、アプリケーションプログラムが最低限動作するのに必要な第1のメモリと、処理を中断すれば解放可能な第2のメモリとに分けてアプリケーションプログラム毎に管理され、所定のアプリケーションプログラムの使用中のシステムメモリを解放する際に第2のメモリを優先的に解放するようにしてもよい。   In the memory control method according to the first development mode, the system memory is divided into a first memory necessary for the minimum operation of the application program and a second memory that can be released if the process is interrupted. The second memory may be preferentially released when the system memory that is managed every time and the predetermined application program is being used is released.

本発明の他のアスペクトに係るメモリ制御方法は、端末装置がシステムメモリを制御する方法である。この方法は、システムメモリを、アプリケーションプログラムが最低限動作するのに必要な第1メモリと、処理を中断すれば解放可能な第2メモリとに分けてアプリケーションプログラム毎に管理するステップを含む。また、アプリケーションプログラムからシステムメモリの確保要求を要求メモリ量と共に受け取るステップと、優先度の最も低いアプリケーションプログラムを検索するステップと、検索したアプリケーションプログラムの第2メモリの使用量があるか否かをチェックするステップと、第2メモリの使用量がある場合、第2メモリを強制解放させるステップと、システムメモリの残量に強制解放した第2メモリの使用量を加算するステップと、探索したアプリケーションプログラムについて管理されている第2メモリの使用量をクリアするステップと、探索したアプリケーションプログラムの第2メモリの使用量がない場合、あるいはシステムメモリの残量がまだ要求メモリ量に達しない場合、他にアプリケーションがあるか否かをチェックするステップと、他にアプリケーションプログラムがあれば、次に優先度が低いアプリケーションプログラムを検索し、第2メモリの使用量があるか否かをチェックするステップに戻るステップと、を含む。   A memory control method according to another aspect of the present invention is a method in which a terminal device controls a system memory. This method includes a step of managing the system memory for each application program by dividing the system memory into a first memory necessary for the minimum operation of the application program and a second memory that can be released if the process is interrupted. Also, a step of receiving a system memory allocation request from the application program together with the requested memory amount, a step of searching for the application program having the lowest priority, and checking whether there is a usage amount of the second memory of the searched application program A step of forcibly releasing the second memory when there is a usage amount of the second memory, a step of adding the usage amount of the second memory forcibly released to the remaining amount of the system memory, and the searched application program The step of clearing the usage amount of the managed second memory and when there is no usage amount of the second memory of the searched application program or when the remaining amount of the system memory has not yet reached the required memory amount, Check if there is A step that, if there is another application program, then searches the low priority application programs, comprising the steps of: returning to the step of checking whether there is a usage of the second memory.

第2の展開形態のメモリ制御方法において、他にアプリケーションがあるか否かをチェックして、他にアプリケーションプログラムがない場合に、優先度の最も低いアプリケーションプログラムを再び検索するステップと、検索したアプリケーションプログラムの第1メモリの使用量があるか否かをチェックするステップと、第1メモリの使用量がある場合、探索したアプリケーションプログラムを強制終了させ、探索したアプリケーションプログラムの抱えていたすべてのメモリを解放するステップと、システムメモリの残量に強制終了で解放した第1メモリの使用量を加算するステップと、探索したアプリケーションプログラムについて管理されている第1メモリの使用量をクリアするステップと、探索したアプリケーションプログラムの第1メモリの使用量がない場合、あるいはシステムメモリの残量がまだ要求メモリ量に達しない場合、他にアプリケーションプログラムがあるか否かをチェックするステップと、他にアプリケーションプログラムがあれば、次に優先度が低いアプリケーションプログラムを検索し、第1メモリの使用量があるか否かをチェックするステップに戻るステップとを、をさらに含むようにしてもよい。   In the memory control method according to the second development mode, a step of checking whether or not there is another application and searching for the lowest priority application program when there is no other application program, and the searched application A step of checking whether or not the first memory usage of the program is present and if there is a first memory usage, the searched application program is forcibly terminated, and all the memory held by the searched application program is deleted. A step of releasing, a step of adding the usage amount of the first memory released by forced termination to the remaining amount of the system memory, a step of clearing the usage amount of the first memory managed for the searched application program, Application program If there is no usage of the first memory, or if the remaining amount of system memory has not yet reached the requested memory amount, a step of checking whether there is another application program, and if there is another application program, And a step of searching for an application program having a low priority and returning to the step of checking whether or not there is a usage amount of the first memory may be included.

本発明の一つのアスペクトに係るプログラムは、システムメモリを有する端末装置を構成するコンピュータに、アプリケーションプログラムからシステムメモリの確保要求を確保要求量と共に受け取る処理と、システムメモリ残量と各アプリケーションプログラムの使用メモリ量とを管理し、システムメモリ残量が確保要求量を下回るか否かをチェックする処理と、確保要求量を下回る場合に、優先度に応じて選択した所定のアプリケーションプログラムの使用するシステムメモリの一部もしくはすべてを解放する処理と、を実行させる。   A program according to an aspect of the present invention includes a process for receiving a system memory securing request from an application program together with a securing request amount to a computer constituting a terminal device having a system memory, a remaining system memory amount, and use of each application program Management of the memory amount, checking whether the remaining amount of system memory is below the required amount of secure memory, and system memory used by the predetermined application program selected according to the priority when it falls below the required secure amount And a process of releasing a part or all of.

第1の展開形態のプログラムにおいて、システムメモリは、アプリケーションプログラムが最低限動作するのに必要な第1のメモリと、処理を中断すれば解放可能な第2のメモリとに分けてアプリケーションプログラム毎に管理され、所定のアプリケーションプログラムの使用中のシステムメモリを解放する際に第2のメモリを優先的に解放するようにしてもよい。   In the program of the first development form, the system memory is divided into a first memory necessary for the minimum operation of the application program and a second memory that can be released if the process is interrupted. The second memory may be preferentially released when the system memory that is managed and in use of the predetermined application program is released.

本発明の他のアスペクトに係るプログラムは、システムメモリを有する端末装置を構成するコンピュータに、システムメモリを、アプリケーションプログラムが最低限動作するのに必要な第1メモリと、処理を中断すれば解放可能な第2メモリとに分けてアプリケーションプログラム毎に管理する処理と、アプリケーションプログラムからシステムメモリの確保要求を要求メモリ量と共に受け取る処理と、優先度の最も低いアプリケーションプログラムを検索する処理と、検索したアプリケーションプログラムの第2メモリの使用量があるか否かをチェックする処理と、第2メモリの使用量がある場合、第2メモリを強制解放させる処理と、システムメモリの残量に強制解放した第2メモリの使用量を加算する処理と、探索したアプリケーションプログラムについて管理されている第2メモリの使用量をクリアする処理と、探索したアプリケーションプログラムの第2メモリの使用量がない場合、あるいはシステムメモリの残量がまだ要求メモリ量に達しない場合、他にアプリケーションがあるか否かをチェックする処理と、他にアプリケーションプログラムがあれば、次に優先度が低いアプリケーションプログラムを検索し、第2メモリの使用量があるか否かをチェックする処理に戻る処理と、を実行させる。   A program according to another aspect of the present invention can be released to a computer constituting a terminal device having a system memory by releasing the system memory if the processing is interrupted with the first memory necessary for the application program to operate at a minimum. A process for managing each application program separately from the second memory, a process for receiving a system memory allocation request from the application program together with the requested memory amount, a process for searching for the application program with the lowest priority, and the searched application A process for checking whether the second memory of the program is used, a process for forcibly releasing the second memory if there is a second memory used, and a second forcibly released to the remaining amount of the system memory Processing to add memory usage and the searched application If there is no processing to clear the usage amount of the second memory managed for the application program and the usage amount of the second memory of the searched application program, or the remaining amount of the system memory has not yet reached the required memory amount, A process for checking whether there is another application and a process for searching for the application program with the next lowest priority if there is another application program and checking whether there is a usage amount of the second memory. And return processing.

第2の展開形態のプログラムにおいて、他にアプリケーションがあるか否かをチェックして、他にアプリケーションプログラムがない場合に、優先度の最も低いアプリケーションプログラムを再び検索する処理と、検索したアプリケーションプログラムの第1メモリの使用量があるか否かをチェックする処理と、第1メモリの使用量がある場合、探索したアプリケーションプログラムを強制終了させ、探索したアプリケーションプログラムの抱えていたすべてのメモリを解放する処理と、システムメモリの残量に強制終了で解放した第1メモリの使用量を加算する処理と、探索したアプリケーションプログラムについて管理されている第1メモリの使用量をクリアする処理と、探索したアプリケーションプログラムの第1メモリの使用量がない場合、あるいはシステムメモリの残量がまだ要求メモリ量に達しない場合、他にアプリケーションプログラムがあるか否かをチェックする処理と、他にアプリケーションプログラムがあれば、次に優先度が低いアプリケーションプログラムを検索し、第1メモリの使用量があるか否かをチェックする処理に戻る処理と、をさらに実行させるようにしてもよい。   In the program of the second development form, it is checked whether or not there is another application, and when there is no other application program, a process for searching again for the application program with the lowest priority, and for the searched application program Processing for checking whether or not there is a usage amount of the first memory, and if there is a usage amount of the first memory, the searched application program is forcibly terminated, and all the memory held by the searched application program is released. Processing, processing for adding the usage amount of the first memory released by forced termination to the remaining amount of the system memory, processing for clearing the usage amount of the first memory managed for the searched application program, and searched application The first memory usage of the program is not If the remaining amount of system memory has not yet reached the required amount of memory, the process of checking whether there is another application program, and if there is another application program, the application program with the next lowest priority is selected. You may make it perform further the process which searches and returns to the process which checks whether there is the usage-amount of 1st memory.

本発明によれば、メモリ負荷制御を行うための二次記憶をもたない端末装置などでも、アプリケーション毎に予めメモリを予約して一定量を保障しておく必要がなく、メモリの分割損が発生せず、メモリの使用効率が向上する。その理由は、メモリ負荷制御の必要な場面に、優先度の低いアプリケーションのメモリを一部解放させて利用できるようにする仕組みをもつためである。   According to the present invention, even in a terminal device or the like that does not have secondary storage for performing memory load control, it is not necessary to reserve a memory in advance for each application to guarantee a certain amount, and memory division loss is reduced. It does not occur and the memory usage efficiency is improved. The reason is that it has a mechanism that allows a part of the memory of an application with a low priority to be released and used in a scene that requires memory load control.

本発明の実施形態に係る端末装置におけるメモリ負荷制御機能は、メモリ確保部(図1の11)とメモリ解放部(図1の12)とメモリ量管理部(図1の13)とメモリ強制解放部(図1の14)とを備える。メモリ確保部(図1の11)は、アプリケーションからメモリの確保要求を受け、メモリ量管理部(図1の13)で要求メモリが要求量確保可能かチェックし、可能であれば確保する。メモリ解放部(図1の12)は、アプリケーションからメモリの解放要求を受けてメモリを解放し、メモリ量管理部(図1の13)にメモリが解放されたことを通知する。メモリ量管理部(図1の13)は、システムのメモリ残量と各アプリケーションの使用メモリ量とを管理し、システムのメモリ残量がメモリの確保要求を下回る際に、適切なアプリケーションを選択してそのアプリケーションの使用するメモリの一部もしくはすべてをメモリ強制解放部(図1の14)で解放する。メモリ強制解放部(図1の14)は、対象アプリケーションにメモリの一部もしくはすべてを強制解放するよう通知し、強制解放を実行させる。   The memory load control function in the terminal device according to the embodiment of the present invention includes a memory reservation unit (11 in FIG. 1), a memory release unit (12 in FIG. 1), a memory amount management unit (13 in FIG. 1), and a forced memory release. (14 in FIG. 1). The memory securing unit (11 in FIG. 1) receives a memory securing request from the application, checks whether the requested memory can secure the requested amount by the memory amount managing unit (13 in FIG. 1), and secures it if possible. The memory release unit (12 in FIG. 1) receives the memory release request from the application, releases the memory, and notifies the memory amount management unit (13 in FIG. 1) that the memory has been released. The memory amount management unit (13 in FIG. 1) manages the remaining amount of memory in the system and the amount of memory used by each application, and selects an appropriate application when the remaining amount of memory in the system falls below the memory allocation request. Then, part or all of the memory used by the application is released by the memory forced release unit (14 in FIG. 1). The memory forced release unit (14 in FIG. 1) notifies the target application to forcibly release a part or all of the memory, and executes the forced release.

以上のように構成されるメモリの負荷制御のための二次記憶を持たない端末装置は、アプリケーションの使用しているメモリ量の内、閾値を超えているメモリ量のスチール(強制解放)を可能にし、システムのメモリ残量の不足した状態からでも、より優先度の高い処理のメモリが確保可能となる。   Terminal devices that do not have secondary storage for memory load control configured as described above can steal (forced release) the amount of memory that exceeds the threshold of the amount of memory used by the application. In addition, even when the remaining amount of memory in the system is insufficient, it is possible to secure a memory for processing with higher priority.

なお、以上のような構成の端末装置は、プロセッサを内蔵し、このプロセッサで動作するプログラムによってメモリ負荷制御機能を実現するようにしてもよい。   Note that the terminal device configured as described above may incorporate a processor and implement a memory load control function by a program operating on the processor.

本発明の実施例について図面を参照してさらに詳しく説明する。図1は、本発明の実施例に係る端末装置のメモリ負荷制御機能の構成を示すブロック図である。図1において、システムメモリ(ヒープ)10とこれを使用するアプリケーション群20とで構成されるシステムに、メモリ確保部11、メモリ解放部12、メモリ量管理部13、メモリ強制解放部14を設けてメモリ負荷制御機能を構成する。メモリ量管理部13は、メモリ情報記憶域15を持つ。メモリ情報記憶域15には、システムメモリ残量16、各アプリケーション毎の管理情報17を蓄える。管理情報17には、プロセスID31、優先度32、必須メモリ上限値33、必須メモリ使用量34、ワークメモリ使用量35の各情報が含まれる。   Embodiments of the present invention will be described in more detail with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of a memory load control function of a terminal device according to an embodiment of the present invention. In FIG. 1, a system comprising a system memory (heap) 10 and an application group 20 that uses the system memory (heap) 10 is provided with a memory allocation unit 11, a memory release unit 12, a memory amount management unit 13, and a memory forced release unit 14. Configure the memory load control function. The memory amount management unit 13 has a memory information storage area 15. The memory information storage area 15 stores a remaining system memory 16 and management information 17 for each application. The management information 17 includes information of process ID 31, priority 32, required memory upper limit 33, required memory usage 34, and work memory usage 35.

本実施例では、各アプリケーションが使用中のシステムメモリを「必須メモリ」(第1メモリ)と「ワークメモリ」(第2メモリ)とに分ける。ここで、「必須メモリ」とは、従来アプリケーション毎に予め予約していたメモリ量のメモリに相当し、本実施例では予め予約せずに使用し、その代わりにスチールの対象とならないメモリという意味である。アプリケーションがメモリ確保部11でメモリを要求するときに「必須メモリ」と「ワークメモリ」のどちらかを指定するものとする。「ワークメモリ」として確保したメモリは、メモリ強制解放部14により強制解放の通知があった場合にいつでも解放しなければならないものとする。システムメモリ残量16の初期値は、システムメモリ(ヒープ)10の量とする。各アプリケーションの優先度32、必須メモリ上限値33は、予めアプリケーションの性質を考慮して定めておくものとする。アプリケーション群20には、通常のアプリケーションのミッションを遂行するプログラム21と、任意の時点でのワークメモリを解放するワークメモリ強制解放処理プログラム22とを備える。   In this embodiment, the system memory being used by each application is divided into “essential memory” (first memory) and “work memory” (second memory). Here, “essential memory” corresponds to a memory of a memory amount that has been reserved in advance for each conventional application, and in this embodiment, means a memory that is used without being reserved in advance and is not subject to steal instead. It is. It is assumed that when an application requests a memory from the memory securing unit 11, either “essential memory” or “work memory” is specified. It is assumed that the memory secured as “work memory” must be released any time when the forced memory release unit 14 notifies the forced release. The initial value of the remaining system memory 16 is the amount of system memory (heap) 10. The priority 32 and the essential memory upper limit 33 of each application are determined in advance in consideration of the nature of the application. The application group 20 includes a program 21 for performing a normal application mission and a work memory forced release processing program 22 for releasing the work memory at an arbitrary time.

次に、図を参照して本実施例の動作について詳細に説明する。図1において、アプリケーション群20の各アプリケーションは、プログラム21からメモリを使用する場合、メモリ確保部11でメモリを確保(get)し、不要になればメモリ解放部12にて解放(free)する。メモリ確保部11でメモリを確保する際には、当該アプリケーションが最低限動作するのに必要な「必須メモリ」か、いつでも処理を中断すれば解放可能な「ワークメモリ」かの種別を指定する。また、各アプリケーションは、メモリ強制解放の通知(SIGNAL/メッセージ)を受けた場合、実行中の処理を中止して使用中のすべての「ワークメモリ」をメモリ解放部12にて解放するワークメモリ強制解放プログラム22を用意して登録しておく。このSIGNALやメッセージの機能は、一般的なOS(Operating System:オペレーティングシステム)に備えられているものであってもよい。   Next, the operation of the present embodiment will be described in detail with reference to the drawings. In FIG. 1, each application in the application group 20 secures (gets) the memory with the memory securing unit 11 when using the memory from the program 21, and releases (frees) the memory with the memory releasing unit 12 when unnecessary. When the memory is secured by the memory securing unit 11, a type of “essential memory” necessary for the minimum operation of the application or “work memory” that can be released if processing is interrupted at any time is designated. In addition, when each application receives a notification of forced memory release (SIGNAL / message), the memory release unit 12 releases all “work memory” in use by canceling the processing being executed. A release program 22 is prepared and registered. This SIGNAL or message function may be provided in a general OS (Operating System).

まず、メモリ確保部11の動作を図2に示す。図2おいてメモリ確保部は、ステップS11でメモリ量管理部13にて要求されたメモリ量が確保可能かチェックする。確保可能(ステップS12のY)であれば、ステップS13で、要求量のメモリを確保する。確保可能でない場合(ステップS12のN)には、エラーを返す。   First, the operation of the memory securing unit 11 is shown in FIG. In FIG. 2, the memory securing unit checks whether the memory amount requested by the memory amount managing unit 13 can be secured in step S11. If it can be secured (Y in step S12), the requested amount of memory is secured in step S13. If it cannot be secured (N in step S12), an error is returned.

次に、メモリ解放部12の動作を図3に示す。図3おいてメモリ解放部12は、まずステップS21で指定メモリを解放し、ステップS22で解放したメモリの種別(必須メモリ/ワークメモリの別)とメモリ量とを指定してメモリ量管理部13に通知する。   Next, the operation of the memory release unit 12 is shown in FIG. In FIG. 3, the memory release unit 12 first releases the designated memory in step S21, designates the type of memory (separate required memory / work memory) and the memory amount released in step S22, and designates the memory amount management unit 13 Notify

メモリ量管理部13が要求されたメモリ量を確保可能かチェックする場合の動作を図4および図5に示す。図4おいて、メモリ量管理部13は、まず要求メモリが必須メモリであり(ステップS31のY)、かつ当該アプリケーションの必須メモリ使用量34に要求メモリの量を加えると必須メモリ上限値33を超えてしまう場合(ステップS32のN)、エラー(確保不可)を返す。そうでない場合(ステップS31のNあるいはステップS32のY)、ステップS33で要求メモリがシステムメモリ残量16以下であるか否かをチェックする。要求メモリがシステムメモリ残量16以下であれば、ステップS34でシステムメモリ残量16から要求メモリ量を減算する。さらに、ステップS35で必須メモリ使用量34もしくはワークメモリ使用量35の、当該アプリケーションの要求メモリの種類に対応する方に要求メモリ量を加算して、OKを返す。   4 and 5 show operations when the memory amount management unit 13 checks whether the requested memory amount can be secured. In FIG. 4, the memory amount management unit 13 first sets the required memory upper limit value 33 when the required memory is an essential memory (Y in step S31) and when the required memory amount is added to the required memory usage 34 of the application. If it exceeds (N in step S32), an error (unsecured) is returned. Otherwise (N in step S31 or Y in step S32), it is checked in step S33 whether the requested memory is less than or equal to 16 in the remaining system memory. If the requested memory is less than or equal to the remaining system memory 16, the requested memory amount is subtracted from the remaining system memory 16 in step S34. Furthermore, in step S35, the required memory amount is added to the required memory usage amount 34 or the work memory usage amount 35 corresponding to the type of the required memory of the application, and OK is returned.

一方、ステップS33で要求メモリがシステムメモリ残量16より大きい場合、ステップS36で要求メモリがワークメモリか否かをチェックする。要求メモリがワークメモリの場合(ステップS36のY)はエラー(確保不可)を返す。そうでない場合(ステップS36のN)、図5のステップS37に進み、優先度の最も低いアプリケーションを検索する。探索したアプリケーションのワークメモリ使用量35がある場合(ステップS38のY)、ステップS39でこのアプリケーションのプロセスIDを指定してメモリ強制解放部14でワークメモリを強制解放させる。強制解放が成功した場合(ステップS40のY)は、ステップS41でシステムメモリの残量に強制解放したワークメモリ量を加算し、ステップS42でこのアプリケーションのワークメモリ使用量35をクリアする。システムメモリの残量が要求メモリ量以上になった場合(ステップS43のY)、図4のステップS34に進む。   On the other hand, if the requested memory is larger than the remaining system memory 16 in step S33, it is checked in step S36 whether the requested memory is work memory. If the request memory is a work memory (Y in step S36), an error (unsecured) is returned. If not (N in Step S36), the process proceeds to Step S37 in FIG. 5 to search for the application with the lowest priority. If there is a work memory usage 35 of the searched application (Y in step S38), the process ID of this application is specified in step S39, and the work memory is forcibly released by the memory forced release unit 14. If the forced release is successful (Y in step S40), the work memory amount forcibly released is added to the remaining amount of the system memory in step S41, and the work memory usage 35 of this application is cleared in step S42. If the remaining amount of system memory is equal to or greater than the required memory amount (Y in step S43), the process proceeds to step S34 in FIG.

探索したアプリケーションのワークメモリ使用量35がない場合(ステップS38のN)、ステップS40で強制解放が成功しなかった場合、あるいはステップS43でシステムメモリの残量がまだ要求メモリ量に達しない場合、ステップS44で他にアプリケーションの情報があるか否かをチェックする。他にアプリケーションがあれば(ステップS44のY)、次に優先度が低いアプリケーションを検索し(ステップS45)、ステップS38に戻る。他にアプリケーションがなくなった場合(ステップS44のN)、メモリ不足としてエラーを返す。   If there is no work memory usage 35 of the searched application (N in step S38), if forced release is not successful in step S40, or if the remaining amount of system memory has not yet reached the requested memory amount in step S43, In step S44, it is checked whether there is any other application information. If there is another application (Y in step S44), the application with the next lowest priority is searched (step S45), and the process returns to step S38. If there are no more applications (N in step S44), an error is returned as a memory shortage.

メモリ量管理部13でメモリの解放を通知する場合の動作を図6に示す。メモリの解放を通知時、メモリ量管理部13は、まずステップS51でシステムメモリ残量16に解放したメモリ量を加算する。そして、ステップS52で当該アプリケーションの解放したメモリ種別に対応する必須メモリ使用量34もしくはワークメモリ使用量35に解放したメモリ量を加算する。   The operation when the memory management unit 13 notifies the release of the memory is shown in FIG. When notifying the memory release, the memory amount management unit 13 first adds the released memory amount to the remaining system memory 16 in step S51. In step S52, the released memory amount is added to the required memory usage amount 34 or the work memory usage amount 35 corresponding to the released memory type of the application.

次に、メモリ強制解放部14の動作を図7に示す。ステップS61で指定されたプロセスIDに対応するアプリケーションにワークメモリ強制解放のSIGNALを送信する。このSIGNALを受けたアプリケーションでは、OSにより実行中の処理を中断して登録しておいたワークメモリ強制解放処理プログラム22を実行する。ここで実行中の処理を中止し、使用中のすべてのワークメモリをメモリ解放部12にて解放し、結果をメッセージにてSIGNAL送信元に返す。メモリ強制解放部14ではステップS62にて結果応答メッセージを待ち合わせる。その結果により成功であれば(ステップS63のY)OKを返し、成功でなければ(ステップS63のN)エラーを返す。   Next, the operation of the memory forced release unit 14 is shown in FIG. A SIGNAL for forced release of work memory is transmitted to the application corresponding to the process ID specified in step S61. The application that has received this SIGNAL executes the work memory forced release processing program 22 registered by interrupting the processing being executed by the OS. Here, the processing being executed is stopped, all the work memories in use are released by the memory release unit 12, and the result is returned to the SIGNAL transmission source by a message. The memory forced release unit 14 waits for a result response message in step S62. If the result is successful (Y in step S63), OK is returned, and if not successful (N in step S63), an error is returned.

以上のように、残りメモリの少ない状況であって、より優先度の高いアプリケーションがメモリを要求した場合等のようなメモリ負荷制御の必要な場面に、優先度の低いアプリケーションのメモリを一部解放させて利用できるようにする。このようにすることで、メモリ負荷制御を行うための二次記憶をもたない端末装置などであっても、アプリケーション毎に予めメモリを予約して一定量を保障しておく必要がなく、分割損(利用していないのに他からは使用できないメモリ)が発生せず、メモリの使用効率が向上する。   As described above, a part of the memory of the low priority application is partially released in the situation where the memory load control is necessary, such as when the higher priority application requests the memory in the situation where the remaining memory is low. To make it available. In this way, even for a terminal device that does not have secondary storage for performing memory load control, it is not necessary to reserve a certain amount of memory in advance for each application to guarantee a certain amount, There is no loss (memory that is not used but cannot be used by others), and the memory usage efficiency is improved.

また、リアルタイム性の要求される処理について、それが実行されるために必要なトータルのメモリ量を登録しておき、この処理が起動される時点で、対応するメモリ量をメモリ強制解放部14により解放する。これによって、リアルタイム性の要求される処理は、途中でメモリが不足してメモリ強制解放によってメモリ解放を行うような中断を生じること無しに、処理を実行できる確率が高くなる。   In addition, for a process that requires real-time processing, a total memory amount necessary for executing the process is registered, and when this process is started, the corresponding memory amount is stored by the memory forced release unit 14. release. As a result, a process that requires real-time performance has a high probability of being able to execute the process without causing an interruption in which the memory is released due to the memory being forcibly released due to insufficient memory.

次に、本発明の第2の実施例について図面を参照して詳細に説明する。第2の実施例は、第1の実施例のメモリ量管理部13の要求されたメモリ量が確保可能かチェックする場合の動作を表す図5のフローチャートを、図8および図9に置き換えたものである。図8において、全てのステップは、図5と同様の処理を行う。ただし、ステップS44で他のアプリケーションの情報がなくなった場合(ステップS44のN)、すなわち全てのアプリケーションのワークメモリを解放してもなお必須メモリが確保できない状態の場合に、図9のステップS71に進むことだけが異なっている。   Next, a second embodiment of the present invention will be described in detail with reference to the drawings. In the second embodiment, the flowchart of FIG. 5 representing the operation when checking whether the requested memory amount of the memory amount management unit 13 of the first embodiment can be secured is replaced with FIG. 8 and FIG. It is. In FIG. 8, all steps perform the same processing as in FIG. However, if there is no other application information in step S44 (N in step S44), that is, if the required memory cannot be secured even if the work memory of all applications is released, the process returns to step S71 in FIG. Only the progress is different.

図9を参照すると、ステップS71にて優先度の最も低いアプリケーションを検索し、これが要求元のアプリケーション自身である場合には(ステップS72のY)、エラーを返す。要求元のアプリケーション自身でない場合(ステップS72のN)、ステップS73でこのアプリケーションの必須メモリ使用量34をチェックする。必須メモリ使用量34がある場合(ステップS73のY)、ステップS74でこのアプリケーションを強制終了させ、アプリケーションの抱えていたすべてのメモリを解放する。強制終了機能は、一般的なOS(オペレーティングシステム)に備えられているもの(Kill Signalなど)でもよい。強制終了が成功した場合(ステップS75のY)には、ステップS76でシステムメモリの残量に強制終了で解放した必須メモリ使用量を加算し、ステップS77でこのアプリケーションの必須メモリ使用量34をクリアする。ステップS78でシステムメモリの残量が要求メモリ量以上になった場合には、図4のステップS34に進む。   Referring to FIG. 9, an application with the lowest priority is searched in step S71, and if this is the requesting application itself (Y in step S72), an error is returned. If it is not the requesting application itself (N in step S72), the required memory usage 34 of this application is checked in step S73. If there is the required memory usage amount 34 (Y in step S73), the application is forcibly terminated in step S74, and all the memory held by the application is released. The forced termination function may be a function (Kill Signal or the like) provided in a general OS (operating system). If the forced termination is successful (Y in step S75), the required memory usage released by the forced termination is added to the remaining system memory in step S76, and the required memory usage 34 of this application is cleared in step S77. To do. If the remaining amount of system memory exceeds the required memory amount in step S78, the process proceeds to step S34 in FIG.

図9のステップS73で必須メモリ使用量34がない場合、ステップS75で強制終了が成功しない場合、またはステップS78でシステムメモリの残量がまだ要求メモリ量に達しない場合、ステップS79で他にアプリケーションがあるか否かをチェックする。他にアプリケーションがあれば(ステップS79のY)、次に優先度が低いアプリケーションを検索し(ステップS80)、ステップS72に戻り、同様の処理を繰り返す。他にアプリケーションがなくなった場合は(ステップS79のN)、メモリ不足としてエラーを返す。   If there is no required memory usage 34 in step S73 of FIG. 9, if forced termination is not successful in step S75, or if the remaining amount of system memory has not yet reached the requested memory amount in step S78, another application is added in step S79. Check if there is any. If there is another application (Y in step S79), the application with the next lowest priority is searched (step S80), the process returns to step S72, and the same processing is repeated. If there are no more applications (N in step S79), an error is returned as a memory shortage.

以上のように実施例2では、全てのアプリケーションのワークメモリを解放してもなお必須メモリが確保できない場合に、優先度の低いアプリケーションから順に強制的に終了させることで、要求された所定のメモリ量を確保することができる。   As described above, in the second embodiment, when the required memory cannot be secured even if the work memory of all applications is released, the predetermined memory requested is forcibly terminated in order from the application with the lowest priority. The amount can be secured.

さらに、実施例2において、必須メモリとワークメモリのような区分けを2レベルに限定せずに、メモリをnレベル(nは3以上の自然数)に分けて管理し、メモリの確保時にレベルを指定し、メモリ強制解放手段で解放する際にも、メモリのレベルを指定して解放するような構成とすることもできる。   Further, in the second embodiment, the memory is divided into n levels (n is a natural number of 3 or more), and the level is specified when the memory is secured, without limiting the division of the essential memory and the work memory to two levels. Even when the memory is forcibly released by the memory forcible release means, the memory level can be specified and released.

本発明の実施例に係る端末装置のメモリ負荷制御機能の構成を示すブロック図である。It is a block diagram which shows the structure of the memory load control function of the terminal device which concerns on the Example of this invention. 本発明の実施例に係るメモリ確保部の動作を表すフローチャートである。It is a flowchart showing operation | movement of the memory securing part based on the Example of this invention. 本発明の実施例に係るメモリ解放部の動作を表すフローチャートである。It is a flowchart showing operation | movement of the memory release part which concerns on the Example of this invention. 本発明の第1の実施例に係るメモリ量管理部の動作を表す第1のフローチャートである。It is a 1st flowchart showing operation | movement of the memory amount management part which concerns on 1st Example of this invention. 本発明の第1の実施例に係るメモリ量管理部の動作を表す第2のフローチャートである。It is a 2nd flowchart showing operation | movement of the memory amount management part which concerns on 1st Example of this invention. 本発明の第1の実施例に係るメモリ量管理部でメモリの解放を通知する場合の動作を表すフローチャートである。It is a flowchart showing operation | movement in the case of notifying memory release in the memory amount management part which concerns on 1st Example of this invention. 本発明の実施例に係るメモリ強制解放部の動作を表すフローチャートである。It is a flowchart showing operation | movement of the memory forced release part which concerns on the Example of this invention. 本発明の第2の実施例に係るメモリ量管理部の動作を表す第1のフローチャートである。It is a 1st flowchart showing operation | movement of the memory amount management part which concerns on 2nd Example of this invention. 本発明の第2の実施例に係るメモリ量管理部の動作を表す第2のフローチャートである。It is a 2nd flowchart showing operation | movement of the memory amount management part which concerns on 2nd Example of this invention.

符号の説明Explanation of symbols

10 システムメモリ
11 メモリ確保部
12 メモリ解放部
13 メモリ量管理部
14 メモリ強制解放部
15 メモリ情報記憶域
16 システムメモリ残量
17 管理情報
20 アプリケーション群
31 プロセスID
32 優先度
33 必須メモリ上限値
34 必須メモリ使用量
35 ワークメモリ使用量
DESCRIPTION OF SYMBOLS 10 System memory 11 Memory securing part 12 Memory release part 13 Memory amount management part 14 Memory forced release part 15 Memory information storage area 16 Remaining system memory 17 Management information 20 Application group 31 Process ID
32 Priority 33 Required memory upper limit 34 Required memory usage 35 Work memory usage

Claims (14)

システムメモリを制御してアプリケーションプログラムを実行する端末装置であって、
システムメモリ残量と各アプリケーションプログラムの使用メモリ量とを管理し、前記システムメモリ残量がメモリの確保要求量を下回る際に、選択した所定のアプリケーションプログラムの使用するシステムメモリの一部もしくはすべてを解放するようにメモリ強制解放部に通知するメモリ量管理部と、
アプリケーションプログラムからメモリの確保要求を受け、前記メモリ量管理部に要求メモリ量が確保可能かのチェックを依頼して確保可能であれば前記要求メモリ量を確保するメモリ確保部と、
アプリケーションプログラムからシステムメモリの解放要求を受けて使用しているシステムメモリを解放し、前記メモリ量管理部にシステムメモリを解放したことを通知するメモリ解放部と、
前記メモリ量管理部からの通知を受けて、前記選択したアプリケーションプログラムに対しシステムメモリを強制解放させるメモリ強制解放部と、
を備えることを特徴とする端末装置。
A terminal device that controls system memory and executes application programs,
Manages the remaining amount of system memory and the amount of memory used by each application program. When the remaining amount of system memory falls below the amount of memory reservation required, a part or all of the system memory used by the selected application program selected A memory amount management unit that notifies the memory forced release unit to release,
A memory securing unit that receives a memory securing request from an application program, asks the memory amount management unit to check whether the requested memory amount can be secured, and secures the requested memory amount if it can be secured;
A memory release unit that releases a system memory being used in response to a request to release a system memory from an application program, and notifies the memory amount management unit that the system memory has been released;
In response to the notification from the memory amount management unit, forcibly releasing system memory for the selected application program;
A terminal device comprising:
前記メモリ量管理部は、アプリケーションプログラム毎に対応付けられた優先度を記憶する記憶部を備え、記憶されている前記優先度に基づいて前記所定のアプリケーションプログラムを選択することを特徴とする請求項1記載の端末装置。   The memory amount management unit includes a storage unit that stores a priority associated with each application program, and selects the predetermined application program based on the stored priority. The terminal device according to 1. システムのメモリ過負荷時にアプリケーションプログラムの使用中のシステムメモリを解放する場合に、前記アプリケーションが最低限動作可能なシステムメモリを残して解放することを特徴とする請求項1記載の端末装置。   2. The terminal device according to claim 1, wherein when the system memory in use of the application program is released when the system memory is overloaded, the system memory is released leaving a system memory that can be operated at a minimum. 前記メモリ量管理部は、アプリケーションプログラムの使用するシステムメモリをnレベル(nは2以上の整数)に分けて管理し、前記メモリ確保部は、システムメモリを確保の際に前記nレベルの一つを指定し、前記メモリ解放部は、アプリケーションプログラムの使用中のシステムメモリを解放する際にnレベルの一つを指定することを特徴とする請求項1記載の端末装置。   The memory amount management unit manages the system memory used by the application program by dividing it into n levels (n is an integer of 2 or more), and the memory securing unit is one of the n levels when securing the system memory. 2. The terminal device according to claim 1, wherein the memory releasing unit specifies one of n levels when releasing the system memory in use of the application program. 前記メモリ量管理部は、システムメモリを、アプリケーションプログラム毎に前記アプリケーションプログラムが最低限動作するのに必要な第1のメモリと、処理を中断すれば解放可能な第2のメモリとに分けて管理することを特徴とする請求項1記載の端末装置。   The memory amount management unit manages the system memory separately for each application program into a first memory necessary for the application program to operate at a minimum and a second memory that can be released if the process is interrupted. The terminal device according to claim 1, wherein: 前記メモリ量管理部は、アプリケーションプログラムの使用中のシステムメモリを解放する際に前記第2のメモリを優先的に解放するように制御することを特徴とする請求項5記載の端末装置。   The terminal device according to claim 5, wherein the memory amount management unit performs control so that the second memory is preferentially released when the system memory in use of the application program is released. 端末装置がシステムメモリを制御する方法であって、
アプリケーションプログラムからシステムメモリの確保要求を確保要求量と共に受け取るステップと、
システムメモリ残量と各アプリケーションプログラムの使用メモリ量とを管理し、前記システムメモリ残量が前記確保要求量を下回るか否かをチェックするステップと、
前記確保要求量を下回る場合に、優先度に応じて選択した所定のアプリケーションプログラムの使用するシステムメモリの一部もしくはすべてを解放するステップと、
を含むことを特徴とするメモリ制御方法。
A method in which a terminal device controls system memory,
Receiving a system memory allocation request from the application program together with the allocation request amount;
Managing the remaining amount of system memory and the amount of memory used by each application program, and checking whether the remaining amount of system memory is less than the required amount of reservation;
Releasing a part or all of the system memory used by the predetermined application program selected according to the priority when it falls below the secured request amount;
A memory control method comprising:
前記システムメモリは、前記アプリケーションプログラムが最低限動作するのに必要な第1のメモリと、処理を中断すれば解放可能な第2のメモリとに分けてアプリケーションプログラム毎に管理され、前記所定のアプリケーションプログラムの使用中のシステムメモリを解放する際に前記第2のメモリを優先的に解放することを特徴とする請求項7記載のメモリ制御方法。   The system memory is managed for each application program by dividing the system memory into a first memory required for the minimum operation of the application program and a second memory that can be released if the process is interrupted. 8. The memory control method according to claim 7, wherein the second memory is preferentially released when the system memory in use of the program is released. 端末装置がシステムメモリを制御する方法であって、
前記システムメモリを、アプリケーションプログラムが最低限動作するのに必要な第1メモリと、処理を中断すれば解放可能な第2メモリとに分けてアプリケーションプログラム毎に管理するステップと、
アプリケーションプログラムからシステムメモリの確保要求を要求メモリ量と共に受け取るステップと、
優先度の最も低いアプリケーションプログラムを検索するステップと、
前記検索したアプリケーションプログラムの前記第2メモリの使用量があるか否かをチェックするステップと、
前記第2メモリの使用量がある場合、前記第2メモリを強制解放させるステップと、
システムメモリの残量に強制解放した前記第2メモリの使用量を加算するステップと、
前記探索したアプリケーションプログラムについて管理されている前記第2メモリの使用量をクリアするステップと、
前記探索したアプリケーションプログラムの前記第2メモリの使用量がない場合、あるいはシステムメモリの残量がまだ前記要求メモリ量に達しない場合、他にアプリケーションがあるか否かをチェックするステップと、
他にアプリケーションプログラムがあれば、次に優先度が低いアプリケーションプログラムを検索し、前記第2メモリの使用量があるか否かをチェックするステップに戻るステップと、
を含むことを特徴とするメモリ制御方法。
A method in which a terminal device controls system memory,
Managing the system memory for each application program by dividing the system memory into a first memory required for the minimum operation of the application program and a second memory that can be released if the process is interrupted;
Receiving a system memory allocation request from an application program together with the requested memory amount;
Searching for the lowest priority application program;
Checking whether there is a usage amount of the second memory of the searched application program;
Forcibly releasing the second memory when there is a usage amount of the second memory;
Adding the usage amount of the second memory forcedly released to the remaining amount of system memory;
Clearing the usage amount of the second memory managed for the searched application program;
If there is no usage of the second memory of the searched application program, or if the remaining amount of system memory has not yet reached the requested memory, checking whether there is another application;
If there is another application program, searching for the next lowest priority application program and returning to the step of checking whether there is a usage amount of the second memory; and
A memory control method comprising:
請求項9記載のメモリ制御方法において、他にアプリケーションがあるか否かをチェックして、他にアプリケーションプログラムがない場合に、
優先度の最も低いアプリケーションプログラムを再び検索するステップと、
前記検索したアプリケーションプログラムの前記第1メモリの使用量があるか否かをチェックするステップと、
前記第1メモリの使用量がある場合、前記探索したアプリケーションプログラムを強制終了させ、前記探索したアプリケーションプログラムの抱えていたすべてのメモリを解放するステップと、
システムメモリの残量に強制終了で解放した前記第1メモリの使用量を加算するステップと、
前記探索したアプリケーションプログラムについて管理されている前記第1メモリの使用量をクリアするステップと、
前記探索したアプリケーションプログラムの前記第1メモリの使用量がない場合、あるいはシステムメモリの残量がまだ前記要求メモリ量に達しない場合、他にアプリケーションプログラムがあるか否かをチェックするステップと、
他にアプリケーションプログラムがあれば、次に優先度が低いアプリケーションプログラムを検索し、前記第1メモリの使用量があるか否かをチェックするステップに戻るステップとを、
をさらに含むことを特徴とするメモリ制御方法。
The memory control method according to claim 9, wherein it is checked whether there is another application, and when there is no other application program,
Re-searching for the lowest priority application program;
Checking whether there is a usage amount of the first memory of the searched application program;
If there is a usage amount of the first memory, forcibly terminating the searched application program and releasing all the memory held by the searched application program;
Adding the usage amount of the first memory released by forced termination to the remaining amount of system memory;
Clearing the usage amount of the first memory managed for the searched application program;
If there is no usage amount of the first memory of the searched application program, or if the remaining amount of system memory has not yet reached the requested memory amount, checking whether there is another application program;
If there is another application program, the next step is to search for the application program with the next lowest priority, and to return to the step of checking whether or not the first memory is used,
A memory control method, further comprising:
システムメモリを有する端末装置を構成するコンピュータに、
アプリケーションプログラムからシステムメモリの確保要求を確保要求量と共に受け取る処理と、
システムメモリ残量と各アプリケーションプログラムの使用メモリ量とを管理し、前記システムメモリ残量が前記確保要求量を下回るか否かをチェックする処理と、
前記確保要求量を下回る場合に、優先度に応じて選択した所定のアプリケーションプログラムの使用するシステムメモリの一部もしくはすべてを解放する処理と、
を実行させるプログラム。
In a computer constituting a terminal device having a system memory,
Processing to receive a system memory allocation request from an application program together with the allocation request amount;
A process of managing the remaining amount of system memory and the amount of memory used by each application program, and checking whether the remaining amount of system memory is less than the required amount of reservation;
A process of releasing a part or all of the system memory used by the predetermined application program selected according to the priority when it falls below the secured request amount;
A program that executes
前記システムメモリは、前記アプリケーションプログラムが最低限動作するのに必要な第1のメモリと、処理を中断すれば解放可能な第2のメモリとに分けてアプリケーションプログラム毎に管理され、前記所定のアプリケーションプログラムの使用中のシステムメモリを解放する際に前記第2のメモリを優先的に解放することを特徴とする請求項11記載のプログラム。   The system memory is managed for each application program by dividing the system memory into a first memory required for the minimum operation of the application program and a second memory that can be released if the process is interrupted. 12. The program according to claim 11, wherein the second memory is preferentially released when the system memory in use of the program is released. システムメモリを有する端末装置を構成するコンピュータに、
前記システムメモリを、アプリケーションプログラムが最低限動作するのに必要な第1メモリと、処理を中断すれば解放可能な第2メモリとに分けてアプリケーションプログラム毎に管理する処理と、
アプリケーションプログラムからシステムメモリの確保要求を要求メモリ量と共に受け取る処理と、
優先度の最も低いアプリケーションプログラムを検索する処理と、
前記検索したアプリケーションプログラムの前記第2メモリの使用量があるか否かをチェックする処理と、
前記第2メモリの使用量がある場合、前記第2メモリを強制解放させる処理と、
システムメモリの残量に強制解放した前記第2メモリの使用量を加算する処理と、
前記探索したアプリケーションプログラムについて管理されている前記第2メモリの使用量をクリアする処理と、
前記探索したアプリケーションプログラムの前記第2メモリの使用量がない場合、あるいはシステムメモリの残量がまだ前記要求メモリ量に達しない場合、他にアプリケーションがあるか否かをチェックする処理と、
他にアプリケーションプログラムがあれば、次に優先度が低いアプリケーションプログラムを検索し、前記第2メモリの使用量があるか否かをチェックする処理に戻る処理と、
を実行させるプログラム。
In a computer constituting a terminal device having a system memory,
A process of managing the system memory for each application program by dividing the system memory into a first memory required for the minimum operation of the application program and a second memory that can be released if the process is interrupted;
Processing to receive a system memory allocation request from an application program together with the requested memory amount;
A process for searching for the lowest priority application program;
Processing for checking whether or not there is a usage amount of the second memory of the searched application program;
A process for forcibly releasing the second memory when there is a usage amount of the second memory;
A process of adding the usage amount of the second memory forcibly released to the remaining amount of system memory;
A process of clearing the usage amount of the second memory managed for the searched application program;
If there is no usage of the second memory of the searched application program, or if the remaining amount of system memory has not yet reached the requested memory amount, a process of checking whether there is another application;
If there is another application program, search for the application program with the next lowest priority, and return to the process of checking whether there is a usage amount of the second memory; and
A program that executes
請求項13記載のプログラムにおいて、
他にアプリケーションがあるか否かをチェックして、他にアプリケーションプログラムがない場合に、
優先度の最も低いアプリケーションプログラムを再び検索する処理と、
前記検索したアプリケーションプログラムの前記第1メモリの使用量があるか否かをチェックする処理と、
前記第1メモリの使用量がある場合、前記探索したアプリケーションプログラムを強制終了させ、前記探索したアプリケーションプログラムの抱えていたすべてのメモリを解放する処理と、
システムメモリの残量に強制終了で解放した前記第1メモリの使用量を加算する処理と、
前記探索したアプリケーションプログラムについて管理されている前記第1メモリの使用量をクリアする処理と、
前記探索したアプリケーションプログラムの前記第1メモリの使用量がない場合、あるいはシステムメモリの残量がまだ前記要求メモリ量に達しない場合、他にアプリケーションプログラムがあるか否かをチェックする処理と、
他にアプリケーションプログラムがあれば、次に優先度が低いアプリケーションプログラムを検索し、前記第1メモリの使用量があるか否かをチェックする処理に戻る処理と、
をさらに実行させるプログラム。
The program according to claim 13, wherein
Check if there are other applications, and if there are no other application programs,
The process of searching for the lowest priority application program again;
A process of checking whether or not there is a usage amount of the first memory of the searched application program;
When there is a usage amount of the first memory, a process of forcibly terminating the searched application program and releasing all the memory held by the searched application program;
A process of adding the usage amount of the first memory released by forced termination to the remaining amount of system memory;
A process of clearing the usage amount of the first memory managed for the searched application program;
A process of checking whether there is another application program when there is no usage amount of the first memory of the searched application program, or when the remaining amount of system memory has not yet reached the requested memory amount;
If there is another application program, search for the application program with the next lowest priority, and return to the process of checking whether or not there is a usage amount of the first memory; and
A program that causes further execution.
JP2004294071A 2004-10-06 2004-10-06 Memory control method and program and terminal equipment Pending JP2006107197A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004294071A JP2006107197A (en) 2004-10-06 2004-10-06 Memory control method and program and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004294071A JP2006107197A (en) 2004-10-06 2004-10-06 Memory control method and program and terminal equipment

Publications (1)

Publication Number Publication Date
JP2006107197A true JP2006107197A (en) 2006-04-20

Family

ID=36376854

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004294071A Pending JP2006107197A (en) 2004-10-06 2004-10-06 Memory control method and program and terminal equipment

Country Status (1)

Country Link
JP (1) JP2006107197A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007001014A1 (en) * 2005-06-28 2007-01-04 Xanavi Informatics Corporation Information terminal, computer resource management method, and virtual machine execution switching method
JP2008097502A (en) * 2006-10-16 2008-04-24 Hitachi Ltd Capacity monitoring method and computer system
JP2009294695A (en) * 2008-06-02 2009-12-17 Hitachi Ltd Transaction parallel control method, database management system, and program
WO2010027089A1 (en) * 2008-09-08 2010-03-11 株式会社エヌ・ティ・ティ・ドコモ Information processing device and program
EP2180404A2 (en) 2008-10-23 2010-04-28 NTT DoCoMo, Inc. Information processing device and memory management method
WO2010050335A1 (en) * 2008-10-27 2010-05-06 株式会社 日立製作所 Resource management method and building-in device
JP2010117838A (en) * 2008-11-12 2010-05-27 Canon Inc Application platform, method for controlling the same, and program
CN103620548A (en) * 2011-06-20 2014-03-05 微软公司 Memory manager with enhanced application metadata
JP2016062536A (en) * 2014-09-22 2016-04-25 富士ゼロックス株式会社 Information processing apparatus
JP2017050634A (en) * 2015-08-31 2017-03-09 沖電気工業株式会社 Gateway device, communication connection management method, and program

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007011491A (en) * 2005-06-28 2007-01-18 Xanavi Informatics Corp Information terminal, computer resource management method, and method for switching execution of virtual machine
WO2007001014A1 (en) * 2005-06-28 2007-01-04 Xanavi Informatics Corporation Information terminal, computer resource management method, and virtual machine execution switching method
US8365180B2 (en) 2005-06-28 2013-01-29 Xanavi Informatics Corporation Information terminal, computer resource managing method, and virtual machine execution switching method
US8234480B2 (en) 2006-10-16 2012-07-31 Hitachi, Ltd. Storage capacity management system in dynamic area provisioning storage
JP2008097502A (en) * 2006-10-16 2008-04-24 Hitachi Ltd Capacity monitoring method and computer system
US8296544B2 (en) 2006-10-16 2012-10-23 Hitachi, Ltd. Storage capacity management system in dynamic area provisioning storage
JP2009294695A (en) * 2008-06-02 2009-12-17 Hitachi Ltd Transaction parallel control method, database management system, and program
JP4612710B2 (en) * 2008-06-02 2011-01-12 株式会社日立製作所 Transaction parallel control method, database management system, and program
WO2010027089A1 (en) * 2008-09-08 2010-03-11 株式会社エヌ・ティ・ティ・ドコモ Information processing device and program
JP2010066835A (en) * 2008-09-08 2010-03-25 Ntt Docomo Inc Information processing apparatus and program
US8661445B2 (en) 2008-09-08 2014-02-25 Ntt Docomo, Inc. Information-processing device and program
EP2180404A2 (en) 2008-10-23 2010-04-28 NTT DoCoMo, Inc. Information processing device and memory management method
US8234708B2 (en) 2008-10-23 2012-07-31 Ntt Docomo, Inc. Information processing device and memory management method
CN102197378B (en) * 2008-10-27 2014-03-26 株式会社日立制作所 Resource management method and building-in device
JP5156838B2 (en) * 2008-10-27 2013-03-06 株式会社日立製作所 Resource management method and embedded device
WO2010050335A1 (en) * 2008-10-27 2010-05-06 株式会社 日立製作所 Resource management method and building-in device
CN102197378A (en) * 2008-10-27 2011-09-21 株式会社日立制作所 Resource management method and building-in device
US8843934B2 (en) 2008-10-27 2014-09-23 Hitachi, Ltd. Installing and executing new software module without exceeding system resource amount
JP2010117838A (en) * 2008-11-12 2010-05-27 Canon Inc Application platform, method for controlling the same, and program
CN103620548A (en) * 2011-06-20 2014-03-05 微软公司 Memory manager with enhanced application metadata
JP2014517434A (en) * 2011-06-20 2014-07-17 マイクロソフト コーポレーション Computer-implemented method and computer system
US9558040B2 (en) 2011-06-20 2017-01-31 Microsoft Technology Licensing, Llc Memory manager with enhanced application metadata
CN103620548B (en) * 2011-06-20 2017-07-28 微软技术许可有限责任公司 Memory manager with enhanced application metadata
JP2016062536A (en) * 2014-09-22 2016-04-25 富士ゼロックス株式会社 Information processing apparatus
JP2017050634A (en) * 2015-08-31 2017-03-09 沖電気工業株式会社 Gateway device, communication connection management method, and program

Similar Documents

Publication Publication Date Title
US8429666B2 (en) Computing platform with resource constraint negotiation
US9021217B2 (en) Communication apparatus, load distribution method, and recording medium
CN112269641B (en) Scheduling method, scheduling device, electronic equipment and storage medium
JPWO2006100752A1 (en) Distributed processing management apparatus, distributed processing management method, distributed processing management program
JP2007026094A (en) Execution device and application program
CN115562877B (en) Arranging method, device and equipment of distributed computing power resources and storage medium
JP2006107197A (en) Memory control method and program and terminal equipment
CN110750336A (en) OpenStack virtual machine memory hot-expanding method
CN117149414A (en) Task processing method and device, electronic equipment and readable storage medium
CN116185623A (en) Task allocation method and device, electronic equipment and storage medium
JP2007328413A (en) Method for distributing load
JP2004030567A (en) Method and system for maintaining queue
JPH08221372A (en) Free resource management device in distributed processing system
JP2007179246A (en) Method, program and server for computer management
WO2014188642A1 (en) Scheduling system, scheduling method, and recording medium
JP5617586B2 (en) Information processing program, relay device, and relay management device
KR20160061726A (en) Method for handling interrupts
JP2014078214A (en) Schedule system, schedule method, schedule program, and operating system
JP6191361B2 (en) Information processing system, information processing system control method, and control program
JP2006065430A (en) Method for varying virtual computer performance
CN113535378A (en) Resource allocation method, storage medium and terminal equipment
CN112995613B (en) Analysis resource management method and device
JP2010182017A (en) Distributed computer system, manager succession method and manager succession program
JP2003186686A (en) Resource control apparatus, method and recording medium
JP2005115620A (en) Task management method and electronic apparatus having task management means

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070911

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090708

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090929

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100302