JPH07152652A - Virtual storage control method and information processor - Google Patents

Virtual storage control method and information processor

Info

Publication number
JPH07152652A
JPH07152652A JP5297800A JP29780093A JPH07152652A JP H07152652 A JPH07152652 A JP H07152652A JP 5297800 A JP5297800 A JP 5297800A JP 29780093 A JP29780093 A JP 29780093A JP H07152652 A JPH07152652 A JP H07152652A
Authority
JP
Japan
Prior art keywords
page
replacement
pages
priority
virtual memory
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.)
Withdrawn
Application number
JP5297800A
Other languages
Japanese (ja)
Inventor
Yoshiaki Sudo
義明 数藤
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP5297800A priority Critical patent/JPH07152652A/en
Publication of JPH07152652A publication Critical patent/JPH07152652A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve the throughput by determining an object page to be substituted for in a page substituting process of virtual storage in consideration of its process quantity and access frequency. CONSTITUTION:Respective pages (pages 0-n) used for the virtual storage are connected to a link queue. When the priority levels of pages that clear pointers 221-224 indicate are equal to priority levels set in the clear pointers, the reference bits of the pages are turned OFF. When the reference bit of a page specified with a substitution pointer is OFF at the time of the execution of page substitution, the page becomes an object of substitution. If the page whose reference bit is OFF is used before the substitution painter 220 reaches the page, the reference bit is turned ON, so the page is not substituted for. Clear points which are higher in priority is placed more close to the substitution painter, so the time required by the substitution pointer to reach a target page becomes short and the probability that the page becomes an object of substitution becomes high.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、仮想記憶制御をページ
単位で行う仮想記憶制御方法及び情報処理装置に関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a virtual memory control method and an information processing apparatus for performing virtual memory control in page units.

【0002】[0002]

【従来の技術】情報処理装置のオペレーティング・シス
テムでは、磁気ディスク等の2次記憶装置に格納されて
いるデータをRAM上へ読み出しておき、データの処理
時においてCPUはRAM上のデータへアクセスすると
いう仮想記憶が用いられる。。この様にして、データ処
理時には高速にアクセスできるRAMへアクセスするよ
うにし、アクセススピードの遅い2次記憶装置へのアク
セス回数を減らして処理速度を向上する。
2. Description of the Related Art In an operating system of an information processing apparatus, data stored in a secondary storage device such as a magnetic disk is read into a RAM, and the CPU accesses the data in the RAM when processing the data. Virtual memory is used. . In this way, the RAM that can be accessed at high speed is accessed during data processing, and the number of accesses to the secondary storage device having a slow access speed is reduced to improve the processing speed.

【0003】一般に、仮想記憶を用いた情報処理装置の
オペレーティング・システムは、主記憶上に仮想記憶の
ための領域を設け、ページという単位で管理している。
アプリケーションプログラム等による処理の実行におい
て、主記憶よりも多くのページが要求される場合は、現
在主記憶上に存在するページを2次記憶装置に退避し
て、そのプログラムが使用できるようにページを割り当
てる。この処理をページ置換と称する。退避したページ
が再び必要になった場合には、2次記憶装置から再度ロ
ーディングして、ページ置換を行い、使用する。
Generally, an operating system of an information processing apparatus using virtual memory provides an area for virtual memory on the main memory and manages it in units of pages.
When more pages than the main memory are requested to execute the processing by the application program, the pages currently on the main memory are saved to the secondary storage device, and the pages are made available for the program to use. assign. This process is called page replacement. When the saved page is needed again, it is reloaded from the secondary storage device, page replacement is performed, and the page is used.

【0004】主記憶中のページの中から、どのページを
ページ置換の対象とするかを決定する方法をページ置換
方式と呼ぶ。従来の情報処理装置のオペレーティング・
システムにおけるページ置換方式としてLRUアルゴリ
ズムを用いる手法がある。
A method of deciding which of the pages in the main memory is to be the target of page replacement is called the page replacement method. Conventional information processing device operating system
As a page replacement method in the system, there is a method using the LRU algorithm.

【0005】この手法では、ページ置換の対象となるペ
ージを、そのページの過去の使用履歴情報のみに基づい
て選択している。つまり、現在のオペレーティング・シ
ステムでは、ページ置換の対象となるページはLRU
(Least Recently Used )アルゴリズムと呼ばれる方式
の近似方式に従って選択される。このLRUアルゴリズ
ムは最近参照されたページは主記憶に残し、最も長く参
照されいないページを優先してページ置換の対象とする
ものであり、アプリケーションプログラムが時間的な局
所性を持つことを利用したものである。
In this method, a page to be replaced is selected based only on past usage history information of the page. That is, in the current operating system, the page subject to page replacement is LRU.
(Least Recently Used) Algorithm is selected according to an approximation method. This LRU algorithm leaves recently referenced pages in main memory and gives priority to the page that has not been referenced for the longest time, and uses the fact that application programs have temporal locality. Is.

【0006】[0006]

【発明が解決しようとする課題】しかし、上述のような
手法では、ページ置換の対象となった際に2次記憶装置
に退避する処理に要する時間や、ページ置換により主記
憶から失われたページを再利用する際の再ローディング
処理(2次記憶装置やネットワークで接続された情報処
理装置から主記憶への転送処理)にかかる時間が考慮さ
れていない。このように、ページ置換の処理の実行にお
ける処理内容が全てのページで平等であるとの仮定を基
にして提案された従来のページ置換方式では以下のよう
な問題がある。
However, according to the above-mentioned method, the time required for the process of saving the data in the secondary storage device when it is the target of page replacement and the pages lost from the main memory due to the page replacement. The time required for the reloading process (the transfer process from the secondary storage device or the information processing device connected via the network to the main storage) when reusing is not taken into consideration. As described above, the conventional page replacement method proposed based on the assumption that the processing contents in executing the page replacement processing are equal in all pages has the following problems.

【0007】例えば、主記憶上で書き換えられて2次記
憶装置に退避しなくてはならないページをページ置換し
てしまった場合は、主記憶上で書き換えられておらず2
次記憶装置に退避しなくて良いページをページ置換する
場合よりも、2次記憶装置にページの退避を行う分だけ
余計な処理が必要となる。また、読み込みに時間のかか
る2次記憶装置や遅いネットワークで接続された情報処
理装置に存在するページをページ置換してしまった場合
には、速度の比較的速い2次記憶装置に存在するページ
を置換した場合よりも、再びそのページを利用しなけれ
ばならなくなった場合に再読み込みのための時間が余計
にかかっしまう。
For example, if a page that has been rewritten on the main memory and has to be saved in the secondary storage device is replaced, the page is not rewritten on the main memory.
Compared to the case of replacing a page that does not need to be saved in the next storage device, page replacement in the secondary storage device requires extra processing. Also, when a page existing in a secondary storage device that takes a long time to read or an information processing device connected via a slow network is replaced with a page, a page existing in a relatively fast secondary storage device is replaced. It takes more time to reload when you have to use the page again than when you replace it.

【0008】以上のような不具合への対策として、ペー
ジに書き込みが行われておらず、2次記憶装置に退避す
る必要のないページや、速度の速い2次記憶装置に存在
するページを優先的にページ置換の対象とする処理時間
に基づくページ置換方式も提案されている。
As a countermeasure against the above-mentioned problems, a page which has not been written to the page and does not need to be saved in the secondary storage device or a page existing in the fast secondary storage device is preferentially given. Also, a page replacement method based on the processing time targeted for page replacement has been proposed.

【0009】上記のような、ページ毎に優先度を与えて
ページ置換を行う方式においては、各ページに優先度を
設定し、ページ置換の対象をその優先度に応じて決定す
る。プログラム中のページに優先度を設定する場合に
は、内容が書き換えられないページ(コード領域)と内
容が書き換えられるページ(データ領域やスタック領
域)の違いや、そのページの存在元である装置における
処理スピードなどを考慮して決定する。
In the above-mentioned method of giving page priority to each page and performing page replacement, a priority is set for each page, and a page replacement target is determined according to the priority. When setting the priority to the page in the program, the difference between the page whose content cannot be rewritten (code area) and the page whose content is rewritten (data area or stack area), and the device where the page exists Decide in consideration of processing speed.

【0010】しかしながら、従来の優先度に従ったペー
ジ置換方式では次のような問題点がある。即ち、常に設
定された優先度に従ってページ置換の対象が決定される
ので、最も優先度の高いページが必ずページ置換の対象
になってしまう。従って、頻繁にアクセスされるページ
であっても優先度が高ければ頻繁にページ置換の対象と
なってしまう可能性がある。このため、そのようなペー
ジばかりページ置換と再ローディングが繰り返されるこ
とになり、情報処理装置の処理効率が低下してしまうと
いう問題点がある。さらに、同じ優先度を有する複数の
ページの中からどのページを置換対象として選択するか
という問題もある。
However, the conventional page replacement method according to the priorities has the following problems. That is, since the page replacement target is always determined according to the set priority, the page with the highest priority is always the page replacement target. Therefore, even if a page is frequently accessed, if the priority is high, the page may be frequently replaced. As a result, such page replacement and reloading are repeated, and the processing efficiency of the information processing apparatus is reduced. Further, there is a problem of which page is selected as a replacement target from a plurality of pages having the same priority.

【0011】本発明は上記の問題点に鑑みてなされたも
のであり、仮想記憶における各ページのページ置換処理
により発生する処理量とアクセス頻度に基づいてページ
置換の対象を決定することを可能とし、処理効率の向上
を実現する仮想記憶制御方法及び情報処理装置を提供す
ることを目的とする。
The present invention has been made in view of the above problems, and makes it possible to determine the target of page replacement based on the processing amount and access frequency generated by the page replacement processing of each page in virtual memory. An object of the present invention is to provide a virtual memory control method and an information processing device that realize improvement in processing efficiency.

【0012】[0012]

【課題を解決するための手段】上記の目的を達成する本
発明の情報処理装置は以下の構成を備える。即ち、仮想
記憶機能の制御を複数のページにより行う情報処理装置
であって、前記仮想記憶機能において実行されるページ
置換処理において置換対象となる優先度を、置換処理の
際に生じ得る処理時間に基づいて各ページ毎に設定する
設定手段と、前記ページ置換処理を実行する時点で、前
記仮想記憶機能の有する複数のページの1つを抽出する
抽出手段と、前記抽出手段により抽出されたページが、
前記設定手段により設定された優先度に基づく所定時間
内にアクセスされたか否かを判定する判定手段と、前記
判定手段によりアクセスされていないと判定されたとき
当該ページを置換対象としてページ置換処理を実行する
実行手段と、を備える。
An information processing apparatus of the present invention that achieves the above object has the following configuration. That is, in an information processing device that controls a virtual memory function by a plurality of pages, the priority to be replaced in the page replacement process executed in the virtual memory function is set to a processing time that can occur during the replacement process. A setting means for setting each page based on each page, an extracting means for extracting one of a plurality of pages of the virtual memory function at the time of executing the page replacing process, and a page extracted by the extracting means. ,
A determination unit that determines whether or not the page has been accessed within a predetermined time based on the priority set by the setting unit, and a page replacement process that replaces the page when it is determined that the page has not been accessed by the determination unit. And executing means for executing.

【0013】又、上記の目的を達成するための本発明の
仮想記憶制御方法は、仮想記憶機能の制御を複数のペー
ジにより行う仮想記憶制御方法であって、前記仮想記憶
機能において実行されるページ置換処理において置換対
象となる優先度を、置換処理の際に生じ得る処理時間に
基づいて各ページ毎に設定する設定工程と、前記ページ
置換処理を実行する時点で、前記仮想記憶機能の有する
複数のページの1つを抽出する抽出工程と、前記抽出工
程により抽出されたページが、前記設定工程により設定
された優先度に基づく所定時間内にアクセスされたか否
かを判定する判定工程と、前記判定工程によりアクセス
されていないと判定されたとき当該ページを置換対象と
してページ置換処理を実行する実行工程と、を備えるこ
とを特徴とする。
Further, a virtual memory control method of the present invention for achieving the above object is a virtual memory control method for controlling a virtual memory function by a plurality of pages, the page being executed in the virtual memory function. A setting step of setting the priority to be replaced in the replacement processing for each page based on the processing time that may occur in the replacement processing, and a plurality of virtual memory functions that are provided at the time of executing the page replacement processing. An extracting step of extracting one of the pages, and a determining step of determining whether the page extracted by the extracting step has been accessed within a predetermined time based on the priority set by the setting step; And an execution step of executing a page replacement process with the page as a replacement target when it is determined that the page has not been accessed in the determination step.

【0014】[0014]

【作用】上記の構成により、仮想記憶を構成する各ペー
ジの優先度が、ページ置換の対象となった際に生じる得
る処理時間に基づいて設定される。仮想記憶機能におい
てページ置換処理が必要となったとき、仮想記憶を構成
する複数のページの1つを抽出し、抽出されたページが
その時点より過去の所定の時間内にアクセスされたか否
かを判定する。この所定の時間は各ページの優先度に基
づいて設定されており、例えば優先度の高いものほど短
い時間に設定される。そして、アクセスされていなけれ
ば当該ページを置換対象としてページ置換処理を実行す
る。
With the above structure, the priority of each page forming the virtual memory is set based on the processing time that may occur when the page is replaced. When page replacement processing is required in the virtual memory function, one of a plurality of pages forming the virtual memory is extracted, and it is determined whether the extracted page has been accessed within a predetermined time period past that point. judge. This predetermined time is set based on the priority of each page. For example, the higher the priority, the shorter the time. Then, if the page has not been accessed, the page replacement process is executed with the page as a replacement target.

【0015】[0015]

【実施例】以下に添付の図面を参照して本発明の好適な
一実施例を説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will be described below with reference to the accompanying drawings.

【0016】図1は本実施例に係る情報処理装置のブロ
ック図である。同図において1はCPUであり、本装置
の制御を司どる。2は主メモリであり、ROM201と
RAM202とからなる。ROM201はCPU1で実
行される各種のプログラムやデータが格納されている。
尚、後述の各フローチャートにて説明する処理を実現す
るための制御プログラムもこのROM201に格納され
ている。RAM202は、2次記憶装置3からロードさ
れた各種情報やプログラムの格納領域、CPU1のワー
クエリアとして用いられる。尚、仮想記憶領域もこのR
AM202に設けられている。3は2次記憶装置であ
り、種々のデータやプログラムなどが格納されている。
2次記憶装置としては、当該情報処理装置が所有するロ
ーカルディスクとネットワークを介してアクセス可能な
リモートディスクの2種類(図2参照)がある。4は入
力装置としてのキーボードであり、種々のデータなどが
入力される。5は表示装置であり、CPU1で処理した
結果などが表示される。6はネットワークであり、I/
Oインタフェース(不図示)を介してCPU1と接続さ
れている。
FIG. 1 is a block diagram of an information processing apparatus according to this embodiment. In the figure, reference numeral 1 is a CPU, which controls the apparatus. A main memory 2 is composed of a ROM 201 and a RAM 202. The ROM 201 stores various programs and data executed by the CPU 1.
Note that the ROM 201 also stores a control program for realizing the processing described in each flowchart described later. The RAM 202 is used as a storage area for various information and programs loaded from the secondary storage device 3 and a work area for the CPU 1. The virtual storage area is also R
It is provided in AM202. A secondary storage device 3 stores various data and programs.
There are two types of secondary storage devices, a local disk owned by the information processing apparatus and a remote disk accessible via a network (see FIG. 2). Reference numeral 4 denotes a keyboard as an input device, which inputs various data and the like. Reference numeral 5 denotes a display device on which a result processed by the CPU 1 and the like are displayed. 6 is a network, I /
It is connected to the CPU 1 via an O interface (not shown).

【0017】図2は、本実施例における仮想記憶機能の
動作を説明するブロック図である。主記憶2内のRAM
202上にページ0〜ページnまでのn+1ページ分の
仮想記憶領域が備えられている。同図では、ページ0の
領域にはネットワーク6を介して接続されたリモートデ
ィスク32からのデータが格納され、ページ3の領域に
はローカルディスク31のデータが格納されている状態
を表している。そして、仮想記憶領域におけるこれらの
各ページは、ページ管理テーブル210により管理され
る。
FIG. 2 is a block diagram for explaining the operation of the virtual memory function in this embodiment. RAM in main memory 2
A virtual storage area of page 0 to page n for n + 1 pages is provided on 202. In the figure, the area of page 0 stores data from the remote disk 32 connected via the network 6, and the area of page 3 stores data of the local disk 31. Then, each of these pages in the virtual storage area is managed by the page management table 210.

【0018】図3はページ管理テーブル210のデータ
構成を説明する図である。同図において、ページ211
は、ページ0〜ページnの各ページを特定するための情
報である。優先度212は、ページ置換における優先度
を表す情報であり、本例では(1)〜(4)までの4段
階に分けている。尚、ページ置換の優先度については後
述する。参照ビット213は、各ページがCPU1によ
り使用されたか否かを示すビットである。参照ビットの
機能については後述の説明で明らかにする。
FIG. 3 is a diagram for explaining the data structure of the page management table 210. In the figure, page 211
Is information for specifying each page of page 0 to page n. The priority 212 is information indicating the priority in page replacement, and in this example, it is divided into four stages (1) to (4). The priority of page replacement will be described later. The reference bit 213 is a bit indicating whether each page is used by the CPU 1. The function of the reference bit will be clarified later in the description.

【0019】次に、以上の構成を備える本実施例の情報
処理装置における動作について説明する。
Next, the operation of the information processing apparatus of this embodiment having the above configuration will be described.

【0020】図4は本実施例の動作概要を示すフローチ
ャートである。ステップS21において、割り当てられ
た各ページに対してページ置換の優先度を設定する。こ
の優先度は、ページが置換対象となった時に2次記憶装
置に書き込まなければならないかどうか、そのページが
保持している内容を再利用する場合にどのくらいの処理
時間がかかるかを反映して設定される。
FIG. 4 is a flow chart showing the outline of the operation of this embodiment. In step S21, a page replacement priority is set for each assigned page. This priority reflects whether the page must be written to secondary storage when it becomes the replacement target, and how much processing time it takes to reuse the content held by the page. Is set.

【0021】図5は、優先度の設定についての一例を示
す図である。最もページ置換の対象としての優先度が高
いものはローカルディスク31上のファイルを保持する
ページで書き換えなしのものであり、これを優先度
(4)とする。次に優先度の高いものはネットワーク6
上に接続されたリモートディスク32上のファイルを保
持するページで書き換えなしのもの出あり、これを優先
度(3)とする。次に優先度が高いものはローカルディ
スク31上のファイルを保持するページで書き換え可能
なもの出あり、これを優先度(2)とする。そして、最
も優先度の低いものはネットワーク6上に接続されたリ
モートディスク32上のファイルを保持するページで書
き換えがあるものであり、これを優先度(1)とする。
そして、このようにして決定された優先度はページ管理
テーブル210の優先度212に登録される。
FIG. 5 is a diagram showing an example of priority setting. The page with the highest priority as the target of page replacement is the page that holds the file on the local disk 31 and is not rewritten, and this is referred to as priority (4). Network 6 has the next highest priority
There is a page that holds a file on the remote disk 32 connected above without rewriting, and this is set as priority (3). The next highest priority is a page that holds a file on the local disk 31 and is rewritable, and this is referred to as priority (2). The page with the lowest priority is the page that holds the file on the remote disk 32 connected to the network 6 and is rewritten, and this is set as the priority (1).
Then, the priority thus determined is registered in the priority 212 of the page management table 210.

【0022】本例では、ローカルディスク31のアクセ
ススピードがリモートディスク32のアクセススピード
よりも速いとして優先度の設定を行っている。尚、これ
らの優先度は、使用するネットワーク6や接続されてい
る2次記憶装置3の種類等によってさまざまなパターン
が考えられる。また、この優先度の設定は、必ずしもペ
ージの割当時に行う必要はなく、ページ置換の対象を決
定する時や、プログラムの実行時に動的に設定すること
も可能である。動的に優先度を設定することで、例えば
書き換え可能なページに関して、実際に書き換えの発生
したページの優先度を書き換えの発生していないページ
の優先度よりも低く設定することが可能となる。この様
に、動的に優先度を設定すればより細かな優先度の設定
が可能である。
In this example, the priority is set assuming that the access speed of the local disk 31 is faster than the access speed of the remote disk 32. Various patterns of these priorities can be considered depending on the network 6 used, the type of the secondary storage device 3 connected, and the like. Further, the setting of the priority does not necessarily have to be performed at the time of page allocation, and can be dynamically set at the time of determining the page replacement target or at the time of executing the program. By dynamically setting the priority, for example, for a rewritable page, the priority of a page that has actually been rewritten can be set lower than the priority of a page that has not been rewritten. Thus, by setting the priority dynamically, it is possible to set the finer priority.

【0023】次に、図4のステップS22において、仮
想記憶領域に割り当てられたページを使用する。このと
き、ページ管理テーブル210における使用したページ
の参照ビット213をオンする。そして、ステップS2
3において、ページ置換が必要な場合は、以下に説明す
る方法で置換対象の選択を行う。
Next, in step S22 of FIG. 4, the page allocated to the virtual storage area is used. At this time, the reference bit 213 of the used page in the page management table 210 is turned on. And step S2
If page replacement is required in 3, the replacement target is selected by the method described below.

【0024】以下に、本実施例の特徴的な動作である置
換対象の選択方法について説明する。尚、未使用のペー
ジが残っている場合はそのページが使用されることはい
うまでもない。
A method of selecting a replacement target, which is a characteristic operation of this embodiment, will be described below. Needless to say, when an unused page remains, that page is used.

【0025】図6は、本実施例における置換対象ページ
の選択方法の概念を説明する図である。仮想記憶に用い
られる各ページ(ページ0〜ページn)は、リングキュ
ーに接続されている。そして、これらページのうちの1
つを指すポインタとして、置換ポインタ220と優先度
1〜優先度4が設定された各クリアポインタ(221〜
224)がある。置換ポインタ220はページ置換の対
象を決定するためのポインタであり、クリアポインタ2
21〜224は参照ビットをオフするためのポインタで
ある。尚、各クリアポインタ221〜224はその優先
度が大きいものほど置換ポインタ220に近い位置に配
置されている。
FIG. 6 is a diagram for explaining the concept of the method of selecting the replacement target page in this embodiment. Each page (page 0 to page n) used for virtual storage is connected to the ring queue. And one of these pages
The replacement pointer 220 and each of the clear pointers (221 to 221) to which priority 1 to priority 4 are set
224). The replacement pointer 220 is a pointer for determining the target of page replacement, and the clear pointer 2
Reference numerals 21 to 224 are pointers for turning off the reference bit. The clear pointers 221 to 224 are arranged closer to the replacement pointer 220 as the priority of the clear pointers 221 to 224 is higher.

【0026】図7は図6の置換ポインタ220及び各ク
リアポインタ221〜224の動作と機能を説明するフ
ローチャートである。仮想記録領域内における未使用の
ページが所定量より少なくなった場合もしくは無くなっ
た場合に、システムは図7のフローチャートで示される
処理を一定期間毎に呼び出す。
FIG. 7 is a flow chart for explaining the operation and function of the replacement pointer 220 and the clear pointers 221 to 224 of FIG. When the number of unused pages in the virtual recording area becomes less than a predetermined amount or when there are no more unused pages, the system calls the processing shown in the flowchart of FIG. 7 at regular intervals.

【0027】ステップS31において、置換ポインタ2
20及び各クリアポインタ221〜224を1ページず
つ進める。ステップS32において、1つのクリアポイ
ンタの指すページの優先度とそのクリアポインタに設定
されている優先度とを比較する。そして、両者が等しく
なければステップS33よりそのままステップS35へ
進む。一方、両者が等しい場合(例えば、クリアポイン
タ221が指すページの優先度が(1)であった場合)
はステップS33よりステップS34へ進み、ページ管
理テーブル210における該当ページの参照ビット21
3をオフする。ステップS35では、全優先度について
終了したか否か、即ち、全てのクリアポインタ221〜
224について上述のステップS32からステップS3
4の処理が行われたか否かを判断する。そして、終了し
ていなければS32へ戻り、終了していれば本処理を終
了する。
In step S31, the replacement pointer 2
20 and each of the clear pointers 221 to 224 are advanced by one page. In step S32, the priority of the page pointed to by one clear pointer is compared with the priority set in the clear pointer. If they are not equal, the process directly proceeds from step S33 to step S35. On the other hand, when both are equal (for example, the priority of the page pointed to by the clear pointer 221 is (1))
Advances from step S33 to step S34, and the reference bit 21 of the corresponding page in the page management table 210
Turn off 3. In step S35, it is determined whether or not all the priorities are completed, that is, all clear pointers 221 to 221.
224 from step S32 to step S3 described above.
It is determined whether or not the process of 4 is performed. Then, if it has not been completed, the process returns to S32, and if it has been completed, this processing ends.

【0028】以上のように、所定期間毎に置換ポインタ
及び各クリアポインタを1つずつ進めるとともに、各ペ
ージの参照ビットの更新を行う。このような処理を実行
する一方で、ページの置換が必要となった場合、図8に
示すフローチャートに従って置換対象のページを決定
し、ページ置換を実行する。
As described above, the replacement pointer and each clear pointer are advanced one by one and the reference bit of each page is updated every predetermined period. When page replacement is required while performing such processing, the page to be replaced is determined according to the flowchart shown in FIG. 8 and page replacement is executed.

【0029】図8は、ページ置換における置換対象のペ
ージを選択する手順を表すフローチャートである。ステ
ップS41において、ページ置換ポインタが指すページ
の参照ビットをチェックする。そして、参照ビットがオ
ンしていればステップS42よりステップS43へ進
み、そのページを置換の対象として決定し、ページ置換
を実行して本処理を終了する。
FIG. 8 is a flowchart showing a procedure for selecting a page to be replaced in page replacement. In step S41, the reference bit of the page pointed to by the page replacement pointer is checked. Then, if the reference bit is turned on, the process proceeds from step S42 to step S43, the page is determined as a replacement target, page replacement is executed, and this processing ends.

【0030】一方、参照ビットがオンしていない場合は
ステップS42よりステップS44へ進み、置換ポイン
タ220及び各クリアポインタ221〜224を1つず
つ進める。そして、ステップS45〜ステップS47に
おいて、上述のステップS33〜ステップS35の処理
を行い、参照ビットの更新を行う。そして、ステップS
41に戻り、新たに置換ポインタ220が指し示すペー
ジについて参照ビットのチェックを行い置換対象の選択
処理を行い、これを置換対象が決定するまで繰り返す。
On the other hand, if the reference bit is not turned on, the process advances from step S42 to step S44 to advance the replacement pointer 220 and the clear pointers 221 to 224 one by one. Then, in steps S45 to S47, the processes of steps S33 to S35 described above are performed to update the reference bit. And step S
Returning to step 41, the reference bit is newly checked for the page newly designated by the replacement pointer 220, the replacement target selection processing is performed, and this is repeated until the replacement target is determined.

【0031】以上のように、ページ置換処理が必要とな
ったとき、その時点で置換ポインタが指し示しているペ
ージの参照ビットがオフであれば、そのページを置換対
象として選択する。一方、クリアポインタの動作により
参照ビットがオフされた後に、そのページがアクセスさ
れると、ステップS22の処理により参照ビットがオン
される。このため、ページ置換処理が必要となったとき
に置換ポインタが指し示すページの参照ビットがオフと
なっている場合もある。このような場合は、そのページ
を置換対象とはせず、置換ポインタ及び各クリアポイン
タを進めて参照ビットを更新し、置換対象のページの選
択処理を続ける。
As described above, when the page replacement process becomes necessary, if the reference bit of the page pointed to by the replacement pointer is off at that time, the page is selected as the replacement target. On the other hand, when the page is accessed after the reference bit is turned off by the operation of the clear pointer, the reference bit is turned on by the process of step S22. Therefore, the reference bit of the page pointed to by the replacement pointer may be turned off when the page replacement process is required. In such a case, the page is not set as the replacement target, the replacement pointer and each clear pointer are advanced to update the reference bit, and the selection process of the replacement target page is continued.

【0032】次に、本実施例における置換対象ページの
選択について、各ページの使用頻度及び優先度がいかに
反映されているかを説明する。
Next, regarding the selection of the page to be replaced in this embodiment, how the usage frequency and priority of each page are reflected will be described.

【0033】クリアポインタは、置換ポインタよりもリ
ングキューの先に位置しているので置換ポインタがその
ページに到達するには一定の時間が必要となる。この一
定時間内にページが参照された場合には参照ビットがオ
ンされるのでそのページは置換されない。このように、
所定の時間内にページが使用されたか否かが置換対象ペ
ージの選択に反映される。
Since the clear pointer is located ahead of the replace pointer in the ring queue, it takes a certain time for the replace pointer to reach the page. When a page is referred to within this fixed time, the reference bit is turned on, so that page is not replaced. in this way,
Whether or not the page is used within a predetermined time is reflected in the selection of the replacement target page.

【0034】更に、優先度の高いページを高い確率で置
換対象とするために、優先度の高いクリアポインタは置
換ポインタに近い位置に置き、優先度の低いクリアポイ
ンタは置換ポインタから遠い位置に置く。これによっ
て、優先度の高いページは参照ビットがオフされてから
置換ポインタにより指定されてチェックされるまでの期
間が短くなり、従って置換対象となる確率が高くなり、
優先度が反映される。
Further, in order to replace a page having a high priority with a high probability, the clear pointer having a high priority is placed at a position close to the replace pointer, and the clear pointer having a low priority is placed at a position far from the replace pointer. . This shortens the period from when the reference bit is turned off to when the high priority page is designated and checked by the replacement pointer, and therefore has a high probability of being replaced.
The priority is reflected.

【0035】尚、上記の例では何れのポインタも一度に
1ページづつ進めたが、置換ポインタによる参照ビット
のチェックとページ置換、クリアポインタによる参照ビ
ットのクリアを一度に複数回行うことも可能である。
In the above example, all the pointers are advanced one page at a time, but it is also possible to check the reference bit by the replacement pointer, replace the page, and clear the reference bit by the clear pointer a plurality of times at a time. is there.

【0036】以上説明したように、本実施例のページ置
換方式を用いることにより、ページの置換時の退避処理
と再ローディング処理の処理量が小さいページを優先的
にページ置換の対象とするので、情報処理装置の全体の
ページ置換処理時間を短くする効果がある。更に、優先
度の高いページばかりを置換対象として選択せずに、優
先度の低いページもある程度の割合で置換対象とするこ
とが可能となる。このため、例えば使用頻度が高くて優
先度の高いページが置換されることにより、頻繁にペー
ジ置換と再ローディングが繰り返されることが防止され
るので、情報処理装置全体の処理効率が向上する。ま
た、優先度の等しいページ同士では、近似的にLRUに
従って置換対象のページが選択されるので、ページ置換
の優先度が高くかつ使用頻度の低いページが先に置換対
象となり、処理効率が向上する。
As described above, by using the page replacement method of the present embodiment, a page having a small processing amount for the saving process and reloading process at the time of page replacement is preferentially targeted for page replacement. This has the effect of shortening the overall page replacement processing time of the information processing apparatus. Further, it becomes possible to select pages with low priority as replacement targets to some extent without selecting only pages with high priority as replacement targets. For this reason, it is possible to prevent frequent page replacement and reloading due to, for example, replacement of a page having a high use frequency and a high priority, so that the processing efficiency of the entire information processing apparatus is improved. Further, among pages having the same priority, pages to be replaced are selected approximately according to the LRU. Therefore, pages having a high priority of page replacement and infrequently used are replaced first and the processing efficiency is improved. .

【0037】尚、本発明は、複数の機器から構成される
システムに適用しても1つの機器からなる装置に適用し
ても良い。また、本発明はシステム或いは装置に本発明
により規定される処理を実行させるプログラムを供給す
ることによって達成される場合にも適用できることはい
うまでもない。
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. Further, it goes without saying that the present invention can also be applied to a case where it is achieved by supplying a program that causes a system or an apparatus to execute the processing defined by the present invention.

【0038】[0038]

【発明の効果】以上説明したように、本発明によれば、
仮想記憶における各ページのページ置換処理により発生
する処理量とアクセス頻度等を考慮してページ置換の対
象ページを決定することが可能となり、処理効率の向上
が実現する。
As described above, according to the present invention,
The page replacement target page can be determined in consideration of the processing amount and access frequency generated by the page replacement processing of each page in the virtual memory, and the processing efficiency is improved.

【0039】[0039]

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

【図1】本実施例に係る情報処理装置のブロック図であ
る。
FIG. 1 is a block diagram of an information processing apparatus according to an embodiment.

【図2】本実施例における仮想記憶機能の動作を説明す
るブロック図である。
FIG. 2 is a block diagram illustrating an operation of a virtual memory function in this embodiment.

【図3】ページ管理テーブルのデータ構成を説明する図
である。
FIG. 3 is a diagram illustrating a data configuration of a page management table.

【図4】本実施例の動作概要を示すフローチャートであ
る。
FIG. 4 is a flowchart showing an operation outline of the present embodiment.

【図5】優先度の設定についての一例を示す図である。FIG. 5 is a diagram showing an example of setting priorities.

【図6】本実施例における置換対象ページの選択方法の
概念を説明する図である。
FIG. 6 is a diagram illustrating a concept of a method of selecting a replacement target page in the present embodiment.

【図7】置換ポインタ及び各クリアポインタの動作と機
能を説明するフローチャートである。
FIG. 7 is a flowchart illustrating operations and functions of a replacement pointer and clear pointers.

【図8】ページ置換における置換対象のページを選択す
る手順を表すフローチャートである。
FIG. 8 is a flowchart showing a procedure for selecting a page to be replaced in page replacement.

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

1 CPU 2 主メモリ 3 2次記憶装置 4 キーボード 5 表示装置 6 ネットワーク 201 ROM 202 RAM 1 CPU 2 Main Memory 3 Secondary Storage Device 4 Keyboard 5 Display Device 6 Network 201 ROM 202 RAM

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 仮想記憶機能の制御を複数のページによ
り行う情報処理装置であって、 前記仮想記憶機能において実行されるページ置換処理に
おいて置換対象となる優先度を、置換処理の際に生じ得
る処理時間に基づいて各ページ毎に設定する設定手段
と、 前記ページ置換処理を実行する時点で、前記仮想記憶機
能の有する複数のページの1つを抽出する抽出手段と、 前記抽出手段により抽出されたページが、前記設定手段
により設定された優先度に基づく所定時間内にアクセス
されたか否かを判定する判定手段と、 前記判定手段によりアクセスされていないと判定された
とき当該ページを置換対象としてページ置換処理を実行
する実行手段と、 を備えることを特徴とする情報処理装置。
1. An information processing apparatus for controlling a virtual memory function by a plurality of pages, wherein a priority to be replaced in a page replacement process executed in the virtual memory function can occur during the replacement process. Setting means for setting each page based on processing time; extraction means for extracting one of a plurality of pages of the virtual memory function at the time of executing the page replacement processing; and extraction means for extracting by the extracting means. A determination unit that determines whether the page has been accessed within a predetermined time based on the priority set by the setting unit, and when the determination unit determines that the page has not been accessed, the page is set as a replacement target. An information processing apparatus comprising: an execution unit that executes page replacement processing.
【請求項2】 前記設定手段における置換処理の際に生
じ得る処理時間とは、ページが置換対象とされたとき、
そのページの置換時の2次記憶装置への退避処理と、そ
のページの再利用時のローディング処理の要する処理時
間であることを特徴とする請求項1に記載の情報処理装
置。
2. The processing time that can occur during the replacement processing in the setting means is, when a page is targeted for replacement,
2. The information processing apparatus according to claim 1, wherein the processing time is a processing time required for saving processing to the secondary storage device when replacing the page and a loading processing when reusing the page.
【請求項3】 前記判定手段における所定時間は、前記
設定手段により設定された優先度が高いページほど短い
ことを特徴とする請求項1に記載の情報処理装置。
3. The information processing apparatus according to claim 1, wherein the predetermined time in the determination unit is shorter for a page having a higher priority set by the setting unit.
【請求項4】 前記判定手段によりアクセスされている
と判定されたときは、他のページについて前記抽出手
段、前記判定手段、前記実行手段を繰り返すことを特徴
とする請求項1に記載の情報処理装置。
4. The information processing according to claim 1, wherein when the determination unit determines that the page is being accessed, the extraction unit, the determination unit, and the execution unit are repeated for another page. apparatus.
【請求項5】 仮想記憶機能の制御を複数のページによ
り行う情報処理装置であって、 前記仮想記憶機能において実行されるページ置換処理に
おいて置換対象となる優先度を、置換処理の際に生じ得
る処理時間に基づいて各ページ毎に設定する設定手段
と、 前記複数のページを順次指定する第1ポインタと、該第
1ポインタより先行するとともに前記優先度の高い順に
先行して前記複数のページを順次指定する複数の第2ポ
インタを制御するポインタ制御手段と、 前記複数の第2ポインタにより指定されたページの各々
について、ページに設定された優先度と当該ページを指
定している第2ポインタの対応する優先度が等しいと
き、当該ページにおけるアクセスの有無の調査を開始す
る開始手段と、 前記ページ置換処理の実行時において、前記第1ポイン
タが指定するページを抽出する抽出手段と、 前記抽出手段により抽出されたページが前記開始手段に
より開始された調査においてアクセスされていないと判
定されたとき当該ページを置換対象としてページ置換処
理を実行する実行手段とを備えることを特徴とする情報
処理装置。
5. An information processing apparatus for controlling a virtual memory function by a plurality of pages, wherein a priority to be replaced in a page replacement process executed in the virtual memory function can occur during the replacement process. Setting means for setting each page based on processing time; a first pointer for sequentially designating the plurality of pages; and a plurality of pages prior to the first pointer and in descending order of the priority. Pointer control means for controlling a plurality of second pointers sequentially designated; and, for each of the pages designated by the plurality of second pointers, the priority set for the page and the second pointer designating the page. When the corresponding priorities are equal, starting means for starting a check for the presence or absence of access to the page, and when executing the page replacement process, Note: Extraction means for extracting a page designated by the first pointer, and page replacement with the page extracted by the extraction means as a replacement target when it is determined that the page extracted by the extraction means is not accessed in the investigation started by the start means. An information processing apparatus comprising: an execution unit that executes a process.
【請求項6】 仮想記憶機能の制御を複数のページによ
り行う仮想記憶制御方法であって、 前記仮想記憶機能において実行されるページ置換処理に
おいて置換対象となる優先度を、置換処理の際に生じ得
る処理時間に基づいて各ページ毎に設定する設定工程
と、 前記ページ置換処理を実行する時点で、前記仮想記憶機
能の有する複数のページの1つを抽出する抽出工程と、 前記抽出工程により抽出されたページが、前記設定工程
により設定された優先度に基づく所定時間内にアクセス
されたか否かを判定する判定工程と、 前記判定工程によりアクセスされていないと判定された
とき当該ページを置換対象としてページ置換処理を実行
する実行工程と、 を備えることを特徴とする仮想記憶制御方法。
6. A virtual memory control method for controlling a virtual memory function by a plurality of pages, wherein priority to be replaced in a page replacement process executed in the virtual memory function is generated during the replacement process. A setting step of setting each page based on the obtained processing time; an extraction step of extracting one of a plurality of pages of the virtual memory function at the time of executing the page replacement processing; and an extraction step of the extraction step. The determined page determines whether or not the page has been accessed within a predetermined time based on the priority set by the setting step, and replaces the page when it is determined not to be accessed by the determination step. And a step of executing page replacement processing as described above, and a virtual memory control method.
【請求項7】 前記判定工程によりアクセスされている
と判定されたときは、他のページについて前記抽出工
程、前記判定工程、前記実行工程を繰り返すことを特徴
とする請求項6に記載の仮想記憶制御方法。
7. The virtual memory according to claim 6, wherein when it is determined by the determination step that the page is being accessed, the extraction step, the determination step, and the execution step are repeated for another page. Control method.
【請求項8】 仮想記憶機能の制御を複数のページによ
り行う仮想記憶制御方法であって、 前記仮想記憶機能において実行されるページ置換処理に
おいて置換対象となる優先度を、置換処理の際に生じ得
る処理時間に基づいて各ページ毎に設定する設定工程
と、 前記複数のページを順次指定する第1ポインタと、該第
1ポインタより先行するとともに前記優先度の高い順に
先行して前記複数のページを順次指定する複数の第2ポ
インタを制御するポインタ制御工程と、 前記複数の第2ポインタにより指定されたページの各々
について、ページに設定された優先度と当該ページを指
定している第2ポインタの対応する優先度が等しいと
き、当該ページにおけるアクセスの有無の調査を開始す
る開始工程と、 前記ページ置換処理の実行時において、前記第1ポイン
タが指定するページを抽出する抽出工程と、 前記抽出工程により抽出されたページが前記開始工程に
より開始された調査においてアクセスされていないと判
定されたとき当該ページを置換対象としてページ置換処
理を実行する実行工程とを備えることを特徴とする仮想
記憶制御方法。
8. A virtual memory control method for controlling a virtual memory function by a plurality of pages, wherein a priority to be replaced in a page replacement process executed in the virtual memory function is generated during the replacement process. A setting step for setting each page based on the obtained processing time; a first pointer for sequentially designating the plurality of pages; and a plurality of pages preceding the first pointer and in descending order of the priority. A pointer control step of controlling a plurality of second pointers sequentially designating, and, for each of the pages designated by the plurality of second pointers, a priority set for the page and a second pointer designating the page. When the corresponding priorities of the above are the same, the start step of starting the investigation of the presence or absence of access on the page, and An extraction step of extracting a page designated by the first pointer, and a page subject to replacement when it is determined that the page extracted by the extraction step is not accessed in the investigation started by the start step A virtual memory control method comprising: an execution step of executing a replacement process.
JP5297800A 1993-11-29 1993-11-29 Virtual storage control method and information processor Withdrawn JPH07152652A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5297800A JPH07152652A (en) 1993-11-29 1993-11-29 Virtual storage control method and information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5297800A JPH07152652A (en) 1993-11-29 1993-11-29 Virtual storage control method and information processor

Publications (1)

Publication Number Publication Date
JPH07152652A true JPH07152652A (en) 1995-06-16

Family

ID=17851338

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5297800A Withdrawn JPH07152652A (en) 1993-11-29 1993-11-29 Virtual storage control method and information processor

Country Status (1)

Country Link
JP (1) JPH07152652A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006309763A (en) * 2005-04-26 2006-11-09 Hewlett-Packard Development Co Lp Memory mapped page priority
US7376797B2 (en) 2003-03-11 2008-05-20 Kabushiki Kaisha Toshiba Cache memory system and method using reference bits
US11010081B2 (en) 2017-03-17 2021-05-18 Fujitsu Limited Information processing apparatus and storage control method therefor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7376797B2 (en) 2003-03-11 2008-05-20 Kabushiki Kaisha Toshiba Cache memory system and method using reference bits
JP2006309763A (en) * 2005-04-26 2006-11-09 Hewlett-Packard Development Co Lp Memory mapped page priority
US11010081B2 (en) 2017-03-17 2021-05-18 Fujitsu Limited Information processing apparatus and storage control method therefor

Similar Documents

Publication Publication Date Title
US6996821B1 (en) Data processing systems and method for batching tasks of the same type in an instruction cache
US5390318A (en) Managing the fetching and replacement of cache entries associated with a file system
KR100289627B1 (en) Resource management method and apparatus for information processing system having multitasking function
JP3544610B2 (en) Memory device
JP2001109661A (en) Assigning method for cache memory, operating system and computer system having the operating system
JP4317531B2 (en) System and method for balancing multiple memory buffer sizes
US6948034B2 (en) Method for use of stack
US5247653A (en) Adaptive segment control and method for simulating a multi-segment cache
US20010008011A1 (en) Computer
JPH0644085A (en) Method and device for executing access and computer system
US7065676B1 (en) Multi-threaded memory management test system with feedback to adjust input parameters in response to performance
US5678024A (en) Method and system for dynamic performance resource management within a computer based system
US10853076B2 (en) Performing at least two branch predictions for non-contiguous instruction blocks at the same time using a prediction mapping
JPH08221226A (en) Self-constituted network/printer system
EP1599803B1 (en) Reducing cache trashing of certain pieces
JPH07152652A (en) Virtual storage control method and information processor
CN109933358B (en) Control method for reducing program upgrading amount of metering equipment
JP2006202233A (en) Controller and program for same
KR20010056103A (en) Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory
JP2743849B2 (en) Update buffer management device
CN117556088A (en) Data management method and device for memory multidimensional database
CN116719609A (en) Performance optimization method of JavaScript engine
KR100489044B1 (en) Multi package management method
JPH08272411A (en) Ladder instruction processor
JPH06266623A (en) Cache memory and cache memory control method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010130