JP5077209B2 - Memory management device, memory management method and program - Google Patents

Memory management device, memory management method and program Download PDF

Info

Publication number
JP5077209B2
JP5077209B2 JP2008308321A JP2008308321A JP5077209B2 JP 5077209 B2 JP5077209 B2 JP 5077209B2 JP 2008308321 A JP2008308321 A JP 2008308321A JP 2008308321 A JP2008308321 A JP 2008308321A JP 5077209 B2 JP5077209 B2 JP 5077209B2
Authority
JP
Japan
Prior art keywords
page
storage unit
priority
data
pages
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008308321A
Other languages
Japanese (ja)
Other versions
JP2010134584A (en
Inventor
正太郎 河野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2008308321A priority Critical patent/JP5077209B2/en
Publication of JP2010134584A publication Critical patent/JP2010134584A/en
Application granted granted Critical
Publication of JP5077209B2 publication Critical patent/JP5077209B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

本発明はメモリ管理装置、メモリ管理方法およびプログラムに関し、特に、階層構造のメモリを管理するメモリ管理装置、メモリ管理方法およびプログラムに関する。   The present invention relates to a memory management device, a memory management method, and a program, and more particularly to a memory management device, a memory management method, and a program for managing a hierarchical memory.

仮想記憶あるいはキャッシュなど、複数のページを含む第1の記憶部と複数のページを含む第2の記憶部とを含む階層化された記憶手段を管理するメモリ管理の技術がある(例えば、非特許文献1)。   There is a memory management technique for managing a hierarchical storage unit including a first storage unit including a plurality of pages and a second storage unit including a plurality of pages, such as a virtual storage or a cache (for example, non-patent) Reference 1).

このようなメモリ管理の技術において、ページフォールト発生時にスワップアウトするページを選択する技術として、実記憶のページのうち最後に参照されてからの経過時間が最大のページを選択するLRU(Least Recently Used)、あるいは実記憶のページのうち最も古くから存在するページを選択するFIFO(First In First Out)などのページ置換アルゴリズムがある。   In such a memory management technique, as a technique for selecting a page to be swapped out when a page fault occurs, an LRU (Least Recently Used) that selects a page having the longest elapsed time since the last reference was made among the pages of real storage. ), Or a page replacement algorithm such as FIFO (First In First Out) for selecting the oldest existing page from real storage pages.

例えば、特許文献1記載のキャッシュ制御装置は、キャッシュ上のデータブロック毎に複数の状態情報を保持しており、これらの状態情報に基づいてリプレース(置換)するデータブロックを決定する。   For example, the cache control device described in Patent Document 1 holds a plurality of state information for each data block on the cache, and determines a data block to be replaced (replaced) based on the state information.

また、特許文献2記載のオンデマンド・ページング方式は、優先度別に設けられた使用中主記憶管理テーブルエントリーキューを有し、メモリページを割り付けられたタスクの優先度に対応する使用中主記憶管理テーブルエントリーキューに、割り付けたメモリページに対応する主記憶管理テーブルを接続する。そして、このオンデマンド・ページング方式において、割り付け済みのページを空にする場合には、優先度の低い使用中主記憶管理テーブルエントリーキューに接続された主記憶管理テーブルに対応するページが空にするページとして選択される。   In addition, the on-demand paging method described in Patent Document 2 has an in-use main memory management table entry queue provided for each priority, and in-use main memory management corresponding to the priority of a task to which a memory page is allocated. A main memory management table corresponding to the allocated memory page is connected to the table entry queue. In this on-demand paging method, when the allocated page is emptied, the page corresponding to the main memory management table connected to the low-priority in-use main memory management table entry queue is emptied. Selected as a page.

また、特許文献3記載の情報記憶装置は、キャッシュメモリブロックをクリーンデータであるかダーティデータであるかに基づいて障害後の復旧の優先度を決定する機能を有している。   The information storage device described in Patent Document 3 has a function of determining a recovery priority after a failure based on whether the cache memory block is clean data or dirty data.

さらに、特許文献4記載の先取りキャッシュ書戻しの方法と装置は、所定の時間間隔でキャッシュエントリをチェックし、汚れていて書き込みから一定時間以上経過しているキャッシュエントリを書き戻す機能を有している。   Furthermore, the prefetch cache write-back method and apparatus described in Patent Document 4 has a function of checking a cache entry at a predetermined time interval, and writing back a cache entry that has been dirty and has passed a predetermined time or more. Yes.

特許第3309425号公報Japanese Patent No. 3309425 特開平05−035513号公報JP 05-035513 A 特開平08−087450号公報Japanese Patent Laid-Open No. 08-087450 特開平10−232827号公報Japanese Patent Laid-Open No. 10-232827 坂井修一、「コンピュータアーキテクチャ」、2004年3月31日、5.キャッシュと仮想記憶 P70−P904. Shuichi Sakai, “Computer Architecture”, March 31, 2004; Cache and virtual memory P70-P90

しかしながら、上述した特許文献1−4に記載された装置、方式および方法に基づく技術では、優先度が高い処理であるにもかかわらずページフォールト発生時のスワップ動作に時間がかかり、処理が遅延する場合があるという問題があった。   However, in the technology based on the devices, methods, and methods described in Patent Documents 1-4 described above, the swap operation when a page fault occurs takes time despite the high priority processing, and the processing is delayed. There was a problem that there was a case.

例えば、車載システムの警告画面を表示するアプリケーション処理などは、動作の頻度は低い一方優先度は高い。このような処理により参照されるデータは、参照頻度が低いために、スワップ領域にスワップアウトされた状態にあることが多い。このため、アプリケーションが警告画面を表示する場合に実メモリ上の他のデータをスワップアウトする動作を行わなければならない状況が頻繁に発生し、このスワップアウト動作におけるスワップ領域への書き戻し動作の実行に時間を要するためにアプリケーションの処理が頻繁に遅延するという問題がある。   For example, application processing for displaying a warning screen of an in-vehicle system has a low operation frequency but a high priority. Data referred to by such processing is often swapped out to the swap area because the reference frequency is low. For this reason, when an application displays a warning screen, a situation frequently occurs in which it is necessary to swap out other data in the real memory, and the write-back operation to the swap area in this swap-out operation is executed. In this case, the processing of the application is frequently delayed because it takes time.

本発明の目的は、上述した問題を解決するメモリ管理装置、メモリ管理方法およびプログラムを提供することにある。   An object of the present invention is to provide a memory management device, a memory management method, and a program that solve the above-described problems.

本発明のメモリ管理装置は、複数のページを含む第1の記憶部と複数のページを含む第2の記憶部とを含む階層化された記憶手段に対するアクセスにおいてページフォールトが発生した場合に、
当該メモリアクセスの対象データが優先データであるか非優先データであるかを、前記対象データに予め割り当てられた優先度と予め定められた閾値とに基づいて判定し、前記対象データが前記優先データであると判定した場合に、前記第1の記憶部の複数のページの内、前記第2の記憶部の対応するページに格納されているデータと同一のデータを記憶したページのいずれか一つを選択し、
当該選択した前記第1の記憶部のページの識別情報を出力するページ選択部を有する。
The memory management device of the present invention, when a page fault occurs in access to a hierarchical storage means including a first storage unit including a plurality of pages and a second storage unit including a plurality of pages,
Whether the target data of the memory access is priority data or non-priority data is determined based on a priority assigned in advance to the target data and a predetermined threshold, and the target data is the priority data One of the plurality of pages stored in the first storage unit, the page storing the same data as the data stored in the corresponding page in the second storage unit. Select
A page selection unit that outputs identification information of the selected page of the first storage unit;

本発明のメモリ管理方法は、複数のページを含む第1の記憶部と複数のページを含む第2の記憶部とを含む階層化された記憶手段に対するアクセスにおいてページフォールトが発生した場合に、
当該メモリアクセスの対象データが優先データであるか非優先データであるかを、前記対象データに予め割り当てられた優先度と予め定められた閾値とに基づいて判定し、前記対象データが前記優先データであると判定した場合に、前記第1の記憶部の複数のページの内、前記第2の記憶部の対応するページに格納されているデータと同一のデータを記憶したページのいずれか一つを選択し、
当該選択した前記第1の記憶部のページの識別情報を出力する。
In the memory management method of the present invention, when a page fault occurs in an access to a hierarchical storage unit including a first storage unit including a plurality of pages and a second storage unit including a plurality of pages,
Whether the target data of the memory access is priority data or non-priority data is determined based on a priority assigned in advance to the target data and a predetermined threshold, and the target data is the priority data One of the plurality of pages stored in the first storage unit, the page storing the same data as the data stored in the corresponding page in the second storage unit. Select
The identification information of the selected page of the first storage unit is output.

本発明のプログラムは、複数のページを含む第1の記憶部と複数のページを含む第2の記憶部とを含む階層化された記憶手段に対するアクセスにおいてページフォールトが発生した場合に、
当該メモリアクセスの対象データが優先データであるか非優先データであるかを、前記対象データに予め割り当てられた優先度と予め定められた閾値とに基づいて判定し、前記対象データが前記優先データであると判定した場合に、前記第1の記憶部の複数のページの内、前記第2の記憶部の対応するページに格納されているデータと同一のデータを記憶したページのいずれか一つを選択し、
当該選択した前記第1の記憶部のページの識別情報を出力する。
The program of the present invention, when a page fault occurs in access to a hierarchical storage means including a first storage unit including a plurality of pages and a second storage unit including a plurality of pages,
Whether the target data of the memory access is priority data or non-priority data is determined based on a priority assigned in advance to the target data and a predetermined threshold, and the target data is the priority data One of the plurality of pages stored in the first storage unit, the page storing the same data as the data stored in the corresponding page in the second storage unit. Select
The identification information of the selected page of the first storage unit is output.

本発明によれば、優先度が高い処理においてページフォールトが発生した時のスワップ動作を高速化することが可能になる。   According to the present invention, it is possible to speed up a swap operation when a page fault occurs in a high priority process.

次に、本発明の第1の実施の形態について図面を参照して詳細に説明する。   Next, a first embodiment of the present invention will be described in detail with reference to the drawings.

図1は、本実施の形態の構成を示すブロック図である。図1を参照すると、本実施の形態は、制御部100、物理メモリ200およびディスク装置300から構成されている。尚、制御部100は、メモリ管理装置とも呼ばれる。また、物理メモリ200およびディスク装置300は、それぞれ一般的に第1の記憶部および第2の記憶部とも呼ばれる。また、物理メモリ200とディスク装置300とは、以下に説明するように階層化された記憶手段として構成されている。   FIG. 1 is a block diagram showing the configuration of the present embodiment. Referring to FIG. 1, the present embodiment includes a control unit 100, a physical memory 200, and a disk device 300. The control unit 100 is also called a memory management device. The physical memory 200 and the disk device 300 are also generally called a first storage unit and a second storage unit, respectively. Further, the physical memory 200 and the disk device 300 are configured as hierarchical storage means as described below.

制御部100は、タスク管理テーブル110、ページテーブル120、メモリ管理部130、ページ選択部140、スワップ処理部150、スワップ領域管理部160およびディスク装置インタフェース部170を含む。   The control unit 100 includes a task management table 110, a page table 120, a memory management unit 130, a page selection unit 140, a swap processing unit 150, a swap area management unit 160, and a disk device interface unit 170.

物理メモリ200は、所定サイズの物理ページを含む。物理メモリ200の物理ページは、一般的に第1の記憶手段のページとも呼ばれる。   The physical memory 200 includes a physical page of a predetermined size. The physical page of the physical memory 200 is generally called a page of the first storage unit.

ディスク装置300は、所定サイズの複数の仮想ページからなるスワップ領域310を含む。スワップ領域310は、物理メモリ200の容量が不足している場合に物理メモリ200上の物理ページのデータ内容を退避することができる、ディスク装置300上の領域である。ディスク装置300の仮想ページは、一般的に第2の記憶手段のページとも呼ばれる。   The disk device 300 includes a swap area 310 composed of a plurality of virtual pages of a predetermined size. The swap area 310 is an area on the disk device 300 in which the data contents of the physical page on the physical memory 200 can be saved when the capacity of the physical memory 200 is insufficient. The virtual page of the disk device 300 is generally called a page of the second storage means.

タスク管理テーブル110は、タスクの優先度を管理するためのテーブルであり、図3に示すようにタスクの識別子であるタスク識別子111および対応するタスク優先度112を含む少なくとも一つのタスクエントリ119からなる。   The task management table 110 is a table for managing task priorities, and includes at least one task entry 119 including a task identifier 111 as a task identifier and a corresponding task priority 112 as shown in FIG. .

ページテーブル120は、図4に示すように物理ページ番号121、割当フラグ122、参照頻度123、変更フラグ124および仮想ページ番号125を含む複数のページエントリ129からなる。   As shown in FIG. 4, the page table 120 includes a plurality of page entries 129 including a physical page number 121, an allocation flag 122, a reference frequency 123, a change flag 124, and a virtual page number 125.

物理ページ番号121は、物理メモリ200の物理ページそれぞれに付与され、物理ページそれぞれを一意に識別可能とする。尚、物理ページ番号121は一般的にページの識別情報とも呼ばれる。   The physical page number 121 is assigned to each physical page of the physical memory 200 so that each physical page can be uniquely identified. The physical page number 121 is also generally called page identification information.

割当フラグ122は、物理ページ番号121に対応する物理メモリ200の物理ページが、仮想ページに割り当て済みか否かを示すフラグであり、「1」で「割り当て済みである」ことを示し、「0」で「割り当て済みでない」ことを示す。   The allocation flag 122 is a flag indicating whether or not the physical page of the physical memory 200 corresponding to the physical page number 121 has been allocated to the virtual page. “1” indicates “already allocated”, and “0 ”Indicates“ not assigned ”.

参照頻度123は、物理ページ番号121に対応する物理メモリ200の物理ページが参照された頻度を示す。参照頻度123は、相対的に値が大きいほど参照された頻度が高いことを、相対的に値が小さいほど参照された頻度が低いことを示す。   The reference frequency 123 indicates the frequency with which the physical page of the physical memory 200 corresponding to the physical page number 121 is referenced. The reference frequency 123 indicates that the higher the value is, the higher the reference frequency is, and the lower the value is, the lower the reference frequency is.

変更フラグ124は、物理ページ番号121に対応する物理メモリ200の物理ページの内容が変更されたか否かを示すフラグであり、「1」で「変更されている」ことを示し、「0」で「変更されていない」ことを示す。尚、物理ページ番号121に対応する物理メモリ200の物理ページの、内容が変更されていることは、物理メモリ200の物理ページに格納されているデータが、ディスク装置300のスワップ領域310内の対応する仮想ページに格納されているデータに対して変更されていることにも含まれる。   The change flag 124 is a flag indicating whether or not the contents of the physical page of the physical memory 200 corresponding to the physical page number 121 have been changed. “1” indicates “changed”, and “0”. Indicates “not changed”. Note that the content of the physical page of the physical memory 200 corresponding to the physical page number 121 has been changed because the data stored in the physical page of the physical memory 200 is in the swap area 310 of the disk device 300. It is also included that the data stored in the virtual page is changed.

仮想ページ番号125は、スワップ領域310に含まれる仮想ページそれぞれに付与され、仮想ページそれぞれを一意に識別可能とする。そして、仮想ページ番号125は、物理ページ番号121に対応する物理メモリ200の物理ページが割り当てられている仮想ページの番号を示す。仮想ページ番号125は、対応する割当フラグ122が「1」の場合に有効な情報である。   The virtual page number 125 is assigned to each virtual page included in the swap area 310 so that each virtual page can be uniquely identified. The virtual page number 125 indicates the number of the virtual page to which the physical page of the physical memory 200 corresponding to the physical page number 121 is allocated. The virtual page number 125 is valid information when the corresponding allocation flag 122 is “1”.

メモリ管理部130は、プロセッサ(図示しない)あるいはDMA(Direct Memory Access)制御部(図示しない)の指示に基づいて、仮想ページの仮想アドレスを物理メモリ200の物理アドレスに変換し、物理メモリ200へのアクセスを処理する。また、メモリ管理部130は、アクセスしようとした仮想ページが物理メモリ200に存在しないこと即ちページフォールトを検出すると、ページフォールト発生通知を出力する。また、メモリ管理部130は、 例えばNFU(Not Frequently Used)アルゴリズムや、これを改良したエージングアルゴリズムを用いて、物理メモリ200の物理ページそれぞれが参照された頻度を算出する手段を有し、算出した参照された頻度をページテーブル120の参照頻度123に格納する。   The memory management unit 130 converts the virtual address of the virtual page into the physical address of the physical memory 200 based on an instruction from a processor (not shown) or a DMA (Direct Memory Access) control unit (not shown), and transfers the physical address to the physical memory 200. Handle access. When the memory management unit 130 detects that the virtual page to be accessed does not exist in the physical memory 200, that is, detects a page fault, the memory management unit 130 outputs a page fault occurrence notification. In addition, the memory management unit 130 has a means for calculating the frequency of referring to each physical page of the physical memory 200 using, for example, an NFU (Not Frequently Used) algorithm or an aging algorithm improved from the NFU algorithm. The referred frequency is stored in the reference frequency 123 of the page table 120.

ページ選択部140は、予め定められた閾値141を保持する手段を有し、ページフォールト発生通知の入力に対応してタスク管理テーブル110およびページテーブル120を参照し、スワップアウトする仮想ページを決定する。   The page selection unit 140 has a means for holding a predetermined threshold 141, and refers to the task management table 110 and the page table 120 in response to the input of the page fault occurrence notification, and determines a virtual page to be swapped out. .

スワップ処理部150は、スワップイン、およびページ選択部140が選択したページのスワップアウトを実行する。以下に、スワップインおよびスワップアウトの処理の具体的な実現手段の一例を説明する。   The swap processing unit 150 performs swap-in and swap-out of the page selected by the page selection unit 140. Hereinafter, an example of specific means for realizing the swap-in and swap-out processing will be described.

まず、スワップインの処理について説明する。スワップ処理部150は、仮想ページ番号125を入力に対応してページテーブル120を参照し、割当フラグ122が「0」であるページエントリ129の物理ページ番号121を取得する。   First, the swap-in process will be described. The swap processing unit 150 refers to the page table 120 corresponding to the input of the virtual page number 125, and acquires the physical page number 121 of the page entry 129 whose allocation flag 122 is “0”.

続けて、スワップ処理部150は、このページエントリ129の割当フラグ122を「1」に、参照頻度123を「0」に、変更フラグ124を「0」に設定し、さらにスワップイン対象のデータが格納されている仮想ページの仮想ページ番号125をこのページエントリ129に格納する。さらに続けて、スワップ処理部150は、仮想ページに格納されているスワップイン対象のデータを先に取得した物理ページ番号121に対応する物理メモリ200の物理ページに転送する要求を、メモリ管理部130とディスク装置インタフェース部170とに対して出力する。   Subsequently, the swap processing unit 150 sets the allocation flag 122 of this page entry 129 to “1”, the reference frequency 123 to “0”, and the change flag 124 to “0”. The virtual page number 125 of the stored virtual page is stored in this page entry 129. Subsequently, the swap processing unit 150 sends a request to transfer the swap-in target data stored in the virtual page to the physical page of the physical memory 200 corresponding to the physical page number 121 acquired previously. And the disk device interface unit 170.

この転送する要求を入力したメモリ管理部130とディスク装置インタフェース部170とは、物理メモリ200およびディスク装置300をそれぞれ制御してスワップイン対象のデータを転送する。尚、この転送の実現手段(図示しない)は、メモリ管理部130とディスク装置インタフェース部170とを経由するようにしてもよいし、物理メモリ200およびディスク装置300間で直接やり取りするようにしてもよい。   The memory management unit 130 and the disk device interface unit 170 that have input the transfer request control the physical memory 200 and the disk device 300, respectively, and transfer the swap-in target data. The transfer realizing means (not shown) may be routed through the memory management unit 130 and the disk device interface unit 170, or may be directly exchanged between the physical memory 200 and the disk device 300. Good.

次に、スワップ処理部150は、メモリ管理部130から転送完了の通知を受け取りスワップインの処理を完了する。   Next, the swap processing unit 150 receives a transfer completion notification from the memory management unit 130 and completes the swap-in process.

次に、スワップアウトの処理について説明する。スワップ処理部150は、スワップアプト対象の物理メモリ200の物理ページを指定する物理ページ番号121の入力に対応して指定された物理ページ番号121を含むページテーブル120のページエントリ129を参照し、変更フラグ124を確認する。変更フラグ124が「0」の場合、この物理メモリ200の物理ページはクリーンページであるため、このページのデータを物理メモリ200からスワップ領域310の書き出す必要はない。そこで、スワップ処理部150は、スワップアウト対象のデータに対応するページエントリ129の割当フラグ122を「0」に設定し、スワップアウトの処理を完了する。   Next, the swap-out process will be described. The swap processing unit 150 refers to the page entry 129 of the page table 120 including the physical page number 121 specified in response to the input of the physical page number 121 specifying the physical page of the physical memory 200 to be swapped, and changes it. Check the flag 124. When the change flag 124 is “0”, since the physical page of the physical memory 200 is a clean page, it is not necessary to write the data of this page from the physical memory 200 to the swap area 310. Therefore, the swap processing unit 150 sets the allocation flag 122 of the page entry 129 corresponding to the data to be swapped out to “0”, and completes the swap-out process.

変更フラグ124が「1」の場合、この物理メモリ200の物理ページはダーティページであるため、このページのデータを物理メモリ200からスワップ領域310へ書き出す必要がある。そこで、スワップ処理部150は、指定された物理ページ番号121を含むページテーブル120のページエントリ129を参照し、対応する仮想ページ番号125を取得する。続けて、スワップ処理部150は、指定された物理ページ番号121に対応する物理メモリ200の物理ページに格納されているスワップアウト対象のデータを先に取得した仮想ページ番号125に対応する仮想ページに転送する要求を、メモリ管理部130とディスク装置インタフェース部170とに対して出力する。   When the change flag 124 is “1”, the physical page of the physical memory 200 is a dirty page, and thus data of this page needs to be written from the physical memory 200 to the swap area 310. Therefore, the swap processing unit 150 refers to the page entry 129 of the page table 120 including the designated physical page number 121 and acquires the corresponding virtual page number 125. Subsequently, the swap processing unit 150 converts the data to be swapped out stored in the physical page of the physical memory 200 corresponding to the designated physical page number 121 into the virtual page corresponding to the virtual page number 125 acquired first. The transfer request is output to the memory management unit 130 and the disk device interface unit 170.

この転送する要求を入力したメモリ管理部130とディスク装置インタフェース部170とは、物理メモリ200およびディスク装置300をそれぞれ制御して、スワップアウト対象のデータを転送する。尚、この転送の実現手段(図示しない)は、メモリ管理部130とディスク装置インタフェース部170とを経由するようにしてもよいし、物理メモリ200およびディスク装置300間で直接やり取りするようにしてもよい。   The memory management unit 130 and the disk device interface unit 170 that have input the transfer request control the physical memory 200 and the disk device 300, respectively, and transfer data to be swapped out. The transfer realizing means (not shown) may be routed through the memory management unit 130 and the disk device interface unit 170, or may be directly exchanged between the physical memory 200 and the disk device 300. Good.

ディスク装置インタフェース部170から転送完了の通知を受け取るとスワップ処理部150は、スワップアウト対象のデータに対応するページエントリ129の割当フラグ122を「0」に設定し、スワップアウトの処理を完了する。   Upon receiving a transfer completion notification from the disk device interface unit 170, the swap processing unit 150 sets the allocation flag 122 of the page entry 129 corresponding to the data to be swapped out to “0”, and completes the swap-out processing.

尚、スワップインおよびスワップアウトは、それぞれ一般的にページインおよびページアウトと呼ばれることもある。   Note that swap-in and swap-out may be generally called page-in and page-out, respectively.

スワップ領域管理部160は、定期的にページテーブル120を参照して、変更フラグ124が「1」であって、参照頻度123が最も低い物理メモリ200の物理ページを検出し、この検出した物理ページのデータをスワップ領域310へ退避する。   The swap area management unit 160 periodically refers to the page table 120 to detect a physical page in the physical memory 200 with the change flag 124 being “1” and the lowest reference frequency 123, and this detected physical page Are saved in the swap area 310.

次に、本実施の形態の動作について、図を用いて詳細に説明する。   Next, the operation of the present embodiment will be described in detail with reference to the drawings.

図5は、ページフォールトを検出した場合の動作を示すフローチャートである。   FIG. 5 is a flowchart showing an operation when a page fault is detected.

まず、メモリ管理部130が、アクセスしようとした仮想ページが物理メモリ200に存在しないこと、即ちページフォールトを検出したことを契機に、制御部100は本動作を開始する(S600)。メモリ管理部130は、ページフォールトを検出するとページ選択部140に対してページフォールト発生通知を出力する(S602)。   First, the control unit 100 starts this operation when the virtual page to be accessed does not exist in the physical memory 200, that is, when a page fault is detected (S600). When the memory management unit 130 detects a page fault, the memory management unit 130 outputs a page fault occurrence notification to the page selection unit 140 (S602).

次に、ページ選択部140は、ページフォールト発生通知の入力に対応してページフォールトとなったタスク識別子111および仮想ページ番号125を図示しないオペレーティングシステムから取得し、タスク管理テーブル110を参照してこのページフォールトとなったタスクに対応するタスク優先度112を取得する(S604)。   Next, the page selection unit 140 acquires from the operating system (not shown) the task identifier 111 and the virtual page number 125 that become a page fault in response to the input of the page fault occurrence notification, and refers to the task management table 110 to refer to this The task priority 112 corresponding to the task that has become the page fault is acquired (S604).

次に、ページ選択部140は、ページテーブル120を参照し、参照頻度123が最も小さい物理ページ番号121を取得する(S606)。   Next, the page selection unit 140 refers to the page table 120 and acquires the physical page number 121 with the lowest reference frequency 123 (S606).

次に、ページ選択部140は、S604で取得したタスク優先度112と閾値141とを比較する(S610)。そして、この比較の結果、S604で取得したタスク優先度112が閾値141より低い場合(S610でNO)、処理はS620へ進む。また、S604で取得したタスク優先度112が閾値141を超える場合(S610でYES)、処理はS614へ進む。   Next, the page selection unit 140 compares the task priority 112 acquired in S604 with the threshold 141 (S610). As a result of the comparison, if the task priority 112 acquired in S604 is lower than the threshold 141 (NO in S610), the process proceeds to S620. If the task priority 112 acquired in S604 exceeds the threshold 141 (YES in S610), the process proceeds to S614.

尚、タスク優先度112と閾値141とを比較することは、アクセスの対象データが優先データであるか非優先データであるかを、対象データに対応する優先度と予め定められた閾値とに基づいて判定することにも含まれる。   Note that the comparison between the task priority 112 and the threshold 141 is based on the priority corresponding to the target data and a predetermined threshold whether the access target data is priority data or non-priority data. It is also included in the determination.

S614において、ページ選択部140は、S606および後述するS616で取得した物理ページ番号121に対応する変更フラグ124の状態を確認する(S614)。この確認の結果、変更フラグ124の状態が0の場合(S614でNO)、処理はS620へ進む。また、変更フラグ124の状態が1の場合(S614でYES)、処理はS616へ進む。   In S614, the page selection unit 140 checks the state of the change flag 124 corresponding to the physical page number 121 acquired in S606 and S616 described later (S614). As a result of this confirmation, if the state of the change flag 124 is 0 (NO in S614), the process proceeds to S620. If the state of the change flag 124 is 1 (YES in S614), the process proceeds to S616.

S616において、ページ選択部140は、ページテーブル120を参照し、ページエントリ129のうちS606あるいは本S616で既に取得済みである物理ページ番号121に対応するものを除いたページエントリ129のなかで、参照頻度123が最も小さいページエントリ129に対応する物理ページ番号121を取得する。全ての物理ページ番号121が取得済みの状態である場合は、全ての物理ページ番号121について取得済みの状態を解除し、全てのページエントリ129のうちから参照頻度123が最も小さい物理ページ番号121を取得する(S616)。そして、処理はS614へ戻る。尚、全ての物理ページ番号121が取得済みの状態である場合に、全ての物理ページ番号121について取得済みの状態を解除して、S614とS616との繰り返し処理を継続することで、後述するクリーン化処理により、変更フラグ124の状態が「0」となったページエントリ129を検出することができる。   In S616, the page selection unit 140 refers to the page table 120 and refers to the page entry 129 except for the page entry 129 corresponding to the physical page number 121 already acquired in S606 or S616. The physical page number 121 corresponding to the page entry 129 having the lowest frequency 123 is acquired. If all the physical page numbers 121 are already acquired, the acquired state is canceled for all the physical page numbers 121, and the physical page number 121 with the smallest reference frequency 123 is selected from all the page entries 129. Obtain (S616). Then, the process returns to S614. When all the physical page numbers 121 are already acquired, the acquired state is canceled for all the physical page numbers 121, and the process of S614 and S616 is continued to perform a clean process described later. The page entry 129 in which the state of the change flag 124 is “0” can be detected by the conversion process.

次に、ページ選択部140は、取得した物理ページ番号121および仮想ページ番号125をスワップ処理部150に対して出力する(S620)。   Next, the page selection unit 140 outputs the acquired physical page number 121 and virtual page number 125 to the swap processing unit 150 (S620).

次に、スワップ処理部150は、物理ページ番号121および仮想ページ番号125の入力に対応して、物理ページ番号121に対応する物理メモリ200の物理ページに格納されているデータを仮想ページ番号125に対応するスワップ領域310の仮想ページへスワップアウトする(S622)。尚、先に説明したように、スワップアウト対象のデータが格納されている物理メモリ200の物理ページがクリーンページの場合は、これがダーティページである場合と比較して、物理メモリ200からディスク装置300へのデータ転送が不要である分処理時間が短縮される。一方、タスク優先度112が所定の閾値141より高い場合は、S614において変更フラグ124の状態を確認して、スワップアプトする物理メモリ200の物理ページ番号121として変更フラグ124が「0」即ちクリーンページであるものを選択している。従って、タスク優先度112が所定の閾値141より高い場合は、処理時間が短縮されたスワップアウト処理が実行される。   Next, in response to the input of the physical page number 121 and the virtual page number 125, the swap processing unit 150 sets the data stored in the physical page of the physical memory 200 corresponding to the physical page number 121 to the virtual page number 125. Swap out to the virtual page of the corresponding swap area 310 (S622). As described above, when the physical page of the physical memory 200 in which the data to be swapped out is stored is a clean page, compared with the case where this is a dirty page, the physical memory 200 to the disk device 300 is compared. The processing time is shortened by the fact that data transfer to is unnecessary. On the other hand, if the task priority 112 is higher than the predetermined threshold 141, the status of the change flag 124 is confirmed in S614, and the change flag 124 is “0”, that is, a clean page as the physical page number 121 of the physical memory 200 to be swapped. The one that is is selected. Accordingly, when the task priority 112 is higher than the predetermined threshold 141, swap-out processing with a reduced processing time is executed.

次に、スワップ処理部150は、ステップ622で入力した仮想ページ番号125に対応する仮想ページのデータを、S622でスワップアウトした物理メモリ200の物理ページにスワップインする(S624)。   Next, the swap processing unit 150 swaps in the virtual page data corresponding to the virtual page number 125 input in Step 622 to the physical page of the physical memory 200 swapped out in S622 (S624).

図6は、クリーン化処理の動作を示すフローチャートである。クリーン化処理とは、物理メモリ200のダーティページ(変更フラグ124が「1」)のデータをディスク装置300のスワップ領域310に転送し、対象の物理メモリ200の物理ページをクリーンページ(変更フラグ124が「0」)にする処理である。   FIG. 6 is a flowchart showing the operation of the cleaning process. In the cleaning process, the data of the dirty page (change flag 124 is “1”) in the physical memory 200 is transferred to the swap area 310 of the disk device 300, and the physical page in the target physical memory 200 is transferred to the clean page (change flag 124). Is “0”).

まず、図示しない計時手段より、あらかじめ定められた時間間隔で出力されるクリーン化処理開始指示を契機に、制御部100は本動作を開始する(S700)。   First, the control unit 100 starts this operation in response to a cleaning process start instruction output at a predetermined time interval from a timing unit (not shown) (S700).

スワップ領域管理部160は、クリーン化処理開始指示の入力に対応してページテーブル120を参照し、参照頻度123が最も小さいページエントリ129を検出する(S702)。   The swap area management unit 160 refers to the page table 120 in response to the input of the cleaning process start instruction, and detects the page entry 129 having the lowest reference frequency 123 (S702).

次に、スワップ領域管理部160は、検出したページエントリ129の変更フラグ124の状態を確認する(S704)。この確認の結果、変更フラグ124の状態が「1」の場合(S704でYES)、処理はS710へ進む。また、変更フラグ124の状態が「0」の場合(S704でNO)、処理はS706へ進む。   Next, the swap area management unit 160 checks the state of the change flag 124 of the detected page entry 129 (S704). As a result of this confirmation, if the state of the change flag 124 is “1” (YES in S704), the process proceeds to S710. If the state of the change flag 124 is “0” (NO in S704), the process proceeds to S706.

S706において、スワップ領域管理部160は、ページテーブル120のすべてのページエントリ129がS702あるいは後述するS708で既に検出済みであるか否かを確認する(S706)。この確認の結果、すべてのページエントリ129が既に検出済みである場合(S706でYES)、処理は終了する。また、未検出のページエントリ129がある場合(S706でNO)、処理はS708へ進む。尚、ページテーブル120のすべてのページエントリ129がS702あるいは後述するS708で既に検出済みであるということは、全ての物理ページがクリーンページの状態であることを意味する。   In S706, the swap area management unit 160 checks whether all the page entries 129 in the page table 120 have already been detected in S702 or S708 described later (S706). As a result of this confirmation, if all page entries 129 have already been detected (YES in S706), the process ends. If there is an undetected page entry 129 (NO in S706), the process proceeds to S708. Note that all the page entries 129 in the page table 120 have already been detected in S702 or S708 described later mean that all physical pages are in a clean page state.

S708において、スワップ領域管理部160は、ページテーブル120を参照し、S702あるいは本S706で既に検出済みであるページエントリ129を除くページエントリ129のうちから参照頻度123が最も小さいページエントリ129を検出する(S708)。そして、処理はS704へ戻る。   In S708, the swap area management unit 160 refers to the page table 120, and detects the page entry 129 having the lowest reference frequency 123 from the page entries 129 excluding the page entry 129 already detected in S702 or S706. (S708). Then, the process returns to S704.

次に、スワップ領域管理部160は、S704で変更フラグ124の状態が「1」であることを確認したページエントリ129の物理ページ番号121と仮想ページ番号125とを取得する。続けて、スワップ領域管理部160は、取得した物理ページ番号121に対応するクリーン化処理対象である物理ページに格納されているデータを、取得した仮想ページ番号125に対応する仮想ページに転送する要求を、メモリ管理部130とディスク装置インタフェース部170とに対して出力する(S710)。この転送する要求を入力したメモリ管理部130とディスク装置インタフェース部170とは、物理メモリ200およびディスク装置300をそれぞれ制御して対象のデータを転送する。尚、この転送の実現手段(図示しない)は、メモリ管理部130とディスク装置インタフェース部170とを経由するようにしてもよいし、物理メモリ200およびディスク装置300間で直接やり取りするようにしても良い。   Next, the swap area management unit 160 acquires the physical page number 121 and the virtual page number 125 of the page entry 129 that has been confirmed in S704 that the status of the change flag 124 is “1”. Subsequently, the swap area management unit 160 requests to transfer the data stored in the physical page to be cleaned corresponding to the acquired physical page number 121 to the virtual page corresponding to the acquired virtual page number 125. Is output to the memory management unit 130 and the disk device interface unit 170 (S710). The memory management unit 130 and the disk device interface unit 170 that have input the transfer request control the physical memory 200 and the disk device 300 to transfer the target data. The transfer realizing means (not shown) may be routed through the memory management unit 130 and the disk device interface unit 170, or may be directly exchanged between the physical memory 200 and the disk device 300. good.

ディスク装置インタフェース部170から転送完了の通知を受け取るとスワップ領域管理部160は、クリーン化処理対象のページに対応するページエントリ129の変更フラグ124を「0」に設定し、クリーン化処理を完了する(S712)。   Upon receiving a transfer completion notification from the disk device interface unit 170, the swap area management unit 160 sets the change flag 124 of the page entry 129 corresponding to the page to be cleaned, to “0”, and completes the cleaning process. (S712).

図2は、本実施の形態の基本的な構成を示す。図2によれば、本発明の基本的な構成は、ページ選択部140を含むメモリ管理装置400を有する。ページ選択部140は、予め定められた閾値141を保持する。   FIG. 2 shows a basic configuration of the present embodiment. Referring to FIG. 2, the basic configuration of the present invention includes a memory management device 400 including a page selection unit 140. The page selection unit 140 holds a predetermined threshold 141.

ページ選択部140は、複数のページを含む第1の記憶部と複数のページを含む第2の記憶部とを含む階層化された記憶手段に対するメモリアクセスにおいてページフォールトが発生した場合に、当該メモリアクセスの対象データが優先データであるか非優先データであるかを、予め定められたそれぞれの対象データに対応する優先度と閾値141とに基づいて判定し、その対象データが優先データであると判定した場合に、第1の記憶部のページの内、第1の記憶部のページに格納されているデータが第2の記憶部の対応するページに格納されているデータと同一である第1の記憶部のページのいずれか一つを選択し、
この選択した第1の記憶部のページの識別情報を出力する。
When a page fault occurs in a memory access to a hierarchical storage unit including a first storage unit including a plurality of pages and a second storage unit including a plurality of pages, the page selection unit 140 Whether access target data is priority data or non-priority data is determined based on a predetermined priority corresponding to each target data and a threshold value 141, and the target data is priority data When the determination is made, the first data stored in the page of the first storage unit among the pages of the first storage unit is the same as the data stored in the corresponding page of the second storage unit Select one of the storage pages of
The identification information of the page of the selected first storage unit is output.

上述した本実施の形態における第1の効果は、優先度が高い処理においてページフォールトが発生した時のスワップ動作を高速化することを可能にできることであり、特に優先度の高いタスクについて、このスワップ動作の処理を高速化することを可能にできる点である。   The first effect of the present embodiment described above is that it is possible to speed up the swap operation when a page fault occurs in a process with a high priority, and this swap particularly for a task with a high priority. It is possible to speed up the processing of the operation.

その理由は、第1の記憶部に対するアクセス時にページフォールトが発生した場合に、アクセスの対象データが優先データであるか非優先データであるかを、対象データを使用するタスクの優先度と予め定められた閾値とに基づいて判定し、対象データが優先データであると判定した場合に、クリーンページの物理ページ番号を出力するようにしたからである。   The reason is that, when a page fault occurs during access to the first storage unit, whether the access target data is priority data or non-priority data is determined in advance as the priority of the task that uses the target data. This is because the physical page number of the clean page is output when it is determined based on the determined threshold value and it is determined that the target data is priority data.

本実施の形態における第2の効果は、優先度が高い処理においてページフォールトが発生した時のスワップ動作を高速化できることであり、特にスワップ動作の処理において、割り当てる物理メモリの検索を高速化することが可能にできる点、および割り当てられた物理メモリに既に格納されているデータをスワップ領域に書き込む動作を削減することが可能にできる点である。   The second effect of the present embodiment is that the swap operation when a page fault occurs in a high priority process can be speeded up. In particular, the search for the physical memory to be allocated is speeded up in the process of the swap operation. It is possible to reduce the operation of writing data already stored in the allocated physical memory to the swap area.

その理由は、予め定められたタイミング毎に、物理メモリ上のダーティページを参照頻度の値が小さい順に検出し、ダーティページに格納されているデータをスワップ領域に書き込むことで、クリーンページにするようにしたからである。   The reason is that at each predetermined timing, dirty pages on the physical memory are detected in ascending order of reference frequency value, and the data stored in the dirty pages is written to the swap area to make a clean page. Because it was.

次に本発明の第2の実施の形態について図面を参照して詳細に説明する。   Next, a second embodiment of the present invention will be described in detail with reference to the drawings.

図7を参照すると、本発明の第2の実施の形態の構成は、制御部100にオブジェクト管理テーブル180とライブラリ管理テーブル190とを含む点が、第1の実施の形態と異なる。   Referring to FIG. 7, the configuration of the second exemplary embodiment of the present invention is different from the first exemplary embodiment in that the control unit 100 includes an object management table 180 and a library management table 190.

図8は、オブジェクト管理テーブル180の構造を示す図である。オブジェクト管理テーブル180は、オブジェクトの優先度を管理するためのテーブルであり、オブジェクトの識別子であるオブジェクト識別子181および対応するオブジェクト優先度182を含む少なくとも一つのオブジェクトエントリ189からなる。尚、オブジェクト識別子181の内のいずれか一つ以上は、オブジェクト以外の要因に基づいた優先度による制御のために設けた擬似的なオブジェクト識別子181であってよい。この擬似的なオブジェクト識別子181は、図示しないオペレーティングシステムや図示しないアプリケーションが検出した優先度を上げるべきであると判断する要因あるいは下げるべきであると判断する要因に基づいて、優先度を示すために使用される。   FIG. 8 shows the structure of the object management table 180. The object management table 180 is a table for managing the priority of an object, and includes at least one object entry 189 including an object identifier 181 that is an object identifier and a corresponding object priority 182. Any one or more of the object identifiers 181 may be a pseudo object identifier 181 provided for control by priority based on factors other than the object. The pseudo object identifier 181 indicates the priority based on a factor that determines that the priority detected by an operating system (not shown) or an application (not shown) should be increased or decreased. used.

図9は、ライブラリ管理テーブル190の構造を示す図である。ライブラリ管理テーブル190は、ライブラリの優先度を管理するためのテーブルであり、ライブラリの識別子であるライブラリ識別子191および対応するライブラリ優先度192を含む少なくとも一つのライブラリエントリ199からなる。尚、ライブラリ識別子191の内のいずれか一つ以上は、ライブラリ以外の要因に基づいた優先度による制御の為に設けた擬似的なライブラリ識別子191であってよい。この擬似的なオブジェクト識別子181は、図示しないオペレーティングシステムや図示しないアプリケーションが検出した優先度を上げるべきであると判断する要因あるいは下げるべきであると判断する要因に基づいて、優先度を示すために使用される。   FIG. 9 is a diagram showing the structure of the library management table 190. The library management table 190 is a table for managing the library priority, and includes at least one library entry 199 including a library identifier 191 that is a library identifier and a corresponding library priority 192. Any one or more of the library identifiers 191 may be a pseudo library identifier 191 provided for control by priority based on factors other than the library. The pseudo object identifier 181 indicates the priority based on a factor that determines that the priority detected by an operating system (not shown) or an application (not shown) should be increased or decreased. used.

また、本発明の第2の実施の形態は、ページ選択部140の動作が、第1の実施の形態と異なる。   In the second embodiment of the present invention, the operation of the page selection unit 140 is different from that of the first embodiment.

本実施の形態のページ選択部140は、予め定められた閾値141を保持する手段を有し、ページフォールト発生通知の入力に対応してタスク管理テーブル110、オブジェクト管理テーブル180およびライブラリ管理テーブル190の内の少なくとも一つとページテーブル120とを参照し、スワップアウトする仮想ページを決定する。   The page selection unit 140 according to the present embodiment has a means for holding a predetermined threshold 141, and the task management table 110, the object management table 180, and the library management table 190 correspond to the input of the page fault occurrence notification. A virtual page to be swapped out is determined with reference to at least one of the pages and the page table 120.

本実施の形態におけるページフォールトを検出した場合の動作を示すフローチャートは、図5に示す第1の実施の形態と同様であるが、S604およびS610での動作が異なる。   The flowchart showing the operation when a page fault is detected in the present embodiment is the same as that in the first embodiment shown in FIG. 5, but the operations in S604 and S610 are different.

本実施の形態のS604において、ページ選択部140は、ページフォールト発生通知の入力に対応して、タスク優先度112、オブジェクト優先度182およびライブラリ優先度192の内の少なくとも一つを取得する。タスク優先度112の取得については、第1の実施の形態で説明したとおりである。オブジェクト優先度182の取得について説明すると、ページ選択部140は、ページフォールトとなったオブジェクト識別子181および仮想ページ番号125を図示しないオペレーティングシステムから取得し、オブジェクト管理テーブル180を参照してこのページフォールトとなったオブジェクトに対応するオブジェクト優先度182を取得する。ライブラリ優先度192の取得について説明すると、ページ選択部140は、ページフォールトとなったライブラリ識別子191および仮想ページ番号125を図示しないオペレーティングシステムから取得し、ライブラリ管理テーブル190を参照してこのページフォールトとなったライブラリに対応するライブラリ優先度192を取得する。   In S604 of the present embodiment, the page selection unit 140 acquires at least one of the task priority 112, the object priority 182 and the library priority 192 in response to the input of the page fault occurrence notification. The acquisition of the task priority 112 is as described in the first embodiment. The acquisition of the object priority 182 will be described. The page selection unit 140 acquires the object identifier 181 and the virtual page number 125 that have become page faults from an operating system (not shown), and refers to the object management table 180 to determine the page faults. The object priority 182 corresponding to the lost object is acquired. The acquisition of the library priority 192 will be described. The page selection unit 140 acquires a library identifier 191 and a virtual page number 125 that have become page faults from an operating system (not shown), and refers to the library management table 190 to determine the page faults. The library priority 192 corresponding to the library that has become is acquired.

本実施の形態のS610において、ページ選択部140は、S604で取得したタスク優先度112、オブジェクト優先度182およびライブラリ優先度192の内の少なくとも一つと閾値141とを比較し、ページフォールトとなった仮想ページに対応するデータが優先データであるか非優先データであるかを判定する。ページ選択部140は、例えば、タスク優先度112、オブジェクト優先度182およびライブラリ優先度192のいずれか一つを選択して比較した結果に基づいて判定するようにしてもよいし、タスク優先度112、オブジェクト優先度182およびライブラリ優先度192のいずれかふたつ以上を選択して比較した結果を組み合わせて判定するようにしてもよい。また、ページ選択部140は、例えば、タスク優先度112、オブジェクト優先度182およびライブラリ優先度192に対して演算を施して算出した平均値、合計値あるいは重み付けした値などを、閾値141との比較対象としてもよい。そしてまた、ページ選択部140は、例えば比較した結果を組み合わせて判定する場合に、論理和をとるようにしてもよいし、論理積をとるようにしてもよいし、その他の演算を施すようにしてもよい。そして、非優先データであると判定した場合(S610でNO)、処理はS620へ進む。また、優先データであると判定した場合(S610でYES)、処理はS614へ進む。   In S610 of this embodiment, the page selection unit 140 compares the threshold 141 with at least one of the task priority 112, the object priority 182 and the library priority 192 acquired in S604, resulting in a page fault. It is determined whether the data corresponding to the virtual page is priority data or non-priority data. For example, the page selection unit 140 may make a determination based on a result of selecting and comparing any one of the task priority 112, the object priority 182 and the library priority 192, or the task priority 112. Alternatively, it may be determined by combining the results of selecting and comparing any two or more of the object priority 182 and the library priority 192. Further, the page selection unit 140 compares, for example, an average value, a total value, or a weighted value calculated by performing operations on the task priority 112, the object priority 182 and the library priority 192 with the threshold 141. It may be a target. In addition, the page selection unit 140 may perform a logical sum, a logical product, or perform other operations, for example, when determining by combining the comparison results. May be. If it is determined that the data is non-priority data (NO in S610), the process proceeds to S620. If it is determined that the data is priority data (YES in S610), the process proceeds to S614.

本実施の形態におけるクリーン化処理の動作を示すフローチャートは、図6に示す第1の実施の形態と同様である。   The flowchart showing the operation of the cleaning process in the present embodiment is the same as that in the first embodiment shown in FIG.

上述した本実施の形態における効果は、優先度が高い処理においてページフォールトが発生した時のスワップ動作を高速化できることであり、特にこのスワップ動作の処理を高速化する対象の精密かつ容易な選択を可能にできる点である。   The effect of the present embodiment described above is that the swap operation when a page fault occurs in a high priority process can be speeded up. In particular, the precise and easy selection of the target for speeding up the process of the swap operation is possible. It is a point that can be made possible.

その理由は、第1の記憶部に対するアクセス時にページフォールトが発生した場合に、アクセスの対象データが優先データであるか非優先データであるかの判定を、対象データであるオブジェクトの優先度および対象データを含むライブラリの優先度にも基づいて判定するようにしたからである。   The reason for this is that when a page fault occurs during access to the first storage unit, whether the access target data is priority data or non-priority data is determined based on the priority and target of the object that is the target data. This is because the determination is made based on the priority of the library including the data.

以上の各実施の形態で説明した各構成要素は、たとえば、プログラムにより所定の処理をコンピュータに実行させてもよい。   Each component described in each of the above embodiments may cause a computer to execute predetermined processing by a program, for example.

以上の各実施の形態で説明した各構成要素は、必ずしも個々に独立した存在である必要はなく、複数の構成要素が一個のモジュールとして実現されたり、一つの構成要素が複数のモジュールで実現されたり、ある構成要素が他の構成要素の一部であったり、ある構成要素の一部と他の構成要素の一部とが重複していたり、といったような構成であってもよい。   Each component described in each of the above embodiments does not necessarily have to be individually independent, and a plurality of components are realized as one module, or one component is realized as a plurality of modules. Alternatively, a configuration in which a certain component is a part of another component, a part of a certain component overlaps with a part of another component, or the like may be employed.

また、以上説明した各実施の形態では、複数の動作をフローチャートの形式で順番に記載してあるが、その記載の順番は複数の動作を実行する順番を限定するものではない。このため、各実施の形態を実施するときには、その複数の動作の順番は内容的に支障しない範囲で変更することができる。   Further, in each of the embodiments described above, a plurality of operations are described in order in the form of a flowchart, but the description order does not limit the order in which the plurality of operations are executed. For this reason, when each embodiment is implemented, the order of the plurality of operations can be changed within a range that does not hinder the contents.

さらに、以上説明した各実施の形態では、複数の動作は個々に相違するタイミングで実行されることに限定されない。例えば、ある動作の実行中に他の動作が発生したり、ある動作の実行タイミングと他の動作の実行タイミングとの一部乃至全部が重複していたりしていてもよい。   Furthermore, in each embodiment described above, a plurality of operations are not limited to being executed at different timings. For example, another operation may occur during the execution of a certain operation, or part or all of the execution timing of a certain operation and the execution timing of another operation may overlap.

さらに、以上説明した各実施の形態では、ある動作が他の動作の契機になるように記載しているが、その記載はある動作と他の動作のすべての関係を限定するものではない。このため、各実施の形態を実施するときには、その複数の動作の関係は内容的に支障しない範囲で変更することができる。また各構成要素の各動作の具体的な記載は、各構成要素の各動作を限定するものではない。このため、各構成要素の具体的な各動作は、各実施の形態を実施する上で機能的、性能的、その他の特性に対して支障をきたさない範囲内で変更されて良い。   Further, in each of the embodiments described above, it is described that a certain operation becomes a trigger for another operation, but the description does not limit all relationships between the certain operation and the other operations. For this reason, when each embodiment is implemented, the relationship between the plurality of operations can be changed within a range that does not hinder the contents. The specific description of each operation of each component does not limit each operation of each component. For this reason, each specific operation of each component may be changed within a range that does not hinder the functional, performance, and other characteristics in implementing each embodiment.

なお、以上説明した各実施の形態における各構成要素は、必要に応じ可能であれば、ハードウェアで実現されても良いし、ソフトウェアで実現されても良いし、ハードウェアとソフトウェアの混在により実現されても良い。   In addition, each component in each embodiment described above may be realized by hardware, software, or a mixture of hardware and software, if necessary. May be.

また、各構成要素の物理的な構成は、以上の実施の形態の記載に限定されることはなく、独立して存在しても良いし、組み合わされて存在しても良いしまたは分離して構成されても良い。   Further, the physical configuration of each component is not limited to the description in the above embodiment, and may exist independently, may exist in combination, or may be separated. It may be configured.

本発明は、各種情報処理装置および各種通信処理装置などのメモリ管理に適用できる。   The present invention can be applied to memory management of various information processing apparatuses and various communication processing apparatuses.

本発明の第1の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 1st Embodiment of this invention. 本発明の第1の実施の形態における基本的な構成を示すブロック図である。It is a block diagram which shows the basic composition in the 1st Embodiment of this invention. 本発明の第1および第2の実施の形態におけるタスク管理テーブルの構造を示す図である。It is a figure which shows the structure of the task management table in the 1st and 2nd embodiment of this invention. 本発明の第1および第2の実施の形態におけるページテーブルの構造を示す図である。It is a figure which shows the structure of the page table in the 1st and 2nd embodiment of this invention. 本発明の第1および第2の実施の形態におけるページフォールトを検出した場合の動作を示すフローチャートである。It is a flowchart which shows the operation | movement at the time of detecting the page fault in the 1st and 2nd embodiment of this invention. 本発明の第1および第2の実施の形態におけるクリーン化処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the cleaning process in the 1st and 2nd embodiment of this invention. 本発明の第2の実施の形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるオブジェクト管理テーブルの構造を示す図である。It is a figure which shows the structure of the object management table in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるライブラリ管理テーブルの構造を示す図である。It is a figure which shows the structure of the library management table in the 2nd Embodiment of this invention.

符号の説明Explanation of symbols

100 制御部
110 タスク管理テーブル
111 タスク識別子
112 優先度
119 タスクエントリ
120 ページテーブル
121 物理ページ番号
122 割当フラグ
123 参照頻度
124 変更フラグ
125 仮想ページ番号
129 ページエントリ
130 メモリ管理部
140 ページ選択部
141 閾値
150 スワップ処理部
160 スワップ領域管理部
170 ディスク装置インタフェース部
180 オブジェクト管理テーブル
181 オブジェクト識別子
182 優先度
189 オブジェクトエントリ
190 ライブラリ管理テーブル
191 ライブラリ識別子
192 優先度
199 ライブラリエントリ
200 物理メモリ
300 ディスク装置
310 スワップ領域
DESCRIPTION OF SYMBOLS 100 Control part 110 Task management table 111 Task identifier 112 Priority 119 Task entry 120 Page table 121 Physical page number 122 Allocation flag 123 Reference frequency 124 Change flag 125 Virtual page number 129 Page entry 130 Memory management part 140 Page selection part 141 Threshold 150 Swap processing unit 160 Swap area management unit 170 Disk device interface unit 180 Object management table 181 Object identifier 182 Priority 189 Object entry 190 Library management table 191 Library identifier 192 Priority 199 Library entry 200 Physical memory 300 Disk device 310 Swap area

Claims (6)

複数のページを含む第1の記憶部と複数のページを含む第2の記憶部とを含む階層化された記憶手段に対するメモリアクセスにおいてページフォールトが発生した場合に、
前記第1の記憶部へのメモリアクセスの対象データが優先データであるか非優先データであるかを、前記対象データに予め割り当てられたタスクの優先度、オブジェクトの優先度及びライブラリの優先度のいずれか2以上予め定められた閾値とに基づいて判定し、前記対象データが前記優先データであると判定した場合に、前記第1の記憶部の複数のページの内、前記第2の記憶部の対応するページに格納されているデータと同一のデータを記憶したページのいずれか一つを選択し、
当該選択した前記第1の記憶部のページの識別情報を出力するページ選択部を有する
ことを特徴とするメモリ管理装置。
When a page fault occurs in a memory access to a hierarchical storage unit including a first storage unit including a plurality of pages and a second storage unit including a plurality of pages,
Whether the target data of the memory access to the first storage unit is priority data or non-priority data, the priority of the task, the priority of the object, and the priority of the library that are pre-assigned to the target data When the determination is made based on any two or more and a predetermined threshold, and the target data is determined to be the priority data, the second of the plurality of pages of the first storage unit Select one of the pages storing the same data as the data stored in the corresponding page of the storage unit,
A memory management device comprising: a page selection unit that outputs identification information of the selected page of the first storage unit.
予め定められたタイミング毎に、前記第1の記憶部の各ページについて該ページに対応する参照頻度の値が小さいものから順に、当該ページに格納されているデータと前記第2の記憶部の対応するページに格納されているデータとが異なっている前記第1の記憶部のページであるダーティページを検索し、
前記ダーティページを検出した場合に当該ダーティページに格納されているデータを前記第2の記憶部の対応するページへ書き込む指示を出力するスワップ領域管理部を有する
ことを特徴とする請求項1記載のメモリ管理装置。
For each page of the first storage unit, the correspondence between the data stored in the page and the second storage unit in ascending order of the reference frequency value corresponding to the page at each predetermined timing. A dirty page that is a page of the first storage unit that is different from the data stored in the page to be
The swap area management unit that outputs an instruction to write data stored in the dirty page to a corresponding page of the second storage unit when the dirty page is detected. Memory management device.
複数のページを含む第1の記憶部と複数のページを含む第2の記憶部とを含む階層化された記憶手段に対するメモリアクセスにおいてページフォールトが発生した場合に、
前記第1の記憶部へのメモリアクセスの対象データが優先データであるか非優先データであるかを、前記対象データに予め割り当てられたタスクの優先度、オブジェクトの優先度及びライブラリの優先度のいずれか2以上予め定められた閾値とに基づいて判定し、前記対象データが前記優先データであると判定した場合に、前記第1の記憶部の複数のページの内、前記第2の記憶部の対応するページに格納されているデータと同一のデータを記憶したページのいずれか一つを選択し、
当該選択した前記第1の記憶部のページの識別情報を出力する
ことを特徴とするメモリ管理方法。
When a page fault occurs in a memory access to a hierarchical storage unit including a first storage unit including a plurality of pages and a second storage unit including a plurality of pages,
Whether the target data of the memory access to the first storage unit is priority data or non-priority data, the priority of the task, the priority of the object, and the priority of the library that are pre-assigned to the target data When the determination is made based on any two or more and a predetermined threshold, and the target data is determined to be the priority data, the second of the plurality of pages of the first storage unit Select one of the pages storing the same data as the data stored in the corresponding page of the storage unit,
Outputting identification information of the selected page of the first storage unit. A memory management method, comprising:
予め定められたタイミング毎に、前記第1の記憶部の各ページについて該ページに対応する参照頻度の値が小さいものから順に、当該ページに格納されているデータと前記第2の記憶部の対応するページに格納されているデータとが異なっている前記第1の記憶部のページであるダーティページを検索し、
前記ダーティページを検出した場合に当該ダーティページに格納されているデータを前記第2の記憶部の対応するページへ書き込む指示を出力する
ことを特徴とする請求項3記載のメモリ管理方法。
For each page of the first storage unit, the correspondence between the data stored in the page and the second storage unit in ascending order of the reference frequency value corresponding to the page at each predetermined timing. A dirty page that is a page of the first storage unit that is different from the data stored in the page to be
Memory management method according to claim 3 Symbol mounting and outputs an instruction to write the data stored in the dirty pages when detecting the dirty pages to page corresponding to the second storage unit.
複数のページを含む第1の記憶部と複数のページを含む第2の記憶部とを含む階層化された記憶手段に対するメモリアクセスにおいてページフォールトが発生した場合に、
前記第1の記憶部へのメモリアクセスの対象データが優先データであるか非優先データであるかを、前記対象データに予め割り当てられたタスクの優先度、オブジェクトの優先度及びライブラリの優先度のいずれか2以上予め定められた閾値とに基づいて判定し、前記対象データが前記優先データであると判定した場合に、前記第1の記憶部の複数のページの内、前記第2の記憶部の対応するページに格納されているデータと同一のデータを記憶したページのいずれか一つを選択し、
当該選択した前記第1の記憶部のページの識別情報を出力する処理
をコンピュータに実行させることを特徴とするプログラム。
When a page fault occurs in a memory access to a hierarchical storage unit including a first storage unit including a plurality of pages and a second storage unit including a plurality of pages,
Whether the target data of the memory access to the first storage unit is priority data or non-priority data, the priority of the task, the priority of the object, and the priority of the library that are pre-assigned to the target data When the determination is made based on any two or more and a predetermined threshold, and the target data is determined to be the priority data, the second of the plurality of pages of the first storage unit Select one of the pages storing the same data as the data stored in the corresponding page of the storage unit,
A program for causing a computer to execute a process of outputting identification information of the selected page of the first storage unit.
予め定められたタイミング毎に、前記第1の記憶部の各ページについて該ページに対応する参照頻度の値が小さいものから順に、当該ページに格納されているデータと前記第2の記憶部の対応するページに格納されているデータとが異なっている前記第1の記憶部のページであるダーティページを検索し、
前記ダーティページを検出した場合に当該ダーティページに格納されているデータを前記第2の記憶部の対応するページへ書き込む指示を出力する処理
をコンピュータに実行させることを特徴とする請求項5記載のプログラム。
For each page of the first storage unit, the correspondence between the data stored in the page and the second storage unit in ascending order of the reference frequency value corresponding to the page at each predetermined timing. A dirty page that is a page of the first storage unit that is different from the data stored in the page to be
5. Symbol mounting, characterized in that to execute a process of outputting an instruction to write the data stored in the dirty pages when detecting the dirty pages to the second corresponding page of the storage unit to the computer Program.
JP2008308321A 2008-12-03 2008-12-03 Memory management device, memory management method and program Expired - Fee Related JP5077209B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008308321A JP5077209B2 (en) 2008-12-03 2008-12-03 Memory management device, memory management method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008308321A JP5077209B2 (en) 2008-12-03 2008-12-03 Memory management device, memory management method and program

Publications (2)

Publication Number Publication Date
JP2010134584A JP2010134584A (en) 2010-06-17
JP5077209B2 true JP5077209B2 (en) 2012-11-21

Family

ID=42345843

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008308321A Expired - Fee Related JP5077209B2 (en) 2008-12-03 2008-12-03 Memory management device, memory management method and program

Country Status (1)

Country Link
JP (1) JP5077209B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102116984B1 (en) * 2014-03-11 2020-05-29 삼성전자 주식회사 Method for controlling memory swap operation and data processing system adopting the same
CN105095094B (en) * 2014-05-06 2018-11-30 华为技术有限公司 EMS memory management process and equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02163851A (en) * 1988-12-16 1990-06-25 Nec Corp Synchronizing process system for disk cache
JPH02270032A (en) * 1989-04-12 1990-11-05 Nec Corp Loading system
JPH0535513A (en) * 1991-07-30 1993-02-12 Shikoku Nippon Denki Software Kk Bus adaptor
JP3309425B2 (en) * 1992-05-22 2002-07-29 松下電器産業株式会社 Cache control unit
JP3431936B2 (en) * 1992-12-03 2003-07-28 キヤノン株式会社 Memory management method and device
JP3457394B2 (en) * 1994-09-16 2003-10-14 株式会社東芝 Information storage device
US6134634A (en) * 1996-12-20 2000-10-17 Texas Instruments Incorporated Method and apparatus for preemptive cache write-back

Also Published As

Publication number Publication date
JP2010134584A (en) 2010-06-17

Similar Documents

Publication Publication Date Title
US8930625B2 (en) Weighted history allocation predictor algorithm in a hybrid cache
KR20190124204A (en) Dynamic Memory Remapping to Reduce Row Buffer Conflicts
JP7340326B2 (en) Perform maintenance operations
US8843707B2 (en) Dynamic inclusive policy in a hybrid cache hierarchy using bandwidth
EP2889776B1 (en) Data arrangement control program, data arrangement control method and data arrangment control apparatus
KR101056460B1 (en) How to Replace Cache Controllers and Cache Blocks
EP3252609A1 (en) Cache data determination method and device
US8868835B2 (en) Cache control apparatus, and cache control method
US8645612B2 (en) Information processing device and information processing method
US7734842B2 (en) Computer-implemented method, apparatus, and computer program product for managing DMA write page faults using a pool of substitute pages
JP2007257028A (en) Memory access load distribution device and method for multiprocessor system
US8819360B2 (en) Information processing apparatus, cache apparatus, and data processing method
CN113835624A (en) Data migration method and device based on heterogeneous memory
US20150100663A1 (en) Computer system, cache management method, and computer
JP5077209B2 (en) Memory management device, memory management method and program
CN113031857B (en) Data writing method, device, server and storage medium
CN110647476B (en) Method, device and equipment for writing data in solid state disk and storage medium
CN105183398B (en) A kind of storage device, electronic equipment and data processing method
US8356141B2 (en) Identifying replacement memory pages from three page record lists
JP2021135538A (en) Storage control apparatus and storage control program
CN107870877B (en) Method and system for managing data access in a storage system
US10169235B2 (en) Methods of overriding a resource retry
JP4871921B2 (en) Data processing system and program development system
CN110119245B (en) Method and system for operating NAND flash memory physical space to expand memory capacity
CN108475197B (en) Cache structure for nested preemption

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20110705

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120516

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120522

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120711

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: 20120731

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120813

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150907

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5077209

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees