JPH0426737B2 - - Google Patents

Info

Publication number
JPH0426737B2
JPH0426737B2 JP61221497A JP22149786A JPH0426737B2 JP H0426737 B2 JPH0426737 B2 JP H0426737B2 JP 61221497 A JP61221497 A JP 61221497A JP 22149786 A JP22149786 A JP 22149786A JP H0426737 B2 JPH0426737 B2 JP H0426737B2
Authority
JP
Japan
Prior art keywords
area
module
program
macro
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP61221497A
Other languages
Japanese (ja)
Other versions
JPS6376029A (en
Inventor
Mitsuru Okumura
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 JP61221497A priority Critical patent/JPS6376029A/en
Publication of JPS6376029A publication Critical patent/JPS6376029A/en
Publication of JPH0426737B2 publication Critical patent/JPH0426737B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 〔概要〕 テスト時において、領域管理モジユールに領域
の開放依頼があつたとき、その領域内のビツトを
反転して開放することにより、誤つて開放された
領域を参照するような誤動作を検出しやすくす
る。
[Detailed Description of the Invention] [Summary] During testing, when an area management module is requested to release an area, the area that was accidentally released is referenced by reversing the bits in that area and releasing it. Make it easier to detect such malfunctions.

〔産業上の利用分野〕[Industrial application field]

本発明は、情報処理システムにおけるプログラ
ムのテスト方式に関するものであり、特にプログ
ラムテスト時に一旦獲得された領域が返却によ
り、開放された後、その開放された領域を誤つて
参照するプログラムがあつた場合、誤動作として
検出しやすくするための領域管理方式に関する。
The present invention relates to a program testing method in an information processing system, and in particular, when an area once acquired during a program test is returned and released, there is a program that erroneously references the released area. , relates to an area management method for making it easier to detect malfunctions.

〔従来の技術〕[Conventional technology]

一般に、複数のモジユールで構成されるプログ
ラムでは、メモリ資源の効率的利用の面から、そ
れぞれのモジユールが実行時に必要とする領域を
獲得し、処理終了とともにその領域を返却して開
放し、他の使用を可能にする方法がとられてい
る。この場合、領域獲得にはGETMAINマクロ
を発行し、領域返却にはFREEMAINマクロを発
行して、それぞれスーパーバイザプログラムのサ
ービスを受ける。
Generally, in a program composed of multiple modules, from the standpoint of efficient use of memory resources, each module acquires the area it needs during execution, returns and frees that area when processing is completed, and uses it for other modules. A method is being taken to enable its use. In this case, a GETMAIN macro is issued to acquire an area, a FREEMAIN macro is issued to return an area, and each service is received from the supervisor program.

たとえば、第3図に示すような構成のプログラ
ムを考える。このプログラムでは、主制御モジユ
ールMAINのもとに複数個のサブモジユール
SUB−1,SUB−2,…,SUB−nが従属され
ている。ここで、次のような領域使用が要求され
るものとする。
For example, consider a program with a configuration as shown in FIG. In this program, multiple submodules are controlled under the main control module MAIN.
SUB-1, SUB-2, ..., SUB-n are subordinated. Here, it is assumed that the following area usage is required.

MAINで獲得された領域をSUB−1〜nで
参照し、MAINで返却する。
The area acquired by MAIN is referenced by SUB-1 to SUB-n and returned by MAIN.

SUB−1で獲得し使用された領域をSUB−
1で返却する。
The area acquired and used by SUB-1 is SUB-
Return it in 1.

SUB−2で獲得された領域をSUB−1〜n
で参照し、SUB−nで返却する。
The area acquired by SUB-2 is SUB-1~n
Reference it with , and return it with SUB-n.

MAINで獲得し使用された領域をMAINで
返却する。
The area acquired and used by MAIN is returned by MAIN.

通常この場合、〜での領域獲得時には、そ
の都度GETMAINマクロが発行されるが、
GETMAINマクロによりSVC(スーパーバイザコ
ール)が発生し、スーパーバイザプログラムの処
理に切り替えることから、オーバヘツドが大きく
なり、性能が低下する。このため第4図に示され
るように、プログラム独自の領域管理モジユール
を設ける方法がしばしばとられる。
Normally, in this case, a GETMAIN macro is issued each time an area is acquired in ~, but
The GETMAIN macro generates an SVC (supervisor call) and switches to supervisor program processing, which increases overhead and degrades performance. For this reason, as shown in FIG. 4, a method is often taken in which a program-specific area management module is provided.

この領域管理モジユールの機能は、予め
GETMAINマクロを発行して、スーパーバイザ
プログラムからあるまとまつた大きさの領域を獲
得しておき、他の各モジユールがGETMAINマ
クロを発行したとき、自分がGETMAINマクロ
で獲得してある領域を分割して使用可能な領域を
要求元モジユールに通知し、また各モジユールか
らのFREEMAINマクロによる領域開放依頼(返
却)についても、実際にはFREEMAINマクロを
発行することなく、その領域を次のGETMAIN
マクロに対する使用可能領域として領域管理モジ
ユールに管理させることで代えるものである。
The functions of this area management module are
Issue the GETMAIN macro to acquire a certain size of area from the supervisor program, and when each other module issues the GETMAIN macro, divide and use the area that you acquired with the GETMAIN macro. The available area is notified to the requesting module, and when an area release request (return) is made using the FREEMAIN macro from each module, the area is transferred to the next GETMAIN without actually issuing the FREEMAIN macro.
This is replaced by having the area management module manage this area as a usable area for the macro.

上記した第3図の例を第4図の場合で説明する
と、上記の〜の領域の獲得・返却要求はそれ
ぞれ領域管理モジユールを呼び出すことにより行
われる。
To explain the example of FIG. 3 above using the case of FIG. 4, the above-mentioned requests for acquisition and return of areas are performed by respectively calling the area management module.

の獲得要求では、あるまとまつた単位(1ペ
ージ等)でGETMAINマクロを発行し要求元に
その一部を渡す。
In the acquisition request, the GETMAIN macro is issued in a certain unit (such as one page) and a part of it is passed to the requester.

の獲得要求では、で獲得した領域の残りか
ら、その一部を要求元に返す。また、この時の返
却要求ではその領域を未使用情報として管理して
おく。
In the acquisition request, a portion of the remaining area acquired in is returned to the request source. Further, in the return request at this time, the area is managed as unused information.

の獲得要求では、で未使用状態として管理
してある領域から要求元に返す。この時の返却要
求でも、その領域を未使用状態として管理してお
く。
When an acquisition request is made, the area that is managed as unused is returned to the request source. Even when a return request is made at this time, the area is managed as unused.

でも同様である。 But it's the same.

そしてこのプログラム中で、領域管理モジユー
ルにより実際にGETMAINマクロで獲得された
領域は、そのプログラムの最後でFREEMAINマ
クロで返却する。
In this program, the area actually acquired by the area management module using the GETMAIN macro is returned using the FREEMAIN macro at the end of the program.

これにより、GETMAIN,FREEMAINの回
数が大幅に削減される。
This greatly reduces the number of GETMAIN and FREEMAIN operations.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

第4図に示されているような領域管理モジユー
ルをもつプログラムにおいて、あるモジユール
が、誤つて開放すべきでない領域に対して
FREEMAINマクロを発行して開放してしまい、
さらにその後でその領域が他のモジユールからの
GETMAINマクロによつて再利用されている場
合、たとえばその領域が制御表として使用されて
いれば、再利用した他のモジユールによつて制御
表の内容が書き替えられてしまう可能性がある。
In a program that has an area management module like the one shown in Figure 4, a certain module accidentally opens an area that should not be opened.
I issued the FREEMAIN macro and released it,
Then, the area is expanded from other modules.
If the area is reused by the GETMAIN macro, for example, if the area is used as a control table, the contents of the control table may be rewritten by another reused module.

そこで、先に誤つて領域を開放したモジユール
が開放していないものとしてその領域の制御表を
参照した場合、他のモジユールによつて既に内容
が書き替えられていれば誤動作するため、誤つて
領域を開放したというプログラムの誤りが発見さ
れる。
Therefore, if the module that released the area by mistake first refers to the control table for that area as if it has not been released, a malfunction will occur if the contents have already been rewritten by another module, so the module that released the area by mistake will An error was discovered in the program that released the .

しかし、上記他のモジユールが再利用した領域
の制御表の書き替えをしていない場合、元のモジ
ユールの制御表データがそのまま保存されている
ため、元のモジユールが制御表を参照した場合に
正しく動作しているように見え、誤動作とならな
い。
However, if the control table in the area reused by the other module above is not rewritten, the original module's control table data will be saved as is, so if the original module references the control table, it will not work properly. It appears to be working and does not malfunction.

また、GETMAINマクロによる領域の利用を
最適化する必要から、FREEMAINマクロが発行
されて開放された領域が次に再利用されるタイミ
ングはまちまちとなる。そのためテスト段階での
FREEMAINマクロ発行誤りの検出は一層困難と
なる。
Furthermore, because it is necessary to optimize the use of the area by the GETMAIN macro, the timing at which the area released by issuing the FREEMAIN macro will be reused will vary. Therefore, at the testing stage
Detecting errors in issuing the FREEMAIN macro becomes more difficult.

そこで従来は、FREEMAINマクロにより開放
する領域を、“FFFF…”または“0000…”でク
リアする方法がとられることもあつたが、その場
合元のデータに“F”あるいは“0”の連続デー
タが含まれている場合、完全にクリアできないた
め、誤動作とならない可能性が残つた。
Therefore, in the past, the area released by the FREEMAIN macro was sometimes cleared with "FFFF..." or "0000...", but in that case, the original data was replaced with continuous "F" or "0" data. If it is included, it cannot be completely cleared, so there is a possibility that it will not malfunction.

その結果、プログラムテストでは誤りが発見さ
れずに、顧客へ出荷されてから誤動作するという
問題があつた。
As a result, there was a problem that no errors were discovered during program testing, and the system malfunctioned after it was shipped to the customer.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、上記した従来の問題点を解決するた
め、FREEMAINマクロにより開放する領域のビ
ツトの値を全て反転することによつて、元のデー
タを完全に破壊し、誤つてFREEMAINマクロを
発行したモジユールがその後で、その領域を参照
した場合、確実に誤動作を生じるようにさせるも
のである。
In order to solve the above-mentioned conventional problems, the present invention completely destroys the original data by inverting all the bit values in the area to be released by the FREEMAIN macro, thereby preventing the incorrect issuing of the FREEMAIN macro. This ensures that a malfunction will occur if the module subsequently references that area.

第1図に本発明の原理的構成を示す。 FIG. 1 shows the basic configuration of the present invention.

図において、1ないし5はテスト対象プログラ
ムを構成するモジユールであり、そのうち1は主
制御モジユールMAIN、2,3,4はそれぞれ
副モジユールSUB−1,SUB−2,…,SUB−
n、5は領域管理モジユールである。
In the figure, 1 to 5 are modules that constitute the test target program, of which 1 is the main control module MAIN, and 2, 3, and 4 are sub modules SUB-1, SUB-2, ..., SUB-, respectively.
n, 5 is an area management module.

6は、領域管理モジユール5が領域獲得命令
(GETMAINマクロ)を発行して獲得した領域で
ある。
6 is an area acquired by the area management module 5 by issuing an area acquisition command (GETMAIN macro).

7は、他のモジユールが発行した領域獲得命令
(GETMAINマクロ)に応じて、領域6から使用
可能領域を切り出して、領域獲得命令発行元モジ
ユールに割り付ける処理を行う領域獲得命令対応
部である。
Reference numeral 7 denotes an area acquisition command corresponding unit that performs processing of cutting out a usable area from the area 6 and allocating it to the module that issued the area acquisition instruction in response to an area acquisition command (GETMAIN macro) issued by another module.

8は、他のモジユールが発行した領域開放命令
(FREEMAINマクロ)により返却された該当領
域を使用可能領域に変更する処理を行う領域開放
命令対応部である。
Reference numeral 8 denotes an area release command support unit that performs processing to change the corresponding area returned by an area release command (FREEMAIN macro) issued by another module into a usable area.

9は、領域開放命令対応部8が、返却された領
域を使用可能領域に変更する際に、その領域の各
ビツトの値を反転するビツト反転機能であり、プ
ログラムがテスト環境にあるときに働かされる。
9 is a bit inversion function that inverts the value of each bit in the area when the area release command support unit 8 changes the returned area to a usable area, and is activated when the program is in a test environment. It will be done.

〔作用〕[Effect]

第1図に示された本発明の原理的構成におい
て、たとえばモジユールSUB−1が領域獲得命
令を発行し、領域獲得依頼を行つた場合、領域管
理モジユール5の領域獲得命令対応部7は領域6
の中の未使用領域から必要な大きさの領域を切り
出して、依頼元のモジユールSUB−1にその領
域を割り付け通知する。
In the basic structure of the present invention shown in FIG.
An area of a necessary size is cut out from the unused area in , and the area is allocated and notified to the requesting module SUB-1.

モジユールSUB−1は処理を終了すると、領
域開放命令を発行し、獲得してある領域の返却を
依頼する。これに応じて、領域管理モジユール5
の領域開放命令対応部8は、依頼元のモジユール
SUB−1に割り付けてある領域を未使用領域に
変更する。その際、未使用領域に変更した領域内
の全ビツトについて、ビツト反転機能9を用いて
各“0”を“1”に、各“1”を“0”にそれぞ
れ反転する。
When module SUB-1 finishes processing, it issues an area release command and requests return of the acquired area. Accordingly, the area management module 5
The area release command response unit 8 of
Change the area allocated to SUB-1 to an unused area. At this time, the bit inversion function 9 is used to invert each "0" to a "1" and each "1" to a "0" for all bits in the area changed to an unused area.

このようにして、返却された領域内のデータは
完全に破壊されるので、もしもあるモジユールが
領域開放命令を誤つて発行して領域を返却した
後、その領域を参照した場合、確実に誤動作し、
プログラムの誤りを発見できる。
In this way, the data in the returned area is completely destroyed, so if a module erroneously issues an area release command and returns the area and then references that area, it will definitely malfunction. ,
You can discover errors in programs.

〔実施例〕〔Example〕

第2図に本発明の実施例を示す。 FIG. 2 shows an embodiment of the present invention.

図において、15は領域管理モジユール、16
は領域、16aはフラグテーブル、17は
GETMAIN対応部、18はFREEMAIN対応部、
19はビツト反転機能、20はプログラム実行に
使用される主制御表、21はデバツグモードか通
常モードかを表示するモード表示フイールドであ
る。なお、第2図中に15ないし19で示されて
いる構成要素は、第1図中に5ないし9で示され
ている構成要素に対応している。
In the figure, 15 is an area management module, 16
is the area, 16a is the flag table, and 17 is the area.
GETMAIN compatible part, 18 is FREEMAIN compatible part,
19 is a bit inverting function, 20 is a main control table used for program execution, and 21 is a mode display field for displaying debug mode or normal mode. Note that the components indicated by 15 to 19 in FIG. 2 correspond to the components indicated by 5 to 9 in FIG. 1.

簡単に説明すると、領域管理モジユール15
は、GETMAINマクロを用いて獲得した領域1
6を一定の大きさに分割し、それぞれの領域が未
使用か使用中かを“0”,“1”でフラグ表示する
フラグテーブル16aを用いて領域管理する。
To explain briefly, area management module 15
is area 1 acquired using the GETMAIN macro
6 is divided into a certain size, and the area is managed using a flag table 16a that displays a flag with "0" or "1" to indicate whether each area is unused or in use.

GETMAIN対応部17は、他のモジユールか
らのGETMAINマクロに応答して、フラグテー
ブル16aから未使用領域(フラグ“0”の領
域)を探し、必要な大きさの領域を割り付ける。
また割り付けた領域に対応するフラグを“0”か
ら“1”に変更し、使用中(割り付け済)表示と
する。
In response to a GETMAIN macro from another module, the GETMAIN support unit 17 searches the flag table 16a for an unused area (an area with a flag of "0") and allocates an area of the necessary size.
Also, the flag corresponding to the allocated area is changed from "0" to "1" to indicate that it is in use (allocated).

FREEMAIN対応部18は、領域使用中のモジ
ユールからのFREEMAINマクロに応答して、割
り付けてある該当領域を開放する。その場合、フ
ラグテーブル16aの対応するフラグを“1”か
ら“0”に変更し、さらにテストモード時にはビ
ツト反転機能19を動作させる。
The FREEMAIN support unit 18 releases the allocated area in response to the FREEMAIN macro from the module that is using the area. In that case, the corresponding flag in the flag table 16a is changed from "1" to "0", and the bit inversion function 19 is operated in the test mode.

主制御表20には、処理のモードか通常モード
かデバツグモードかを表すためのモード表示フイ
ールド21が設けられている。そしてプログラム
テスト実行時には、デバツグモード表示が設定さ
れる(たとえば、ソースのコンパイル処理時にオ
プシヨンでデバツグ指定を行う)。
The main control table 20 is provided with a mode display field 21 for indicating the processing mode, normal mode, or debug mode. When executing a program test, a debug mode display is set (for example, debug mode is specified as an option when compiling the source).

ビツト反転機能19は、上記のモード表示フイ
ールド21がデバツグモードを表示しているとき
にのみ起動され、開放対象領域内の番地を順次読
み出し、各読み出したデータと“FFF…F”(all
“1”)との排他的論理和演算を行い、ビツト反転
された結果を元の番地に書き込む。このようにし
て、開放対象領域内の全ビツトの値を反転し、元
の値を破壊する。
The bit reversal function 19 is activated only when the mode display field 21 is displaying the debug mode, and sequentially reads out addresses within the release target area, and combines each read data with "FFF...F" (all
1) and writes the bit-inverted result to the original address. In this way, the values of all bits within the area to be released are inverted and the original values are destroyed.

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

以上述べたように、本発明によれば、独自の領
域管理モジユールをもつプログラムのテストにお
いて、プログラムに含まれる領域返却および参照
の誤りの発見が容易となり、プログラムの信頼性
を向上させることができる。
As described above, according to the present invention, when testing a program having a unique area management module, errors in area returns and references included in the program can be easily discovered, and the reliability of the program can be improved. .

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

第1図は本発明の原理的構成図、第2図は本発
明の1実施例の構成図、第3図および第4図はそ
れぞれ従来の異なる領域管理方式の説明図であ
る。 第1図中、1……主制御モジユールMAIN、
2,3,4……副モジユールSUB−1,SUB−
2,SUB−n、5……領域管理モジユール、6
……領域、7……領域獲得命令対応部、8……領
域開放命令対応部、9……ビツト反転機能。
FIG. 1 is a basic block diagram of the present invention, FIG. 2 is a block diagram of one embodiment of the present invention, and FIGS. 3 and 4 are explanatory diagrams of different conventional area management systems. In Fig. 1, 1...main control module MAIN,
2, 3, 4...Sub module SUB-1, SUB-
2, SUB-n, 5...area management module, 6
...Area, 7...Area acquisition command support section, 8...Area release command support section, 9...Bit inversion function.

Claims (1)

【特許請求の範囲】 1 独自の領域管理モジユール5を含む複数のモ
ジユールで構成されたプログラムを処理する情報
処理システムにおいて、 上記領域管理モジユール5は、領域獲得命令を
発行してある大きさの領域6を獲得した後、プロ
グラム内の他のモジユールが領域獲得命令を発行
して領域獲得依頼を行つたとき、自モジユールが
先に獲得してある領域6の中の未使用領域を切り
出して依頼元のモジユールに割り付け、使用可能
にする領域獲得命令対応部7と、プログラム内の
他のモジユールが領域開放命令を発行して、使用
中の領域について領域返却依頼を行つたとき、該
当する割り付け済み領域を未使用領域に変更し再
使用を可能にする領域開放命令対応部8とをそな
え、 上記領域開放命令対応部8は、プログラムのテ
スト時に、返却された割り付け済み領域を未使用
領域に変更する際、その領域内の全てのビツトの
値を反転することを特徴とするプログラムテスト
における領域管理方式。
[Claims] 1. In an information processing system that processes a program composed of a plurality of modules including a unique area management module 5, the area management module 5 issues an area acquisition command to acquire an area of a certain size. After acquiring area 6, when another module in the program issues an area acquisition command and makes an area acquisition request, the own module cuts out an unused area in area 6 that was acquired earlier and sends it to the requester. When the area acquisition instruction support unit 7 that allocates the area to a module and makes it usable, and another module in the program issue an area release instruction and request an area return for the area in use, the corresponding allocated area The area release instruction support unit 8 changes the returned allocated area to an unused area during a program test. An area management method for program testing that is characterized by inverting the values of all bits within that area.
JP61221497A 1986-09-19 1986-09-19 Area control system for program test Granted JPS6376029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61221497A JPS6376029A (en) 1986-09-19 1986-09-19 Area control system for program test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61221497A JPS6376029A (en) 1986-09-19 1986-09-19 Area control system for program test

Publications (2)

Publication Number Publication Date
JPS6376029A JPS6376029A (en) 1988-04-06
JPH0426737B2 true JPH0426737B2 (en) 1992-05-08

Family

ID=16767633

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61221497A Granted JPS6376029A (en) 1986-09-19 1986-09-19 Area control system for program test

Country Status (1)

Country Link
JP (1) JPS6376029A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04217048A (en) * 1990-12-18 1992-08-07 Pfu Ltd memory management device

Also Published As

Publication number Publication date
JPS6376029A (en) 1988-04-06

Similar Documents

Publication Publication Date Title
US4387427A (en) Hardware scheduler/dispatcher for data processing system
US4480304A (en) Method and means for the retention of locks across system, subsystem, and communication failures in a multiprocessing, multiprogramming, shared data environment
US5274789A (en) Multiprocessor system having distributed shared resources and dynamic and selective global data replication
US6542919B1 (en) Operating system for use with protection domains in a single address space
US5088031A (en) Virtual machine file control system which translates block numbers into virtual addresses then into real addresses for accessing main storage
GB2265734A (en) Free memory cell management system
JPH0776944B2 (en) Virtual index mechanism
US6473848B2 (en) Method for controlling memory access on a machine with non-uniform memory access and machine for implementing such a method
EP0294499B1 (en) Control scheme for segmented buffers based on a shared reference count
US5809551A (en) Pending page release
JPH0426737B2 (en)
JP2552759B2 (en) Database processor by multiprocessor
EP0049423B1 (en) Multiprocessor system
JPS62226367A (en) digital computer system
JP2864496B2 (en) Multi-processing computer
JP2798140B2 (en) Virtual space control method
JPS58165164A (en) Information source management method
JPH09282291A (en) System and method for canceling lock flag of common storage device
JP2535584B2 (en) Real memory fixed processing computer
JPS60215272A (en) multiprocessor system
JPS62241047A (en) Shared control method of input/output buffer using database management system
JPH0534705B2 (en)
Barkley et al. A performance study of the UNIX® System V fork system call using CASPER
JPS63266554A (en) Program debugging system
JPH07120305B2 (en) Database processing method by multiprocessor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees