JP5245231B2 - MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT DEVICE, AND PROGRAM - Google Patents
MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT DEVICE, AND PROGRAM Download PDFInfo
- Publication number
- JP5245231B2 JP5245231B2 JP2006243334A JP2006243334A JP5245231B2 JP 5245231 B2 JP5245231 B2 JP 5245231B2 JP 2006243334 A JP2006243334 A JP 2006243334A JP 2006243334 A JP2006243334 A JP 2006243334A JP 5245231 B2 JP5245231 B2 JP 5245231B2
- Authority
- JP
- Japan
- Prior art keywords
- memory
- application
- memory management
- window
- window system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
本発明は、効率的にメモリを管理するための技術に関する。 The present invention relates to a technique for efficiently managing a memory.
メモリ不足時にスワップアウトさせるメモリを決定するアルゴリズムはさまざまある。 There are various algorithms for determining the memory to be swapped out when memory is insufficient.
また、ページ置換方式には、NRU(Not Recently Used)や、LRU(Least Recently Used)、NFU(Not Frequently used)などさまざまあるが、オペレーティングシステム(OS)側の判断だけでは最適なページ置換の実現は困難であった。 There are various page replacement methods such as NRU (Not Recently Used), LRU (Least Recently Used), and NFU (Not Frequently used), but optimal page replacement is realized only by the judgment of the operating system (OS). Was difficult.
ここで、全てのプロセスに対して、利用している物理ページ数がプロセス自身が要求したページ数を下回らずかつ利用している物理ページ数と利用したい物理ページ数の差が最も大きいプロセスを見つけ出し、見つけ出したプロセスの中から最も利用頻度の低い物理ページを見つけ、最も利用頻度の低い物理ページの内容を補助記憶部にスワップアウトし空き物理ページを作り出し、所定の仮想アドレスと物理メモリアドレスをマップし、物理ページに適切な内容を読込むことで、資源浪費型DOS攻撃を防御しかつ使用効率を高めることが可能となるメモリ管理方法を提供することができる技術が提案されている(例えば、特許文献1参照)。
しかしながらOSにおいて、すべてのケースで最適となるアルゴリズムの実装は困難であった。 However, in the OS, it has been difficult to implement an algorithm that is optimal in all cases.
本発明は、以上説明した問題点を解決するためになされたものである。その目的は、OSに複雑なアルゴリズムを用いて検索することなく、開放すべきメモリを特定させることである。 The present invention has been made to solve the above-described problems. The purpose is to allow the OS to specify the memory to be released without searching using a complex algorithm.
本発明のメモリ管理方法は、仮想記憶を具備し、第1アプリケーションのウインドウのクローズ要求を契機として、前記第1アプリケーションが確保していたメモリが開放できることを、前記要求を受けたウインドウシステムが、OSのメモリ管理部へ通知し、前記OSのメモリ管理部は、第2アプリケーションによりメモリ不足が発生した際に前記第1アプリケーションが確保していたメモリを開放する。 Memory management method of the invention comprises a virtual memory, in response to the close request of a first application window, that the memory in which the first application was ensured can be opened, a window system that received the request, The memory management unit of the OS notifies the memory management unit of the OS, and the memory management unit of the OS releases the memory reserved by the first application when the memory shortage occurs by the second application .
また、本発明のメモリ管理方法は、ウインドウシステムは、ウインドウのスタック情報から予めページインする機能を持つ。Further, in the memory management method of the present invention, the window system has a function of page-in in advance from window stack information.
また、本発明のメモリ管理方法は、あらかじめウインドウ生成時に、使用頻度をウインドウシステムへ登録する。 The memory management method of the present invention registers the frequency of use in the window system in advance when a window is generated .
本発明のメモリ管理装置は、仮想記憶を具備し、第1アプリケーションのウインドウのクローズ要求を契機として、前記第1アプリケーションが確保していたメモリが開放できることを、前記要求を受けたウインドウシステムが、OSのメモリ管理部へ通知し、前記OSのメモリ管理部は、第2アプリケーションによりメモリ不足が発生した際に前記第1アプリケーションが確保していたメモリを開放する。 Memory management apparatus of the present invention comprises a virtual memory, in response to the close request of a first application window, that the memory in which the first application was ensured can be opened, a window system that received the request, The memory management unit of the OS notifies the memory management unit of the OS, and the memory management unit of the OS releases the memory reserved by the first application when the memory shortage occurs by the second application .
また、本発明のメモリ管理装置は、ウインドウシステムは、ウインドウのスタック情報から予めページインする機能を持つ。In the memory management device of the present invention, the window system has a function of performing page-in in advance from the stack information of the window.
本発明のメモリ管理装置は、あらかじめウインドウ生成時に、使用頻度をウインドウシステムへ登録する。 The memory management device of the present invention registers the usage frequency in the window system in advance when a window is generated.
本発明のプログラムは、仮想記憶を具備するメモリ管理装置の機能を実現させるため、コンピュータに、第1アプリケーションのウインドウのクローズ要求を契機として、前記第1アプリケーションが確保していたメモリが開放できることを、前記要求を受けたウインドウシステムが、OSのメモリ管理部へ通知し、前記OSのメモリ管理部は、第2アプリケーションによりメモリ不足が発生した際に前記第1アプリケーションが確保していたメモリを開放する、機能を実現させる。
The program according to the present invention allows the computer to release the memory reserved by the first application in response to a request to close the window of the first application, in order to realize the function of the memory management device having virtual memory. , window system that received the request, and notifies the memory management unit of the OS, the memory management unit of the OS is free the memory that the first application was secured when the memory shortage occurs due to the second application To realize the function.
本発明によれば、OSに複雑なアルゴリズムを用いて検索することなく、開放すべきメモリを特定させることができる。 According to the present invention, it is possible to specify the memory to be released without searching the OS using a complicated algorithm.
以下、本発明の第1の実施の形態について図面を参照して詳細に説明する。グラフィカルなユーザインターフェース(GUI)を備えた機器において、ウインドウを管理しているプログラム(ウインドウシステム)を具備したシステムおいて、図1を用いて例を示す。 Hereinafter, a first embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 shows an example of a system having a program (window system) for managing windows in a device having a graphical user interface (GUI).
状態101からアプリケーション103のプロセスが常駐したままウインドウが閉じられると、アプリケーション104が表示されることになる。この時、メモリの不足が発生した場合、もっとも最近使用したアプリケーション103が使用したメモリをスワップアウトしたほうが得策であるが、OSでは判別できず、もっとも使用していないメモリなどを開放するなどの各種アルゴリズムを用いて開放することになる。 When the window is closed from the state 101 while the process of the application 103 is resident, the application 104 is displayed. At this time, if a memory shortage occurs, it is better to swap out the memory used by the most recently used application 103. However, it is not possible for the OS to determine, and various types of memory such as releasing the least used memory are available. It will be released using an algorithm.
本実施の形態では、ウインドウシステムが明示的にアプリケーション103のメモリを開放するようにOSに通知することにより、効率よくメモリを回収できる。 In the present embodiment, the memory can be efficiently collected by notifying the OS that the window system explicitly releases the memory of the application 103.
図2において、本実施の形態におけるメモリ管理装置は、ページングによるメモリ管理機能を有するOSと、グラフィカルユーザインターフェースを提供するウインドウシステムと、複数のアプリケーションからなる。ここではアプリケーション1、アプリケーション2、およびアプリケーション3がある。
2, the memory management device according to the present embodiment includes an OS having a memory management function by paging, a window system that provides a graphical user interface, and a plurality of applications. Here, there are
次に、本実施の形態の動作を図面を参照して説明する。 Next, the operation of the present embodiment will be described with reference to the drawings.
図4の状態401が示すようにアプリケーション1が現在表示されており、アプリケーション2がアプリケーション1の後ろに隠れて表示されていない状態である。
As shown in the state 401 in FIG. 4, the
図3によると、アプリケーション1のウインドウを閉じるとき、アプリケーションはウインドウシステムへクローズを要求する。
According to FIG. 3, when closing the window of
ウインドウシステムは要求に従いアプリケーション1のウインドウを閉じると同時にアプリケーション1が確保しているメモリを優先的にスワップアウト可能であることをOSに通知する。
The window system closes the window of the
アプリケーション1のウインドウが閉じたことにより、アプリケーション2が表示される。
表示する過程においてメモリ不足が発生した場合、OSはアプリケーション1が使用していたメモリを開放することにより、検索に時間をかけることなく、効果的にメモリを開放できる。
When a memory shortage occurs in the display process, the OS can free the memory effectively without taking time for the search by releasing the memory used by the
最終的に、図4の状態402のようになる。 Finally, the state 402 in FIG. 4 is obtained.
アプリケーション1が使用していたメモリは直前まで使用していたので、LRUなどのアルゴリズムでは正しく選択することが出来ない。
Since the memory used by the
上記の本実施の形態によれば、OSは複雑なアルゴリズムを用いて検索することなく、開放すべきメモリを特定できる。 According to the above-described embodiment, the OS can specify the memory to be released without searching using a complicated algorithm.
また、ウインドウシステムで一括管理するため、個々のアプリケーションが意識する必要がない。 In addition, since it is collectively managed by the window system, it is not necessary for each application to be aware of it.
さらに、本方法ではユーザの操作に連動可能であるので、操作の過程におけるもたつき感などが軽減可能であり、感応的な速度向上が見込める。 Furthermore, since this method can be interlocked with the user's operation, it is possible to reduce the feeling of stickiness in the operation process and to expect a sensitive speed increase.
次に、本発明の第2の実施の形態について説明する。 Next, a second embodiment of the present invention will be described.
図2、図3、および図4の説明ではGUI画面をアプリケーションが2つでの例示であったが、実際にはタイマー機能、キーボードなどの入力機器を制御する機能などさまざまなプログラムが動作している。 In the description of FIG. 2, FIG. 3, and FIG. 4, the GUI screen is an example with two applications. Yes.
図4の状態402を見ると、アプリケーション2が終了後に表示されるのはアプリケーション3である可能性が高いことが想定できる。よって、アプリケーション3がもしページアウトされていた場合、アプリケーション2を表示後に事前にウインドウシステムがOSへアプリケーション3のページインを示唆することにより、ウインドウのスタック情報(重なり)を意識し、アプリケーション2が閉じたときに、もたつくことがなくアプリケーション3が処理可能となる。
Looking at the state 402 in FIG. 4, it can be assumed that the application 3 is likely to be displayed after the
このように、前述したページアウトすべきメモリだけでなく、あらかじめページインしておくべきメモリも検索可能である。 In this way, not only the memory to be paged out, but also the memory to be paged in advance can be searched.
次に、本発明の第3の実施の形態について説明する。 Next, a third embodiment of the present invention will be described.
指定時間にメッセージを表示するなど、アプリケーションの性格から、あらかじめ頻度が分かる場合がある。 The frequency may be known in advance from the nature of the application, such as displaying a message at a specified time.
このようなときにウインドウシステムに頻度を登録するI/Fを設けておき、常に優先的にスワップアウト可能とすることで、特殊なアルゴリズムを用いることなく頻度に応じてメモリを効率的に管理することも可能である。 In such a case, an I / F for registering the frequency in the window system is provided, and the memory can be efficiently managed according to the frequency without using a special algorithm by always preferentially allowing swap-out. It is also possible.
なお、上述する各実施の形態は、本発明の好適な実施の形態であり、本発明の要旨を逸脱しない範囲内において種々変更実施が可能である。例えば、メモリ管理装置の機能を実現するためのプログラムを装置に読込ませて実行することにより装置の機能を実現する処理を行ってもよい。さらに、そのプログラムは、コンピュータ読み取り可能な記録媒体であるCD−ROMまたは光磁気ディスクなどを介して、または伝送媒体であるインターネット、電話回線などを介して伝送波により他のコンピュータシステムに伝送されてもよい。 Each of the above-described embodiments is a preferred embodiment of the present invention, and various modifications can be made without departing from the scope of the present invention. For example, processing for realizing the function of the device may be performed by causing the device to read and execute a program for realizing the function of the memory management device. Further, the program is transmitted to another computer system by a transmission wave via a computer-readable recording medium such as a CD-ROM or a magneto-optical disk, or via a transmission medium such as the Internet or a telephone line. Also good.
また、本発明はグラフィカルユーザインターフェースを持つ、携帯電話機などの組み込み機器にも適用可能である。 The present invention can also be applied to an embedded device such as a mobile phone having a graphical user interface.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006243334A JP5245231B2 (en) | 2006-09-07 | 2006-09-07 | MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT DEVICE, AND PROGRAM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006243334A JP5245231B2 (en) | 2006-09-07 | 2006-09-07 | MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT DEVICE, AND PROGRAM |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008065638A JP2008065638A (en) | 2008-03-21 |
JP5245231B2 true JP5245231B2 (en) | 2013-07-24 |
Family
ID=39288303
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006243334A Expired - Fee Related JP5245231B2 (en) | 2006-09-07 | 2006-09-07 | MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT DEVICE, AND PROGRAM |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5245231B2 (en) |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02146646A (en) * | 1988-11-29 | 1990-06-05 | Nec Corp | Virtual memory controller |
JPH05241755A (en) * | 1992-02-29 | 1993-09-21 | Fujitsu Ltd | Variable storage area control method |
JPH08297748A (en) * | 1995-04-27 | 1996-11-12 | Canon Inc | Method and device for analysis data display |
JPH08314791A (en) * | 1995-05-12 | 1996-11-29 | Pfu Ltd | Memory allocation processing method in application |
JPH0997158A (en) * | 1995-09-29 | 1997-04-08 | Sanyo Electric Co Ltd | Screen transition control method |
JPH1185443A (en) * | 1997-09-01 | 1999-03-30 | Casio Comput Co Ltd | Window display device and storage medium |
US6247042B1 (en) * | 1997-09-24 | 2001-06-12 | Microsoft Corporation | Method and system for restoring the state of physical memory as the focus changes among application programs in a computer |
JP3726701B2 (en) * | 2001-04-27 | 2005-12-14 | 日本電気株式会社 | Kernel space demand paging swap-out method and method |
US6910106B2 (en) * | 2002-10-04 | 2005-06-21 | Microsoft Corporation | Methods and mechanisms for proactive memory management |
JP2006048422A (en) * | 2004-08-05 | 2006-02-16 | Matsushita Electric Ind Co Ltd | Loading apparatus, loading method, loading program, and computer readable recording medium for recording loading program |
-
2006
- 2006-09-07 JP JP2006243334A patent/JP5245231B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2008065638A (en) | 2008-03-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11663134B2 (en) | Method, device and computer program product for implementing file system | |
Lee et al. | A log buffer-based flash translation layer using fully-associative sector translation | |
WO2018059079A1 (en) | Memory management method and apparatus | |
US7571286B2 (en) | Reduced memory traffic via detection and tracking of temporally silent stores | |
JP5550742B2 (en) | Domain-based cache coherence protocol | |
WO2014176981A1 (en) | Cross-page prefetching method, device and system | |
JP5583274B2 (en) | Method for managing computer memory, corresponding computer program product, and data storage device therefor | |
JP2011108102A (en) | Web server, web browser and web system | |
CN1622060A (en) | Lazy flushing of translation lookaside buffers | |
CN105677580A (en) | Method and device for accessing cache | |
CN113590500B (en) | Memory management method and terminal equipment | |
CN109857573B (en) | Data sharing method, device, equipment and system | |
WO2016015583A1 (en) | Memory management method and device, and memory controller | |
CN114185494B (en) | Memory anonymous page processing method, electronic device and readable storage medium | |
CN103049393B (en) | Memory headroom management method and device | |
CN107797772A (en) | A kind of garbage retrieving system and method based on flash media | |
JP2016524228A (en) | Storage system and alias memory | |
CN107102900B (en) | Management method of shared memory space | |
CN103019956B (en) | A kind of to data cached method of operating and device | |
US7831780B2 (en) | Operating system supplemental disk caching system and method | |
US8751724B2 (en) | Dynamic memory reconfiguration to delay performance overhead | |
JP7160792B2 (en) | Systems and methods for storing cache location information for cache entry transfers | |
KR100582340B1 (en) | Dynamic frequent instruction line cache | |
CN112181275A (en) | A data processor and data processing method | |
JP5245231B2 (en) | MEMORY MANAGEMENT METHOD, MEMORY MANAGEMENT DEVICE, AND PROGRAM |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090812 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20110919 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120328 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120410 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120611 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120724 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120924 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20121113 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130212 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20130219 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130312 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130325 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160419 Year of fee payment: 3 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |