JPH04170643A - Optimum segmentation determining system - Google Patents

Optimum segmentation determining system

Info

Publication number
JPH04170643A
JPH04170643A JP2299537A JP29953790A JPH04170643A JP H04170643 A JPH04170643 A JP H04170643A JP 2299537 A JP2299537 A JP 2299537A JP 29953790 A JP29953790 A JP 29953790A JP H04170643 A JPH04170643 A JP H04170643A
Authority
JP
Japan
Prior art keywords
module
segment
storage device
modules
information table
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
JP2299537A
Other languages
Japanese (ja)
Inventor
Misako Asao
朝生 美佐子
Tomiyuki Wakatsuki
若槻 冨幸
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 Corp
NEC Solution Innovators Ltd
Original Assignee
NEC Corp
NEC Software Chubu 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 Corp, NEC Software Chubu Ltd filed Critical NEC Corp
Priority to JP2299537A priority Critical patent/JPH04170643A/en
Publication of JPH04170643A publication Critical patent/JPH04170643A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To reduce the replacing frequency of segments by executing a temporarily linked load module and connecting each load module in accordance with the number of accesses. CONSTITUTION:A program is executed by the state which a load module stored in the external storage device 12 is developed on a main storage device 14 and each instruction is processed by a CPU 13. In the case of executing segmentation, a module relation information table 15 having an area for storing module accessing/accessed relation and an area for storing the number of accessed times is previously formed. Then, a temporarily linked road module is executed and an accessing module, an accessed module and the number of accesses between both the modules are stored in the table 15. Segment table groups 16 are successively formed by combining plural modules in accordance with the descending order of access frequency. Consequently, the probability of including a required module in the main storage is high, so that the replacing frequency of segments is reduced.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は最適セグメンテーシ1ン決定システムに関し、
特にプログラムのロードモジュール構造に関し、特にオ
ーバレイ構造におけるセグメンテーションに関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to an optimal segmentation system.
In particular, it relates to the load module structure of programs, and particularly to segmentation in overlay structures.

〔従来の技術〕[Conventional technology]

一つのプログラムを主記憶領域に格納できない場合、ロ
ードモジュールをオーバレイ構造にして実行する。つま
り、そのプログラムを同時に実行されることのない幾つ
かの部分(セグメントとよぶ)に分割し、必要となった
セグメントのみを主記憶領域に格納して実行する。多く
の場合、プログラムは構造化プログラミング技法などに
より多数のモジュール(あるいはサブプログラムとよば
れる場合もある)から構成されて詔り、リンク時にそれ
らのモジュールをまとめて複数個のセグメントを形成す
る。この時、どのモジュールとどのモジュールとをまと
めて一つにする(この作業をセグメンテーションという
)かにおいては、ただ単にセグメントの大きさのみに着
目して行なわれていた。
If one program cannot be stored in the main memory area, the load module is executed in an overlay structure. That is, the program is divided into several parts (called segments) that are not executed simultaneously, and only the necessary segments are stored in the main storage area and executed. In many cases, a program is composed of a large number of modules (or sometimes called subprograms) using structured programming techniques, and when linked, these modules are put together to form a plurality of segments. At this time, the process of combining which modules into one (this process is called segmentation) was carried out by simply focusing on the size of the segments.

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

上述した従来のセグメントの大きさのみに着目したので
は、必ずしも最適なセグメンテーションでなく、実行時
に必要なセグメントが主記憶領域に存在していない確率
が高く、頻繁にセグメントの置き換えが発生し、そのた
めスルーブツト等の性能低下の一要因となっていた。ま
た、最適なセグメンテーションにするためにシニミレー
ションなどにより試行錯誤を繰り返していたため多大な
時間を必要としていた。
Focusing only on the conventional segment size described above does not necessarily result in optimal segmentation, and there is a high probability that the segment required during execution does not exist in the main storage area, resulting in frequent segment replacement. This was a factor in the performance deterioration of throughputs, etc. Furthermore, in order to obtain the optimal segmentation, a lot of time was required as trial and error was repeated using synimilation and the like.

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

本発明の最適セグメンテーシロン決定システムは、操作
の指示を入力する入力装置と、ロードモジュールを格納
する外部記憶装置と、プログラムを実行する中央処理装
置と、プログラムの実行時にプログラムを格納する主記
憶装置と、構造化プログラミングなどにおけるモジュー
ル間のインクフェースの有無を記憶するモジュール関連
情報テーブルと、セグメントとしてまとめるモジュール
名を記憶するセグメントテーブル群と、実行結果を出力
する出力装置とを有している。
The optimal segmentation system determining system of the present invention includes an input device for inputting operation instructions, an external storage device for storing a load module, a central processing unit for executing a program, and a main memory for storing the program when the program is executed. It has a device, a module related information table that stores the presence or absence of an ink face between modules in structured programming, etc., a group of segment tables that stores names of modules that are grouped into segments, and an output device that outputs execution results. .

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例を示し、これにもとすいて基
本的な考え方を説明する。第1図において、一般にプロ
グラムの実行は、外部記憶装置12に記憶しであるロー
ドモジュールを主記憶装置14上に展開し、その−命令
ずつを中央処理装置13で処理するという形態で行われ
る。また、それらの実行開始の指示等は入力装置11か
ら行われ、処理結果は出力装置17に出力される。オー
バレイ構造のロードモジュールでは主記憶装置14に展
開する単位がセグメントであり、本発明はその展開する
回数を可能な限り少なくすることを目的としている。
FIG. 1 shows one embodiment of the present invention, and the basic idea will be explained here as well. In FIG. 1, a program is generally executed in such a manner that a load module stored in an external storage device 12 is loaded onto a main storage device 14, and the central processing unit 13 processes each instruction. In addition, instructions to start their execution are issued from the input device 11, and processing results are output to the output device 17. In a load module with an overlay structure, the unit of expansion in the main storage device 14 is a segment, and the object of the present invention is to reduce the number of times the segment is expanded as much as possible.

セグメンテーションを行う場合、まずモジュールの呼ぶ
/呼ばれる関係と呼ばれる回数を記憶する領域とを持つ
モジュール関連情報テーブル16を予め作成しておく。
When performing segmentation, first, a module related information table 16 is created in advance, which has an area for storing the module calling/calling relationship and the number of times the module is called.

次に、仮にリンクしたロードモジュールを実行させどの
モジュールからどのモジュールが呼ばれたかの回数をモ
ジュール関連情報テーブル15に記憶する。そして、そ
の回数の多い関係のモジュール同士からまとめてセグメ
ントテーブル群16を作成する。この時、セグメントの
大きさには制限があるのでこれを越えないようにする。
Next, the linked load module is temporarily executed and the number of times which module has been called by which module is stored in the module related information table 15. Then, a segment table group 16 is created by combining modules that are related to each other frequently. At this time, there is a limit to the size of the segment, so do not exceed this limit.

モジュール関連情報テーブル15について説明すると、
いまプログラム“PROGl”が“PROGOO”〜“
PROG95”の複数のモジュールで構成され、それが
第2図に示す階層構造であるとき、モジュール関連情報
テーブル15を作成すると第3図のようになる。
To explain the module related information table 15,
Now the program “PROGl” is “PROGOO”~“
When the module-related information table 15 is composed of a plurality of modules of "PROG95" and has the hierarchical structure shown in FIG. 2, the module-related information table 15 is created as shown in FIG.

次に、セグメントテーブル群16の作成について説明す
る。前提として仮にリンクしたロードモジュールを実行
させてモジュールが呼ばれた回数が第5図に示す値を取
り、プログラム“PROGl”を構成するそれぞれのモ
ジュールの大きさが第4図に示す値(単位はバイト)で
あるとする。
Next, creation of the segment table group 16 will be explained. Assuming that the number of times the linked load module is executed and the module is called takes the value shown in Figure 5, and the size of each module that makes up the program "PROGl" takes the value shown in Figure 4 (the unit is Bytes).

さらに、セグメントサイズは、16KB(キロバイト)
までとする。第5図のモジュール関連情報テーブル15
は回数をキーにして降順にソートし第6図の状態にする
Furthermore, the segment size is 16KB (kilobytes)
up to. Module related information table 15 in Figure 5
are sorted in descending order using the number of times as a key, resulting in the state shown in FIG.

最初に第6図のモジュール関連情報テーブル15の項番
1について行う。セグメントテーブル16−1を作成し
、ここにモジュール“PROG30”、”PROG32
”とそれぞれの大きさとを登録し、大きさの合計を計算
する。そうすると第7図に示す状態となる。
First, item number 1 of the module related information table 15 in FIG. 6 will be described. Create segment table 16-1 and add modules “PROG30” and “PROG32” here.
” and each size are registered, and the total size is calculated. Then, the state shown in FIG. 7 will be obtained.

同様にして項番2について行うと、前述のセグメントテ
ーブル16−1に登録しであるモジュールとは全く関係
ないので新たにセグメントテーブル16−2を作成しモ
ジュール名、モジュールの大きさ、合計値をそれぞれ登
録すると第8図の状態となる。
If you do the same for item number 2, it has nothing to do with the module registered in the segment table 16-1 mentioned above, so create a new segment table 16-2 and enter the module name, module size, and total value. When each is registered, the state shown in FIG. 8 will be obtained.

このように、今までと無関係なモジュールが出現した場
合は新たにセグメントテーブルを作成し登録を行う。ま
た、既に呼ぶモジュールか呼ばれるジュールかがセグメ
ントテーブルに登録されている場合はそのセグメントテ
ーブルに登録されていないほうのモジュールを追加し、
大きさを加算するという処理を繰り返す。
In this way, when a module unrelated to the previous module appears, a new segment table is created and registered. Also, if the module to be called or the module to be called is already registered in the segment table, add the module that is not registered in the segment table,
Repeat the process of adding the sizes.

、項番7について行うと、”PROGIO”と“PRO
Gl3”をまとめる処理であるが、呼ぶモジュールの“
PROGlo”は第8図に示すようにセグメントテーブ
ル16−2に登録されているので、ここに“PROGl
 3”を追加すればよい。しかし、大きさを合計すると
17E38OB(バイト)となりセグメントサイズの1
6KBを越えるので加えることができない。結果として
第9図のセグメントテーブル16−5のように1つのモ
ジュールのセグメントテーブルとなる。
, for item number 7, “PROGIO” and “PRO
This is the process of putting together "Gl3", but the calling module's "
Since “PROGlo” is registered in the segment table 16-2 as shown in FIG.
However, the total size is 17E38OB (bytes), which is 1 of the segment size.
It cannot be added because it exceeds 6KB. As a result, a segment table for one module is obtained, such as segment table 16-5 in FIG.

項番12について行うと、”PROG20”と“PRO
G92”とをまとめる処理である。その直前の状態は第
10図に示すように“PROG20”はセグメントテー
ブル16−4に“PROG92”はセグメントテーブル
16−8にそれぞれ登録されている。二つのセグメント
テーブルの大きさを合計すると13520Bで16KB
以下であるので統合が可能となり第11図のセグメント
テーブル16−4のようになる。ここで、統合された方
のセグメントテーブル16−8は不用となるので削除す
る。
Regarding item number 12, “PROG20” and “PROG20”
G92".The state immediately before that is as shown in FIG. 10, where "PROG20" is registered in the segment table 16-4 and "PROG92" is registered in the segment table 16-8.The two segments The total size of the table is 13520B or 16KB.
Since it is as follows, it is possible to integrate the segment table 16-4 in FIG. 11. Here, the integrated segment table 16-8 is no longer needed and is therefore deleted.

項番15について行うと、”PROG32”と“PRO
G94”とをまとめる処理であるが、それぞれセグメン
トテーブル16−1とセグメントテーブル16−6に既
に登録されている。二つのセグメントテーブルの大きさ
を合計すると16720Bとなり16KBを越えるので
統合できず結果として第12図に示す状態となる。以上
のような処理を行った結果、セグメントサイズが18K
Bの場合第13図に示すセグメンテーションになる。
Regarding item number 15, “PROG32” and “PROG32”
G94'', but they have already been registered in segment table 16-1 and segment table 16-6.The total size of the two segment tables is 16720B, which exceeds 16KB, so they cannot be combined, and as a result, The state is shown in Figure 12.As a result of the above processing, the segment size is 18K.
In case B, the segmentation becomes as shown in FIG.

それでは、セグメントサイズが32KBのである時を考
える。この場合もセグメントテーブルの大きさが32K
B以下でなければならないことを除けばセグメントサイ
ズが16KBの場合と全く同じ処理を行えばよい。ただ
し、第6図のモジュール関連情報テーブル15における
項番19の“PROG30”と“PROG33”とをま
とめる処理では、項番18の処理を終えた状態で第14
図に示すようにセグメントテーブル16−1に既に二つ
のモジュールとも登録されている。このような場合は、
セグメントテーブル群16は変更せず、次の項番の処理
を行う。
Now, consider a case where the segment size is 32KB. In this case as well, the size of the segment table is 32K.
Exactly the same processing as when the segment size is 16 KB can be performed, except that the segment size must be less than or equal to B. However, in the process of combining "PROG30" and "PROG33" of item number 19 in the module related information table 15 in FIG.
As shown in the figure, both modules have already been registered in the segment table 16-1. In such a case,
The segment table group 16 is not changed and the next item number is processed.

以上のような処理を行った結果、セグメントサイズが3
2KBの場合第15図に示すセグメンテーションになる
As a result of the above processing, the segment size is 3.
In the case of 2KB, the segmentation is shown in FIG. 15.

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

以上説明したように本発明は、呼ばれる回数の多い関係
を優先してまとめるので必要とするモジュールが主記憶
上に存在する確率が高く、結果としてセグメントの置き
換え回数が少なくなる。さらに、セグメンテーションは
、仮にリンクしたロードモジュールを実行する時間とセ
グメントテーブル群を作成する時間のみであるので多く
の時間を必要としない。
As explained above, in the present invention, since relationships that are called more often are prioritized and grouped together, there is a high probability that the required module exists in the main memory, and as a result, the number of times segments are replaced is reduced. Furthermore, segmentation does not require much time since it only requires the time to execute the temporarily linked load module and the time to create a group of segment tables.

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

第1図は本発明の概要図、第2図はプログラムの構造の
例を示す図、第3図は第2図の構造図をもとにしたモジ
ュール関連情報テーブルの登録例を示す図、第4図は第
2図の構造図を構成するモジュール−覧を示す図、第5
図は仮リンクしたロードモジュールの実施後のモジュー
ル関連情報テーブルの作成例を示す図、第6図は第5図
のモジュール関連情報テーブルのソート後の状態を示す
図、第7図から第12図はセグメントサイズが18KB
の時のセグメントテーブル群の作成例を示す図、第13
図は“セグメントサイズが18KBの時のセグメンテー
ション結果の出力例を示す図、第14図はセグメントサ
イズが32KBの時のセグメントテーブル群の作成例を
示す図、第15図はセグメントサイズが32KBの時の
セグメンテーション結果の出力例を示す図である。 11・・・入力装置、12・・・外部記憶装置、13・
・・中央処理装置、14・・・主記憶装置、15・・・
モジュ−ル関連情報テーブル、16・・・セグメントテ
ーブル群、17・・・出力装置、16−1〜16−8・
・・セグメントテーブル。
FIG. 1 is a schematic diagram of the present invention, FIG. 2 is a diagram showing an example of a program structure, FIG. 3 is a diagram showing an example of registering a module related information table based on the structure diagram of FIG. Figure 4 shows a list of modules that make up the structure diagram in Figure 2.
The figure shows an example of creating a module-related information table after executing a temporarily linked load module, FIG. 6 shows the state of the module-related information table in FIG. 5 after sorting, and FIGS. 7 to 12 The segment size is 18KB
FIG. 13 shows an example of creating a segment table group when
The figure shows an example of segmentation result output when the segment size is 18KB, Figure 14 shows an example of creating a segment table group when the segment size is 32KB, and Figure 15 shows an example of segment table group creation when the segment size is 32KB. It is a diagram showing an output example of a segmentation result. 11... Input device, 12... External storage device, 13.
...Central processing unit, 14...Main storage device, 15...
Module related information table, 16... Segment table group, 17... Output device, 16-1 to 16-8.
...Segment table.

Claims (1)

【特許請求の範囲】[Claims] 操作の指示を入力する入力装置と、ロードモジュールを
格納する外部記憶装置と、プログラムを実行する中央処
理装置と、プログラムの実行時にプログラムを格納する
主記憶装置と、構造化プログラミングなどにおけるモジ
ュール間のインタフェースの有無を記憶するモジュール
関連情報テーブルと、セグメントとしてまとめるモジュ
ール名を記憶するセグメントテーブル群と、実行結果を
出力する出力装置とを有するシステムにおいて、仮にリ
ンクされたロードモジュールを実行させ、どのモジュー
ルからどのモジュールが何回呼ばれたかをモジュール関
連情報テーブルに記録し、その回数の多い関係から結合
することを特徴とする最適セグメンテーシヨン決定シス
テム。
An input device for inputting operation instructions, an external storage device for storing load modules, a central processing unit for executing programs, a main storage device for storing programs during program execution, and a storage device between modules in structured programming, etc. In a system that has a module-related information table that stores the presence or absence of an interface, a group of segment tables that stores module names that are grouped into segments, and an output device that outputs the execution results, if you temporarily execute a linked load module, An optimal segmentation determination system is characterized in that which module is called and how many times it has been called is recorded in a module related information table, and the connection is performed based on the relationship that has the most number of calls.
JP2299537A 1990-11-05 1990-11-05 Optimum segmentation determining system Pending JPH04170643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2299537A JPH04170643A (en) 1990-11-05 1990-11-05 Optimum segmentation determining system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2299537A JPH04170643A (en) 1990-11-05 1990-11-05 Optimum segmentation determining system

Publications (1)

Publication Number Publication Date
JPH04170643A true JPH04170643A (en) 1992-06-18

Family

ID=17873893

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2299537A Pending JPH04170643A (en) 1990-11-05 1990-11-05 Optimum segmentation determining system

Country Status (1)

Country Link
JP (1) JPH04170643A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293383A (en) * 2006-04-20 2007-11-08 Toshiba Corp Program development support device and method for operating same device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007293383A (en) * 2006-04-20 2007-11-08 Toshiba Corp Program development support device and method for operating same device

Similar Documents

Publication Publication Date Title
JPH04170643A (en) Optimum segmentation determining system
JPH0377135A (en) Function rearranging system
JP3046126B2 (en) Program module calling method
JP2663600B2 (en) Control table relocation processing method
JPS63106047A (en) Dynamic subroutine call system
JPH0675757A (en) Link system for virtual space resident program
JPH05250410A (en) Hierarchical symbol correcting system
JPH0465717A (en) Method for accessing program
JPH03282841A (en) Direct input/output processing system for variable length record
JP3021697B2 (en) Exception handling in programming languages
JPS63276629A (en) Sorting system for record in file
JPH02118727A (en) System for calling system sub-routine
JPH10293691A (en) Register allocating method
JPH02273828A (en) Internal sorting system
JPH05189209A (en) Initial program loading system
JPH03290730A (en) System for sorting data classification
JPH0371229A (en) Program controller
JPH04275624A (en) Module-divided program controller
JPS61206041A (en) Extension method for program language
JPH06175862A (en) Electronic computer
JPS63136227A (en) System for retrieving program storing file
JPS62163145A (en) Compiler device
JPS62216037A (en) Message managing system using source library
JPH01205331A (en) Large-scale program link system
JPH08329095A (en) Data retrieval system for relational data base