JPH113271A - Memory allocation system in computer system - Google Patents
Memory allocation system in computer systemInfo
- Publication number
- JPH113271A JPH113271A JP15472997A JP15472997A JPH113271A JP H113271 A JPH113271 A JP H113271A JP 15472997 A JP15472997 A JP 15472997A JP 15472997 A JP15472997 A JP 15472997A JP H113271 A JPH113271 A JP H113271A
- Authority
- JP
- Japan
- Prior art keywords
- page
- zero
- computer system
- cleared
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、計算機システムに
関し、特に、計算機システムにおいて用いられるメモリ
割り当て方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system, and more particularly, to a memory allocation method used in a computer system.
【0002】[0002]
【従来の技術】一般に、計算機システムにおいて、オペ
レーティングシステムにはメモリをページ単位で管理し
て、要求に応じてアロケートを行う機構(機能)が備え
られている。一方、オペレーティングシステム動作の
際、ゼロクリアされたページを必要とすることが度々あ
り、このように、ゼロクリアされたページが必要となっ
た際、オペレーティングシステムでは、ページをアロケ
ートする際にゼロクリアしている。2. Description of the Related Art Generally, in a computer system, an operating system is provided with a mechanism (function) for managing a memory in page units and allocating the memory in response to a request. On the other hand, when the operating system operates, the page that is zero-cleared is often required. Thus, when the page that is zero-cleared is required, the operating system performs zero-clearing when allocating the page. .
【0003】ところで、ページ全体をゼロクリアする
際、比較的広範囲に亘ってデータの書き込みを行う必要
がある。このため、ページ全体をゼロクリアする際の処
理自体に時間がかかる。When the entire page is cleared to zero, it is necessary to write data over a relatively wide range. For this reason, it takes time to perform the process itself when the entire page is cleared to zero.
【0004】加えて、ページ全体をゼロクリアする際に
は、プロセッサのキャッシュリプレースが多数発生す
る。このため、ページクリア処理以前にキャッシングさ
れていたデータがリプレースされてしまい、後の処理で
メモリからキャッシュへの再読み込みが発生して、計算
機の性能が低下してしまうことがある。[0004] In addition, when the entire page is cleared to zero, a large number of cache replacements of the processor occur. For this reason, data that has been cached before the page clearing process is replaced, and in a later process, reloading from the memory to the cache may occur, thereby deteriorating the performance of the computer.
【0005】[0005]
【発明が解決しようとする課題】上述のように、従来の
計算機システムでは、ゼロクリアされたページが必要な
際にページのクリア処理を行っている関係上、ページク
リア処理に時間がかかるという問題点がある。As described above, in the conventional computer system, the page clearing process takes a long time because the page clearing process is performed when a zero-cleared page is required. There is.
【0006】さらに、本発明では、ゼロクリアされたペ
ージをアロケートする際にメモリへの大量の書き込みを
必要とするページのクリアを行っているため、ゼロクリ
ア処理を行う際にキャッシュのリプレースが多発し、そ
の後の処理を続行するにあたって、メモリからの再読み
込みが必要となって計算機性能が低下してしまうという
問題点がある。Further, in the present invention, when allocating a zero-cleared page, a page requiring a large amount of writing to the memory is cleared, so that the cache is frequently replaced when performing the zero-clear processing, When the subsequent processing is continued, there is a problem that re-reading from the memory is required and computer performance is reduced.
【0007】本発明の目的は計算機システムにおいてゼ
ロクリアされたメモリページが必要とされた際アロケー
トに要する時間を短縮することのできるメモリ割り当て
方式を提供することにある。An object of the present invention is to provide a memory allocation method capable of reducing the time required for allocating when a zero-cleared memory page is required in a computer system.
【0008】[0008]
【課題を解決するための手段】本発明によれば、複数の
メモリ領域を管理して要求に応じてアロケートを行う計
算機システムにおいて、前記計算機システムの負荷が低
いか否かを検知して前記計算機システムの負荷が低いと
前記メモリ領域のうちフリー状態にあるメモリ領域をゼ
ロクリアする第1の手段と、前記ゼロクリアされたメモ
リ領域を要求された際前記ゼロクリアされたメモリ領域
をアロケートする第2の手段とを有することを特徴とす
る第2の手段とを有することを特徴とする計算機システ
ムにおけるメモリ割り当て方式が得られる。According to the present invention, in a computer system for managing a plurality of memory areas and allocating according to a request, the computer system detects whether the load on the computer system is low and detects the load. First means for zero-clearing a free memory area of the memory area when the load of the system is low, and second means for allocating the zero-cleared memory area when the zero-cleared memory area is requested A memory allocation method in a computer system having the second means.
【0009】具体的には、フリー状態にあるメモリ領域
をプールする第1のプール手段と、前記ゼロクリアされ
たメモリ領域をプールする第2のプール手段が備えられ
ており、第1の手段は、前記第1のプール手段から前記
アロケート予定の前記フリー状態にあるメモリ領域を取
り出して該メモリ領域の内容をゼロクリアして前記第2
のプール手段に移しかえるクリア機構と、前記計算機シ
ステムの負荷が低いか否かを検知して前記計算機システ
ムの負荷が低いと前記クリア機構を起動する負荷監視機
構とを有しており、第2の手段は前記要求を受けた際前
記ゼロクリアされたメモリ領域が必要とされていると判
断すると前記第2のプール手段から前記ゼロクリアされ
たメモリ領域をアロケートし、前記ゼロクリアされたペ
ージが要求されていないと判断すると前記第1のプール
手段から前記フリー状態のメモリ領域をアロケートす
る。Specifically, there are provided first pool means for pooling a memory area in a free state, and second pool means for pooling the memory area that has been zero-cleared. Extracting the memory area in the free state to be allocated from the first pool means, clearing the contents of the memory area to zero,
And a load monitoring mechanism that detects whether the load on the computer system is low and activates the clear mechanism when the load on the computer system is low. Means for allocating the zero-cleared memory area from the second pool means when it is determined that the zero-cleared memory area is required upon receiving the request, and the zero-cleared page is requested. If it is determined that there is no memory area, the memory area in the free state is allocated from the first pool means.
【0010】[0010]
【発明の実施の形態】以下本発明について図面を参照し
て説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings.
【0011】図1を参照して、計算機システム(図示せ
ず)においてオペレーティングシステムはメモリをペー
ジ単位で管理している。計算機システムには負荷監視機
構(システム負荷監視機構)1が備えられており、シス
テム負荷監視機構1は計算機システムの負荷状況を監視
している。そして、システム負荷監視機構1は現状のシ
ステム負荷が高いか低いかを判断する。Referring to FIG. 1, in a computer system (not shown), an operating system manages a memory in page units. The computer system is provided with a load monitoring mechanism (system load monitoring mechanism) 1, and the system load monitoring mechanism 1 monitors the load status of the computer system. Then, the system load monitoring mechanism 1 determines whether the current system load is high or low.
【0012】システム負荷監視機構1がシステム負荷が
低いと判断すると、ページのゼロクリア機構2を起動さ
せる。ページゼロクリア機構2では、フリーページプー
ル3から次にページが要求された際に割り当てる予定の
現状フリー状態にあるページを取り出して、その内容を
ゼロクリアする。そして、このページをゼロクリア済み
ページプール4に移しかえる。When the system load monitoring mechanism 1 determines that the system load is low, the page zero clearing mechanism 2 is activated. The page zero clearing mechanism 2 extracts a page in a free state which is to be allocated when the next page is requested from the free page pool 3, and clears its contents to zero. Then, this page is moved to the zero-cleared page pool 4.
【0013】ページ要求者6は自らがゼロクリアされた
ページを必要としている場合には、ページアロケート機
構(ページアロケータ)5に対してゼロクリアされたペ
ージを要求する。ゼロクリアされたページが必要とされ
ていると判断すると、ページアロケート機構5は、ペー
ジゼロクリア機構5が用意したクリア済みページのプー
ルから取り出して、それを要求者6に返す。一方、ゼロ
クリアされたページが要求されていない場合には、ペー
ジアロケート機構5は、フリーページプール3から単な
るフリー状態のページを返す。When the page requester 6 needs a zero-cleared page, the page requester 6 requests the zero-cleared page from a page allocator (page allocator) 5. When determining that the zero-cleared page is needed, the page allocating mechanism 5 takes out the page from the pool of cleared pages prepared by the page zero clearing mechanism 5 and returns it to the requester 6. On the other hand, when the zero-cleared page is not requested, the page allocating mechanism 5 returns a page in a free state from the free page pool 3.
【0014】ここで、具体例として、UNIXオペレー
ティングシステムを例にあげて説明する。Here, a UNIX operating system will be described as a specific example.
【0015】UNIXオペレーティングシステムでは、
走行可能なプロセスが存在しなくなると、アイドルと呼
ばれる状態に移行する。このアイドル状態はシステム負
荷が低いことを意味しており、この状態に移行するのを
契機として、負荷監視機構1はページゼロクリア機構2
を起動する。In the UNIX operating system,
When there are no more runnable processes, a transition is made to a state called idle. This idle state means that the system load is low, and the transition to this state triggers the load monitoring mechanism 1 to reset the page zero clear mechanism 2
Start
【0016】ページゼロクリア機構2は、フリーページ
プール3からページを取り出し、内容をゼロクリアす
る。クリアしたページは専用のプール(クリア済みフリ
ーページプール)4に追加される。The page zero clear mechanism 2 takes out a page from the free page pool 3 and clears the contents to zero. The cleared page is added to a dedicated pool (cleared free page pool) 4.
【0017】上記の処理は走行可能なプロセスが出現す
るまで続けられる。The above processing is continued until a runnable process appears.
【0018】アプリケーションプログラム(要求者)が
BSS(ゼロクリア済みデータ領域)を要求した際に
は、オペレーティングシステム(OS)はそのアプリケ
ーションプログラムに対してゼロクリア済みのページを
割り当てる。この際、ページアロケート機構5に対して
ゼロクリア済みページを要求する。When an application program (requester) requests a BSS (zero-cleared data area), the operating system (OS) allocates a page that has been cleared to zero to the application program. At this time, a page that has been cleared to zero is requested to the page allocation mechanism 5.
【0019】ページアロケート機構5は、ページゼロク
リア機構2が内容をゼロクリアしたページをクリア済み
フリープール4から取り出して要求者6に返す。もし、
クリア済みプールが空の場合は、フリーページプール3
からフリー状態のページを取り出し、その内容をゼロク
リアして要求者6に返す。The page allocating mechanism 5 takes out the page whose contents have been zero-cleared by the page zero clearing mechanism 2 from the cleared free pool 4 and returns it to the requester 6. if,
If the cleared pool is empty, free page pool 3
The page in the free state is taken out from, the content is cleared to zero, and returned to the requester 6.
【0020】なお、上述のメモリ(ページ)割り当て
は、特定の内容のメモリが要求されることが予見される
システムに適用することができる。この場合、図1に示
すページゼロクリア機構2は特定の内容を書き込む機構
と置き換えられる。この書き込み機構によって、特定内
容のメモリをアロケートする処理を高速化することがで
きる。The above-mentioned memory (page) allocation can be applied to a system in which it is expected that a memory having a specific content is required. In this case, the page zero clear mechanism 2 shown in FIG. 1 is replaced with a mechanism for writing specific contents. This writing mechanism can speed up the process of allocating a memory of a specific content.
【0021】[0021]
【発明の効果】以上説明したように、本発明では、ペー
ジのゼロクリア処理をシステムの負荷が低い時のみに行
って、ページ割り当ての際にはページのゼロクリア処理
を行わないようにしたから、従来のようなページ割り当
ての際のページクリア処理を省略でき、これによって、
実際のページの割り当て処理を高速化できるという効果
がある。As described above, according to the present invention, the zero clear processing of a page is performed only when the load on the system is low, and the zero clear processing of the page is not performed at the time of page allocation. Page clearing process at the time of page allocation like this,
This has the effect of speeding up the actual page allocation process.
【0022】さらに、本発明では、ページのゼロクリア
処理をシステムの負荷が低い時のみに行って、ページ割
り当ての際にはページのゼロクリア処理を行わないよう
にしたから、キャッシュのリプレースを抑えることがで
き、これによって、ページ割り当て処理及びその後の処
理を高速化できるという効果がある。Further, according to the present invention, the page zero-clear processing is performed only when the system load is low, and the page zero-clear processing is not performed at the time of page allocation. This has the effect of speeding up the page allocation process and subsequent processes.
【図1】本発明によるメモリ割り当て方式を説明するた
めのブロック図である。FIG. 1 is a block diagram for explaining a memory allocation method according to the present invention.
1 負荷監視機構(システム負荷監視機構) 2 ページゼロクリア機構 3 フリーページプール 4 ゼロクリア済みページプール 5 ページアロケート機構(ページアロケータ) 6 ページ要求者 1 load monitoring mechanism (system load monitoring mechanism) 2 page zero clear mechanism 3 free page pool 4 zero cleared page pool 5 page allocating mechanism (page allocator) 6 page requester
Claims (4)
てアロケートを行う計算機システムにおいて、前記計算
機システムの負荷が低いか否かを検知して前記計算機シ
ステムの負荷が低いと前記メモリ領域のうちフリー状態
にあるメモリ領域をゼロクリアする第1の手段と、前記
ゼロクリアされたメモリ領域を要求された際前記ゼロク
リアされたメモリ領域をアロケートする第2の手段とを
有することを特徴とする第2の手段とを有することを特
徴とする計算機システムにおけるメモリ割り当て方式。In a computer system that manages a plurality of memory areas and performs allocation in response to a request, it is detected whether or not the load on the computer system is low. A second means for zero-clearing a memory area in a free state, and a second means for allocating the zero-cleared memory area when the zero-cleared memory area is requested. And a memory allocation method in a computer system.
おけるメモリ割り当て方式において、フリー状態にある
メモリ領域をプールする第1のプール手段と、前記ゼロ
クリアされたメモリ領域をプールする第2のプール手段
が備えられており、前記第1の手段は、前記第1のプー
ル手段から前記アロケート予定の前記フリー状態にある
メモリ領域を取り出して該メモリ領域の内容をゼロクリ
アして前記第2のプール手段に移しかえるクリア機構
と、前記計算機システムの負荷が低いか否かを検知して
前記計算機システムの負荷が低いと前記クリア機構を起
動する負荷監視機構とを有することを特徴とする計算機
システムにおけるメモリ割り当て方式。2. The memory allocation method in a computer system according to claim 1, wherein said first pooling means pools a memory area in a free state, and said second pooling means pools said zero-cleared memory area. Wherein the first means takes out the memory area in the free state which is to be allocated from the first pool means, clears the contents of the memory area to zero, and sends the memory area to the second pool means. Memory allocation in a computer system, comprising: a clear mechanism that can be shifted; and a load monitoring mechanism that detects whether the load on the computer system is low and activates the clear mechanism when the load on the computer system is low. method.
おけるメモリ割り当て方式において、前記第2の手段は
前記要求を受けた際前記ゼロクリアされたメモリ領域が
必要とされていると判断すると前記第2のプール手段か
ら前記ゼロクリアされたメモリ領域をアロケートし、前
記ゼロクリアされたページが要求されていないと判断す
ると前記第1のプール手段から前記フリー状態のメモリ
領域をアロケートするようにしたことを特徴とする計算
機システムにおけるメモリ割り当て方式。3. The memory allocation method according to claim 2, wherein said second means, upon receiving said request, determines that said zero-cleared memory area is required. Allocating the zero-cleared memory area from the pool means, and allocating the free memory area from the first pool means when it is determined that the zero-cleared page is not requested. Memory allocation method in a computer system.
てアロケートを行い予め定められた内容を有する特定メ
モリ領域を有する計算機システムにおいて、前記計算機
システムの負荷が低いか否かを検知して前記計算機シス
テムの負荷が低いと前記特定メモリ領域の内容を前記要
求に応じてアロケートする手段を有することを特徴とす
る計算機システムにおけるメモリ割り当て方式。4. In a computer system having a specific memory area having predetermined contents by managing a plurality of memory areas and allocating according to a request, it is detected whether or not the load of the computer system is low. A memory allocation method in a computer system, comprising: means for allocating the contents of the specific memory area in response to the request when the load on the computer system is low.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP9154729A JP3061001B2 (en) | 1997-06-12 | 1997-06-12 | Memory allocation method in computer system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP9154729A JP3061001B2 (en) | 1997-06-12 | 1997-06-12 | Memory allocation method in computer system |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH113271A true JPH113271A (en) | 1999-01-06 |
JP3061001B2 JP3061001B2 (en) | 2000-07-10 |
Family
ID=15590679
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP9154729A Expired - Fee Related JP3061001B2 (en) | 1997-06-12 | 1997-06-12 | Memory allocation method in computer system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3061001B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015143943A (en) * | 2014-01-31 | 2015-08-06 | 富士通株式会社 | information processing apparatus, control method, and control program |
-
1997
- 1997-06-12 JP JP9154729A patent/JP3061001B2/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015143943A (en) * | 2014-01-31 | 2015-08-06 | 富士通株式会社 | information processing apparatus, control method, and control program |
US9489295B2 (en) | 2014-01-31 | 2016-11-08 | Fujitsu Limited | Information processing apparatus and method |
Also Published As
Publication number | Publication date |
---|---|
JP3061001B2 (en) | 2000-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7024512B1 (en) | Compression store free-space management | |
US7206915B2 (en) | Virtual space manager for computer having a physical address extension feature | |
EP1023661B1 (en) | Application programming interface enabling application programs to control allocation of physical memory in a virtual memory system | |
US6247042B1 (en) | Method and system for restoring the state of physical memory as the focus changes among application programs in a computer | |
US5884077A (en) | Information processing system and method in which computer with high load borrows processor of computer with low load to execute process | |
JP4831759B2 (en) | Method, system, and computer program for allocating DMA address space | |
US8935456B2 (en) | Method and system for integrating database memory management in virtual machines | |
CN100346318C (en) | System and method for dynamically adjusting read ahead values based upon memory usage | |
US4730249A (en) | Method to operate on large segments of data in a virtual memory data processing system | |
US6134602A (en) | Application programming interface enabling application programs to group code and data to control allocation of physical memory in a virtual memory system | |
US9086921B2 (en) | Dynamic database memory management according to swap rates | |
US8943259B2 (en) | Relieving memory pressure in a host using database memory management | |
US20060236059A1 (en) | System and method of allocating contiguous memory in a data processing system | |
US6366994B1 (en) | Cache aware memory allocation | |
JPH08129457A (en) | Method and apparatus for expansion,reduction and redistribution of external storage structure | |
CN110196681B (en) | Disk data write-in control method and device for business write operation and electronic equipment | |
US20110107344A1 (en) | Multi-core apparatus and load balancing method thereof | |
WO1998029806A1 (en) | A system and method for execution management of computer programs | |
US6233666B1 (en) | Deferred disk drive space allocation for virtual memory pages with management of disk address recording in multipage tables without external process interrupts for table for input/output to memory | |
US6463515B1 (en) | System and method for recovering physical memory locations in a computer system | |
JPH113271A (en) | Memory allocation system in computer system | |
JPH07129518A (en) | Computer system | |
KR100401560B1 (en) | Kernel Stack Dynamic Allocation Method In Operating System | |
JP2003263366A (en) | Swapping control method, its execution device and its processing program | |
JPS603229B2 (en) | Information processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080428 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090428 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100428 Year of fee payment: 10 |
|
LAPS | Cancellation because of no payment of annual fees |