JPS63175929A - Dynamic subprogram loader - Google Patents
Dynamic subprogram loaderInfo
- Publication number
- JPS63175929A JPS63175929A JP599587A JP599587A JPS63175929A JP S63175929 A JPS63175929 A JP S63175929A JP 599587 A JP599587 A JP 599587A JP 599587 A JP599587 A JP 599587A JP S63175929 A JPS63175929 A JP S63175929A
- Authority
- JP
- Japan
- Prior art keywords
- subprogram
- address
- program
- loader
- old
- 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
Links
- 238000000034 method Methods 0.000 claims abstract description 15
- 230000003068 static effect Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000004575 stone Substances 0.000 description 1
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はプログラムを計算機システムに配置するローダ
ーに係り、特にダイナミックに副プログラムを再配置す
る方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a loader for allocating programs to a computer system, and particularly to a method for dynamically relocating subprograms.
オンラインリアルタイム計算機システムにおける副プロ
グラム(サブルーチン、マクロルーチン。Subprograms (subroutines, macroroutines) in online real-time computer systems.
ファンクション等)へのリンク方式は2種類が存在しそ
れぞれダイナミックリンク方式、スタティックリンク方
式と呼ばれる。第3図に示されるダイナミックリンク方
式とはオペレーティングシステム(以下oSと略記する
)が該副プログラムの全てを一連に番号付けすることに
より管理するもので、O8内に対応する副プログラムの
アドレスを記憶している。一般のプログラムのオブジェ
クトは副プログラムの番号を持つのみで、プログラム実
行中にO8が副プログラムリンク命令をみつけると、副
プログラムアドレステーブルを参照しそれを実行命令ア
ドレスカウンタ(PC)にセットする。この方式の利点
は一旦主プログラムが配置された後に副プログラムの改
造あるいは不具合により再配置せねばならなくなり、か
つ同一エリアに配置できなくなった場合でもO8内側プ
ログラムアドレステーブル値を書き換えるのみで、該副
プログラムにリンクしているプログラムを再口−デイン
グする必要が無いことである。副プログラムはその性質
上多くのプログラムに使用されるからこの効果は大きい
。There are two types of linking methods to functions, etc.), and they are called dynamic linking and static linking, respectively. The dynamic link method shown in Figure 3 is one in which the operating system (hereinafter abbreviated as oS) manages all of the subprograms by sequentially numbering them, and stores the address of the corresponding subprogram in O8. are doing. A general program object only has a subprogram number, and when O8 finds a subprogram link instruction during program execution, it refers to the subprogram address table and sets it in the execution instruction address counter (PC). The advantage of this method is that once the main program has been placed, even if it has to be relocated due to modification or malfunction of the subprogram, and it cannot be placed in the same area, all that is required is to rewrite the O8 internal program address table value. There is no need to re-read programs linked to the program. This effect is significant because subprograms are used in many programs due to their nature.
一方第4図に示されるスタティックリンク方式は、各プ
ログラム内に副プログラムのアドレスを持つ方式で、利
点は構造が簡単であること、O8の介入無しに副プログ
ラムへリンクできる為、処理時間が早いことである。On the other hand, the static link method shown in Figure 4 is a method in which each program has the address of the subprogram.The advantages are that the structure is simple and that the processing time is fast because it can be linked to the subprogram without O8 intervention. That's true.
なお関連する技術としては、例えば、特開昭59−18
0736号がある。Related technologies include, for example, Japanese Patent Application Laid-Open No. 59-18
There is No. 0736.
上記従来技術はそれぞれ以下の様な問題を有していた。 Each of the above conventional techniques has the following problems.
ダイナミックリンク方式では、O8が副プログラムリン
ク時介入する為処理時間が増大すること、O8内に副プ
ログラムアドレス管理テーブルを予め確保せねばならぬ
という欠点がある。The dynamic link method has disadvantages in that the O8 intervenes when linking the subprogram, which increases processing time, and that the subprogram address management table must be secured in advance in the O8.
スタティック型の欠点は副プログラムの再配置により、
該副プログラムを使用している全てのプログラムの再ロ
ーディングをせねばならぬことである。The disadvantage of static type is that subprogram relocation causes
All programs using the subprogram must be reloaded.
本発明の目的は、上述欠点を無くシかつ利点を残した副
プログラムローダ一方式を提供することにある。SUMMARY OF THE INVENTION An object of the present invention is to provide a sub-program loader that eliminates the above-mentioned drawbacks and retains its advantages.
上記目的は、第1に副プログラムリンク時にO8の介入
を無くし、第2に副プログラム再配置後のプログラム再
ローディングを不要とする手段を与えることにより達成
される。すなわち各主プログラムオブジェクトは副プロ
グラム番号ではなく、アドレスを持つスタティックリン
ク方式とし、リロケータブルプログラムローダ−が副プ
ログラム再配置後、該システムのプログラムエリア中の
手続部を走査し、副プログラムリンク命令(CALL)
と該副プログラム旧アドレスより成るデータパターンを
検出時、旧アドレスを新アドレスに書き換えることによ
り上記を達成する。The above object is achieved by firstly eliminating the intervention of O8 when linking subprograms, and secondly by providing a means for eliminating the need for program reloading after subprogram relocation. In other words, each main program object is statically linked with an address rather than a subprogram number, and after relocating the subprogram, the relocatable program loader scans the procedure section in the program area of the system and issues a subprogram link instruction (CALL). )
When a data pattern consisting of an old address of the subprogram is detected, the above is achieved by rewriting the old address with a new address.
以上により、副プログラムへのリンクはスタティックで
ある為、O8の介入が無く、また各主プログラム内の副
プログラムアドレスが書き換えられる為再ローディング
の必要が無くなる。これにより前述欠点が解消され、利
点のみ保持するリロケータブルプログラムローダ−の実
現が可能となる。As described above, since the link to the subprogram is static, there is no intervention from O8, and since the subprogram address in each main program is rewritten, there is no need for reloading. This eliminates the aforementioned drawbacks and makes it possible to realize a relocatable program loader that retains only the advantages.
以下2本発明の一実施例を第1図により説明する。 Two embodiments of the present invention will be described below with reference to FIG.
本例は図の様に5個の論理により構成される。This example is composed of five logics as shown in the figure.
ローディング対象副プログラムが既に登録されている場
合、論理Aは該当副プログラムのアドレスを退避する。If the subprogram to be loaded has already been registered, logic A saves the address of the corresponding subprogram.
続いて、論理Bが副プログラムとは異なる新しいエリア
に再配置する。これは従来のリロケータブルプログラム
ローダーと同一である。Subsequently, logic B is relocated to a new area different from the subprogram. This is the same as a conventional relocatable program loader.
再配置、論理り、Eが該システムの全てのプログラム領
域を走査し、該副プログラムのアドレスを書き換える。Relocation, logic, E scans all program areas of the system and rewrites the addresses of the subprograms.
第2図は論理り、Eの動作を示すものである。プログラ
ムは主記憶装置常駐と非常駐の2種類に分けることがで
きるが、論理り、Eは両プログラム共対象とする。プロ
グラムは手続部。FIG. 2 shows the operation of the logic logic E. Programs can be divided into two types: resident in the main memory and non-resident, but logically E applies to both programs. The program is the procedure department.
定数部、ワークエリア等に分割されているが、本例での
CALL命令とアドレスよりなるパターンは手続部内に
限ってユニークであるから、論理り。Although it is divided into a constant part, a work area, etc., the pattern consisting of the CALL instruction and address in this example is unique only within the procedure division, so it is logical.
Eは手続部のみサーチする。該パターンがみつかった場
合、石刷プログラムアドレスは新アドレスに書き換えら
れる。E searches only the procedure division. If the pattern is found, the stone printing program address is rewritten to a new address.
本実施例によれば、副プログラムの再配置でアドレスが
変わった場合でも、それにリンクする他のプログラムの
再ローディングする必要が無く、またプログラム実行時
O8の介入が不要である。According to this embodiment, even if the address changes due to relocation of a subprogram, there is no need to reload other programs linked to it, and no intervention by O8 is required when the program is executed.
本発明によれば、スタティックリンク型である為、O8
介入が不要となり、この結果処理速度が速くなる。また
各プログラム内に散在する副プログラムのアドレスがロ
ーダーにより副プログラム再配置時に書き換えられる為
、プログラムの再ローディングが不要となる。さらに従
来、共通副プログラムの入れ替え時システム停止が必要
であったが1本発明では順次アドレスを書き換えてゆき
、その間、旧副プログラムが存在している為、システム
の停止が不要である、等の効果がある。According to the present invention, since it is a static link type, O8
No intervention is required, resulting in faster processing speeds. Furthermore, since the addresses of subprograms scattered within each program are rewritten by the loader when subprograms are relocated, there is no need to reload programs. Furthermore, in the past, it was necessary to stop the system when replacing a common subprogram, but in the present invention, addresses are sequentially rewritten, and during that time, the old subprogram remains, so there is no need to stop the system. effective.
第1図は、本発明の一実施例のダイナミック副プログラ
ムローダ−の流れ図、第2図は、動作説明図、第3図は
従来の副プログラム・ダイナミックリンク方式の説明図
、第4図は同じく副プログラム・スタティックリンク方
式の説明図である。
代理人 弁理士 小川勝男 −′
市1区Fig. 1 is a flowchart of a dynamic subprogram loader according to an embodiment of the present invention, Fig. 2 is an explanatory diagram of operation, Fig. 3 is an explanatory diagram of a conventional subprogram dynamic link method, and Fig. 4 is a similar diagram. FIG. 2 is an explanatory diagram of a subprogram static link method. Agent Patent Attorney Katsuo Ogawa −′ City 1st Ward
Claims (1)
タブルプログラムローダーにおいて、旧副プログラムの
アドレスを記憶する、旧副プログラムアドレス退避論理
と、新副プログラム再配置論理と、該システムのプログ
ラムエリア内の手続部の全てをサーチ(副プログラムリ
ンク命令と旧副プログラムアドレスより成るパターンを
探した場合、旧アドレスを新アドレスに書き換える論理
を具えたことを特徴とする、ダイナミック副プログラム
ローダー。1. In the relocatable program loader of an online real-time computer system, search the old subprogram address save logic that stores the address of the old subprogram, the new subprogram relocation logic, and all procedure divisions in the program area of the system. (A dynamic subprogram loader characterized by having logic for rewriting the old address to a new address when a pattern consisting of a subprogram link instruction and an old subprogram address is found.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP599587A JPS63175929A (en) | 1987-01-16 | 1987-01-16 | Dynamic subprogram loader |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP599587A JPS63175929A (en) | 1987-01-16 | 1987-01-16 | Dynamic subprogram loader |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS63175929A true JPS63175929A (en) | 1988-07-20 |
Family
ID=11626367
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP599587A Pending JPS63175929A (en) | 1987-01-16 | 1987-01-16 | Dynamic subprogram loader |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS63175929A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6052778A (en) * | 1997-01-13 | 2000-04-18 | International Business Machines Corporation | Embedded system having dynamically linked dynamic loader and method for linking dynamic loader shared libraries and application programs |
US6363436B1 (en) | 1997-01-27 | 2002-03-26 | International Business Machines Corporation | Method and system for loading libraries into embedded systems |
-
1987
- 1987-01-16 JP JP599587A patent/JPS63175929A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6052778A (en) * | 1997-01-13 | 2000-04-18 | International Business Machines Corporation | Embedded system having dynamically linked dynamic loader and method for linking dynamic loader shared libraries and application programs |
US6363436B1 (en) | 1997-01-27 | 2002-03-26 | International Business Machines Corporation | Method and system for loading libraries into embedded systems |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6125434A (en) | Dynamic memory reclamation without compiler or linker assistance | |
US6845385B1 (en) | Real-time computer “garbage collector” | |
US5291601A (en) | Shared libraries implemented with linking program loader | |
JP2986075B2 (en) | System for combining a local object address and a global object identifier into a single object pointer | |
US6304867B1 (en) | System and method for enhanced performance of a relational database management system through the use of application-specific memory-resident data | |
JP2941947B2 (en) | Computer method and apparatus for performing asynchronous ordered operations | |
Nguyen et al. | Skyway: Connecting managed heaps in distributed big data systems | |
JPH02188833A (en) | Interface for computer system | |
KR970016917A (en) | Method and system for updating mass storage configuration records | |
US5819306A (en) | Shadow mechanism for a modifiable object oriented system | |
US5706511A (en) | Data base system and load distribution control method | |
GB1431423A (en) | Virtual computer systems | |
CN109643276B (en) | System and method for creating database subset snapshot | |
JPS63175929A (en) | Dynamic subprogram loader | |
Edler et al. | Memory management in Symunix II: A design for large-scale shared memory multiprocessors | |
JP2990609B2 (en) | Computer system | |
JPS62144257A (en) | Cache memory | |
JP3085309B2 (en) | Debug system | |
JPS63150735A (en) | Task generation/erasure control system | |
JPH0816369A (en) | Method and system for clustering | |
JPH04124749A (en) | Page-out subject page selection system | |
JPS62216037A (en) | Message managing system using source library | |
JPH03232051A (en) | Semaphore access control method | |
Collingbourne | A practical approach to developing real-time Ada programs for embedded systems | |
JPH0922363A (en) | Task constituting system |