JPH02310745A - Work buffer sharing system - Google Patents

Work buffer sharing system

Info

Publication number
JPH02310745A
JPH02310745A JP13316089A JP13316089A JPH02310745A JP H02310745 A JPH02310745 A JP H02310745A JP 13316089 A JP13316089 A JP 13316089A JP 13316089 A JP13316089 A JP 13316089A JP H02310745 A JPH02310745 A JP H02310745A
Authority
JP
Japan
Prior art keywords
area
work buffer
processing
unused
usage status
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
JP13316089A
Other languages
Japanese (ja)
Inventor
Toshiyuki Makino
牧野 敏行
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP13316089A priority Critical patent/JPH02310745A/en
Publication of JPH02310745A publication Critical patent/JPH02310745A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the utilizing efficiency of a memory and to shorten processing time as a whole by providing a utilizing state managing table to manage the utilizing state of a work buffer at every processing. CONSTITUTION:A control part 3 performs the management and control of the area of the work buffer 1 by referring to the utilizing state managing table 2. The utilizing state managing table 2 holds utilizing status by respective processing in the area of the work buffer 1 corresponding to each of the processings A-D. For example, when the processing D is unable to secure the area of designated bytes in an unused area, the unused area is extended by releasing the area of an adjacent processing C, and still it is insufficient, the area of the processing B is released by repeating such processing. Thereby, since data can be held as far as sufficient unused areas exist in the area of the work buffer without deleting preseeding data, it is possible to shorten the processing time by reducing the developmental possibility of a re-processing, and also, to effectively use the area of the work buffer.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 ° 本発明はワークバッファ共用方式に関し、特に複数
の異なる処理で大容量のワークバッファを共用するプロ
グラムにおけるワークバッファ共用方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] ° The present invention relates to a work buffer sharing method, and particularly to a work buffer sharing method in a program that shares a large capacity work buffer among a plurality of different processes.

〔従来の技術〕[Conventional technology]

従来、複数の異なる処理で同じワークバ・yファを共用
している場合には、ある処理がそのワークバッファを使
用しようとする際には、そのワークバッファがその前に
どのような処理によりどのような使われ方をして現在ど
のような状態にあるかは全く意識せず、ワークバッファ
の全領域の初期化を行い、先頭アドレスから無条件に必
要なデータを格納していた。
Conventionally, when multiple different processes share the same work buffer, when a process attempts to use that work buffer, it is difficult to understand how the work buffer was used by the previous process. The entire area of the work buffer was initialized and the necessary data was stored unconditionally starting from the first address, without being aware of the current state of the work buffer.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のワークバッファ共用方式では、実行中の
処理がワークバッファの全領域を占有してしまい、それ
までワークバッファ上に格納されていたデータは、新し
い処理が開始されるとワークバッファ上から消去されて
いた。従って、前にワークバッファ内に格納されていた
データを他の処理を行ったのち再び参照したい場合など
には、そのデータを作成するために前と同じ処理を再実
行しなければならず、会話形処理のレスポンスを遅らせ
、プログラムの総実行時間を増大させる欠点がある。
In the conventional work buffer sharing method described above, the process being executed occupies the entire area of the work buffer, and the data previously stored in the work buffer is removed from the work buffer when a new process starts. It had been erased. Therefore, if you want to refer to data that was previously stored in the work buffer after performing other processing, you must re-execute the same processing to create that data, and the conversation It has the disadvantage of delaying the response of shape processing and increasing the total execution time of the program.

又、ワークバッファの領域は、各処理で格納するデータ
のうちの最大長分を考慮して決められているため、はと
んどの場合ワークバッファの領域の一部しか使用されな
いので、メモリ使用効率が悪いという欠点がある。
In addition, the work buffer area is determined by considering the maximum length of data stored in each process, so in most cases only a part of the work buffer area is used, which improves memory usage efficiency. The disadvantage is that it is bad.

本発明の目的は、上述の欠点を除去し、メモリ使用効率
がよく全体の処理時間を短縮できるワークバッファ共用
方式を提供することである。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a work buffer sharing method that eliminates the above-mentioned drawbacks, improves memory usage efficiency, and reduces overall processing time.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のワークバッファ共用方式は、複数の異なる処理
で一つのワークバッファの領域を使用するワークバッフ
ァ共用方式において、前記ワークバッファの領域の使用
状態を前記各処理ごとに管理する使用状態管理テーブル
と、前記各処理を開始するときに前記使用状態管理テー
ブルを参照して前記ワークバッファに十分な未使用領域
があるときはあらかじめ定めた手順に従って指定サイズ
の領域を確保する領域確保手段と、前記ワークバッファ
に指定サイズの領域を確保できる未使用領域がないとき
はあらかじめ定めた手順に従って既使用領域を開放し未
使用領域を拡張する領域開放手段とを備えて構成されて
いる。
The work buffer sharing method of the present invention includes a use state management table that manages the use state of the work buffer area for each of the processes in the work buffer sharing method in which one work buffer area is used in a plurality of different processes. , an area securing means that refers to the usage state management table when starting each of the processes and secures an area of a specified size according to a predetermined procedure if there is sufficient unused space in the work buffer; If there is no unused area that can secure an area of a specified size in the buffer, the area releasing means releases the used area according to a predetermined procedure and expands the unused area.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例の構成図である。第1図にお
いて、1は4個の処理A、B、C及びDで共用するワー
クバッファ、2はワークバッファ1の領域の使用状態を
管理する使用状態管理テーブル、3は使用状態管理テー
ブル2を参照しワークバッファ1の領域の管理と制御を
行う制御部である。使用状態管理テーブル2には第1図
に示すように処理A、B、C,Dに対応する管理欄があ
り、それぞれワークバッファ1の領域内の各処理による
使用状況を保持している。
FIG. 1 is a block diagram of an embodiment of the present invention. In FIG. 1, 1 is a work buffer shared by four processes A, B, C, and D, 2 is a usage status management table that manages the usage status of the area of work buffer 1, and 3 is a usage status management table 2. This is a control unit that refers to and manages and controls the area of the work buffer 1. As shown in FIG. 1, the usage status management table 2 has management columns corresponding to processes A, B, C, and D, each of which holds the usage status of each process in the area of the work buffer 1.

第2図は使用状況管理テーブル2の詳細な構造を示す構
成図である。共用する処理の個数を示す欄と、各処理に
対して、それぞれ現在ワークバッファ1内に領域を確保
しているか否かを示す使用状況フラグと、確保している
領域の開始アドレスと、確保している領域の終了アドレ
スとを格納する欄が設けられている。
FIG. 2 is a configuration diagram showing the detailed structure of the usage status management table 2. As shown in FIG. A column indicating the number of processes to be shared, a usage status flag indicating whether or not an area is currently reserved in work buffer 1 for each process, the start address of the area reserved, and the area reserved for each process. A column is provided to store the end address of the area being stored.

次に、実際の動作例を第3図〜第7図を参照して説明す
る。第3図はどの処理もまだワークバッファを使用して
いない状態を示している。このとき、使用状況管理テー
ブルの各処理の使用状況フラグはいずれも“0”で、領
域開始アドレス及び領域終了アドレスはいずれもワーク
バッファの先頭アドレスを指している。
Next, an example of actual operation will be explained with reference to FIGS. 3 to 7. FIG. 3 shows a state in which no process is using the work buffer yet. At this time, the usage status flags for each process in the usage status management table are all "0", and the area start address and area end address both point to the start address of the work buffer.

この状態で処理Aが任意のバイト数の領域確保を要求す
ると、第4図のようにワークバッファの先頭から要求さ
れたサイズの領域Aが取られる。
In this state, when process A requests to secure an area of an arbitrary number of bytes, area A of the requested size is allocated from the beginning of the work buffer as shown in FIG.

このとき、処理Aの使用状況フラグが“1”となり、領
域終了アドレスが更新される。これと同時に処理A以外
の処理B、C,Dの領域開始アドレス及び領域終了アド
レスはすべて処理Aの領域終了アドレスに置き換わる。
At this time, the usage status flag of process A becomes "1" and the area end address is updated. At the same time, the area start addresses and area end addresses of processes B, C, and D other than process A are all replaced with the area end address of process A.

次に処理Cがワークバッファを使用しようとすると、処
理Cの領域開始アドレスは処理Aの領域終了アドレスに
なっているので、第5図のように処理Aに続いて処理C
の領域が確保される。このとき、処理りの領域開始およ
び終了アドレスは処理Cの領域終了アドレスに置き換わ
るが、処理Bの領域開始および終了アドレスには変更が
なく、処理Aの領域終了アドレス及び処理Cの領域開始
アドレスと同じになっている。
Next, when process C tries to use the work buffer, the area start address of process C is the area end address of process A, so process A is followed by process C as shown in Figure 5.
area is secured. At this time, the area start and end addresses of process A are replaced with the area end addresses of process C, but the area start and end addresses of process B remain unchanged, and the area end addresses of process A and the area start address of process C are replaced. It's the same.

この状態で処理Bがワークバッファ内に領域を取得する
場合には、第6図に示すように処理Aと処理Cの領域の
間に処理Bの領域が挿入される形となり、処理Cの領域
は処理Bの領域骨だけシフトされる。
In this state, when process B acquires an area in the work buffer, the area of process B is inserted between the areas of processes A and C, as shown in Figure 6, and the area of process C is is shifted by the area bone of process B.

次に、指定バイト数の領域がワークバッファの未使用領
域内に確保できない場合の動作例を第6図、第7図を参
照して説明する。第6図の状態で処理りが領域を取得し
にいくと、未使用領域内に指定バイト数の領域が一確保
できるかのチェックを行い、未使用領域だけで確保しき
れない場合は、まず隣接の処理Cの領域を開放して未使
用領域を拡張する。それでも不足の場合にはこの処理を
繰り返して処理Bの領域を開放する。その結果指定バイ
ト数の領域が確保できるまで未使用領域が拡張されると
、第7図のように処理りの領域が確保され、その状態が
使用状態管理テーブルに反映される。
Next, an example of the operation when the area of the specified number of bytes cannot be secured in the unused area of the work buffer will be described with reference to FIGS. 6 and 7. When the processing tries to acquire an area in the state shown in Figure 6, it checks whether the specified number of bytes can be secured in the unused area, and if the area cannot be secured with just the unused area, first The area of adjacent processing C is released to expand the unused area. If the amount is still insufficient, this process is repeated to release the area for process B. As a result, when the unused area is expanded until an area of the specified number of bytes is secured, an area for processing is secured as shown in FIG. 7, and its status is reflected in the usage state management table.

以上説明したように、ワークバッファに十分な未使用領
域のある場合には、前のデータを消去することなく新た
な領域を確保するように制御するので、前に処理したデ
ータを参照する必要が生じた際に再処理を行う機会を減
らし、プログラム全体としての処理時間を短縮すること
ができる。なお、既にワークバッファ内に領域を確保し
ている処理を再び実行する場合は、前の領域を一度開放
したのち新たな領域を確保する。
As explained above, if there is sufficient unused space in the work buffer, control is performed to secure a new area without erasing the previous data, so there is no need to refer to previously processed data. It is possible to reduce the chances of performing reprocessing when a program occurs and shorten the processing time for the entire program. Note that when re-executing a process for which an area has already been secured in the work buffer, the previous area is released once and then a new area is secured.

上述の実施例は、処理A〜Dが階層構成でその順序を変
更しないようにワークバッファ内に領域を確保する例で
あるが、処理の種別によるこのような限定を付けずに領
域を確保するよにしてもよい。すなわち、処理Aの後に
処理Cの領域を確保したとき、使用状態管理テーブルの
処理Bの領域開始アドレスを第5図のように処理Aの領
域終了アドレスとせず、処理Cの領域終了アドレスに変
更するように構成すれば、処理Bの領域は処理Cの領域
の下に確保される。
The above embodiment is an example in which an area is secured in the work buffer so that the order of processes A to D is not changed in a hierarchical structure, but the area is secured without such limitations depending on the type of process. You may do so. That is, when the area for process C is secured after process A, the area start address for process B in the usage status management table is changed to the area end address for process C instead of the area end address for process A as shown in FIG. If configured to do so, the processing B area is secured below the processing C area.

〔発明の効果〕〔Effect of the invention〕

以上詳細に説明したように、本発明は、使用状態管理テ
ーブルを導入して各処理のデータを格納しているワーク
バッファ領域の領域開始および終了アドレスを管理して
いるので、ワークバッファ領域内に十分な未使用領域が
ある限り、前のデータを抹消することなしに保持するこ
とができる。
As explained in detail above, the present invention introduces a usage status management table to manage the area start and end addresses of the work buffer area that stores data for each process. As long as there is sufficient unused space, previous data can be retained without being deleted.

従って、再処理の発生機会を減らして全体の処理時間を
短縮でき、且つワークバッファの領域を有効利用できる
効果がある。
Therefore, the overall processing time can be shortened by reducing the chances of reprocessing occurring, and the work buffer area can be used effectively.

図面の簡単な説明 第1図は本発明の一実施例の構成図、第2図は第1図の
使用状態管理テーブルの構成図、第3図〜第7図は第1
図の実施例の動作を説明するための説明図である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a configuration diagram of one embodiment of the present invention, FIG. 2 is a configuration diagram of the usage status management table in FIG. 1, and FIGS.
It is an explanatory diagram for explaining operation of an example of a figure.

1・・・・・・ワークバッファ、2・・・・・・使用状
態管理テーブル、3・・・・・・制御部。
1...Work buffer, 2...Usage status management table, 3...Control unit.

Claims (1)

【特許請求の範囲】[Claims] 複数の異なる処理で一つのワークバッファの領域を使用
するワークバッファ共用方式において、前記ワークバッ
ファの領域の使用状態を前記各処理ごとに管理する使用
状態管理テーブルと、前記各処理を開始するときに前記
使用状態管理テーブルを参照して前記ワークバッファに
十分な未使用領域があるときはあらかじめ定めた手順に
従って指定サイズの領域を確保する領域確保手段と、前
記ワークバッファに指定サイズの領域を確保できる未使
用領域がないときはあらかじめ定めた手順に従って既使
用領域を開放し未使用領域を拡張する領域開放手段とを
備えたことを特徴とするワークバッファ共用方式。
In a work buffer sharing method in which an area of one work buffer is used in a plurality of different processes, a usage status management table for managing the usage status of the area of the work buffer for each of the processes, and a usage status management table for managing the usage status of the area of the work buffer for each process; an area securing means for securing an area of a specified size according to a predetermined procedure when there is sufficient unused area in the work buffer by referring to the usage state management table; A work buffer sharing method characterized by comprising an area release means for releasing a used area and expanding an unused area according to a predetermined procedure when there is no unused area.
JP13316089A 1989-05-26 1989-05-26 Work buffer sharing system Pending JPH02310745A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13316089A JPH02310745A (en) 1989-05-26 1989-05-26 Work buffer sharing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13316089A JPH02310745A (en) 1989-05-26 1989-05-26 Work buffer sharing system

Publications (1)

Publication Number Publication Date
JPH02310745A true JPH02310745A (en) 1990-12-26

Family

ID=15098095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13316089A Pending JPH02310745A (en) 1989-05-26 1989-05-26 Work buffer sharing system

Country Status (1)

Country Link
JP (1) JPH02310745A (en)

Similar Documents

Publication Publication Date Title
JPH0798663A (en) Asynchronous i/o control system
JPH02310745A (en) Work buffer sharing system
JPH08329019A (en) Data management system of semaphore
JPH11312092A (en) Method for switching task and data processor
JPH0644191A (en) Buffer control method
JPH03265948A (en) Buffer pool controller
JP2000148577A (en) Method and device for controlling access
JPH1069429A (en) Device and program for buffer allocation management
JPH086829A (en) Simultaneous full data retrieving method for data base
JPS61109160A (en) Area control system for inter-system share volume
JPH0337748A (en) External storage accessing system utilizing main storage
JPH02214927A (en) Method and device for control of multi-window
JPS62209635A (en) Access system for system control file of asynchronous communication
JPH03245234A (en) Memory area allocating method
JPH08249225A (en) Memory management device
JP2926873B2 (en) Computer system
JP2002033765A (en) Device and method for controlling linked list system buffer memory
JP2000347939A (en) System and method for managing memory
JPS61210462A (en) Dynamic control method for input and output buffer mechanism
JPH1049433A (en) Memory storage system
JP2003256268A (en) Memory management apparatus, communication device, memory management method and memory management program
JPH0368046A (en) Memory access system
JPH01255055A (en) System for managing cell pool area
JPH0743664B2 (en) Shared storage area allocation processing method
JPH0348950A (en) Memory control system