JPH0324697B2 - - Google Patents

Info

Publication number
JPH0324697B2
JPH0324697B2 JP58145752A JP14575283A JPH0324697B2 JP H0324697 B2 JPH0324697 B2 JP H0324697B2 JP 58145752 A JP58145752 A JP 58145752A JP 14575283 A JP14575283 A JP 14575283A JP H0324697 B2 JPH0324697 B2 JP H0324697B2
Authority
JP
Japan
Prior art keywords
program
memory
real memory
page
control mechanism
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP58145752A
Other languages
Japanese (ja)
Other versions
JPS6039248A (en
Inventor
Kenichiro Murakami
Masahiro Kurata
Takaaki Matsumoto
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP58145752A priority Critical patent/JPS6039248A/en
Publication of JPS6039248A publication Critical patent/JPS6039248A/en
Publication of JPH0324697B2 publication Critical patent/JPH0324697B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements

Description

【発明の詳細な説明】 (発明の属する分野) 本発明は、データ処理装置における実メモリ管
理方式、特にシステムが実メモリ不足状態に陥つ
た場合に同時に実行されている複数の順次的プロ
グラムへの効率の良い実メモリ配分を行なえる様
にした資源管理方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of the Invention) The present invention relates to a real memory management method in a data processing device, and in particular to a real memory management method for multiple sequential programs being executed simultaneously when the system is running out of real memory. The present invention relates to a resource management method that enables efficient real memory allocation.

(従来の技術) マルチプログラムで動作する仮想記憶方式の情
報処理システムにおいては、実メモリ上の各プロ
グラムに対して、いかに実メモリを割当てるかが
問題となる。仮想記憶システムでは、処理装置
CPUは実行すべきプログラムの一部が入れられ
ている実メモリをアクセスしつつ処理を進める。
プログラム全体は補助記憶装置上に置かれてお
り、常にプログラム全体がアクセスされる事は無
いので、アクセスされる確率の高い部分をプログ
ラムの管理単位であるページごとに選んで(これ
をワーキングセツトと呼ぶ)CPUの直接アクセ
スが可能な実メモリへ入れておく。このことによ
り、少ない実メモリ量で多くのプログラムが同時
に実行出来、実メモリ資源の使用効率を高めてい
る。
(Prior Art) In a virtual memory type information processing system that operates with multiple programs, the problem is how to allocate real memory to each program on the real memory. In a virtual memory system, the processing unit
The CPU performs processing while accessing real memory that contains part of the program to be executed.
The entire program is stored on the auxiliary storage device, and the entire program is not accessed all the time. Therefore, sections with a high probability of being accessed are selected for each page, which is the management unit of the program (this is called the working set). (call) into real memory that can be directly accessed by the CPU. This allows many programs to be executed simultaneously with a small amount of real memory, increasing the efficiency of using real memory resources.

CPUのアクセスしようとした情報が実メモリ
に無い場合(ページフオルト時)には、補助記憶
装置からそのプログラムの所望の論理ページの内
容が適切な実メモリの物理ページに転送される。
この転送に先立ち、すでに空き実メモリが無い場
合には、新情報が転送されてくるべき実メモリの
ページ内にあつた旧情報は補助記憶装置へ転送さ
れ退避される。プログラムに与えられた実メモリ
量がプログラムの必要実メモリ量(ワーキングセ
ツトサイズ)よりも少ない場合には、所望のプロ
グラムの論理ページが実メモリ上に無い確率が増
加し、上記の転送が頻繁に行われる。このため、
プログラムは転送待ちとなつて実行されなくな
る。これを防止するため、通常ページフオルトが
発生すると、他プログラムが使用中の実メモリ内
容を補助記憶装置に転送して空き実メモリを作
り、これを前記プログラムへ割当てる事によつて
ワーキングセツトサイズを満たし、ページフオル
トの起こる回数を少なくする。
If the information that the CPU attempts to access is not in real memory (at the time of a page fault), the contents of the desired logical page of the program are transferred from the auxiliary storage device to the appropriate physical page of real memory.
Prior to this transfer, if there is no free real memory already, the old information that was in the page of the real memory to which the new information is to be transferred is transferred to the auxiliary storage and saved. If the amount of real memory given to a program is smaller than the amount of real memory required by the program (working set size), the probability that the desired program's logical page is not in real memory increases, and the above transfers will occur more frequently. It will be done. For this reason,
The program waits for transfer and is no longer executed. To prevent this, normally when a page fault occurs, the contents of real memory being used by other programs are transferred to auxiliary storage to create free real memory, and this is allocated to the program to increase the working set size. to reduce the number of page faults.

マルチプログラミングシステムでは多数のプロ
グラムが時分割によつて同時に処理されている
が、上記転送が開始されてそのプログラムが実行
出来なくなるとCPUは他のプログラムを実行す
る。ところが、全体のプログラムの総必要実メモ
リ量(ワーキングセツトサイズの総和)がシステ
ム中の全実メモリ量を越えると、各プログラムに
制御が移るたびに次々と実メモリ要求が起こり、
プログラム間で実メモリを奪い合うので、上記の
空きメモリを作るための転送及び必要な論理ペー
ジ内容の補助記憶装置から実メモリへの転送が総
てのプログラムで頻発する。この結果どのプログ
ラムも転送待ちが多くなり、プログラムの実行が
進まなくなる(スラツシング状態)。
In a multiprogramming system, a large number of programs are processed simultaneously by time sharing, but when the above transfer starts and the program becomes unexecutable, the CPU executes another program. However, if the total amount of real memory required by all programs (sum of working set sizes) exceeds the total amount of real memory in the system, real memory requests will occur one after another each time control is transferred to each program.
Since programs compete for real memory, the above-mentioned transfer to create free memory and transfer of necessary logical page contents from auxiliary storage to real memory occur frequently in all programs. As a result, all programs have a large amount of waiting time for transfer, and the execution of the programs does not proceed (thrashing state).

従来、このスラツシングを防止するため、不足
している実メモリ量に関係なく最低実行優先度の
プログラムが使用している実メモリの内容を総て
補助記憶装置へ強制的に転送して空き実メモリを
作り(スワツプアウト)、そのうち、他の実行優
先度の高いプログラムへ不足している実メモリ量
だけ配分していた。スワツプアウトは、不足して
いる実メモリ量に関係なくプログラム単位で行わ
れるため、必ず不足実メモリ量よりも空き実メモ
リ量が多くなり、使用されないままの実メモリが
発生してメモリ資源の有効利用が出来ないという
欠点があつた。また、最低実行優先度のプログラ
ムはスワツプアウトによつて総ての実メモリを強
制的に奪われるので、そのプログラムは全く実行
できなくなる。その結果、他プログラムが入出力
待ち等のために実行出来ない場合にも、このプロ
グラムの実行が出来なくなり、結局どのプログラ
ムでもCPUが使用されずに無駄となるという欠
点もあつた。
Conventionally, in order to prevent this thrashing, all the contents of the real memory used by the program with the lowest execution priority are forcibly transferred to the auxiliary storage device, regardless of the amount of real memory that is insufficient, to free up real memory. (swap out), and then allocate the insufficient amount of real memory to other programs with higher execution priority. Swap-out is performed on a program-by-program basis regardless of the amount of real memory that is insufficient, so the amount of free real memory is always greater than the amount of real memory that is insufficient, resulting in unused real memory and effective use of memory resources. The drawback was that it was not possible. Furthermore, since the program with the lowest execution priority is forcibly deprived of all real memory by swap-out, the program cannot be executed at all. As a result, even if other programs cannot be executed due to waiting for input/output, etc., this program cannot be executed, and in the end, the CPU of any program is not used and is wasted.

(発明の目的) 本発明はこれらの欠点を除去するため、各プロ
グラムの必要実メモリ量の総和がシステムの全実
メモリ量を越える際には、 () 最低実行優先度に属するプログラムの1つ
から不足ページ分だけの使用中実メモリを選択
し、補助記憶装置へその内容を転送する事によ
り空きメモリを作つて実メモリの不足している
他プログラムへ与えるが、残りは与えたままと
して上記メモリ取り上げ対象プログラムを実行
可能とし、 () そのメモリ取り上げ対象プログラムのペー
ジフオルトの際には、そのプログラムが現在使
用中である実メモリ量を越えてメモリを与えな
い事によりそのプログラムが高優先度プログラ
ムの使用している実メモリを奪う事を防止して
高実行優先度プログラムでのスラツシング発生
を抑止し、 () 上記メモリ取り上げ対象プログラムをシス
テム中で唯一つの最低実行優先度に設定し、他
のより高い実行優先度のプログラムがCPU、
補助記憶制御装置(チヤネル)を使用しない時
のみこれら残りのシステム資源をそのプログラ
ムへ与えることにより、そのプログラムで多発
するページフオルト処理のためのシステム資源
の使用が、高実行優先度プログラムの実行妨害
を引き起こさないようにする。
(Objective of the Invention) In order to eliminate these drawbacks, the present invention has the following objectives: When the total amount of real memory required by each program exceeds the total amount of real memory of the system, () one of the programs belonging to the lowest execution priority is Select the actual memory in use for the missing pages from , and transfer the contents to the auxiliary storage device to create free memory and give it to other programs that lack real memory, but leave the rest as is and do the above. The program to be taken memory is made executable, and () in the event of a page fault of the program to be taken memory, that program is given high priority by not being given more memory than the amount of real memory currently in use by that program. () To prevent thrashing from occurring in high-execution-priority programs by preventing real memory used by programs from being taken away; If other higher execution priority programs run on the CPU,
By giving these remaining system resources to a program only when the auxiliary storage control unit (channel) is not in use, the use of system resources for handling page faults, which occur frequently in that program, is reduced to the execution of high-priority programs. Avoid causing disturbances.

というメモリスケジユールとCPUスケジユール
を組合せた資源管理方式で達成するもので、以下
図面を用いて詳細に説明する。
This is achieved using a resource management method that combines a memory schedule and a CPU schedule, and will be explained in detail below using the drawings.

(発明の構成および作用) 第1図は本発明の方式による一実施例の構成を
示すブロツク図で、1は実行時にプログラムPが
格納されている実メモリ(MM)でP0〜Poはプ
ログラム名、2はプログラムを格納している実メ
モリ上のプログラム格納領域で、PA0〜PAoは各
プログラムP0〜Poの一部を格納している領域、
3は各プログラムP0〜Poごとに使用中の実メモ
リ量(ワーキングセツトサイズ)WS及びそのマ
ツピング制御テーブル5へのポインタPTRを管
理するメモリ管理テーブル、4は空き実メモリ量
Eとその物理ページ番号PPAGEを管理する空き
実メモリ管理テーブル、5はプログラムの論理ペ
ージ番号LPAGEと実メモリの物理ページ番号
PPAGEの対応およびその論理ページの内容がす
でに実メモリ上の物理ページにあるかどうかを示
すフラグAをプログラムごとに管理するマツピン
グ制御テーブル、6は各実行優先度PRごとにプ
ログラムP0〜Poを管理する実行優先度管理テー
ブル、7はメモリの制御及びデータ転送を行うメ
モリ制御機構、8はプログラムを実行するための
実行部である処理装置(CPU)、9は各プログラ
ムP0〜Poの論理ページ番号LPAGEと物理ページ
番号PPAGEとの変換及びページフオルトの検出
を行なうマツピング制御機構、10はプログラム
Pの実メモリ要求時に実メモリのどの物理ページ
を与えるかを決定するページ選択機構、11は実
メモリの物理ページの内容を補助記憶装置16上
の論理ページへ転送し実メモリを空き状態とする
ページアウト制御機構、12は補助記憶装置16
上にあるプログラムの論理ページの内容を空き実
メモリへ転送し、処理装置(CPU)8が所望す
るプログラムPの論理ページの内容が入つている
物理ページをアクセス可能状態とするページイン
制御機構、13はプログラムの実行優先度を変更
する実行優先度制御機構、14は処理装置8の全
体の制御及びデータの転送を行なうCPU制御機
構、15は補助記憶装置の制御及びデータの転送
を制御する補助記憶制御装置、16はプログラム
P0〜Poの総ての論理ページが格納されている補
助記憶装置、17は実メモリ(MM)1、処理装
置(CPU)8、補助記憶装置16間でデータ転
送を行なうデータ転送路である。なおマツピング
制御テーブル5のフラグAの値は、既に論理ペー
ジの内容がどれかの物理ページにある場合には
1、無い場合には0である。
(Structure and operation of the invention) FIG. 1 is a block diagram showing the structure of an embodiment according to the method of the present invention, in which 1 is a real memory (MM) in which a program P is stored during execution, and P 0 to P o are Program name 2 is the program storage area on the real memory that stores the program, PA 0 ~ PA o are the areas that store part of each program P 0 ~ P o ,
3 is a memory management table that manages the amount of real memory in use (working set size) WS for each program P 0 to P o and the pointer PTR to its mapping control table 5; 4 is the amount of free real memory E and its physical Free real memory management table that manages the page number PPAGE, 5 is the logical page number LPAGE of the program and the physical page number of the real memory
A mapping control table that manages for each program a flag A indicating whether or not the correspondence of PPAGE and the contents of the logical page are already in a physical page on real memory; 6 is a mapping control table that manages programs P 0 to P o for each execution priority PR; 7 is a memory control mechanism that controls memory and transfers data; 8 is a processing unit (CPU) that is an execution unit for executing programs; 9 is an execution priority management table for each program P 0 to P o 10 is a mapping control mechanism that converts between the logical page number LPAGE and the physical page number PPAGE and detects page faults; 10 is a page selection mechanism that determines which physical page of real memory is given when the program P requests real memory; 11 is a page-out control mechanism that transfers the contents of the physical page of the real memory to a logical page on the auxiliary storage device 16 to make the real memory free; 12 is the auxiliary storage device 16;
a page-in control mechanism that transfers the contents of the logical page of the upper program to a free real memory and makes the physical page containing the contents of the logical page of the program P desired by the processing unit (CPU) 8 accessible; 13 is an execution priority control mechanism that changes the execution priority of a program; 14 is a CPU control mechanism that controls the entire processing device 8 and transfers data; and 15 is an auxiliary device that controls the auxiliary storage device and transfers data. Storage control device, 16 is a program
An auxiliary storage device in which all logical pages from P 0 to P o are stored; 17 is a data transfer path that transfers data between the real memory (MM) 1, the processing unit (CPU) 8, and the auxiliary storage device 16; be. Note that the value of flag A in the mapping control table 5 is 1 if the content of the logical page already exists in any physical page, and 0 if there is none.

次に動作を説明する。処理装置8は実メモリ上
のプログラム格納領域2のPAiをアクセスしつつ
処理を進める。仮想記憶システムでは、プログラ
ムP0〜Po全体は補助記憶装置16上にあり、各
プログラムPの論理ページの内容は必要となつた
時点でデータ転送路17を通じて実メモリ1上の
プログラム格納領域2のPAiにある物理ページへ
コピーされてアクセス可能状態となる。処理装置
8がプログラムをアクセスする場合には論理ペー
ジ番号LPAGEjでアクセスを行なうが、この論理
ページ番号LPAGEjは一旦マツピング制御機構9
に渡される。マツピング制御機構9は、CPU制
御機構14を介してメモリ制御機構7を起動し、
データ転送路17を通じてマツピング制御テーブ
ル5の論理ページ番号LPAGEjに対するエントリ
にあるフラグAjと物理ページ番号PPAGEjを得
る。このようにしてマツピング制御機構9はマツ
ピング制御テーブル5に従いその論理ページ番号
LPAGEjに対応する物理ページ番号PPAGEjへ変
換する。更に、その物理ページ番号LPAGEjはマ
ツピング制御機構9からCPU制御機構14を介
し、データ転送路17を通じてメモリ制御機構7
へ渡される。次に、このメモリ制御機構7はデー
タを取り出し、データ転送路17を通じて所望の
ページを処理装置8へ転送してアクセスを完了す
る。マツピング制御機構9が受け取るプログラム
の論理ページLPAGEjに対応するエントリのフラ
グAjの値が0、即ち所望の論理ページLPAGEj
内容がどの物理ページにもなかつた場合(ページ
フオルト)には、マツピング制御機構9はCPU
制御機構14にページフオルトの発生を通知す
る。
Next, the operation will be explained. The processing device 8 proceeds with the processing while accessing PA i in the program storage area 2 on the real memory. In the virtual memory system, the entire programs P 0 to P o are stored on the auxiliary storage device 16, and the contents of the logical pages of each program P are transferred to the program storage area 2 on the real memory 1 via the data transfer path 17 when needed. is copied to the physical page on PA i and becomes accessible. When the processing device 8 accesses the program, it does so using the logical page number LPAGE j , but this logical page number LPAGE j is once accessed by the mapping control mechanism 9.
passed to. The mapping control mechanism 9 activates the memory control mechanism 7 via the CPU control mechanism 14,
The flag A j and the physical page number PPAGE j in the entry for the logical page number LPAGE j of the mapping control table 5 are obtained through the data transfer path 17 . In this way, the mapping control mechanism 9 determines the logical page number according to the mapping control table 5.
Convert to physical page number PPAGE j corresponding to LPAGE j . Further, the physical page number LPAGE j is transferred from the mapping control mechanism 9 to the memory control mechanism 7 via the CPU control mechanism 14 and the data transfer path 17.
passed to. Next, this memory control mechanism 7 retrieves the data and transfers the desired page to the processing device 8 through the data transfer path 17 to complete the access. If the value of the flag A j of the entry corresponding to the logical page LPAGE j of the program received by the mapping control mechanism 9 is 0, that is, the contents of the desired logical page LPAGE j are not found in any physical page (page fault). , the mapping control mechanism 9 is the CPU
The control mechanism 14 is notified of the occurrence of a page fault.

例えば、プログラムPiの実行中にページフオル
トが起こり実メモリ要求が行なわれた場合の処理
を順を追つて説明する。
For example, the processing when a page fault occurs and a real memory request is made during the execution of program P i will be explained step by step.

() マツピング制御機構9からCPU制御機構1
4へページフオルトの発生が通知されると、
CPU制御機構14はページ選択機構10を起
動する。
() From mapping control mechanism 9 to CPU control mechanism 1
4 is notified of the occurrence of a page fault,
The CPU control mechanism 14 activates the page selection mechanism 10.

() ページ選択機構10は、CPU制御機構14
を介し、データ転送路17を通じて実メモリ上
にある空きメモリ管理テーブル4の空きメモリ
エントリEをアクセスしてチエツクする。Eの
値が0でなければ、即ち空き実メモリがあれ
ば、そのテーブルに登録されている物理ページ
を1ページ選択し、その物理ページ番号
PPAGEkとページフオルトの発生した論理ペー
ジ番号LPAGEjをページイン制御機構12へ通
知してページイン制御機構12を起動する。
() The page selection mechanism 10 is the CPU control mechanism 14
The free memory entry E of the free memory management table 4 on the real memory is accessed and checked via the data transfer path 17. If the value of E is not 0, that is, if there is free real memory, select one physical page registered in that table and set its physical page number.
The page-in control mechanism 12 is activated by notifying the page-in control mechanism 12 of PPAGE k and the logical page number LPAGE j in which the page fault has occurred.

() ()において空きメモリエントリEが0
で空きメモリがなければ、ページ選択機構10
はCPU制御機構14を介し、データ転送路1
7を通じて実メモリ上にある実行優先度管理テ
ーブル6のエントリPR0〜PRXをアクセスして
チエツクし、実行中の最低実行優先度に属する
プログラム群のうちの1つをメモリ取り上げ対
象プログラムP1として選択する。更にメモリ
管理テーブル3のP1エントリのPTR1が指して
いるマツピング制御テーブル5を見ることによ
つて、メモリ取り上げ対象プログラムP1が使
用中の物理ページのうち1ページPPAGEkを選
択してページアウト制御機構11へ、そのメモ
リ取り上げ対象プログラム各P1と選択した物
理ページ番号PPAGEkを通知してページアウト
制御機構11を起動する。但し、ページフオル
トを起こしたプログラムPi自身が最低実行優先
度に属するプログラムのうちの一つであれば、
そのプログラム自身をメモリ取り上げ対象プロ
グラムとして選択する。又、このようにページ
アウト制御機構11を起動すると同時に、メモ
リ取り上げ対象プログラム名P1を実行優先度
制御機構13にも通知して実行優先制御機構1
3を起動する。
() Free memory entry E is 0 in ()
If there is no free memory, the page selection mechanism 10
is the data transfer path 1 via the CPU control mechanism 14.
7, accesses and checks the entries PR 0 to PR Select as. Furthermore, by looking at the mapping control table 5 pointed to by PTR 1 of the P 1 entry in the memory management table 3, one page PPAGE k is selected from among the physical pages being used by the program P 1 to be taken up, and the page The page-out control mechanism 11 is notified of each program P 1 to be taken up from memory and the selected physical page number PPAGE k , and the page-out control mechanism 11 is activated. However, if the program P i that caused the page fault is one of the programs that belong to the lowest execution priority,
The program itself is selected as the program to be memory taken. Moreover, at the same time as starting the page-out control mechanism 11 in this way, the execution priority control mechanism 13 is also notified of the program name P 1 to be taken up from memory, and the execution priority control mechanism 1
Start 3.

() 実行優先度制御機構13は、実メモリ1が
低使用率でメモリ不足状態でない場合には、ど
のプログラムも設定されないところのシステム
中で最も低い実行優先度PRXにメモリ取り上げ
対象プログラムP1を設定するために、CPU制
御機構14を介し、データ転送路17を通じて
メモリ取り上げ対象プログラム名P1を実行優
先度管理テーブル6のPRXエントリへ登録す
る。このため、メモリ取り上げ対象プログラム
は、他の総てのプログラムが走行しない場合の
み走行し、しかもそのプログラムのページフオ
ルトはそのプログラムが走行中、即ち、他のど
のプログラムも処理装置8及びI/Oを使用し
ていない間に起こるので、ページフオルト多発
による処理装置8及びI/O負荷の上昇が他の
プログラムの実行へ影響を与えることはない。
() When the real memory 1 has a low usage rate and is not in a memory shortage state, the execution priority control mechanism 13 sets the memory takeover target program P 1 to the lowest execution priority PR X in the system where no program is set. In order to set , the name of the program to be taken up from memory P 1 is registered in the PR X entry of the execution priority management table 6 via the CPU control mechanism 14 and the data transfer path 17 . Therefore, the program targeted for memory takeover runs only when all other programs are not running, and the page fault of that program occurs while the program is running, that is, when all other programs are running on the processing unit 8 and Since this occurs while O is not being used, an increase in the processing device 8 and I/O load due to frequent page faults does not affect the execution of other programs.

() ページアウト制御機構11は、()で通
知された物理ページPPAGEkの内容をメモリ制
御機構7と補助記憶制御装置15に起動をか
け、データ転送路17を通じて実メモリ1から
補助記憶装置16へ転送する。この転送の完了
後、この処理によつて空きとなつた物理ページ
番号PPAGEkとプログラムPiがページフオルト
を起した論理ページ番号LPAGEjを、既に空き
メモリがあつた()の場合と同様に、ページ
イン制御機構12へ通知してページイン制御機
構12に起動をかける。
() The page-out control mechanism 11 activates the contents of the physical page PPAGE k notified in () to the memory control mechanism 7 and the auxiliary storage control device 15, and transfers the contents from the real memory 1 to the auxiliary storage device 16 through the data transfer path 17. Transfer to. After this transfer is completed, the physical page number PPAGE k that became free due to this process and the logical page number LPAGE j where the program P i caused the page fault are transferred in the same way as when there is already free memory (). Then, the page-in control mechanism 12 is notified and the page-in control mechanism 12 is activated.

() ページイン制御機構12は、CPU制御機構
14を介してメモリ制御機構7と補助記憶装置
15に起動をかけることにより、データ転送路
17を通じて補助記憶装置16からプログラム
Piがページフオルトを起こして要求して論理ペ
ージLPAGEjの内容を前記実ページPPAGEk
コピーしアクセス可能状態とする。更に、
CPU制御機構14を介し、データ転送路17
を通じてマツピング制御テーブル5の論理ペー
ジ番号LPAGEjのエントリに物理ページ番号
PPAGEkを設定すると共に、そのエントリのフ
ラグAjを1として実メモリ内に既にその論理
ページの内容が存在する事を示す。次にページ
イン制御機構12は所望のページがアクセス可
能状態となつたことをCPU制御機構14へ通
知して総てのページフオルト処理を完了する。
() The page-in control mechanism 12 activates the memory control mechanism 7 and the auxiliary storage device 15 via the CPU control mechanism 14, thereby transferring the program from the auxiliary storage device 16 through the data transfer path 17.
P i causes a page fault and makes a request to copy the contents of logical page LPAGE j to the real page PPAGE k , making it accessible. Furthermore,
Data transfer path 17 via CPU control mechanism 14
Through mapping control table 5 logical page number LPAGE j entry to physical page number
PPAGE k is set, and the flag A j of the entry is set to 1 to indicate that the contents of the logical page already exist in the real memory. Next, the page-in control mechanism 12 notifies the CPU control mechanism 14 that the desired page has become accessible, and completes all page fault processing.

第2図はこれらの処理フローチヤートに示す。 FIG. 2 shows a flowchart of these processes.

以上本発明の一実施例の説明を行なつたが、本
発明の趣旨は各プログラムの必要実メモリ量の総
和がシステムの全実メモリ量を越える際には、 最低実行優先度に属するプログラムの1つか
ら不足ページ分だけの使用中実メモリを選択
し、補助記憶装置へその内容を転送する事によ
つて空きメモリを作り実メモリの不足している
他プログラムへ与えるが、残りは与えたままと
して上記メモリ取り上げ対象プログラムを実行
可能とし、 そのメモリ取り上げ対象プログラムのページ
フオルトの際には、そのプログラムの使用中実
メモリ量を越えてメモリを与えない事により高
優先度プログラムの使用中実メモリを奪う事を
防止して高実行優先度プログラムでのスラツシ
ング発生を抑止し、 上記メモリ取り上げ対象プログラムをシステ
ム中で唯一つの最低実行優先度に設定し他のよ
り高い実行優先度のプログラムが処理装置8、
補助記憶制御装置(チヤンネル)15を使用し
ない時のみ、これら残りのシステム資源を上記
プログラムへ与えて、そのプログラムで多発す
るページフオルト処理のためのシステム資源の
使用が、高実行優先度プログラムの実行妨害を
引き起こさないようにする。
An embodiment of the present invention has been described above, but the gist of the present invention is that when the total amount of real memory required by each program exceeds the total amount of real memory of the system, the program belonging to the lowest execution priority is Selects the actual memory in use for the missing pages from one program and transfers its contents to the auxiliary storage device to create free memory and give it to other programs that lack real memory, but gives the rest. If the above program to be taken memory is executable as it is, and if a page fault occurs in the program to be taken memory, by not giving memory in excess of the amount of real memory being used by that program, it will be possible to execute the program to be taken up by a high-priority program. This prevents real memory from being taken and suppresses the occurrence of thrashing in high-priority programs, and sets the program targeted for memory take-up as the only one with the lowest execution priority in the system, allowing other programs with higher execution priorities to processing device 8,
Only when the auxiliary storage control unit (channel) 15 is not used, these remaining system resources are given to the above program, and the use of system resources for handling page faults that occur frequently in that program is reduced to high execution priority programs. Avoid causing execution blockage.

というメモリスケジユールと処理装置スケジユー
ルを組合せた総合的資源管理方式にある。
This is a comprehensive resource management method that combines a memory schedule and a processing unit schedule.

(効果) 以上説明したように、本発明によれば、メモリ
負荷が高く最低実行優先度プログラムのワーキン
グセツトサイズが満たされない場合でも、そのプ
ログラムの使用している全実メモリをスワツプア
ウトせずに常に高優先度プログラムの使用する実
メモリを除いた残りのメモリだけを使用し、かつ
他の総ての高優先度プログラムが処理装置を使用
しない時に走行する様に最低実行優先度プログラ
ムへの資源配分を行うため、従来方式のようにプ
ログラムが全く走行しない事がなくなり処理効率
が向上する。
(Effects) As explained above, according to the present invention, even if the memory load is high and the working set size of a program with the lowest execution priority is not satisfied, all real memory used by that program can always be swapped out. Resource allocation to the lowest execution priority program so that it uses only the remaining memory, excluding the real memory used by the high priority program, and runs when all other high priority programs are not using the processing unit. This eliminates the need for the program to run at all, which is the case with conventional methods, and improves processing efficiency.

特に、従来の制御方式では走行困難であつた実
行優先度が低く、走行すれば必ずメモリ不足状態
に陥る程に実メモリを多量に必要とするプログラ
ムが、本制御方式で実行可能となる。更に、シス
テムが高メモリ負荷となりスラツシング状態に陥
つた場合でも、最低実行優先度プログラムから順
に他プログラムの不足分だけ実メモリが取り上げ
られてゆき最低実行優先度プログラムは常に他プ
ログラムの使用した残りの資源だけで実行される
ので、自動的に低実行優先度プログラムの停止が
行われ、かつメモリ負荷が下がれば自動的に低実
行優先度プログラムへ実メモリが与えられて再起
動される。しかも、従来の様な高優先度プログラ
ムの実行妨害阻止を目的とする低優先度プログラ
ムの停止や、再びシステムのメモリ負荷が下がつ
た場合の低優先度プログラムの再起動等を行うシ
ステム運転者介入が不必要となるという利点もあ
る。
In particular, programs that have low execution priority and require a large amount of real memory to the extent that running them will inevitably lead to a memory shortage state, which would be difficult to run using conventional control methods, can now be executed using this control method. Furthermore, even if the system falls into a thrashing state due to a high memory load, real memory will be taken up in order from the program with the lowest execution priority to the amount that other programs lack, and the program with the lowest execution priority will always take up the remaining memory used by other programs. Since it is executed using only resources, the low execution priority program is automatically stopped, and when the memory load decreases, real memory is automatically given to the low execution priority program and restarted. In addition, system operators have to stop low-priority programs to prevent interference with the execution of high-priority programs, or restart low-priority programs when the system memory load drops again. Another advantage is that no intervention is required.

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

第1図は本発明の方式による一実施例の構成を
示すブロツク図、第2図は本発明の処理のフロー
チヤートである。 1……実メモリ、2……プログラム格納領域、
3……メモリ管理テーブル、4……空き実メモリ
管理テーブル、5……マツピング制御テーブル、
6……実行優先度管理テーブル、7……メモリ制
御機構、8……処理装置、9……マツピング制御
機構、10……ページ選択機構、11……ページ
アウト制御機構、12……ページイン制御機構、
13……実行優先度制御機構、14……CPU制
御機構、15……補助記憶制御装置、16……補
助記憶装置、17……データ転送路。
FIG. 1 is a block diagram showing the configuration of an embodiment according to the method of the present invention, and FIG. 2 is a flowchart of the processing of the present invention. 1...Real memory, 2...Program storage area,
3... Memory management table, 4... Free real memory management table, 5... Mapping control table,
6... Execution priority management table, 7... Memory control mechanism, 8... Processing device, 9... Mapping control mechanism, 10... Page selection mechanism, 11... Page out control mechanism, 12... Page in control mechanism,
13... Execution priority control mechanism, 14... CPU control mechanism, 15... Auxiliary storage control device, 16... Auxiliary storage device, 17... Data transfer path.

Claims (1)

【特許請求の範囲】[Claims] 1 マルチプログラムで動作し、各プログラムは
実行優先度に従つて実行される仮想記憶方式の情
報処理システムにおいて、同時に実行されている
複数の順次プログラムの間に実メモリの割当てを
行う場合に、各プログラムの実行優先度順に各プ
ログラムに実メモリを総て割当ててゆき、残りの
実メモリ量が次に割当てるべきプログラムの必要
実メモリ量を下まわつた際には残りの実メモリ量
だけを与える機構と、割当てた実メモリ量が必要
実メモリ量を下まわつたプログラムの実行優先度
をシステム中で最低の実行優先度に設定して、実
メモリ不足による実メモリの奪い合いを原因とし
て発生する実メモリと補助記憶装置間のメモリ内
容の転送頻発が引き起こすプログラム実行不可能
状態(スラツシング)を抑止する機構を備える事
を特徴とする資源管理方式。
1 In a virtual memory information processing system that operates with multiple programs and each program is executed according to its execution priority, when allocating real memory between multiple sequential programs that are being executed simultaneously, each A mechanism that allocates all real memory to each program in order of program execution priority, and when the amount of remaining real memory is less than the amount of real memory required by the next program to be allocated, only the remaining amount of real memory is given. Then, the execution priority of the program whose allocated real memory is less than the required real memory is set to the lowest execution priority in the system, and the real memory that occurs due to real memory competition due to lack of real memory is set to the lowest execution priority in the system. A resource management method characterized by having a mechanism for suppressing a state in which a program cannot be executed (thrashing) caused by frequent transfer of memory contents between a storage device and an auxiliary storage device.
JP58145752A 1983-08-11 1983-08-11 Resource managing system Granted JPS6039248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58145752A JPS6039248A (en) 1983-08-11 1983-08-11 Resource managing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58145752A JPS6039248A (en) 1983-08-11 1983-08-11 Resource managing system

Publications (2)

Publication Number Publication Date
JPS6039248A JPS6039248A (en) 1985-03-01
JPH0324697B2 true JPH0324697B2 (en) 1991-04-03

Family

ID=15392333

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58145752A Granted JPS6039248A (en) 1983-08-11 1983-08-11 Resource managing system

Country Status (1)

Country Link
JP (1) JPS6039248A (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63257047A (en) * 1987-04-15 1988-10-24 Agency Of Ind Science & Technol Information processor
US5247687A (en) * 1990-08-31 1993-09-21 International Business Machines Corp. Method and apparatus for determining and using program paging characteristics to optimize system productive cpu time
JP4728581B2 (en) * 2004-02-03 2011-07-20 日本電気株式会社 Array type processor
JP4502650B2 (en) * 2004-02-03 2010-07-14 日本電気株式会社 Array type processor

Also Published As

Publication number Publication date
JPS6039248A (en) 1985-03-01

Similar Documents

Publication Publication Date Title
US4730249A (en) Method to operate on large segments of data in a virtual memory data processing system
US5983324A (en) Data prefetch control method for main storage cache for protecting prefetched data from replacement before utilization thereof
EP0239181B1 (en) Interrupt requests serializing in a virtual memory data processing system
US4967353A (en) System for periodically reallocating page frames in memory based upon non-usage within a time period or after being allocated
JP4160255B2 (en) Application programming interface that controls the allocation of physical memory in a virtual storage system by an application program
US7313797B2 (en) Uniprocessor operating system design facilitating fast context switching
US5884077A (en) Information processing system and method in which computer with high load borrows processor of computer with low load to execute process
USRE36462E (en) Method to control paging subsystem processing in virtual memory data processing system during execution of critical code sections
JP3226525B2 (en) Main memory management method
US6487630B2 (en) Processor with register stack engine that dynamically spills/fills physical registers to backing store
US20120198184A1 (en) Memory management method, computer system and computer readable medium
JP3701135B2 (en) Data processing device
JPH0324697B2 (en)
US8010963B2 (en) Method, apparatus and program storage device for providing light weight system calls to improve user mode performance
CN116225693A (en) Metadata management method, device, computer equipment and storage medium
JPS6336538B2 (en)
CN115098258B (en) Forth multitask scheduling method and device based on multi-core stack processor
JPH0522261B2 (en)
JP3013735B2 (en) Memory management method
JP2535584B2 (en) Real memory fixed processing computer
JPH06266619A (en) Page saving/restoring device
Rees et al. The kernel of the EMAS 2900 operating system
JPS62224845A (en) Virtual storage system
JP2000347939A (en) System and method for managing memory
JPS61139842A (en) Save control system of program