JPH01175050A - Memory controller - Google Patents

Memory controller

Info

Publication number
JPH01175050A
JPH01175050A JP62335648A JP33564887A JPH01175050A JP H01175050 A JPH01175050 A JP H01175050A JP 62335648 A JP62335648 A JP 62335648A JP 33564887 A JP33564887 A JP 33564887A JP H01175050 A JPH01175050 A JP H01175050A
Authority
JP
Japan
Prior art keywords
area
memory
acquisition
size
unused area
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
JP62335648A
Other languages
Japanese (ja)
Inventor
Hiroshi Yanagida
柳田 啓
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.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP62335648A priority Critical patent/JPH01175050A/en
Publication of JPH01175050A publication Critical patent/JPH01175050A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Memory System (AREA)

Abstract

PURPOSE:To allow a task with the highest priority to always acquire a memory by permitting the acquisition of a storage area only when the size of an unused area of the memory is larger than acquisition reference data previously determined in each processing. CONSTITUTION:Reference residual data (data indicating the size of an unused area to be secured in a common memory 81 at the time of acquiring the common memory 81) previously determined in each processing are stored in a reference residual table 82 of a RAM 8. When the acquisition of the storage area of the common memory 8 required for processing is requested, the reference residual data stored in the table 82 and corresponding to the processing concerned are compared with the size of the unused area of the common memory 81, and only when the size of the unused area of the memory is larger, the acquisition of the storage area is permitted. When the minimum reference residual data are set up on the processing with highest priority, a task with the highest priority can always acquire the memory.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明はメモリ管理装置に関し、特に、複数の処理に
共用されるメモリを管理するようなメモリ管理装置に関
する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a memory management device, and particularly to a memory management device that manages memory shared by a plurality of processes.

[従来の技術および発明が解決しようとする問題点コ 従来のメモリ管理装置では、メモリの取得制御方法とし
て次に示す方法がとられている。
[Prior art and problems to be solved by the invention] In the conventional memory management device, the following method is used as a memory acquisition control method.

(1) タスクまたはモジュールからのすべてのメモリ
取得要求に対し、メモリの残量が取得要求された大きさ
よりも大きいかどうかを調べ、小さくなければ常に取得
させる。
(1) For every memory acquisition request from a task or module, it is checked whether the remaining amount of memory is larger than the requested amount, and if it is not, the memory is always acquired.

(2) メモリ取得要求を待ち行列の蓄え、待ち行列中
の要求のうち最も高い優先順位を持つ要求に対し、メモ
リ残量を調べ、要求以上の残量があれば取得させる。
(2) Store memory acquisition requests in a queue, check the remaining memory capacity for the request with the highest priority among the requests in the queue, and if there is a remaining capacity greater than the request, acquire it.

しかしながら、上記(1)、  (2)の方法では、所
定時間内にメモリの取得が必要であるタスクやモジュー
ルに対してメモリを与えることができない状況が発生す
る。次に、この状況を第8図に示す従来の取引処理シス
テムについて説明する。
However, with the methods (1) and (2) above, a situation occurs in which memory cannot be provided to a task or module that requires memory acquisition within a predetermined time. Next, this situation will be explained with respect to a conventional transaction processing system shown in FIG.

第8図において、クラスタコントローラ11は複数のP
O8端末装置が接続された伝送ライン2とホストコンピ
ュータ5に接続された電話回線網4との双方に接続され
て、それらの間のデータ伝送を媒介するものである。こ
こで、ホストコンピュータ5側およびPO8端末装置3
側双方からクラスタコントローラ11にデータのバッフ
ァリングを行なう場合には、下位であるPO8端末装置
3側からの電文でクラスタコンローラ11のメモリが満
杯になり、上位であるホストコンピュータ5からの電文
を受付けることができないという状況が発生する。この
ような場合には、ホストコンピュータ5の通信手順を最
初からやり直さなければならないため、クラスタコント
ローラ11の通信効率は著しく低下する。
In FIG. 8, the cluster controller 11 has a plurality of P
It is connected to both the transmission line 2 to which the O8 terminal device is connected and the telephone line network 4 connected to the host computer 5, and mediates data transmission between them. Here, the host computer 5 side and the PO8 terminal device 3
When data is buffered from both sides to the cluster controller 11, the memory of the cluster controller 11 becomes full with messages from the PO8 terminal device 3 side, which is the lower level, and the message from the host computer 5, which is the higher level, becomes full. A situation may arise where the request cannot be accepted. In such a case, the communication procedure of the host computer 5 must be restarted from the beginning, so the communication efficiency of the cluster controller 11 is significantly reduced.

それゆえに、この発明の主たる目的は、優先順位の高い
タスクやモジュールが常にメモリを取得することのでき
るようなメモリ管理装置を提供することである。
Therefore, the main object of the present invention is to provide a memory management device that allows tasks and modules with high priority to always obtain memory.

[問題点を解決するための手段] この発明に係るメモリ管理装置は、メモリの取得許否の
基準となる取得基準データを各処理別に記憶した記憶手
段と、処理に必要な記憶領域の取得が要求されたとき、
記憶手段に記憶された当該処理に対応する取得基準デー
タと、メモリの未使用領域との大小を比較し、取得基準
以上の未使用領域がメモリに確保されるか否かを判別す
る判別手段と、該判別手段によって取得基準以上の未使
用領域がメモリに確保されないことか判別されたことに
応じて、メモリの未使用領域が取得要求された領域の大
きさよりも大きくても、その取得を許可しないように制
御する制御手段とを備えて(1育成される。
[Means for Solving the Problems] A memory management device according to the present invention includes a storage means that stores acquisition standard data for each process, which is a criterion for determining whether or not to acquire memory, and a storage unit that requires acquisition of a storage area necessary for the process. When it is done,
a determining means that compares the acquisition standard data corresponding to the process stored in the storage means with an unused area of the memory, and determines whether an unused area that is equal to or greater than the acquisition standard is secured in the memory; , in response to determining whether an unused area exceeding the acquisition standard is not secured in the memory by the determination means, acquisition is permitted even if the unused area of the memory is larger than the size of the area requested for acquisition. control means to prevent the

[作用コ この発明に係るメモリ管理装置は、処理に必要な記憶領
域の取得が要求されたとき、メモリの未使用領域の大き
さが予め処理別に定められた取得許否の基準となる取得
基準データよりも大きいか否かを判別し、取得基準以上
の未使用領域がメモリに確保されない場合には、たとえ
メモリの未使用領域の大きさが取得要求された記憶領域
の大きさよりも大きくても、その取得を禁止する。
[Operation] When the memory management device according to the present invention requests the acquisition of a storage area necessary for a process, the size of the unused area of the memory is acquired as acquisition standard data that is predetermined for each process and serves as a criterion for permission or disapproval of acquisition. If the unused area larger than the acquisition criterion is not secured in memory, even if the size of the unused area of memory is larger than the size of the storage area requested for acquisition, Prohibit its acquisition.

[発明の実施例コ 第1図はこの発明の一実施例が適用された取引処理シス
テムの構成図である。第1図において、クラスタコント
ローラ1は伝送ライン2を介して複数台のPO8端末装
置3に接続されるとともに、電話回線網4を介してホス
トコンピュータ5に接続される。クラスタコントローラ
1はCPU6とROM7とRAM8と図示しない伝送制
御部とを含む。ROM7は後の第6図および第7図に示
すフロー図に基づ<CPU6の動作プログラムを格納す
るものである。RAM8は共有メモリ81と基準残量テ
ーブル82とを含む。共存メモリ81はPO8端末装置
3からの電文やホストコンピュータ5からの電文をタス
クが受付けるときなどに用いられる。基壁残ロチープル
82は各処理ごとに予め定められた基準残量データが記
憶される。
Embodiment of the Invention FIG. 1 is a block diagram of a transaction processing system to which an embodiment of the invention is applied. In FIG. 1, a cluster controller 1 is connected to a plurality of PO8 terminal devices 3 via a transmission line 2, and is also connected to a host computer 5 via a telephone line network 4. The cluster controller 1 includes a CPU 6, a ROM 7, a RAM 8, and a transmission control section (not shown). The ROM 7 stores an operating program for the CPU 6 based on the flowcharts shown in FIGS. 6 and 7 later. The RAM 8 includes a shared memory 81 and a reference remaining amount table 82. The coexisting memory 81 is used when a task receives a message from the PO8 terminal device 3 or a message from the host computer 5. The base wall remaining quantity 82 stores reference remaining amount data predetermined for each process.

ここで、基準残量データは共有メモリを取得する際に共
有メモリに確保されるべき未使用領域の大きさを示すデ
ータである。タスクは共何メモリ81の取得が要求され
たとき、基準残量テーブル82に基づいて、所定以上の
未使用領域が共有メモリ81に確保されるかどうかを判
断し、確保されない場合には、たとえ共何メモリ81に
取得の要求された記憶領域の大きさ以上の未使用領域が
存在する場合であっても、取得を禁止する。
Here, the reference remaining amount data is data indicating the size of an unused area that should be secured in the shared memory when acquiring the shared memory. When a task requests to acquire the shared memory 81, it determines whether or not a predetermined amount or more of unused space is secured in the shared memory 81 based on the standard remaining capacity table 82, and if it is not secured, it Even if there is an unused area in the shared memory 81 that is larger than the storage area requested for acquisition, acquisition is prohibited.

第2図は第1図に示す共有メモリの構成図である。第2
図において、共有メモリ81はエリアコントロールブロ
ック811と共有メモリエリア812とを含む。エリア
コントロールブロック811には、共有メモリ81が使
用中であるか否かを示すタグと共有メモリ81の大きさ
を示すサイズデータと管理番号データと次領域ポインタ
と前領域ポインタとが格納される。共有メモリエリア8
12は、各処理で共用される記憶領域であり、処理別の
エリア813が設けられる。各エリアには、ヘッダ部8
14が設けられる。ヘッダ部814は当該エリア813
が使用中か否かを示すタグと当該エリア813の大きさ
(へ・ラダ部を含む)を示すサイズデータと管理番号デ
ータと次エリアのアドレスを示す次領域ポインタと前エ
リアのアドレスを示す前領域ポインタとを含む。ここで
、当該エリアの前にエリアがない場合には、前領域ポイ
ンタとしてOが用いられる。当該エリアに続くエリアが
ない場合には、次領域ポインタとして0が用いられる。
FIG. 2 is a configuration diagram of the shared memory shown in FIG. 1. Second
In the figure, shared memory 81 includes an area control block 811 and a shared memory area 812. The area control block 811 stores a tag indicating whether the shared memory 81 is in use, size data indicating the size of the shared memory 81, management number data, a next area pointer, and a previous area pointer. Shared memory area 8
12 is a storage area shared by each process, and an area 813 for each process is provided. Each area has a header section 8.
14 are provided. The header part 814 is the area 813
A tag indicating whether or not the area 813 is in use, size data indicating the size of the area 813 (including the front and rear parts), management number data, a next area pointer indicating the address of the next area, and a previous area indicating the address of the previous area. area pointer. Here, if there is no area before the area in question, O is used as the previous area pointer. If there is no area following the area, 0 is used as the next area pointer.

第3図は第1図に示す基準残量テーブルの構成図である
。第3図において、基準残量テーブル82は処理番号(
ID)別に基準最大残プロ・ンク長データが予め設定さ
れて記憶される。基準最大残ブロック長データとしては
、メモリが取得された後共有メモリエリア82に確保さ
れるべき未使用領域の大きさを示すデータを用いてもよ
く、また、メモリが取得される前に共有メモリエリア8
2に存在すべき未使用記憶領域の大きさを示すデータを
用いてもよい。なお、基り最大残ブロック長を更新可能
にし、それを処理の優先順位に対応して変更するように
すれば、処理の優先順位と競合度合を変更することがで
きる。
FIG. 3 is a configuration diagram of the reference remaining amount table shown in FIG. 1. In FIG. 3, the reference remaining amount table 82 has a processing number (
ID), reference maximum remaining proc length data is set in advance and stored. As the standard maximum remaining block length data, data indicating the size of an unused area to be secured in the shared memory area 82 after memory is acquired may be used. Area 8
Data indicating the size of the unused storage area that should exist in 2 may also be used. Note that by making the base maximum remaining block length updatable and changing it in accordance with the priority of the process, the priority of the process and the degree of competition can be changed.

第4A図ないし第4C図は第2図に示す共有メモリエリ
ア812の取得を説明するための図であり、第5A図な
いし第5H図は第2図に示す共有メモリエリア812の
解放を説明するための図である。次に、第4八図ないし
第5H図を参照して、メモリの取得および解放について
説明する。
4A to 4C are diagrams for explaining the acquisition of the shared memory area 812 shown in FIG. 2, and FIGS. 5A to 5H are diagrams for explaining the release of the shared memory area 812 shown in FIG. 2. This is a diagram for Next, acquisition and release of memory will be explained with reference to FIGS. 48 to 5H.

メモリを取得するときには、サイズと管理番号とを指定
し、所定のルーチンを呼出す。そして、エリアが取得さ
れたときには、割当てられたエリアの先頭のアドレスが
該ルーチンから与えられる。
When acquiring memory, the size and management number are specified and a predetermined routine is called. Then, when the area is acquired, the start address of the allocated area is given from this routine.

たとえば、共有メモリエリア8]2が第4A図に示す状
態にあるものとする。ここで、共有メモリエリア812
はエリアA、 B、 CおよびDに分割されていて、ま
た、各エリアにはヘッダ部814が設けられている。た
とえば、サイズが15であり、かつ管理番号が5である
エリアを取得する場合には、まず、管理番号が5のエリ
アが既に割当てられていないかどうかを調べる。すなわ
ち、エリアAから順番にタグが十となっているヘッダ部
の管理番号を調べる。ここで、管理番号が5であるエリ
アが存在しなければ、次に、どのエリアを取得するのか
を決定する。取得の条件としては、タグが−であり、サ
イズが15+8(8はヘッダの長さ)以上であり、かつ
サイズの余裕が最小のエリアを捜す。この場合には、エ
リアのサイズが24であるエリアpが条件に最適である
。エリアのサイズは24であり、余りは1となるが、こ
れを未使用領域として残すことができないため、余りの
領域は捨てられる。次に、エリアDのタグを十に変え、
管理番号を5にセットし、エリアDの先頭アドレスと終
了情報とをリターンコードとして返す。なお、上述の場
合において取得の単位を8バイトIl1位にしておき、
下位3ビツトを切上げて24として取得すると、余りは
0となるため、端数が残ることはなくなる。
For example, assume that the shared memory area 8]2 is in the state shown in FIG. 4A. Here, the shared memory area 812
is divided into areas A, B, C, and D, and each area is provided with a header section 814. For example, when acquiring an area whose size is 15 and whose management number is 5, it is first checked whether the area whose management number is 5 has already been allocated. That is, starting from area A, the management numbers of the headers with tags numbered 10 are checked. Here, if there is no area with the management number 5, then it is determined which area to acquire. The acquisition conditions are that the tag is -, the size is 15+8 (8 is the length of the header) or more, and the area with the smallest size margin is searched. In this case, area p having an area size of 24 is optimal for the conditions. The size of the area is 24, and the remainder is 1, but since this cannot be left as an unused area, the remaining area is discarded. Next, change the tag of area D to 10,
The management number is set to 5, and the start address and end information of area D are returned as a return code. In addition, in the above case, the unit of acquisition is set to 8 bytes Il1,
If the lower 3 bits are rounded up and obtained as 24, the remainder will be 0, so no fraction will remain.

次に、共有メモリエリア812が第4B図に示す状態に
あるものとする。ここで、サイズが20であり、かつ管
理番号が7のエリアを取得しようとする場合を考える。
Next, it is assumed that the shared memory area 812 is in the state shown in FIG. 4B. Here, consider a case where an attempt is made to acquire an area whose size is 20 and whose management number is 7.

管理番号7のエリアはここでは割当てられていないので
、タグが−であり、サイズが20+8以上であり、かつ
サイズの余裕が最小であるエリアCが選択される。エリ
アCのサイズは56であるので、エリアCを分割し、サ
イズが28のエリアC1を取得し、サイズが28である
未使用領域C2を残す。この状態を第4C図に示す。な
お、エリアC2には、ヘッダ部が追加される。
Since the area with management number 7 is not allocated here, area C is selected, which has a tag of -, a size of 20+8 or more, and a minimum size margin. Since the size of area C is 56, area C is divided to obtain area C1 of size 28 and leave an unused area C2 of size 28. This state is shown in FIG. 4C. Note that a header section is added to area C2.

次に、メモリの解放について説明する。不要なエリアを
解放するときには、管理番号を指定して所定のルーチン
を呼出す。たとえば、共有メモリエリア812が第5A
図に示す状態にあるものとする。ここで、管理番号が2
であるエリアBを解放するものとする。エリアBの前後
のエリアAおよびCのタグが十であるので、解放するエ
リアBのタグを−に変えて終了する。解放した状態を第
5B図に示す。
Next, memory release will be explained. When releasing an unnecessary area, a management number is specified and a predetermined routine is called. For example, if the shared memory area 812 is
Assume that it is in the state shown in the figure. Here, the management number is 2.
Assume that area B is to be released. Since the tags of areas A and C before and after area B are 10, the tag of area B to be released is changed to - and the process ends. The released state is shown in FIG. 5B.

次に、共有メモリエリア812が第5C図に示す状態に
あるものとする。ここで、エリアBを解放するものとす
ると、エリアBの前のエリアAのタグが−であるので、
エリアBのタグを−に変えて、エリアAとエリアBとを
合体させる。これにより、エリアB1を得る。合体後の
状態を第5D図に示す。そして、エリアAのサイズとエ
リアBのサイズとを加算して、エリアB1のサイズを求
めてサイズデータを更新するとともに、エリアB1のヘ
ッダ部の次領域ポインタとエリアCのヘッダ部の前領域
ポインタとを更新する。
Next, it is assumed that the shared memory area 812 is in the state shown in FIG. 5C. Here, if area B is to be released, the tag of area A before area B is -, so
Change the tag of area B to - and combine area A and area B. As a result, area B1 is obtained. The state after combination is shown in FIG. 5D. Then, the size of area A and the size of area B are added to obtain the size of area B1 and the size data is updated, and the next area pointer of the header part of area B1 and the previous area pointer of the header part of area C are and update.

次に、共有メモリエリア812が第5E図に示す状態に
あるものとする。ここで、エリアBを解放するものとす
ると、エリアBの次のエリアCのヘッダ部のタグが−で
あるので、エリアBのヘッダ部のタグを−に変えて、エ
リアBとエリアCとを合体させる。これにより、エリア
B2を得る。
Next, assume that the shared memory area 812 is in the state shown in FIG. 5E. Here, if area B is to be released, the tag in the header of area C, which follows area B, is -, so change the tag in the header of area B to - and release area B and area C. Combine. As a result, area B2 is obtained.

合体後の状態を第5F図に示す。そして、エリアBのサ
イズとエリアCのサイズとを加算して、エリアB2のサ
イズを求めてサイズデータを更新するとともに、エリア
B2のヘッダ部の次領域ポインタとエリアDのヘッダ部
の前領域ポインタとを更新する。
The state after combination is shown in Fig. 5F. Then, the size of area B and the size of area C are added to obtain the size of area B2 and the size data is updated, and the next area pointer of the header part of area B2 and the previous area pointer of the header part of area D are and update.

次に、共有メモリエリア812が第5G図に示す状態に
あるものとする。ここで、エリアBを解放するものとす
ると、エリアBの前のエリアAのヘッダ部のタグが−で
あり、かつエリアBの次のエリアCのヘッダ部のタグが
−であるので、エリアBのタグを−に変えてエリアA、
BおよびCを合体させる。これにより、エリアB3を得
る。合体後の状態を第5H図に示す。そして、エリアA
Next, assume that the shared memory area 812 is in the state shown in FIG. 5G. Here, if area B is to be released, the tag of the header section of area A before area B is -, and the tag of the header section of area C next to area B is -, so area B Change the tag to - to area A,
Combine B and C. As a result, area B3 is obtained. The state after combination is shown in Figure 5H. And area A
.

BおよびCのサイズを加算してエリアB3のサイズを求
めてサイズデータを更新するとともに、エリアB3のヘ
ッダ部の次領域ポインタとエリアDのヘッダ部の前領域
ポインタとを更新する。更新後、正常に終了した場合に
はその旨を、正常に終了しなかった場合には、指定され
た管理番号の領域のない旨をリターンコードとして返す
The size of area B3 is determined by adding the sizes of B and C to update the size data, and the next area pointer of the header part of area B3 and the previous area pointer of the header part of area D are updated. After updating, if the update ends normally, a return code to that effect is returned, and if it does not end normally, a return code indicating that there is no area with the specified management number is returned.

なお、領域の割当てが済んでいるかどうかをチエツクす
る場合には、管理番号を指定して所定のルーチンを呼出
す。この場合には、タグが十であるヘッダ部を順次調べ
、与えられた管理番号に一致するものを捜す。そして、
割当てが済んでいるか否かを示すコードをリターンコー
ドとして返す。
Note that when checking whether or not the area has been allocated, a management number is designated and a predetermined routine is called. In this case, the header sections with the tag 10 are sequentially examined to find one that matches the given management number. and,
Returns a code indicating whether the allocation has been completed or not as a return code.

第6図および第7図はこの発明の一実施例の動作を説明
するためのフロー図であり、特に、第6図はメモリの初
期化動作を示し、第7図はメモリの取得動作を示す。次
に、第1図ないし第6図を参照して、メモリの初期化動
作について説明する。
6 and 7 are flowcharts for explaining the operation of one embodiment of the present invention, in particular, FIG. 6 shows the memory initialization operation, and FIG. 7 shows the memory acquisition operation. . Next, the memory initialization operation will be described with reference to FIGS. 1 to 6.

プログラム上の共有メモリを使用する側が共有メモリの
開始アト1ノスと共有メモリのサイズと基準残量テーブ
ルの先頭アドレスを示すポインタとをプログラム上のメ
モリ管理側に渡す。メモリ管理側はこれらのデータを受
取ったことに応じて、第2図に示すエリアコントロール
ブロック8]1を作成する。すなわち、タグを−にし、
サイズをNとし、管理番号1次領域ポインタおよび前領
域ポインタをそれぞれOに設定する。続いて、共有メモ
リエリア8】2を明期化すなわち0クリアする。
The side that uses the shared memory on the program passes the start address of the shared memory, the size of the shared memory, and a pointer indicating the start address of the reference remaining capacity table to the memory management side on the program. The memory management side creates an area control block 8]1 shown in FIG. 2 in response to receiving these data. In other words, set the tag to -,
The size is set to N, and the management number primary area pointer and previous area pointer are each set to O. Subsequently, the shared memory area 8]2 is brightened, that is, cleared to 0.

次に、第1図ないし第7図を参照して、メモリ取得動作
について説明する。まず、メモリの使用を要求するメモ
リ使用側からメモリ管理側に取得サイズの大きさnと管
理番号店とID番号mとが与えられる。メモリ管理側は
これに応じて、第4八図ないし第4C図で説明したメモ
リ取得動作を行なう。メモリ取得ができなければ、他の
処理を行なうが、メモリの取得が可能であれば、タグが
−のものでサイズか最大のものを次領域ポインタをたど
って捜す。そして、■D番号に基づいて、基準残mテー
ブル82から該当する基準最大残ブロック長を読出し、
検索した最大サイズのエリアのサイズ(SMAX)と該
当の、i!準最大残ブロック長(S)との大小を比較す
る。SMAX>Sであれば、取得を認め、取得エリアの
ポインタと取得がOKである旨のリターンコードを返し
て動作を終了する。一方、SMAX≦Sであれば、メモ
リの取得を許可することなく、第5A図ないし第5H図
で説明したメモリ解放動作を行なう。続いて、メモリが
取得できなかったことを示すポインタ0とNGの旨をリ
ターンコードとして返す。この場合には、共有メモリの
取得動作を最初から行なえば、ここで解放されたエリア
を取得することができる。
Next, the memory acquisition operation will be explained with reference to FIGS. 1 to 7. First, the memory usage side that requests the use of the memory gives the memory management side the acquired size n, the management number, and the ID number m. In response, the memory management side performs the memory acquisition operation described in FIGS. 48 to 4C. If the memory cannot be acquired, other processing is performed, but if the memory can be acquired, the next area pointer is searched for the one with the tag of - and the size or maximum. Then, based on the D number, read out the corresponding standard maximum remaining block length from the standard remaining m table 82;
The size of the largest area searched (SMAX) and the corresponding i! The size is compared with the semi-maximum remaining block length (S). If SMAX>S, the acquisition is approved, a pointer to the acquisition area and a return code indicating that the acquisition is OK are returned, and the operation ends. On the other hand, if SMAX≦S, the memory release operation described in FIGS. 5A to 5H is performed without permitting memory acquisition. Next, a pointer of 0 indicating that the memory could not be acquired and a return code indicating NG are returned. In this case, if the shared memory acquisition operation is performed from the beginning, the area released here can be acquired.

[発明の効果] 以上のように、この発明によれば、処理に必要な記憶領
域の取得が要求されたとき、メモリの未使用領域の大き
さが処理別に予め定められた取得基準データの大きさよ
りも大きいか否かを比較して取得基準以上の未使用領域
がメモリに確保されるか否かを判別し、取得基準以上の
未使用領域がメモリに確保されない場合には、メモリの
未使用領域が取得要求された領域の大きさよりも大きく
とも、その取得を許可しないようにしたので、優先順位
の高い処理に最小の取得基準データを設定しておけば、
優先順位の高いタスクやモジュールがいつでもメモリを
取得することができる。
[Effects of the Invention] As described above, according to the present invention, when acquisition of a storage area necessary for processing is requested, the size of the unused area of the memory is determined by the size of the acquisition standard data predetermined for each process. It is determined whether or not an unused area greater than the acquisition criterion is secured in memory by comparing whether or not it is larger than the acquisition criterion. Even if the area is larger than the size of the requested area, the acquisition is not allowed, so if you set the minimum acquisition standard data for high priority processing,
High priority tasks and modules can acquire memory at any time.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の一実施例が適用された取引処理シス
テムの構成図である。第2図は第1図に示す共有メモリ
の構成図である。第3図は第1図に示す基準残mテーブ
ルの構成図である。第4八図ないし第4C図は第2図に
示す共をメモリエリアの取得を説明するための図である
。第5A図ないしmSH図は第2図に示す共有メモリエ
リアの解放を説明するための図である。第6図はメモリ
の初期化動作を示すフロー図である。第7図はメモリの
取得動作を示すフロー図である。第8図は従来の取引処
理システムの構成図である。 図において、1はクラスタコントローラ、2は伝送ライ
ン、3はpos@末装置、4は電話回線網、5はホスト
コンピュータ、6はCPU、7はROM、8はRAM、
81は共有メモリ、82は基準残量テーブル、811は
エリアコントロールブロック、812は共有メモリエリ
ア、814はヘッダ部を示す。 躬4A0 第6’fD (メモつ1閏1艷j)         iゞ′)つ卑
p期でくノ第8凹 炎来う1(31,スン理シ入デにう傳へへり     
FIG. 1 is a block diagram of a transaction processing system to which an embodiment of the present invention is applied. FIG. 2 is a configuration diagram of the shared memory shown in FIG. 1. FIG. 3 is a configuration diagram of the reference remaining m table shown in FIG. 1. FIGS. 48 to 4C are diagrams for explaining acquisition of the memory areas shown in FIG. 2. 5A to mSH are diagrams for explaining release of the shared memory area shown in FIG. 2. FIG. FIG. 6 is a flow diagram showing the memory initialization operation. FIG. 7 is a flow diagram showing the memory acquisition operation. FIG. 8 is a block diagram of a conventional transaction processing system. In the figure, 1 is a cluster controller, 2 is a transmission line, 3 is a POS @ terminal device, 4 is a telephone line network, 5 is a host computer, 6 is a CPU, 7 is a ROM, 8 is a RAM,
81 is a shared memory, 82 is a reference remaining capacity table, 811 is an area control block, 812 is a shared memory area, and 814 is a header section.躬4A0 6th 'fD (Memotsu 1 jump 1 艷j) iゞ') The low p period and the 8th concave flame comes 1 (31, Sunrishi enters deniuden heheri
.

Claims (2)

【特許請求の範囲】[Claims] (1)複数の処理に共用されるメモリを管理するメモリ
管理装置であって、 前記メモリの取得許否の基準となる取得基準データを各
処理別に記憶した記憶手段と、 処理に必要な記憶領域の取得が要求されたとき、前記記
憶手段に記憶された当該処理に対応する取得基準データ
と、前記メモリの未使用領域との大小を比較し、取得基
準以上の未使用領域が前記メモリに確保されるか否かを
判別する判別手段と、前記判別手段によって取得基準以
上の未使用領域が前記メモリに確保されないことが判別
されたことに応じて、前記メモリの未使用領域が取得要
求された領域の大きさよりも大きくとも、その取得を許
可しないように制御する制御手段とを備えたメモリ管理
装置。
(1) A memory management device that manages memory shared by a plurality of processes, comprising a storage means that stores acquisition standard data for each process, which is a criterion for whether or not to acquire the memory, and a storage area necessary for the process. When acquisition is requested, the acquisition standard data corresponding to the process stored in the storage means is compared in size with the unused area of the memory, and an unused area equal to or greater than the acquisition standard is secured in the memory. a determination unit for determining whether or not an unused area of the memory is requested to be acquired in response to the determination by the determination unit that an unused area exceeding an acquisition criterion is not secured in the memory; A memory management device comprising a control means for controlling not to permit acquisition even if the size is larger than the size of the memory management device.
(2)さらに、前記記憶手段に記憶された処理別の取得
基準データを設定変更するための設定変更手段を備えた
、特許請求の範囲第1項記載のメモリ管理装置。
(2) The memory management device according to claim 1, further comprising a setting change means for changing the settings of acquisition reference data for each process stored in the storage means.
JP62335648A 1987-12-28 1987-12-28 Memory controller Pending JPH01175050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62335648A JPH01175050A (en) 1987-12-28 1987-12-28 Memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62335648A JPH01175050A (en) 1987-12-28 1987-12-28 Memory controller

Publications (1)

Publication Number Publication Date
JPH01175050A true JPH01175050A (en) 1989-07-11

Family

ID=18290949

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62335648A Pending JPH01175050A (en) 1987-12-28 1987-12-28 Memory controller

Country Status (1)

Country Link
JP (1) JPH01175050A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08263308A (en) * 1995-03-22 1996-10-11 Nec Software Ltd Memory allocation management system
JPH09146830A (en) * 1995-11-27 1997-06-06 Nec Corp Memory management system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08263308A (en) * 1995-03-22 1996-10-11 Nec Software Ltd Memory allocation management system
JPH09146830A (en) * 1995-11-27 1997-06-06 Nec Corp Memory management system

Similar Documents

Publication Publication Date Title
US6272600B1 (en) Memory request reordering in a data processing system
US5887168A (en) Computer program product for a shared queue structure for data integrity
US6886164B2 (en) Selection of a resource in a distributed computer system
EP0682312A2 (en) Hardware implemented locking mechanism for parallel/distributed computer system
US6963954B1 (en) Method and apparatus for optimizing prefetching based on memory addresses
US9462077B2 (en) System, method, and circuit for servicing a client data service request
US6189007B1 (en) Method and apparatus for conducting a high performance locking facility in a loosely coupled environment
JP2833633B2 (en) Data processing system and queue management method
US6654837B1 (en) Dynamic priority external transaction system
EP1021764A1 (en) I/o forwarding in a cache coherent shared disk computer system
US20030217152A1 (en) Resource sharing with database synchronization
US20230136539A1 (en) Bridging module, data transmission system, and data transmission method
US6912712B1 (en) Real time control system for multitasking digital signal processor using ready queue
EP0317481A2 (en) Remote storage management mechanism and method
US7069366B2 (en) System and method for handling resource transaction requests
US5680577A (en) Method and system for processing multiple requests for data residing at the same memory address
EP0317468A2 (en) Bus flow control system
US11960427B2 (en) Bridging module, data transmission system, and data transmission method
JPH01175050A (en) Memory controller
US6832300B2 (en) Methods and apparatus for control of asynchronous cache
JPH10143382A (en) Method for managing resource for shared memory multiprocessor system
US8239652B2 (en) Data processing system
JPH05204816A (en) High-efficiency access method to storage data in connecting table
US7228322B1 (en) Data management apparatus of switching system
JPH05216844A (en) Method and apparatus for improved task distribution in multiprocessor data processing system