JPH04123148A - Page allocating system - Google Patents
Page allocating systemInfo
- Publication number
- JPH04123148A JPH04123148A JP2243580A JP24358090A JPH04123148A JP H04123148 A JPH04123148 A JP H04123148A JP 2243580 A JP2243580 A JP 2243580A JP 24358090 A JP24358090 A JP 24358090A JP H04123148 A JPH04123148 A JP H04123148A
- Authority
- JP
- Japan
- Prior art keywords
- page
- virtual space
- page size
- allocation
- request
- 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
Links
- 239000000284 extract Substances 0.000 claims abstract description 5
- 238000012545 processing Methods 0.000 claims abstract description 3
- 238000000034 method Methods 0.000 claims description 19
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000002542 deteriorative effect Effects 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はページ割当て方式に関し、特にメモリをページ
という単位に分割して管理するページングa構を備える
計算機システムにおけるページ割当て方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a page allocation method, and more particularly to a page allocation method in a computer system equipped with a paging structure that divides and manages memory into units called pages.
従来、この種のページ割当て方式では、ページサイズを
固定とするページの割当てが行われていた。Conventionally, in this type of page allocation method, pages are allocated with a fixed page size.
上述した従来のページ割当て方式では、ページサイズが
固定であったので、ページサイズが数にバイトと小さい
場合には、補助記憶装置に対するページの掃出しおよび
読込みが顛発して、ページング機構の効率が悪くなると
いう欠点がある。In the conventional page allocation method described above, the page size is fixed, so if the page size is as small as a few bytes, pages will be flushed and read from the auxiliary storage frequently, causing the paging mechanism to become inefficient. It has the disadvantage of becoming.
また、ページサイズが数Mバイトと大きい場合には、プ
ログラムのメモリ要求量が小さいときにページの使用効
率が極端に悪くなるという欠点がある。Furthermore, if the page size is large, such as several megabytes, there is a drawback that the efficiency of page use becomes extremely poor when the amount of memory required by the program is small.
本発明の目的は、上述の点に鑑み、プログラムからのメ
モリ要求量に応じてページサイズを動的に設定できるよ
うにして、プログラムのメモリ要求量に適したページサ
イズの設定とページの割当てとを行えるようにしたペー
ジ割当て方式を提供することにある。In view of the above-mentioned points, an object of the present invention is to enable the page size to be dynamically set according to the amount of memory requested by the program, and to set the page size and allocate pages appropriate to the amount of memory requested by the program. The object of the present invention is to provide a page allocation method that enables the following.
本発明によるページ割当て方式は、メモリをページとい
う単位に分割して管理するページング機構を備える計算
機システムにおいて、各種処理を行う処理プログラムか
らのメモリ割当て要求を受け取り受け取ったメモリ割当
て要求がらメモリ要求量を抽出してページサイズを決定
するページサイズ決定手段と、このページサイズ決定手
段により決定されたメモリ要求量を受け取り仮想空間を
割り当て割り当てた仮想空間のページサイズの設定要求
とページの割当て要求とを行う仮想空間割当て手段と、
この仮想空間割当て手段からページサイズの設定要求を
受けて仮想空間のページサイズを設定するページサイズ
設定手段と、前記仮想空間割当て手段からページの割当
て要求を受けてページを割り当てるページ割当て手段と
を有する。The page allocation method according to the present invention, in a computer system equipped with a paging mechanism that manages memory by dividing it into units called pages, receives memory allocation requests from processing programs that perform various processes, and calculates the amount of memory requests from the received memory allocation requests. A page size determining means for extracting and determining a page size, and receiving the memory request amount determined by the page size determining means, allocating a virtual space, and requesting a page size setting of the allocated virtual space and a page allocation request. virtual space allocation means;
The page size setting means receives a page size setting request from the virtual space allocation means and sets the page size of the virtual space, and the page allocation means receives a page allocation request from the virtual space allocation means and allocates the page. .
本発明のページ割当て方式では、ページサイズ決定手段
が各種処理を行う処理プログラムからのメモリ割当て要
求を受け取り受け取ったメモリ割当て要求からメモリ要
求量を抽出してページサイズを決定し、仮想空間割当て
手段がページサイズ決定手段により決定されたメモリ要
求量を受け取り仮想空間を割り当て割り当てた仮想空間
のページサイズの設定要求とページの割当て要求とを行
い、ページサイズ設定手段が仮想空間割当て手段からペ
ージサイズの設定要求を受けて仮想空間のページサイズ
を設定し、ページ割当て手段が仮想空間割当て手段から
ページの割当て要求を受けてページを割り当てる。In the page allocation method of the present invention, the page size determining means receives a memory allocation request from a processing program that performs various processes, extracts the memory request amount from the received memory allocation request and determines the page size, and the virtual space allocation means The page size setting means receives the memory request amount determined by the page size determination means, allocates a virtual space, and issues a request to set the page size of the allocated virtual space and a page allocation request, and the page size setting means sets the page size from the virtual space allocation means. Upon receiving the request, the page size of the virtual space is set, and the page allocation means receives the page allocation request from the virtual space allocation means and allocates the page.
次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be explained in detail with reference to the drawings.
第1図は、本発明の一実施例に係るページ割当て方式の
構成を示すブロック図である0本実施例のページ割当て
方式は、処理プログラム1と、ページサイズ決定手段2
と、仮想空間割当て手段3と、ページサイズ設定手段4
と、ページ割当て手段5とから構成されている。FIG. 1 is a block diagram showing the configuration of a page allocation method according to an embodiment of the present invention.
, virtual space allocation means 3, and page size setting means 4
and page allocation means 5.
ページサイズ決定手段2は、各種処理を行う処理プログ
ラムlからのメモリ割当て要求を受け取り、受け取った
メモリ割当て要求からメモリ要求量を抽出してページサ
イズを決定する。The page size determining means 2 receives a memory allocation request from a processing program l that performs various processes, extracts the memory request amount from the received memory allocation request, and determines the page size.
仮想空間割当て手段3は、ページサイズ決定手段2によ
り決定されたメモリ要求量を受け取り、仮想空間を割り
当て、割り当てた仮想空間のページサイズの設定要求と
ページの割当て要求とを行う。The virtual space allocation means 3 receives the memory request amount determined by the page size determination means 2, allocates a virtual space, and issues a request for setting the page size of the allocated virtual space and a page allocation request.
ページサイズ設定手段4は、仮想空間割当て手段3から
ページサイズの設定要求を受けて、仮想空間のページサ
イズを設定する。The page size setting means 4 receives a page size setting request from the virtual space allocation means 3 and sets the page size of the virtual space.
ページ割当て手段5は、仮想空間割当て手段3からペー
ジの割当て要求を受けて、ページを割り当てる。The page allocation means 5 receives a page allocation request from the virtual space allocation means 3 and allocates a page.
次に、このように構成された本実施例のページ割当て方
式の動作について、第2図および第3図を参照しながら
説明する。Next, the operation of the page allocation method of this embodiment configured as described above will be explained with reference to FIGS. 2 and 3.
各種処理を行う処理プログラム1からメモリ割当て要求
があると、ページサイズ決定手段2は、受け取ったメモ
リ割当て要求からメモリ要求量を抽出し、ページサイズ
を決定する0例えば、4にバイトの小ページと4Mバイ
トの大ページとが存在する計算機システムでは、処理プ
ログラム1がメモリ要求量が8にバイトの小規模プログ
ラムのときには、ページサイズ決定手段2は、処理プロ
グラム1からのメモリ要求量が大ページサイズ4Mの半
分以下であるので、ページサイズを4にバイトと決定す
る。When a memory allocation request is received from a processing program 1 that performs various processes, the page size determining means 2 extracts the memory request amount from the received memory allocation request and determines the page size. In a computer system in which a large page of 4 Mbytes exists, when the processing program 1 is a small program with a memory request of 8 bytes, the page size determining means 2 determines that the memory request from the processing program 1 is the large page size. Since it is less than half of 4M, the page size is determined to be 4 bytes.
仮想空間割当て手段3は、ページサイズ決定手段2から
8にバイトのメモリ要求量今受け取ると、例えば第2図
に示すように、仮想空間を固定サイズの8Mバイトずつ
に分割した部分仮想空間#0〜#n(正整数)のうちの
部分仮想空間#3を割り当て、割り当てた部分仮想空間
#3のページサイズを4にバイトに設定するページサイ
ズ設定要求と、4にバイトの小ページの2ペ一ジ分のペ
ージ割当て要求とを行う。When the virtual space allocating means 3 receives a memory request amount of bytes from the page size determining means 2 to 8, it divides the virtual space into fixed-sized 8 Mbyte portions of partial virtual space #0, for example, as shown in FIG. A page size setting request that allocates partial virtual space #3 of ~#n (positive integer) and sets the page size of allocated partial virtual space #3 to 4 bytes, and 2 pages of a small page of 4 bytes. A page allocation request for one page is made.
ページサイズ設定手段4は、仮想空間割当て手段3から
4にバイトのページサイズ設定要求を受けると、部分仮
想空間#3の仮想アドレスを絶対アドレスに変換する際
に使用する部分仮想空間#3レジスタ(図示せず)のペ
ージフラグにページサイズが4にバイトである旨を設定
する。When the page size setting means 4 receives a page size setting request in bytes from the virtual space allocation means 3 to 4, the page size setting means 4 sets the partial virtual space #3 register ( The page flag (not shown) is set to indicate that the page size is 4 bytes.
ページ割当て手段5は、仮想空間割当て手段3から4に
バイトの小ページの2ペ一ジ分のページ割当て要求を受
けると、2ペ一ジ分の小ページSP1およびSF3を割
り当てる。When the page allocation means 5 receives a page allocation request for two byte small pages from the virtual space allocation means 3 to 4, it allocates two small pages SP1 and SF3.
一方、処理プログラム1がメモリ要求量が例えば17M
バイトの大規模プログラムのときには、ページサイズ決
定手段2は、処理プログラム1からのメモリ要求量が大
ページサイズ4Mの半分以上であるので、ページサイズ
を4Mバイトと決定する。On the other hand, processing program 1 has a memory requirement of, for example, 17M.
In the case of a large-scale program of bytes, the page size determination means 2 determines the page size to be 4M bytes, since the amount of memory requested by the processing program 1 is more than half of the large page size of 4M.
仮想空間割当て手段3は、ページサイズ決定手段2から
17Mバイトのメモリ要求量を受け取ると、例えば第3
図に示すように、仮想空間を固定サイズの8Mバイトず
つに分割した部分仮想空間#0〜#nのうちの部分仮想
空間#31部分仮想仮想性4および部分仮想空間#5を
割り当て、割り当てた部分仮想空間#31部分仮想仮想
性4および部分仮想空間#5のページサイズを4Mバイ
トに設定するページサイズ設定要求と、4Mバイトの大
ページの5ペ一ジ分のページ割当て要求とを行う。When the virtual space allocation means 3 receives the memory request amount of 17 Mbytes from the page size determination means 2, the virtual space allocation means 3 assigns, for example, the third
As shown in the figure, partial virtual space #31, partial virtual space 4, and partial virtual space #5 are allocated among partial virtual spaces #0 to #n, which are created by dividing the virtual space into fixed-sized 8MB each. Partial virtual space #31 A page size setting request is made to set the page size of partial virtual virtuality 4 and partial virtual space #5 to 4 MB, and a page allocation request for 5 large pages of 4 MB is made.
ページサイズ設定手段4は、仮想空間割当て手段3から
4Mバイトのページサイズ設定要求を受けると、部分仮
想空間#31部分仮想仮想性4および部分仮想空間#5
の仮想アドレスを絶対アドレスに変換する際に使用する
部分仮想空間#3レジスタ、部分仮想空間#4レジスタ
および部分仮想空間#5レジスタ(いずれも図示せず)
のページフラグにページサイズが4Mバイトである旨を
設定する。When the page size setting means 4 receives a page size setting request of 4 MB from the virtual space allocation means 3, the page size setting means 4 sets the partial virtual space #31, the partial virtual virtuality 4, and the partial virtual space #5.
Partial virtual space #3 register, Partial virtual space #4 register, and Partial virtual space #5 register (all not shown) used when converting virtual addresses to absolute addresses.
Set the page flag to indicate that the page size is 4 MB.
ページ割当て手段5は、仮想空間割当て手段3から4M
バイトの大ページの5ペ一ジ分のページ割当て要求を受
けると、5ペ一ジ分の大ページLPI、LP3.LP5
.LP6およびLP7を割り当てる。The page allocation means 5 includes virtual space allocation means 3 to 4M.
When a page allocation request for 5 large pages of bytes is received, large pages LPI, LP3 . LP5
.. Assign LP6 and LP7.
次に、仮想アドレスを絶対アドレスに変換する方法につ
いて説明する。Next, a method of converting a virtual address to an absolute address will be explained.
まず、アドレス変換機構(図示せず;ハードウェアであ
るかソフトウェアであるかを問わない)は、仮想アドレ
スに対応する部分仮想空間i(iは1〜nの整数)レジ
スタのページフラグを参照する。ページフラグがページ
サイズが4にバイトである旨を示しているならば、仮想
アドレスを4にで除算することにより、ページナンバを
得、余りをページ内相対アドレスとする。ページフラグ
がページサイズが4Mバイトである旨を示しているなら
ば、仮想アドレスを4Mで除算することにより、ページ
ナンバを得、余りをページ内相対アドレスとする。First, the address translation mechanism (not shown; regardless of whether it is hardware or software) refers to the page flag of the partial virtual space i (i is an integer from 1 to n) register corresponding to the virtual address. . If the page flag indicates that the page size is 4 bytes, the page number is obtained by dividing the virtual address by 4, and the remainder is used as the in-page relative address. If the page flag indicates that the page size is 4M bytes, the page number is obtained by dividing the virtual address by 4M, and the remainder is used as the intra-page relative address.
なお、上記実施例の動作の説明では、ページサイズ決定
手段2が処理プログラム1からのメモリ要求量が大ペー
ジサイズ4Mの半分以上であるか半分以下であるかに基
づいてページサイズを小ページサイズ4にとするか大ペ
ージサイズ4Mとするかを決定するように説明したが、
ページサイズ決定手段2におけるページサイズ決定の判
断は他の基準を使用するようにしてもよいことはいうま
でもない。In the explanation of the operation of the above embodiment, the page size determining means 2 sets the page size to the small page size based on whether the memory request amount from the processing program 1 is more than half or less than half of the large page size 4M. 4 or a large page size of 4M, but
It goes without saying that the page size determining means 2 may use other criteria for determining the page size.
以上説明したように本発明は、ページング機構を備える
計算機システムにおいて、ページサイズ決定手段、仮想
空間割当て手段、ページサイズ設定手段およびページ割
当て手段を設けたことにより、プログラムのメモリ要求
量に適したページサイズの設定とページの割当てとが可
能となり、ページング機構の効率を悪化させることなく
、ページの使用効率を向上させることができるという効
果がある。As explained above, in a computer system equipped with a paging mechanism, the present invention provides a page size determination means, a virtual space allocation means, a page size setting means, and a page allocation means. This makes it possible to set the size and allocate pages, and has the effect of improving page usage efficiency without deteriorating the efficiency of the paging mechanism.
第1図は本発明の一実施例に係るページ割当て方式の構
成を示すブロック図、
第2図は本実施例のページ割当て方式における小ページ
の割当ての一例を示す説明図、第3図は本実施例のペー
ジ割当て方式における大ページの割当ての一例を示す説
明図である。
図において、
1・・・処理プログラム、
2・・・ページサイズ決定手段、
3・・・仮想空間割当て手段、
4・・・ページサイズ設定手段、
5・・・ページ割当て手段である。FIG. 1 is a block diagram showing the configuration of a page allocation method according to an embodiment of the present invention, FIG. 2 is an explanatory diagram showing an example of small page allocation in the page allocation method of this embodiment, and FIG. FIG. 3 is an explanatory diagram showing an example of large page allocation in the page allocation method of the embodiment. In the figure, 1... processing program, 2... page size determining means, 3... virtual space allocating means, 4... page size setting means, 5... page allocating means.
Claims (1)
グ機構を備える計算機システムにおいて、各種処理を行
う処理プログラムからのメモリ割当て要求を受け取り受
け取ったメモリ割当て要求からメモリ要求量を抽出して
ページサイズを決定するページサイズ決定手段と、 このページサイズ決定手段により決定されたメモリ要求
量を受け取り仮想空間を割り当て割り当てた仮想空間の
ページサイズの設定要求とページの割当て要求とを行う
仮想空間割当て手段と、この仮想空間割当て手段からペ
ージサイズの設定要求を受けて仮想空間のページサイズ
を設定するページサイズ設定手段と、 前記仮想空間割当て手段からページの割当て要求を受け
てページを割り当てるページ割当て手段を有することを
特徴とするページ割当て方式。[Claims] In a computer system equipped with a paging mechanism that divides and manages memory into units called pages, a computer system that receives memory allocation requests from processing programs that perform various processes and extracts the memory request amount from the received memory allocation requests. and a virtual space that receives the memory request amount determined by the page size determination means, allocates a virtual space, and issues a page size setting request and page allocation request for the allocated virtual space. an allocation means; a page size setting means for receiving a page size setting request from the virtual space allocation means and setting a page size of the virtual space; and a page allocation means for receiving a page allocation request from the virtual space allocation means and allocating a page. A page allocation method characterized by having a means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2243580A JPH04123148A (en) | 1990-09-13 | 1990-09-13 | Page allocating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2243580A JPH04123148A (en) | 1990-09-13 | 1990-09-13 | Page allocating system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH04123148A true JPH04123148A (en) | 1992-04-23 |
Family
ID=17105940
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2243580A Pending JPH04123148A (en) | 1990-09-13 | 1990-09-13 | Page allocating system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH04123148A (en) |
-
1990
- 1990-09-13 JP JP2243580A patent/JPH04123148A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4831759B2 (en) | Method, system, and computer program for allocating DMA address space | |
US7206915B2 (en) | Virtual space manager for computer having a physical address extension feature | |
US6591355B2 (en) | Distributed shared memory system with variable granularity | |
US6286092B1 (en) | Paged based memory address translation table update method and apparatus | |
US5899994A (en) | Flexible translation storage buffers for virtual address translation | |
US6055617A (en) | Virtual address window for accessing physical memory in a computer system | |
CN105868028B (en) | Method, device and terminal for sharing data among processes | |
JPS623359A (en) | Virtual storage system | |
JPH10187630A (en) | Hierarchical smp computer system | |
JPH07262092A (en) | Virtual memory management system, conversion index buffer management system and minimization method of conversion index buffer purge overhead | |
KR100470258B1 (en) | Large memory allocation method and apparatus | |
US5107417A (en) | Address translating method for translating virtual address to real address with specified address register to allow bypass of translation steps | |
CN112596913A (en) | Method and device for improving performance of transparent large page of memory, user equipment and storage medium | |
US7444636B2 (en) | Method and system of determining attributes of a functional unit in a multiple processor computer system | |
JP2001051958A (en) | Unified memory management system for multiprocessor multicomponent architecture | |
US20050216695A1 (en) | Memory extension for a data processor to provide both common and separate physical memory areas for virtual memory spaces | |
US4984150A (en) | Virtual memory control management system | |
JPH04123148A (en) | Page allocating system | |
Cho et al. | Enhanced memory management for scalable MPI intra-node communication on many-core processor | |
JPH04344549A (en) | Page allocation method in computer system | |
JPH04288643A (en) | Memory mapping system for multi-processor system | |
Tamir et al. | Hierarchical coherency management for shared virtual memory multicomputers | |
JP2001022640A (en) | Memory managing method | |
CN114461391A (en) | Remappable GPU (graphics processing Unit) main memory access management method and system | |
JP2001075824A (en) | Accessing method and recording medium with access processing program recorded thereon |