JPH05334173A - Memory management system - Google Patents

Memory management system

Info

Publication number
JPH05334173A
JPH05334173A JP4144374A JP14437492A JPH05334173A JP H05334173 A JPH05334173 A JP H05334173A JP 4144374 A JP4144374 A JP 4144374A JP 14437492 A JP14437492 A JP 14437492A JP H05334173 A JPH05334173 A JP H05334173A
Authority
JP
Japan
Prior art keywords
buffer
available
pool
writing
usable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4144374A
Other languages
Japanese (ja)
Inventor
Takayuki Hayakawa
孝之 早川
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP4144374A priority Critical patent/JPH05334173A/en
Publication of JPH05334173A publication Critical patent/JPH05334173A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently manage an idle buffer by dually managing a buffer pool. CONSTITUTION:Usable buffer pools are divided into a usable buffer pool and a buffer pool to be used after writing and the usable buffers are successively searched from a buffer management table 1. At first a buffer 2p is detected and extracted from the usable buffer pool. Since the buffer 2p has a usable mark, a process uses the buffer 2p. In the case of releasing the buffer 2p, a using mark put on the buffer 2p is changed to a usable mark, and when a writing mark is put on the buffer 2p, the buffer 2p is returned to a buffer 3 to be used after writing. When a writing mark is not put on the buffer 2p, the buffer 2b is returned to the usable buffer pool 1.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、たとえば、計算機シス
テムの主記憶装置上に設けられたバッファを管理するた
めのメモリ管理方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory management system for managing a buffer provided on a main memory of a computer system, for example.

【0002】[0002]

【従来の技術】従来、この種の方式として例えば、Ma
urice J.Bach著「UNIXカーネルの設
計」32ページ(UNIXはAT&T社の登録商標)に
示されるものがあった。
2. Description of the Related Art Conventionally, as this type of system, for example, Ma
Urice J. There was one shown in "Design of UNIX Kernel" by Bach, page 32 (UNIX is a registered trademark of AT & T).

【0003】図4は従来のバッファ管理方式を示す構成
図である。同図において1は利用可能なバッファを管理
するための利用可能バッファ管理テーブル、2a、2
p、2kは利用可能なバッファ、2c、2d、2e、2
h、2i、2j、2m、2n、2oは現在使用中である
バッファ、2L 、2b、2f、2gは外部記憶装置に書
込み後利用可能であるバッファを示している。3は利用
可能バッファプールを示している。
FIG. 4 is a block diagram showing a conventional buffer management system. In the figure, 1 is an available buffer management table for managing available buffers, 2a, 2
p, 2k are available buffers, 2c, 2d, 2e, 2
Reference numerals h, 2i, 2j, 2m, 2n, and 2o indicate buffers currently in use, and 2L, 2b, 2f, and 2g indicate buffers that can be used after writing to the external storage device. Reference numeral 3 indicates an available buffer pool.

【0004】このような構成のシステムにおいては、図
5に示すステップ図にもとづいてバッファ獲得が行なわ
れる。
In the system having such a configuration, buffer acquisition is performed based on the step diagram shown in FIG.

【0005】ステップ1において利用可能バッファ管理
テーブル1から順に利用可能バッファプール3の中を探
す。最初にバッファ2L を発見したので、ステップ2は
飛ばし、ステップ3に移る。ステップ3で、利用可能バ
ッファプール3からバッファ2L を取り出す。つまり利
用可能バッファ管理テーブル1からバッファ2L を削除
する。バッファ2L は書込みの印がついているのでステ
ップ4でバッファ2Lに格納されているデータを外部記
憶装置に書込み、ステップ1に戻る。
In step 1, the available buffer pool 3 is searched sequentially from the available buffer management table 1. Since we first found buffer 2L, we skip step 2 and proceed to step 3. In step 3, the buffer 2L is taken out from the available buffer pool 3. That is, the buffer 2L is deleted from the available buffer management table 1. Since the buffer 2L is marked for writing, the data stored in the buffer 2L is written in the external storage device in step 4, and the process returns to step 1.

【0006】ステップ1に戻り、再び利用可能バッファ
管理テーブル1から利用可能バッファプール3の中を探
す。バッファ2L は最初の検索でバッファ管理テーブル
1から削除されているので、今度は最初にバッファ2p
が見つかる。バッファが見つかったのでステップ3に飛
び、バッファ2pを利用可能バッファ管理テーブル1か
ら削除する。バッファ2pには、利用可能の印がついて
いるので利用可能バッファを獲得しにきたプロセスはバ
ッファ2pを使用する。
Returning to step 1, the available buffer pool 3 is searched again from the available buffer management table 1. Since the buffer 2L has been deleted from the buffer management table 1 in the first search, this time the buffer 2p is first deleted.
Can be found. Since the buffer is found, the process jumps to step 3, and the buffer 2p is deleted from the available buffer management table 1. Since the buffer 2p is marked as available, the process that has acquired the available buffer uses the buffer 2p.

【0007】バッファ2pを使用したプロセスは、つぎ
に示す図6に示すステップ図に基づいてバッファの解放
を行なう。ステップ1でバッファ2pにつけられている
使用中の印を利用可能に変更する。ステップ2でバッフ
ァ2pを利用可能バッファプール3へ戻す。つまり利用
可能バッファ管理テーブル1に登録する。プロセスがバ
ッファ2pに書込みの印を付けていても同様の処理でバ
ッファを解放する。
The process using the buffer 2p releases the buffer based on the step diagram shown in FIG. In step 1, the in-use mark attached to the buffer 2p is changed to available. In step 2, the buffer 2p is returned to the available buffer pool 3. That is, it is registered in the available buffer management table 1. Even if the process has marked the buffer 2p for writing, the buffer is released by the same process.

【0008】[0008]

【発明が解決しようとする課題】従来のバッファ管理方
式は上記のように利用可能なバッファと書込み後利用可
能なバッファが混在して一元的に利用可能バッファプー
ル3の中で管理されていたので、あるプロセスがバッフ
ァを獲得しにいった場合にそのバッファが書込み後利用
可能なバッファであれば、一旦そのバッファに格納され
ているデータを外部記憶装置に書込んでから、再び最初
から利用可能バッファを探さねばならず、効率が大変悪
いという問題点があった。
In the conventional buffer management system, the available buffer and the buffer available after writing are mixed and managed in the available buffer pool 3 in a unified manner as described above. If a process acquires a buffer and it is available after writing, the data stored in the buffer can be written to the external storage device and then used again from the beginning. I had to find a buffer, which was a very inefficient problem.

【0009】この発明は上記のような問題を解決するた
めになされたもので、メモリを効率よくアクセスできる
メモリ管理方式を得ることを目的とする。
The present invention has been made to solve the above problems, and an object thereof is to obtain a memory management system capable of efficiently accessing a memory.

【0010】[0010]

【課題を解決するための手段】この発明に係わるバッフ
ァ管理装置では、たとえば、利用可能バッファプールを
利用可能バッファプールと書込み後利用可能なバッファ
プールの二つに分け、バッファプールを二元的に管理す
るものであり、以下の要素を有するものである。 (a)上記メモリ領域のなかで利用可能なメモリ領域を
管理する第1の領域管理手段、(b)上記メモリ領域の
なかで所定の処理後利用可能なメモリ領域を管理する第
2の領域管理手段、(c)上記第1と第2の領域管理手
段のいずれかの手段の管理するメモリ領域からひとつの
メモリ領域を獲得する獲得手段。
In the buffer management device according to the present invention, for example, the available buffer pool is divided into two, that is, the available buffer pool and the buffer pool that can be used after writing, and the buffer pool is binaryly divided. It is managed and has the following elements. (A) A first area management unit that manages an available memory area in the memory area, and (b) a second area management unit that manages an available memory area in the memory area after a predetermined process. Means, (c) Acquisition means for acquiring one memory area from the memory area managed by any one of the first and second area management means.

【0011】[0011]

【作用】上記のように構成されたメモリ管理方式におい
ては、第1の領域管理手段により利用可能なメモリ領域
を管理させ、たとえば、第2の領域管理手段により書込
み後利用可能なメモリ領域を管理させる。そして、メモ
リ領域獲得の際に第1の領域管理手段により管理される
利用可能なメモリ領域をまず獲得し、たとえば、第2の
領域管理手段で管理される書込み後利用可能なメモリ領
域を獲得してしまうことなく、利用可能メモリ領域を獲
得できる。
In the memory management system configured as described above, the first area management means manages the usable memory area, and the second area management means manages the usable memory area after writing. Let Then, when acquiring the memory area, the available memory area managed by the first area managing means is first acquired, and, for example, the usable memory area after writing managed by the second area managing means is acquired. The available memory area can be acquired without being lost.

【0012】[0012]

【実施例】【Example】

実施例1.図1はこの発明の一実施例を示す構成図であ
る。1、2a〜2o、3は上記従来方式と全く同様のも
のである。4は書込み後利用可能なバッファを管理する
書込みバッファ管理テーブルである。5は書込み後利用
可能なバッファプールを示している。また、10は上記
メモリ領域のなかで即時利用可能なメモリ領域を管理す
る第1の領域管理手段、20は上記第1の領域管理手段
が管理するメモリ領域以外であって、所定の処理をほど
こした後に利用可能なメモリ領域を管理する第2の領域
管理手段、30は上記第1と第2の領域管理手段のいず
れかの手段の管理するメモリ領域からひとつのメモリ領
域を獲得する獲得手段である。
Example 1. FIG. 1 is a block diagram showing an embodiment of the present invention. 1, 2a to 2o and 3 are exactly the same as those in the conventional system. Reference numeral 4 is a write buffer management table for managing buffers that can be used after writing. Reference numeral 5 indicates a buffer pool that can be used after writing. Further, 10 is a first area management unit that manages a memory area that can be immediately used in the memory area, and 20 is a memory area other than the memory area that is managed by the first area management unit. Second area management means for managing a memory area that can be used after the acquisition, and 30 is acquisition means for acquiring one memory area from the memory area managed by any one of the first and second area management means. is there.

【0013】このような構成のメモリ管理方式において
図2に示すステップ図に基づいてバッファの獲得がなさ
れる。
In the memory management system having such a configuration, the buffer is acquired based on the step diagram shown in FIG.

【0014】ステップ1において利用可能バッファ管理
テーブル1から順に利用可能バッファプール3の中を探
す。最初にバッファ2pを発見したので、ステップ2、
ステップ3は飛ばしステップ4に移る。ステップ4でバ
ッファ2pを利用可能バッファプール3から取り出す。
つまり利用可能バッファ管理テーブル1からバッファ2
pを削除する。バッファ2pは利用可能な印が付いてい
るので利用可能なバッファ獲得しにきたプロセスはバッ
ファ2pを使用する。
In step 1, the available buffer pool 3 is searched sequentially from the available buffer management table 1. First I found buffer 2p, so step 2,
Step 3 skips to step 4. In step 4, the buffer 2p is taken out from the available buffer pool 3.
That is, available buffer management table 1 to buffer 2
delete p. Since the buffer 2p is marked as available, the process that came to acquire the available buffer uses the buffer 2p.

【0015】バッファ2pを使用したプロセスは図3に
示すステップ図に基づいてバッファの解放を行なう。ス
テップ1においてバッファ2pに付けられている使用中
の印を利用可能に変更する。ステップ2でバッファ2p
に書込みの印が付けられていたらバッファ2pを書込み
後利用可能バッファプール5へ戻す。バッファ2pに書
込みの印が付けられていない場合には利用可能バッファ
プール3へバッファ2pを戻す。
The process using the buffer 2p releases the buffer based on the step diagram shown in FIG. In step 1, the in-use mark attached to the buffer 2p is changed to available. Buffer 2p in step 2
If it is marked to be written, the buffer 2p is returned to the available buffer pool 5 after writing. If the buffer 2p is not marked for writing, the buffer 2p is returned to the available buffer pool 3.

【0016】以上のように、この実施例は、外部磁気記
憶装置に格納されたデータを外部記憶制御装置を介して
主記憶上のバッファ・キャッシュに記憶し、中央処理装
置からのデータを読み出し命令に対して高速に応答を可
能としたバッファ管理方式において、各利用可能なバッ
ファを格納する第1のバッファ・プールと書込み後利用
可能なバッファを格納する第2のバッファ・プールを備
え、第1あるいは第2のバッファ・プールから利用可能
なバッファを獲得する手段と、不必要になったバッファ
を第1あるいは第2のバッファへ解放する手段を備えた
ことを特徴とする。
As described above, according to this embodiment, the data stored in the external magnetic storage device is stored in the buffer cache on the main storage via the external storage control device, and the data read instruction from the central processing unit is issued. In a buffer management method that enables a fast response to, a first buffer pool that stores each available buffer and a second buffer pool that stores an available buffer after writing are provided. Alternatively, it is characterized by comprising means for acquiring an available buffer from the second buffer pool and means for releasing an unnecessary buffer to the first or second buffer.

【0017】そして、上記の説明のように、利用可能バ
ッファプールを利用可能バッファプールと書込み後利用
可能なバッファプールの二つに分け、バッファプールを
二元的に管理することによって空きバッファの獲得を効
率良く行える。
Then, as described above, the available buffer pool is divided into the available buffer pool and the buffer pool that can be used after writing, and the buffer pool is dually managed to obtain a free buffer. Can be done efficiently.

【0018】また、キャッシュデータをディスクに書き
戻す処理は次の4つの場合に発生する。 1.キャッシュエリアに利用可能なバッファがないと
き、バッファの内容をディスクに書き戻してバッファを
解放する。 2.ディスクを外すときそのディスクに対応するバッフ
ァの内容を書き戻す。 3.ユーザからの同期要求(すべてのバッファの内容と
対応するディスクの内容を同じにする)。 4.等時間間隔でOSが同期要求。 上記3と4の同期要求の場合、従来の技術では、利用可
能なバッファプール(大きいサイズのバッファプール)
から書き戻すバッファを探して、処理せねばならなかっ
た。これに対して、この実施例によれば、同期をとると
き書込み後利用可能なバッファプールにあるバッファの
内容をもとに戻せばよいため、同期要求に対する応答が
効率よく行えるメリットがある。
The process of writing back the cache data to the disk occurs in the following four cases. 1. If there is no buffer available in the cache area, write the buffer contents back to disk and free the buffer. 2. When you remove a disk, write back the contents of the buffer corresponding to that disk. 3. Synchronous request from the user (makes all buffer contents the same as the corresponding disk contents). 4. The OS requests synchronization at equal time intervals. In the case of the synchronous requests of 3 and 4 above, in the conventional technique, an available buffer pool (a large size buffer pool)
Had to find a buffer to write back from and process it. On the other hand, according to this embodiment, since the contents of the buffer in the buffer pool that can be used after writing should be returned when synchronizing, there is an advantage that the response to the synchronization request can be made efficiently.

【0019】実施例2.上記実施例1では外部磁気記憶
装置に格納されたデータを外部記憶制御装置を介してバ
ッファ・キャッシュに記憶し、中央処理装置からのデー
タを読み出し命令に対して高速に応答を可能としたバッ
ファ管理を例にして説明したが、キャッシュメモリやバ
ッファを管理する場合だけでなく、その他のメモリを管
理する場合でもかまわない。また、メモリとは、主記憶
メモリ等の揮発性メモリに限らず、磁気ディスク等の不
揮発性メモリの場合でもかまわない。
Example 2. In the first embodiment, the buffer management in which the data stored in the external magnetic storage device is stored in the buffer cache via the external storage control device and the data from the central processing unit can be responded to the read command at high speed. However, the management may be performed not only in the cache memory and the buffer but also in other memory. Further, the memory is not limited to a volatile memory such as a main memory, but may be a non-volatile memory such as a magnetic disk.

【0020】実施例3.また、上記実施例1では特に述
べていないが、メモリを構成している各メモリ領域のサ
イズは1バイト、あるいは1ビット等の所定の単位ごと
に区切られているものでもよいし、所定の単位に区切ら
れることなく、任意の長さであってもかまわない。
Example 3. Further, although not particularly mentioned in the first embodiment, the size of each memory area constituting the memory may be divided into predetermined units such as 1 byte or 1 bit, or the predetermined units may be used. It may be of any length without being delimited.

【0021】実施例4.上記実施例1では、各利用可能
なバッファを格納する第1のバッファ・プールと書込み
後利用可能なバッファを格納する第2のバッファ・プー
ルを備えた場合を示したが、第2のバッファ・プールに
格納するものは、書込み後利用可能なバッファでなくて
もよく、第1のバッファ・プールに格納された利用可能
なバッファと比べてアクセス効率の異なるものが格納さ
れていればよい。
Example 4. In the first embodiment described above, the case in which the first buffer pool storing each available buffer and the second buffer pool storing the buffer available after writing are provided is described. What is stored in the pool does not have to be a buffer that can be used after writing, and it is sufficient that a buffer having different access efficiency from that of the usable buffer stored in the first buffer pool is stored.

【0022】[0022]

【発明の効果】以上のように、この発明によれば、複数
のメモリ領域の中から利用可能なメモリ領域を効率よく
獲得することができる。
As described above, according to the present invention, a usable memory area can be efficiently acquired from a plurality of memory areas.

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

【図1】この発明の実施例を示す構成図である。FIG. 1 is a configuration diagram showing an embodiment of the present invention.

【図2】この発明の実施例を示すバッファ獲得のステッ
プ図である。
FIG. 2 is a step diagram of buffer acquisition showing an embodiment of the present invention.

【図3】この発明の実施例を示すバッファ解放のステッ
プ図である。
FIG. 3 is a step diagram of buffer release showing an embodiment of the present invention.

【図4】従来のバッファ管理方式を示すバッファ構成図
である。
FIG. 4 is a buffer configuration diagram showing a conventional buffer management system.

【図5】従来のバッファ獲得方式を示すステップ図であ
る。
FIG. 5 is a step diagram showing a conventional buffer acquisition method.

【図6】従来のバッファ解放方式を示すステップ図であ
る。
FIG. 6 is a step diagram showing a conventional buffer release method.

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

1 利用可能バッファ管理テーブル 2a、2p、2k 利用可能バッファ 2c、2d、2e、2h、2i、2j、2m、2n、2
o 使用中バッファ 2L 、2b、2f、2g 書込み後使用可能バッファ 3 利用可能バッファプール 4 書込みバッファ管理テーブル 5 書込み後利用可能バッファプール 10 第1の領域管理手段 20 第2の領域管理手段 30 獲得手段
1 Available buffer management table 2a, 2p, 2k Available buffer 2c, 2d, 2e, 2h, 2i, 2j, 2m, 2n, 2
o In-use buffer 2L, 2b, 2f, 2g Usable buffer after writing 3 Usable buffer pool 4 Write buffer management table 5 Usable buffer pool after writing 10 First area management means 20 Second area management means 30 Acquisition means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 データを記憶する複数のメモリ領域を備
え、以下の要素を有するメモリ管理方式 (a)上記メモリ領域のなかで利用可能なメモリ領域を
管理する第1の領域管理手段、(b)上記メモリ領域の
なかで所定の処理後利用可能なメモリ領域を管理する第
2の領域管理手段、(c)上記第1と第2の領域管理手
段のいずれかの手段の管理するメモリ領域からひとつの
メモリ領域を獲得する獲得手段。
1. A memory management system comprising a plurality of memory areas for storing data and having the following elements: (a) first area management means for managing available memory areas among the memory areas; ) A second area management means for managing a memory area that can be used after a predetermined process in the memory area, and (c) a memory area managed by any one of the first and second area management means. Acquisition means to acquire one memory area.
JP4144374A 1992-06-04 1992-06-04 Memory management system Pending JPH05334173A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4144374A JPH05334173A (en) 1992-06-04 1992-06-04 Memory management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4144374A JPH05334173A (en) 1992-06-04 1992-06-04 Memory management system

Publications (1)

Publication Number Publication Date
JPH05334173A true JPH05334173A (en) 1993-12-17

Family

ID=15360643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4144374A Pending JPH05334173A (en) 1992-06-04 1992-06-04 Memory management system

Country Status (1)

Country Link
JP (1) JPH05334173A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108693823A (en) * 2017-03-31 2018-10-23 欧姆龙株式会社 Control device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108693823A (en) * 2017-03-31 2018-10-23 欧姆龙株式会社 Control device
JP2018173865A (en) * 2017-03-31 2018-11-08 オムロン株式会社 Control device
US10891280B2 (en) 2017-03-31 2021-01-12 Omron Corporation Controller for improved time-series data collection
CN108693823B (en) * 2017-03-31 2021-03-30 欧姆龙株式会社 Control device

Similar Documents

Publication Publication Date Title
JPH05334173A (en) Memory management system
KR900002189A (en) Method and apparatus for improving data reliability in computer system
JPH07334402A (en) Data base as main memory
JPH02297670A (en) Data base retrieving system
JP2912657B2 (en) File access processor
JP2745882B2 (en) Block management method
JPH04112253A (en) Data accessing method using multilayer buffer
JPH0744426A (en) File management method for file system
JP3016255B2 (en) Database management system
JPH0310341A (en) Disk space compaction system
JPH0423143A (en) Data storing system
JPH0337748A (en) External storage accessing system utilizing main storage
JPH01283653A (en) Memory pool managing system
JPH04236639A (en) File space management system
JPH01161453A (en) System for managing data block string in file
JPS63291145A (en) Method for managing file
JPH044438A (en) System for utilizing data base buffer
JPS5966780A (en) Document managing system of document forming device
JPH04642A (en) File managing device
JPH04112245A (en) Method for making file structure virtual
JPH05151089A (en) System for data guarantee in memory space
JPH02206874A (en) Image data retrieving system
JPS62160545A (en) System for managing unused area of direct access storage device
JPS593628A (en) Table display control system
JPS6074074A (en) Priority control system