JP2003263366A - Swapping control method, its execution device and its processing program - Google Patents

Swapping control method, its execution device and its processing program

Info

Publication number
JP2003263366A
JP2003263366A JP2002066279A JP2002066279A JP2003263366A JP 2003263366 A JP2003263366 A JP 2003263366A JP 2002066279 A JP2002066279 A JP 2002066279A JP 2002066279 A JP2002066279 A JP 2002066279A JP 2003263366 A JP2003263366 A JP 2003263366A
Authority
JP
Japan
Prior art keywords
pages
swap
area
program
storage device
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
JP2002066279A
Other languages
Japanese (ja)
Inventor
Yuri Hiraiwa
友理 平岩
Hirofumi Nagasuga
弘文 長須賀
Masahiro Kiyoi
雅広 清井
Akira Otsuji
彰 大辻
Naoko Ikegaya
直子 池ヶ谷
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2002066279A priority Critical patent/JP2003263366A/en
Publication of JP2003263366A publication Critical patent/JP2003263366A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technology capable of reducing the absolute quantity of data transfer when executing swapping, and thereby improving throughput of an actual work and a response time. <P>SOLUTION: This method has a step for setting the difference between a prescribed threshold and the number of blank pages in a main storage as the number of pages which are swap-out objects in the case where the number of blank pages in the main storage is below the prescribed threshold when swap-out is required, a step for stopping processing of a program of the swap- out object as the need arises to swap-out requirement, to thereby set the program in the state where a CPU is not allocated thereto, a step for saving the pages of the set number of pages in a swap-out region and releasing the saved pages in the main storage, a step for securing the pages in the main storage and recovering the pages saved in the swap-out region when swap-in is required, and a step for resuming processing of the program of a swap-in object, to thereby set the program in the state where the CPU is allocated thereto. <P>COPYRIGHT: (C)2003,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は主記憶装置と補助記
憶装置とを具備し、仮想記憶方式におけるスワッピング
を制御する計算機システムに関し、特にアドレス幅が拡
張された場合のスワッピングを効率的に行う計算機シス
テムに適用して有効な技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system having a main memory device and an auxiliary memory device for controlling swapping in a virtual memory system, and more particularly to a computer system for efficiently performing swapping when an address width is expanded. It is related to the technology effectively applied to the system.

【0002】[0002]

【従来の技術】従来の計算機システムでは、そのシステ
ム上で実行する業務処理の効率化の為に、アドレス幅を
拡張し、システム上に展開できる仮想記憶サイズの拡大
や、システム上で利用できる実記憶サイズの拡大を図っ
ている。
2. Description of the Related Art In a conventional computer system, in order to improve the efficiency of business processing executed on the system, the address width is expanded, the virtual memory size that can be expanded on the system is expanded, and the actual computer that can be used on the system is expanded. We are trying to expand the memory size.

【0003】計算機システム上に展開される仮想記憶の
総容量が、実装された実記憶装置の容量よりも小さけれ
ば、全ての仮想記憶域を実記憶装置上に配置することが
できるが、一般的には仮想記憶容量の方が大きい。
If the total capacity of the virtual memory expanded on the computer system is smaller than the capacity of the mounted real memory device, all virtual memory areas can be allocated on the real memory device. Has a larger virtual memory capacity.

【0004】そこで、仮想記憶容量が実記憶容量よりも
大きいシステムにおいて、オペレーティングシステム
は、仮想記憶を実記憶装置と補助記憶装置を用いて展開
し、個々のプログラムの実行時に必要な仮想記憶域を実
記憶装置上に配置し、不要な仮想記憶域を補助記憶装置
上に配置する仮想記憶方式を採用している。この様な仮
想記憶域の動的な配置は、ページングやスワッピングと
いった操作によって実現される。ここで、ページングと
は、実記憶装置の管理サイズ単位に、実記憶装置と補助
記憶装置との間でデータを転送する操作であり、また、
スワッピングとは、多重の仮想記憶空間を配置すること
が可能な計算機システムにおいて、個々の空間単位に動
的に配置場所を決定する操作である。
Therefore, in a system in which the virtual memory capacity is larger than the actual memory capacity, the operating system expands the virtual memory by using the actual memory device and the auxiliary memory device, and allocates the virtual memory area necessary for executing each program. A virtual storage system is adopted in which an unnecessary virtual storage area is placed on an auxiliary storage device by allocating it on a real storage device. Such dynamic allocation of virtual storage areas is realized by operations such as paging and swapping. Here, paging is an operation of transferring data between the real storage device and the auxiliary storage device in units of the management size of the real storage device.
Swapping is an operation of dynamically deciding an arrangement location for each space unit in a computer system capable of arranging multiple virtual storage spaces.

【0005】この様な仮想記憶方式では、複数存在する
仮想記憶空間を特開昭62−296237号公報で示さ
れる様な多重度制御によりスワッピングを行い、複数の
プログラムの実行が可能な環境を提供している。
In such a virtual memory system, a plurality of virtual memory spaces are swapped by the multiplicity control as disclosed in Japanese Patent Laid-Open No. 62-296237 to provide an environment in which a plurality of programs can be executed. is doing.

【0006】しかし、総仮想記憶容量と実装実記憶容量
の比を一定としたままでシステム規模を拡大すると、上
記ページングや上記スワッピングといった実記憶装置と
補助記憶装置間でのデータ転送の絶対量が増加し、オペ
レーティングシステムの処理オーバーヘッドは膨大なも
のになる。特に、急激にページングやスワッピング量が
増加すると、それに伴い実業務のスループットや応答時
間を急激に劣化させる要因となる為、これを回避しなけ
ればならない。
However, if the system scale is expanded while keeping the ratio of the total virtual memory capacity and the mounted actual memory capacity constant, the absolute amount of data transfer between the actual memory device and the auxiliary memory device such as the paging and the swapping described above will be increased. And the operating system processing overhead is enormous. In particular, if the paging or swapping amount increases abruptly, it may cause the throughput or response time of the actual work to deteriorate sharply, which must be avoided.

【0007】すなわち、上述した様な、アドレス幅を拡
張し、規模を拡大した計算機システムでは、ページング
やスワッピングによる実記憶装置と補助記憶装置間のデ
ータ転送に関して、これらデータ転送の絶対量を軽減す
る手法や、データ転送の発生頻度を分散させる手法が必
要となる。
That is, in the computer system in which the address width is expanded and the scale is expanded as described above, regarding the data transfer between the real storage device and the auxiliary storage device by paging or swapping, the absolute amount of these data transfers is reduced. A method and a method of distributing the frequency of data transfer are required.

【0008】こうした技術課題を解決する為の手法とし
て、特開平5−61774号公報に記載の技術がある。
特開平5−61774号公報では、スワップアウトする
仮想記憶空間の仮想記憶域を、複数のグループに分割
し、そのグループ単位に分けて補助記憶装置にデータ転
送することにより、スワップアウトの負荷を分散する方
法を開示している。
As a method for solving such a technical problem, there is a technique described in Japanese Patent Laid-Open No. 5-61774.
In Japanese Patent Laid-Open No. 5-61774, the virtual storage area of the virtual storage space to be swapped out is divided into a plurality of groups, and the data is transferred to the auxiliary storage device in units of the groups to distribute the swap-out load. The method of doing is disclosed.

【0009】同様に、上記課題を解決する為の手法とし
て、特開平5−94315号公報に記載されている論理
スワッピングがある。特開平5−94315号公報で
は、予め、スワップアウト可能な仮想記憶空間の候補を
挙げておき、実記憶装置の利用率が高くなった時に、実
際に当該仮想記憶空間が利用している実記憶域のデータ
を補助記憶装置にデータ転送する方法を開示している。
Similarly, as a method for solving the above problem, there is a logical swapping method disclosed in Japanese Patent Laid-Open No. 5-94315. In Japanese Patent Laid-Open No. 5-94315, candidates for virtual storage spaces that can be swapped out are listed in advance, and when the utilization rate of a real storage device becomes high, the real storage actually used by the virtual storage space is increased. A method of transferring data in a region to an auxiliary storage device is disclosed.

【0010】[0010]

【発明が解決しようとする課題】前記の様にアーキテク
チャの拡張によりアドレス幅が拡張されると仮想記憶容
量の増加によりプログラムサイズが大きくなってスワッ
ピングの際のデータ転送の絶対量が増大する。また、シ
ステム規模が拡大されると、プログラムが処理するため
に実記憶装置上に配置するデータの増加により、前記同
様スワッピングの際のデータ転送の絶対量が増大する。
上記の従来の技術では、これらの場合のスワッピング量
増大化を抑制する為の考慮がなされていなかった。
As described above, when the address width is expanded by the expansion of the architecture, the program size becomes large due to the increase of the virtual memory capacity, and the absolute amount of data transfer at the time of swapping increases. Further, when the system scale is expanded, the absolute amount of data transfer at the time of swapping is increased due to an increase in data arranged on the real storage device for processing by the program.
In the above-mentioned conventional techniques, no consideration is given to suppressing the increase in the swapping amount in these cases.

【0011】またアドレス幅が拡張されたシステムで、
拡張前に作成されたプログラムを変更せずに動作させる
為には、そのプログラムが動作時にアクセスする領域
を、そのプログラムが表現できるアドレス幅の領域に配
置しなければならない。特に、プログラムが利用する仮
想記憶域を実記憶装置上に常駐化して当該領域を実記憶
装置上のアドレスでアクセスする様な場合に備え、常駐
化が行われる場合にはそのプログラムがアクセスできる
アドレス幅の領域に当該ページを配置しなければならな
い。
Further, in the system in which the address width is expanded,
In order to operate the program created before expansion without changing it, the area accessed by the program at the time of operation must be arranged in the area having the address width that can be expressed by the program. In particular, in case the virtual storage area used by the program is made resident on the real storage device and the area is accessed by an address on the real storage device, an address that can be accessed by the program when the resident storage is made The page must be placed in the width area.

【0012】この様に、実記憶及び仮想記憶のアドレス
幅が拡張されたとしても、全てのプログラムが拡張され
た領域を制限無く利用できるわけではない。特に、実記
憶に関しては、アドレス幅の拡張を行う前に作成された
プログラムの動作を保証する為に、小さなアドレス幅で
表現できる第一の領域の利用率が、それ以外の第二の領
域に比べて高くなることが想定できる。
As described above, even if the address widths of the real memory and the virtual memory are expanded, not all programs can use the expanded area without limitation. In particular, regarding the actual storage, in order to guarantee the operation of the program created before expanding the address width, the utilization rate of the first area that can be expressed with a small address width is It can be expected to be higher than that.

【0013】そして、大きなアドレス幅で表現する領域
の利用率が低いにもかかわらず、こうした局所的な負荷
の増加の為にスワッピングが発生し、システム全体とし
ては、この操作の為の入出力動作が増大化するという課
題が発生する。
Despite the low utilization rate of the area expressed by a large address width, swapping occurs due to such a local load increase, and the input / output operation for this operation is performed as a whole system. Will increase.

【0014】本発明の目的は上記問題を解決し、スワッ
ピングを行う際のデータ転送の絶対量を低減させ、それ
により実業務のスループット及び応答時間を向上させる
ことが可能な技術を提供することにある。
An object of the present invention is to solve the above problems and to provide a technique capable of reducing the absolute amount of data transfer at the time of swapping and thereby improving the throughput and response time of actual work. is there.

【0015】本発明の他の目的は特定のアドレス幅で表
現される特定の領域のみで動作可能なプログラムのスワ
ッピングに必要なデータ転送時間を短縮し、それにより
実業務のスループット及び応答時間を向上させることが
可能な技術を提供することにある。
Another object of the present invention is to reduce the data transfer time required for swapping a program which can operate only in a specific area expressed by a specific address width, thereby improving the throughput and response time of actual work. It is to provide the technology that can be done.

【0016】[0016]

【課題を解決するための手段】本発明は、主記憶装置と
補助記憶装置とを具備し、仮想記憶方式におけるスワッ
ピングを制御する計算機システムにおいて、スワッピン
グが要求された場合に所定の閾値と主記憶装置の空きペ
ージ数との差分で設定されたページ数のページについて
スワッピングを行うものである。
According to the present invention, there is provided a computer system comprising a main memory device and an auxiliary memory device for controlling swapping in a virtual memory system, wherein a predetermined threshold value and a main memory are used when swapping is requested. Swapping is performed for pages of the number of pages set by the difference from the number of empty pages of the device.

【0017】本発明の計算機システムでは、スワップア
ウトが要求されると、主記憶装置の空きページ数が所定
の閾値未満であるかどうかを調べ、前記空きページ数が
所定の閾値未満である場合には、その所定の閾値と主記
憶装置の空きページ数との差分をスワップアウト対象の
ページ数として設定する。
In the computer system of the present invention, when swap-out is requested, it is checked whether the number of free pages in the main storage device is less than a predetermined threshold, and if the number of free pages is less than the predetermined threshold, Sets the difference between the predetermined threshold and the number of free pages in the main storage device as the number of pages to be swapped out.

【0018】次に、スワップアウト要求に対して必要に
応じてスワップアウト対象のプログラムの処理を停止さ
せて当該プログラムをCPUの割り当てが行われない状
態にした後、前記設定されたページ数のページをスワッ
プアウト領域へ退避すると共に、その退避された主記憶
装置上のページの解放を行う。
Next, after the processing of the swap-out target program is stopped as necessary in response to the swap-out request to put the program in a state in which the CPU is not allocated, the page of the set number of pages is set. Is saved in the swap-out area, and the saved page in the main storage device is released.

【0019】そして、スワップインが要求された場合に
は、主記憶装置上のページを確保した後、前記スワップ
アウト領域へ退避されたページをその確保した主記憶装
置上のページへ回復し、スワップイン対象のプログラム
の処理を再開させて当該プログラムをCPUの割り当て
が行われる状態にする。
When swap-in is requested, after securing a page in the main storage device, the page saved in the swap-out area is restored to the secured page in the main storage device and swapped. The process of the in-target program is restarted to bring the program into a state in which the CPU is assigned.

【0020】前記の様に本発明では、主記憶装置の空き
ページ不足を解消する為に必要なページ数分のデータを
スワッピング領域に退避し、一部のページについては引
き続き主記憶装置上に保持するので、スワッピングを行
う場合に、データ転送の絶対量を低減させ、それにより
実業務のスループット及び応答時間を向上させることが
できる。
As described above, according to the present invention, the data for the number of pages necessary for resolving the shortage of empty pages in the main memory is saved in the swapping area, and some pages are retained in the main memory. Therefore, when swapping is performed, it is possible to reduce the absolute amount of data transfer, thereby improving the throughput and response time of actual work.

【0021】また本発明では、スワップアウトが要求さ
れた際に、特定のアドレス幅で表現される主記憶装置の
第一の領域における空きページ数が所定の閾値未満であ
り、前記第一の領域よりも上位のアドレスに位置する第
二の領域における空きページ数が前記設定されたページ
数以上である場合にスワップアウト領域を前記第二の領
域とし、スワップアウト対象のページを第二の領域の空
きページへ移動させる中間スワッピングを行う。
Further, according to the present invention, when swap-out is requested, the number of empty pages in the first area of the main memory represented by a specific address width is less than a predetermined threshold, and the first area is If the number of free pages in the second area located at a higher address is equal to or more than the set number of pages, the swap-out area is set as the second area, and the page targeted for swap-out is set as the second area. Perform intermediate swapping to move to a free page.

【0022】この様に本発明では、特定のアドレス幅で
表現される主記憶装置の第一の領域の空きが不足し、そ
れ以外の第二の領域に空きがある場合に、第一の領域の
ページを第二の領域に移動させる中間スワッピングを行
うので、特定のアドレス幅で表現される第一の領域のみ
で動作可能なプログラムのスワッピングに必要なデータ
転送時間を短縮し、それにより実業務のスループット及
び応答時間を向上させることができる。
As described above, according to the present invention, when there is insufficient free space in the first area of the main memory represented by a specific address width, and there is free space in the other second area, the first area Since the intermediate swapping that moves the page of the second area to the second area is performed, the data transfer time required for swapping the program that can operate only in the first area expressed by a specific address width is shortened, and the actual business Throughput and response time can be improved.

【0023】以上の様に本発明の計算機システムによれ
ば、スワッピングが要求された場合に所定の閾値と主記
憶装置の空きページ数との差分で設定されたページ数の
ページについてスワッピングを行うので、スワッピング
を行う際のデータ転送の絶対量を低減させ、それにより
実業務のスループット及び応答時間を向上させることが
可能である。
As described above, according to the computer system of the present invention, when the swapping is requested, the swapping is performed for the page of the number of pages set by the difference between the predetermined threshold value and the number of empty pages of the main storage device. , It is possible to reduce the absolute amount of data transfer when performing swapping, thereby improving the throughput and response time of actual work.

【0024】[0024]

【発明の実施の形態】以下に主記憶装置と補助記憶装置
とを具備し、仮想記憶方式におけるスワッピングを制御
する一実施形態の計算機システムについて説明する。本
実施形態では、スワップアウトの際に補助記憶に出力す
る従来のスワップアウトを物理スワップアウト、本発明
で新設した、主記憶装置上の第一の領域から第二の領域
へ移動させるスワップアウトを中間スワップアウトと呼
ぶものとして説明を行う。また、スワッピングに伴って
空間に割り当てられたページの退避・回復を補助記憶に
対して行い、必要に応じて主記憶装置のページの解放・
確保を行う処理は、従来のスワッピングの中で行ってい
た処理と同様であり、スワッピングの要求を出す処理に
ついては、従来技術で示したものと同様であるものとす
る。
BEST MODE FOR CARRYING OUT THE INVENTION A computer system of one embodiment, which comprises a main memory device and an auxiliary memory device and controls swapping in a virtual memory system, will be described below. In the present embodiment, the conventional swap-out that is output to the auxiliary storage at the time of swap-out is physical swap-out, and the swap-out that is newly created by the present invention to move from the first area to the second area on the main storage device is The explanation will be given assuming that it is called an intermediate swap-out. In addition, the pages allocated to the space due to swapping are saved / recovered in the auxiliary storage, and the pages in the main storage device are released / recovered as necessary.
The securing process is similar to the process performed in the conventional swapping, and the swapping request process is similar to the process shown in the related art.

【0025】図1は本実施形態の計算機システムの概略
構成を示す図である。図1に示す様に本実施形態の計算
機1000は、スワッピング管理部600と、空間非活
性化部700と、主記憶割り当て部800と、空間活性
化部900とを有している。
FIG. 1 is a diagram showing a schematic configuration of a computer system of this embodiment. As shown in FIG. 1, the computer 1000 of this embodiment has a swapping management unit 600, a space deactivation unit 700, a main memory allocation unit 800, and a space activation unit 900.

【0026】スワッピング管理部600は、スワップア
ウトが要求された際に主記憶装置の空きページ数が所定
の閾値未満である場合に、その所定の閾値と主記憶装置
の空きページ数との差分をスワップアウト対象のページ
数として設定する処理部である。
When the swap-out request is made and the number of free pages in the main storage device is less than the predetermined threshold value, the swapping management unit 600 determines the difference between the predetermined threshold value and the number of free pages in the main storage device. This is a processing unit that is set as the number of pages to be swapped out.

【0027】空間非活性化部700は、スワップアウト
要求に対して必要に応じてスワップアウト対象のプログ
ラムの処理を停止させて当該プログラムをCPU110
0の割り当てが行われない状態にする処理部である。
The space deactivating unit 700 suspends the processing of the swap-out target program as necessary in response to the swap-out request, and executes the program concerned in the CPU 110.
This is a processing unit that sets a state in which 0 is not assigned.

【0028】主記憶割り当て部800は、スワップアウ
トが要求された場合に、前記設定されたページ数のペー
ジのスワップアウト領域への退避及びその退避された主
記憶装置上のページの解放を行い、スワップインが要求
された場合に、主記憶装置上のページの確保及び前記ス
ワップアウト領域へ退避されたページの回復を行う処理
部である。空間活性化部900は、スワップイン対象の
プログラムの処理を再開させて当該プログラムをCPU
1100の割り当てが行われる状態にする処理部であ
る。
When a swap-out is requested, the main memory allocation unit 800 saves the set number of pages to the swap-out area and releases the saved page in the main memory, This is a processing unit that secures a page on the main storage device and recovers the page saved in the swap-out area when swap-in is requested. The space activation unit 900 restarts the processing of the swap-in target program and executes the program to the CPU.
1100 is a processing unit that makes a state in which allocation is performed.

【0029】スワッピング管理部600は、入力パラメ
タ200を基に中間スワップアウト等の処理の切り分け
を行う。空間非活性化部700は、中間スワップアウト
要求であった場合にスワッピング管理部600から処理
を渡され、対象となる空間で発生した処理中の入出力を
停止させ、ジョブを停止させてCPU1100の割り当
てが行われない様にし、スワップアウトできる状態にす
る。
The swapping management unit 600 separates processing such as intermediate swap-out based on the input parameter 200. The space deactivating unit 700 receives a process from the swapping managing unit 600 when the request is an intermediate swap-out request, stops the input / output being processed in the target space, stops the job, and stops the job. Prevents allocation from happening and allows swapout.

【0030】主記憶割り当て部800は、空間非活性化
部700またはスワッピング管理部600から処理を渡
され、対象となる空間に割り当てられたページの情報の
退避又は回復を補助記憶装置1600に対して行い、そ
れに合わせてページの解放又は確保を行う。空間活性化
部900は、スワップイン要求であった場合に主記憶割
り当て部800の後に処理を渡され、対象となる空間で
実行中のジョブを再開させてCPU1100の割り当て
を可能にし、空間非活性化部700で処理を停止させた
入出力を再開させる。
The main memory allocation unit 800 receives the processing from the space deactivation unit 700 or the swapping management unit 600, and saves or restores the information of the page allocated to the target space to the auxiliary storage device 1600. The page is released or secured accordingly. In the case of a swap-in request, the space activation unit 900 is passed processing after the main memory allocation unit 800, restarts the job being executed in the target space, enables allocation of the CPU 1100, and space inactivation. The input / output for which the processing has been stopped by the conversion unit 700 is restarted.

【0031】計算機1000をスワッピング管理部60
0、空間非活性化部700、主記憶割り当て部800及
び空間活性化部900として機能させる為のプログラム
は、CD−ROM等の記録媒体に記録され磁気ディスク
等に格納された後、メモリにロードされて実行されるも
のとする。なお前記プログラムを記録する記録媒体はC
D−ROM以外の他の記録媒体でも良い。また前記プロ
グラムを当該記録媒体から情報処理装置にインストール
して使用しても良いし、ネットワークを通じて当該記録
媒体にアクセスして前記プログラムを使用するものとし
ても良い。
The swapping management unit 60 is used for the computer 1000.
0, the program for functioning as the space deactivating unit 700, the main memory allocating unit 800, and the space activating unit 900 is recorded on a recording medium such as a CD-ROM and stored in a magnetic disk or the like, and then loaded into a memory. Shall be executed. The recording medium for recording the program is C
A recording medium other than the D-ROM may be used. The program may be installed in the information processing apparatus from the recording medium and used, or the recording medium may be accessed through the network to use the program.

【0032】図1では本実施形態の計算機システムの構
成を表しており、計算機1000は、CPU1100及
び主記憶装置1200から成っている。また、計算機1
000は補助記憶装置1600を有し、主記憶装置12
00上に配置しきれない情報を補助記憶装置1600に
保持しておく。
FIG. 1 shows the configuration of a computer system according to this embodiment. A computer 1000 is composed of a CPU 1100 and a main storage device 1200. Also, calculator 1
000 has an auxiliary storage device 1600, and the main storage device 12
00 is stored in the auxiliary storage device 1600.

【0033】主記憶装置1200上に配置されたOS1
300は、CPU1100で実行され、仮想記憶空間1
500上のジョブ(ユーザープログラム)を起動し、仮
想記憶空間1500の資源管理を行う等の作業をする。
仮想記憶空間1500は、主記憶装置1200上に複数
配置することが可能である。
OS1 arranged on the main storage device 1200
300 is executed by the CPU 1100, and the virtual storage space 1
Jobs (user programs) on the server 500 are activated, and resources such as the virtual storage space 1500 are managed.
A plurality of virtual storage spaces 1500 can be arranged on the main storage device 1200.

【0034】また、計算機1000は初期設定パラメタ
1700を格納した補助記憶装置1601を有してお
り、主記憶装置1200を不足と判定する為の閾値とい
ったOS1300が動作するのに必要な初期設定値を、
初期設定パラメタ1700で指定することができる。
Further, the computer 1000 has an auxiliary storage device 1601 which stores an initial setting parameter 1700, and sets an initial setting value necessary for the OS 1300 to operate such as a threshold value for determining the lack of the main storage device 1200. ,
It can be specified by the initial setting parameter 1700.

【0035】主記憶装置1200は、特定のアドレス幅
で表現される第一の領域1201と、第一の領域120
1よりも上位のアドレスに位置する第二の領域1202
から成る。例えば、32ビットのアドレス幅を64ビッ
トに拡張した場合、32ビットのアドレス幅で表現され
る領域が第一の領域1201となり、64ビットのアド
レス幅で表現される領域の内、第一の領域1201を除
いた領域が第二の領域1202となる。
The main memory 1200 includes a first area 1201 and a first area 120, each of which has a specific address width.
A second area 1202 located at an address higher than 1
Consists of. For example, when the 32-bit address width is expanded to 64 bits, the area represented by the 32-bit address width becomes the first area 1201, and the first area among the areas represented by the 64-bit address width is The area excluding 1201 becomes the second area 1202.

【0036】仮想記憶空間1500は、第一の領域12
01上に配置しなければならない第一種のページ150
1と、主記憶装置1200上のいずれの領域でも配置可
能な第二種のページ1502から成る。また、仮想記憶
空間1500に割り当てたページの管理をする為の情報
を格納した主記憶割り当て管理テーブル500が空間毎
に用意されている。ここで第一の領域1201上に配置
しなければならない第一種のページ1501とは、第一
の領域1201のアドレス幅を前提として作成されたプ
ログラムの内、仮想記憶領域の実記憶装置上への常駐化
が行われるI/O処理プログラム等、拡張前のアドレス
幅のアドレスを直接扱う処理を含むプログラムのページ
を指すものとし、第一種のページ1501は、その動作
を保証する為に第一の領域1201上への配置が行われ
るものとする。
The virtual storage space 1500 includes the first area 12
01 first type page that must be placed on 01
1 and a second type page 1502 that can be arranged in any area on the main memory 1200. Also, a main memory allocation management table 500 storing information for managing pages allocated to the virtual memory space 1500 is prepared for each space. Here, the first type of page 1501 that must be arranged on the first area 1201 is the program created on the assumption of the address width of the first area 1201 to the real storage device of the virtual storage area. Page 1501 of the first type for guaranteeing the operation of the program, such as an I / O processing program in which an address is made resident. Arrangement on one area 1201 is performed.

【0037】OS1300上には、スワッピング要求を
出すスワッピング起動部1400、スワッピング要求を
スワッピング部100が受け取る為の入力パラメタ20
0、主記憶装置1200の使用状況情報を保持している
空きページ数情報300、主記憶装置1200の負荷状
況を判断する為の閾値400、上記の主記憶割り当て管
理テーブル500と、スワッピング部100が配置され
ている。本実施形態のスワッピング部100は、スワッ
ピング管理部600、空間非活性化部700、主記憶割
り当て部800、空間活性化部900から成っている。
On the OS 1300, a swapping activation unit 1400 for issuing a swapping request, and an input parameter 20 for the swapping unit 100 to receive the swapping request.
0, the number of empty pages information 300 holding the usage status information of the main storage device 1200, the threshold value 400 for judging the load status of the main storage device 1200, the main storage allocation management table 500, and the swapping unit 100. It is arranged. The swapping unit 100 of this embodiment includes a swapping management unit 600, a space deactivation unit 700, a main memory allocation unit 800, and a space activation unit 900.

【0038】図2は本実施形態の入力パラメタ200の
構成を示す図である。図2の様に入力パラメタ200に
は、スワッピング要求の対象となっている空間のスワッ
ピングに関する情報が格納されている。
FIG. 2 is a diagram showing the structure of the input parameter 200 of this embodiment. As shown in FIG. 2, the input parameter 200 stores information about swapping of the space that is the target of the swapping request.

【0039】スワッピング空間指定領域201は、スワ
ッピング要求の対象となっている空間を識別する為の空
間識別子を格納した領域である。スワッピング種別20
2は、要求がスワップアウトであるかスワップインであ
るかを指定した情報を格納した領域である。
The swapping space designation area 201 is an area in which a space identifier for identifying the space which is the object of the swapping request is stored. Swapping type 20
An area 2 stores information that specifies whether the request is swap-out or swap-in.

【0040】移動対象ページの種類203は、第一種の
ページ1501を移動するか、第二種のページ1502
を移動するか、両方を対象とするかを指定した情報を格
納する領域である。移動先204は、移動対象ページの
種類203により指定されたページを、どこに出力する
かを指定した情報を格納する領域である。第一種のペー
ジ1501を第二の領域1202に移動させる場合は、
第二の領域1202を示す情報が指定され、それ以外の
場合には補助記憶装置1600を示す情報が指定され
る。移動させるページ数205は、移動させて解放する
ページ数を格納する領域である。
As the type 203 of the page to be moved, the page 1501 of the first type is moved or the page 1502 of the second type is used.
This is an area for storing information that specifies whether to move or to target both. The move destination 204 is an area for storing information specifying where to output the page specified by the type 203 of the page to be moved. When moving the first type page 1501 to the second area 1202,
Information indicating the second area 1202 is designated, and in other cases, information indicating the auxiliary storage device 1600 is designated. The number of pages to be moved 205 is an area for storing the number of pages to be moved and released.

【0041】スワッピング空間指定領域201とスワッ
ピング種別202は、スワッピング起動部1400によ
り指定される。それ以外の情報はスワッピング管理部6
00で記述する。
The swapping space designation area 201 and the swapping type 202 are designated by the swapping starting unit 1400. For other information, swapping management section 6
Described with 00.

【0042】図3は本実施形態の空きページ数情報30
0の構成を示す図である。図3に示す様に空きページ数
情報300は、主記憶装置1200の第一の領域120
1の空きページ数を第一の領域の空きページ数301に
保持し、主記憶装置1200の第二の領域1202の空
きページ数を、第二の領域の空きページ数302に保持
している。
FIG. 3 shows the free page number information 30 of this embodiment.
It is a figure which shows the structure of 0. As shown in FIG. 3, the free page number information 300 is stored in the first area 120 of the main storage device 1200.
The number of empty pages of 1 is held in the number of empty pages 301 of the first area, and the number of empty pages of the second area 1202 of the main memory 1200 is held in the number of empty pages 302 of the second area.

【0043】図4は本実施形態の閾値400の構成を示
す図である。図4に示す様に閾値400は、主記憶装置
1200の第一の領域1201を不足と見做す空きペー
ジ数の閾値を第一の領域の閾値401に保持し、主記憶
装置1200の第二の領域1202を不足と見做す空き
ページ数の閾値を、第二の領域の閾値402に保持して
いる。
FIG. 4 is a diagram showing the structure of the threshold value 400 of this embodiment. As shown in FIG. 4, the threshold value 400 holds the threshold value of the number of empty pages that considers the first area 1201 of the main memory 1200 as insufficient in the threshold value 401 of the first area, and the second area of the main memory 1200. The threshold value 402 of the second area holds the threshold value of the number of empty pages which considers the area 1202 to be insufficient.

【0044】図5は本実施形態の主記憶割り当て管理テ
ーブル500の構成を示す図である。図5に示す様に主
記憶割り当て管理テーブル500は、空間単位に設けら
れ、使用している記憶資源の管理を行う為の情報を格納
している。図5の空間識別子501は、その管理テーブ
ルがどの空間に対応しているかを示しており、スワッピ
ング状態情報格納領域502は、その空間がスワップイ
ンしている状態であるか、またはスワップアウトされて
いる状態であるかを示している。
FIG. 5 is a diagram showing the structure of the main memory allocation management table 500 of this embodiment. As shown in FIG. 5, the main memory allocation management table 500 is provided in space units and stores information for managing the storage resources used. The space identifier 501 in FIG. 5 indicates which space the management table corresponds to, and the swapping status information storage area 502 indicates whether the space is swapped in or swapped out. It shows whether it is in the state of being.

【0045】第一種のページのページ数503は、その
空間に第一種のページ1501として割り当てられてい
る第一の領域1201のページ数を格納している。第一
種のページのページ管理テーブルの先頭保持領域504
は、その空間に第一種のページ1501として割り当て
られている第一の領域1201のページの、ページ管理
テーブルの先頭を指し示すポインタを格納する領域であ
り、次のテーブルへのポインタを各テーブルに格納する
ことにより複数のページ管理テーブルを順次指し示すも
のとする。またこのページ管理テーブルには、仮想記憶
上のページが実記憶上のどのページに割り当てられてい
るかを示す情報を格納しているものとする。
The page number 503 of the first type page stores the number of pages of the first area 1201 allocated as the first type page 1501 in the space. First holding area 504 of page management table of first type page
Is a region for storing a pointer that points to the beginning of the page management table of the page of the first region 1201 allocated as the first type page 1501 in that space, and a pointer to the next table is assigned to each table. By storing, it sequentially points to a plurality of page management tables. Further, it is assumed that the page management table stores information indicating to which page in the real memory the page in the virtual memory is allocated.

【0046】第二種のページのページ数505は、その
空間に第二種のページ1502として割り当てられてい
るページ数を格納している。第二種のページのページ管
理テーブルの先頭保持領域506は、その空間に第二種
のページ1502として割り当てられているページのペ
ージ管理テーブルの先頭を指し示すアドレスを格納する
領域である。
The page number 505 of the second type page stores the number of pages allocated as the second type page 1502 in the space. The head management area 506 of the page management table of the second type page is an area for storing an address indicating the head of the page management table of the page allocated as the second type page 1502 in the space.

【0047】移動した第一種のページのページ数507
は、その空間に第一種のページ1501として割り当て
られ、第二の領域1202へ中間スワップアウトされた
ページのページ数を格納している。移動した第一種のペ
ージのページ管理テーブルの先頭保持領域508は、そ
の空間に第一種のページ1501として割り当てられ、
第二の領域1202へ中間スワップアウトされたページ
の、ページ管理テーブルの先頭を指し示すアドレスを格
納する領域である。
The number of pages of the moved first type page 507
Stores the number of pages of pages that are allocated as the first type of page 1501 in the space and are intermediately swapped out to the second area 1202. The head holding area 508 of the page management table of the moved first type page is allocated as the first type page 1501 in the space,
This is an area for storing the address indicating the beginning of the page management table of the page swapped out to the second area 1202.

【0048】図6は本実施形態のスワッピング管理処理
の処理手順を示すフローチャートである。図6に示す様
に計算機1000のスワッピング管理部600は、スワ
ップアウトが要求された際に、特定のアドレス幅で表現
される主記憶装置の第一の領域1201における空きペ
ージ数が第一の領域の閾値401未満であり、第二の領
域1202における空きページ数がスワップアウト対象
のページ数以上である場合にスワップアウト領域を第二
の領域1202とする処理を行う。
FIG. 6 is a flow chart showing the processing procedure of the swapping management processing of this embodiment. As shown in FIG. 6, when the swap-out is requested, the swapping management unit 600 of the computer 1000 indicates that the number of free pages in the first area 1201 of the main storage device expressed by a specific address width is the first area. If the number of empty pages in the second area 1202 is equal to or larger than the number of pages targeted for swap-out, the swap-out area is set to the second area 1202.

【0049】計算機1000のスワッピング起動部14
00は、主記憶装置1200にロードされたプログラム
のI/O待ち時間が所定の値に達したり、リソースの使
用率が所定の割合に達すると、スワッピング部100に
対してスワッピングを要求する。
The swapping starting unit 14 of the computer 1000
00 requests swapping to the swapping unit 100 when the I / O wait time of the program loaded in the main storage device 1200 reaches a predetermined value or when the resource usage rate reaches a predetermined ratio.

【0050】ステップ601でスワッピング部100の
スワッピング管理部600は、スワッピング起動部14
00からスワッピング要求を受け取ると、入力パラメタ
200のスワッピング種別202から、その要求がスワ
ップアウトであるか否かを判定し、上記判定の結果が真
であった場合にはステップ602へ進む。
In step 601, the swapping management unit 600 of the swapping unit 100 causes the swapping starting unit 14 to
When the swapping request is received from 00, it is determined from the swapping type 202 of the input parameter 200 whether or not the request is a swap-out. If the result of the above determination is true, the process proceeds to step 602.

【0051】ステップ602では、第一の領域の閾値4
01と第一の領域の空きページ数301との比較及び第
二の領域の閾値402と第二の領域の空きページ数30
2との比較を行って、第一の領域1201のみがメモリ
不足であるか否かを判定し、上記判定の結果が真であっ
た場合にはステップ603へ進む。
In step 602, the threshold value of the first region is set to 4
01 and the number of empty pages 301 in the first area and the threshold value 402 of the second area and the number of empty pages 30 in the second area
2 is compared to determine whether only the first area 1201 is out of memory, and if the result of the above determination is true, the process proceeds to step 603.

【0052】ステップ603では、移動対象ページの種
類203に、第一の領域1201であることを示す情報
を設定する。次にステップ604では、第一の領域の閾
値401と第一の領域の空きページ数301の差分か
ら、第一の領域の空きページ数301を第一の領域の閾
値401以上にするのに必要なページ数を算出し、移動
させるページ数205に設定する。
In step 603, the information 203 indicating the first area 1201 is set in the type 203 of the page to be moved. Next, in step 604, it is necessary to set the number of free pages 301 in the first area to the threshold 401 of the first area or more from the difference between the threshold 401 of the first area and the number of free pages 301 in the first area. The number of pages to be moved is calculated and set to the number of pages to be moved 205.

【0053】ステップ607では、第二の領域の空きペ
ージ数302と移動させるページ数205とを比較し
て、移動させる為に必要な空きページが第二の領域12
02にあるか否かを判定し、上記判定の結果が真であっ
た場合にはステップ608へ進む。ステップ608で
は、移動先204に第二の領域1202であることを示
す情報を設定し、その後、ステップ610以降の処理を
継続する。
At step 607, the number of empty pages 302 in the second area is compared with the number of pages 205 to be moved, and the empty pages necessary for moving are found in the second area 12.
It is determined whether or not the result is 02, and if the result of the above determination is true, the process proceeds to step 608. In step 608, information indicating that the area is the second area 1202 is set in the movement destination 204, and thereafter, the processing of step 610 and thereafter is continued.

【0054】一方、ステップ602の判定の結果が偽で
あった場合にはステップ605へ進み、移動対象ページ
の種類203に、第一の領域1201及び第二の領域1
202であることを示す情報を設定する。
On the other hand, if the result of the determination in step 602 is false, the process proceeds to step 605, in which the type 203 of the page to be moved is the first area 1201 and the second area 1
Information indicating that the number is 202 is set.

【0055】ステップ606では、第一の領域の閾値4
01と第一の領域の空きページ数301の差分から、第
一の領域の空きページ数301を第一の領域の閾値40
1以上にするのに必要なページ数を算出し、また第二の
領域の閾値402と第二の領域の空きページ数302の
差分から、第二の領域の空きページ数302を第二の領
域の閾値402以上にするのに必要なページ数を算出
し、移動させるページ数205に設定する。
In step 606, the threshold value of the first region is set to 4
01 and the free page number 301 of the first area, the free page number 301 of the first area is set to the threshold value 40 of the first area.
The number of pages required to be 1 or more is calculated, and the number of empty pages 302 in the second area is calculated from the difference between the threshold value 402 of the second area and the number of empty pages 302 in the second area. The number of pages required to be equal to or greater than the threshold value 402 is calculated and set as the number of pages to be moved 205.

【0056】ステップ606の後、又は、ステップ60
7の判定の結果が偽であった場合にはステップ609へ
進み、移動先204に補助記憶装置1600であること
を示す情報を設定する。
After step 606, or step 60
When the result of the determination in 7 is false, the process proceeds to step 609, and information indicating that the auxiliary storage device 1600 is set in the movement destination 204.

【0057】ステップ610では、スワッピング空間指
定領域201で示されたスワッピング対象となる空間の
主記憶割り当て管理テーブル500内のスワッピング状
態情報格納領域502を参照して、その空間がスワップ
インしている状態であるか、すなわちまだ非活性化され
ていない状態であるかを判定し、上記判定の結果が真で
あった場合にはステップ611へ進み、空間非活性化処
理をコールする。またステップ610における判定の結
果が偽であった場合はステップ612へ進み、主記憶割
り当て処理をコールする。以上でスワッピング管理処理
を終了する。
In step 610, referring to the swapping status information storage area 502 in the main memory allocation management table 500 of the swapping target space indicated by the swapping space designation area 201, the swapped-in status of the space If the result of the above determination is true, the process proceeds to step 611, and the space deactivation process is called. If the result of the determination in step 610 is false, the process proceeds to step 612 and the main memory allocation process is called. This completes the swapping management process.

【0058】図7は本実施形態の空間非活性化処理の処
理手順を示すフローチャートである。図7に示す様に計
算機1000の空間非活性化部700は、スワップアウ
ト要求に対して必要に応じてスワップアウト対象のプロ
グラムの処理を停止させて当該プログラムをCPU11
00の割り当てが行われない状態にする処理を行う。
FIG. 7 is a flow chart showing the processing procedure of the space deactivation processing of this embodiment. As shown in FIG. 7, the space deactivating unit 700 of the computer 1000 stops the processing of the swap-out target program in response to the swap-out request as necessary, and executes the program in the CPU 11
The process of making the state of no allocation of 00 is performed.

【0059】ステップ701で計算機1000の空間非
活性化部700は、当該空間が非活性化され、スワップ
アウトされた状態であることを示す情報をスワッピング
状態情報格納領域502に設定する。
In step 701, the space deactivating section 700 of the computer 1000 sets, in the swapping state information storage area 502, information indicating that the space is deactivated and swapped out.

【0060】次にステップ702では、非活性化の対象
となる空間から発行されている処理中の入出力処理を停
止させる。ステップ703では、非活性化の対象となる
空間で動作しているジョブの実行を止め、当該空間にC
PU資源の割り当てが行われない様にする。そしてステ
ップ704では、主記憶割り当て処理をコールする。以
上で空間非活性化処理を終了する。
Next, at step 702, the input / output processing being processed issued from the space to be deactivated is stopped. In step 703, the execution of the job operating in the space to be deactivated is stopped, and the C
Prevents PU resource allocation. Then, in step 704, the main memory allocation processing is called. This completes the space deactivation process.

【0061】図8は本実施形態の主記憶割り当て処理の
処理手順を示すフローチャートである。図8に示す様に
計算機1000の主記憶割り当て部800は、スワップ
アウトが要求された場合に、移動させるページ数205
に設定されたページ数のページを移動先204のスワッ
プアウト領域へ退避した後にその退避された主記憶装置
上のページの解放を行い、スワップインが要求された場
合に、主記憶装置上のページの確保及び前記スワップア
ウト領域へ退避されたページの回復を行う。
FIG. 8 is a flow chart showing the processing procedure of the main memory allocation processing of this embodiment. As shown in FIG. 8, the main memory allocation unit 800 of the computer 1000 moves the number of pages 205 to be moved when swap-out is requested.
When the swap-in is requested, the pages in the main storage device are released after the pages of the number of pages set in the Is secured and the pages saved in the swap-out area are recovered.

【0062】ステップ801で計算機1000の主記憶
割り当て部800は、入力パラメタ200のスワッピン
グ種別202から、その要求がスワップアウトであるか
否かを判定し、上記判定の結果が真であった場合にはス
テップ802へ進む。
In step 801, the main memory allocation unit 800 of the computer 1000 determines from the swapping type 202 of the input parameter 200 whether or not the request is swap out, and if the result of the above determination is true, Proceeds to step 802.

【0063】ステップ802では、移動対象ページの種
類203が第一種のページ1501であり、かつ、移動
先204が第二の領域1202であるかを判定し、上記
判定の結果が真であった場合、以下の処理を行う。
In step 802, it is determined whether the type 203 of the page to be moved is the first type page 1501 and the destination 204 is the second area 1202, and the result of the above determination is true. In this case, the following processing is performed.

【0064】すなわちステップ803では、移動させる
ページ数205で指定された数の、第二の領域1202
のページを確保し、主記憶割り当て管理テーブル500
中の移動した第一種のページのページ数507の値を、
その確保したページ数だけ増分する。そして、前記確保
したページのページ管理テーブルを、移動した第一種の
ページのページ管理テーブルの先頭保持領域508のポ
インタを辿って得られるページ管理テーブル列の最後に
繋ぐ。
That is, in step 803, the second area 1202 of the number specified by the number of pages to be moved 205 is set.
Page of the main memory allocation management table 500
The value of the page number 507 of the moved first type page in
Increment by the number of secured pages. Then, the page management table of the secured page is connected to the end of the page management table sequence obtained by tracing the pointer of the head holding area 508 of the page management table of the moved first type page.

【0065】次にステップ804では、移動させるペー
ジ数205で指定されたページ数の第一種のページ15
01の内容を、ステップ803で確保したページに複写
する。そしてその複写した仮想記憶上の第一種のページ
1501が実記憶上の第二の領域1202のどのページ
に中間スワップアウトされたかを示す情報を、前記確保
したページ管理テーブルに格納する。
Next, at step 804, the first type of pages 15 having the number of pages designated by the number of pages to be moved 205 are set.
The contents of 01 are copied to the page secured in step 803. Then, information indicating to which page of the second area 1202 on the real storage the first type page 1501 on the copied virtual storage has been intermediately swapped out is stored in the secured page management table.

【0066】次にステップ805では、ステップ804
で内容の複写された第一種のページ1501に割り当て
られていた主記憶装置上のページを解放した後、第一種
のページのページ数503を減算し、第一種のページの
ページ管理テーブルの先頭保持領域504内のポインタ
を辿って得られるページ管理テーブル列から、前記解放
されたページのページ管理テーブルを外す。
Next, in step 805, step 804
In the page management table of the first type page, the number of pages of the first type page 503 is subtracted after releasing the page in the main memory allocated to the first type page 1501 whose contents are copied in The page management table of the released page is removed from the page management table sequence obtained by tracing the pointer in the head holding area 504 of the.

【0067】一方、ステップ802の判定の結果が偽で
あった場合にはステップ806へ進み、移動対象ページ
の種類203で指定されたページから、移動させるペー
ジ数205で指定されたページ数だけ補助記憶装置16
00に出力し、それらのページを解放する。
On the other hand, if the result of the determination in step 802 is false, the process proceeds to step 806, and the page specified by the type 203 of the page to be moved is supplemented by the page number specified by the page number 205 to be moved. Storage device 16
Output to 00 and release those pages.

【0068】またステップ801の判定の結果が偽であ
った場合にはステップ807へ進み、以下の処理を行
う。すなわちステップ807では、第二の領域1202
に中間スワップアウトされている第一種のページ150
1を第一の領域1201に戻す。すなわち、移動した第
一種のページのページ管理テーブルの先頭保持領域50
8のポインタを辿って得られるページ管理テーブル列を
参照し、第二の領域1202に中間スワップアウトされ
ている第一種のページ1501の格納場所を読み出し
て、移動した第一種のページのページ数507の第一種
のページ1501を第二の領域1202から第一の領域
1201に複写して戻す。また第一種のページ1501
が補助記憶装置1600に物理スワップアウトされてい
る場合は、そこから第一の領域1201に戻す。
If the result of the determination in step 801 is false, the process proceeds to step 807 to perform the following processing. That is, in step 807, the second area 1202
First Page 150
1 is returned to the first area 1201. That is, the head holding area 50 of the page management table of the moved first type page
By referring to the page management table sequence obtained by tracing the pointer of No. 8, the storage location of the first type page 1501 that is intermediate swapped out to the second area 1202 is read, and the page of the first type page that has been moved The first type page 1501 of the equation 507 is copied back from the second area 1202 to the first area 1201. Also the first type of page 1501
Is physically swapped out to the auxiliary storage device 1600, it is returned to the first area 1201 from there.

【0069】次にステップ808では、補助記憶装置1
600に物理スワップアウトされている第二種のページ
1502を第二の領域1202に戻し、最後にステップ
809で、空間活性化処理をコールする。以上で主記憶
割り当て処理を終了する。
Next, in step 808, the auxiliary storage device 1
The second type page 1502 physically swapped out to 600 is returned to the second area 1202, and finally, in step 809, the space activation processing is called. With this, the main memory allocation processing ends.

【0070】図9は本実施形態の空間活性化処理の処理
手順を示すフローチャートである。図9に示す様に計算
機1000の空間活性化部900は、スワップイン対象
のプログラムの処理を再開させて当該プログラムをCP
U1100の割り当てが行われる状態にする処理を行
う。
FIG. 9 is a flow chart showing the processing procedure of the space activation processing of this embodiment. As shown in FIG. 9, the space activating unit 900 of the computer 1000 restarts the processing of the swap-in target program to execute CP processing of the program.
U1100 is allocated.

【0071】ステップ901で計算機1000の空間活
性化部900は、活性化の対象となる空間で動作してい
たジョブの実行を再開させ、当該空間にCPU資源が割
り当てられる様にする。
At step 901, the space activation unit 900 of the computer 1000 restarts the execution of the job operating in the space to be activated so that the CPU resource is allocated to the space.

【0072】次にステップ902では、空間非活性化処
理のステップ702で停止させた、活性化の対象となる
空間で処理中の入出力処理を再開させ、ステップ903
では、スワッピング状態情報格納領域502に、当該空
間が活性化されてスワップインの状態となっていること
を示す情報を設定する。以上で空間活性化処理を終了す
る。
Next, in step 902, the input / output process being processed in the space to be activated, which was stopped in step 702 of the space deactivating process, is restarted, and step 903 is executed.
Then, in the swapping state information storage area 502, information indicating that the space is activated and is in the swap-in state is set. With this, the space activation process is completed.

【0073】以上説明した様に本実施形態の計算機シス
テムによれば、スワッピングが要求された場合に所定の
閾値と主記憶装置の空きページ数との差分で設定された
ページ数のページについてスワッピングを行うので、ス
ワッピングを行う際のデータ転送の絶対量を低減させ、
それにより実業務のスループット及び応答時間を向上さ
せることが可能である。
As described above, according to the computer system of this embodiment, when swapping is requested, swapping is performed on pages having the number of pages set by the difference between the predetermined threshold value and the number of empty pages in the main storage device. Since it does, it reduces the absolute amount of data transfer when swapping,
As a result, it is possible to improve the throughput and response time of actual work.

【0074】また本実施形態の計算機システムによれ
ば、特定のアドレス幅で表現される主記憶装置の第一の
領域の空きが不足している場合に、第一の領域のページ
を第二の領域に移動させる中間スワッピングを行うの
で、特定のアドレス幅で表現される特定の領域のみで動
作可能なプログラムのスワッピングに必要なデータ転送
時間を短縮し、それにより実業務のスループット及び応
答時間を向上させることが可能である。
Further, according to the computer system of the present embodiment, when the free space in the first area of the main storage device expressed by the specific address width is insufficient, the page in the first area is Intermediate swapping to move to the area reduces the data transfer time required for swapping a program that can operate only in a specific area expressed by a specific address width, thereby improving the throughput and response time of actual work It is possible to

【0075】[0075]

【発明の効果】本発明によればスワッピングが要求され
た場合に所定の閾値と主記憶装置の空きページ数との差
分で設定されたページ数のページについてスワッピング
を行うので、スワッピングを行う際のデータ転送の絶対
量を低減させ、それにより実業務のスループット及び応
答時間を向上させることが可能である。また本発明によ
れば、特定のアドレス幅で表現される主記憶装置の第一
の領域の空きが不足している場合に、第一の領域のペー
ジを第二の領域に移動させる中間スワッピングを行うの
で、特定のアドレス幅で表現される特定の領域のみで動
作可能なプログラムのスワッピングに必要なデータ転送
時間を短縮し、それにより実業務のスループット及び応
答時間を向上させることが可能である。
According to the present invention, when the swapping is requested, the swapping is performed for the page of the number of pages set by the difference between the predetermined threshold value and the number of empty pages of the main storage device. It is possible to reduce the absolute amount of data transfer, thereby improving the throughput and response time of actual work. Further, according to the present invention, when there is insufficient free space in the first area of the main memory represented by a specific address width, intermediate swapping for moving a page in the first area to the second area is performed. Since this is done, it is possible to shorten the data transfer time required for swapping a program that can operate only in a specific area expressed by a specific address width, and thereby improve the throughput and response time of actual work.

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

【図1】本実施形態の計算機システムの概略構成を示す
図である。
FIG. 1 is a diagram showing a schematic configuration of a computer system of this embodiment.

【図2】本実施形態の入力パラメタ200の構成を示す
図である。
FIG. 2 is a diagram showing a configuration of an input parameter 200 of this embodiment.

【図3】本実施形態の空きページ数情報300の構成を
示す図である。
FIG. 3 is a diagram showing a configuration of empty page number information 300 according to the present embodiment.

【図4】本実施形態の閾値400の構成を示す図であ
る。
FIG. 4 is a diagram showing a configuration of a threshold value 400 of this embodiment.

【図5】本実施形態の主記憶割り当て管理テーブル50
0の構成を示す図である。
FIG. 5 is a main memory allocation management table 50 of this embodiment.
It is a figure which shows the structure of 0.

【図6】本実施形態のスワッピング管理処理の処理手順
を示すフローチャートである。
FIG. 6 is a flowchart showing a processing procedure of swapping management processing according to the present embodiment.

【図7】本実施形態の空間非活性化処理の処理手順を示
すフローチャートである。
FIG. 7 is a flowchart showing a processing procedure of space deactivation processing according to the present embodiment.

【図8】本実施形態の主記憶割り当て処理の処理手順を
示すフローチャートである。
FIG. 8 is a flowchart showing a processing procedure of main memory allocation processing of the present embodiment.

【図9】本実施形態の空間活性化処理の処理手順を示す
フローチャートである。
FIG. 9 is a flowchart showing a processing procedure of space activation processing of the present embodiment.

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

100…スワッピング部、200…入力パラメタ、30
0…空きページ数情報、400…閾値、500…主記憶
割り当て管理テーブル、1000…計算機、1100…
CPU、1200…主記憶装置、1201…第一の領
域、1202…第二の領域、1300…OS、1400
…スワッピング起動部、1500…仮想記憶空間、15
01…第一種のページ、1502…第二種のページ、1
600…補助記憶装置、1601…補助記憶装置、17
00…初期設定パラメタ、600…スワッピング管理
部、700…空間非活性化部、800…主記憶割り当て
部、900…空間活性化部、201…スワッピング空間
指定領域、202…スワッピング種別、203…移動対
象ページの種類、204…移動先、205…移動させる
ページ数、301…第一の領域の空きページ数、302
…第二の領域の空きページ数、401…第一の領域の閾
値、402…第二の領域の閾値、501…空間識別子、
502…スワッピング状態情報格納領域、503…第一
種のページのページ数、504…第一種のページのペー
ジ管理テーブルの先頭保持領域、505…第二種のペー
ジのページ数、506…第二種のページのページ管理テ
ーブルの先頭保持領域、507…移動した第一種のペー
ジのページ数、508…移動した第一種のページのペー
ジ管理テーブルの先頭保持領域。
100 ... Swapping unit, 200 ... Input parameters, 30
0 ... Free page number information, 400 ... Threshold value, 500 ... Main memory allocation management table, 1000 ... Computer, 1100 ...
CPU, 1200 ... Main storage device, 1201 ... First area, 1202 ... Second area, 1300 ... OS, 1400
... Swapping start-up unit, 1500 ... Virtual storage space, 15
01 ... first type page, 1502 ... second type page, 1
600 ... Auxiliary storage device, 1601 ... Auxiliary storage device, 17
00 ... initial setting parameter, 600 ... swapping management section, 700 ... space deactivating section, 800 ... main memory allocating section, 900 ... space activating section, 201 ... swapping space designation area, 202 ... swapping type, 203 ... move target Type of page, 204 ... Destination, 205 ... Number of pages to be moved, 301 ... Number of empty pages in first area, 302
... number of empty pages in second area, 401 ... threshold value of first area, 402 ... threshold value of second area, 501 ... space identifier,
502 ... Swapping state information storage area, 503 ... Page number of first type page, 504 ... Head holding area of page management table of first type page, 505 ... Page number of second type page, 506 ... Second Top holding area of the page management table of the first type page, 507 ... Number of pages of the first type page that has moved, 508 ... First holding area of the page management table of the first type page that has moved.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 清井 雅広 神奈川県川崎市麻生区王禅寺1099番地 株 式会社日立製作所システム開発研究所内 (72)発明者 大辻 彰 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア事業部内 (72)発明者 池ヶ谷 直子 神奈川県川崎市麻生区王禅寺1099番地 株 式会社日立製作所システム開発研究所内 Fターム(参考) 5B005 JJ12 MM31 VV02    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Masahiro Kiyoi             1099 Ozenji, Aso-ku, Kawasaki City, Kanagawa Prefecture             Ceremony company Hitachi Systems Development Laboratory (72) Inventor Akira Otsuji             5030 Totsuka Town, Totsuka Ward, Yokohama City, Kanagawa Prefecture             Ceremony company Hitachi Ltd. software division (72) Inventor Naoko Ikegaya             1099 Ozenji, Aso-ku, Kawasaki City, Kanagawa Prefecture             Ceremony company Hitachi Systems Development Laboratory F-term (reference) 5B005 JJ12 MM31 VV02

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 主記憶装置と補助記憶装置とを具備し、
仮想記憶方式におけるスワッピングを制御するスワッピ
ング制御方法において、 スワップアウトが要求された際に主記憶装置の空きペー
ジ数が所定の閾値未満である場合に、その所定の閾値と
主記憶装置の空きページ数との差分をスワップアウト対
象のページ数として設定するステップと、スワップアウ
ト要求に対して必要に応じてスワップアウト対象のプロ
グラムの処理を停止させて当該プログラムをCPUの割
り当てが行われない状態にするステップと、前記設定さ
れたページ数のページのスワップアウト領域への退避及
びその退避された主記憶装置上のページの解放を行うス
テップと、 スワップインが要求された場合に、主記憶装置上のペー
ジの確保及び前記スワップアウト領域へ退避されたペー
ジの回復を行うステップと、スワップイン対象のプログ
ラムの処理を再開させて当該プログラムをCPUの割り
当てが行われる状態にするステップとを有することを特
徴とするスワッピング制御方法。
1. A main storage device and an auxiliary storage device are provided,
In the swapping control method that controls swapping in the virtual memory system, when the number of free pages in the main storage device is less than the predetermined threshold when swap-out is requested, the predetermined threshold and the number of free pages in the main storage device And a step of setting the difference as the number of pages to be swapped out, and for the swapout request, the processing of the program to be swapped out is stopped so that the CPU is not allocated to the program. A step of saving the set number of pages in the swap-out area and releasing the saved page in the main storage device; and a step in the main storage device when swap-in is requested. Securing the page and recovering the page saved in the swap-out area, and Swapping control method characterized in that by resuming the processing of the in-target program and a step of the state of the program allocation of CPU is performed.
【請求項2】 スワップアウトが要求された際に、特定
のアドレス幅で表現される主記憶装置の第一の領域にお
ける空きページ数が所定の閾値未満である場合に、その
所定の閾値と第一の領域の空きページ数との差分をスワ
ップアウト対象のページ数として設定し、 前記第一の領域よりも上位のアドレスに位置する第二の
領域における空きページ数が前記設定されたページ数以
上である場合に、その設定されたページ数のページのス
ワップアウト領域を前記第二の領域とすることを特徴と
する請求項1に記載されたスワッピング制御方法。
2. When a swap-out request is made and the number of free pages in the first area of the main storage device represented by a specific address width is less than a predetermined threshold, the predetermined threshold and the first threshold are set. The difference from the number of free pages in one area is set as the number of pages to be swapped out, and the number of free pages in the second area located at an address higher than the first area is greater than or equal to the set number of pages. The swapping control method according to claim 1, wherein the swap-out area of the set number of pages is set as the second area.
【請求項3】 前記第二の領域の空きページ数が所定の
閾値未満である場合に、その所定の閾値と第二の領域の
空きページ数との差分をスワップアウト対象のページ数
として設定し、その設定されたページ数のページのスワ
ップアウト領域を補助記憶装置上の領域とすることを特
徴とする請求項2に記載されたスワッピング制御方法。
3. When the number of free pages in the second area is less than a predetermined threshold, the difference between the predetermined threshold and the number of free pages in the second area is set as the number of swap-out target pages. 3. The swapping control method according to claim 2, wherein the swap-out area of the set number of pages is used as an area on the auxiliary storage device.
【請求項4】 当該プログラムに対して前記CPUの割
り当てが行われない状態にするステップが実行されたか
どうかを示す情報を保持する領域を参照し、前記CPU
の割り当てが行われない状態にするステップが実行され
ていないことを前記領域の情報が示している場合に、当
該プログラムに対して前記CPUの割り当てが行われな
い状態にするステップを行うことを特徴とする請求項1
乃至請求項3のいずれか1項に記載されたスワッピング
制御方法。
4. The CPU is referred to by referring to an area holding information indicating whether or not a step of setting a state in which the CPU is not allocated to the program has been executed.
When the information of the area indicates that the step of bringing the CPU into the non-allocated state is not executed, the step of putting the CPU into the non-allocated state is performed for the program. Claim 1
To the swapping control method according to claim 3.
【請求項5】 主記憶装置と補助記憶装置とを具備し、
仮想記憶方式におけるスワッピングを制御する計算機シ
ステムにおいて、 スワップアウトが要求された際に主記憶装置の空きペー
ジ数が所定の閾値未満である場合に、その所定の閾値と
主記憶装置の空きページ数との差分をスワップアウト対
象のページ数として設定するスワッピング管理部と、ス
ワップアウト要求に対して必要に応じてスワップアウト
対象のプログラムの処理を停止させて当該プログラムを
CPUの割り当てが行われない状態にする空間非活性化
部と、 スワップアウトが要求された場合に、前記設定されたペ
ージ数のページのスワップアウト領域への退避及びその
退避された主記憶装置上のページの解放を行い、スワッ
プインが要求された場合に、主記憶装置上のページの確
保及び前記スワップアウト領域へ退避されたページの回
復を行う主記憶割り当て部と、スワップイン対象のプロ
グラムの処理を再開させて当該プログラムをCPUの割
り当てが行われる状態にする空間活性化部とを備えるこ
とを特徴とする計算機システム。
5. A main storage device and an auxiliary storage device are provided,
In a computer system that controls swapping in the virtual memory system, if the number of free pages in the main memory is less than the predetermined threshold when swap-out is requested, the specified threshold and the number of free pages in the main memory The swapping management unit that sets the difference as the number of pages to be swapped out, and the processing of the program to be swapped out is stopped as necessary in response to the swapout request so that the program is not allocated to the CPU. When the swap-out is requested, the space deactivation unit that performs the swap-out is performed to save the set number of pages to the swap-out area and to release the saved page in the main storage device. Is requested, a page on main memory is secured and a page saved to the swap-out area is saved. Computer system comprising a main storage allocation unit that performs di recovery, that by resuming the processing of the swap-target program and a space activation unit to a state in which the program allocation of CPU is performed.
【請求項6】 主記憶装置と補助記憶装置とを具備し、
仮想記憶方式におけるスワッピングを制御する計算機シ
ステムとしてコンピュータを機能させる為のプログラム
において、 スワップアウトが要求された際に主記憶装置の空きペー
ジ数が所定の閾値未満である場合に、その所定の閾値と
主記憶装置の空きページ数との差分をスワップアウト対
象のページ数として設定するスワッピング管理部と、ス
ワップアウト要求に対して必要に応じてスワップアウト
対象のプログラムの処理を停止させて当該プログラムを
CPUの割り当てが行われない状態にする空間非活性化
部と、 スワップアウトが要求された場合に、前記設定されたペ
ージ数のページのスワップアウト領域への退避及びその
退避された主記憶装置上のページの解放を行い、スワッ
プインが要求された場合に、主記憶装置上のページの確
保及び前記スワップアウト領域へ退避されたページの回
復を行う主記憶割り当て部と、スワップイン対象のプロ
グラムの処理を再開させて当該プログラムをCPUの割
り当てが行われる状態にする空間活性化部としてコンピ
ュータを機能させることを特徴とするプログラム。
6. A main storage device and an auxiliary storage device are provided,
In a program that causes a computer to function as a computer system that controls swapping in the virtual memory system, if the number of free pages in the main storage device is less than a specified threshold when swap-out is requested, the specified threshold A swapping management unit that sets the difference from the number of free pages in the main storage device as the number of pages to be swapped out, and the processing of the program to be swapped out is stopped as necessary in response to a swapout request, and the program is executed by the CPU. Space deactivating unit that puts the specified number of pages in the swap-out area and swap-out is requested on the main storage device when swap-out is requested. When a page is released and swap-in is requested, the page on main storage is A computer as a main memory allocation unit that performs storage and recovery of the pages saved in the swap-out area, and a space activation unit that restarts the processing of the program that is the swap-in target and puts the program into a state where the CPU is allocated. A program characterized by making a function of.
JP2002066279A 2002-03-12 2002-03-12 Swapping control method, its execution device and its processing program Pending JP2003263366A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002066279A JP2003263366A (en) 2002-03-12 2002-03-12 Swapping control method, its execution device and its processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002066279A JP2003263366A (en) 2002-03-12 2002-03-12 Swapping control method, its execution device and its processing program

Publications (1)

Publication Number Publication Date
JP2003263366A true JP2003263366A (en) 2003-09-19

Family

ID=29198144

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002066279A Pending JP2003263366A (en) 2002-03-12 2002-03-12 Swapping control method, its execution device and its processing program

Country Status (1)

Country Link
JP (1) JP2003263366A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008236615A (en) * 2007-03-23 2008-10-02 Kyocera Mita Corp Image forming apparatus and memory resource securing method
KR101392062B1 (en) 2009-09-22 2014-05-07 내셔널 충 쳉 유니버시티 Fast speed computer system power-on & power-off method
CN103946815A (en) * 2011-09-30 2014-07-23 英特尔公司 Method, system and apparatus for region access control
WO2019194394A1 (en) * 2018-04-06 2019-10-10 삼성전자주식회사 Electronic device and control method thereof
JP2020123263A (en) * 2019-01-31 2020-08-13 Necソリューションイノベータ株式会社 Information processor, method for processing information, and program

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008236615A (en) * 2007-03-23 2008-10-02 Kyocera Mita Corp Image forming apparatus and memory resource securing method
KR101392062B1 (en) 2009-09-22 2014-05-07 내셔널 충 쳉 유니버시티 Fast speed computer system power-on & power-off method
CN103946815A (en) * 2011-09-30 2014-07-23 英特尔公司 Method, system and apparatus for region access control
US9268712B2 (en) 2011-09-30 2016-02-23 Intel Corporation Method, system and apparatus for region access control
CN103946815B (en) * 2011-09-30 2017-02-15 英特尔公司 Method, memory device and apparatus for region access control
WO2019194394A1 (en) * 2018-04-06 2019-10-10 삼성전자주식회사 Electronic device and control method thereof
KR20190117294A (en) * 2018-04-06 2019-10-16 삼성전자주식회사 Electronic apparatus and controlling method thereof
US11409648B2 (en) 2018-04-06 2022-08-09 Samsung Electronics Co., Ltd. Electronic apparatus and controlling method for performing memory swapping to reduce resource usage
KR102533726B1 (en) * 2018-04-06 2023-05-18 삼성전자주식회사 Electronic apparatus and controlling method thereof
JP2020123263A (en) * 2019-01-31 2020-08-13 Necソリューションイノベータ株式会社 Information processor, method for processing information, and program
JP7197131B2 (en) 2019-01-31 2022-12-27 Necソリューションイノベータ株式会社 Information processing device, information processing method, program

Similar Documents

Publication Publication Date Title
CN1717645B (en) Apparatus and method for multi-threaded processors performance control
US7127557B2 (en) RAID apparatus and logical device expansion method thereof
WO2015169145A1 (en) Memory management method and device
WO2022089281A1 (en) Container-based application management method and apparatus
KR20090079012A (en) Method and apparatus for save/restore state of virtual machine
JP4902501B2 (en) Power control method, computer system, and program
JP4464378B2 (en) Computer system, storage system and control method for saving storage area by collecting the same data
US6848021B2 (en) Efficient data backup using a single side file
JP2007108981A (en) Data exchange method between storage device and volume
US20110107344A1 (en) Multi-core apparatus and load balancing method thereof
JP2007188499A (en) Method and apparatus for reducing page replacement time in system using demand paging technique
US20130097382A1 (en) Multi-core processor system, computer product, and control method
JP2002196960A (en) File input/output control method, file control server and parallel computer system
US8732441B2 (en) Multiprocessing system
JP2003263366A (en) Swapping control method, its execution device and its processing program
KR20070090418A (en) Method and system for providing context switch using multiple register file
CN114063894A (en) Coroutine execution method and coroutine execution device
US5918243A (en) Computer mechanism for reducing DASD arm contention during parallel processing
CN113010453A (en) Memory management method, system, equipment and readable storage medium
JP4792065B2 (en) Data storage method
JPH11312092A (en) Method for switching task and data processor
KR102565873B1 (en) Method for allocating memory bus connected storage in numa system
JP4207775B2 (en) Computer system freeze / thaw program, recording medium thereof, and computer system freeze / thaw method
JP2003330737A (en) Computer system
JPH076045A (en) Memory managing method of multi-processing system