JPH04317135A - Program storage execution system - Google Patents

Program storage execution system

Info

Publication number
JPH04317135A
JPH04317135A JP8487791A JP8487791A JPH04317135A JP H04317135 A JPH04317135 A JP H04317135A JP 8487791 A JP8487791 A JP 8487791A JP 8487791 A JP8487791 A JP 8487791A JP H04317135 A JPH04317135 A JP H04317135A
Authority
JP
Japan
Prior art keywords
virtual
address
block
real address
virtual block
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
JP8487791A
Other languages
Japanese (ja)
Inventor
Hiroyuki Takimoto
滝本 裕之
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.)
KOBE NIPPON DENKI SOFTWARE KK
NEC Software Kobe Ltd
Original Assignee
KOBE NIPPON DENKI SOFTWARE KK
NEC Software Kobe 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 KOBE NIPPON DENKI SOFTWARE KK, NEC Software Kobe Ltd filed Critical KOBE NIPPON DENKI SOFTWARE KK
Priority to JP8487791A priority Critical patent/JPH04317135A/en
Publication of JPH04317135A publication Critical patent/JPH04317135A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE:To move a program only by means of compiling a source by preventing the entry address of the other object from changing even if an object size increases/decreases. CONSTITUTION:A compiling means 2 generates the object whose address is not solved at every sub-routine from a source file 1. A virtual address solution means 3 allocates the generated object to one virtual block. An object storage means 4 stores the object on the virtual block in a real storage device. A virtual address conversion means 12 executes the object on the virtual block while an execution address is converted.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はプログラム格納実行方式
に関し、特にソースファイルからプログラム実行までの
プログラム格納実行方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program storage and execution method, and more particularly to a program storage and execution method from a source file to program execution.

【0002】0002

【従来の技術】従来のプログラム格納実行方式は、プロ
グラム開発作業で、ソースファイルを作成したり変更し
たりした後に、コンパイルを行い、つぎにリンクを行っ
た後に、プログラムを実行させている。
2. Description of the Related Art In a conventional program storage/execution method, a source file is created or modified in program development work, then compiled, and then linked, and then the program is executed.

【0003】図9は従来のプログラム格納実行方式の一
例を示すブロック図である。
FIG. 9 is a block diagram showing an example of a conventional program storage and execution method.

【0004】従来のプログラム格納実行方式は、図9に
示すように、まず、ソースファイル91をもとにコンパ
イル手段92によって、アドレス未解決オブジェクトフ
ァイルを生成する。
In the conventional program storage/execution method, as shown in FIG. 9, first, a compiling means 92 generates an unresolved address object file based on a source file 91.

【0005】次に、リンカと呼ばれるアドレス解決手段
93は、アドレス解決オブジェクトリスト95を参照し
て、アドレス解決した結果をロードモジュールという別
のファイルに生成する。
Next, an address resolution means 93 called a linker refers to the address resolution object list 95 and generates the address resolution result in another file called a load module.

【0006】図10は従来のプログラム格納実行方式の
オブジェクト配置の一例を示す図である。
FIG. 10 is a diagram showing an example of object arrangement in the conventional program storage and execution method.

【0007】各オブジェクトobj1,obj2,ob
j3,…は、図10に示すように、ロードモジュールと
して実アドレス空間上につめて配置される。また、ロー
ドモジュール格納手段94は、できたロードモジュール
を通常のファイルとしてディスク等に格納する。
[0007] Each object obj1, obj2, ob
As shown in FIG. 10, j3, . . . are arranged as load modules in the real address space. Further, the load module storage means 94 stores the created load module in a disk or the like as a normal file.

【0008】そして、プログラム起動時には、メモリへ
のロード手段96が、ロードモジュールをファイルから
メモリへロードして実行する。ここで問題となる点は、
アドレス解決手段93がオブジェクトをつめてアドレス
上に配置することである。アドレスの連続した領域に配
置しているので、ソースファイル91の変更によって対
応するオブジェクトのサイズが変わった場合に、変わっ
た部分より後にあるすべてのエントリアドレスが変化し
てしまう。このため、アドレス解決手段93は、アドレ
ス解決を最初からやりなおさなければならない。
[0008] When the program is started, the memory loading means 96 loads the load module from the file into the memory and executes it. The problem here is that
The address resolution means 93 collects objects and places them on the address. Since they are arranged in areas with continuous addresses, if the size of the corresponding object changes due to a change in the source file 91, all entry addresses after the changed part will change. Therefore, the address resolution means 93 has to perform address resolution again from the beginning.

【0009】図11は従来のプログラム格納実行方式に
おけるオブジェクトサイズ変更時の影響の一例を示す図
である。
FIG. 11 is a diagram showing an example of the effect of changing the object size in the conventional program storage and execution method.

【0010】例えば、図11(イ)に示すように、ソー
スA1,B1,C1があったとする。そしてソースA1
のサブルーチンa内ではソースB1のサブルーチンbが
コールされ、サブルーチンb内ではソースC1のサブル
ーチンcがコールされているとする。また、わかりやす
さのために、ソースA1,B1,C1にはそれぞれサブ
ルーチンa,b,cのみがあるとする。
For example, suppose there are sources A1, B1, and C1 as shown in FIG. 11(a). and source A1
Assume that subroutine b of source B1 is called in subroutine a of , and subroutine c of source C1 is called in subroutine b. Furthermore, for the sake of clarity, it is assumed that sources A1, B1, and C1 have only subroutines a, b, and c, respectively.

【0011】そこで、コンパイル手段92は、これらを
コンパイルして、図11(ロ)に示すアドレス未解決の
オブジェクトA2,B2,C2を生成する。また、この
オブジェクトA2,B2,C2によってロードモジュー
ルDを作成する場合に、アドレス解決手段93は、図1
1(ハ)に示すように、アドレスに隙間なくオブジェク
トA2,B2,C2を配置した上で、サブルーチンbの
アドレス、サブルーチンcのアドレスを決定している。 なお、図11(ハ)の例では、オブジェクトA2,B2
,C2のオブジェクトサイズは、それぞれ1000とし
ている。
Therefore, the compiling means 92 compiles these to generate objects A2, B2, and C2 whose addresses are unresolved as shown in FIG. 11(b). Further, when creating the load module D using these objects A2, B2, and C2, the address resolution means 93
As shown in FIG. 1(C), the objects A2, B2, and C2 are arranged without gaps at the addresses, and then the addresses of subroutine b and subroutine c are determined. Note that in the example of FIG. 11(c), objects A2, B2
, C2 are each set to have an object size of 1000.

【0012】そして、プログラムの修正でサブルーチン
aに新しい処理を追加した場合を考てみる。ソースA1
が変更され、それをコンパイルした時に、オブジェクト
A2が大きくなり、オブジェクトサイズが1000から
1300に増加したとすると、ロードモジュールDは、
図11(ニ)に示すように変更される。ここで注目すべ
き点は、図11(ニ)のロードモジュールDでサブルー
チンb,cのアドレスが変わっている点でCALL10
00,CALL2000からCALL1300,CAL
L2300にそれぞれ変化している。つまり、従来のプ
ログラム格納実行方式では、ひとつのサブルーチンの変
更によってロードモジュール全体が変化する。
Now, let us consider a case where a new process is added to subroutine a by modifying the program. Source A1
is changed and when it is compiled, object A2 becomes larger and the object size increases from 1000 to 1300. Then, load module D becomes
It is changed as shown in FIG. 11(d). What should be noted here is that the addresses of subroutines b and c have changed in load module D in FIG. 11(d);
00, CALL2000 to CALL1300, CAL
They have each changed to L2300. In other words, in the conventional program storage and execution method, changing one subroutine changes the entire load module.

【0013】このように、従来のプログラム格納実行方
式は、極く一部のソースファイルの変更であっても、リ
ンカがオブジェクト全体を見直さなくてはならないので
、大きなプログラムの場合に、コンパイルがわずかの時
間でできても、リンクに長時間がかかっている。
[0013] In this way, in the conventional program storage and execution method, the linker has to review the entire object even if only a small part of the source file is changed, so in the case of a large program, the compilation time is small. Even if it can be done in 10 minutes, it takes a long time to link.

【0014】[0014]

【発明が解決しようとする課題】上述した従来のプログ
ラム格納実行方式は、第1に、ソースファイル中のたと
え一行の変更でも、リンク処理に対してプログラムの大
きさに比例した時間がかかるという問題点を有し、ソー
スファイルの修正から実行確認までの時間が少ない程、
デバッグ効率が向上するにもかかわらず、大規模プログ
ラムでは、修正量がたとえわずかであっても、規模に比
例したリンク時間がかかるために、デバッグ効率の向上
の妨げになるという欠点を有している。また、第2に、
プログラム開発用の計算機では、ほぼ同じ情報を持つオ
ブジェクトファイルとロードモジュールファイルとの両
方が存在するために、多くのディスク領域を必要とする
という問題点を有している。
[Problems to be Solved by the Invention] The first problem with the conventional program storage and execution method described above is that even if a single line in a source file is changed, the linking process takes time proportional to the size of the program. The shorter the time it takes from modifying the source file to confirming execution,
Despite the improvement in debugging efficiency, for large programs, even if the amount of modification is small, linking time is required proportional to the scale, which hinders the improvement of debugging efficiency. There is. Also, secondly,
Computers for program development have a problem in that they require a large amount of disk space because both object files and load module files have almost the same information.

【0015】[0015]

【課題を解決するための手段】本発明のプログラム格納
実行方式は、ソースファイルからサブルーチン毎にアド
レス未解決のオブジェクトを生成するコンパイル手段と
、生成した前記オブジェクトをそれぞれ一つの仮想ブロ
ック上に割り当てる仮想アドレス解決手段と、前記仮想
ブロック上の前記オブジェクトを実際の記憶装置内に格
納するオブジェクト格納手段と、実行アドレスの変換を
行いながら前記仮想ブロック上の前記オブジェクトを実
行する仮想アドレス変換手段とを有して構成されている
[Means for Solving the Problems] The program storage and execution method of the present invention includes a compiling means that generates an object whose address is unresolved for each subroutine from a source file, and a virtual block that allocates each of the generated objects onto one virtual block. an address resolution means; an object storage means for storing the object on the virtual block in an actual storage device; and a virtual address translation means for executing the object on the virtual block while converting an execution address. It is configured as follows.

【0016】[0016]

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

【0017】図1は本発明のプログラム格納実行方式の
一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of the program storage and execution method of the present invention.

【0018】図1に示すソースファイル1と、アドレス
解決対象オブジェクトリスト52とは、ユーザによって
作成されて指定されるものである。なお、ソースファイ
ル11には、C言語のソースコードが入っているものと
して以降C言語の言葉で説明する。ソースファイル1に
は、関数と呼ばれるサブルーチンがいくつか定義されて
いる。
The source file 1 and address resolution target object list 52 shown in FIG. 1 are created and specified by the user. Note that the source file 11 is assumed to contain C language source code, and will be described in terms of C language hereinafter. Source file 1 defines several subroutines called functions.

【0019】また、コンパイル手段2は、ユーザからコ
ンパイル要求された関数ひとつに対してオブジェクトひ
とつを生成する。生成されるオブジェクトには、ひとつ
の関数しかない点を除いて従来のオブジェクトと同様で
ある。つまり、生成されるオブジェクトは、アドレスが
未解決であり、外部のオブジェクトから参照するための
シンボルをひとつを持っている。
Furthermore, the compiling means 2 generates one object for each function requested to be compiled by the user. The generated object is similar to a conventional object except that it has only one function. In other words, the generated object has an unresolved address and one symbol that can be referenced from external objects.

【0020】一方、仮想アドレス解決手段3は、変更の
あったオブジェクトについてのみ処理をすればよい。そ
のために、どのオブジェクトが変更されたのかを知る必
要がある。これを知る方法として、次の3通りがある。 (1)  はじめてプログラムをコンパイルしてリンク
する、つまりメイクするときには、そのプログラムを構
成するライブラリを除くすべてのオブジェクトを指定し
てもらう。 (2)  2回目以降のメイクでは、変更した関数名の
リストを指定してもらう。 (3)  変更前のファイルのタイムスタンプを比較し
、変更したファイルについて差分を調べることによって
、変更した関数名を自動的に判断するユーティリティに
よって、変更したオブジェクトを指定してもらう。
On the other hand, the virtual address resolution means 3 only needs to process objects that have been changed. To do this, we need to know which objects have changed. There are three ways to know this: (1) When compiling and linking a program for the first time, i.e., making it, ask the user to specify all objects except the libraries that make up the program. (2) For the second and subsequent make, ask them to specify a list of changed function names. (3) Have the user specify the changed object using a utility that automatically determines the name of the changed function by comparing the timestamps of the file before the change and examining the differences in the changed file.

【0021】そして、仮想アドレス解決手段3は、まず
、アドレス解決対象オブジェクトリスト5に含まれるオ
ブジェクトの中から、まだ仮想ブロックを割り当てられ
ていないオブジェクトに対して、ひとつの仮想ブロック
を割り当てる。また、仮想アドレス解決手段3は、オブ
ジェクトの割り当てが終われば、次にアドレス解決対象
オブジェクトリスト5にあるオブジェクトを順番にアド
レス解決していく。すなわち、仮想アドレス解決は、そ
のオブジェクトが呼び出す関数のあるオブジェクトのエ
ントリアドレス、つまりオブジェクトのある仮想ブロッ
クの先頭仮想アドレスをシンボルテーブル6から見付け
、その関数を呼び出しているオブジェクトのコール命令
のところに書くことにより行われる。
[0021]The virtual address resolution means 3 first allocates one virtual block to an object to which a virtual block has not yet been allocated from among the objects included in the address resolution target object list 5. Further, after the object assignment is completed, the virtual address resolution means 3 sequentially resolves the addresses of the objects in the address resolution target object list 5. In other words, virtual address resolution involves finding the entry address of the object that has the function that the object calls, that is, the start virtual address of the virtual block where the object is located, from the symbol table 6, and writing it at the call instruction of the object that is calling the function. This is done by

【0022】図2は本実施例で仮想アドレス空間上に割
り当てられたオブジェクトの一例を示す図である。また
、図3は図1のアドレス解決対象オブジェクトリスト5
の一例を示す図である。仮想アドレス解決手段3は、図
3のアドレス解決対象オブジェクトリスト5にあるオブ
ジェクトの範囲内でアドレス解決する。
FIG. 2 is a diagram showing an example of objects allocated on the virtual address space in this embodiment. In addition, FIG. 3 shows the address resolution target object list 5 in FIG. 1.
It is a figure showing an example. The virtual address resolution means 3 resolves addresses within the range of objects in the address resolution target object list 5 of FIG.

【0023】図4は本実施例で割り当てたオブジェクト
名と仮想ブロック番号との対応表であるシンボルテーブ
ル6の一例を示す図である。
FIG. 4 is a diagram showing an example of the symbol table 6, which is a correspondence table between object names and virtual block numbers assigned in this embodiment.

【0024】仮想アドレス解決手段3は、オブジェクト
に仮想ブロックを割り当てるたびに、図4に示すように
、割り当てたオブジェクトと仮想ブロックとの対応表で
あるシンボルテーブル6を作成する。また、仮想アドレ
ス解決手段3は、新しいオブジェクトに新たに仮想ブロ
ックを割り当てるときに、使用済みの仮想ブロックを割
り当てるが、使用済の仮想ブロックがないときには、仮
想ブロックアロケート解放手段7によって新しい仮想ブ
ロックを得る。仮想ブロックアロケート解放手段7は、
空き仮想ブロックの管理のために、空き仮想ブロック情
報テーブル10を使う。
Each time the virtual address resolution means 3 allocates a virtual block to an object, it creates a symbol table 6, which is a correspondence table between the allocated object and the virtual block, as shown in FIG. Furthermore, when allocating a new virtual block to a new object, the virtual address resolution means 3 allocates a used virtual block, but when there is no used virtual block, the virtual block allocation and release means 7 allocates a new virtual block. obtain. The virtual block allocation release means 7 is
A free virtual block information table 10 is used to manage free virtual blocks.

【0025】次に、オブジェクト格納手段4は、仮想ブ
ロックに割り当てられたオブジェクトを実アドレス空間
に割り当てて、メモリ上、または、2次記憶装置上に格
納する。
Next, the object storage means 4 allocates the object allocated to the virtual block to the real address space and stores it on the memory or the secondary storage device.

【0026】図5は本実施例における仮想ブロックと実
アドレスブロックとの対応関係の一例を示す図である。
FIG. 5 is a diagram showing an example of the correspondence between virtual blocks and real address blocks in this embodiment.

【0027】実アドレス空間は、実アドレスブロック単
位で扱われ、そのサイズを2のm乗とする。ここで、仮
想ブロックのサイズを2のn乗とすると、n>mの関係
であるとする。つまり、図5に示すように、ひとつの仮
想ブロックに2の(n−m)乗個の実アドレスブロック
をそれぞれ割り当てている。
The real address space is handled in units of real address blocks, and its size is 2 raised to the m power. Here, if the size of the virtual block is 2 to the nth power, it is assumed that n>m. That is, as shown in FIG. 5, 2(n−m) real address blocks are allocated to one virtual block.

【0028】図6は本実施例における仮想アドレスから
実アドレスへの変換のためのマップテーブル9の一例を
示す図である。
FIG. 6 is a diagram showing an example of the map table 9 for converting virtual addresses to real addresses in this embodiment.

【0029】実アドレスブロックアロケート解放手段8
によってアロケートされる実アドレスブロックは、仮想
アドレス空間の上からk番目の実アドレスブロックの場
合に、図6に示すように、マップテーブル9のk*ポイ
ンタサイズのオフセットのところに、その先頭の実アド
レスが設定される。
Real address block allocation release means 8
As shown in FIG. 6, in the case of the k-th real address block from the top of the virtual address space, the real address block allocated by Address is set.

【0030】そして、実アドレスブロックアロケート解
放手段8は、オブジェクト格納手段4から実アドレスブ
ロックのアロケートを要求されたときに、空き実アドレ
スブロック情報テーブル11を参照し、空いている実ア
ドレスブロックをオブジェクト格納手段4にわたす。実
アドレスブロックアロケート解放手段8は、また、オブ
ジェクト格納手段4から実アドレスブロックの解放を要
求されたときに、その実アドレスブロックを空き実アド
レスブロック情報テーブル11に登録する。
When the real address block allocation release means 8 is requested to allocate a real address block from the object storage means 4, it refers to the free real address block information table 11 and assigns the free real address block to the object. It is passed to storage means 4. The real address block allocate and release means 8 also registers the real address block in the free real address block information table 11 when the object storage means 4 requests the release of a real address block.

【0031】そこで、オブジェクト格納手段4は、仮想
アドレス解決手段3によって、仮想ブロックに割り当て
られたオブジェクトを、アロケートした実アドレスブロ
ックに格納する。また、オブジェクト格納手段4は、仮
想アドレス空間上のオブジェクトの存在する部分のみを
実アドレスブロックに格納し、存在しない部分に対応す
る実アドレスブロックをアロケートせずに、マップテー
ブル9にNULLポインタを記入する。
Therefore, the object storage means 4 stores the object allocated to the virtual block by the virtual address resolution means 3 in the allocated real address block. Furthermore, the object storage means 4 stores only the portion of the virtual address space where the object exists in the real address block, and writes a NULL pointer in the map table 9 without allocating the real address block corresponding to the portion where the object does not exist. do.

【0032】さらに、仮想アドレス変換手段12は、C
PUからのアドレスを仮想アドレスとみなし、それに対
応する実アドレスをアクセスする。これによって、CP
Uは、仮想アドレスをあたかも実アドレスであるかのよ
うに実行できる。すなわち、仮想アドレス変換手段12
は、仮想アドレスから実アドレスに変換するために、マ
ップテーブル9を使う。
Furthermore, the virtual address conversion means 12
The address from the PU is regarded as a virtual address, and the corresponding real address is accessed. By this, C.P.
U can execute virtual addresses as if they were real addresses. That is, the virtual address translation means 12
uses map table 9 to translate from virtual addresses to real addresses.

【0033】次に、関数の追加や削除および関数のオブ
ジェクトサイズの増加や減少の各場合に、どのように処
理されるかについて説明する。
Next, a description will be given of how each case of adding or deleting a function and increasing or decreasing the object size of a function is handled.

【0034】まず、関数を追加する場合には、仮想アド
レス解決手段3が、シンボルテーブル6をサーチして、
見つからなければ、それは新規関数であると判断する。 そして、仮想ブロックを新規関数用に一つアロケートす
る。アロケートした仮想ブロックに、新規関数をコンパ
イルして得られたオブジェクトを格納する。そして、新
規オブジェクトと仮想ブロック番号との対応をシンボル
テーブル6に追加する。
First, when adding a function, the virtual address resolution means 3 searches the symbol table 6 and
If it is not found, it is determined that it is a new function. Then, one virtual block is allocated for the new function. The object obtained by compiling the new function is stored in the allocated virtual block. Then, the correspondence between the new object and the virtual block number is added to the symbol table 6.

【0035】また、関数を削除する場合には、関数の削
除をユーザからのオブジェクト削除指定により行う。そ
して、削除関数をシンボルテーブル6から削除するとと
もに、削除関数のオブジェクトのある仮想ブロックを解
放する。
Furthermore, when a function is to be deleted, the function is deleted by the user's object deletion designation. Then, the deletion function is deleted from the symbol table 6, and the virtual block containing the object of the deletion function is released.

【0036】一方、関数のオブジェクトサイズが増加し
た場合には、変更前のオブジェクトが格納されていた仮
想ブロックに格納する。格納するときに、変更前のオブ
ジェクトがあった実アドレスブロックをそのまま使い、
不足分はあらたに実アドレスブロックをアロケートする
On the other hand, when the object size of a function increases, it is stored in the virtual block where the object before the change was stored. When storing, use the real address block where the object was before the change,
A new real address block is allocated for the shortage.

【0037】図7は本実施例におけるオブジェクトサイ
ズ増加時の実アドレスブロックの配置の一例を示す図で
ある。
FIG. 7 is a diagram showing an example of the arrangement of real address blocks when the object size increases in this embodiment.

【0038】図7に示すように、アロケートされる実ア
ドレスブロックが増えるために、実アドレス空間の後に
新たなアドレスブロックが入る。例えば、図5のオブジ
ェクトobj1が実アドレスブロックの2つ分増加した
ときには、後に実アドレスブロック#2,#3が追加さ
れている。
As shown in FIG. 7, since the number of real address blocks to be allocated increases, a new address block is inserted after the real address space. For example, when object obj1 in FIG. 5 increases by two real address blocks, real address blocks #2 and #3 are added later.

【0039】他方、関数のオブジェクトサイズが減少し
た場合には、変更前のオブジェクトが格納されていた仮
想ブロックに格納する。
On the other hand, when the object size of a function is decreased, it is stored in the virtual block where the object before the change was stored.

【0040】図8は本実施例におけるオブジェクトサイ
ズ減少時の実アドレスブロックの配置の一例を示す図で
ある。
FIG. 8 is a diagram showing an example of the arrangement of real address blocks when the object size is reduced in this embodiment.

【0041】図8に示すように、アロケートされる実ア
ドレスブロックが減るために減った実アドレスブロック
は、空きになる。例えば、図5のオブジェクトobj2
が実アドレスブロックの2つ分減少したときには、実ア
ドレスブロック#6,#7が空きのNULLになってい
る。
As shown in FIG. 8, the real address blocks that are allocated are reduced and become empty. For example, object obj2 in Figure 5
When the number decreases by two real address blocks, real address blocks #6 and #7 are empty and NULL.

【0042】なお、この実施例で、実アドレスとしたア
ドレス空間は、計算機の主記憶メモリ空間としてもよい
し、計算機の仮想記憶領域としてもよい。また、ディス
ク等の補助記憶空間(マップドIO)としてもよい。ま
た、この実施例では、関数のエントリポインタについて
述べたが、データつまり変数のエントリポインタも同様
に扱える。そして、データのエントリポインタは、複数
の変数を一つの仮想ブロックに格納することもでき、変
数一つ一つに仮想ブロックを割り当てることもできる。
In this embodiment, the address space used as the real address may be the main memory space of the computer or the virtual storage area of the computer. Alternatively, it may be an auxiliary storage space (mapped IO) such as a disk. Further, in this embodiment, the entry pointer of a function has been described, but the entry pointer of data, that is, a variable, can be handled in the same way. The data entry pointer can store a plurality of variables in one virtual block, and can also allocate a virtual block to each variable.

【0043】[0043]

【発明の効果】本発明のプログラム格納実行方式は、次
の3点の効果を有している。
Effects of the Invention The program storage and execution method of the present invention has the following three effects.

【0044】第1の効果は、オブジェクトサイズが増減
しても、他のオブジェクトのエントリアドレスが常に変
わらないために、変更したソースをコンパイルするだけ
で、プログラムを動かすことができることである。ただ
し、一つの関数のオブジェクトサイズは、仮想ブロック
のサイズを上回ることはできないという制約ができる。
The first effect is that even if the object size increases or decreases, the entry addresses of other objects always remain the same, so the program can be run simply by compiling the modified source. However, there is a restriction that the object size of one function cannot exceed the size of the virtual block.

【0045】また、第2の効果は、従来のプログラム開
発用計算機の補助記憶装置には、ソースファイルとオブ
ジェクトファイルとロードモジュールファイルとの3つ
が存在したが、本発明では、ソースファイルとオブジェ
クトとしかなく、記憶領域の使用量の節約になることで
ある。
The second effect is that the auxiliary storage device of a conventional program development computer has three sources: a source file, an object file, and a load module file. This means that the amount of storage space used can be saved.

【0046】さらに、第3の効果は、実アドレス空間上
にすべてのプログラムを格納し、それを直接プログラム
エントリから実行していくことになるために、実アドレ
ス空間さえあれば、どのような規模やアーキテクチャの
計算機にも適用できることである。
Furthermore, the third effect is that all programs are stored in the real address space and executed directly from the program entry, so as long as there is a real address space, it is possible to This can also be applied to computers with different architectures.

【0047】実アドレス空間を主記憶メモリとすれば、
本方式がバイナリプログラムしかメモリ上に存在しない
という性格からメモリの節約となる。また、起動時にロ
ードするような処理がないために、瞬時にプログラムが
起動できる。実アドレス空間を仮想記憶領域とした場合
にも、領域の節約になる他、プログラムの一部をロード
するのみとなり、大きなプログラムでも高速に起動する
ことができる。実アドレス空間を補助記憶空間とした場
合にも、メモリによるバッファリングを工夫することに
より実現可能であり、この場合にもオブジェクトしかな
い本方式では、補助記憶装置を効率的に使用できる。
If the real address space is the main memory, then
This method saves memory because only binary programs exist in memory. Additionally, since there is no process to load at startup, the program can start instantly. Even when the real address space is used as a virtual storage area, not only does it save space, but only a portion of the program is loaded, allowing even large programs to start quickly. Even when the real address space is used as the auxiliary storage space, this can be realized by devising memory buffering, and in this case as well, the auxiliary storage device can be used efficiently in this method where there are only objects.

【0048】なお、本発明のプログラム格納実行方式は
、大規模なプログラムに対して、一部のパラメータをい
ろいろ変えながら、何度も実行して調整するような場面
で、かつそれが容易にパッチできないような場合にも、
大幅な開発期間の短縮が行えるという利点もある。
Note that the program storage and execution method of the present invention is useful in situations where a large-scale program is executed and adjusted many times while changing some of its parameters, and it can be easily patched. Even if it is not possible,
Another advantage is that the development period can be significantly shortened.

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

【図1】本発明のプログラム格納実行方式の一実施例を
示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a program storage and execution method according to the present invention.

【図2】本実施例で仮想空間上に割り当てられたオブジ
ェクトの一例を示す図である。
FIG. 2 is a diagram showing an example of objects allocated on a virtual space in this embodiment.

【図3】図1のアドレス解決対象オブジェクトリスト5
の一例を示す図である。
[Figure 3] Address resolution target object list 5 in Figure 1
It is a figure showing an example.

【図4】本実施例で割り当てたオブジェクト名と仮想ブ
ロック番号との対応表であるシンボルテーブル6の一例
を示す図である。
FIG. 4 is a diagram showing an example of a symbol table 6 that is a correspondence table between object names and virtual block numbers assigned in this embodiment.

【図5】本実施例における仮想ブロックと実アドレスブ
ロックとの対応関係の一例を示す図である。
FIG. 5 is a diagram showing an example of the correspondence between virtual blocks and real address blocks in this embodiment.

【図6】本実施例における仮想アドレスから実アドレス
への変換のためのマップテーブル9の一例を示す図であ
る。
FIG. 6 is a diagram showing an example of a map table 9 for converting virtual addresses to real addresses in this embodiment.

【図7】本実施例におけるオブジェクトサイズ増加時の
実アドレスブロックの配置の一例を示す図である。
FIG. 7 is a diagram illustrating an example of the arrangement of real address blocks when the object size increases in this embodiment.

【図8】本実施例におけるオブジェクトサイズ減少時の
実アドレスブロックの配置の一例を示す図である。
FIG. 8 is a diagram illustrating an example of the arrangement of real address blocks when the object size is reduced in this embodiment.

【図9】従来のプログラム格納実行方式の一例を示すブ
ロック図である。
FIG. 9 is a block diagram showing an example of a conventional program storage and execution method.

【図10】従来のプログラム格納実行方式のオブジェク
ト配置の一例を示す図である。
FIG. 10 is a diagram showing an example of object arrangement in a conventional program storage and execution method.

【図11】従来のプログラム格納実行方式におけるオブ
ジェクトサイズ変更時の影響の一例を示す図である。
FIG. 11 is a diagram illustrating an example of the effect of changing an object size in a conventional program storage and execution method.

【符号の説明】[Explanation of symbols]

1,91    ソースファイル 2,92    コンパイル手段 3    仮想アドレス解決手段 4    オブジェクト格納手段 5,95    アドレス解決対象オブジェクトリスト
6    シンボルテーブル 7    仮想ブロックアロケート解放手段8    
実アドレスブロックアロケート解放手段9    マッ
プテーブル 10    空き仮想ブロック情報テーブル11   
 空き実アドレスブロック情報テーブル12    仮
想アドレス変換手段 93    アドレス解決手段 94    ロードモジュール格納手段96    メ
モリへのロード手段
1, 91 Source file 2, 92 Compilation means 3 Virtual address resolution means 4 Object storage means 5, 95 Address resolution target object list 6 Symbol table 7 Virtual block allocation release means 8
Real address block allocation release means 9 Map table 10 Free virtual block information table 11
Free real address block information table 12 Virtual address conversion means 93 Address resolution means 94 Load module storage means 96 Loading means into memory

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  ソースファイルからサブルーチン毎に
アドレス未解決のオブジェクトを生成するコンパイル手
段と、生成した前記オブジェクトをそれぞれ一つの仮想
ブロック上に割り当てる仮想アドレス解決手段と、前記
仮想ブロック上の前記オブジェクトを実際の記憶装置内
に格納するオブジェクト格納手段と、実行アドレスの変
換を行いながら前記仮想ブロック上の前記オブジェクト
を実行する仮想アドレス変換手段とを有することを特徴
とするプログラム格納実行方式。
1. Compilation means for generating an object with an unresolved address for each subroutine from a source file; virtual address resolution means for allocating each of the generated objects onto one virtual block; A program storage/execution method comprising: an object storage means for storing in an actual storage device; and a virtual address translation means for executing the object on the virtual block while converting an execution address.
JP8487791A 1991-04-17 1991-04-17 Program storage execution system Pending JPH04317135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8487791A JPH04317135A (en) 1991-04-17 1991-04-17 Program storage execution system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8487791A JPH04317135A (en) 1991-04-17 1991-04-17 Program storage execution system

Publications (1)

Publication Number Publication Date
JPH04317135A true JPH04317135A (en) 1992-11-09

Family

ID=13843017

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8487791A Pending JPH04317135A (en) 1991-04-17 1991-04-17 Program storage execution system

Country Status (1)

Country Link
JP (1) JPH04317135A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0406028A2 (en) * 1989-06-30 1991-01-02 Digital Equipment Corporation Incremental compiler for source code development system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0406028A2 (en) * 1989-06-30 1991-01-02 Digital Equipment Corporation Incremental compiler for source code development system

Similar Documents

Publication Publication Date Title
JP2893071B2 (en) Thread private memory for multi-threaded digital data processor
EP2460073B1 (en) Mapping processing logic having data parallel threads across processors
US5916308A (en) Dynamic link libraries without linker or loader support
US5539899A (en) System and method for handling a segmented program in a memory for a multitasking data processing system utilizing paged virtual storage
US7913243B2 (en) Method and system for generating and applying patches to a computer program concurrently with its execution
JPH01154267A (en) Incorporating system for input/output device control program of operating system
JPH02272627A (en) Digital computer system and method of invocation of procedure of the same
EP0777177A1 (en) A method for object-oriented programming using dynamic interfaces
JPH02188833A (en) Interface for computer system
CN106445656B (en) A kind of method and device for realizing thread-local storage
US7058656B2 (en) System and method of using extensions in a data structure without interfering with applications unaware of the extensions
US6959430B2 (en) Specialized heaps for creation of objects in object-oriented environments
US5062039A (en) Sharing of workspaces in interactive processing using workspace name tables for linking of workspaces
CN117193882A (en) ELF loading method based on microkernel operating system
US20070300210A1 (en) Compiling device, list vector area assignment optimization method, and computer-readable recording medium having compiler program recorded thereon
US20030079210A1 (en) Integrated register allocator in a compiler
US6275985B1 (en) Method and apparatus for developing an application that implements garbage collection efficiently by combining proxy objects with compiler support
US20070143436A1 (en) Method, apparatus and program storage device for providing light weight system calls to improve user mode performance
KR101140522B1 (en) System and Method for Managing Object
JPH04317135A (en) Program storage execution system
EP1889158B1 (en) Method and apparatus for combined execution of native code and target code during program code conversion
US6915408B2 (en) Implementation of thread-static data in multi-threaded computer systems
JP3019915B2 (en) Procedure call method
JP3682050B2 (en) Embedded software development equipment
JP3693311B2 (en) Distributed processing system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19970819