JPH0253150A - Check system for memory allotment value - Google Patents

Check system for memory allotment value

Info

Publication number
JPH0253150A
JPH0253150A JP20427288A JP20427288A JPH0253150A JP H0253150 A JPH0253150 A JP H0253150A JP 20427288 A JP20427288 A JP 20427288A JP 20427288 A JP20427288 A JP 20427288A JP H0253150 A JPH0253150 A JP H0253150A
Authority
JP
Japan
Prior art keywords
page
program
memory
logical
size
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP20427288A
Other languages
Japanese (ja)
Inventor
Kenji Imamine
今峰 健司
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP20427288A priority Critical patent/JPH0253150A/en
Publication of JPH0253150A publication Critical patent/JPH0253150A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To quickly and accurately check the variance of the memory allotment value due to the difference of page sizes by actually performing the page allotement, the working set control, etc., based on a page size that can be set for each program. CONSTITUTION:A logical page size of each program is previously designated to a memory control table 2 via a page size designating means 3. A logical page allotment means 4 allots pages during execution of a program 1 based on a page allotment request. In case no idle page is available, a logical replacement page selection means 5 selects the replaceable pages. Then a logical page release means 6 releases each logical page as necessary, and a logical page working set control means 7 returns the pages having no access for a long period of time every fixed period. A memory application value display means 8 displays the size of an alloted program memory.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は電子計算機システム内のページ方式を採用した
メモリ管理機能により利用者プログラムに割り当てられ
るメモリ量の、ページサイズの相違による変動を調査す
るメモリ割り当て量調査方式に関するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention investigates changes in the amount of memory allocated to user programs by a memory management function that employs a page method in a computer system due to differences in page size. This relates to a memory allocation amount investigation method.

〔従来の技術〕[Conventional technology]

周知のように、電子計算機システムでは限られたメモリ
 (主記憶装置)を有効に利用するため、メモリを所定
のサイズ(ページサイズ)の複数のページに分割し、同
じページサイズに分割したプログラムを、要求を待って
所定の規則に従いメモリ上のページに割り当てるように
している。また、ページの転送(ページイン、ページア
ウト)を少なくするために、所定の期間内に参照された
ページの集合であるワーキングセントを確保するワーキ
ングセント方式のページ管理が行われている。
As is well known, in computer systems, in order to effectively utilize limited memory (main memory), memory is divided into multiple pages of a predetermined size (page size), and programs divided into the same page size are , it waits for a request and allocates it to a page in memory according to predetermined rules. Furthermore, in order to reduce page transfers (page-in, page-out), a working cent method of page management is used to secure working cents, which are a set of pages referenced within a predetermined period.

ところで、この種のメモリ割り当て制御方式はハードウ
ェアシステム固有のページサイズを前提に実現されてお
り、ワーキングセントも当該ハードウェアに最適な値に
なるように各種のパラメータが調整されている。
By the way, this type of memory allocation control method is realized on the premise of a page size specific to a hardware system, and various parameters are adjusted so that the working cent becomes an optimal value for the hardware.

従って、このような電子計算機システムにおいて、ハー
ドウェアの変更等によりメモリの割り当て単位であるペ
ージサイズを変更(主として拡張)する場合には、以下
のような箇所でメモリ割り当て量の変動が予想される。
Therefore, in such a computer system, when changing (mainly expanding) the page size, which is the unit of memory allocation, due to changes in hardware, etc., the amount of memory allocation can be expected to change in the following places. .

■システムプログラム領域ないしはシステム制?11 
fiJl域のフラグメンテーションによるメモリ割り当
て量の変動 ■利用者プロセス制御のためのプログラム制御領域のフ
ラグメンテーションによるメモリ割り当て量の変動 ■利用者プログラムのプログラム領域のメモリ割り当て
量の変動 ところで、メモリ割り当て量の変動を事前に知ることは
電子計算機システムの設計上において非常に重要であり
、上記の各メモリ割り当て量の変動についても何らかの
方法で知る必要がある。ここで、上記の■、■に関して
は、システムプログラム開発担当者であれば、ある程度
の変動量の予測が可能であり問題はないが、■に関して
は利用者プログラムの動作条件による変動要因が大きく
、特にページサイズの相違によるワーキングセットの増
減については予想が非常に困難である。そのため、従来
は既存のページサイズのシステムでプログラムを実際に
動作させたり単純なシミニレ−シランを行い、ページア
クセスの軌跡や仮想アドレスの変遷を求めることにより
ページサイズの相違によるメモリ割り当て量の変動を予
測していた。
■System program area or system system? 11
Changes in memory allocation due to fragmentation of the fiJl area ■ Changes in memory allocation due to fragmentation of the program control area for user process control ■ Changes in memory allocation for the program area of user programs It is very important to know in advance when designing a computer system, and it is necessary to know the above-mentioned variations in memory allocation in some way. Regarding ■ and ■ above, if you are in charge of system program development, it is possible to predict the amount of fluctuation to a certain extent and there is no problem, but regarding ■, the fluctuation factor is largely due to the operating conditions of the user program. In particular, it is very difficult to predict the increase or decrease in the working set due to differences in page sizes. Therefore, in the past, it was possible to actually run a program on a system with an existing page size or perform a simple simulation run to determine the trajectory of page accesses and changes in virtual addresses, thereby reducing the amount of memory allocated due to differences in page sizes. I had predicted it.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述したように、従来のメモリ割り当て量調査方式では
、ページサイズを変更した場合の利用者プログラムのメ
モリ割り当て量を既存のページサイズのシステムでプロ
グラムを実際に動作させたりプログラムの実行をシミエ
レートしたりして予測していたため、 ■一つのプログラムのメモリ割り当て量の算出に多大の
時間を要する。
As mentioned above, in the conventional memory allocation investigation method, the memory allocation of the user program when the page size is changed is calculated by actually running the program on a system with the existing page size or by simulating the execution of the program. ■It takes a lot of time to calculate the memory allocation amount for one program.

■実際にそのページサイズのシステムで実行する時と環
境が異なり、正確な調査が行えない。
■Accurate investigation cannot be performed because the environment is different from when it is actually executed on a system with that page size.

等の欠点があった。There were drawbacks such as.

本発明は上記の点に鑑み提案されたものであり、その目
的とするところは、高速かつ正確にページサイズの相違
によるメモリ割り当て量の変動を調査することのできる
メモリ割り当てffi!ji査方式を提供することにあ
る。
The present invention has been proposed in view of the above points, and its purpose is to quickly and accurately investigate memory allocation ffi! fluctuations in memory allocation due to differences in page sizes. The objective is to provide a JI inspection method.

〔課題を解決するための手段〕[Means to solve the problem]

本発明は上記の目的を達成するため、要求時ページング
機構を有すると共に、ワーキングセット方式のページ管
理を行う電子計算機システムにおいて、 プログラム毎に論理ページサイズおよび割り当てプログ
ラムメモリサイズのエントリを有するメモリ管理テーブ
ルと、 前記メモリ管理テーブルの論理ページサイズをプログラ
ム毎に指定可能としたページサイズ指定手段と、 前記要求時ページング機構あるいはプログラムからペー
ジの割り当て要求が発生した際に、前記メモリ管理テー
ブルに登録された論理ページサイズによる論理ページを
単位としてページを割り当てると共に、必要に応じて前
記メモリ管理テーブルの割り当てプログラムメモリサイ
ズを更新する論理ページ割り当て手段と、 前記論理ページ割り当て手段でページを割り当てる際に
割り当て可能な空きページが存在しない場合に、同プロ
グラム内のページでリプレース可能なページの選択を論
理ページを単位として行う論理リプレースページ選択手
段と、 前記論理ページ割り当て手段あるいはプログラムからの
ページの解放要求が発生した際に、論理ページを単位と
して解放を行うと共に、必要に応じて前記メモリ管理テ
ーブルの割り当てプログラムメモリサイズを更新する論
理ページ解放手段と、所定の期間毎に論理ページを単位
として長期間アクセスされないページのシステムへの返
却を行うと共に、必要に応じて前記メモリ管理テーブル
の割り当てプログラムメモリサイズを更新する論理ペー
ジワーキングセット管理手段と、前記メモリ管理テーブ
ルの割り当てプログラムメモリサイズを表示するメモリ
使用量表示手段とを備えるようにしている。
In order to achieve the above object, the present invention provides a memory management table having entries for logical page size and allocated program memory size for each program in an electronic computer system that has a paging mechanism on demand and performs page management using a working set method. and a page size specifying means that allows the logical page size of the memory management table to be specified for each program; a logical page allocation unit that allocates pages in units of logical pages according to a logical page size, and updates the allocated program memory size of the memory management table as necessary; a logical replacement page selection means for selecting a replaceable page in the same program in units of logical pages when there is no free page; and a page release request from the logical page allocation means or the program. a logical page release means that releases logical pages as a unit and updates the allocated program memory size of the memory management table as necessary; logical page working set management means for returning the allocated program memory size of the memory management table to the system and updating the allocated program memory size of the memory management table as necessary; and memory usage display means for displaying the allocated program memory size of the memory management table. I am trying to prepare for this.

〔作用〕[Effect]

本発明のメモリ割り当て量調査方式にあっては、予めペ
ージサイズ指定手段によりメモリ管理テーブルにプログ
ラム毎に論理ページサイズの指定が行われ、プログラム
の実行時に要求時ページング機構あるいはプログラムか
らページの割り当て要求が発生した際に、論理ページ割
り当て手段が前記メモリ管理テーブルに登録された論理
ページサイズによる論理ページを単位としてページを割
り当てると共に必要に応じて前記メモリ管理テーブルの
割り当てプログラムメモリサイズを更新し、前記論理ペ
ージ割り当て手段でページを割り当てる際に割り当て可
能な空きページが存在しない場合に、論理リプレースペ
ージ選択手段が同プログラム内のページでリプレース可
能なページの選択を論理ページを単位として行い、前記
論理ページ割り当て手段あるいはプログラムからのペー
ジの解放要求が発生した際に、論理ページ解放手段が論
理ページを単位として解放を行うと共に必要に応じて前
記メモリ管理テーブルの割り当てプログラムメモリサイ
ズを更新し、一方、論理ページワーキングセット管理手
段が所定の期間毎に論理ページを単位として長期間アク
セスされないページのシステムへの返却を行うと共に必
要に応じて前記メモリ管理テーブルの割り当てプログラ
ムメモリサイズを更新し、メモリ使用量表示手段が前記
メモリ管理テーブルの割り当てプログラムメモリサイズ
を表示する。
In the memory allocation amount checking method of the present invention, the logical page size is specified for each program in the memory management table by the page size specifying means in advance, and a page allocation request is made from the paging mechanism or the program when the program is executed. occurs, the logical page allocation means allocates pages in units of logical pages according to the logical page size registered in the memory management table, updates the allocation program memory size of the memory management table as necessary, and When there is no free page that can be allocated when the logical page allocation means allocates a page, the logical replacement page selection means selects a replaceable page in the same program in units of logical pages, and the logical page When a page release request is issued from the allocation means or the program, the logical page release means releases the logical pages in units and updates the allocated program memory size in the memory management table as necessary. The page working set management means returns pages that have not been accessed for a long time to the system in units of logical pages at predetermined intervals, updates the allocation program memory size of the memory management table as necessary, and displays the amount of memory used. Means displays the allocated program memory size of the memory management table.

〔実施例〕 以下、本発明の実施例につき図面を参照して説明する。〔Example〕 Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明のメモリ割り当て量調査方式の一実施例
を示す構成図である。第1図において、本実施例は調査
の対象となるプログラム(利用者プログラム)1の他に
、メモリ管理テーブル2、ページサイズ指定手段3、論
理ページ割り当て手段4、論理リプレースページ選択手
段5、論理ページ解放手段6、論理ページワーキングセ
ント管理手段7、メモリ使用量表示手段8から構成され
ている。なお、各部の機能は次の通りである。
FIG. 1 is a block diagram showing an embodiment of the memory allocation amount checking method of the present invention. In FIG. 1, in addition to the program (user program) 1 to be investigated, this embodiment includes a memory management table 2, page size designation means 3, logical page allocation means 4, logical replacement page selection means 5, logical It is composed of page release means 6, logical page working cent management means 7, and memory usage display means 8. The functions of each part are as follows.

メモリ管理テーブル2;第2図に示す如く、プログラム
毎に論理ページサイズおよび割り当てプログラムメモリ
サイズ(it大大口ログラムメモリサイズi小プログラ
ムメモリサイズ)のエントリを有し、登録された情報を
保持する機能。
Memory management table 2: As shown in Figure 2, it has an entry for logical page size and allocated program memory size (it is large program memory size i small program memory size) for each program, and has a function to hold registered information. .

ページサイズ指定手段3:メモリ管理テーブル2の論理
ページサイズをプログラム毎に設定する機能。
Page size designation means 3: Function to set the logical page size of the memory management table 2 for each program.

論理ページ割り当て手段4;電子計算機システムの要求
時ページング機構(図示せず、)あるいはプログラムl
からページの割り当て要求が発生した際に、メモリ管理
テーブル2に登録された論理ページサイズによる論理ペ
ージを単位としてページを割り当てると共に、必要に応
じてメモリ管理テーブル2の割り当てプログラムメモリ
サイズを更新する機能。
Logical page allocation means 4; on-demand paging mechanism (not shown) or program l of the computer system
A function that allocates pages in units of logical pages according to the logical page size registered in the memory management table 2 when a page allocation request is generated from the memory management table 2, and updates the allocation program memory size of the memory management table 2 as necessary. .

論理リプレースページ選択手段5;論理ページ割り当て
手段4でページを割り当てる際に割り当て可能な空きペ
ージが存在しない場合に、同プログラム内のページでリ
プレース可能なページの選択を論理ページを単位として
行う機能。
Logical replacement page selection means 5: A function for selecting replaceable pages in the same program in units of logical pages when there are no free pages that can be allocated when the logical page allocation means 4 allocates pages.

論理ページ解放手段6;論理ページ割り当て手段4ある
いはプログラムlからのページの解放要求が発生した際
に、論理ページを単位として解放を行うと共に、必要に
応じてメモリ管理テーブル2の割り当てプログラムメモ
リサイズを更新する機能。
Logical page release means 6: When a page release request is generated from the logical page allocation means 4 or the program 1, the logical page is released as a unit, and the allocation program memory size of the memory management table 2 is changed as necessary. Ability to update.

論理ページワーキングセント管理手段7;所定の期間毎
に論理ページを単位として長期間アクセスされないペー
ジのシステムへの返却を行うと共に、必要に応じてメモ
リ管理テーブル20割り当てプログラムメモリサイズを
更新する機能。
Logical page working cent management means 7: Function to return pages that have not been accessed for a long time to the system in units of logical pages every predetermined period, and update the allocated program memory size of the memory management table 20 as necessary.

メモリ使用量表示手段8;メモリ管理テーブル2の割り
当てプログラムメモリサイズを表示(レポートへの出力
)するa能。
Memory usage display means 8: A function for displaying (outputting to a report) the allocated program memory size of the memory management table 2.

次に上記の実施例の動作について説明する。Next, the operation of the above embodiment will be explained.

先ず、プログラム1の実行に先き立ち、ページサイズ指
定手段3によりメモリ管理テーブル2のプログラム1に
対応したエントリに所定の論理ページサイズ(メモリ割
り当て量を調査しようとするハードウェアのページサイ
ズ)が設定される。
First, before executing program 1, the page size specifying means 3 sets a predetermined logical page size (the page size of the hardware whose memory allocation is to be investigated) in the entry corresponding to program 1 in the memory management table 2. Set.

なお、このページサイズ指定手段3は、例えば、プログ
ラム1の実行に際して該プログラムが使用するシステム
資源を指定するJOBMmカードに論理ページサイズパ
ラメータの値を追加し、プログラム1の実行に先立って
その論理ページサイズパラメータの値をメモリ管理テー
ブル2の対応するエントリに設定することにより実現さ
れる。
Note that this page size specifying means 3 adds, for example, the value of the logical page size parameter to the JOBMm card that specifies the system resources used by the program when executing the program 1, and sets the logical page size of the program before executing the program 1. This is achieved by setting the value of the size parameter in the corresponding entry of the memory management table 2.

次いで、プログラム1が実行され、同プログラムの仮想
アドレスを参照した際に、そのアドレスを含むページが
実メモリに割り当てられていない場合、電子計算機シス
テムの要求時ページング機構が働き、論理ページ割り当
て手段4が起動される。また、プログラム1から直接に
論理ページ割り当て手段4が起動されることもある。第
3図は論理ページ割り当て手段4の処理を示すフローチ
ャートであり、以下、第3図に沿って説明する。
Next, when the program 1 is executed and the virtual address of the program is referenced, if the page containing that address is not allocated to the real memory, the on-demand paging mechanism of the computer system operates and the logical page allocation means 4 is started. Further, the logical page allocation means 4 may be started directly from the program 1. FIG. 3 is a flowchart showing the processing of the logical page allocating means 4, and will be explained below along with FIG.

論理ページ割り当て手段4は、先ず、ステップ4−1に
おいてメモリ管理テーブル2からプログラムlの論理ペ
ージサイズを入手し、ステップ4−2においてページ割
り当ての要求のあった仮想アドレスを、入手した論理ペ
ージサイズを基にプログラム1の仮想空間内の論理ペー
ジ番号に変換する0次いで、ステップ4−3においてプ
ログラムリザーブページ(既にプログラム1に割り当て
済みだが実際に使用されていない状態のページ)が1論
理ペ一ジ分だけ存在するか否かをチエツクし、プログラ
ムリザーブページが存在していればステップ4−8へ進
む、また、プログラムリザーブページが存在していなけ
ればステップ4−4に進み、プログラムlに新たに実メ
モリを割り当てた場合にプログラム1に割り当て可能な
最大プログラムメモリサイズを越えることが無いかどう
かをチエツクする。そして、最大プログラムメモリサイ
ズを越える場合はステップ4−6へ進む、また、最大プ
ログラムメモリサイズを越えない場合は、ステップ4−
5においてシステム内に割り当て可能な論理ページサイ
ズ分の空きメモリが存在するか否かを判定し、システム
に空きメモリが存在する場合は、ステップ4−8へ進む
The logical page allocation means 4 first obtains the logical page size of the program l from the memory management table 2 in step 4-1, and in step 4-2, the virtual address for which page allocation is requested is set to the obtained logical page size. Convert to a logical page number in the virtual space of program 1 based on 0. Next, in step 4-3, the program reserve page (a page that has already been allocated to program 1 but is not actually used) is converted to a logical page number of 1 logical page in the virtual space of program 1. If the program reserve page exists, proceed to step 4-8. If the program reserve page does not exist, proceed to step 4-4, and add a new program to the program l. Check whether the maximum program memory size that can be allocated to program 1 will not be exceeded if real memory is allocated to program 1. If the maximum program memory size is exceeded, proceed to step 4-6; if the maximum program memory size is not exceeded, proceed to step 4-6.
In step 5, it is determined whether or not there is free memory for the allocatable logical page size in the system. If there is free memory in the system, the process advances to step 4-8.

ステップ4−4で最大プログラムメモリサイズを越える
場合およびステップ4−5でシステムに空きメモリが存
在しない場合は、ステップ4−6において論理リプレー
スページ選択手段5を呼び出し、リプレース可能な論理
ページ番号を入手する(論理リプレースページ選択手段
5の処理は後述する。)。次いで、ステップ4−7にお
いてステップ4−6で入手したリプレース可能な論理ペ
ージ番号をパラメータに論理ページ解放手段6を呼び出
して実ページを解放する(論理ページ解放手段6の処理
は後述する。)、なお、この時、解放された実ページは
同プログラムで直ちに利用可能なように、同プログラム
のプログラムリザーブページとして登録される。
If the maximum program memory size is exceeded in step 4-4 and if there is no free memory in the system in step 4-5, the logical replacement page selection means 5 is called in step 4-6 to obtain a replaceable logical page number. (The processing of the logical replacement page selection means 5 will be described later.) Next, in step 4-7, the logical page release means 6 is called using the replaceable logical page number obtained in step 4-6 as a parameter to release the real page (the processing of the logical page release means 6 will be described later). Note that at this time, the released real page is registered as a program reserve page for the program so that it can be used immediately by the program.

一方、ステップ4−3でプログラムリザーブページが存
在している場合、ステップ4−5でシステムに空きメモ
リが存在する場合、およびステンブ4−7の後にあって
は、ステップ4−8においてプログラムリザーブページ
あるいはシステム空きページを割り当て要求のあった論
理ページ番号に対応するページに割り当てる。そして、
ステップ4−9においてそのページにイメージをロード
し、ステップ4−10において現在のメモリ割り当て量
に応じて必要ならメモリ管理テーブル2内の最大プログ
ラムメモリサイズの更新を行う、なお、この時点では最
小プログラムメモリサイズに影響を与えることはない。
On the other hand, if a program reserve page exists in step 4-3, if there is free memory in the system in step 4-5, and if there is a program reserve page after step 4-7, then in step 4-8 the program reserve page is Alternatively, allocate a system free page to the page corresponding to the requested logical page number. and,
In step 4-9, the image is loaded to the page, and in step 4-10, the maximum program memory size in the memory management table 2 is updated if necessary according to the current memory allocation. It has no effect on memory size.

次に、第4図は第3図におけるステップ4−6で呼び出
される論理リプレースページ選択手段5の処理を示すフ
ローチャートである。し力1して、論理リプレースペー
ジ選択手段5は、先ず、ステップ5−1において実行中
のプログラムlの論理ページサイズを入手する0次いで
、ステップ5−2において論理ページを単位にしたリプ
レースページの選択を行う、ここで、リプレースページ
の選択は、今後参照される可能性が最も低いページとし
て、最近量も長く参照されていないページをリプレース
の対象ページとして選択する。なお、この処理は、例え
ば、中央処理装置の備えるハードウェア機ta(実メモ
リの物理ページ単位に設けられたフラグに対し、ページ
の参照や書き込みの発生の都度、対応するフラグをセン
トする機能)を利用して実現される。すなわち、ある期
間毎にページのフラグをチエツクしリセフトする処理を
行うことにより、期間毎に該当ページの参照が発生した
か否かの履歴を得ることができ、参照の発生しない期間
が長いページをリプレースの対象とする。なお、上述の
フラグ(参照フラグ/書き込bフラグ)は、物理ページ
単位に存在しているため、本発明のように異なる論理ペ
ージサイズに基づく論理ページの参照/書き込みの履歴
を得るためには次のような工夫が必要となる0例えば、
第5図に示すように論理ページサイズが物理ページサイ
ズの4倍のサイズを持つ場合は、同−論理ページに属す
る4個の物理ページのうち1ページでも参照フラグがセ
ットされているページが存在すれば、その論理ページの
参照フラグはONとみなすという処理を行えばよい。
Next, FIG. 4 is a flowchart showing the processing of the logical replacement page selection means 5 called at step 4-6 in FIG. Then, the logical replacement page selection means 5 first obtains the logical page size of the program l being executed in step 5-1.Then, in step 5-2, the logical replacement page selection means 5 obtains the logical page size of the program l being executed. In selecting a replacement page, a page that is least likely to be referenced in the future and has not been referenced recently or for a long time is selected as a page to be replaced. Note that this processing is performed, for example, by a hardware device provided in the central processing unit TA (a function that writes a corresponding flag each time a page is referenced or written to a flag set for each physical page of the real memory). This is realized using . In other words, by checking and resetting the flag of a page every certain period, it is possible to obtain a history of whether or not the relevant page has been referred to for each period, and to identify pages that have not been referred to for a long period of time. Target for replacement. Note that the above-mentioned flags (reference flag/write b flag) exist for each physical page, so in order to obtain the history of logical page references/writes based on different logical page sizes as in the present invention, it is necessary to For example, the following measures are required:
As shown in Figure 5, if the logical page size is four times the physical page size, there is a page with the reference flag set at least one of the four physical pages belonging to the same logical page. Then, the reference flag for that logical page may be considered to be ON.

次に、第6図は第3図におけるステップ4−7で呼び出
される論理ページ解放手段6の処理を示すフローチャー
トである。なお、プログラム1から直接に論理ページ解
放手段6が呼び出されることもある。しかして、論理ペ
ージ解放手段6は、先ず、ステップ6−1において解放
すべきページの仮想アドレスから論理ページアドレスを
計算する。なお、このステップ6−1はプログラムlか
らの呼び出し時のみ実行される。論理ページ割り当て手
段4から呼び出された場合には既に第3図のステップ4
〜2でアドレスが計算されているからである0次いで、
ステップ6−2において該当論理ページに書き込みが発
生しているか否かにより、ページアウトが必要が否かを
判断する。そして、論理ページに書き込みが発生してい
なければページアウトは不要と判断され、ステップ6−
4へ進む、なお、書き込みが発生しているか否かの判断
には前述の書き込みフラグを用いる。また、ページアウ
トが必要な場合は、ステップ6−3において論理ページ
相当分のページアウトファイル領域を確保した上で論理
ページ全体をファイル上へ書き出す0次いで、ステップ
6−4において解放しようとしている論理ページに対応
する物理ページを解放し、論理ページ解放手段6の呼び
出し元に応じて、論理ページ割り当て手段4から呼び出
された場合は同プログラムのプログラムリザーブ領域へ
登録し、プログラム1から呼び出された場合はシステム
の空きメモリとする0次いで、ステ・/ブロー5におい
て必要ならメモリ管理テーブル2内の最小プログラムメ
モリサイズの更新を行う。なお、このステップ6−5は
プログラムlから呼び出された場合のみ実行される。論
理ページ割り当て手段4から呼び出された場合は第3図
のステップ4−10で同じ処理が行われるからである。
Next, FIG. 6 is a flowchart showing the processing of the logical page release means 6 called at step 4-7 in FIG. Note that the logical page release means 6 may be called directly from the program 1. Therefore, the logical page release means 6 first calculates a logical page address from the virtual address of the page to be released in step 6-1. Note that this step 6-1 is executed only when called from program 1. When called from logical page allocation means 4, step 4 in FIG.
Because the address is calculated at ~20 then,
In step 6-2, it is determined whether or not page-out is necessary depending on whether writing has occurred in the corresponding logical page. Then, if no writing has occurred to the logical page, it is determined that page-out is unnecessary, and step 6-
Proceed to step 4. Note that the above-mentioned write flag is used to determine whether or not writing has occurred. If page-out is necessary, in step 6-3, a page-out file area equivalent to the logical page is secured and the entire logical page is written to the file.Next, in step 6-4, the logical page to be released is The physical page corresponding to the page is released, and depending on the calling source of the logical page release means 6, if it is called from the logical page allocation means 4, it is registered in the program reserve area of the same program, and if it is called from the program 1. is set to 0 as the free memory of the system. Then, in Step 5, the minimum program memory size in the memory management table 2 is updated if necessary. Note that this step 6-5 is executed only when called from program 1. This is because when called from the logical page allocation means 4, the same processing is performed in step 4-10 of FIG.

次に、第7図は論理ページワーキングセント管理手段7
の処理を示すフローチャートである。しかして、論理ペ
ージワーキングセット管理手段7は、ステップ7−1に
おいてメモリ管理テープル2からプログラム1の論理ペ
ージサイズを入手し、ステップ7−2において論理ペー
ジ毎に参照履歴を更新する。具体的には、第5図で説明
したように、物理ページ単位で存在するページ参照フラ
グを論理ページサイズ単位のページ参照フラグに変換し
、その値から履歴を得る。なお、この時、各物理ページ
対応のページ参照フラグはリセットされる0次いで、ス
テップ7−3においてステップ7−2で更新された論理
ページの参照履歴を元に長期間参照されていない論理ペ
ージを選択する。
Next, FIG. 7 shows the logical page working cent management means 7.
3 is a flowchart showing the processing of FIG. Thus, the logical page working set management means 7 obtains the logical page size of the program 1 from the memory management table 2 in step 7-1, and updates the reference history for each logical page in step 7-2. Specifically, as explained in FIG. 5, the page reference flag that exists in units of physical pages is converted into page reference flags in units of logical page size, and the history is obtained from the value. At this time, the page reference flag corresponding to each physical page is reset to 0.Next, in step 7-3, based on the reference history of the logical page updated in step 7-2, a logical page that has not been referenced for a long time is identified. select.

次いで、ステップ7−4においてステップ7−3で選択
された論理ページをパラメータに順次に論理ページ解放
手段6を呼び出し、ステップ7−3で選択された全論理
ページを解放し、システムへ返却する。処理の詳細は第
6図で説明した通りである。最後に、ステップ7−5に
おいて必要ならメモリ管理テーブル2内の最小プログラ
ムメモリサイズを更新する。
Next, in step 7-4, the logical page release means 6 is sequentially called using the logical pages selected in step 7-3 as parameters, and all the logical pages selected in step 7-3 are released and returned to the system. The details of the process are as explained in FIG. Finally, in step 7-5, the minimum program memory size in the memory management table 2 is updated if necessary.

上記の各処理によりプログラム1の実行に際してのメモ
リ割り当て量の上下限値がメモリ管理テーブル2に登録
され、その値(最大プログラムメモリサイズ、最小プロ
グラムメモリサイズ)はメモリ使用量表示手段8により
、プログラムlの実行レポート上に出力される。
Through each of the above processes, the upper and lower limits of the memory allocation amount when executing the program 1 are registered in the memory management table 2, and the values (maximum program memory size, minimum program memory size) are displayed by the memory usage display means 8 for the program. It is output on the execution report of l.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明のメモリ割り当てffi調
査方式にあっては、プログラム毎にページサイズを設定
可能とし、各プログラム毎にそのページサイズを基準に
実際にページの割り当ておよびワーキングセット管理等
を行い、その過程でプログラム毎のメモリ割り当て量を
記録して後に表示するため、 ■プログラムを1回実行するだけで済み、予測等の処理
を必要としないので、高速にメモリ割り当て量を求める
ことができる。
As explained above, in the memory allocation ffi investigation method of the present invention, the page size can be set for each program, and page allocation and working set management are actually performed for each program based on the page size. In the process, the memory allocation amount for each program is recorded and displayed later. - Since the program only needs to be executed once and no processing such as prediction is required, it is possible to quickly calculate the memory allocation amount. can.

■調査したいページサイズのシステムとほぼ同じ条件で
動作が行われるので、メモリ割り当て量が正確に求めら
れる。
■Since operations are performed under almost the same conditions as the system with the page size you want to investigate, the memory allocation amount can be determined accurately.

等の効果がある。There are other effects.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明のメモリ割り当て量調査方式の一実施例
を示す構成図、 第2図はメモリ管理テーブルの論理的構成図、第3図は
第1図における論理ページ割り当て手段の処理のフロー
チャート、 第4図は第1図における論理リプレースページ選択手段
の処理のフローチャート、 第5図は第4図の論理リプレースページ選択手段におけ
る参照/書き込みフラグの判定の手法の例を示す図、 第6図は第1図における論理ページ解放手段の処理のフ
ローチャートおよび、 第7図は第1図における論理ページワーキングセント管
理手段の処理のフローチャートである。 図において、 1・・・プログラム(利用者プログラム)2・・・メモ
リ管理テーブル 3・・・ページサイズ指定手段 4・・・論理ページ割り当て手段 5・・・論理リプレースページ選択手段6・・・論理ペ
ージ解放手段 7・・・論理ページワーキングセット管理手段8・・・
メモリ使用量表示手段
FIG. 1 is a block diagram showing an embodiment of the memory allocation checking method of the present invention, FIG. 2 is a logical block diagram of a memory management table, and FIG. 3 is a flowchart of the processing of the logical page allocation means in FIG. 1. , FIG. 4 is a flowchart of the processing of the logical replacement page selection means in FIG. 1, FIG. 5 is a diagram showing an example of the reference/write flag determination method in the logical replacement page selection means of FIG. 4, and FIG. are a flowchart of the processing of the logical page release means in FIG. 1, and FIG. 7 is a flowchart of the processing of the logical page working cent management means in FIG. In the figure, 1... Program (user program) 2... Memory management table 3... Page size specification means 4... Logical page allocation means 5... Logical replacement page selection means 6... Logic Page release means 7...Logical page working set management means 8...
Memory usage display method

Claims (1)

【特許請求の範囲】  要求時ページング機構を有すると共に、ワーキングセ
ット方式のページ管理を行う電子計算機システムにおい
て、 プログラム毎に論理ページサイズおよび割り当てプログ
ラムメモリサイズのエントリを有するメモリ管理テーブ
ルと、 前記メモリ管理テーブルの論理ページサイズをプログラ
ム毎に指定可能としたページサイズ指定手段と、 前記要求時ページング機構あるいはプログラムからペー
ジの割り当て要求が発生した際に、前記メモリ管理テー
ブルに登録された論理ページサイズによる論理ページを
単位としてページを割り当てると共に、必要に応じて前
記メモリ管理テーブルの割り当てプログラムメモリサイ
ズを更新する論理ページ割り当て手段と、 前記論理ページ割り当て手段でページを割り当てる際に
割り当て可能な空きページが存在しない場合に、同プロ
グラム内のページでリプレース可能なページの選択を論
理ページを単位として行う論理リプレースページ選択手
段と、 前記論理ページ割り当て手段あるいはプログラムからの
ページの解放要求が発生した際に、論理ページを単位と
して解放を行うと共に、必要に応じて前記メモリ管理テ
ーブルの割り当てプログラムメモリサイズを更新する論
理ページ解放手段と、所定の期間毎に論理ページを単位
として長期間アクセスされないページのシステムへの返
却を行うと共に、必要に応じて前記メモリ管理テーブル
の割り当てプログラムメモリサイズを更新する論理ペー
ジワーキングセット管理手段と、 前記メモリ管理テーブルの割り当てプログラムメモリサ
イズを表示するメモリ使用量表示手段とを備えたことを
特徴とするメモリ割り当て量調査方式。
[Scope of Claims] An electronic computer system having a request paging mechanism and performing page management using a working set method, comprising: a memory management table having entries for a logical page size and allocated program memory size for each program; and the memory management table. a page size specifying means that allows the logical page size of the table to be specified for each program; and a logical page size specifying means that allows the logical page size of the table to be specified for each program; logical page allocation means for allocating pages on a page-by-page basis and updating the allocation program memory size of the memory management table as necessary; and when the logical page allocation means allocates pages, there are no available pages that can be allocated. logical page selection means for selecting replaceable pages in the same program in units of logical pages; logical page release means for releasing in units of logical pages and updating the allocated program memory size of the memory management table as necessary, and returning pages that are not accessed for a long time to the system in units of logical pages every predetermined period. and logical page working set management means for updating the allocated program memory size of the memory management table as needed; and memory usage display means for displaying the allocated program memory size of the memory management table. A memory allocation survey method featuring the following.
JP20427288A 1988-08-17 1988-08-17 Check system for memory allotment value Pending JPH0253150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20427288A JPH0253150A (en) 1988-08-17 1988-08-17 Check system for memory allotment value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20427288A JPH0253150A (en) 1988-08-17 1988-08-17 Check system for memory allotment value

Publications (1)

Publication Number Publication Date
JPH0253150A true JPH0253150A (en) 1990-02-22

Family

ID=16487728

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20427288A Pending JPH0253150A (en) 1988-08-17 1988-08-17 Check system for memory allotment value

Country Status (1)

Country Link
JP (1) JPH0253150A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06222991A (en) * 1993-01-26 1994-08-12 Nec Corp Automatic page number managing system in plural page size system
JP2001134452A (en) * 1999-09-10 2001-05-18 Sun Microsyst Inc Device and method for managing usage of resource
JP2009064061A (en) * 2007-09-04 2009-03-26 Kyocera Mita Corp Information processor
US10996977B2 (en) 2017-08-24 2021-05-04 Fujitsu Limited Information processing apparatus and process management method that control a number of processes executed in parallel

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06222991A (en) * 1993-01-26 1994-08-12 Nec Corp Automatic page number managing system in plural page size system
JP2001134452A (en) * 1999-09-10 2001-05-18 Sun Microsyst Inc Device and method for managing usage of resource
JP2009064061A (en) * 2007-09-04 2009-03-26 Kyocera Mita Corp Information processor
US10996977B2 (en) 2017-08-24 2021-05-04 Fujitsu Limited Information processing apparatus and process management method that control a number of processes executed in parallel

Similar Documents

Publication Publication Date Title
US9400686B2 (en) Process grouping for improved cache and memory affinity
US7376808B2 (en) Method and system for predicting the performance benefits of mapping subsets of application data to multiple page sizes
EP2266040B1 (en) Methods and systems for dynamic cache partitioning for distributed applications operating on multiprocessor architectures
US7240169B2 (en) Protocol for coordinating the distribution of shared memory
US7500077B2 (en) Use of region-oriented memory profiling to detect heap fragmentation and sparse memory utilization
JPH11505653A (en) Operating system for use with protection domains in a single address space
JPH09101916A (en) Multiprocess processor
KR20000006565A (en) Method and apparatus for memory allocation in a multi-threaded virtual machine
JP2014206884A (en) Information processor, information processing method, and program
US5940868A (en) Large memory allocation method and apparatus
JP2015127879A (en) Memory management program, memory management method, and memory management device
US8151086B2 (en) Early detection of an access to de-allocated memory
US6600493B1 (en) Allocating memory based on memory device organization
US6212533B1 (en) Hyper-media document management system having navigation mechanism
US6532487B1 (en) Method and system for managing semaphores in an object-oriented multi-tasking computer system
JPH0253150A (en) Check system for memory allotment value
US5394545A (en) System for determination and display of memory used, dedicated, and shared by a process at a particular time
WO2017142525A1 (en) Allocating a zone of a shared memory region
CN102662891B (en) Method and device of DMA (direct memory access) buffer management based on affinity sensing
JPH06332803A (en) Tlb control method in virtual computer system
WO2015161804A1 (en) Cache partitioning method and device
US5761738A (en) Computer system which stores management or control information in different address space but same offset as corresponding data
JP2014149758A (en) Information processing device, information processing method, and program
KR102275181B1 (en) Method and apparatus for memory allocation in a multi-core processor system, and recoding medium therefor
JPH11306040A (en) Emulator tracing device