JP2002049525A - Main storage management system - Google Patents

Main storage management system

Info

Publication number
JP2002049525A
JP2002049525A JP2000236072A JP2000236072A JP2002049525A JP 2002049525 A JP2002049525 A JP 2002049525A JP 2000236072 A JP2000236072 A JP 2000236072A JP 2000236072 A JP2000236072 A JP 2000236072A JP 2002049525 A JP2002049525 A JP 2002049525A
Authority
JP
Japan
Prior art keywords
management table
page
block
management
main 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
Application number
JP2000236072A
Other languages
Japanese (ja)
Other versions
JP3808693B2 (en
Inventor
Tadashi Onuma
忠 大沼
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2000236072A priority Critical patent/JP3808693B2/en
Publication of JP2002049525A publication Critical patent/JP2002049525A/en
Application granted granted Critical
Publication of JP3808693B2 publication Critical patent/JP3808693B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To use the entire area widely and equally even when the capacity of a main storage increases and to suppress the capacity of a table regarding main storage management. SOLUTION: The management table is provided which shows the use states of blocks of large capacity while the main storage is divided into the blocks and each management block is provided with bits as many as all pages to which one bit each showing the use state of the corresponding page is assigned while the corresponding block is divided into the pages of small capacity. A main storage management part which specifies and allocates different blocks in order at requests for the allocation of the mains storage area retrieves a management table corresponding to a specified block at a request to obtain a usable page position and areas for a necessary number of pages, and updates the states of each bit of the pages in the corresponding management table.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はコンピュータシステ
ムにおいてプログラムの実行領域及びデータ領域の割当
てと戻しを動的に管理する主記憶管理方式に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a main storage management system for dynamically managing allocation and return of a program execution area and a data area in a computer system.

【0002】近年,コンピュータシステムの大規模化及
び大容量化の要求に伴い,主記憶の容量は増加の一途を
たどっている。従来行われていた主記憶管理方式では,
割当て領域の偏りや管理テーブル容量の増加を招いてお
り,これを防止するために主記憶を効率良く管理しなけ
ればならない。
[0002] In recent years, with the demand for large-scale and large-capacity computer systems, the capacity of main memory has been steadily increasing. In the conventional main memory management method,
This causes an uneven allocation area and an increase in the capacity of the management table. To prevent this, the main memory must be managed efficiently.

【0003】[0003]

【従来の技術】図9は従来例の説明図であり,図中,8
0は主記憶,81は管理テーブルである。図9に示す従
来例の情報処理装置の主記憶80は,全体を固定の記憶
容量の単位により分割して管理しており,この説明では
1単位(ページという)を4KB(キロバイト)とし,
主記憶80全体がnページ分(例えば,n=250)の
容量を持つものとする。主記憶80を管理するための管
理テーブル81には,主記憶80の各ページに対応して
そのページを使用するタスクの識別符号(図9の例で
は,A,Bで表す)を格納する領域が設けられ,タスク
の個数が256以下であれば,識別符号長は1バイト
(8ビット)で構成される。なお,主記憶80の使用さ
れてない(空き)状態のページに対応する管理テーブル
81の領域には,空きを表示する情報が設定される。
2. Description of the Related Art FIG. 9 is an explanatory view of a conventional example.
0 is a main memory and 81 is a management table. The main memory 80 of the information processing apparatus of the conventional example shown in FIG. 9 is managed by dividing the whole in units of fixed storage capacity. In this description, one unit (called a page) is 4 KB (kilobytes).
It is assumed that the entire main memory 80 has a capacity of n pages (for example, n = 250). The management table 81 for managing the main memory 80 stores an identification code (represented by A and B in the example of FIG. 9) of a task using the page corresponding to each page of the main memory 80. If the number of tasks is 256 or less, the identification code length is composed of 1 byte (8 bits). In the area of the management table 81 corresponding to an unused (empty) page of the main memory 80, information for displaying the empty is set.

【0004】このような主記憶80に対して,プログラ
ムの処理によりタスクが主記憶80の領域を使用する要
求が発生すると,図示されないOS(オペレーティング
システム)の制御により,管理テーブル81を検索し
て,使用中の領域に続く空き領域が見つかると,そこか
ら要求された容量を満たすページ数(4KBの倍数)を
獲得すると,管理テーブル81の獲得した各ページに対
応する領域に当該タスクの識別符号を書き込む。以下,
各タスクからの要求に応じて同様の方法で必要な記憶領
域がページ単位で順に割り当てられる。図9の例では,
先頭から3ページ分(4KB×3=12KB)がタスク
Aにより使用され,その後の6ページ分がタスクBによ
り使用されている。記憶領域の使用が終了して解放され
ると,管理テーブル81の各ページに対応する領域に
は,未使用状態を表す情報を設定して戻す処理が行われ
る。
When a task requests a use of the area of the main memory 80 by the processing of the program in the main memory 80, the management table 81 is searched by the control of an operating system (OS) (not shown). When a free area following the used area is found, the number of pages (a multiple of 4 KB) that satisfies the requested capacity is acquired. Write. Less than,
In accordance with a request from each task, necessary storage areas are sequentially allocated in page units in a similar manner. In the example of FIG.
The first three pages (4 KB × 3 = 12 KB) are used by task A, and the subsequent six pages are used by task B. When the use of the storage area is completed and released, the area corresponding to each page of the management table 81 is set and returned with information indicating an unused state.

【0005】[0005]

【発明が解決しようとする課題】近年,主記憶の容量は
増大する傾向にあるが,上記図9により説明した従来の
技術によれば,記憶容量が増大しても主記憶は,先頭か
ら順番に各タスクに対して割当てられても,それらの使
用が終了すると未使用の状態に戻されて,先頭付近の記
憶領域が繰り返して使用されて,主記憶の全体を満遍な
く使用することがない。
In recent years, the capacity of the main memory has tended to increase. However, according to the conventional technique described with reference to FIG. However, when they are assigned to each task, they are returned to the unused state when their use ends, and the storage area near the head is repeatedly used, so that the entire main memory is not used evenly.

【0006】一方,記憶装置の正常性をチェックするに
は,記憶領域の全体について書き込み,読み出しを行う
ことにより実現されるが,上記の従来の主記憶の管理方
法によれば,管理テーブルの容量が増大するが主記憶の
一部の領域だけを偏って頻繁に使用することになり,主
記憶の正常性をチェックすることができないという問題
があった。また,各ページ単位で使用するプログラムの
識別符号を格納するために所定領域(図9では1バイ
ト)を使用するため主記憶の容量の増大に対応して管理
テーブルの容量も増えるという問題があった。
On the other hand, the normality of the storage device can be checked by writing and reading the entire storage area. According to the above-described conventional main storage management method, the capacity of the management table is reduced. However, there is a problem that the normality of the main memory cannot be checked because only a partial area of the main memory is used frequently. Further, since a predetermined area (1 byte in FIG. 9) is used to store the identification code of the program used in each page unit, there is a problem that the capacity of the management table also increases in response to the increase in the capacity of the main memory. Was.

【0007】本発明は主記憶の容量が増えても全体の領
域を広く均等に使用すると共に管理のためのテーブルの
容量を抑制することができる主記憶管理方式を提供する
ことを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a main memory management system which can use the entire area widely and evenly even if the capacity of the main memory increases, and can suppress the capacity of a table for management.

【0008】[0008]

【課題を解決するための手段】本発明は主記憶容量が増
加しても複数の管理テーブルを用い領域の割当て毎に管
理テーブルを変化させることで割当て領域の偏りをなく
し,管理テーブルはページ毎に1ビットのデータで管理
し,割当てアドレスと領域の関係を別に管理すること
で,上記の問題を解決した。
According to the present invention, even if the main storage capacity is increased, a plurality of management tables are used to change the management table for each area allocation, thereby eliminating the bias of the allocated area. The above problem was solved by managing the data with 1-bit data and separately managing the relationship between the assigned address and the area.

【0009】図1は本発明の原理構成を示す図である。
図中,1はGB(ギガバイト)単位の大容量xの主記
憶,1−0,1−1,…,1−nは主記憶1を拾数MB
(メガバイト)単位程度の容量yで分割してn+1個設
けられたブロック,2−0〜2−nは主記憶1を分割し
た各ブロック1−0〜1−nに対応して個別に設けら
れ,各ブロックを小容量(例えば,数KB単位程度)の
ページで分割して,各ページの配列順に1ビットを割り
当てて使用/空の状態を表した管理テーブルである。3
は主記憶管理部であり,3aはテーブル検索手段であ
り,割当て要求が発生する毎に,複数の管理テーブルの
中から一つを順番に割当て,その管理テーブルにより空
き領域を検索して割当てを行う手段であり,3bはテー
ブル設定手段である。3cは前回領域割当てを行ったブ
ロック番号(管理テーブル番号)の次の番号を保持する
番号保持部である。4はページ位置テーブルであり,各
管理テーブル内のそれぞれにおける使用可能なページ位
置が設定され,4−0〜4−nは各管理テーブル2−0
〜2−nに対応したページ位置である。5は記憶領域の
戻しを管理するのに有効なアドレス管理テーブルであ
り,使用した記憶領域の位置や,使用ページ数と共にそ
の領域を使用したプログラム(タスク)の識別符号を含
む。
FIG. 1 is a diagram showing the principle configuration of the present invention.
In the figure, 1 is a main memory of a large capacity x in GB (gigabyte) units, 1-0, 1-1,...
(N + 1) blocks divided by a capacity y of about (megabyte) unit, and 2-0 to 2-n are provided individually corresponding to the blocks 1-0 to 1-n obtained by dividing the main memory 1. , Is a management table in which each block is divided into small-capacity pages (for example, on the order of several KB), and one bit is allocated in the arrangement order of each page to indicate the used / empty state. 3
Is a main memory management unit, and 3a is a table search means. Each time an allocation request is issued, one of a plurality of management tables is allocated in order, and a free area is searched by the management table to perform allocation. 3b is a table setting means. Reference numeral 3c denotes a number holding unit that holds a number next to the block number (management table number) for which the area was previously allocated. Reference numeral 4 denotes a page position table in which usable page positions in each management table are set. Reference numerals 4-0 to 4-n denote each management table 2-0.
Page positions corresponding to .about.2-n. Reference numeral 5 denotes an address management table effective for managing the return of the storage area, which includes the position of the used storage area, the number of used pages, and the identification code of the program (task) using the area.

【0010】主記憶管理部3は,プログラムからの記憶
領域の割当て要求により起動すると,テーブル検索手段
3aは,主記憶1をブロック単位で分割した各領域に対
応して設けられた管理テーブル2−0〜2−nの中か
ら,今回の領域割当てのブロック番号を番号保持部3c
から取出し,管理テーブル2−0〜2−nの中から取出
した番号に対応する一つの管理テーブル(2−1とす
る)のビットを検索して,“1”(使用中を表す)の後
に“0”が連続して設定されていることを検出すると,
その先頭のビット位置を識別することで,主記憶1内の
検出した番号のブロック内の検索により得られた「ビッ
ト位置」をページ位置として求めることができ,該当す
る位置から割当てを要求されたページ数分を割当て,テ
ーブル設定手段3bにより当該管理テーブル2−1の割
当てられたページ数分のビットを未使用を表す“0”か
ら使用中を表す“1”に設定する。また,番号保持部3
cの値は更新(+1)され,次の記憶領域の割当て要求
が発生すると,次のブロック(管理テーブル番号)につ
いて領域の割当てが行われる。なお,領域の使用が終了
した場合は,割当てられた主記憶の領域を開放するた
め,管理テーブル2の対応するぺージの状態を使用中か
ら空きの状態に設定される。
When the main memory management unit 3 is started by a storage area allocation request from a program, the table search unit 3a operates the management table 2 provided for each area obtained by dividing the main memory 1 into blocks. The number holding unit 3c stores the block number of the current area allocation from 0 to 2-n.
From the management table 2-0 to 2-n, the bit of one management table (referred to as 2-1) corresponding to the number taken out is searched, and after "1" (indicating busy) is retrieved. When detecting that “0” is set continuously,
By identifying the head bit position, the "bit position" obtained by searching the block of the detected number in the main memory 1 can be obtained as the page position, and allocation is requested from the corresponding position. The number of pages is assigned, and the table setting means 3b sets bits of the assigned number of pages of the management table 2-1 from "0" indicating unused to "1" indicating used. Also, the number holding unit 3
The value of c is updated (+1), and when a next storage area allocation request occurs, area allocation is performed for the next block (management table number). When the use of the area has been completed, the state of the corresponding page in the management table 2 is set from in use to free in order to release the allocated main storage area.

【0011】また,ページ位置テーブル4には,各ブロ
ック1−0〜1−nに対応する各管理テーブル2−0〜
2−n内のそれぞれの空きページの先頭位置(アドレ
ス)が設定されており,上記の管理テーブル2−0〜2
−nの内容を検索する手間を無くし,ページ位置テーブ
ル4の中から管理テーブルの番号に対応するページ位置
を検出すれば良い。記憶領域が割当てられると,ページ
位置テーブル4の該当する管理テーブルに対応するペー
ジ位置を割当てられたページ数だけ更新(加算)する。
更に,主記憶1の記憶領域が割当てられた場合,その割
当てを受けたプログラム(タスク)の識別符号と,割当
てられたページのアドレスやページ数をアドレス管理テ
ーブル5に格納する。アドレス管理テーブル5は,割当
てを受けるプログラム(タスク)毎に多数個設けられ
る。
The page position table 4 includes management tables 2-0 to 0-n corresponding to the blocks 1-0 to 1-n.
2-n, the start position (address) of each free page is set, and the management tables 2-0 to 2-2 are set.
It is only necessary to detect the page position corresponding to the management table number from the page position table 4 without the trouble of searching for the content of −n. When the storage area is allocated, the page position corresponding to the corresponding management table in the page position table 4 is updated (added) by the number of allocated pages.
Further, when the storage area of the main memory 1 is allocated, the identification code of the allocated program (task), the address of the allocated page and the number of pages are stored in the address management table 5. A large number of address management tables 5 are provided for each program (task) to be assigned.

【0012】[0012]

【発明の実施の形態】図2は主記憶の具体例に対応する
管理テーブルの構成例である。この例では,主記憶1が
2GB(ギガバイト)の容量(図1においてx=2×2
30B(バイト)の場合)を備え,1ブロックが16MB
(メガバイト)の容量(図1においてy=16×220
の場合)を備えているものとする。この場合,主記憶1
は,2GB/16MB=128であるから,128ブロ
ックに分割することができ(図1において,n=12
7),従って管理テーブルは符号2−0〜2−127で
表す合計128個設けられる。
FIG. 2 shows a configuration example of a management table corresponding to a specific example of a main memory. In this example, the main memory 1 has a capacity of 2 GB (gigabytes) (x = 2 × 2 in FIG. 1).
30 B (byte)), one block is 16 MB
(Megabyte) capacity (y = 16 × 2 20 B in FIG. 1)
Case). In this case, the main memory 1
Since 2 GB / 16 MB = 128, it can be divided into 128 blocks (n = 12 in FIG. 1).
7) Therefore, a total of 128 management tables represented by reference numerals 2-0 to 2-127 are provided.

【0013】この各ブロックを4KB(正確には409
6B)の容量からなるページにより分割すると,16M
B/4KB=4096ページとなり,1ブロックは40
96ページで構成され,管理テーブルにより各ページの
状態(使用中/空き)を1ビットで表すと,各ブロック
に対応する各管理テーブル2−0〜2−127はそれぞ
れ4096ビット(512B)の容量となる。
Each block is divided into 4 KB (more precisely, 409
6B), 16M
B / 4KB = 4096 pages, one block is 40
When the management table is composed of 96 pages and the status of each page (in use / empty) is represented by one bit in the management table, each of the management tables 2-0 to 2-127 corresponding to each block has a capacity of 4096 bits (512 B). Becomes

【0014】図3は管理テーブル内の領域の位置を表す
ページ位置テーブルの構成例を示し,図4は割当てアド
レスと割当てを受けたタスクの関係を示すアドレス管理
テーブルの構成例である。
FIG. 3 shows an example of the structure of a page position table indicating the position of an area in the management table. FIG. 4 shows an example of the structure of an address management table showing the relationship between the assigned addresses and the tasks to which the tasks have been assigned.

【0015】上記図2に示す管理テーブルの構成例の場
合,各管理テーブルは4096ビットであり,更に12
8個の管理テーブル全体の中のどのビット位置(管理テ
ーブル番号を含むページ番号)であるかを表すためのア
ドレス長は,2バイト(16ビット)が必要になる。図
3のページ位置テーブルには,複数の管理テーブル2−
0〜2−127の各ページ位置を表す2バイトが格納さ
れ,合計2B×128=256Bで構成され,図3では
各ページ位置は16進表示(0x で表す)の4桁の数値
で表示されている。
In the case of the configuration example of the management table shown in FIG. 2, each management table has 4096 bits, and further has 12 bits.
The address length for indicating which bit position (page number including the management table number) in the entire eight management tables is required is 2 bytes (16 bits). The page position table of FIG.
2 bytes representing each page position of 0~2-127 is stored, is a total of 2B × 128 = 256B, each page position in FIG. 3 is displayed in the four-digit number of hexadecimal notation (represented by 0 x) Have been.

【0016】主記憶の領域を使用したプログラム(タス
ク)が,使用後に領域を開放して元に戻す(空き領域に
する)処理を忘れる等の状態を調査するのに必要な情報
を格納したアドレス管理テーブルの構成例を図4に示
す。このアドレス管理テーブルは,記憶領域の割当て毎
に生成され,各割当てに対応して,割当てアドレス(4
バイト),プログラムまたはタスクを表す識別ID(2
バイト),当該割当てで使用するページ数(2バイト)
である。アドレス管理テーブルの容量は,最大割当て個
数をm個とした場合,m×8バイトとなる。
An address storing information necessary for investigating a state in which a program (task) using the area of the main memory forgets the process of releasing the area after use and returning the area to its original state (making it a free area). FIG. 4 shows a configuration example of the management table. This address management table is generated for each storage area allocation, and the allocated address (4
Byte), identification ID (2
Bytes), the number of pages used in the allocation (2 bytes)
It is. The capacity of the address management table is m × 8 bytes, where the maximum number assigned is m.

【0017】図5は管理テーブルとページ位置テーブル
の関係を示す。図5には上記図2に示す管理テーブルの
中の一つの管理テーブル2−nと対応するページ位置テ
ーブル4内のページ位置4−nの例が示される。
FIG. 5 shows the relationship between the management table and the page position table. FIG. 5 shows an example of the page position 4-n in the page position table 4 corresponding to one of the management tables 2-n in the management table shown in FIG.

【0018】管理テーブルnは上記したように4096
ビットで16MBのブロックを管理することが可能であ
る。このブロックの中で領域が割当てられていない状態
では,全て“0”となっている。領域の割当て要求があ
った場合,0番地から順番に領域を探索してゆく方法が
一般的であるが,本発明によるページ位置テーブルに記
述されているページ位置から探索を行う。
The management table n is 4096 as described above.
It is possible to manage a 16 MB block with bits. In a state where no area is allocated in this block, all are "0". When an area allocation request is issued, a method of searching for an area sequentially from address 0 is generally used, but the search is performed from a page position described in a page position table according to the present invention.

【0019】図5のA.は,ページ位置テーブル4の中
の管理テーブルnに対応するページ位置4−nとして
“8”が設定されている状態を表す。この状態の時,ユ
ーザプログラムからの要求ページ数が“4”であり,管
理テーブル2−nが割当てられたものとする。これによ
り図5のB.に示すように管理テーブル2−nの8番目
から4ページ分の領域が確保されることで,管理テーブ
ル2−nの該当する位置が“0”から“1”に書き換え
られ,これに対応するページ位置テーブルのページ位置
4−nの値も8+4=12となり,次回獲得要求がある
と12番目から探索する。
FIG. Indicates a state in which “8” is set as the page position 4-n corresponding to the management table n in the page position table 4. In this state, it is assumed that the number of pages requested from the user program is "4" and the management table 2-n has been allocated. Thereby, B. of FIG. As shown in (2), by securing an area for the fourth page from the eighth in the management table 2-n, the corresponding position in the management table 2-n is rewritten from "0" to "1", which corresponds to this. The value of the page position 4-n in the page position table is also 8 + 4 = 12, and when there is a next acquisition request, the search is performed from the twelfth position.

【0020】このように,ページ位置テーブルは管理テ
ーブルの探索を開始する位置を示しており,要求ページ
数が獲得された場合,要求ページ分更新する。従って,
次回の探索では管理テーブルの先頭から探索する必要が
ないため,探索時間が短縮される。
As described above, the page position table indicates the position at which the search of the management table is started. When the number of requested pages has been acquired, the number of requested pages is updated. Therefore,
Since it is not necessary to search from the top of the management table in the next search, the search time is reduced.

【0021】図6は主記憶の領域割当て及び解除の処理
フローである。図中,30〜33は上記図1の主記憶管
理部3に対応するソフトウェアであり,30はユーザプ
ログラム,31はSVC(Supervisery Call:スーパー
バイザリ呼出)割り込みハンドラ,32はメモリ獲得処
理,33はメモリ開放処理である。
FIG. 6 is a flow chart of the process for allocating and releasing the main storage area. In the figure, reference numerals 30 to 33 denote software corresponding to the main memory management unit 3 in FIG. 1, 30 is a user program, 31 is an SVC (Supervisery Call) interrupt handler, 32 is a memory acquisition process, and 33 is a memory acquisition process. This is memory release processing.

【0022】主記憶領域の割当ての要求がユーザプログ
ラム30で発生すると,OS(オペレーティングシステ
ム)とユーザプログラムが共通に参照する固定領域(プ
リフイックス)30a内のパラメータ域へ当該ユーザプ
ログラムが使用することができる記憶領域のデータを設
定する(図6の30内のS1)。この処理はマルチプロ
セッサで動作する場合に記憶領域が競合しないようにす
るためである。次にメモリ獲得のSVCを発行する(図
6の30内のS2)。これにより,SVC割り込みハン
ドラ31が駆動され,SVCコードをデコードする処理
が行われ(図6の31内のS7),メモリ獲得処理であ
るか判別し(同S8),イエスである場合,メモリ獲得
処理に移行する(同S9)。図6のメモリ獲得処理32
では,固定領域30aのパラメータ域からデータを得て
(図6の32内のS12),領域を獲得し(同S1
3),固定領域のパラメータ域へ獲得アドレスを設定し
(同S14),SVC割込みハンドラへ復帰する(同S
15)。領域の獲得処理は,主記憶管理部により上記図
2,図3に示す管理テーブル,ページ位置テーブルを用
い,図5に示す方法により行う。また,領域獲得をした
後に図4のアドレス管理テーブルへの登録が行われる。
When a request for allocating a main storage area occurs in the user program 30, the user program may use the parameter area in the fixed area (prefix) 30a which is commonly referred to by the OS (operating system) and the user program. The storage area data that can be set is set (S1 in 30 in FIG. 6). This processing is performed so that storage areas do not conflict when operating with a multiprocessor. Next, an SVC for acquiring memory is issued (S2 in 30 in FIG. 6). As a result, the SVC interrupt handler 31 is driven, a process for decoding the SVC code is performed (S7 in 31 in FIG. 6), and it is determined whether the process is a memory acquisition process (S8). The process proceeds to (S9). Memory acquisition processing 32 of FIG.
Then, data is obtained from the parameter area of the fixed area 30a (S12 in 32 in FIG. 6), and the area is obtained (S1 in FIG.
3), the acquired address is set in the parameter area of the fixed area (S14), and the process returns to the SVC interrupt handler (S14).
15). The area acquisition processing is performed by the main memory management unit by the method shown in FIG. 5 using the management table and the page position table shown in FIGS. After the area is obtained, registration in the address management table of FIG. 4 is performed.

【0023】SVC割り込みハンドラ31では,メモリ
獲得処理が終了するとユーザプログラムへの復帰が行わ
れ(図6の31内のS11),ユーザプログラムでは固
定領域のパラメータ域のデータをユーザプログラムの領
域へ退避し(図6の30内のS3),処理を実施して
(同S4),固定領域のパラメータ域へデータを設定し
(同S5),メモリ開放SVCを発行する(同S6)。
これにより,SVC割り込みハンドラ31が起動し,S
VCコードをデコードして(図6の31内のS7),デ
コードの結果がメモリ獲得処理かを判別し(同S8),
ノーであると判別されてメモリ開放処理に移行する(同
S10)。メモリ開放処理では,固定領域のパラメータ
域から獲得時に設定した獲得アドレスのデータを得て
(図6の33のS16),その領域を開放し(同S1
7),SVC割り込みハンドラに復帰する(同S1
8)。領域開放の処理も,主記憶管理部において上記図
2〜図4に対して未使用状態に戻す制御を行う。SVC
割り込みハンドラからユーザプログラムへ復帰すること
で,メモリ開放の処理を終了する。
The SVC interrupt handler 31 returns to the user program when the memory acquisition processing is completed (S11 in 31 in FIG. 6). In the user program, the data in the parameter area of the fixed area is saved to the area of the user program. Then (S3 in 30 in FIG. 6), the process is performed (S4), data is set in the parameter area of the fixed area (S5), and a memory release SVC is issued (S6).
As a result, the SVC interrupt handler 31 is activated,
The VC code is decoded (S7 in 31 in FIG. 6), and it is determined whether the decoding result is a memory acquisition process (S8).
It is determined to be no, and the process proceeds to the memory release process (S10). In the memory release processing, data of the acquisition address set at the time of acquisition is obtained from the parameter area of the fixed area (S16 of 33 in FIG. 6), and the area is released (S1 in FIG. 6).
7), return to the SVC interrupt handler (S1)
8). Also in the area release processing, the main memory management unit performs control to return to the unused state with respect to FIGS. SVC
Returning from the interrupt handler to the user program ends the memory release processing.

【0024】本発明による管理テーブル,ページ位置テ
ーブルを用いて大容量の主記憶のランニング試験を広範
囲について効率的に行うことができる。
A running test of a large-capacity main memory can be efficiently performed over a wide range using the management table and the page position table according to the present invention.

【0025】図7はランニング試験における領域の獲得
と開放の処理フローであり,図8にランニング試験にお
ける管理テーブルとページ位置テーブルの関係を示す。
FIG. 7 is a processing flow for acquiring and releasing an area in the running test, and FIG. 8 shows the relationship between the management table and the page position table in the running test.

【0026】試験プログラムに与える領域は現在の管理
テーブルの位置(0〜n)とそれぞれの管理テーブルに
対応するページ位置で決定される。最初にループ番号と
して1を入れ(図7のS1),管理テーブルを初期化す
る(同S2)。次に現在の管理テーブルの位置をループ
番号により決定する(図7のS3)。これにより,複数
ブロックの中から試験の対象となるブロック番号が決定
し,この例では,ループ番号1に対応する管理テーブル
1に決定される。続いて全てのページ位置テーブルをル
ープ番号(この時1)で初期化し(図7のS4),必要
な領域を確保する(同S5)。必要な領域は,任意に指
定することができ,複数の領域(同じ管理テーブル内の
連続した複数箇所の領域)を確保する。
The area given to the test program is determined by the current management table position (0 to n) and the page position corresponding to each management table. First, 1 is entered as the loop number (S1 in FIG. 7), and the management table is initialized (S2). Next, the current position of the management table is determined by the loop number (S3 in FIG. 7). As a result, the block number to be tested is determined from the plurality of blocks, and in this example, is determined in the management table 1 corresponding to the loop number 1. Subsequently, all the page position tables are initialized with the loop number (1 at this time) (S4 in FIG. 7), and a necessary area is secured (S5). The necessary area can be arbitrarily specified, and a plurality of areas (areas at a plurality of continuous places in the same management table) are secured.

【0027】続いて,確保された領域について,リー
ド,ライト等の試験を実行し(図7のS6),試験で使
用した領域を全て開放し(同S7),対象とした領域に
ついての試験が終了したか判別し(同S8),終了しな
い場合はループ番号に1を足し(同S9),S3に戻
る。これにより,次に管理テーブル2について,対応す
るページ位置テーブル(ステップS4で2に初期化され
ている)により必要な領域を確保して,試験を行い,以
下順番に各管理テーブルについて同様の試験が行われ
る。そして,試験が終了した時点では全ての領域が開放
されているため,現在の管理テーブルの位置とページ位
置をループ番号から決定することでループ番号が同一で
あれば獲得する領域のアドレスも同一となる。
Subsequently, a test such as read and write is executed for the secured area (S6 in FIG. 7), all the areas used in the test are released (S7), and the test for the target area is performed. It is determined whether the process has been completed (S8), and if not completed, 1 is added to the loop number (S9), and the process returns to S3. Thereby, for the management table 2, a necessary area is secured by a corresponding page position table (initialized to 2 in step S4), and a test is performed. Is performed. When the test is completed, all the areas are open. Therefore, the current management table position and the page position are determined from the loop number, so that if the loop number is the same, the address of the acquired area is also the same. Become.

【0028】図8は上記のランニング試験の最初の状態
を表す。すなわち,上記図7のS1によりループ番号が
1に設定された,最初のサイクルでは,全てのページ位
置テーブル4−0〜4−nが1に設定され,管理テーブ
ル2−0〜2−nについてもループ番号(最初は1番に
設定)により管理テーブル2−1が設定され,この管理
テーブル2−1に対応するページ位置テーブル4−1の
値1を用いて領域を確保して試験を行う。また,1サイ
クル毎に全ての領域が初期化されて,各ブロックについ
てループ番号に応じて管理テーブル,ページ位置テーブ
ルの位置を一意に決めて領域の確保と試験内容も変えて
実施することができる。また,試験においてエラーが検
出されると,同じループ番号に戻して試験を行うと同じ
条件を再現することができる。
FIG. 8 shows an initial state of the above-mentioned running test. That is, in the first cycle in which the loop number is set to 1 in S1 of FIG. 7, all the page position tables 4-0 to 4-n are set to 1 and the management tables 2-0 to 2-n are set. Also, a management table 2-1 is set according to the loop number (first set to number 1), and a test is performed by securing an area using the value 1 of the page position table 4-1 corresponding to the management table 2-1. . In addition, all areas are initialized for each cycle, and the positions of the management table and the page position table are uniquely determined for each block according to the loop number, and the area can be secured and the test content can be changed. . If an error is detected in the test, the same condition can be reproduced by returning to the same loop number and performing the test.

【0029】(付記1)主記憶を大容量のブロックで分
割し,各ブロックに対応してブロックの使用状態を表す
管理テーブルを設け,各管理テーブルは,対応する前記
ブロックを小容量のページ単位に分割して各ページに対
しその使用状態を表す1ビットが割当てられた全ページ
分のビットが設けられ,主記憶領域の割当て要求に対し
順次異なるブロックを指定して割当てを行う主記憶管理
部を備え,前記主記憶管理部は,要求に応じて指定され
たブロックに対応する管理テーブルを検索して,使用可
能なページ位置と,必要ページ数分の領域を獲得して,
該当する管理テーブルのぺージの各ビットの状態を更新
することを特徴とする主記憶管理方式。
(Supplementary Note 1) The main memory is divided into large-capacity blocks, and a management table indicating the use state of the blocks is provided corresponding to each block. Each management table stores the corresponding blocks in units of small-capacity pages. A main memory management unit that is provided with bits for all pages in which one bit indicating the use state is allocated to each page, and sequentially specifies different blocks in response to a main storage area allocation request. The main memory management unit searches the management table corresponding to the designated block in response to the request, and obtains an available page position and an area for the required number of pages,
A main storage management method characterized by updating the state of each bit of a corresponding management table page.

【0030】(付記2)付記1において,前記主記憶の
各ブロックに対応して設けられた各管理テーブル内の割
当て可能なページ位置を格納したページ位置テーブルを
設け,前記主記憶管理部は,割当て要求により指定され
たブロックに対応する前記ページ位置テーブルを検出し
て,要求されたページ数分の領域を獲得することを特徴
とする主記憶管理方式。
(Supplementary note 2) In Supplementary note 1, there is provided a page position table storing the assignable page positions in each management table provided corresponding to each block of the main memory, and the main memory management unit A main storage management method characterized by detecting the page position table corresponding to a block specified by an allocation request and acquiring an area for the requested number of pages.

【0031】(付記3)付記1または2の何れかにおい
て,前記主記憶の割当て要求に応じて記憶領域の割当て
を受けると,前記要求を行ったプログラムまたはタスク
を表す識別符号と,割当てられたページ位置及びページ
数とを含むアドレス管理テーブルを各記憶領域の割当て
毎に生成することを特徴とする主記憶管理方式。
(Supplementary note 3) In any one of Supplementary notes 1 and 2, when a storage area is allocated in response to the main memory allocation request, an identification code indicating the program or task that has made the request is assigned to the storage area. A main storage management method, wherein an address management table including a page position and the number of pages is generated for each storage area allocation.

【0032】(付記4)主記憶を所定の大容量のブロッ
クで分割し,各ブロックに対応してブロックの使用状態
を表した管理テーブルを設け,各管理テーブルは,対応
する前記ブロックを小容量のページ単位に分割して各ペ
ージに対し1ビットの使用状態を割当てた全ページ分の
ビットが設定され,各管理テーブル内の割当て可能ペー
ジの位置を格納したページ位置テーブルを備え,前記主
記憶をランニング試験するため,ループ番号を決定し,
一意に決定するループ番号から管理テーブルの位置及び
管理テーブル内のページ位置テーブルを決定して,割当
てアドレスを一意に決定することを特徴とする主記憶管
理方式。
(Supplementary Note 4) The main memory is divided by a predetermined large-capacity block, and a management table indicating the use state of the block is provided corresponding to each block. A page position table storing the positions of allocatable pages in each management table, wherein a bit is set for all pages in which one bit of use status is allocated to each page by dividing each page into To perform a running test, determine the loop number,
A main storage management method characterized by determining a position of a management table and a page position table in the management table from a loop number uniquely determined, and uniquely determining an assigned address.

【0033】[0033]

【発明の効果】本発明によればコンピュータシステムで
のプログラムの実行領域とデータ領域の割当てと戻しを
動的に管理する場合に,割当て領域の偏りを無くし,主
記憶を効率良く使用することができる。
According to the present invention, when dynamically allocating and returning a program execution area and a data area in a computer system, it is possible to eliminate the bias of the allocated area and efficiently use the main memory. it can.

【0034】また,主記憶の動的管理するために使用す
る管理のためのテーブルの容量を削減することができ
る。具体的には,2GB(ギガバイト)の空間を従来方
式(4KBで分割し,各4KBについて1バイトの管理
データを設ける)の場合では,2GB/4KB=512
KB要するのに対し,本発明によれば,管理テーブルに
64KB(=2GB/4KB/8B),ページ位置テー
ブルに256B(2GB/16MB×2B),アドレス
管理テーブルに64KB(8192×8バイト)で,合
計129KBとなり,従来方式に比べて約1/4の削減
が可能となる。
Further, the capacity of a management table used for dynamically managing the main storage can be reduced. More specifically, in the case of the conventional system in which a 2 GB (gigabyte) space is divided by 4 KB and one byte of management data is provided for each 4 KB, 2 GB / 4 KB = 512
According to the present invention, 64 KB (= 2 GB / 4 KB / 8 B) is used in the management table, 256 B (2 GB / 16 MB × 2 B) is used in the page position table, and 64 KB (8192 × 8 bytes) is used in the address management table. , 129 KB in total, making it possible to reduce about 4 of the conventional method.

【0035】更に,本発明により主記憶のランニング試
験を実施した場合,管理テーブルや,管理テーブル内の
ページ位置を一意に決定することが可能となる。
Further, when the running test of the main memory is performed according to the present invention, it is possible to uniquely determine the management table and the page position in the management table.

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

【図1】本発明の原理構成を示す図である。FIG. 1 is a diagram showing the principle configuration of the present invention.

【図2】主記憶の具体例に対応する管理テーブルの構成
例を示す図である。
FIG. 2 is a diagram illustrating a configuration example of a management table corresponding to a specific example of a main storage;

【図3】管理テーブル内の領域の位置を表すページ位置
テーブルの構成例を示す図である。
FIG. 3 is a diagram illustrating a configuration example of a page position table indicating a position of an area in a management table.

【図4】割当てアドレスと割当てを受けたタスクの関係
を示すアドレス管理テーブルの構成例を示す図である。
FIG. 4 is a diagram illustrating a configuration example of an address management table indicating a relationship between an assigned address and an assigned task;

【図5】管理テーブルとページ位置テーブルの関係を示
す図である。
FIG. 5 is a diagram illustrating a relationship between a management table and a page position table.

【図6】主記憶の領域割当て及び解除の処理フローを示
す図である。
FIG. 6 is a diagram showing a processing flow of main memory area allocation and release.

【図7】ランニング試験における領域の獲得と開放の処
理フローを示す図である。
FIG. 7 is a diagram showing a processing flow of acquiring and releasing an area in a running test.

【図8】ランニング試験における管理テーブルとページ
位置テーブルの関係を示す図である。
FIG. 8 is a diagram showing a relationship between a management table and a page position table in a running test.

【図9】従来例の説明図である。FIG. 9 is an explanatory diagram of a conventional example.

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

1 主記憶 1-0 〜1-n ブロック 2-0 〜2-n 管理テーブル 3 主記憶管理部 3a テーブル検索手段 3b テーブル設定手段 3c 番号保持部 4 ページ位置テーブル 4-0 〜4-n ページ位置 5 アドレス管理テーブル 1 Main memory 1-0 to 1-n Block 2-0 to 2-n Management table 3 Main memory management unit 3a Table search unit 3b Table setting unit 3c Number holding unit 4 Page position table 4-0 to 4-n Page position 5 Address management table

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 主記憶を大容量のブロックで分割し,各
ブロックに対応してブロックの使用状態を表す管理テー
ブルを設け,各管理テーブルは,対応する前記ブロック
を小容量のページ単位に分割して各ページに対しその使
用状態を表す1ビットが割当てられた全ページ分のビッ
トが設けられ,主記憶領域の割当て要求に対し順次異な
るブロックを指定して割当てを行う主記憶管理部を備
え,前記主記憶管理部は,要求に応じて指定されたブロ
ックに対応する管理テーブルを検索して,使用可能なペ
ージ位置と,必要ページ数分の領域を獲得して,該当す
る管理テーブルのぺージの各ビットの状態を更新するこ
とを特徴とする主記憶管理方式。
1. A main memory is divided into large-capacity blocks, and a management table indicating a use state of a block is provided corresponding to each block. Each management table divides the corresponding block into small-capacity page units. And a main memory management unit for sequentially allocating by designating different blocks in response to a request for allocating a main storage area. The main memory management unit searches the management table corresponding to the designated block in response to the request, acquires an available page position and an area for the required number of pages, and obtains a page of the corresponding management table. A main memory management method characterized by updating the state of each bit of a page.
【請求項2】 請求項1において,前記主記憶の各ブロ
ックに対応して設けられた各管理テーブル内の割当て可
能なページ位置を格納したページ位置テーブルを設け,
前記主記憶管理部は,割当て要求により指定されたブロ
ックに対応する前記ページ位置テーブルを検出して,要
求されたページ数分の領域を獲得することを特徴とする
主記憶管理方式。
2. A page position table according to claim 1, wherein an assignable page position in each management table provided corresponding to each block of said main storage is stored.
The main storage management method according to claim 1, wherein the main storage management unit detects the page position table corresponding to the block specified by the allocation request, and acquires an area corresponding to the requested number of pages.
【請求項3】 主記憶を所定の大容量のブロックで分割
し,各ブロックに対応してブロックの使用状態を表した
管理テーブルを設け,各管理テーブルは,対応する前記
ブロックを小容量のページ単位に分割して各ページに対
し1ビットの使用状態を割当てた全ページ分のビットが
設定され,各管理テーブル内の割当て可能ページの位置
を格納したページ位置テーブルを備え,前記主記憶をラ
ンニング試験するため,ループ番号を決定し,一意に決
定するループ番号から管理テーブルの位置及び管理テー
ブル内のページ位置テーブルを決定して,割当てアドレ
スを一意に決定することを特徴とする主記憶管理方式。
3. A main memory is divided by a predetermined large-capacity block, and a management table indicating a use state of the block is provided corresponding to each block. Each management table stores the corresponding block in a small-capacity page. A page position table is provided which stores the positions of allocatable pages in each management table in which bits are set for all pages in which a use state of 1 bit is allocated to each page, and the main memory is run. A main memory management method characterized by determining a loop number for a test, determining a position of a management table and a page position table in the management table from a uniquely determined loop number, and uniquely determining an assigned address. .
JP2000236072A 2000-08-03 2000-08-03 Main memory management device Expired - Fee Related JP3808693B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000236072A JP3808693B2 (en) 2000-08-03 2000-08-03 Main memory management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000236072A JP3808693B2 (en) 2000-08-03 2000-08-03 Main memory management device

Publications (2)

Publication Number Publication Date
JP2002049525A true JP2002049525A (en) 2002-02-15
JP3808693B2 JP3808693B2 (en) 2006-08-16

Family

ID=18728183

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000236072A Expired - Fee Related JP3808693B2 (en) 2000-08-03 2000-08-03 Main memory management device

Country Status (1)

Country Link
JP (1) JP3808693B2 (en)

Also Published As

Publication number Publication date
JP3808693B2 (en) 2006-08-16

Similar Documents

Publication Publication Date Title
US6490666B1 (en) Buffering data in a hierarchical data storage environment
JP2856620B2 (en) Memory management method and apparatus in computer system
US5561778A (en) System for representing data object in concatenated multiple virtual address spaces with combined requests for segment mapping
US5129088A (en) Data processing method to create virtual disks from non-contiguous groups of logically contiguous addressable blocks of direct access storage device
JP3524428B2 (en) Storage device, storage system, memory management method, and recording medium
JPH0415839A (en) Distributed data base control device
US20070150691A1 (en) Methods and apparatus to share a thread to reclaim memory space in a non-volatile memory file system
JPH10254756A (en) Use of three-state reference for managing referred object
US20020078335A1 (en) Persistent names for logical volumes
TWI273431B (en) Apparatus for the plurality of hosts to share a collection of memory sectors, and method and program storage device for managing memory sectors used by a host
US6874062B1 (en) System and method for utilizing a hierarchical bitmap structure for locating a set of contiguous ordered search items having a common attribute
JPH04213129A (en) Memory control system and memory control method
US5940868A (en) Large memory allocation method and apparatus
JP3993648B2 (en) Method and computer system for integrating a compression system with an operating system
US20050132162A1 (en) Generic reallocation function for heap reconstitution in a multi-processor shared memory environment
EP0319147B1 (en) Method for storing pre-organised groups of related information files in a data processing system
JPH01144152A (en) Control of data processing system
CN108804571B (en) Data storage method, device and equipment
US20080022060A1 (en) Data recording apparatus, program product, and data recording method
JP2002049525A (en) Main storage management system
JPH0271342A (en) Memory controller
US11314656B2 (en) Restartable, lock-free concurrent shared memory state with pointers
JPH08115238A (en) File system
JPH06187201A (en) File system
JPH0346046A (en) File data control method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060417

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060516

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060518

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090526

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100526

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100526

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110526

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120526

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130526

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140526

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees