JP2020113050A - Dynamic link device, dynamic load device, computer system, dynamic link method, dynamic load method, dynamic link program, and dynamic load program - Google Patents

Dynamic link device, dynamic load device, computer system, dynamic link method, dynamic load method, dynamic link program, and dynamic load program Download PDF

Info

Publication number
JP2020113050A
JP2020113050A JP2019003516A JP2019003516A JP2020113050A JP 2020113050 A JP2020113050 A JP 2020113050A JP 2019003516 A JP2019003516 A JP 2019003516A JP 2019003516 A JP2019003516 A JP 2019003516A JP 2020113050 A JP2020113050 A JP 2020113050A
Authority
JP
Japan
Prior art keywords
shared library
function
program
dynamic
calling
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.)
Granted
Application number
JP2019003516A
Other languages
Japanese (ja)
Other versions
JP7271957B2 (en
Inventor
照之 今井
Teruyuki Imai
照之 今井
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
Original Assignee
NEC Corp
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 filed Critical NEC Corp
Priority to JP2019003516A priority Critical patent/JP7271957B2/en
Publication of JP2020113050A publication Critical patent/JP2020113050A/en
Application granted granted Critical
Publication of JP7271957B2 publication Critical patent/JP7271957B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To provide a dynamic link device that allows a program such as an accelerator to link a host shared library without writing a stub.SOLUTION: A dynamic link device includes: load means that loads a shared library into a memory of an own device and links it from a calling source program; and platform switching means that identifies a target of the shared library and switches a function call function of the shared library from the calling source program to the own device or another device.SELECTED DRAWING: Figure 1

Description

本発明は、動的リンク装置、動的ロード装置、計算機システム、動的リンク方法、動的ロード方法、動的リンクプログラム、および動的ロードプログラムに関する。 The present invention relates to a dynamic link device, a dynamic load device, a computer system, a dynamic link method, a dynamic load method, a dynamic link program, and a dynamic load program.

今日の計算機システムでは、半導体技術や電力の制約によって、汎用計算機の周波数を高めることによる性能向上が飽和してきている。そのため、処理に適したアクセラレータなど、特性の異なる計算機によって構成されたヘテロな計算機システムが拡大している。一例として、通常の計算や入出力を行う汎用プロセッサを備えるホストと、数値計算に適したプロセッサを備えるアクセラレータとで構成される計算機システムがある。アクセラレータには、Intel Xeon Phi(登録商標)やNEC SX−Aurora TSUBASA(登録商標)のように、オペレーティングシステムの機能、および共有ライブラリをサポートするものがある。 In today's computer systems, performance improvement by increasing the frequency of general-purpose computers is saturated due to semiconductor technology and power constraints. Therefore, heterogeneous computer systems composed of computers with different characteristics such as accelerators suitable for processing are expanding. As an example, there is a computer system including a host including a general-purpose processor that performs normal calculation and input/output, and an accelerator including a processor suitable for numerical calculation. Some accelerators, such as Intel Xeon Phi (registered trademark) and NEC SX-Aurora TSUBASA (registered trademark), support operating system functions and shared libraries.

共有ライブラリは、プログラムの再利用性を高めることでソフトウェアの生産性を向上させ、かつ、複数のプログラムで使用する関数によって重複するコードによるストレージやメモリの消費を削減するために、計算機システムにおいて広く普及している。標準的なオペレーティングシステムは、共有ライブラリをサポートしている。例えば、Linux(登録商標)およびUnix(登録商標)系オペレーティングシステムでは、ELF(Executable and Linking Format)およびELF shared objectという動的リンク・動的ロード可能な共有ライブラリがサポートされている。 The shared library is widely used in computer systems in order to improve software reusability by improving program reusability and reduce storage and memory consumption due to duplicated code depending on functions used in multiple programs. It is popular. Standard operating systems support shared libraries. For example, Linux (registered trademark) and Unix (registered trademark) operating systems support ELF (Executable and Linking Format) and ELF shared object, which are dynamically linkable and dynamically loadable shared libraries.

ヘテロな計算機システムは、プログラムの実行を開始する計算機(ホスト)上で動作する実行ファイルから、特定の処理に適した別の計算機(アクセラレータ)を起動する。この特定の処理は、最適化されたコードの再利用性のために共有ライブラリとして提供されることがある。 A heterogeneous computer system starts another computer (accelerator) suitable for a specific process from an execution file that runs on a computer (host) that starts executing a program. This particular process may be provided as a shared library for optimized code reusability.

ヘテロな計算機システムに用いられる複数の計算機で動作する分散プログラムにおいて、自身の計算機以外の計算機(以下、サーバとも呼ばれる)で動作する機能(たとえば、関数・メソッド)を使用する場合、RPC(Remote Procedure Call)が使用される。RPCでは、通常の関数呼び出しとは異なる煩雑な記述・処理の追加が必要である。たとえば、RPCを使用するときは、クライアントがリモートで呼び出すべき関数に渡す引数を、マーシャリングまたはシリアライズと呼ばれる、転送するためのデータの塊に変換する処理を実行し、変換したデータを、関数を実行するサーバに転送する。サーバは、マーシャリングまたはシリアライズされたデータを元の形に復元(アンマーシャリング、デシリアライズ)し、実際に関数を呼び出す。サーバは、関数を呼び出し実行した結果をマーシャリングしてクライアントに返信する。クライアントはサーバから返された結果をアンマーシャリングする。 In a distributed program that operates on multiple computers used in a heterogeneous computer system, when using a function (for example, a function/method) that operates on a computer (hereinafter, also referred to as a server) other than its own computer, RPC (Remote Procedure) Call) is used. In RPC, it is necessary to add complicated description and processing different from the normal function call. For example, when using RPC, the argument passed to the function that the client should call remotely is converted into a chunk of data for transfer called marshalling or serialization, and the converted data is executed. Transfer to the server. The server restores the marshalled or serialized data to the original form (unmarshalling, deserialization), and actually calls the function. The server marshals the result of calling the function and returns it to the client. The client unmarshalls the results returned by the server.

一般に、RPCによって他の計算機の関数を呼び出すプログラムでは、クライアントスタブとサーバスタブとが用いられる。クライアントスタブは、クライアント側でマーシャリングを行い、サーバに要求を発行し、サーバから戻り値を受信し、その値を返す。サーバスタブは、サーバ側で要求を受け付け、アンマーシャリングを行い、サーバ上の関数に引数として渡し、関数を実行し、戻り値をクライアントに送信する。開発者は、クライアントスタブを呼び出すプログラムを記述し、クライアントスタブをリンクする。 Generally, a client stub and a server stub are used in a program that calls a function of another computer by RPC. The client stub performs marshaling on the client side, issues a request to the server, receives a return value from the server, and returns that value. The server stub receives the request on the server side, unmarshalls it, passes it as an argument to a function on the server, executes the function, and sends the return value to the client. The developer writes a program that calls the client stub and links the client stub.

非特許文献1には、RPCの一例としてのONC(Open Network Computing) RPCについての説明がある。 Non-Patent Document 1 describes ONC (Open Network Computing) RPC as an example of RPC.

また、特許文献1には、ホストとホストに接続されるアクセラレータとを含むグラフィックシステムについての記載がある。このグラフィックシステムは、ホストのライブラリにストラクチャ管理部を設ける。クライアントは、ストラクチャ管理部により、直接、アクセラレータ内の共有メモリ上にストラクチャ編集リクエストを格納することができる。 Further, Patent Document 1 describes a graphic system including a host and an accelerator connected to the host. This graphic system has a structure management unit in the host library. The client can directly store the structure edit request on the shared memory in the accelerator by the structure management unit.

特許文献2に記載の技術は、ゲストプラットフォームのライブラリをロードする必要があるとき、ホスト用の代替のライブラリがあるかを判別し、有れば当該代替のライブラリをロードして使用する。さらに、特許文献2に記載の技術は、ホスト用の代替のライブラリが無ければ、エミュレーション・バイナリ変換によりゲスト用のライブラリを使用する。 The technique described in Patent Document 2 determines whether or not there is a substitute library for the host when it is necessary to load the library of the guest platform, and if there is, the substitute library is loaded and used. Further, the technique described in Patent Document 2 uses the guest library by emulation/binary conversion if there is no substitute library for the host.

特開平09−319856号公報JP, 09-319856, A 特表2013−511782号公報Japanese Patent Publication No. 2013-511782

R. Srinivasan, "RPC: Remote Procedure Call Protocol Specification Version 2", [online], August 1995, Request for Comments: 1831 (RFC1831), [平成30年12月25日検索], インターネット < http://www.ring.gr.jp/pub/doc/RFC/rfc1831.txt>R. Srinivasan, "RPC: Remote Procedure Call Protocol Specification Version 2", [online], August 1995, Request for Comments: 1831 (RFC1831), [Search December 25, 2018], Internet <http://www .ring.gr.jp/pub/doc/RFC/rfc1831.txt>

RPCに使用するクライアントスタブとサーバスタブ(以下、これらを纏めてスタブと呼ぶ)とを自動生成することで、スタブの開発にかかるコストが軽減される。たとえば、IDL(Interface Definition Language)で関数のインタフェースが記述され、IDLコンパイラによって、スタブが生成される。詳細には、ONC RPCに使用するIDLコンパイラとして、RPCGENが知られている。RPCGENは、インタフェース定義ファイルを使って、サーバおよびクライアントのC言語スタブを生成するコンパイラである。 By automatically generating the client stub and the server stub used for the RPC (hereinafter collectively referred to as a stub), the cost for developing the stub can be reduced. For example, a function interface is described in IDL (Interface Definition Language), and a stub is generated by the IDL compiler. In detail, RPCGEN is known as an IDL compiler used for ONC RPC. RPCGEN is a compiler that uses the interface definition file to generate C language stubs for the server and client.

しかしながら、IDLによるスタブの自動生成では、スタブ開発のコストは軽減されるものの、依然としてプログラムによってスタブをリンクさせなければならない。 However, although automatic generation of stubs by IDL reduces the cost of stub development, the stubs still have to be linked programmatically.

本発明は、上記課題を解決するためになされたものであり、アクセラレータのプログラムが、スタブを記述することなく、ホストの共有ライブラリをリンクすることができる技術を提供することを目的とする。 The present invention has been made to solve the above problems, and an object thereof is to provide a technique in which an accelerator program can link a shared library of a host without writing a stub.

本発明の動的リンク装置は、共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクするロード手段と、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替えるプラットフォーム切替手段と、を備える。 The dynamic link device of the present invention identifies the load means for loading the shared library into the memory of the device itself and linking it from the calling program and the target of the shared library, and the function call of the shared library from the calling program. Platform switching means for switching the function to its own device or another device.

本発明の動的ロード装置は、共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクするロード手段と、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替えるプラットフォーム切替手段と、を備える。 The dynamic loading device of the present invention identifies the loading means for loading the shared library into the memory of its own device and linking it from the calling program, and the target of the shared library, and the function call of the shared library from the calling program. Platform switching means for switching the function to its own device or another device.

本発明の計算機システムは、第1の情報処理装置と、第1の情報処理装置に接続された第2の情報処理装置と、を含む計算機システムであって、第1の情報処理装置は、共有ライブラリを第1の情報処理装置のメモリにロードし、呼び出し元のプログラムからリンクするロード手段と、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を第1の情報処理装置または第2の情報処理装置に切り替えるプラットフォーム切替手段と、を備える。 A computer system of the present invention is a computer system including a first information processing device and a second information processing device connected to the first information processing device, wherein the first information processing device is shared. The first means for loading the library into the memory of the first information processing device and identifying the load means for linking from the calling program and the target of the shared library, and the function calling function of the shared library from the calling program Platform switching means for switching to the processing device or the second information processing device.

本発明の動的リンク方法は、共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクし、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える。 According to the dynamic linking method of the present invention, the shared library is loaded into the memory of its own device, linked from the calling program, the target of the shared library is identified, and the function of function call of the shared library is called from the calling program. Switch to a device or other device.

本発明の動的ロード方法は、共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクし、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える。 According to the dynamic loading method of the present invention, the shared library is loaded into the memory of its own device, linked from the calling program, the target of the shared library is identified, and the function of the shared library function call is automatically executed from the calling program. Switch to a device or other device.

本発明の動的リンクプログラムは、共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクする機能と、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える機能と、をコンピュータに実行させる。 The dynamic link program of the present invention has a function of loading the shared library into the memory of the own device and linking it from the calling program, and a function of identifying the target of the shared library and calling the function of the shared library from the calling program. Causes the computer to execute the function of switching the device to its own device or another device.

本発明の動的ロードプログラムは、共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクする機能と、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える機能と、をコンピュータに実行させる。 The dynamic load program of the present invention has a function of loading the shared library into the memory of its own device and linking it from the calling program, and a function of identifying the target of the shared library and calling the function of the shared library from the calling program. Causes the computer to execute the function of switching the device to its own device or another device.

本発明によれば、アクセラレータのプログラムは、スタブを記述することなく、ホストの共有ライブラリをリンクすることができる。 According to the present invention, the accelerator program can link the shared library of the host without writing the stub.

本発明の第1の実施形態に係る動的リンク装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the dynamic link apparatus which concerns on the 1st Embodiment of this invention. 図1に示す動的リンク装置が動作する環境の一例としての計算機システムの構成例を示すブロック図である。FIG. 3 is a block diagram showing a configuration example of a computer system as an example of an environment in which the dynamic link device shown in FIG. 1 operates. 図2に示す計算機システム上で動作する動的リンク装置の動作例(動的リンク方法、動的ロード方法、動的リンクプログラム、動的ロードプログラム)を説明するフローチャートである。3 is a flowchart illustrating an operation example (dynamic link method, dynamic load method, dynamic link program, dynamic load program) of the dynamic link device operating on the computer system shown in FIG. 2. 第1の実施形態において、プログラム“a.out”を起動した際の初期状態における、アクセラレータのメモリ空間の配置例を示す図である。FIG. 7 is a diagram showing an example of the layout of the accelerator memory space in the initial state when the program “a.out” is started in the first embodiment. 第1の実施形態において、動的リンクされた共有ライブラリのロード後における、アクセラレータのメモリ空間の配置例を示す図である。FIG. 8 is a diagram showing an example of the layout of the memory space of the accelerator after the dynamically linked shared library is loaded in the first embodiment. 第1の実施形態において、動的リンクされた共有ライブラリの遅延リンク完了時における、アクセラレータおよびホストの各メモリ空間の配置例を示す図である。FIG. 9 is a diagram showing an example of arrangement of memory spaces of an accelerator and a host when delay linking of a dynamically linked shared library is completed in the first embodiment. 本発明の第2の実施形態に係る動的リンク装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the dynamic link apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第3の実施形態に係る動的ロード装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the dynamic load apparatus which concerns on the 3rd Embodiment of this invention. 本発明の第4の実施形態に係る計算機システムの構成例を示すブロック図である。It is a block diagram which shows the structural example of the computer system which concerns on the 4th Embodiment of this invention.

[第1の実施形態]
(構成の説明)
図1は、本発明の第1の実施形態に係る動的リンク装置10の構成例を示すブロック図である。図1に示す動的リンク装置10は、ロード部11(ロード手段の一例)と、プラットフォーム切替部12(プラットフォーム切替手段の一例)と、を備える。
[First Embodiment]
(Description of configuration)
FIG. 1 is a block diagram showing a configuration example of a dynamic link device 10 according to the first embodiment of the present invention. The dynamic link device 10 illustrated in FIG. 1 includes a loading unit 11 (an example of a loading unit) and a platform switching unit 12 (an example of a platform switching unit).

ロード部11は、共有ライブラリをアクセラレータのメモリにロードし、呼び出し元のプログラムからリンクする動的リンカまたは動的ローダである。ロード部11は、アクセラレータをターゲットとする共有ライブラリとしての動的オブジェクトと、ホストをターゲットとする共有ライブラリとしての動的オブジェクトとの両方をロードする。 The load unit 11 is a dynamic linker or a dynamic loader that loads the shared library into the memory of the accelerator and links it from the calling program. The load unit 11 loads both a dynamic object serving as a shared library targeting the accelerator and a dynamic object serving as a shared library targeting the host.

プラットフォーム切替部12は、ロード部11がロードした共有ライブラリのターゲットを識別する。また、プラットフォーム切替部12は、呼び出し元のプログラムにより共有ライブラリの関数を呼び出すための関数呼び出し機能を切り替える。 The platform switching unit 12 identifies the target of the shared library loaded by the loading unit 11. Further, the platform switching unit 12 switches the function calling function for calling the function of the shared library by the calling source program.

本実施形態における上記各部は、ハードウェア、またはハードウェアおよびソフトウェアの組み合わせた環境下で実現可能である。たとえば、上記各部は、図2に示す環境下で実現可能である。 Each of the above units in this embodiment can be realized in hardware or in an environment in which hardware and software are combined. For example, each unit described above can be realized under the environment shown in FIG.

図2は、図1に示す動的リンク装置10が動作する環境の一例としての計算機システム20の構成例を示すブロック図である。図2に示す計算機システム20は、ホスト21とアクセラレータ22とを備える。ホスト21とアクセラレータ22とは、I/O(Input/Output)インタフェース23を介して接続される。ホスト21とアクセラレータ22とは、それぞれ、1つまたは複数のプロセッサとメモリとを備える。図2に示す例では、ホスト21は、n個のプロセッサ211−1〜211−nと、メモリ212と、を備える。アクセラレータ22は、プロセッサ221とメモリ222とを備える。ホスト21は、ディスク装置213を備える。ディスク装置213により、ホスト21が使用するファイルシステムが、構築される。ディスク装置213には、ホスト21のオペレーティングシステムや、ホスト21およびアクセラレータ22が実行するプログラムや、共有ライブラリの情報が格納される。共有ライブラリは、読み出し元のプログラムに動的リンクしている。 FIG. 2 is a block diagram showing a configuration example of a computer system 20 as an example of an environment in which the dynamic link device 10 shown in FIG. 1 operates. The computer system 20 shown in FIG. 2 includes a host 21 and an accelerator 22. The host 21 and the accelerator 22 are connected via an I/O (Input/Output) interface 23. The host 21 and the accelerator 22 each include one or more processors and memories. In the example illustrated in FIG. 2, the host 21 includes n processors 211-1 to 211-n and a memory 212. The accelerator 22 includes a processor 221 and a memory 222. The host 21 includes a disk device 213. A file system used by the host 21 is constructed by the disk device 213. The disk device 213 stores the operating system of the host 21, programs executed by the host 21 and the accelerator 22, and shared library information. The shared library is dynamically linked to the reading source program.

ホスト21およびアクセラレータ22は、たとえば、ネットワーク上で情報(データやサービス等)を提供しているハードウェアが搭載された機器のことである。ここで、ハードウェアとは、たとえば、ICやFPGA等の電子回路、またはコンピュータ(たとえば、CPUやGPUがメモリに記憶されたプログラムを実行することにより機能を実現する装置)である。あるいは、ハードウェアとは、たとえば、電子回路とコンピュータとが組み合わせされた装置のことを指す。上記において、ICはIntegrated Circuitの略であり、FPGAはField Programmable Gate Arrayの略である。また、CPUはCentral Processing Unitの略であり、GPUはGraphics Processing Unitの略である。 The host 21 and the accelerator 22 are, for example, devices equipped with hardware that provides information (data, services, etc.) on a network. Here, the hardware is, for example, an electronic circuit such as an IC or an FPGA, or a computer (for example, a device that realizes a function by executing a program stored in a memory by a CPU or a GPU). Alternatively, hardware refers to, for example, a device in which an electronic circuit and a computer are combined. In the above, IC is an abbreviation for Integrated Circuit and FPGA is an abbreviation for Field Programmable Gate Array. CPU is an abbreviation for Central Processing Unit, and GPU is an abbreviation for Graphics Processing Unit.

以下の説明において、動的リンク装置10は、アクセラレータ22において実現される場合について説明する。ただし、これは、第1の実施形態を限定するものではない。動的リンク装置10は、ホスト21において動作してもよい。すなわち、動的リンク装置10は、アクセラレータ22またはホスト21(以下、第1の情報処理装置または自装置と呼ぶ場合もある)のいずれかにおいて動作すればよい。そして、動的リンク装置10は、第1の情報処理装置における共有ライブラリの関数呼び出しを、第1の情報処理装置および第1の情報処理装置に接続される装置(以下、第2の情報処理装置または他の装置と呼ぶ場合もある)とのどちらかに切り替える。例えば、動的リンク装置10がアクセラレータ22において動作する場合、アクセラレータ22が第1の情報処理装置であり、ホスト21が第2の情報処理装置である。動的リンク装置10がホスト21において動作する場合、ホスト21が第1の情報処理装置であり、アクセラレータ22が第2の情報処理装置である。 In the following description, the case where the dynamic link device 10 is implemented in the accelerator 22 will be described. However, this does not limit the first embodiment. The dynamic link device 10 may operate in the host 21. That is, the dynamic link device 10 may operate in either the accelerator 22 or the host 21 (hereinafter, also referred to as the first information processing device or its own device). Then, the dynamic link device 10 calls the function call of the shared library in the first information processing device and a device connected to the first information processing device and the first information processing device (hereinafter, the second information processing device). Or it may be called another device). For example, when the dynamic link device 10 operates in the accelerator 22, the accelerator 22 is the first information processing device and the host 21 is the second information processing device. When the dynamic link device 10 operates in the host 21, the host 21 is the first information processing device and the accelerator 22 is the second information processing device.

(動作の説明)
図3は、図2に示す計算機システム20上で動作する動的リンク装置10の動作例を説明するフローチャートである。すなわち、本フローチャートは、動的リンク方法、動的ロード方法、動的リンクプログラム、動的ロードプログラムを説明するものに他ならない。
(Explanation of operation)
FIG. 3 is a flowchart for explaining an operation example of the dynamic link device 10 operating on the computer system 20 shown in FIG. That is, this flowchart is nothing but the explanation of the dynamic linking method, dynamic loading method, dynamic linking program, and dynamic loading program.

アクセラレータ22上でプログラム“a.out”が開始されると、ロード部11は、プログラム“a.out”が動的リンクしているライブラリをロードする(ステップS10)。 When the program "a.out" is started on the accelerator 22, the loading unit 11 loads the library dynamically linked with the program "a.out" (step S10).

動的リンクしているライブラリがロードされると、プラットフォーム切替部12はライブラリのターゲットがホスト21であるかアクセラレータ22であるかを判別する(ステップS11)。 When the dynamically linked library is loaded, the platform switching unit 12 determines whether the target of the library is the host 21 or the accelerator 22 (step S11).

ライブラリのターゲットがホスト用であれば(ステップS11のYes)、プラットフォーム切替部12は、ホスト21上でも同じライブラリをロードするよう要求する(ステップS14)。ライブラリをロードした後、プログラム“a.out”がホスト21のライブラリに含まれる関数を呼び出すと、プラットフォーム切替部12は、ホスト用スタブへジャンプするよう設定する。詳細には、プラットフォーム切替部12は、当該関数の呼び出しのためのコードを格納するPLT(Procedure Linkage Table)からホスト用スタブへジャンプするよう設定する(ステップS15)。 If the target of the library is for the host (Yes in step S11), the platform switching unit 12 requests the host 21 to load the same library (step S14). When the program "a.out" calls a function included in the library of the host 21 after loading the library, the platform switching unit 12 sets to jump to the host stub. Specifically, the platform switching unit 12 sets to jump from a PLT (Procedure Linkage Table) storing a code for calling the function to a host stub (step S15).

一方、ライブラリのターゲットがアクセラレータ用であれば(ステップS11のNo)、プラットフォーム切替部12は、ステップS10でロードしたライブラリの初期化処理を実行する(ステップS12)。さらに、プラットフォーム切替部12は、GOT(Global Offset Table)を設定することで、後述される図5のようにメモリの再配置を完了させる(ステップS13)。ステップS12およびステップS13の処理は、一般的な動的リンカでも実行される処理である。 On the other hand, if the target of the library is for the accelerator (No in step S11), the platform switching unit 12 executes the initialization process of the library loaded in step S10 (step S12). Further, the platform switching unit 12 sets the GOT (Global Offset Table) to complete the memory rearrangement as shown in FIG. 5 described later (step S13). The processing of steps S12 and S13 is processing that is also executed by a general dynamic linker.

図4および図5を用いて、図3で示されるステップS10の詳細な処理について説明する。 Detailed processing of step S10 shown in FIG. 3 will be described with reference to FIGS. 4 and 5.

図4は、本実施形態において、プログラム“a.out”を起動した際の初期状態における、アクセラレータ22のメモリ222のメモリ空間3の配置例を示す図である。本実施例における“a.out”は、たとえば、ELF動的リンク実行ファイルである。 FIG. 4 is a diagram showing an arrangement example of the memory space 3 of the memory 222 of the accelerator 22 in the initial state when the program “a.out” is started in this embodiment. “A.out” in this embodiment is, for example, an ELF dynamic link execution file.

図4に示すように、アクセラレータ22のメモリ空間3には、プログラム“a.out”のヘッダおよびテキストを保持する領域であるテキスト領域311と、“a.out”のデータを格納する領域であるデータ領域312とが配置される。さらに、アクセラレータ22のメモリ空間3には、プログラム“a.out”をロードした動的リンカ“ld.so”のヘッダおよびテキストを保持するテキスト領域321と、動的リンカ“ld.so”のデータを格納するデータ領域322とが配置される。 As shown in FIG. 4, the memory space 3 of the accelerator 22 is a text area 311 which is an area for holding the header and text of the program “a.out” and an area for storing the data of “a.out”. A data area 312 is arranged. Further, in the memory space 3 of the accelerator 22, a text area 321 holding the header and text of the dynamic linker "ld.so" loaded with the program "a.out" and data of the dynamic linker "ld.so". And a data area 322 for storing

プログラム“a.out”は、共有ライブラリ“libhost.so”をリンクし、“libhost.so”に含まれる関数funcを呼び出している。 The program “a.out” links the shared library “libhost.so” and calls the function func included in “libhost.so”.

テキスト領域311は、動的リンクした関数を呼び出すためのPLTを含む。関数funcを呼び出すPLTは、func@plt3111を含む。 The text area 311 includes a PLT for calling a dynamically linked function. The PLT that calls the function func includes func@plt3111.

また、データ領域312は、動的リンクしたライブラリにおける関数のアドレスを格納する“.got.plt”において関数funcに対応するエントリであるGOT3121を有する。GOT3121は、func@pltで指示される領域に格納される間接ジャンプ命令のオペランドとして使用される。GOT3121の初期値は、func@plt3111中の間接ジャンプ命令の次の命令のアドレスである。これは、遅延リンクに使用するためである。 In addition, the data area 312 has a GOT 3121 which is an entry corresponding to the function func in “.got.plt” that stores the address of the function in the dynamically linked library. The GOT3121 is used as an operand of the indirect jump instruction stored in the area designated by func@plt. The initial value of GOT3121 is the address of the instruction next to the indirect jump instruction in func@plt3111. This is for use on a delayed link.

動的リンカのテキスト領域321は、共有ライブラリ用スタブ3211と、ホスト用スタブ3212とを含む。 The dynamic linker text area 321 includes a shared library stub 3211 and a host stub 3212.

共有ライブラリ用スタブ3211は、動的リンカ“ld.so”のシンボルテーブルから、所定のPLTエントリの関数の配置されたアドレスを解決してPLTの再配置を行う。すなわち、共有ライブラリ用スタブ3211は、“.got.plt”の対応するエントリを更新して、当該関数のアドレスにジャンプする。共有ライブラリ用スタブ3211による再配置の後は、共有ライブラリ中の関数は、PLTからジャンプ命令により、共有ライブラリ用のスタブを経由せずに呼び出される。 The shared library stub 3211 resolves the address where the function of the predetermined PLT entry is located from the symbol table of the dynamic linker “ld.so” and relocates the PLT. That is, the shared library stub 3211 updates the corresponding entry of “.got.plt” and jumps to the address of the function. After the relocation by the shared library stub 3211, the function in the shared library is called from the PLT by a jump instruction without passing through the shared library stub.

ホスト用スタブ3212は、関数呼び出しの引数として渡された値を、ホスト21側で呼び出す関数とともにアクセラレータ22からホスト21に通知して、ホスト21上での関数の呼び出しを要求する。一例としては、ホスト用スタブ3212は、ABI(Application Binary Interface)で規定されたレジスタの値および呼び出す関数のアドレスをマーシャリングし、I/Oインタフェース23を介してホスト21に転送する。 The host stub 3212 notifies the host 21 from the accelerator 22 of the value passed as the argument of the function call together with the function to be called on the host 21 side, and requests the function call on the host 21. As an example, the host stub 3212 marshalls the value of the register defined by ABI (Application Binary Interface) and the address of the function to be called, and transfers it to the host 21 via the I/O interface 23.

ロード部11は、プログラム“a.out”が要求している、すなわち動的リンクしているライブラリをファイルシステムからメモリ空間3にロードする。そして、ロード部11は、“a.out”の初期化ルーチンを実行する。本実施例において、“libhost.so”のテキスト領域およびデータ領域は、ディスク装置213上のファイルシステムからアクセラレータ22のメモリ空間3にマップされる。 The loading unit 11 loads the library requested by the program “a.out”, that is, dynamically linked, from the file system into the memory space 3. Then, the loading unit 11 executes the initialization routine of "a.out". In this embodiment, the text area and data area of “libhost.so” are mapped from the file system on the disk device 213 to the memory space 3 of the accelerator 22.

図5は、本実施例において動的リンカ“ld.so”による初期化処理によって、動的リンクされた共有ライブラリのロード後における、アクセラレータ22のメモリ空間3の配置の一例を示す図である。図4と同じ領域については、図4と同じ番号を付与し、その詳細な説明を省略する。図5に示すアクセラレータ22のメモリ空間3には、図4と同様に、“a.out”のテキスト領域311およびデータ領域312、並びに、動的リンカ“ld.so”のテキスト領域321およびデータ領域322が配置されている。さらに、図5に示すメモリ空間3には、“libhost.so”のヘッダおよびテキストを格納するテキスト領域431と、“libtest.so”のデータを格納するデータ領域432とが配置されている。テキスト領域431には、関数func4311が含まれる。ただし、関数func4311は、ホスト21で実行するバイナリであり、アクセラレータ22のプロセッサ221では実行できない。 FIG. 5 is a diagram showing an example of the layout of the memory space 3 of the accelerator 22 after the dynamically linked shared library is loaded by the initialization processing by the dynamic linker “ld.so” in this embodiment. The same regions as those in FIG. 4 are assigned the same numbers as those in FIG. 4, and detailed description thereof is omitted. In the memory space 3 of the accelerator 22 shown in FIG. 5, the text area 311 and the data area 312 of “a.out” and the text area 321 and the data area of the dynamic linker “ld.so” are provided as in FIG. 322 are arranged. Further, in the memory space 3 shown in FIG. 5, a text area 431 for storing a header and text of "libhost.so" and a data area 432 for storing data of "libtest.so" are arranged. The text area 431 includes a function func4311. However, the function func4311 is a binary executed by the host 21, and cannot be executed by the processor 221 of the accelerator 22.

図6を参照して、本実施例におけるプラットフォーム切替部12によるPLTの設定処理、すなわち遅延リンク(ステップS15)の詳細を説明する。 The details of the PLT setting process, that is, the delay link (step S15) by the platform switching unit 12 in the present embodiment will be described with reference to FIG.

図6は、本実施形態において関数呼び出し時にプラットフォーム切替部12が行う遅延リンク完了時における、アクセラレータ22のメモリ222のメモリ空間3、およびホスト21のメモリ212のメモリ空間5の配置の一例を示す図である。図4および図5と同じ領域については、図4および図5と同じ番号を付し、その説明を省略する。ホスト21のメモリ空間5には、“libhost.so”のテキスト領域531とデータ領域532とが配置されている。テキスト領域531およびデータ領域532は、ステップS14においてロード部11がロードした領域である。テキスト領域531は、関数func5311を含んでいる。アクセラレータ22のメモリ空間3に配置されたfunc用スタブ541は、ホスト21の関数func5311を呼び出すためのスタブである。 FIG. 6 is a diagram showing an example of an arrangement of the memory space 3 of the memory 222 of the accelerator 22 and the memory space 5 of the memory 212 of the host 21 at the time of completion of the delay link performed by the platform switching unit 12 at the time of calling a function in the present embodiment. Is. The same regions as those in FIGS. 4 and 5 are denoted by the same numbers as those in FIGS. 4 and 5, and the description thereof will be omitted. In the memory space 5 of the host 21, a text area 531 of “libhost.so” and a data area 532 are arranged. The text area 531 and the data area 532 are areas loaded by the loading unit 11 in step S14. The text area 531 includes a function func5311. The func stub 541 arranged in the memory space 3 of the accelerator 22 is a stub for calling the function func5311 of the host 21.

プログラム“a.out”が関数funcを呼び出すと、アクセラレータ22は、まず、“a.out”のテキスト領域311にあるfunc@plt3111のコードを実行する。動的リンクをサポートするプログラムにおいて、PLTには、“.got.plt”のエントリに保持されたアドレスへの間接ジャンプ命令と、PLTの番号を設定して共有ライブラリ用スタブ3211にジャンプする命令とが含まれる。データ領域312にある“.got.plt”のエントリGOT3121が未設定であるため、アクセラレータ22は、間接ジャンプにより次の命令を実行する。アクセラレータ22の処理は、共有ライブラリ用スタブ3211へジャンプする。 When the program "a.out" calls the function func, the accelerator 22 first executes the code of func@plt3111 in the text area 311 of "a.out". In a program that supports dynamic linking, the PLT has an indirect jump instruction to the address held in the ".got.plt" entry and an instruction to set the PLT number and jump to the shared library stub 3211. Is included. Since the entry GOT3121 of “.got.plt” in the data area 312 is not set, the accelerator 22 executes the next instruction by the indirect jump. The processing of the accelerator 22 jumps to the shared library stub 3211.

本実施形態における共有ライブラリ用スタブ3211の処理を説明する。共有ライブラリ用スタブ3211は、シンボルテーブルから対応するアドレスを検索する。プラットフォーム切替部12は、検索した結果得られたアドレスを含むテキスト領域が、ホスト用のライブラリのものか、アクセラレータ用のライブラリのものかを識別する。 The processing of the shared library stub 3211 in this embodiment will be described. The shared library stub 3211 retrieves the corresponding address from the symbol table. The platform switching unit 12 identifies whether the text area including the address obtained as a result of the search belongs to the library for the host or the library for the accelerator.

アクセラレータ用であれば、プラットフォーム切替部12は、一般的な動的リンカと同様に、“.got.plt”のエントリであるGOT3121を、得られたアドレスで更新する。 For the accelerator, the platform switching unit 12 updates the GOT 3121 that is the entry of “.got.plt” with the obtained address, as in a general dynamic linker.

ホスト用であれば、プラットフォーム切替部12は、アクセラレータ22のメモリ空間3に領域を割り当て、func用スタブ541を作成する。func用スタブ541は、ホスト21の関数func5311のアドレスをセットしてホスト用スタブ3212にジャンプするアクセラレータ用の命令列である。ホスト21の関数func5311のアドレスは、ABI上における関数呼び出しによって、破壊してよいレジスタの一つにセットされる。あるいは、ホスト21の関数func5311のアドレスは、スタックのトップにセットされてもよい。あるいは、本用途のために、アドレス1つ分のTLS(Thread Local Storage)の領域が予約されてもよい。プラットフォーム切替部12がfunc用スタブ541を作成した後、“.got.plt”のエントリであるGOT3121をfunc用スタブ541のアドレスにセットし、アクセラレータ22は、ホスト用スタブ3212にジャンプする。ホスト用スタブ3212は、ホスト21の関数func5311を呼び出す。 For the host, the platform switching unit 12 allocates an area to the memory space 3 of the accelerator 22 and creates a func stub 541. The func stub 541 is an instruction sequence for an accelerator that sets the address of the function func5311 of the host 21 and jumps to the host stub 3212. The address of the function func5311 of the host 21 is set to one of the registers which may be destroyed by the function call on the ABI. Alternatively, the address of the function func5311 of the host 21 may be set at the top of the stack. Alternatively, a TLS (Thread Local Storage) area for one address may be reserved for this purpose. After the platform switching unit 12 creates the func stub 541, the GOT 3121 that is the entry of “.got.plt” is set to the address of the func stub 541, and the accelerator 22 jumps to the host stub 3212. The host stub 3212 calls the function func5311 of the host 21.

また、2回目以降の関数funcの呼び出しでは、“.got.plt”が更新されているので、アクセラレータ22は、PLTからfunc用スタブ541で関数func5311のアドレスを指定して、ホスト用スタブ3212にジャンプする。これによって、ホスト用スタブ3212からホスト21の関数func5311が呼び出される。 In addition, since ".got.plt" is updated in the second and subsequent calls to the function func, the accelerator 22 specifies the address of the function func5311 by the func stub 541 from the PLT, and the host stub 3212 is designated. To jump. As a result, the function func5311 of the host 21 is called from the host stub 3212.

(効果の説明)
以上説明した第1の実施形態によれば、プラットフォーム切替部12を備えることで、アクセラレータ22のプログラムは、スタブを記述することなく、ホスト21の共有ライブラリをリンクできる。
(Explanation of effects)
According to the first embodiment described above, by including the platform switching unit 12, the program of the accelerator 22 can link the shared library of the host 21 without describing the stub.

(変形例)
以上説明した第1の実施形態では、動的リンカが、スタンダードなLinux(登録商標)の動的リンカである場合を例に挙げた。しかしながら、これはあくまで一例であり、第1の実施形態は、上記のような動的リンカに限定されない。
(Modification)
In the first embodiment described above, the case where the dynamic linker is a standard Linux (registered trademark) dynamic linker is taken as an example. However, this is merely an example, and the first embodiment is not limited to the dynamic linker as described above.

また、動的ローダは、たとえば、プログラムのロード時に依存関係に基づいてロードする代わりに、dlopen関数のようなAPI(Application Programming Interface)の呼び出しを用いて動作してもよい。 Further, the dynamic loader may operate by using an API (Application Programming Interface) call such as a dropen function instead of loading the program based on the dependency when the program is loaded.

また、遅延リンクは、必須ではない。たとえば、最初の呼び出しより前に、ロード直後にfunc用スタブ541が生成され、“.got.plt”のエントリがfunc用スタブ541のアドレスにセットされてもよい。 Also, the delayed link is not mandatory. For example, before the first call, the func stub 541 may be generated immediately after the loading, and the “.got.plt” entry may be set to the address of the func stub 541.

また、ISA(Instruction Set Architecture)やABIによっては、各関数用のスタブ(func用スタブ541相当)を用意せず、直接ホスト用スタブにセットできる場合がある。例えば、スタブにジャンプした時点で関数呼び出しのアドレス(func@plt)が残っていれば、そのアドレスから対応するPLTがわかる、つまり、呼び出すべき関数funcを特定することが可能である。 Further, depending on ISA (Instruction Set Architecture) or ABI, it may be possible to directly set the stub for the host without preparing the stub for each function (corresponding to the func stub 541). For example, if the function call address (func@plt) remains at the time of jumping to the stub, the corresponding PLT can be known from that address, that is, the function func to be called can be specified.

また、以上説明した実施形態の場合、汎用レジスタにおける数値引数になる可能性のあるものは、すべて転送することを前提としているが、本実施形態は、これに限定されることはない。 Further, in the case of the above-described embodiment, it is premised that all the numerical arguments in the general-purpose register may be transferred, but the present embodiment is not limited to this.

たとえば、動的ローダは、x86−64のように引数の型によって異なるレジスタに引数が保存されるABIでは、すべての引数をマーシャリングして送る。なお、x86−64は、インテル(登録商標)社の命令セットアーキテクチャを64ビットに拡張した命令セットの一つである。 For example, the dynamic loader marshalls and sends all the arguments in the ABI in which the arguments are stored in different registers depending on the argument types, such as x86-64. It should be noted that x86-64 is one of the instruction sets obtained by expanding the instruction set architecture of Intel (registered trademark) company to 64 bits.

また、動的ローダは、Dwarfのデバッグ情報または名前修飾(name mangling)された関数名(たとえばC++の場合)などを用いる場合、次のように動作してもよい。すなわち、動的ローダは、バイナリに含まれている情報から、引数の型およびサイズを取得し、構造体ポインタの引数がある場合にデータをコピーインおよびマーシャリングして転送することも可能である。なお、Dwarfは、広く使われているデバッグ用データフォーマットの規格である。 In addition, the dynamic loader may operate as follows when using debug information of Dwarf or a name-modified function name (for example, C++). That is, the dynamic loader can acquire the type and size of the argument from the information included in the binary, and can copy in and marshal the data when the argument of the structure pointer is present and transfer the data. Dwarf is a widely used standard for debugging data format.

[第2の実施形態]
図7は、本発明の第2の実施形態に係る動的リンク装置300の構成例を示すブロック図である。動的リンク装置300は、ロード部302(ロード手段の一例)と、プラットフォーム切替部304(プラットフォーム切替手段の一例)と、を備える。
[Second Embodiment]
FIG. 7: is a block diagram which shows the structural example of the dynamic link apparatus 300 which concerns on the 2nd Embodiment of this invention. The dynamic link device 300 includes a loading unit 302 (an example of a loading unit) and a platform switching unit 304 (an example of a platform switching unit).

ロード部302は、共有ライブラリをアクセラレータ22のメモリ222にロードし、呼び出し元のプログラムからリンクする。プラットフォーム切替部304は、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える。すなわち、ロード部302とプラットフォーム切替部304は、ロード部11とプラットフォーム切替部12と、それぞれ同様に動作する。 The loading unit 302 loads the shared library into the memory 222 of the accelerator 22 and links it from the calling program. The platform switching unit 304 identifies the target of the shared library, and switches the function calling function of the shared library from the calling source program to its own device or another device. That is, the loading unit 302 and the platform switching unit 304 operate similarly to the loading unit 11 and the platform switching unit 12, respectively.

本実施形態によれば、アクセラレータ22のプログラムは、スタブを記述することなく、ホスト21の共有ライブラリをリンクすることができる。その理由は、動的リンク装置300のロード部302とプラットフォーム切替部304が、第1の実施形態における対応する構成とそれぞれ同様に動作するためである。 According to this embodiment, the program of the accelerator 22 can link the shared library of the host 21 without writing a stub. The reason is that the load unit 302 and the platform switching unit 304 of the dynamic link device 300 operate similarly to the corresponding configurations in the first embodiment.

[第3の実施形態]
図8は、本発明の第3の実施形態に係る動的ロード装置400の構成例を示すブロック図である。動的ロード装置400は、ロード部402(ロード手段の一例)と、プラットフォーム切替部404(プラットフォーム切替手段の一例)と、を備える。
[Third Embodiment]
FIG. 8: is a block diagram which shows the structural example of the dynamic load apparatus 400 which concerns on the 3rd Embodiment of this invention. The dynamic loading device 400 includes a loading unit 402 (an example of a loading unit) and a platform switching unit 404 (an example of a platform switching unit).

ロード部402は、共有ライブラリをアクセラレータ22のメモリ222にロードし、呼び出し元のプログラムからリンクする。プラットフォーム切替部404は、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える。すなわち、ロード部402とプラットフォーム切替部404は、ロード部11とプラットフォーム切替部12と、それぞれ同様に動作する。 The loading unit 402 loads the shared library into the memory 222 of the accelerator 22 and links it from the calling program. The platform switching unit 404 identifies the target of the shared library and switches the function calling function of the shared library from the calling source program to its own device or another device. That is, the loading unit 402 and the platform switching unit 404 operate similarly to the loading unit 11 and the platform switching unit 12, respectively.

本実施形態によれば、アクセラレータ22のプログラムは、スタブを記述することなく、ホスト21の共有ライブラリをリンクすることができる。その理由は、動的ロード装置400のロード部402とプラットフォーム切替部404が、第1の実施形態における対応する構成とそれぞれ同様に動作するためである。 According to this embodiment, the program of the accelerator 22 can link the shared library of the host 21 without writing a stub. The reason is that the load unit 402 and the platform switching unit 404 of the dynamic load device 400 operate similarly to the corresponding configurations in the first embodiment.

[第4の実施形態]
図9は、本発明の第4の実施形態に係る計算機システム500の構成例を示すブロック図である。
[Fourth Embodiment]
FIG. 9 is a block diagram showing a configuration example of a computer system 500 according to the fourth embodiment of the present invention.

計算機システム500は、ホスト600と、ホスト600に接続されたアクセラレータ700と、を含む。 The computer system 500 includes a host 600 and an accelerator 700 connected to the host 600.

動的リンク装置10などがアクセラレータ700に含まれる場合、アクセラレータ700は、共有ライブラリをアクセラレータ700のメモリにロードし、呼び出し元のプログラムからリンクする。さらに、アクセラレータ700は、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能をアクセラレータ700またはホスト600に切り替える。つまり、アクセラレータ700は、関数呼び出しの機能を第1の情報処理装置または第2の情報処理装置に切り替える。このように、アクセラレータ700は、アクセラレータ22と同様に動作する。 When the dynamic link device 10 or the like is included in the accelerator 700, the accelerator 700 loads the shared library into the memory of the accelerator 700 and links from the calling program. Further, the accelerator 700 identifies the target of the shared library, and switches the function call function of the shared library from the calling program to the accelerator 700 or the host 600. That is, the accelerator 700 switches the function calling function to the first information processing device or the second information processing device. In this way, the accelerator 700 operates similarly to the accelerator 22.

本実施形態によれば、アクセラレータ700のプログラムは、スタブを記述することなく、ホスト600の共有ライブラリをリンクすることができる。その理由は、アクセラレータ700が、第1の実施形態のアクセラレータ22と同様に動作するためである。 According to this embodiment, the program of the accelerator 700 can link the shared library of the host 600 without writing a stub. The reason is that the accelerator 700 operates similarly to the accelerator 22 of the first embodiment.

なお、動的リンク装置10などがホスト600に含まれる場合、ホスト600は、共有ライブラリをホスト600のメモリにロードし、呼び出し元のプログラムからリンクする。さらに、ホスト600は、共有ライブラリのターゲットを識別し、呼び出し元のプログラムから共有ライブラリの関数呼び出しの機能を切り替える。この場合、ホスト600が、動的リンク装置10などと同様の機能を実現する。 When the dynamic link device 10 and the like are included in the host 600, the host 600 loads the shared library into the memory of the host 600 and links from the calling program. Further, the host 600 identifies the target of the shared library and switches the function calling function of the shared library from the calling program. In this case, the host 600 realizes the same function as the dynamic link device 10 or the like.

以上説明した各実施形態は、共有ライブラリをサポートするヘテロな計算機システム、そのオペレーティングシステム、動的リンカ、または動的ローダなどに広く適用可能である。 The embodiments described above are widely applicable to a heterogeneous computer system that supports a shared library, its operating system, a dynamic linker, a dynamic loader, and the like.

以上、各実施形態を用いて本発明を説明したが、本発明の技術的範囲は、上記各実施形態の記載に限定されない。上記各実施形態に多様な変更又は改良を加えることが可能であることは当業者にとって自明である。従って、そのような変更又は改良を加えた形態もまた本発明の技術的範囲に含まれることは説明するまでもない。また、以上説明した各実施形態において使用される、数値や各構成の名称等は例示的なものであり適宜変更可能である。また、図面中の矢印の方向は、一例を示すものであり、ブロック間の信号の向きを限定するものではない。 Although the present invention has been described above using each embodiment, the technical scope of the present invention is not limited to the description of each embodiment. It is obvious to those skilled in the art that various changes or improvements can be added to each of the above embodiments. Therefore, it is needless to say that a mode in which such changes or improvements are made is also included in the technical scope of the present invention. Further, the numerical values, the names of the components, and the like used in each of the embodiments described above are merely examples, and can be changed as appropriate. Further, the directions of the arrows in the drawings show an example, and do not limit the direction of signals between blocks.

3 メモリ空間
5 メモリ空間
10 動的リンク装置
11 ロード部
12 プラットフォーム切替部
20 計算機システム
21 ホスト
22 アクセラレータ
23 I/Oインタフェース
211−1〜211−n プロセッサ
212 メモリ
213 ディスク装置
221 プロセッサ
222 メモリ
300 動的リンク装置
302 ロード部
304 プラットフォーム切替部
400 動的ロード装置
402 ロード部
404 プラットフォーム切替部
500 計算機システム
600 ホスト
700 アクセラレータ
3 Memory Space 5 Memory Space 10 Dynamic Link Device 11 Loading Unit 12 Platform Switching Unit 20 Computer System 21 Host 22 Accelerator 23 I/O Interface 211-1 to 211-n Processor 212 Memory 213 Disk Device 221 Processor 222 Memory 300 Dynamic Link device 302 Loading unit 304 Platform switching unit 400 Dynamic loading device 402 Loading unit 404 Platform switching unit 500 Computer system 600 Host 700 Accelerator

Claims (8)

共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクするロード手段と、
前記共有ライブラリのターゲットを識別し、呼び出し元の前記プログラムから前記共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替えるプラットフォーム切替手段と
を備える動的リンク装置。
Load means that loads the shared library into the memory of the device itself and links from the calling program,
And a platform switching unit that identifies a target of the shared library and switches the function calling function of the shared library from the calling source program to its own device or another device.
前記プラットフォーム切替手段は、前記共有ライブラリの前記ターゲットが自装置用である場合、ロードした前記共有ライブラリの初期化処理を実行し、GOT(Global Offset Table)を設定することで再配置を完了させる
請求項1記載の動的リンク装置。
When the target of the shared library is for its own device, the platform switching means executes initialization processing of the loaded shared library and completes relocation by setting a GOT (Global Offset Table). Item 1. The dynamic link device according to item 1.
共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクするロード手段と、
前記共有ライブラリのターゲットを識別し、呼び出し元の前記プログラムから前記共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替えるプラットフォーム切替手段と
を備える動的ロード装置。
Load means that loads the shared library into the memory of the device itself and links from the calling program,
A platform switching unit that identifies a target of the shared library and switches a function calling function of the shared library from the calling source program to its own device or another device.
第1の情報処理装置と、前記第1の情報処理装置に接続された第2の情報処理装置と、を含む計算機システムであって、
前記第1の情報処理装置は、
共有ライブラリを前記第1の情報処理装置のメモリにロードし、呼び出し元のプログラムからリンクし、
前記共有ライブラリのターゲットを識別し、呼び出し元の前記プログラムから前記共有ライブラリの関数呼び出しの機能を前記第1の情報処理装置または前記第2の情報処理装置に切り替える
計算機システム。
A computer system including a first information processing device and a second information processing device connected to the first information processing device,
The first information processing device is
The shared library is loaded into the memory of the first information processing device, linked from the calling program,
A computer system that identifies a target of the shared library and switches the function calling function of the shared library from the calling program to the first information processing apparatus or the second information processing apparatus.
共有ライブラリを自装置のメモリにロードし、
呼び出し元のプログラムからリンクし、
前記共有ライブラリのターゲットを識別し、
呼び出し元の前記プログラムから前記共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える
動的リンク方法。
Load the shared library into the memory of your device,
Link from the calling program,
Identify the target of the shared library,
A dynamic linking method for switching the function call function of the shared library from the calling program to its own device or another device.
共有ライブラリを自装置のメモリにロードし、
呼び出し元のプログラムからリンクし、
前記共有ライブラリのターゲットを識別し、
呼び出し元の前記プログラムから前記共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える
動的ロード方法。
Load the shared library into the memory of your device,
Link from the calling program,
Identify the target of the shared library,
A dynamic loading method in which the function of function call of the shared library is switched from the calling program to its own device or another device.
共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクする機能と、
前記共有ライブラリのターゲットを識別し、呼び出し元の前記プログラムから前記共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える機能と
をコンピュータに実行させる動的リンクプログラム。
A function to load the shared library into the memory of the device itself and link from the calling program,
A dynamic link program that causes a computer to execute a function of identifying a target of the shared library and switching a function calling function of the shared library from the calling source program to its own device or another device.
共有ライブラリを自装置のメモリにロードし、呼び出し元のプログラムからリンクする機能と、
前記共有ライブラリのターゲットを識別し、呼び出し元の前記プログラムから前記共有ライブラリの関数呼び出しの機能を自装置または他の装置に切り替える機能と
をコンピュータに実行させる動的ロードプログラム。
A function to load the shared library into the memory of the device itself and link from the calling program,
A dynamic load program for causing a computer to execute a function of identifying a target of the shared library and switching a function calling function of the shared library from the calling source program to its own device or another device.
JP2019003516A 2019-01-11 2019-01-11 Dynamic link device, dynamic load device, computer system, dynamic link method, dynamic load method, dynamic link program, and dynamic load program Active JP7271957B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019003516A JP7271957B2 (en) 2019-01-11 2019-01-11 Dynamic link device, dynamic load device, computer system, dynamic link method, dynamic load method, dynamic link program, and dynamic load program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019003516A JP7271957B2 (en) 2019-01-11 2019-01-11 Dynamic link device, dynamic load device, computer system, dynamic link method, dynamic load method, dynamic link program, and dynamic load program

Publications (2)

Publication Number Publication Date
JP2020113050A true JP2020113050A (en) 2020-07-27
JP7271957B2 JP7271957B2 (en) 2023-05-12

Family

ID=71667567

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019003516A Active JP7271957B2 (en) 2019-01-11 2019-01-11 Dynamic link device, dynamic load device, computer system, dynamic link method, dynamic load method, dynamic link program, and dynamic load program

Country Status (1)

Country Link
JP (1) JP7271957B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11338704A (en) * 1998-05-25 1999-12-10 Casio Comput Co Ltd Network computer system and storage medium
JP2006048431A (en) * 2004-08-05 2006-02-16 Matsushita Electric Ind Co Ltd Dynamic link library processor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11338704A (en) * 1998-05-25 1999-12-10 Casio Comput Co Ltd Network computer system and storage medium
JP2006048431A (en) * 2004-08-05 2006-02-16 Matsushita Electric Ind Co Ltd Dynamic link library processor

Also Published As

Publication number Publication date
JP7271957B2 (en) 2023-05-12

Similar Documents

Publication Publication Date Title
US10990423B2 (en) Performance optimizations for emulators
US11733985B2 (en) Accessing a migrated member in an updated type
US7533388B1 (en) Method and apparatus for dynamic Stubs and Ties in RMI-IIOP
US8560602B2 (en) Data sharing in a stream processing system
US8695014B2 (en) Distributed function execution for hybrid systems
US20100077378A1 (en) Virtualised Application Libraries
Falkner et al. Implementing asynchronous remote method invocation in Java
JP5811088B2 (en) Data processing system and data processing method
Hall et al. Performance optimization and tuning techniques for IBM Power Systems processors including IBM POWER8
US10891214B2 (en) Transferring a debug configuration amongst carrier threads for debugging a carried thread
JP5886450B2 (en) Hybrid emulation and kernel function processing system and method
US8201185B2 (en) COM object and managed code object interoperability
JP7271957B2 (en) Dynamic link device, dynamic load device, computer system, dynamic link method, dynamic load method, dynamic link program, and dynamic load program
US20120324457A1 (en) Using compiler-generated tasks to represent programming elements
Park et al. MpiPython: A robust python MPI binding
US20130326191A1 (en) System and method for distributed computing
US11003488B2 (en) Memory-fabric-based processor context switching system
Kamil et al. Optimization of asynchronous communication operations through eager notifications
US11537457B2 (en) Low latency remoting to accelerators
US20210055971A1 (en) Method and node for managing a request for hardware acceleration by means of an accelerator device
US7908375B2 (en) Transparently externalizing plug-in computation to cluster
US10891213B2 (en) Converting between a carried thread and a carrier thread for debugging the carried thread
US11537411B1 (en) Inter-environment communication with environment isolation
JP2009512030A (en) Duplicate object graph
CN112256455A (en) Method, medium and electronic device for optimizing transaction remote procedure call

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20211015

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221006

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221011

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221208

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230328

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230410

R151 Written notification of patent or utility model registration

Ref document number: 7271957

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151