JP3061001B2 - Memory allocation method in computer system - Google Patents

Memory allocation method in computer system

Info

Publication number
JP3061001B2
JP3061001B2 JP9154729A JP15472997A JP3061001B2 JP 3061001 B2 JP3061001 B2 JP 3061001B2 JP 9154729 A JP9154729 A JP 9154729A JP 15472997 A JP15472997 A JP 15472997A JP 3061001 B2 JP3061001 B2 JP 3061001B2
Authority
JP
Japan
Prior art keywords
page
computer system
zero
pool
cleared
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP9154729A
Other languages
Japanese (ja)
Other versions
JPH113271A (en
Inventor
悟 品田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP9154729A priority Critical patent/JP3061001B2/en
Publication of JPH113271A publication Critical patent/JPH113271A/en
Application granted granted Critical
Publication of JP3061001B2 publication Critical patent/JP3061001B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

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, 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, the data that has been cached before the page clearing process is replaced, and reloading from the memory to the cache may occur in a later process, 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, according to the present invention, when allocating a zero-cleared page, a page requiring a large amount of writing to the memory is cleared. 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のプール手段と、前記第1のプ
ール手段から前記アロケート予定の前記フリー状態にあ
るメモリ領域を取り出して該メモリ領域の内容をゼロク
リアして前記第2のプール手段に移しかえるクリア機
構、および、前記計算機システムの負荷が低いか否かを
検知して前記計算機システムの負荷が低いと前記クリア
機構を起動する負荷監視機構を有する第1の処理手段
と、アロケート要求を受けた際、前記ゼロクリアされた
メモリ領域が必要とされていると判断すると前記第2の
プール手段から前記ゼロクリアされたメモリ領域をアロ
ケートし、前記ゼロクリアされたページが要求されてい
ないと判断すると前記第1のプール手段から前記フリー
状態のメモリ領域をアロケートする第2の処理手段とを
有することを特徴とする計算機システムにおけるメモリ
割り当て方式が得られる。
According to the present invention, in a computer system which manages a plurality of memory areas and allocates them in response to a request , a memory area in a free state is allocated to a memory area in a free state.
First pooling means for pooling and zero-cleared notes
Second pool means for pooling the storage area;
From the control means to the free state scheduled for allocation.
Fetch the memory area, and zero out the contents of the memory area.
Clearing machine that moves to the second pool means
And whether the load on the computer system is low or not.
If the load on the computer system is low upon detection,
First processing means having a load monitoring mechanism for activating the mechanism
When the allocate request is received, the zero is cleared.
When it is determined that a memory area is needed, the second
Allocate the zero-cleared memory area from the pool
And the zero-cleared page is requested
If it is determined that there is no free pool from the first pool means
And a second processing means for allocating a memory area in a state .

【0009】[0009]

【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.

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

【図1】本発明によるメモリ割り当て方式を説明するた
めのブロック図である。
FIG. 1 is a block diagram for explaining a memory allocation method according to the present invention.

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

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 allocate mechanism (page allocator) 6 page requester

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 1/24,9/46 G06F 12/00 - 12/06 G06F 12/16 ──────────────────────────────────────────────────続 き Continued on the front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 1 / 24,9 / 46 G06F 12/00-12/06 G06F 12/16

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のメモリ領域を管理して要求に応じ
てアロケートを行う計算機システムにおいて、フリー状態にあるメモリ領域をプールする第1のプール
手段と、 ゼロクリアされたメモリ領域をプールする第2のプール
手段と、 前記第1のプール手段から前記アロケート予定の前記フ
リー状態にあるメモリ領域を取り出して該メモリ領域の
内容をゼロクリアして前記第2のプール手段に移しかえ
るクリア機構、および、前記計算機システムの負荷が低
いか否かを検知して前記計算機システムの負荷が低いと
前記クリア機構を起動する負荷監視機構を有する第1の
処理手段と、 アロケート要求を受けた際、前記ゼロクリアされたメモ
リ領域が必要とされていると判断すると前記第2のプー
ル手段から前記ゼロクリアされたメモリ領域をアロケー
トし、前記ゼロクリアされたページが要求されていない
と判断すると前記第1のプール手段から前記フリー状態
のメモリ領域をアロケートする第2の処理手段 とを有す
ることを特徴とする計算機システムにおけるメモリ割り
当て方式。
1. A first pool for pooling a memory area in a free state in a computer system that manages a plurality of memory areas and performs allocation in response to a request.
Means and a second pool for pooling zero-cleared memory areas
Means from said first pool means and said file to be allocated.
Fetches the memory area in the
Clear the contents to zero and transfer to the second pool means
And the load on the computer system is low.
If it is detected whether the load of the computer system is low
A first having a load monitoring mechanism for activating the clearing mechanism;
Processing means and, upon receiving an allocate request,
When it is determined that the storage area is needed, the second pool
Allocating the zero-cleared memory area from
And the zero-cleared page is not requested
And the free state is returned from the first pool means.
And a second processing means for allocating the memory area of (1) .
【請求項2】 複数のメモリ領域を管理して要求に応じ
て予め定められた内容を有するメモリ領域のアロケート
を行う計算機システムにおいて、前記計算機システムの
負荷が低いか否かを検知して前記計算機システムの負荷
が低いと特定メモリ領域を定められた内容に書き換え
以後のアロケート要求に対しては、前記定められた内容
に書き換えられたメモリ領域が必要とされていると判断
すると該書き換えられたメモリ領域をアロケートし、前
記定められた内容に書き換えられたページが要求されて
いないと判断すると書き換えられていないメモリ領域を
アロケートする手段を有することを特徴とする計算機シ
ステムにおけるメモリ割り当て方式。
2. A computer system for managing a plurality of memory areas and allocating a memory area having a predetermined content according to a request, wherein the computer system detects whether a load on the computer system is low and detects whether the load on the computer system is low. If the system load is low, the specific memory area is rewritten to the specified content ,
For subsequent allocation requests, the content specified above
Determined that a rewritten memory area is needed
Then, the rewritten memory area is allocated,
A page rewritten to the specified content is requested
If it is determined that there is no
A memory allocation method in a computer system, comprising a means for allocating.
JP9154729A 1997-06-12 1997-06-12 Memory allocation method in computer system Expired - Fee Related JP3061001B2 (en)

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 JPH113271A (en) 1999-01-06
JP3061001B2 true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6244949B2 (en) 2014-01-31 2017-12-13 富士通株式会社 Information processing apparatus, control method, and control program

Also Published As

Publication number Publication date
JPH113271A (en) 1999-01-06

Similar Documents

Publication Publication Date Title
EP1023661B1 (en) Application programming interface enabling application programs to control allocation of physical memory in a virtual memory system
US5410700A (en) Computer system which supports asynchronous commitment of data
US6857047B2 (en) Memory compression for computer systems
JP4718683B2 (en) Method and system for restoring physical memory state when focus is changed between application programs in a computer
CN100458738C (en) Method and system for management of page replacement
US8935456B2 (en) Method and system for integrating database memory management in virtual machines
US5884077A (en) Information processing system and method in which computer with high load borrows processor of computer with low load to execute process
US7206915B2 (en) Virtual space manager for computer having a physical address extension feature
US6983467B2 (en) Application programming interface enabling application programs to group code and data to control allocation of physical memory in a virtual memory system
US5555399A (en) Dynamic idle list size processing in a virtual memory management operating system
US9086921B2 (en) Dynamic database memory management according to swap rates
US8943259B2 (en) Relieving memory pressure in a host using database memory management
US20090172337A1 (en) Cooperative mechanism for efficient application memory allocation
US6366994B1 (en) Cache aware memory allocation
US5920895A (en) Mapped file input/output with delayed zeroing
GB2265734A (en) Free memory cell management system
JPH10254756A (en) Use of three-state reference for managing referred object
US20020194210A1 (en) Method for using non-temporal stores to improve garbage collection algorithm
US5394539A (en) Method and apparatus for rapid data copying using reassigned backing pages
US5860131A (en) Method for providing dynamic cache management in a computer system
US20020073277A1 (en) Data storage system and a method of storing data including a multi-level cache
US6209061B1 (en) Integrated hierarchical memory overlay having invariant address space span that inactivates a same address space span in main memory
EP1031083B1 (en) Apparatus and method of accessing random access memory
JP3061001B2 (en) Memory allocation method in computer system
US5918243A (en) Computer mechanism for reducing DASD arm contention during parallel processing

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080428

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090428

Year of fee payment: 9

FPAY Renewal fee payment (event 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