JP2000148515A - Memory scheduling method and storage medium storing memory scheduling program - Google Patents
Memory scheduling method and storage medium storing memory scheduling programInfo
- Publication number
- JP2000148515A JP2000148515A JP10331960A JP33196098A JP2000148515A JP 2000148515 A JP2000148515 A JP 2000148515A JP 10331960 A JP10331960 A JP 10331960A JP 33196098 A JP33196098 A JP 33196098A JP 2000148515 A JP2000148515 A JP 2000148515A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- priority
- memory scheduling
- access frequency
- virtual
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 121
- 238000012545 processing Methods 0.000 claims description 22
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000032683 aging Effects 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006866 deterioration Effects 0.000 description 1
- 230000002542 deteriorative effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007634 remodeling Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、仮想記憶機構における
ページ変換アルゴリズムに関し、特に、メモリの解放処
理に対する詳細な設定をすることが可能なメモリスケジ
ューリング方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a page conversion algorithm in a virtual storage mechanism, and more particularly, to a memory scheduling method capable of making detailed settings for memory release processing.
【0002】[0002]
【従来の技術】コンピュータシステムにおいて、OSが
動作中に空きメモリが足りなくなった場合、エージング
もしくはページングと呼ばれる動作を行い、ユーザプロ
セスが使用している空きメモリを解放している。エージ
ングを行うシステムの場合、ユーザプロセスの仮想空間
を調べ、ある一定期間参照されていないメモリページを
解放する。ページングを行うシステムの場合、メモリペ
ージを調べ、ある一定期間参照されていないメモリペー
ジを解放する。2. Description of the Related Art In a computer system, when an available memory runs short during the operation of an OS, an operation called aging or paging is performed to release an available memory used by a user process. In the case of an aging system, the virtual space of the user process is checked, and a memory page that has not been referenced for a certain period is released. In the case of a paging system, a memory page is examined, and a memory page that has not been referred to for a certain period of time is released.
【0003】つまり、どちらの方式においても、解放す
るメモリページは一定期間の間参照されたかどうかを基
準として選択される。That is, in either method, a memory page to be released is selected based on whether or not it has been referenced for a certain period.
【0004】よって、これまでの方式では、頻繁にアク
セスされるファイルがたまたま一定期間アクセスされな
かったような場合にも、メモリページの解放が実行され
てしまう可能性がある。Therefore, in the conventional methods, there is a possibility that a memory page is released even when a frequently accessed file happens to be not accessed for a certain period of time.
【0005】また、ある一定期間の間参照されたかどう
かのみがメモリ解放の指標となるので、メモリに常駐し
ているメモリページが実際のプロセスのワーキングセッ
トとならない可能性が高く、実際のファイルの用途に依
存したメモリスケジューリングを行うことができなかっ
た。[0005] Also, since only memory is referred to for a certain period of time as an indicator of memory release, there is a high possibility that a memory page resident in memory does not become a working set of an actual process, and the actual file Memory scheduling depending on the application could not be performed.
【0006】従来のシステムでは、ある仮想空間範囲の
メモリスケジューリングをユーザが指定できる機能をシ
ステムコールとして実装しているものがある。例えば、
UNIXにおけるmadviseシステムコールがこれ
にあたる。madviseシステムコールでは指定され
た仮想空間範囲へのアクセスがランダムであるかシーケ
ンシャルであるかを指定できる。In some conventional systems, a function that allows a user to specify memory scheduling in a certain virtual space range is implemented as a system call. For example,
The madvis system call in UNIX corresponds to this. In the madvise system call, it is possible to specify whether access to the specified virtual space range is random or sequential.
【0007】ランダムアクセスの場合、一度アクセスさ
れたメモリページが再び参照される可能性があるので、
その仮想空間範囲に割り当てられている物理メモリが解
放されにくくするように実装されているシステムも存在
する。しかし、システムコールなので必ずアプリケーシ
ョンに対して改造が必要となるため、市販のアプリケー
ションに対するメモリスケジューリングを制御すること
は不可能である。In the case of random access, there is a possibility that a memory page once accessed may be referred to again.
Some systems are implemented so that the physical memory allocated to the virtual space range is hardly released. However, since it is a system call, the application must be modified without fail, and it is impossible to control memory scheduling for a commercially available application.
【0008】[0008]
【発明が解決しようとする課題】上述した従来の方式で
は、一定期間の間参照されたかどうかを基準としてメモ
リの解放を行なうため、頻繁にアクセスされるファイル
がたまたま一定期間アクセスされなかったような場合に
も、メモリページの解放が実行されてしまうと共に、そ
のような現象が度重なることで外部記憶装置との入出力
動作が頻発しシステム性能が劣化するという問題があっ
た。In the above-described conventional method, since the memory is released based on whether or not the file has been referred to for a certain period, frequently accessed files may not be accessed for a certain period. Also in such a case, there is a problem that the release of the memory page is executed, and that such a phenomenon occurs frequently, so that the input / output operation to / from the external storage device occurs frequently and the system performance is deteriorated.
【0009】また、ある一定期間の間参照されたかどう
かのみがメモリ解放の指標となるので、メモリに常駐し
ているメモリページが実際のプロセスのワーキングセッ
トとならない可能性が高く、実際のファイルの用途に依
存したメモリスケジューリングを行うことができなかっ
た。[0009] Also, since only whether or not the memory page has been referenced for a certain period of time serves as an indicator of memory release, there is a high possibility that a memory page resident in memory does not become the working set of the actual process, and Memory scheduling depending on the application could not be performed.
【0010】また、ある仮想空間範囲のメモリスケジュ
ーリングをユーザが指定できる機能をシステムコールと
して実装する従来のシステムでは、システムコールであ
るので必ずアプリケーションに対して改造が必要となる
ため、市販のアプリケーションに対するメモリスケジュ
ーリングを制御することは不可能であるという問題点が
あった。Further, in a conventional system in which a function that allows a user to specify a memory scheduling in a certain virtual space range is implemented as a system call, since the system call is required, the application must be modified without fail. There is a problem that it is impossible to control memory scheduling.
【0011】本発明の第1の目的は、上記従来の欠点を
解決し、アクセス頻度による優先度、ファイル毎の優先
度、セグメントの用途別の優先順位を考慮に入れたペー
ジングにより、システム性能を劣化させない効率的なメ
モリスケジューリングを可能とするコンピュータシステ
ムにおけるメモリスケジューリング方法及びメモリスケ
ジューリングプログラムを格納する記憶媒体を提供する
ことにある。A first object of the present invention is to solve the above-mentioned drawbacks of the prior art, and to improve system performance by paging taking into account the priority based on access frequency, the priority for each file, and the priority for each use of a segment. It is an object of the present invention to provide a memory scheduling method and a storage medium for storing a memory scheduling program in a computer system which enables efficient memory scheduling without deterioration.
【0012】本発明の第2の目的は、アプリケーション
で使用するファイル及び用途毎に適切なメモリスケジュ
ーリングを行なうことができるコンピュータシステムに
おけるメモリスケジューリング方法及びメモリスケジュ
ーリングプログラムを格納する記憶媒体を提供すること
にある。A second object of the present invention is to provide a memory scheduling method and a storage medium for storing a memory scheduling program in a computer system capable of performing appropriate memory scheduling for each file used for an application and each application. is there.
【0013】本発明の第3の目的は、アプリケーション
の改造をすることなく、詳細なメモリスケジューリング
を設定することができるコンピュータシステムにおける
メモリスケジューリング方法及びメモリスケジューリン
グプログラムを格納する記憶媒体を提供することにあ
る。A third object of the present invention is to provide a memory scheduling method and a storage medium for storing a memory scheduling program in a computer system capable of setting detailed memory scheduling without remodeling an application. is there.
【0014】本発明の第4の目的は、ユーザプロセスの
ワーキングセットをより正確に求めることを可能とする
コンピュータシステムにおけるメモリスケジューリング
方法及びメモリスケジューリングプログラムを格納する
記憶媒体を提供することにある。A fourth object of the present invention is to provide a memory scheduling method and a storage medium for storing a memory scheduling program in a computer system which enable a working set of a user process to be determined more accurately.
【0015】[0015]
【課題を解決するための手段】上記目的を達成する本発
明は、仮想記憶機構を用いたコンピュータシステムにお
けるメモリスケジューリング方法において、仮想アドレ
ス空間の仮想ページに対して優先順位を設定するアクセ
ス頻度管理ステップと、前記優先順位に基づいて物理メ
モリの解放処理を制御するメモリスケジューリングステ
ップとからなり、前記アクセス頻度管理ステップは、コ
ンピュータシステム内の全プロセスの仮想アドレス空間
について、物理メモリに対応付けられた前記仮想ページ
のアクセス頻度と、前記仮想ページのデータの用途及び
前記仮想ページに対応するファイル毎に予め設定された
優先順位に基づいてリスケジューリング優先順位を設定
し、前記メモリスケジューリングステップは、前記プロ
セスの前記仮想アドレス空間の前記仮想ページ毎に、前
記メモリスケジューリング優先順位とメモリの負荷状態
に基づいて、前記物理メモリの解放処理を実行すること
を特徴とする。According to the present invention, there is provided a memory scheduling method in a computer system using a virtual storage mechanism, wherein an access frequency managing step for setting a priority order for a virtual page in a virtual address space. And a memory scheduling step of controlling physical memory release processing based on the priority, wherein the access frequency management step is performed for the virtual address space of all processes in the computer system, the virtual address space being associated with the physical memory. A rescheduling priority is set based on an access frequency of a virtual page, a use of data of the virtual page, and a priority set in advance for each file corresponding to the virtual page, and the memory scheduling step includes: The virtual Wherein for each virtual page of less space, based on the load state of the memory scheduling priority and a memory, and executes the release processing of the physical memory.
【0016】請求項2の本発明は、前記アクセス頻度管
理ステップは、前記アクセス頻度と前記データの用途と
前記ファイルに重みを設定し、前記アクセス頻度と重み
の積と前記データの用途の優先順位と重みの積と前記フ
ァイルの優先順位と重みの積との総和を前記仮想ページ
に対する前記リスケジューリング優先順位とすることを
特徴とする。According to a second aspect of the present invention, in the access frequency management step, the access frequency, the use of the data, and the file are weighted, and the product of the access frequency and the weight and the priority of the use of the data are set. And the product of the product of the file and the weight, and the product of the priority of the file and the weight are set as the rescheduling priority for the virtual page.
【0017】請求項3の本発明は、前記アクセス頻度管
理ステップは、一定期間における過去複数回数分の前記
アクセス頻度毎に値の異なる重みを設定し、前記アクセ
ス頻度と対応する重みの積の総和と、前記データの用途
の優先順位と重みの積と前記ファイルの優先順位と重み
の積との総和を前記仮想ページに対する前記メモリスケ
ジューリング優先順位とすることを特徴とする。According to a third aspect of the present invention, in the access frequency management step, different weights are set for each of the access frequencies for a plurality of times in the past during a fixed period, and a sum of products of the access frequencies and the corresponding weights is set. And the sum of the product of the priority of use of the data and the weight and the product of the priority and the weight of the file is set as the memory scheduling priority for the virtual page.
【0018】請求項4の本発明は、前記メモリスケジュ
ーリングステップは、前記全てのプロセスの前記全ての
仮想ページの前記メモリスケジューリング優先順位の平
均値とメモリ付加状態に基づいて閾値を設定し、前記仮
想ページの前記メモリスケジューリング優先順位の値が
前記閾値より小さい場合に、前記物理メモリの解放処理
を行なうことを特徴とする。According to a fourth aspect of the present invention, in the memory scheduling step, a threshold is set based on an average value of the memory scheduling priorities of all the virtual pages of all the processes and a memory addition state, When the value of the memory scheduling priority of a page is smaller than the threshold value, the physical memory is released.
【0019】請求項5の本発明は、メモリスケジューリ
ングステップは、前記メモリの負荷状態が高い場合に、
前記全てのプロセスの前記全ての仮想ページの前記メモ
リスケジューリング優先順位の平均値を上まわる値を、
負荷状態が低い場合に前記平均値を下まわる値を、前記
閾値として設定することを特徴とする。According to a fifth aspect of the present invention, in the memory scheduling step, when the load state of the memory is high,
A value above the average value of the memory scheduling priorities of all the virtual pages of all the processes,
When the load state is low, a value lower than the average value is set as the threshold value.
【0020】請求項6の本発明は、前記アクセス頻度管
理ステップは、前記仮想ページに対する前記メモリスケ
ジューリング優先順位の全プロセス及び全仮想ページに
おける平均値を求めることを特徴とする。According to a sixth aspect of the present invention, in the access frequency managing step, an average value of the memory scheduling priorities for the virtual pages in all processes and all virtual pages is obtained.
【0021】請求項7の本発明は、前記メモリスケジュ
ーリングステップは、前記仮想ページの前記メモリスケ
ジューリング優先順位の値が前記閾値より小さい場合で
あって、前記物理メモリが未使用の場合に、前記物理メ
モリの解放処理を行なうことを特徴とする。According to a seventh aspect of the present invention, in the memory scheduling step, when the value of the memory scheduling priority of the virtual page is smaller than the threshold value, and when the physical memory is unused, the physical scheduling is performed. It is characterized in that memory release processing is performed.
【0022】請求項8のの本発明は、前記アクセス頻度
管理ステップは、前記ファイルの優先順位がある特定の
値であるかどうかを判断し、特別の値あった場合、デー
タの用途、アクセス頻度から求めた優先順位にかかわら
ず、特別な値を前記メモリスケジューリング優先順位と
して設定し、前記メモリスケジューリングステップは、
前記メモリスケジューリング優先順位の値が、閾値より
小さい場合でも前記特別の値であれば前記物理メモリを
解放処理を行なわないことを特徴とする。According to a still further aspect of the present invention, in the access frequency managing step, it is determined whether or not the priority of the file is a specific value. Irrespective of the priority determined from, set a special value as the memory scheduling priority, the memory scheduling step,
Even when the value of the memory scheduling priority is smaller than a threshold value, the physical memory is not released if it is the special value.
【0023】請求項9の本発明では、仮想記憶機構を用
いたコンピュータシステムにおけるメモリスケジューリ
ングプログラムを格納する記憶媒体であって、前記メモ
リスケジューリングプログラムは、仮想アドレス空間の
仮想ページに対して優先順位を設定するアクセス頻度管
理ステップと、前記優先順位に基づいて物理メモリの解
放処理を制御するメモリスケジューリングステップとか
らなり、前記アクセス頻度管理ステップは、コンピュー
タシステム内の全プロセスの仮想アドレス空間につい
て、物理メモリに対応付けられた前記仮想ページのアク
セス頻度と、前記仮想ページのデータの用途及び前記仮
想ページに対応するファイル毎に予め設定された優先順
位に基づいてリスケジューリング優先順位を設定し、前
記メモリスケジューリングステップは、前記プロセスの
前記仮想アドレス空間の前記仮想ページ毎に、前記メモ
リスケジューリング優先順位とメモリの負荷状態に基づ
いて、前記物理メモリの解放処理を実行することを特徴
とする。According to a ninth aspect of the present invention, there is provided a storage medium for storing a memory scheduling program in a computer system using a virtual storage mechanism, wherein the memory scheduling program assigns a priority to a virtual page in a virtual address space. An access frequency management step to be set; and a memory scheduling step to control release processing of a physical memory based on the priority order. The access frequency management step includes a step of setting a physical memory for a virtual address space of all processes in the computer system. Setting a rescheduling priority based on an access frequency of the virtual page associated with the virtual page, a use of data of the virtual page, and a priority set in advance for each file corresponding to the virtual page; Ring step, said each virtual page of the virtual address space of the process, based on the load state of the memory scheduling priority and a memory, and executes the release processing of the physical memory.
【0024】[0024]
【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して詳細に説明する。図1は、本発明の実
施の形態による仮想記憶機構を用いたコンピュータシス
テムにおけるメモリスケジューリングシステムの構成を
示すブロック図である。Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a memory scheduling system in a computer system using a virtual storage mechanism according to an embodiment of the present invention.
【0025】本実施の形態によるメモリスケジューリン
グシステムは、プロセス10が使用する仮想アドレス空
間11と、仮想アドレス空間11へのアクセス頻度の履
歴を保持するアクセス頻度管理領域12と、仮想アドレ
ス空間11を用途別に区切って管理するための仮想アド
レス管理領域13と、プロセス10で使用するファイル
を含んでいる外部記憶装置14を含む。The memory scheduling system according to the present embodiment uses a virtual address space 11 used by the process 10, an access frequency management area 12 for storing a history of access frequencies to the virtual address space 11, and a virtual address space 11. It includes a virtual address management area 13 for separate management and an external storage device 14 containing files used in the process 10.
【0026】ここで、仮想アドレス空間11は、プロセ
ス10が独自に使用できる。また、メモリマップトファ
イル機構を採用していることから、仮想アドレス空間1
1の各メモリページには実態となるファイルが存在す
る。Here, the virtual address space 11 can be used independently by the process 10. Further, since the memory-mapped file mechanism is employed, the virtual address space 1
In each memory page of No. 1, there is a file that is actually present.
【0027】仮想アドレス空間11は、その用途別にセ
グメントと呼ばれる管理単位に分けられており、セグメ
ント11a、11b、11cに対応してそれぞれ仮想ア
ドレス管理領域13内の管理領域13a、13b、13
cが存在する。また、各セグメントには、メモリスケジ
ューラがメモリを解放するときにメモリの内容を書き込
むためのファイル14a,14b、14cがそれぞれ対
応付けられている。ファイル管理領域は外部記憶装置内
に存在するが、システム動作中はメモリ中に常駐してお
り、各セグメントに対応するファイルの管理領域はシス
テム作動中に容易に参照することができる。The virtual address space 11 is divided into management units called segments according to its use. Management areas 13a, 13b, 13 in the virtual address management area 13 correspond to the segments 11a, 11b, 11c, respectively.
c exists. Also, each segment is associated with a file 14a, 14b, 14c for writing the contents of the memory when the memory scheduler releases the memory. Although the file management area exists in the external storage device, it resides in the memory during the operation of the system, and the management area of the file corresponding to each segment can be easily referred to during the operation of the system.
【0028】図2を用いて仮想アドレス空間11のセグ
メントの用途毎のメモリスケジューリング優先順位につ
いて説明する。図2は、図1におけるプロセス10の仮
想アドレス空間11の用途を示したものである。The memory scheduling priority for each use of the segment of the virtual address space 11 will be described with reference to FIG. FIG. 2 shows the use of the virtual address space 11 of the process 10 in FIG.
【0029】セグメント11aには、プロセス10で使
用するテキストコードが格納されている。セグメント1
1bにはプロセス20で使用する初期化済データが格納
されている。セグメント11cには未初期のデータ(B
SS)が格納されている。セグメント11dには他のプ
ロセスと共有するためのライブラリのテキストコードが
格納されている。セグメント11eには共有ライブラリ
で用いるデータが格納される。セグメント11fはプロ
セス10のスタックとして用いられる。The segment 11a stores a text code used in the process 10. Segment 1
1b stores the initialized data used in the process 20. The uninitialized data (B
SS) is stored. The segment 11d stores a text code of a library to be shared with another process. The segment 11e stores data used in the shared library. The segment 11f is used as a stack of the process 10.
【0030】それぞれのセグメントに対応して、仮想ア
ドレス管理領域13の各管理領域13a、13b、13
c、13d、13e、13fが設けられており、その中
にセグメントの用途毎のメモリスケジューリング優先順
位が格納されている。Each management area 13a, 13b, 13 of the virtual address management area 13 corresponds to each segment.
c, 13d, 13e and 13f are provided, in which memory scheduling priorities for each purpose of the segment are stored.
【0031】本実施の形態では、テキスト部、データ
部、BSS部、ライブラリテキスト部、ライブラリデー
タ部、スタック部のメモリスケジューリング優先順位
は、それぞれ「Ptext」、「Pdata」、「Pb
ss」、「Pshtxt」、「Pshdat」、「Ps
tck」に設定されている。また、システムコールを用
いて、各プロセスに固有な用途別優先順位を設定するこ
とも可能である。その場合、設定した優先順位は仮想ア
ドレス管理領域13内に上書きされる。In this embodiment, the memory scheduling priorities of the text section, data section, BSS section, library text section, library data section, and stack section are “Ptext”, “Pdata”, and “Pb”, respectively.
ss "," Pshtxt "," Pshdat "," Ps
tck ". Further, it is also possible to set a use-specific priority unique to each process by using a system call. In that case, the set priority is overwritten in the virtual address management area 13.
【0032】図3を用いてファイル毎のメモリスケジュ
ーリング優先順位について説明する。図3は、プロセス
10とプロセス10が使用しているファイルとの対応を
示している。The priority of memory scheduling for each file will be described with reference to FIG. FIG. 3 shows the correspondence between the process 10 and the files used by the process 10.
【0033】仮想アドレス空間11のセグメント11a
とセグメント11bはそれぞれテキスト部、データ部と
して使用されているので、これらのセグメントはプロセ
ス10を起動したときに用いたロードモジュールである
ファイル14aに対応している。セグメント11dとセ
グメント11eは共有ライブラリであるファイル14b
に対応している。セグメント11cとセグメント11f
はプロセス10が固有に使用する領域であり、対応する
ファイルが存在しないため、二次記憶ファイルに対応付
けられる。Segment 11a of virtual address space 11
And the segment 11b are used as a text portion and a data portion, respectively, so that these segments correspond to the file 14a which is a load module used when the process 10 is started. Segment 11d and segment 11e are shared library file 14b
It corresponds to. Segment 11c and segment 11f
Is an area uniquely used by the process 10, and since there is no corresponding file, it is associated with the secondary storage file.
【0034】ファイル14a,14b、14cにはそれ
ぞれメモリスケジューリング優先順位として「Pl
m」、「Plib」、「Pswap」が設定されてお
り、ファイル管理領域に設定されている。また、システ
ムコールを用いてファイルに新たな優先順位を設定する
ことも可能であるが、その優先順位はそのファイルを用
いる全プロセスに対して有効となる。The files 14a, 14b, and 14c have the memory scheduling priority "Pl
m, Plib, and Pswap are set in the file management area. It is also possible to set a new priority for a file using a system call, but the priority is effective for all processes using the file.
【0035】図4を用いてアクセス頻度管理領域につい
て説明する。仮想アドレス空間11は、ハードウェアが
メモリを管理する際に最小単位であるページサイズ単位
(仮想ページ単位)で物理メモリが対応付けられてい
る。仮想アドレス空間11内の各仮想ページに対して、
アクセス頻度管理領域12が存在する。The access frequency management area will be described with reference to FIG. The virtual address space 11 is associated with a physical memory in a page size unit (virtual page unit) which is a minimum unit when hardware manages a memory. For each virtual page in the virtual address space 11,
An access frequency management area 12 exists.
【0036】図4においては、仮想ページ11a1に対
応して管理領域12a、仮想ページ11a2に対応して
管理領域12b、仮想ページ11a3に対応して管理領
域12cが存在する。アクセス頻度管理領域には、ある
一定期間内に、対応する仮想ページにアクセスしたアク
セス回数が記憶される。In FIG. 4, there is a management area 12a corresponding to the virtual page 11a1, a management area 12b corresponding to the virtual page 11a2, and a management area 12c corresponding to the virtual page 11a3. The access frequency management area stores the number of accesses to the corresponding virtual page within a certain period.
【0037】本実施の形態では、仮想ページに対するア
クセス回数を過去3回分記憶している。例えば、最近の
一定期間内の仮想ページ11a1に対するアクセス回数
は「F311」であり、その前の期間内のアクセス回数
は「F312」であり、さらにその前の期間内のアクセ
ス回数は「F313」である。これらのアクセス回数の
履歴と、対応するファイル毎及び用途毎の優先順位を用
いて算出されたメモリスケジューリング優先順位は、
「P31」であり、アクセス頻度管理領域12に記憶さ
れる。仮想ページ11a1にアクセスした際にアドレス
解決例外が発生した場合、その延長で対応するアクセス
頻度管理領域12aの「F311」の値がインクリメン
トされる。In the present embodiment, the number of accesses to the virtual page for the past three times is stored. For example, the number of times of access to the virtual page 11a1 during the last certain period is “F311”, the number of times of access within the previous period is “F312”, and the number of times of access within the previous period is “F313”. is there. The memory scheduling priority calculated using the history of these access counts and the corresponding priority for each file and each application is as follows:
“P31”, which is stored in the access frequency management area 12. If an address solution exception occurs when accessing the virtual page 11a1, the value of "F311" in the corresponding access frequency management area 12a is incremented by extension.
【0038】図5は、プロセスとメモリスケジューリン
グのためにシステムが用意する手段の構成を示してい
る。アクセス頻度管理手段60はある一定期間ごとに動
作し、システム内の全プロセスの仮想アドレス空間11
を調べ、各仮想ページに対するアクセス頻度を調べ、メ
モリスケジューリングの際の優先順位を決定する。FIG. 5 shows the configuration of means prepared by the system for process and memory scheduling. The access frequency management means 60 operates at regular intervals, and sets the virtual address space 11 of all processes in the system.
Is checked, the access frequency to each virtual page is checked, and the priority in memory scheduling is determined.
【0039】メモリスケジューリング手段70は、シス
テムの空きメモリに余裕がなくなった場合に動作し、各
プロセスのアクセス頻度管理領域12に設定された各優
先順位を参照し、メモリページを解放する。メモリスケ
ジューリング手段70は、システムの空きメモリ量が回
復したか、あるいは予め設定されたプロセス数について
処理を行った場合、処理を終了する。The memory scheduling means 70 operates when there is no more free memory in the system, refers to each priority set in the access frequency management area 12 of each process, and releases a memory page. The memory scheduling means 70 terminates the processing when the free memory capacity of the system has been recovered or when the processing has been performed for a preset number of processes.
【0040】システム内に存在するプロセス10、プロ
セス20、プロセス30、プロセス40、プロセス50
は、システム内に存在するプロセスを管理する配列(プ
ロセススロット)に順に設定されている。Process 10, process 20, process 30, process 40, process 50 existing in the system
Are sequentially set in an array (process slot) for managing the processes existing in the system.
【0041】以下、図6のフローチャートを参照して上
記アクセス頻度管理手段60の動作について説明する。The operation of the access frequency management means 60 will be described below with reference to the flowchart of FIG.
【0042】アクセス頻度管理手段60はある一定期間
ごとに起動されるシステム手段である。起動されたアク
セス頻度管理手段60は、まずアクセス頻度を調べるプ
ロセスを選択する(ステップ601)。本実施の形態で
は全プロセスを調べるので、プロセススロットの先頭の
プロセスが選択されることになる。The access frequency management means 60 is a system means that is activated at regular intervals. The started access frequency management means 60 first selects a process for checking the access frequency (step 601). In this embodiment, since all processes are checked, the first process in the process slot is selected.
【0043】次で、アクセス頻度を調べる仮想ページを
仮想アドレス空間11の先頭にセットする(ステップ6
02)。そして、現在調べている仮想ページに物理メモ
リが割り当てられているかどうかを調べる(ステップ6
03)。Next, a virtual page whose access frequency is to be checked is set at the head of the virtual address space 11 (step 6).
02). Then, it is checked whether a physical memory is allocated to the virtual page currently checked (step 6).
03).
【0044】ステップ603において、物理メモリが割
り当てられていない場合は、アクセス頻度を調べる仮想
ページを次のページにセットすることにより(ステップ
604)、ステップ603から繰り返す。If no physical memory is allocated in step 603, the virtual page whose access frequency is to be checked is set to the next page (step 604), and the process is repeated from step 603.
【0045】ステップ603で、物理メモリが割り当て
られている場合、その仮想ページのメモリスケジューリ
ング優先順位をアクセス頻度管理領域12に設定する
(ステップ605)。In step 603, if a physical memory has been allocated, the memory scheduling priority of the virtual page is set in the access frequency management area 12 (step 605).
【0046】アクセス回数の情報の履歴をとり、最新の
アクセス回数情報をゼロクリアする(ステップ60
6)。例えば、図4のアクセス頻度管理領域12aに対
してステップ606を実行すると、1つ前のアクセス回
数として値「F311」が設定され、2つ前のアクセス
回数として値F312が設定され、最新のアクセス回数
として値「0」(ゼロクリア)が設定される。The history of the information on the number of accesses is obtained, and the latest information on the number of accesses is cleared to zero (step 60).
6). For example, when step 606 is executed for the access frequency management area 12a in FIG. 4, the value “F311” is set as the number of previous accesses, the value F312 is set as the number of previous accesses, and the latest access number is set. A value “0” (zero clear) is set as the number of times.
【0047】次に、全ての仮想ページに対してアクセス
頻度情報を更新したかどうかを調べる(ステップ60
7)。まだ、調べていない仮想ページがある場合、仮想
ページを次のページにセットしてステップ603から繰
り返す(ステップ604)。全ての仮想ページについて
調べた場合、そのプロセスに対してアクセス頻度管理手
段60が処理を行ったことを示すフラグをセットする
(ステップ608)。Next, it is checked whether the access frequency information has been updated for all the virtual pages (step 60).
7). If there is a virtual page that has not been checked yet, the virtual page is set to the next page and the process is repeated from step 603 (step 604). When all the virtual pages have been checked, a flag indicating that the access frequency management means 60 has performed the process for the process is set (step 608).
【0048】全プロセスについて処理を行ったかどうか
を調べ(ステップ609)、まだ処理を行っていないプ
ロセスが存在すれば次のプロセスを選択して(ステップ
611)、ステップ602からの処理を行う。全プロセ
スに対して処理を行っていれば、全てのプロセスにおけ
る全仮想ページのメモリスケジューリング優先順位の平
均値を求め(ステップ610)、処理を終了する。It is checked whether or not all the processes have been processed (step 609). If there is a process that has not been processed yet, the next process is selected (step 611), and the processes from step 602 are performed. If the process has been performed for all processes, the average value of the memory scheduling priorities of all virtual pages in all processes is obtained (step 610), and the process ends.
【0049】本実施の形態におけるメモリスケジューリ
ング優先順位の決定方法について図7のフローチャート
を用いて説明する。図7は、図6におけるステップ60
5の処理内容を説明している。本実施の形態では、アク
セス頻度、ファイル毎及びセグメントの用途毎の優先順
位のうち、どれを重視するかを決定するための重みとな
る値が設定されている。ここでは、アクセス頻度の重み
を「Wa」、ファイルの重みを「Wf,」、セグメント
の用途別の重みを「Ws」と設定する。The method of determining the memory scheduling priority in the present embodiment will be described with reference to the flowchart of FIG. FIG. 7 is a flow chart showing step 60 in FIG.
5 is described. In the present embodiment, a value is set as a weight for determining which of the access frequency, the priority for each file, and the priority for each use of the segment is to be prioritized. Here, the weight of the access frequency is set to “Wa”, the weight of the file is set to “Wf,” and the weight for each use of the segment is set to “Ws”.
【0050】まず、現在調べている仮想ページに対応す
るアクセス頻度管理領域12を求める(ステップ70
1)。その中に格納されているもっとも最近の期間内に
おけるアクセス回数を「F311」、その前の期間内に
おけるアクセス回数を「F312」、さらにその前の期
間内におけるアクセス回数を「F313」とする。最新
のアクセス頻度情報をより重要視すべきなので、過去の
アクセス頻度に対する重みは小さくする。本実施の形態
では、アクセス回数「F311」の重みを「Wa」、ア
クセス回数「F312」の重みを「1/2Wa」、アク
セス回数「F313」の重みを「1/4Wa」とし、そ
れぞれのアクセス回数と重みの積の総和をアクセス頻度
を元にした優先順位とする(ステップ702)。First, the access frequency management area 12 corresponding to the currently examined virtual page is obtained (step 70).
1). The number of accesses in the latest period stored therein is “F311”, the number of accesses in the previous period is “F312”, and the number of accesses in the previous period is “F313”. Since the latest access frequency information should be given more importance, the weight for the past access frequency is set small. In the present embodiment, the weight of the access frequency “F311” is “Wa”, the weight of the access frequency “F312” is “1 / Wa”, and the weight of the access frequency “F313” is “1/4 Wa”. The sum of the product of the number of times and the weight is set as the priority based on the access frequency (step 702).
【0051】次に、仮想ページに対する仮想アドレス管
理領域13を求め(ステップ703)、セグメント用途
別の優先順位を読み込む。その値と重み「Ws」との積
をセグメント用途別の優先順位とする(ステップ70
4)。Next, the virtual address management area 13 for the virtual page is obtained (step 703), and the priority order for each segment application is read. The product of the value and the weight "Ws" is set as the priority for each segment application (step 70).
4).
【0052】次に、仮想ページに対応するファイルの管
理領域を求め(ステップ705)、ファイル毎に設定さ
れた優先順位を読み込む。その値と重み「Wf」との積
をファイル毎の優先順位とする(ステップ706)。Next, the management area of the file corresponding to the virtual page is obtained (step 705), and the priority set for each file is read. The product of the value and the weight “Wf” is set as a priority for each file (step 706).
【0053】ステップ702、ステップ704、ステッ
プ706で求めたそれぞれの優先順位の総和をその仮想
ページのメモリスケジューリング優先順位としてアクセ
ス頻度領域12に設定する(ステップ707)。The sum of the priorities determined in steps 702, 704, and 706 is set as the memory scheduling priority of the virtual page in the access frequency area 12 (step 707).
【0054】図8のフローチャートを参照してメモリス
ケジューリング手段70の動作について説明する。The operation of the memory scheduling means 70 will be described with reference to the flowchart of FIG.
【0055】システムの空きメモリが少なくなり、メモ
リスケジューリング手段70が起動されると、まず物理
メモリを解放するプロセスを選択する(ステップ80
1)。前回メモリスケジューリング手段70が起動され
たとき、最後に選択されたプロセスロットの次のプロセ
ススロットで管理されているプロセスが選択される。た
だし、図6のステップ608においてアクセス頻度管理
手段60が処理を行ったことを示すフラグが設定されて
いないプロセスは選択されない。When the free memory of the system decreases and the memory scheduling means 70 is started, first, a process for releasing the physical memory is selected (step 80).
1). When the memory scheduling means 70 is activated last time, the process managed in the process slot next to the last selected process lot is selected. However, a process in which the flag indicating that the access frequency management means 60 has performed the process in step 608 of FIG. 6 is not selected.
【0056】メモリスケジューリング優先順位の閾値を
決定する(ステップ802)。ここでは、アクセス頻度
管理手段60で求めた優先順位の平均値を元にして、動
作時のメモリ負荷状態を考慮した値が求められる。ここ
では、例えば、メモリ負荷状況を負荷が低い順に「M
1」、「M2」、「M3」の三段階で表現し、メモリ負
荷状況が「M1」の場合はそれほどメモリ負荷が高くな
いので閾値を優先順位の平均値の1/2、「M2」の場
合は優先順位の平均値、「M3」の場合はメモリ負荷状
況が非常に高いので優先順位の平均値の2倍に設定す
る。The threshold value of the memory scheduling priority is determined (step 802). Here, based on the average value of the priorities determined by the access frequency management means 60, a value is determined in consideration of the memory load state during operation. Here, for example, the memory load status is set to "M
1 ”,“ M2 ”, and“ M3 ”. When the memory load status is“ M1 ”, the memory load is not so high, so the threshold is set to 1 / of the average value of the priority order and“ M2 ”. In this case, the average value of the priorities is set. In the case of "M3", the memory load condition is extremely high, so that the average value of the priorities is set to twice.
【0057】次に、選択されたプロセスの仮想アドレス
空間の先頭の仮想ページを選択し(ステップ803)、
仮想ページに物理メモリが割り当てられているかどうか
チェックする(ステップ804)。Next, the first virtual page in the virtual address space of the selected process is selected (Step 803).
It is checked whether a physical memory is allocated to the virtual page (step 804).
【0058】物理メモリが割り当てられていなければ、
次の仮想ページを選択し(ステップ805)、ステップ
804の処理を行う。If no physical memory has been allocated,
The next virtual page is selected (step 805), and the process of step 804 is performed.
【0059】物理メモリが割り当てられていれば、その
仮想ページに対応するアクセス頻度管理領域に設定され
ている優先順位とステップ802で求めた閾値とを比較
する(ステップ806)。If a physical memory has been allocated, the priority set in the access frequency management area corresponding to the virtual page is compared with the threshold determined in step 802 (step 806).
【0060】ステップ806で優先順位の値が閾値以上
の場合、その仮想ページに対応する物理メモリは解放せ
ず、次の仮想ページを選択して(ステップ805)ステ
ップ804を実行する。If the priority value is equal to or larger than the threshold value in step 806, the physical memory corresponding to the virtual page is not released, and the next virtual page is selected (step 805), and step 804 is executed.
【0061】優先順位の値が閾値より小さい場合、その
仮想ページと物理メモリとの対応を解放する(ステップ
807)。If the value of the priority is smaller than the threshold, the correspondence between the virtual page and the physical memory is released (step 807).
【0062】次で、対応していた物理メモリを他のプロ
セスが参照しているかどうかをチェックし(ステップ8
08)、参照されていなければ物理メモリを解放する
(ステップ809)。Next, it is checked whether another process refers to the corresponding physical memory (step 8).
08) If not referenced, the physical memory is released (step 809).
【0063】プロセスの全仮想ページに対して処理を行
ったかどうかをチェックし(ステップ810)、まだ処
理を行っていない仮想ページが存在すれば次の仮想ペー
ジについて同様の処理を行う(ステップ805)。全仮
想ページに対する処理が終わっていた場合、いくつかの
物理メモリを解放したことが期待されるので、空きメモ
リが回復したかどうかをチェックする(ステップ81
1)。It is checked whether or not processing has been performed on all virtual pages of the process (step 810). If there is a virtual page that has not been processed yet, the same processing is performed on the next virtual page (step 805). . If the processing for all virtual pages has been completed, it is expected that some physical memory has been released, so it is checked whether or not free memory has been recovered (step 81).
1).
【0064】もし、システムのメモリ負荷が低くなって
いれば、メモリスケジューリング手段70の処理を終了
する。また、予め設定されたプロセス数について処理を
終えた場合においても(ステップ812)、メモリスケ
ジューリング手段70の処理を終了する。If the memory load of the system is low, the processing of the memory scheduling means 70 ends. Also, when the processing is completed for the preset number of processes (step 812), the processing of the memory scheduling means 70 is terminated.
【0065】システムの空きメモリ量が回復せず、かつ
設定されたプロセス数分の処理を終えていなければ、次
に処理を行うプロセスを選択する(ステップ813)。
具体的には、最後に処理を行ったプロセスを管理してい
たプロセススロットの次のスロットで管理されているプ
ロセスが選択される。また、プロセススロットの最後の
スロットで管理されているプロセスが選択されていた場
合、プロセススロットの先頭スロットで管理されている
プロセスが選択される。ただし、ステップ801と同様
に、一度もアクセス頻度管理手段の処理が行われていな
いプロセスは選択されない。If the amount of free memory in the system has not recovered and the processing for the set number of processes has not been completed, the next process to be processed is selected (step 813).
Specifically, the process managed in the slot next to the process slot that managed the process that performed the process last is selected. If the process managed in the last slot of the process slot has been selected, the process managed in the first slot of the process slot is selected. However, as in step 801, a process that has never been processed by the access frequency management means is not selected.
【0066】ある特定のファイルの内容を必ずメモリの
中に常駐させることは、以下の方法によって実現され
る。ある特定のファイルの内容を必ずメモリの中に常駐
させるためのステップを追加したフローチャートを図9
及び図10に示す。図9及び図10において、図7及び
図8と共通するステップには同じステップ番号を付して
いる。≠すなわち、図9のステップ901において、フ
ァイルに設定された優先順位がある特定の値であるかど
うかを判断し、特別の値あった場合、セグメントの用
途、アクセス頻度から求めた優先順位の値を無視し、特
別な値、例えば値「−1」を優先順位としてアクセス頻
度管理領域に設定する(ステップ902)。特別の値で
ない場合には、前述したステップ707による優先順位
を設定する。Making the contents of a specific file always resident in the memory is realized by the following method. FIG. 9 is a flowchart in which a step for making the contents of a specific file always reside in the memory is added.
And FIG. 9 and 10, steps common to those in FIGS. 7 and 8 are denoted by the same step numbers. That is, in step 901 of FIG. 9, it is determined whether or not the priority set in the file is a specific value. If there is a special value, the value of the priority determined from the use of the segment and the access frequency Is ignored, and a special value, for example, the value “−1” is set as a priority in the access frequency management area (step 902). If the value is not a special value, the priority in step 707 described above is set.
【0067】そして、図10のステップ1001におい
て、優先順位が閾値より小さいかどうかに加えて優先順
位の値が「−1」であるかどうかを併せて判断し、優先
順位が「−1」であれば、ステップ805で物理メモリ
を解放せずに次のページの処理を行なうようにする。こ
うすることによって、ある特定のファイルの内容を必ず
メモリの中に常駐させることが可能となる。Then, in step 1001 of FIG. 10, it is determined in addition to whether the priority is smaller than the threshold and whether the value of the priority is "-1". If there is, in step 805, the processing of the next page is performed without releasing the physical memory. By doing so, the contents of a specific file can always be made to reside in the memory.
【0068】また、図7におけるステップ702におい
てアクセス回数を元にした優先順位を算出する際、仮想
ページへのアクセス回数のヒストグラムをプロセスごと
に作成し、その内容をアプリケーションに渡す手段を設
けることにより、プロセスの仮想アドレス空間の使用状
況をアプリケーション作成者が把握することが可能とな
る。When calculating a priority order based on the number of accesses in step 702 in FIG. 7, a histogram of the number of accesses to the virtual page is created for each process, and means for transferring the contents to the application is provided. Thus, the application creator can grasp the usage status of the virtual address space of the process.
【0069】上述したメモリスケジューリング方法は、
ハードウェア的に実現することは勿論として、コンピュ
ータシステムの磁気ディスク、半導体メモリその他の記
録媒体に記録された、上述した各機能を実現するための
メモリスケジューリングプログラムによってソフトウェ
ア的に実現することも可能である。このメモリスケジュ
ーリングプログラムは、記録媒体からコンピュータシス
テムのデータ処理部(CPU)に読み込まれ、データ処
理部の動作を制御することにより、上述した各手段の機
能を実現してメモリスケジューリング処理を実行する。
すなわち、図7〜図8に示す処理を実行する。The memory scheduling method described above
As well as being realized in hardware, it can also be realized in software by a memory scheduling program for realizing each of the functions described above, which is recorded on a magnetic disk, a semiconductor memory, or another recording medium of a computer system. is there. The memory scheduling program is read from the recording medium into the data processing unit (CPU) of the computer system, and controls the operation of the data processing unit to realize the functions of the above-described units and execute the memory scheduling process.
That is, the processing shown in FIGS.
【0070】なお、本発明は上述した実施の形態に限定
されるものでなく、その技術思想の範囲内において様々
に変形して実施することが出来る。It should be noted that the present invention is not limited to the above-described embodiment, but can be implemented with various modifications within the scope of the technical idea.
【0071】[0071]
【発明の効果】以上説明したように本発明のメモリスケ
ジューリング によれば、第1に、アクセス頻度によ
る優先度、ファイル毎の優先度、セグメントの用途別の
優先順位を考慮に入れたページングにより、システム性
能を劣化させないより詳細でかつ効率的なメモリスケジ
ューリングが可能となる。As described above, according to the memory scheduling of the present invention, firstly, paging is performed by taking into account the priority based on the access frequency, the priority for each file, and the priority for each use of the segment. More detailed and efficient memory scheduling without deteriorating system performance is enabled.
【0072】第2に、ファイル毎にメモリスケジューリ
ングのための優先順位を設定できるため、アプリケーシ
ョンで使用するファイル毎に適切なメモリスケジューリ
ングを設定できるようになる。Second, since the priority for memory scheduling can be set for each file, it becomes possible to set appropriate memory scheduling for each file used in the application.
【0073】第3に、ファイルの管理用の領域にメモリ
スケジューリングのための優先順位を設定でき、システ
ムの設計段階でファイルへのアクセス頻度を検討し、ア
プリケーションが動作する前にファイルに対して優先順
位を設定することにより、そのファイルを使用するアプ
リケーションに対して予め設定したメモリスケジューリ
ングを適用することが可能であるため、アプリケーショ
ンの改造なしに詳細なメモリスケジューリング方針を設
定することが可能となる。Third, priorities for memory scheduling can be set in a file management area, the frequency of file access is examined at the system design stage, and priorities are given to the files before the application operates. By setting the order, it is possible to apply a preset memory scheduling to an application using the file, so that it is possible to set a detailed memory scheduling policy without modifying the application.
【0074】第4に、ユーザプロセスが使用しているメ
モリページへのアクセス頻度の履歴を保持するため、ユ
ーザプロセスのワ―キングセットをより正確に求めるこ
とが可能となる。Fourth, since the history of the frequency of access to the memory pages used by the user process is retained, the working set of the user process can be obtained more accurately.
【図1】 本発明の実施の形態によるメモリスケジュー
リングシステムの構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of a memory scheduling system according to an embodiment of the present invention.
【図2】 本発明の実施の形態における仮想アドレス空
間の用途を説明する図である。FIG. 2 is a diagram illustrating a use of a virtual address space in the embodiment of the present invention.
【図3】 本発明の実施の形態におけるプロセスとその
プロセスが使用しているファイルとの対応を示す図であ
る。FIG. 3 is a diagram showing a correspondence between a process and a file used by the process in the embodiment of the present invention.
【図4】 本発明の実施の形態におけるアクセス頻度管
理領域と仮想アドレス空間の対応を示すブロック図であ
る。FIG. 4 is a block diagram showing a correspondence between an access frequency management area and a virtual address space according to the embodiment of the present invention.
【図5】 本発明の実施の形態におけるアクセス頻度管
理手段とプロセスとメモリスケジューリング手段の関係
を示すブロック図である。FIG. 5 is a block diagram showing a relationship between an access frequency management unit, a process, and a memory scheduling unit according to the embodiment of the present invention.
【図6】 本発明の実施の形態におけるアクセス頻度管
理手段の動作を示すフローチャートである。FIG. 6 is a flowchart illustrating an operation of an access frequency management unit according to the embodiment of the present invention.
【図7】 本発明の実施の形態におけるアクセス頻度管
理領域における優先順位の決定を示すフローチャートで
ある。FIG. 7 is a flowchart illustrating a determination of a priority order in an access frequency management area according to the embodiment of the present invention.
【図8】 本発明の実施の形態におけるメモリスケジュ
ーリング手段の動作を示すフローチャートである。FIG. 8 is a flowchart showing the operation of the memory scheduling means in the embodiment of the present invention.
【図9】 本発明の実施の形態におけるアクセス頻度管
理領域における優先順位の他の決定方法を示すフローチ
ャートである。FIG. 9 is a flowchart illustrating another method of determining a priority in an access frequency management area according to the embodiment of the present invention.
【図10】 本発明の実施の形態におけるメモリスケジ
ューリング手段の動作を示すフローチャートである。FIG. 10 is a flowchart showing the operation of the memory scheduling means in the embodiment of the present invention.
10、20、30、40、50 プロセス 11 仮想アドレス空間 11a〜11c セグメント 12 アクセス頻度管理領域 13 仮想アドレス管理領域 13a〜13c 管理領域 14 外部記憶装置 14a〜14c ファイル 60 アクセス頻度管理手段 70 メモリスケジューリング手段 10, 20, 30, 40, 50 process 11 virtual address space 11a to 11c segment 12 access frequency management area 13 virtual address management area 13a to 13c management area 14 external storage device 14a to 14c file 60 access frequency management means 70 memory scheduling means
Claims (16)
テムにおけるメモリスケジューリング方法において、 仮想アドレス空間の仮想ページに対して優先順位を設定
するアクセス頻度管理ステップと、前記優先順位に基づ
いて物理メモリの解放処理を制御するメモリスケジュー
リングステップとからなり、 前記アクセス頻度管理ステップは、 コンピュータシステム内の全プロセスの仮想アドレス空
間について、物理メモリに対応付けられた前記仮想ペー
ジのアクセス頻度と、前記仮想ページのデータの用途及
び前記仮想ページに対応するファイル毎に予め設定され
た優先順位に基づいてリスケジューリング優先順位を設
定し、 前記メモリスケジューリングステップは、 前記プロセスの前記仮想アドレス空間の前記仮想ページ
毎に、前記メモリスケジューリング優先順位とメモリの
負荷状態に基づいて、前記物理メモリの解放処理を実行
することを特徴とするコンピュータシステムにおけるメ
モリスケジューリング方法。1. A memory scheduling method in a computer system using a virtual storage mechanism, comprising: an access frequency management step of setting a priority for a virtual page in a virtual address space; and a physical memory release processing based on the priority. And a memory scheduling step of controlling the access frequency.The access frequency management step includes: for a virtual address space of all processes in a computer system, an access frequency of the virtual page associated with a physical memory; A rescheduling priority is set based on a priority set in advance for each file corresponding to a use and the virtual page. The memory scheduling step includes the step of setting the memo for each virtual page in the virtual address space of the process. Based on the load state of the scheduling priority and a memory, the memory scheduling method in a computer system and executes the release processing of the physical memory.
重みを設定し、前記アクセス頻度と重みの積と前記デー
タの用途の優先順位と重みの積と前記ファイルの優先順
位と重みの積との総和を前記仮想ページに対する前記リ
スケジューリング優先順位とすることを特徴とする請求
項1に記載のコンピュータシステムにおけるメモリスケ
ジューリング方法。2. The access frequency management step, wherein the access frequency, the use of the data, and the file are weighted, and the product of the access frequency and the weight, the priority of the use of the data, the product of the weight, and 2. The memory scheduling method according to claim 1, wherein a sum of a product of a file priority and a weight is used as the rescheduling priority for the virtual page.
に値の異なる重みを設定し、前記アクセス頻度と対応す
る重みの積の総和と、前記データの用途の優先順位と重
みの積と前記ファイルの優先順位と重みの積との総和を
前記仮想ページに対する前記メモリスケジューリング優
先順位とすることを特徴とする請求項2に記載のコンピ
ュータシステムにおけるメモリスケジューリング方法。3. The access frequency management step sets weights having different values for each of the plurality of access frequencies in the past multiple times in a certain period, and calculates a sum of a product of the access frequency and the corresponding weight, and a use of the data. 3. The memory scheduling method in a computer system according to claim 2, wherein the sum of the product of the priority and the weight of the file and the product of the priority and the weight of the file is used as the memory scheduling priority for the virtual page.
は、 前記全てのプロセスの前記全ての仮想ページの前記メモ
リスケジューリング優先順位の平均値とメモリ付加状態
に基づいて閾値を設定し、 前記仮想ページの前記メモリスケジューリング優先順位
の値が前記閾値より小さい場合に、前記物理メモリの解
放処理を行なうことを特徴とする請求項1乃至請求項3
に記載のコンピュータシステムにおけるメモリスケジュ
ーリング方法。4. The memory scheduling step sets a threshold value based on an average value of the memory scheduling priorities of all the virtual pages of all the processes and a memory addition state, and sets the memory scheduling priority of the virtual pages. 4. A process for releasing the physical memory when the value of the order is smaller than the threshold value.
13. A memory scheduling method in the computer system according to item 5.
スの前記全ての仮想ページの前記メモリスケジューリン
グ優先順位の平均値を上まわる値を、負荷状態が低い場
合に前記平均値を下まわる値を、前記閾値として設定す
ることを特徴とする請求項4に記載のコンピュータシス
テムにおけるメモリスケジューリング方法。5. The memory scheduling step, wherein when the load state of the memory is high, a value exceeding an average value of the memory scheduling priorities of the virtual pages of all the processes is determined. 5. The method according to claim 4, wherein a value less than the average value is set as the threshold value.
先順位の全プロセス及び全仮想ページにおける平均値を
求めることを特徴とする請求項4又は請求項5に記載の
コンピュータシステムにおけるメモリスケジューリング
方法。6. The computer system according to claim 4, wherein in the access frequency management step, an average value of the memory scheduling priorities for the virtual pages in all processes and all virtual pages is obtained. Memory scheduling method.
は、 前記仮想ページの前記メモリスケジューリング優先順位
の値が前記閾値より小さい場合であって、前記物理メモ
リが未使用の場合に、前記物理メモリの解放処理を行な
うことを特徴とする請求項4乃至請求項6に記載のコン
ピュータシステムにおけるメモリスケジューリング方
法。7. The memory scheduling step, wherein when the value of the memory scheduling priority of the virtual page is smaller than the threshold, and when the physical memory is not used, the physical memory is released. 7. The memory scheduling method in a computer system according to claim 4, wherein:
を判断し、特別の値あった場合、データの用途、アクセ
ス頻度から求めた優先順位にかかわらず、特別な値を前
記メモリスケジューリング優先順位として設定し、 前記メモリスケジューリングステップは、 前記メモリスケジューリング優先順位の値が、前記閾値
より小さい場合でも前記特別の値であれば前記物理メモ
リを解放処理を行なわないことを特徴とする請求項4乃
至請求項7に記載のコンピュータシステムにおけるメモ
リスケジューリング方法。8. The access frequency management step determines whether or not the priority of the file is a specific value. If there is a special value, the priority is determined regardless of the use of the data and the priority determined from the access frequency. Instead, a special value is set as the memory scheduling priority, and the memory scheduling step includes the step of releasing the physical memory if the value of the memory scheduling priority is the special value even when the value is smaller than the threshold value. 8. The memory scheduling method in a computer system according to claim 4, wherein the memory scheduling is not performed.
テムにおけるメモリスケジューリングプログラムを格納
する記憶媒体であって、 前記メモリスケジューリングプログラムは、 仮想アドレス空間の仮想ページに対して優先順位を設定
するアクセス頻度管理ステップと、前記優先順位に基づ
いて物理メモリの解放処理を制御するメモリスケジュー
リングステップとからなり、 前記アクセス頻度管理ステップは、 コンピュータシステム内の全プロセスの仮想アドレス空
間について、物理メモリに対応付けられた前記仮想ペー
ジのアクセス頻度と、前記仮想ページのデータの用途及
び前記仮想ページに対応するファイル毎に予め設定され
た優先順位に基づいてリスケジューリング優先順位を設
定し、 前記メモリスケジューリングステップは、 前記プロセスの前記仮想アドレス空間の前記仮想ページ
毎に、前記メモリスケジューリング優先順位とメモリの
負荷状態に基づいて、前記物理メモリの解放処理を実行
することを特徴とするメモリスケジューリングプログラ
ムを格納する記憶媒体。9. A storage medium for storing a memory scheduling program in a computer system using a virtual storage mechanism, the memory scheduling program comprising: an access frequency management step of setting a priority order for a virtual page in a virtual address space. And a memory scheduling step of controlling physical memory release processing based on the priority order. The access frequency management step is a virtual address space of all processes in the computer system, which is associated with the physical memory. The access frequency of the virtual page, the rescheduling priority is set based on the use of the data of the virtual page and the priority set in advance for each file corresponding to the virtual page, the memory scheduling step, A storage medium for storing a memory scheduling program for executing a physical memory release process based on the memory scheduling priority and a memory load state for each virtual page in the virtual address space of the process. .
重みを設定し、前記アクセス頻度と重みの積と前記デー
タの用途の優先順位と重みの積と前記ファイルの優先順
位と重みの積との総和を前記仮想ページに対する前記リ
スケジューリング優先順位とすることを特徴とする請求
項9に記載のメモリスケジューリングプログラムを格納
する記憶媒体。10. The access frequency management step, wherein the access frequency, the use of the data, and the file are weighted, and the product of the access frequency and the weight, the priority of the use of the data, the product of the weight, and The storage medium according to claim 9, wherein a sum of a product of a file priority and a weight is set as the rescheduling priority for the virtual page.
に値の異なる重みを設定し、前記アクセス頻度と対応す
る重みの積の総和と、前記データの用途の優先順位と重
みの積と前記ファイルの優先順位と重みの積との総和を
前記仮想ページに対する前記メモリスケジューリング優
先順位とすることを特徴とする請求項10に記載のメモ
リスケジューリングプログラムを格納する記憶媒体。11. The access frequency management step sets different weights for each of the plurality of access frequencies for a plurality of times in the past during a certain period, and calculates a total sum of a product of the access frequency and the corresponding weight, and an application of the data. 11. The storage for storing the memory scheduling program according to claim 10, wherein the sum of the product of the priority and the weight of the file and the product of the priority and the weight of the file is used as the memory scheduling priority for the virtual page. Medium.
は、 前記全てのプロセスの前記全ての仮想ページの前記メモ
リスケジューリング優先順位の平均値とメモリ付加状態
に基づいて閾値を設定し、 前記仮想ページの前記メモリスケジューリング優先順位
の値が前記閾値より小さい場合に、前記物理メモリの解
放処理を行なうことを特徴とする請求項9乃至請求項1
1に記載のメモリスケジューリングプログラムを格納す
る記憶媒体。12. The memory scheduling step, wherein a threshold value is set based on an average value of the memory scheduling priorities of all the virtual pages of all the processes and a memory addition state, and the memory scheduling priority of the virtual pages is set. 2. The method according to claim 1, wherein when the rank value is smaller than the threshold value, the physical memory is released.
A storage medium for storing the memory scheduling program according to claim 1.
スの前記全ての仮想ページの前記メモリスケジューリン
グ優先順位の平均値を上まわる値を、負荷状態が低い場
合に前記平均値を下まわる値を、前記閾値として設定す
ることを特徴とする請求項12に記載のメモリスケジュ
ーリングプログラムを格納する記憶媒体。13. The memory scheduling step, wherein, when the load state of the memory is high, a value exceeding an average value of the memory scheduling priorities of the virtual pages of all the processes is determined. 13. The storage medium storing the memory scheduling program according to claim 12, wherein a value less than the average value is set as the threshold value.
先順位の全プロセス及び全仮想ページにおける平均値を
求めることを特徴とする請求項12又は請求項13に記
載のメモリスケジューリングプログラムを格納する記憶
媒体。14. The memory scheduling according to claim 12, wherein, in the access frequency management step, an average value of the memory scheduling priorities for the virtual pages in all processes and all virtual pages is obtained. Storage medium for storing programs.
は、 前記仮想ページの前記メモリスケジューリング優先順位
の値が前記閾値より小さい場合であって、前記物理メモ
リが未使用の場合に、前記物理メモリの解放処理を行な
うことを特徴とする請求項12乃至請求項14に記載の
メモリスケジューリングプログラムを格納する記憶媒
体。15. The memory scheduling step, wherein when the value of the memory scheduling priority of the virtual page is smaller than the threshold, and when the physical memory is not used, a release process of the physical memory is performed. A storage medium for storing the memory scheduling program according to claim 12.
を判断し、特別の値あった場合、データの用途、アクセ
ス頻度から求めた優先順位にかかわらず、特別な値を前
記メモリスケジューリング優先順位として設定し、 前記メモリスケジューリングステップは、 前記メモリスケジューリング優先順位の値が、前記閾値
より小さい場合でも前記特別の値であれば前記物理メモ
リを解放処理を行なわないことを特徴とする請求項12
乃至請求項15に記載のメモリスケジューリングプログ
ラムを格納する記憶媒体。16. The access frequency management step determines whether or not the priority of the file is a specific value, and if there is a special value, the priority is determined regardless of the use of the data and the priority determined from the access frequency. Instead, a special value is set as the memory scheduling priority, and the memory scheduling step includes the step of releasing the physical memory if the value of the memory scheduling priority is the special value even when the value is smaller than the threshold value. 13. The method according to claim 12, wherein the step is not performed.
A storage medium storing the memory scheduling program according to claim 15.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP33196098A JP3175764B2 (en) | 1998-11-06 | 1998-11-06 | Memory scheduling method and storage medium for storing memory scheduling program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP33196098A JP3175764B2 (en) | 1998-11-06 | 1998-11-06 | Memory scheduling method and storage medium for storing memory scheduling program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2000148515A true JP2000148515A (en) | 2000-05-30 |
JP3175764B2 JP3175764B2 (en) | 2001-06-11 |
Family
ID=18249577
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP33196098A Expired - Fee Related JP3175764B2 (en) | 1998-11-06 | 1998-11-06 | Memory scheduling method and storage medium for storing memory scheduling program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3175764B2 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004133934A (en) * | 2002-10-04 | 2004-04-30 | Microsoft Corp | Method and mechanism for proactive memory control |
US6738865B1 (en) * | 2000-06-09 | 2004-05-18 | International Business Machines Corporation | Method, system, and program for demoting data from cache based on least recently accessed and least frequently accessed data |
JP2004362459A (en) * | 2003-06-06 | 2004-12-24 | Nec Corp | Network information recording device |
CN1296833C (en) * | 2002-11-05 | 2007-01-24 | 松下电器产业株式会社 | Device and method for storage management |
US8909861B2 (en) | 2004-10-21 | 2014-12-09 | Microsoft Corporation | Using external memory devices to improve system performance |
US8914557B2 (en) | 2005-12-16 | 2014-12-16 | Microsoft Corporation | Optimizing write and wear performance for a memory |
US9032151B2 (en) | 2008-09-15 | 2015-05-12 | Microsoft Technology Licensing, Llc | Method and system for ensuring reliability of cache data and metadata subsequent to a reboot |
US9361183B2 (en) | 2008-09-19 | 2016-06-07 | Microsoft Technology Licensing, Llc | Aggregation of write traffic to a data store |
CN118567869A (en) * | 2024-08-01 | 2024-08-30 | 芯方舟(上海)集成电路有限公司 | Memory access method and device |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7496722B2 (en) * | 2005-04-26 | 2009-02-24 | Hewlett-Packard Development Company, L.P. | Memory mapped page priorities |
-
1998
- 1998-11-06 JP JP33196098A patent/JP3175764B2/en not_active Expired - Fee Related
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6738865B1 (en) * | 2000-06-09 | 2004-05-18 | International Business Machines Corporation | Method, system, and program for demoting data from cache based on least recently accessed and least frequently accessed data |
JP2004133934A (en) * | 2002-10-04 | 2004-04-30 | Microsoft Corp | Method and mechanism for proactive memory control |
CN1296833C (en) * | 2002-11-05 | 2007-01-24 | 松下电器产业株式会社 | Device and method for storage management |
JP2004362459A (en) * | 2003-06-06 | 2004-12-24 | Nec Corp | Network information recording device |
US8909861B2 (en) | 2004-10-21 | 2014-12-09 | Microsoft Corporation | Using external memory devices to improve system performance |
US9317209B2 (en) | 2004-10-21 | 2016-04-19 | Microsoft Technology Licensing, Llc | Using external memory devices to improve system performance |
US9690496B2 (en) | 2004-10-21 | 2017-06-27 | Microsoft Technology Licensing, Llc | Using external memory devices to improve system performance |
US9529716B2 (en) | 2005-12-16 | 2016-12-27 | Microsoft Technology Licensing, Llc | Optimizing write and wear performance for a memory |
US8914557B2 (en) | 2005-12-16 | 2014-12-16 | Microsoft Corporation | Optimizing write and wear performance for a memory |
US11334484B2 (en) | 2005-12-16 | 2022-05-17 | Microsoft Technology Licensing, Llc | Optimizing write and wear performance for a memory |
US10387313B2 (en) | 2008-09-15 | 2019-08-20 | Microsoft Technology Licensing, Llc | Method and system for ensuring reliability of cache data and metadata subsequent to a reboot |
US9032151B2 (en) | 2008-09-15 | 2015-05-12 | Microsoft Technology Licensing, Llc | Method and system for ensuring reliability of cache data and metadata subsequent to a reboot |
US9448890B2 (en) | 2008-09-19 | 2016-09-20 | Microsoft Technology Licensing, Llc | Aggregation of write traffic to a data store |
US9361183B2 (en) | 2008-09-19 | 2016-06-07 | Microsoft Technology Licensing, Llc | Aggregation of write traffic to a data store |
US10509730B2 (en) | 2008-09-19 | 2019-12-17 | Microsoft Technology Licensing, Llc | Aggregation of write traffic to a data store |
CN118567869A (en) * | 2024-08-01 | 2024-08-30 | 芯方舟(上海)集成电路有限公司 | Memory access method and device |
Also Published As
Publication number | Publication date |
---|---|
JP3175764B2 (en) | 2001-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5425286B2 (en) | How to track memory usage in a data processing system | |
US9058212B2 (en) | Combining memory pages having identical content | |
US6581142B1 (en) | Computer program product and method for partial paging and eviction of microprocessor instructions in an embedded computer | |
JP6885193B2 (en) | Parallel processing device, job management method, and job management program | |
CN112346829A (en) | Method and equipment for task scheduling | |
US8145930B2 (en) | Storage system and management information acquisition method for power saving | |
US7882285B2 (en) | Buffer cache management to prevent deadlocks | |
US8065466B2 (en) | Library apparatus, library system and method for copying logical volume to disk volume in cache disk with smallest access load | |
JPH10254756A (en) | Use of three-state reference for managing referred object | |
EP3659036B1 (en) | Dynamic trim processing with disk caching | |
JP7500991B2 (en) | Storage control device and storage control program | |
JP3175764B2 (en) | Memory scheduling method and storage medium for storing memory scheduling program | |
JPH04213129A (en) | Memory control system and memory control method | |
CN117312051A (en) | File backup method, device, equipment and storage medium | |
CN108932112B (en) | Data read-write method, device, equipment and medium for solid particles | |
JP5158576B2 (en) | Input/Output Control System, Input/Output Control Method, and Input/Output Control Program | |
CN118642822A (en) | Task scheduling method, device, equipment, storage medium and program product | |
JP4308152B2 (en) | Method, system, and product for reserving memory | |
US20060242182A1 (en) | System and method for stranded file opens during disk compression utility requests | |
JPH06124239A (en) | Resident data controller for cache memory | |
KR20230034535A (en) | Operation method of Flash memory storage device | |
JP4997063B2 (en) | Computer startup method and computer system | |
US7024499B2 (en) | Cache only queue option for cache controller | |
JP7640423B2 (en) | Storage device and cache control method | |
JPH06266619A (en) | Page saving/restoring device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |