JP5381242B2 - Multiprocessor system and control program - Google Patents

Multiprocessor system and control program Download PDF

Info

Publication number
JP5381242B2
JP5381242B2 JP2009085606A JP2009085606A JP5381242B2 JP 5381242 B2 JP5381242 B2 JP 5381242B2 JP 2009085606 A JP2009085606 A JP 2009085606A JP 2009085606 A JP2009085606 A JP 2009085606A JP 5381242 B2 JP5381242 B2 JP 5381242B2
Authority
JP
Japan
Prior art keywords
system call
application
socket
kernel
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2009085606A
Other languages
Japanese (ja)
Other versions
JP2010237977A (en
Inventor
康司 黒川
弓子 緒方
大輔 浪平
一峰 的場
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2009085606A priority Critical patent/JP5381242B2/en
Publication of JP2010237977A publication Critical patent/JP2010237977A/en
Application granted granted Critical
Publication of JP5381242B2 publication Critical patent/JP5381242B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Description

本発明は、マルチプロセッサ環境を有するネットワーク(Network:以下、NWと称す)機器における、一のプロセッサによる処理の負荷分散を目的としたプロセッサ間通信を可能にするマルチプロセッサシステム及び制御プログラムに関する。 The present invention relates to a multiprocessor system and a control program that enable interprocessor communication for the purpose of load distribution of processing by one processor in a network (Network: hereinafter referred to as NW) device having a multiprocessor environment.

近年、サーバ等のNW機器における、中継処理、セキュリティ処理及び認証処理の複雑化に伴い、NW機器に搭載されるプロセッサの負荷が増大しており、マルチプロセッサ化による負荷分散技術が求められている。
マルチプロセッサ環境において負荷分散を行う仕組みとしては、例えば、図8及び図9に示すような3つの仕組みが一般的である。
In recent years, with increasing complexity of relay processing, security processing, and authentication processing in NW devices such as servers, the load on the processor mounted on the NW device has increased, and a load distribution technique using multiprocessors has been demanded. .
As a mechanism for performing load distribution in a multiprocessor environment, for example, three mechanisms as shown in FIGS. 8 and 9 are common.

第1に、図8(a)に示すように、ネットワーク経由で、汎用プロトコルを実装した複数のNW機器(サーバA,サーバB)を接続して、各NW機器に搭載されるプロセッサ(プロセッサA,プロセッサB)間のデータの送受信を行う仕組みである。この場合には、TCP/IP(Transmission Control Protocol/Internet Protocol)等の汎用プロトコルを利用して、複数のネットワーク機器を相互にネットワーク接続し、複数のプロセッサで処理を分担することにより、高速化と負荷分散を行うものである。   First, as shown in FIG. 8 (a), a plurality of NW devices (server A, server B) mounted with a general-purpose protocol are connected via a network, and a processor (processor A) mounted on each NW device is connected. , Processor B). In this case, using a general-purpose protocol such as TCP / IP (Transmission Control Protocol / Internet Protocol), a plurality of network devices are connected to each other through a network, and processing is shared by a plurality of processors. Load distribution is performed.

第2に、図8(b)に示すように、ネットワーク経由で、独自プロトコルを実装した複数のNW機器(サーバA,サーバB)を接続して、各NW機器に搭載されるプロセッサ(プロセッサA,プロセッサB)間のデータの送受信を行う仕組みである。この場合には、独自のプロトコルを利用して、複数のNW機器を相互にネットワーク接続し、複数のプロセッサで処理を分担することにより、高速化と負荷分散を行うものである。   Second, as shown in FIG. 8 (b), a plurality of NW devices (server A, server B) mounted with a unique protocol are connected via a network, and a processor (processor A) mounted on each NW device is connected. , Processor B). In this case, using a unique protocol, a plurality of NW devices are connected to each other via a network, and processing is shared by a plurality of processors, thereby speeding up and distributing the load.

第3に、図8(c)に示すように、一のNW機器(サーバA)において、一のプロセッサ(プロセッサA)に対して、PCI(Peripheral Component Interconnect)バス等を介して、他のプロセッサ(プロセッサB)を搭載したアクセラレートカード等を装着する。この場合には、独自のドライバ及びプロトコルを各プロセッサに実装して、複数のプロセッサで処理を分担することにより、高速化と負荷分散を行うものである。   Third, as shown in FIG. 8C, in one NW device (server A), another processor is connected to one processor (processor A) via a PCI (Peripheral Component Interconnect) bus or the like. Insert an accelerator card or the like equipped with (Processor B). In this case, a unique driver and protocol are installed in each processor, and processing is shared by a plurality of processors, thereby speeding up and distributing the load.

しかしながら、前述した仕組みでは、ネットワーク経由であることや一般的なプロトコルを利用することによる処理時間の遅延が生じる問題点や、独自プロトコルの開発や独自プロトコルに対応するためのアプリケーションの再開発による開発コストが増大する問題点がある。
これに対し、図9(a)に示すように、ネットワークを経由せず、プロセッサ間通信の汎用のインタフェースであるソケット通信を利用する仕組みが考えられている。
However, with the mechanism described above, there is a problem that processing time is delayed due to being via a network or using a general protocol, and development by development of an original protocol or redevelopment of an application corresponding to the original protocol. There is a problem that the cost increases.
On the other hand, as shown in FIG. 9A, there is considered a mechanism that uses socket communication that is a general-purpose interface for interprocessor communication without going through a network.

なお、一のプロセッサ(プロセッサA)上で動作するサーバ側のアプリケーション及びクライアント側のアプリケーション間におけるソケット通信は、図9(b)に示すような通信に用いられるのが一般的である。すなわち、ソケット通信は、サーバアプリA及びクライアントアプリB間のようなネットワークを経由した他のサーバ又はホスト等を介した通信や、クライアントアプリC及びサーバアプリD間のような同一のサーバ又はホスト上での通信に用いられる。   Note that socket communication between a server-side application and a client-side application operating on one processor (processor A) is generally used for communication as shown in FIG. 9B. That is, the socket communication is performed on the same server or host between the client application C and the server application D, or between the server application A and the client application B via another server or host via the network. Used for communication in

また、従来のシングルプロセッサ向けOSによる並列処理システムにおけるプロセッサ間通信システムは、マルチプロセッサ上でシングルプロセッサ向けOS及び既存のアプリケーションを動作させる。そして、アプリケーションに対してマルチプロセッサによる並列処理を実現するシングルプロセッサ向けOSによる並列処理システム上で、各プロセッサに、プロセッサ間にまたがるタスクどうしのデータ転送を代理で行う通信代理手段を備える(例えば、特許文献1参照)。なお、この従来の並列処理システムは、自プロセッサ内のみで通信可能なプロセス間通信方式として、UNIX(登録商標)(R)ドメインソケットを主に記述しており、TCP/IPのINETドメインについては、一部に記述があるのみで、詳細に開示したものではない。   In addition, an inter-processor communication system in a conventional parallel processing system using a single-processor OS operates a single-processor OS and existing applications on a multiprocessor. Then, on a parallel processing system using a single processor OS that realizes parallel processing by a multiprocessor for an application, each processor is provided with a communication proxy means that performs data transfer between tasks between the processors as a proxy (for example, Patent Document 1). This conventional parallel processing system mainly describes a UNIX (R) domain socket as an inter-process communication method capable of communicating only within its own processor. Regarding the TCP / IP INET domain, It is only partly described and not disclosed in detail.

特開2005−267118号公報Japanese Patent Laying-Open No. 2005-267118

ここで、ソケット通信においては、プロセッサ上で動作するアプリケーションから発行されるソケット関連のシステムコールが、当該プロセッサのカーネルで処理されることが前提であり、他のプロセッサのカーネルで処理させることができない。このため、例えば、図9(b)に示すように、一のプロセッサA上で動作するクライアントアプリEと、プロセッサAを搭載したNW機器の外部にある他のプロセッサB上で動作するサーバアプリGとの間のソケット通信ができないという課題がある。同様に、一のプロセッサA上で動作するサーバアプリFと、プロセッサAを搭載したNW機器の外部にある他のプロセッサB上で動作するサーバアプリHとの間のソケット通信ができないという課題がある。   Here, socket communication is based on the premise that a system call related to a socket issued from an application running on a processor is processed by the kernel of the processor, and cannot be processed by a kernel of another processor. . Therefore, for example, as shown in FIG. 9B, a client application E that operates on one processor A and a server application G that operates on another processor B outside the NW device in which the processor A is installed. There is a problem that socket communication cannot be performed. Similarly, there is a problem that socket communication cannot be performed between the server application F that operates on one processor A and the server application H that operates on another processor B outside the NW device in which the processor A is mounted. .

マルチプロセッサシステムは、一のプロセッサが、ポート番号及びIPアドレスに基づき、一のプロセッサ又は他のプロセッサにおける、当該システムコールの宛先となるカーネルを判別する条件を格納する判別条件格納部を備える。また、一のプロセッサは、アプリケーションからのsocketシステムコールを保持するシステムコール保持部を備える。また、一のプロセッサは、アプリケーションからのsocketシステムコールに対して、ソケットの識別子であるディスクリプタ番号に相当する仮ディスクリプタ番号を生成し、当該仮ディスクリプタ番号を当該アプリケーションに返信する仮ディスクリプタ番号発行部を備えている。また、一のプロセッサは、アプリケーションからのシステムコールに指定されるIPアドレス及びポート番号、並びに判別条件格納部に格納される判別条件に基づき、当該システムコールの宛先となるカーネルを特定し、システムコール保持部に保持されるシステムコールを当該カーネルに送信するシステムコール再発行部を備えている。また、一のプロセッサは、socketシステムコールを受信したカーネルから返信されるディスクリプタ番号、仮ディスクリプタ番号、及び当該socketシステムコールの宛先として特定されたカーネルを識別する宛先フラグを対応付けて格納する管理テーブル格納部を備えている。また、一のプロセッサは、アプリケーションからのシステムコールに指定される仮ディスクリプタ番号に対応する宛先フラグを、管理テーブル格納部から抽出し、当該抽出した宛先フラグに基づき、当該システムコールの宛先となるカーネルに当該システムコールを送信するディスクリプタ番号変換部を備えている。 Multiprocessor system, one processor on the basis of the port number and IP address, comprising in one processor or other processor, the determination condition storing unit for storing a condition to determine the kernel as a destination of the system call. Further, the one processor includes a system call holding unit that holds a socket system call from the application. Also, in response to a socket system call from an application, one processor generates a temporary descriptor number corresponding to a descriptor number that is a socket identifier, and a temporary descriptor number issuing unit that returns the temporary descriptor number to the application. I have. In addition, the one processor identifies the kernel that is the destination of the system call based on the IP address and port number specified in the system call from the application and the determination condition stored in the determination condition storage unit, and the system call A system call reissuing unit for transmitting the system call held in the holding unit to the kernel is provided. In addition, the one processor stores a descriptor number returned from the kernel that received the socket system call, a temporary descriptor number, and a destination flag that identifies the kernel specified as the destination of the socket system call in association with each other. A storage unit is provided. Further, the one processor extracts a destination flag corresponding to the temporary descriptor number specified in the system call from the application from the management table storage unit, and based on the extracted destination flag, the kernel serving as the destination of the system call Is provided with a descriptor number conversion unit for transmitting the system call.

開示のマルチプロセッサシステムは、拡張バスを介して接続した複数のプロセッサの各アプリ間におけるシステムコールの受け渡しを可能にし、一のプロセッサに対する負荷を他のプロセッサに分散することができるという効果を奏する。 The disclosed multiprocessor system allows system calls to be transferred between applications of a plurality of processors connected via an expansion bus, and has the effect of distributing the load on one processor to other processors.

本実施形態に係るマルチプロセッサシステムを搭載したNW機器の一例を示す構成図である。It is a block diagram which shows an example of NW apparatus carrying the multiprocessor system which concerns on this embodiment. 図1に示すプロセッサのカーネルにおける独自ドライバの概略構成を示す機能ブロック図であり、(a)はサーバアプリから発行されるシステムコールに対するデータの流れを示す機能ブロック図であり、(b)はクライアントアプリから発行されるシステムコールに対するデータの流れを示す機能ブロック図である。FIG. 2 is a functional block diagram showing a schematic configuration of a unique driver in the kernel of the processor shown in FIG. 1, (a) is a functional block diagram showing a data flow for a system call issued from a server application, and (b) is a client. It is a functional block diagram which shows the flow of the data with respect to the system call issued from an application. サーバアプリから発行されるシステムコールに対する独自ドライバの処理動作を説明するためのシーケンス図である。It is a sequence diagram for demonstrating the processing operation of the original driver with respect to the system call issued from a server application. クライアントアプリから発行されるシステムコールに対する独自ドライバの処理動作を説明するためのシーケンス図である。It is a sequence diagram for demonstrating the processing operation of the original driver with respect to the system call issued from a client application. 図2に示す管理テーブル格納部における図3及び図4に対応するデータ更新の流れの一例を示す説明図である。FIG. 5 is an explanatory diagram showing an example of a data update flow corresponding to FIGS. 3 and 4 in the management table storage unit shown in FIG. 2. 図2に示す管理テーブル格納部におけるデータ更新の流れの一例を示す説明図である。It is explanatory drawing which shows an example of the flow of the data update in the management table storage part shown in FIG. 本実施形態に係るマルチプロセッサシステムによる作用効果を説明するための説明図であり、(a)は第1のプロセッサのクライアントアプリを第3のプロセッサに実装する前のNW機器の一例を示す構成図であり、(a)は第1のプロセッサのクライアントアプリを第3のプロセッサに実装した後のNW機器の一例を示す構成図である。It is explanatory drawing for demonstrating the effect by the multiprocessor system which concerns on this embodiment, (a) is a block diagram which shows an example of NW apparatus before mounting the client application of a 1st processor in a 3rd processor (A) is a block diagram showing an example of an NW device after the client application of the first processor is mounted on the third processor. (a)は従来のプロセッサの負荷分散の仕組みを説明するための説明図、(b)は従来のプロセッサの負荷分散の他の仕組みを説明するための説明図、(c)は従来のプロセッサの負荷分散のさらに他の仕組みを説明するための説明図である。(A) is explanatory drawing for demonstrating the mechanism of load distribution of the conventional processor, (b) is explanatory drawing for demonstrating the other mechanism of load distribution of the conventional processor, (c) is the explanatory drawing of the conventional processor. It is explanatory drawing for demonstrating the further another mechanism of load distribution. (a)はソケット通信を利用する仕組みを説明するための説明図、(b)は従来のプロセッサ間通信の課題を説明するための説明図である。(A) is explanatory drawing for demonstrating the mechanism using socket communication, (b) is explanatory drawing for demonstrating the subject of the communication between the conventional processors.

ここで、本発明は多くの異なる形態で実施可能である。したがって、下記の実施形態の記載内容のみで解釈すべきではない。また、実施形態の全体を通して同じ要素には同じ符号を付けている。   Here, the present invention can be implemented in many different forms. Therefore, it should not be interpreted only by the description of the following embodiment. Also, the same reference numerals are given to the same elements throughout the embodiment.

実施形態では、主にシステムについて説明するが、いわゆる当業者であれば明らかな通り、本発明はコンピュータで使用可能なプログラム、方法としても実施できる。また、本発明は、ハードウェア、ソフトウェア、又は、ソフトウェア及びハードウェアの実施形態で実施可能である。プログラムは、ハードディスク、CD-ROM、DVD-ROM、光記憶装置又は磁気記憶装置等の任意のコンピュータ可読媒体に記録できる。さらに、プログラムはネットワークを介した他のコンピュータに記録することができる。   In the embodiment, the system will be mainly described. However, as will be apparent to those skilled in the art, the present invention can also be implemented as a program and method usable on a computer. In addition, the present invention can be implemented in hardware, software, or software and hardware embodiments. The program can be recorded on any computer-readable medium such as a hard disk, CD-ROM, DVD-ROM, optical storage device, or magnetic storage device. Furthermore, the program can be recorded on another computer via a network.

(本発明の第1の実施形態)
本実施形態に係るマルチプロセッサシステムは、サーバ型のアプリケーション又はクライアント型のアプリケーションを動作させる一のプロセッサと、当該アプリケーションとのソケット通信を行うクライアント型のアプリケーション又はサーバ型のアプリケーションを動作させる他のプロセッサとを備えている。
(First embodiment of the present invention)
The multiprocessor system according to this embodiment includes one processor that operates a server-type application or a client-type application, and another processor that operates a client-type application or a server-type application that performs socket communication with the application. And.

ここで、サーバ型のアプリケーションとは、ソケット同士を接続して通信経路を確立するために、socket、bind、listen及びacceptシステムコールを発行するアプリケーションであり、以下、サーバアプリと称す。また、クライアント型のアプリケーションとは、ソケット同士を接続して通信経路を確立するために、socket及びconnectシステムコールを発行するアプリケーションであり、以下、クライアントアプリと称す。   Here, the server-type application is an application that issues socket, bind, listen, and accept system calls to connect sockets to establish a communication path, and is hereinafter referred to as a server application. A client-type application is an application that issues a socket and connect system call in order to connect sockets and establish a communication path, and is hereinafter referred to as a client application.

なお、前述した他のプロセッサは、一又は複数のプロセッサであり、以下の説明においては、図1に示すように、一のプロセッサとして、第1のプロセッサ110をNW機器100に搭載した場合を例に挙げて説明する。また、以下の説明においては、他のプロセッサとして、第2のプロセッサ210をサーバやホスト等の他のNW機器(以下、他NW機器200と称す)に搭載し、第3のプロセッサ310をプロセッサカード等の拡張カード300に搭載した場合を例に挙げて説明する。また、NW機器100と他NW機器200とは、ネットワーク400を介して接続し、NW機器100と拡張カード300とは、PCIバス等の拡張バス500を介して接続する。   The other processors described above are one or a plurality of processors, and in the following description, as shown in FIG. 1, as an example, the first processor 110 is mounted on the NW device 100 as one processor. Will be described. In the following description, as the other processor, the second processor 210 is mounted on another NW device such as a server or a host (hereinafter referred to as another NW device 200), and the third processor 310 is a processor card. A case where it is mounted on the expansion card 300 will be described as an example. The NW device 100 and the other NW device 200 are connected via the network 400, and the NW device 100 and the expansion card 300 are connected via the expansion bus 500 such as a PCI bus.

また、前述した一のプロセッサ及び他のプロセッサは、ソフトウェア部品である、後述するカーネル10と、サーバアプリ21及び/又はクライアントアプリ22を実装するユーザ20とをそれぞれ備えている。   The one processor and the other processors described above each include a kernel 10 which will be described later and a user 20 that implements the server application 21 and / or the client application 22.

なお、以下の説明においては、アプリケーションに対して、当該アプリケーションが実装されたユーザ20を備えるプロセッサ内部のカーネル10を自カーネルと称する。また、アプリケーションに対して、当該アプリケーションが実装されたユーザ20を備えるプロセッサ外部におけるソケット通信相手である他のプロセッサ内部のカーネル10を相手カーネルと称して説明する。   In the following description, for an application, the kernel 10 inside the processor including the user 20 in which the application is installed is referred to as a self-kernel. Further, for the application, the kernel 10 inside another processor which is a socket communication partner outside the processor including the user 20 in which the application is mounted will be referred to as a partner kernel.

ここで、カーネル10とは、OS(Operating System)の基本機能を実装したソフトウェアであり、アプリケーションソフトや周辺機器の監視、ディスクやメモリ等の資源の管理、割りこみ処理又はプロセス間通信等、OSとしての基本機能を提供する。特に、カーネル10は、追加機能や周辺機器の制御ソフトウェア(ドライバ)等をモジュール化して、後から追加できるようになっている。   Here, the kernel 10 is software that implements the basic functions of an OS (Operating System), such as monitoring of application software and peripheral devices, management of resources such as disks and memories, interrupt processing or inter-process communication, etc. As a basic function. In particular, the kernel 10 can modularize additional functions and control software (drivers) for peripheral devices and add them later.

カーネル10は、後述する独自ドライバ11及びソケットインタフェース(interface:以下、I/Fと称す)12が実装され、必要に応じて、I/Fドライバ13及び/又はネットワークカード(Network Interface Card:NIC)等のネットワークI/F14が実装される。   The kernel 10 is mounted with a unique driver 11 and a socket interface (hereinafter referred to as I / F) 12 described later, and an I / F driver 13 and / or a network card (NIC) as required. The network I / F 14 is installed.

図2において、独自ドライバ11は、後述するサーバアプリ側送受信部1、クライアントアプリ側送受信部2、判別条件格納部3、システムコール保持部4、仮ディスクリプタ番号発行部5、システムコール再発行部6、管理テーブル格納部7及びディスクリプタ番号変換部8を備えている。   2, the unique driver 11 includes a server application side transmission / reception unit 1, a client application side transmission / reception unit 2, a determination condition storage unit 3, a system call holding unit 4, a temporary descriptor number issuing unit 5, and a system call reissuing unit 6. A management table storage unit 7 and a descriptor number conversion unit 8.

図2(a)において、サーバアプリ側送受信部1は、サーバアプリ21から送信されるシステムコールを受信し、システムコールの種別に応じて、仮ディスクリプタ番号発行部5、システムコール再発行部6又はディスクリプタ番号変換部8にシステムコールを出力する。すなわち、サーバアプリ側送受信部1は、socketシステムコールを仮ディスクリプタ番号発行部5に出力し、bindシステムコールをシステムコール再発行部6に出力し、listen、accept、send、recv、shutdown及びcloseシステムコールをディスクリプタ番号変換部8に出力する。   In FIG. 2A, the server application side transmitting / receiving unit 1 receives a system call transmitted from the server application 21, and depending on the type of the system call, the temporary descriptor number issuing unit 5, the system call reissuing unit 6 or A system call is output to the descriptor number conversion unit 8. That is, the server application side transmitting / receiving unit 1 outputs a socket system call to the temporary descriptor number issuing unit 5, outputs a bind system call to the system call reissuing unit 6, and listen, accept, send, recv, shutdown, and close systems. The call is output to the descriptor number conversion unit 8.

また、サーバアプリ側送受信部1は、仮ディスクリプタ番号発行部5から入力される、ソケットの識別子(identification:ID)であるディスクリプタ番号に相当する仮ディスクリプタ番号を、サーバアプリ21に送信する。   Further, the server application-side transmitting / receiving unit 1 transmits a temporary descriptor number corresponding to a descriptor number, which is a socket identifier (ID), input from the temporary descriptor number issuing unit 5 to the server application 21.

ここで、ディスクリプタ番号とは、ソケットの生成時に、カーネル10により割り当てられるソケットのIDに相当するものであり、アプリケーションは、カーネル10から通知されるディスクリプタ番号を指定して、アクセスしたいソケットを指定する。   Here, the descriptor number corresponds to the ID of the socket assigned by the kernel 10 when the socket is generated, and the application designates the socket to be accessed by designating the descriptor number notified from the kernel 10. .

さらに、図2(b)において、サーバアプリ側送受信部1は、システムコール再発行部6から入力されるsocket及びconnectシステムコールを、サーバアプリ21側のカーネル10に送信する。また、サーバアプリ側送受信部1は、ディスクリプタ番号変換部8から入力されるsend、recv、shutdown及びcloseシステムコールを、サーバアプリ21側のカーネル10に送信する。
また、サーバアプリ側送受信部1は、サーバアプリ21側のカーネル10から送信されるディスクリプタ番号を受信し、ディスクリプタ番号変換部8に出力する。
Further, in FIG. 2B, the server application side transmitting / receiving unit 1 transmits the socket and connect system call input from the system call reissuing unit 6 to the kernel 10 on the server application 21 side. Further, the server application side transmitting / receiving unit 1 transmits the send, recv, shutdown, and close system calls input from the descriptor number conversion unit 8 to the kernel 10 on the server application 21 side.
Further, the server application side transmitting / receiving unit 1 receives the descriptor number transmitted from the kernel 10 on the server application 21 side and outputs the descriptor number to the descriptor number converting unit 8.

図2(b)において、クライアントアプリ側送受信部2は、クライアントアプリ22から送信されるシステムコールを受信し、システムコールの種別に応じて、仮ディスクリプタ番号発行部5、システムコール再発行部6又はディスクリプタ番号変換部8にシステムコールを出力する。すなわち、クライアントアプリ側送受信部2は、socketシステムコールを仮ディスクリプタ番号発行部5に出力し、connectシステムコールをシステムコール再発行部6に出力し、send、recv、shutdown及びcloseシステムコールをディスクリプタ番号変換部8に出力する。
また、クライアントアプリ側送受信部2は、仮ディスクリプタ番号発行部5から入力される仮ディスクリプタ番号を、クライアントアプリ22に送信する。
In FIG. 2B, the client application side transmitting / receiving unit 2 receives the system call transmitted from the client application 22, and depending on the type of the system call, the temporary descriptor number issuing unit 5, the system call reissuing unit 6 or A system call is output to the descriptor number conversion unit 8. In other words, the client application side transmitting / receiving unit 2 outputs a socket system call to the temporary descriptor number issuing unit 5, outputs a connect system call to the system call reissuing unit 6, and sends send, recv, shutdown, and close system calls to the descriptor number. Output to the converter 8.
Further, the client application side transmitting / receiving unit 2 transmits the temporary descriptor number input from the temporary descriptor number issuing unit 5 to the client application 22.

さらに、図2(a)において、クライアントアプリ側送受信部2は、システムコール再発行部6から入力されるsocket及びbindシステムコールを、クライアントアプリ22側のカーネル10に送信する。また、クライアントアプリ側送受信部2は、ディスクリプタ番号変換部8から入力されるlisten、accept、send、recv、shutdown及びcloseシステムコールを、クライアントアプリ22側のカーネル10に送信する。
また、クライアントアプリ側送受信部2は、クライアントアプリ22側のカーネル10から送信されるディスクリプタ番号を受信し、ディスクリプタ番号変換部8に出力する。
Further, in FIG. 2A, the client application side transmitting / receiving unit 2 transmits the socket and bind system call input from the system call reissuing unit 6 to the kernel 10 on the client application 22 side. In addition, the client application side transmission / reception unit 2 transmits the listen, accept, send, recv, shutdown, and close system calls input from the descriptor number conversion unit 8 to the kernel 10 on the client application 22 side.
Further, the client application side transmitting / receiving unit 2 receives the descriptor number transmitted from the kernel 10 on the client application 22 side and outputs the descriptor number to the descriptor number converting unit 8.

判別条件格納部3は、bindシステムコールの送信元であるサーバアプリ21におけるポート番号、及び当該アプリを動作させるプロセッサにおけるIPアドレスに基づき、当該システムコールの宛先となるカーネル10を判別する条件を格納する。また、判別条件格納部3は、connectシステムコールの送信元であるクライアントアプリ22におけるポート番号、及び当該アプリを動作させるプロセッサにおけるIPアドレスに基づき、当該システムコールの宛先となるカーネル10を判別する条件を格納する。   The determination condition storage unit 3 stores conditions for determining the kernel 10 that is the destination of the system call based on the port number in the server application 21 that is the transmission source of the bind system call and the IP address in the processor that operates the application. To do. Further, the determination condition storage unit 3 determines the kernel 10 that is the destination of the system call based on the port number in the client application 22 that is the transmission source of the connect system call and the IP address in the processor that operates the application. Is stored.

システムコール保持部4は、サーバアプリ21又はクライアントアプリ22からのsocketシステムコールを保持する。また、システムコール保持部4は、サーバアプリ21からのbind又はクライアントアプリ22からのconnectシステムコール、及び当該bind又はconnectシステムコールの前に発行されるシステムコールを保持する。   The system call holding unit 4 holds a socket system call from the server application 21 or the client application 22. The system call holding unit 4 holds a bind system call from the server application 21 or a connect system call from the client application 22, and a system call issued before the bind or connect system call.

仮ディスクリプタ番号発行部5は、サーバアプリ21又はクライアントアプリ22からのsocketシステムコールに対して、ディスクリプタ番号に相当する仮ディスクリプタ番号を生成する。また、仮ディスクリプタ番号発行部5は、生成した仮ディスクリプタ番号を、socketシステムコールを送信したサーバアプリ21又はクライアントアプリ22に返信する。また、仮ディスクリプタ番号発行部5は、生成した仮ディスクリプタ番号を管理テーブル格納部7に格納する。   The temporary descriptor number issuing unit 5 generates a temporary descriptor number corresponding to the descriptor number in response to a socket system call from the server application 21 or the client application 22. Further, the temporary descriptor number issuing unit 5 returns the generated temporary descriptor number to the server application 21 or the client application 22 that has transmitted the socket system call. The temporary descriptor number issuing unit 5 stores the generated temporary descriptor number in the management table storage unit 7.

なお、仮ディスクリプタ番号発行部5は、管理テーブル格納部7に格納されている仮ディスクリプタ番号が重複しないように、仮ディスクリプタ番号を割り当てる。これにより、自カーネル10及び相手カーネル10により重複したディスクリプタ番号が割り当てられ、管理テーブル格納部7に格納された場合であっても、システムコール再発行部6が、異なる仮ディスクリプタ番号により、システムコールの宛先を一意に特定することができる。   The temporary descriptor number issuing unit 5 assigns temporary descriptor numbers so that the temporary descriptor numbers stored in the management table storage unit 7 do not overlap. As a result, even if the same descriptor number is assigned by the own kernel 10 and the partner kernel 10 and stored in the management table storage unit 7, the system call reissue unit 6 uses the different temporary descriptor numbers to Can be uniquely identified.

システムコール再発行部6は、サーバアプリ21からのbindシステムコールに指定されるIPアドレス及びポート番号、並びに判別条件格納部3に格納される判別条件に基づき、当該システムコールの宛先となるカーネル10を特定する。また、システムコール再発行部6は、クライアントアプリ22からのconnectシステムコールに指定されるIPアドレス及びポート番号、並びに判別条件格納部3に格納される判別条件に基づき、当該システムコールの宛先となるカーネル10を特定する。また、システムコール再発行部6は、特定したカーネル10に、システムコール保持部4に保持されるシステムコールを送信する。また、システムコール再発行部6は、システムコール保持部4に保持されるsocketシステムコール以外のシステムコールを、ディスクリプタ番号を指定して、特定したカーネル10に送信する。   Based on the IP address and port number specified in the bind system call from the server application 21 and the discrimination condition stored in the discrimination condition storage unit 3, the system call reissue unit 6 is the kernel 10 that is the destination of the system call. Is identified. Further, the system call reissue unit 6 becomes a destination of the system call based on the IP address and port number specified in the connect system call from the client application 22 and the determination condition stored in the determination condition storage unit 3. The kernel 10 is specified. Further, the system call reissue unit 6 transmits the system call held in the system call holding unit 4 to the identified kernel 10. Further, the system call reissue unit 6 transmits a system call other than the socket system call held in the system call holding unit 4 to the specified kernel 10 by specifying a descriptor number.

管理テーブル格納部7は、socketシステムコールを受信したカーネル10から返信されるディスクリプタ番号、当該socketシステムコールに対して生成された仮ディスクリプタ番号、及び当該socketシステムコールの宛先として特定されたカーネル10を識別する宛先フラグを対応付けて格納する。なお、宛先フラグとしては、例えば、自カーネル10を「0」とし、相手カーネル10を「1」とすることが考えられる。   The management table storage unit 7 uses the descriptor number returned from the kernel 10 that received the socket system call, the temporary descriptor number generated for the socket system call, and the kernel 10 specified as the destination of the socket system call. A destination flag to be identified is stored in association with each other. As the destination flag, for example, the own kernel 10 may be set to “0” and the counterpart kernel 10 may be set to “1”.

ディスクリプタ番号変換部8は、サーバアプリ21からのlisten、accept、send、recv、shutdown又はcloseシステムコールに指定される仮ディスクリプタ番号に対応する宛先フラグを、管理テーブル格納部7から抽出する。また、ディスクリプタ番号変換部8は、クライアントアプリ22からのsend、recv、shutdown又はcloseシステムコールに指定される仮ディスクリプタ番号に対応する宛先フラグを、管理テーブル格納部7から抽出する。また、ディスクリプタ番号変換部8は、抽出した宛先フラグに基づき、当該システムコールの宛先となるカーネル10に当該システムコールを送信する。   The descriptor number conversion unit 8 extracts a destination flag corresponding to the temporary descriptor number specified in the listen, accept, send, recv, shutdown, or close system call from the server application 21 from the management table storage unit 7. Further, the descriptor number conversion unit 8 extracts a destination flag corresponding to the temporary descriptor number designated by the send, recv, shutdown, or close system call from the client application 22 from the management table storage unit 7. Further, the descriptor number conversion unit 8 transmits the system call to the kernel 10 that is the destination of the system call based on the extracted destination flag.

つぎに、本実施形態に係るマルチプロセッサシステムにおける処理動作について説明する。
まず、サーバアプリ21が発行するシステムコールに対する独自ドライバ11の処理動作を、図2(a)、図3及び図5(a)〜(c)を用いて説明する。
Next, processing operations in the multiprocessor system according to the present embodiment will be described.
First, the processing operation of the unique driver 11 for the system call issued by the server application 21 will be described with reference to FIGS. 2A, 3 and 5A to 5C.

サーバアプリ21は、自カーネル10に対して、クライアントアプリ22の接続を受け付けるソケットの生成を要求するためのsocketシステムコールを発行する(ステップS1)。   The server application 21 issues a socket system call for requesting generation of a socket for accepting connection of the client application 22 to the own kernel 10 (step S1).

自カーネル10における独自ドライバ11のサーバアプリ側送受信部1は、socketシステムコールを受信すると、仮ディスクリプタ番号発行部5にsocketシステムコールを出力する。   When the server application side transmitting / receiving unit 1 of the unique driver 11 in the own kernel 10 receives the socket system call, it outputs the socket system call to the temporary descriptor number issuing unit 5.

仮ディスクリプタ番号発行部5は、socketシステムコールが入力されると、ソケットの識別子であるディスクリプタ番号に相当する仮ディスクリプタ番号を生成する(ステップS2)。   When the socket system call is input, the temporary descriptor number issuing unit 5 generates a temporary descriptor number corresponding to the descriptor number that is the identifier of the socket (step S2).

そして、仮ディスクリプタ番号発行部5は、生成した仮ディスクリプタ番号を、管理テーブル格納部7に対して、新規に登録する(ステップS3、図5(a))。なお、図5(a)においては、仮ディスクリプタ番号として、「10」を登録した場合を、一例として示している。   Then, the temporary descriptor number issuing unit 5 newly registers the generated temporary descriptor number in the management table storage unit 7 (step S3, FIG. 5A). In FIG. 5A, the case where “10” is registered as the temporary descriptor number is shown as an example.

また、仮ディスクリプタ番号発行部5は、生成した仮ディスクリプタ番号を、サーバアプリ側送受信部1に出力し、サーバアプリ側送受信部1は、socketシステムコールを送信したサーバアプリ21に仮ディスクリプタ番号を返信する(ステップS4)。なお、仮ディスクリプタ番号発行部5は、socketシステムコールをシステムコール保持部4に出力し、システムコール保持部4は、socketシステムコールを一時的に保持する。   The temporary descriptor number issuing unit 5 outputs the generated temporary descriptor number to the server application side transmission / reception unit 1, and the server application side transmission / reception unit 1 returns the temporary descriptor number to the server application 21 that transmitted the socket system call. (Step S4). The temporary descriptor number issuing unit 5 outputs the socket system call to the system call holding unit 4, and the system call holding unit 4 temporarily holds the socket system call.

サーバアプリ21は、自カーネル10に対して、自身に設定されたソケット通信用のポート番号、及び自身を動作させるプロセッサにおけるIPアドレスを、ソケットに設定するためのbindシステムコールを発行する。このとき、サーバアプリ21は、ソケットを指定するための仮ディスクリプタ番号を指定して、bindシステムコールを発行する(ステップS5)。   The server application 21 issues a bind system call for setting the socket communication port number set for itself and the IP address of the processor that operates the server application 21 to the socket. At this time, the server application 21 designates a temporary descriptor number for designating a socket and issues a bind system call (step S5).

なお、サーバアプリ21は、一般的には、socketシステムコールに対するディスクリプタ番号(仮ディスクリプタ番号)を受信した後に、他のシステムコールを発行することなく、bindシステムコールが発行される。しかしながら、アプリケーションのオプション設定によっては、socketシステムコールとbindシステムコールとの間に、他のシステムコールが発行される場合がある(ステップS4a)。この場合には、サーバアプリ側送受信部1は、他のシステムコールを受信すると、システムコール再発行部6を介して、システムコール保持部4に他のシステムコールを出力する。そして、システムコール保持部4は、他のシステムコールを一時的に保持し(ステップS4b)、サーバアプリ21に適当な返り値を返すことになる(ステップS4c)。   In general, after receiving the descriptor number (temporary descriptor number) for the socket system call, the server application 21 issues a bind system call without issuing another system call. However, depending on the option setting of the application, another system call may be issued between the socket system call and the bind system call (step S4a). In this case, when the server application side transmitting / receiving unit 1 receives another system call, the server application side transmitting / receiving unit 1 outputs the other system call to the system call holding unit 4 via the system call reissuing unit 6. The system call holding unit 4 temporarily holds other system calls (step S4b), and returns an appropriate return value to the server application 21 (step S4c).

サーバアプリ側送受信部1は、bindシステムコールを受信すると、システムコール再発行部6にbindシステムコールを出力する。
システムコール再発行部6は、bindシステムコールが入力されると、bindシステムコールに指定されるIPアドレス及びポート番号に基づき、判別条件格納部3を参照し、当該システムコールの宛先となるカーネル10を特定する(ステップS6)。
When receiving the bind system call, the server application side transmitting / receiving unit 1 outputs the bind system call to the system call reissuing unit 6.
When a bind system call is input, the system call reissue unit 6 refers to the determination condition storage unit 3 based on the IP address and port number specified in the bind system call, and the kernel 10 serving as the destination of the system call. Is specified (step S6).

そして、システムコール再発行部6は、前述したステップS3で登録した仮ディスクリプタ番号に対応させて、特定したカーネル10を管理テーブル格納部7に登録する(ステップS7、図5(b))。なお、図5(b)においては、宛先フラグとして、「1」(相手カーネル10)を登録した場合を、一例として示している。   Then, the system call reissue unit 6 registers the identified kernel 10 in the management table storage unit 7 in association with the temporary descriptor number registered in step S3 described above (step S7, FIG. 5B). In FIG. 5B, the case where “1” (partner kernel 10) is registered as the destination flag is shown as an example.

また、システムコール再発行部6は、システムコール保持部4に保持しているsocketシステムコールを抽出し、特定したカーネル10の情報と共に、クライアントアプリ側送受信部2に出力する。そして、クライアントアプリ側送受信部2は、特定したカーネル10にsocketシステムコールを送信する(ステップS8)。なお、システムコール再発行部6は、システムコール保持部4にbindシステムコールを出力し、システムコール保持部4はbindシステムコールを一時的に保持する。   Further, the system call reissuing unit 6 extracts the socket system call held in the system call holding unit 4 and outputs it to the client application side transmitting / receiving unit 2 together with the specified information of the kernel 10. Then, the client application side transmitting / receiving unit 2 transmits a socket system call to the identified kernel 10 (step S8). The system call reissue unit 6 outputs a bind system call to the system call holding unit 4, and the system call holding unit 4 temporarily holds the bind system call.

そして、クライアントアプリ側送受信部2は、socketシステムコールに対して、クライアントアプリ22側のカーネル10から送信されるディスクリプタ番号を受信し、ディスクリプタ番号変換部8に出力する(ステップS9)。   In response to the socket system call, the client application side transmitting / receiving unit 2 receives the descriptor number transmitted from the kernel 10 on the client application 22 side, and outputs the descriptor number to the descriptor number conversion unit 8 (step S9).

ディスクリプタ番号変換部8は、クライアントアプリ22からのディスクリプタ番号が入力されると、前述したステップS3で登録した仮ディスクリプタ番号に対応させて、ディスクリプタ番号を管理テーブル格納部7に登録する(ステップS10、図5(c))。なお、図5(c)においては、ディスクリプタ番号として、「50」を登録した場合を、一例として示している。   When the descriptor number from the client application 22 is input, the descriptor number conversion unit 8 registers the descriptor number in the management table storage unit 7 in association with the temporary descriptor number registered in step S3 described above (step S10, FIG. 5 (c)). In FIG. 5C, the case where “50” is registered as the descriptor number is shown as an example.

そして、システムコール再発行部6は、システムコール保持部4に保持しているbindシステムコールを抽出し、ステップS10で登録されたディスクリプタ番号に対応するカーネル10の情報と共に、クライアントアプリ側送受信部2に出力する。そして、クライアントアプリ側送受信部2は、ディスクリプタ番号を指定して、対応するカーネル10にbindシステムコールを送信する(ステップS11)。   Then, the system call reissuing unit 6 extracts the bind system call held in the system call holding unit 4, and together with the information of the kernel 10 corresponding to the descriptor number registered in step S10, the client application side transmitting / receiving unit 2 Output to. Then, the client application side transmitting / receiving unit 2 specifies a descriptor number and transmits a bind system call to the corresponding kernel 10 (step S11).

なお、前述したステップS4bにおいて、システムコール保持部4が他のシステムコールを保持しているのであれば、システムコール保持部4に保持される他のシステムコールを、ディスクリプタ番号を指定して、対応するカーネル10に送信する(ステップS10a)。   In step S4b described above, if the system call holding unit 4 holds another system call, the other system call held in the system call holding unit 4 can be handled by specifying the descriptor number. Is transmitted to the kernel 10 (step S10a).

そして、サーバアプリ21は、自カーネル10に対して、複数のクライアントアプリ22の接続を受けるための待ち行列であるソケット・キューを作成するためのlistenシステムコールを発行する。このとき、サーバアプリ21は、ソケットを指定するための仮ディスクリプタ番号を指定して、listenシステムコールを発行する(ステップS12)。
サーバアプリ側送受信部1は、listenシステムコールを受信すると、ディスクリプタ番号変換部8にlistenシステムコールを出力する。
Then, the server application 21 issues a listen system call for creating a socket queue that is a queue for receiving connections of a plurality of client applications 22 to the own kernel 10. At this time, the server application 21 issues a listen system call by designating a temporary descriptor number for designating a socket (step S12).
When receiving the listen system call, the server application side transmitting / receiving unit 1 outputs the listen system call to the descriptor number conversion unit 8.

ディスクリプタ番号変換部8は、listenシステムコールが入力されると、listenシステムコールに指定される仮ディスクリプタ番号に基づき、管理テーブル格納部7を参照し、当該システムコールの宛先となるカーネル10の情報と、対応するディスクリプタ番号を抽出する。   When a listen system call is input, the descriptor number conversion unit 8 refers to the management table storage unit 7 based on the temporary descriptor number specified in the listen system call, and information on the kernel 10 serving as the destination of the system call. , The corresponding descriptor number is extracted.

また、ディスクリプタ番号変換部8は、抽出したカーネル10の情報及びディスクリプタ番号と共に、listenシステムコールをクライアントアプリ側送受信部2に出力する。そして、クライアントアプリ側送受信部2は、ディスクリプタ番号を指定して、対応するカーネル10にlistenシステムコールを送信する(ステップS13)。   Further, the descriptor number conversion unit 8 outputs a listen system call to the client application side transmission / reception unit 2 together with the extracted information of the kernel 10 and the descriptor number. Then, the client application side transmitting / receiving unit 2 specifies a descriptor number and transmits a listen system call to the corresponding kernel 10 (step S13).

そして、サーバアプリ21は、自カーネル10に対して、ソケットにクライアントアプリ22が接続してくるのを待つためのacceptシステムコールを発行する。このとき、サーバアプリ21は、ソケットを指定するための仮ディスクリプタ番号を指定して、acceptシステムコールを発行する(ステップS14)。
サーバアプリ側送受信部1は、acceptシステムコールを受信すると、ディスクリプタ番号変換部8にacceptシステムコールを出力する。
Then, the server application 21 issues an accept system call for waiting for the client application 22 to connect to the socket with respect to the own kernel 10. At this time, the server application 21 designates a temporary descriptor number for designating a socket and issues an accept system call (step S14).
When receiving the accept system call, the server application side transmitting / receiving unit 1 outputs the accept system call to the descriptor number converting unit 8.

ディスクリプタ番号変換部8は、acceptシステムコールが入力されると、acceptシステムコールに指定される仮ディスクリプタ番号に基づき、管理テーブル格納部7を参照し、当該システムコールの宛先となるカーネル10の情報と、対応するディスクリプタ番号を抽出する。   When an accept system call is input, the descriptor number conversion unit 8 refers to the management table storage unit 7 based on the temporary descriptor number specified in the accept system call, and information on the kernel 10 that is the destination of the system call. , The corresponding descriptor number is extracted.

また、ディスクリプタ番号変換部8は、抽出したカーネル10の情報及びディスクリプタ番号と共に、acceptシステムコールをクライアントアプリ側送受信部2に出力する。そして、クライアントアプリ側送受信部2は、ディスクリプタ番号を指定して、対応するカーネル10にacceptシステムコールを送信する(ステップS15)。   Further, the descriptor number conversion unit 8 outputs an accept system call to the client application side transmission / reception unit 2 together with the extracted information of the kernel 10 and the descriptor number. Then, the client application transmitting / receiving unit 2 designates a descriptor number and transmits an accept system call to the corresponding kernel 10 (step S15).

そして、クライアントアプリ22から後述するconnectシステムコールが発行されると、サーバアプリ21及びクライアントアプリ22のソケットを介した通信経路が確立し、データの送受信が可能となる(ステップS16)。なお、データの送受信においては、サーバアプリ21からsendシステムコールやrecvシステムコールが発行されるが、このsend及びrecvシステムコールに対しても、独自ドライバ11においてlisten及びacceptシステムコールと同様の処理が行われることになる。   When a connect system call, which will be described later, is issued from the client application 22, a communication path through the sockets of the server application 21 and the client application 22 is established, and data can be transmitted / received (step S16). In the data transmission / reception, a send system call and a recv system call are issued from the server application 21. The same processing as the listen and accept system calls is performed in the original driver 11 for the send and recv system calls. Will be done.

そして、データの送受信が完了し、ソケット通信を終了するために、サーバアプリ21は、自カーネル10に対して、ソケットを開放するためのcloseシステムコールを発行する。このとき、サーバアプリ21は、ソケットを指定するための仮ディスクリプタ番号を指定して、closeシステムコールを発行する(ステップS17)。
サーバアプリ側送受信部1は、closeシステムコールを受信すると、ディスクリプタ番号変換部8にcloseシステムコールを出力する。
Then, when the data transmission / reception is completed and the socket communication is terminated, the server application 21 issues a close system call for opening the socket to the own kernel 10. At this time, the server application 21 designates a temporary descriptor number for designating a socket and issues a close system call (step S17).
When receiving the close system call, the server application side transmitting / receiving unit 1 outputs the close system call to the descriptor number conversion unit 8.

ディスクリプタ番号変換部8は、closeシステムコールが入力されると、closeシステムコールに指定される仮ディスクリプタ番号に基づき、管理テーブル格納部7を参照し、当該システムコールの宛先となるカーネル10の情報と、対応するディスクリプタ番号を抽出する。   When the close system call is input, the descriptor number conversion unit 8 refers to the management table storage unit 7 based on the temporary descriptor number specified in the close system call, and information on the kernel 10 that is the destination of the system call. , The corresponding descriptor number is extracted.

また、ディスクリプタ番号変換部8は、抽出したカーネル10の情報及びディスクリプタ番号と共に、closeシステムコールをクライアントアプリ側送受信部2に出力する。そして、クライアントアプリ側送受信部2は、ディスクリプタ番号を指定して、対応するカーネル10にcloseシステムコールを送信する(ステップS18)。   Further, the descriptor number conversion unit 8 outputs a close system call to the client application side transmission / reception unit 2 together with the extracted information of the kernel 10 and the descriptor number. Then, the client application side transceiver unit 2 designates the descriptor number and transmits a close system call to the corresponding kernel 10 (step S18).

なお、ソケット通信を終了するために、shutdownシステムコールを使用して、コネクションの切断を明示的に行うこともできるが、ソケットを開放すれば、コネクションの切断処理も行うために、shutdownシステムコールの発行を省略してもよい。   To terminate socket communication, the shutdown system call can be used to explicitly disconnect the connection. However, if the socket is released, the connection disconnection process is also performed. Issuance may be omitted.

つぎに、クライアントアプリ22が発行するシステムコールに対する独自ドライバ11の処理動作を、図2(b)、図4及び図5(d)〜(f)を用いて説明する。
クライアントアプリ22は、自カーネル10に対して、サーバアプリ21の接続を受け付けるソケットの生成を要求するためのsocketシステムコールを発行する(ステップS101)。
Next, the processing operation of the unique driver 11 for the system call issued by the client application 22 will be described with reference to FIGS. 2B, 4 and 5D to 5F.
The client application 22 issues a socket system call for requesting generation of a socket for accepting connection of the server application 21 to the own kernel 10 (step S101).

自カーネル10における独自ドライバ11のクライアントアプリ側送受信部2は、socketシステムコールを受信すると、仮ディスクリプタ番号発行部5にsocketシステムコールを出力する。   When the client application side transmitting / receiving unit 2 of the unique driver 11 in the own kernel 10 receives the socket system call, it outputs the socket system call to the temporary descriptor number issuing unit 5.

仮ディスクリプタ番号発行部5は、socketシステムコールが入力されると、ソケットの識別子であるディスクリプタ番号に相当する仮ディスクリプタ番号を生成する(ステップS102)。   When the socket system call is input, the temporary descriptor number issuing unit 5 generates a temporary descriptor number corresponding to the descriptor number that is the identifier of the socket (step S102).

そして、仮ディスクリプタ番号発行部5は、生成した仮ディスクリプタ番号を、管理テーブル格納部7に対して、新規に登録する(ステップS103、図5(d))。なお、図5(d)においては、仮ディスクリプタ番号として、「11」を登録した場合を、一例として示している。   Then, the temporary descriptor number issuing unit 5 newly registers the generated temporary descriptor number in the management table storage unit 7 (step S103, FIG. 5 (d)). FIG. 5D shows an example in which “11” is registered as the temporary descriptor number.

また、仮ディスクリプタ番号発行部5は、生成した仮ディスクリプタ番号を、クライアントアプリ側送受信部2に出力し、クライアントアプリ側送受信部2は、socketシステムコールを送信したクライアントアプリ22に仮ディスクリプタ番号を返信する(ステップS104)。なお、仮ディスクリプタ番号発行部5は、socketシステムコールをシステムコール保持部4に出力し、システムコール保持部4は、socketシステムコールを一時的に保持する。   Further, the temporary descriptor number issuing unit 5 outputs the generated temporary descriptor number to the client application side transmission / reception unit 2, and the client application side transmission / reception unit 2 returns the temporary descriptor number to the client application 22 that transmitted the socket system call. (Step S104). The temporary descriptor number issuing unit 5 outputs the socket system call to the system call holding unit 4, and the system call holding unit 4 temporarily holds the socket system call.

クライアントアプリ22は、自カーネル10に対して、自身に設定されたソケット通信用のポート番号、及び自身を動作させるプロセッサにおけるIPアドレスを、ソケットに設定するためのconnectシステムコールを発行する。このとき、クライアントアプリ22は、ソケットを指定するための仮ディスクリプタ番号を指定して、connectシステムコールを発行する(ステップS105)。   The client application 22 issues a connect system call for setting the socket communication port number set for itself and the IP address of the processor that operates the client application 22 to the socket. At this time, the client application 22 issues a connect system call by specifying a temporary descriptor number for specifying a socket (step S105).

なお、クライアントアプリ22は、一般的には、socketシステムコールに対するディスクリプタ番号(仮ディスクリプタ番号)を受信した後に、他のシステムコールを発行することなく、connectシステムコールが発行される。しかしながら、アプリケーションのオプション設定によっては、socketシステムコールとconnectシステムコールとの間に、他のシステムコールが発行される場合がある(ステップS104a)。この場合には、クライアントアプリ側送受信部2は、他のシステムコールを受信すると、システムコール再発行部6を介して、システムコール保持部4に他のシステムコールを出力する。そして、システムコール保持部4は、他のシステムコールを一時的に保持し(ステップS104b)、クライアントアプリ22に適当な返り値を返すことになる(ステップS104c)。   In general, the client application 22 issues a connect system call without issuing another system call after receiving a descriptor number (temporary descriptor number) for the socket system call. However, depending on the option setting of the application, another system call may be issued between the socket system call and the connect system call (step S104a). In this case, when the client application side transmitting / receiving unit 2 receives another system call, the client application side transmitting / receiving unit 2 outputs the other system call to the system call holding unit 4 via the system call reissuing unit 6. The system call holding unit 4 temporarily holds other system calls (step S104b), and returns an appropriate return value to the client application 22 (step S104c).

クライアントアプリ側送受信部2は、connectシステムコールを受信すると、システムコール再発行部6にconnectシステムコールを出力する。   Upon receiving the connect system call, the client application side transmitting / receiving unit 2 outputs the connect system call to the system call reissue unit 6.

システムコール再発行部6は、connectシステムコールが入力されると、connectシステムコールに指定されるIPアドレス及びポート番号に基づき、判別条件格納部3を参照し、当該システムコールの宛先となるカーネル10を特定する(ステップS106)。   When the connect system call is input, the system call reissue unit 6 refers to the determination condition storage unit 3 based on the IP address and port number specified in the connect system call, and the kernel 10 serving as the destination of the system call. Is specified (step S106).

そして、システムコール再発行部6は、前述したステップS103で登録した仮ディスクリプタ番号に対応させて、特定したカーネル10を管理テーブル格納部7に登録する(ステップS107、図5(e))。なお、図5(e)においては、宛先フラグとして、「1」(相手カーネル10)を登録した場合を、一例として示している。   Then, the system call reissue unit 6 registers the specified kernel 10 in the management table storage unit 7 in correspondence with the temporary descriptor number registered in step S103 described above (step S107, FIG. 5E). FIG. 5E shows an example in which “1” (the partner kernel 10) is registered as the destination flag.

また、システムコール再発行部6は、システムコール保持部4に保持しているsocketシステムコールを抽出し、特定したカーネル10の情報と共に、サーバアプリ側送受信部1に出力する。そして、サーバアプリ側送受信部1は、特定したカーネル10にsocketシステムコールを送信する(ステップS108)。なお、システムコール再発行部6は、システムコール保持部4にconnectシステムコールを出力し、システムコール保持部4はconnectシステムコールを一時的に保持する。   Further, the system call reissue unit 6 extracts the socket system call held in the system call holding unit 4 and outputs it to the server application side transmitting / receiving unit 1 together with the specified information of the kernel 10. Then, the server application side transmitting / receiving unit 1 transmits a socket system call to the identified kernel 10 (step S108). The system call reissue unit 6 outputs a connect system call to the system call holding unit 4, and the system call holding unit 4 temporarily holds the connect system call.

そして、サーバアプリ側送受信部1は、socketシステムコールに対して、サーバアプリ21側のカーネル10から送信されるディスクリプタ番号を受信し、ディスクリプタ番号変換部8に出力する(ステップS109)。   In response to the socket system call, the server application side transmitting / receiving unit 1 receives the descriptor number transmitted from the kernel 10 on the server application 21 side and outputs the descriptor number to the descriptor number converting unit 8 (step S109).

ディスクリプタ番号変換部8は、クライアントアプリ22からのディスクリプタ番号が入力されると、前述したステップS103で登録した仮ディスクリプタ番号に対応させて、ディスクリプタ番号を管理テーブル格納部7に登録する(ステップS110、図5(f))。なお、図5(f)においては、ディスクリプタ番号として、「51」を登録した場合を、一例として示している。   When the descriptor number from the client application 22 is input, the descriptor number conversion unit 8 registers the descriptor number in the management table storage unit 7 in association with the temporary descriptor number registered in step S103 described above (step S110, FIG. 5 (f)). In FIG. 5F, the case where “51” is registered as the descriptor number is shown as an example.

そして、システムコール再発行部6は、システムコール保持部4に保持しているconnectシステムコールを抽出し、ステップS110で登録されたディスクリプタ番号に対応するカーネル10の情報と共に、サーバアプリ側送受信部1に出力する。そして、サーバアプリ側送受信部1は、ディスクリプタ番号を指定して、対応するカーネル10にconnectシステムコールを送信する(ステップS111)。   Then, the system call reissuing unit 6 extracts the connect system call held in the system call holding unit 4, and together with the information of the kernel 10 corresponding to the descriptor number registered in step S110, the server application side transmitting / receiving unit 1 Output to. Then, the server application-side transmitting / receiving unit 1 specifies a descriptor number and transmits a connect system call to the corresponding kernel 10 (step S111).

なお、前述したステップS104bにおいて、システムコール保持部4が他のシステムコールを保持しているのであれば、システムコール保持部4に保持される他のシステムコールを、ディスクリプタ番号を指定して、対応するカーネル10に送信する(ステップS110a)。   In step S104b described above, if the system call holding unit 4 holds another system call, the other system call held in the system call holding unit 4 is specified by specifying a descriptor number. To the kernel 10 to be executed (step S110a).

そして、サーバアプリ21及びクライアントアプリ22のソケットを介した通信経路が確立すると、データの送受信が可能となる(ステップS112)。なお、データの送受信においては、クライアントアプリ22からsendシステムコールやrecvシステムコールが発行されるが、このsend及びrecvシステムコールに対しても、独自ドライバ11において前述したlisten及びacceptシステムコールと同様の処理が行われることになる。   When the communication path via the sockets of the server application 21 and the client application 22 is established, data can be transmitted / received (step S112). In the data transmission / reception, a send system call and a recv system call are issued from the client application 22, and this send and recv system call is the same as the listen and accept system calls described above in the original driver 11. Processing will be performed.

そして、データの送受信が完了し、ソケット通信を終了するために、クライアントアプリ22は、自カーネル10に対して、ソケットを開放するためのcloseシステムコールを発行する。このとき、クライアントアプリ22は、ソケットを指定するための仮ディスクリプタ番号を指定して、closeシステムコールを発行する(ステップS113)。
クライアントアプリ側送受信部2は、closeシステムコールを受信すると、ディスクリプタ番号変換部8にcloseシステムコールを出力する。
The client application 22 issues a close system call for opening the socket to the own kernel 10 in order to end the socket communication by completing the data transmission / reception. At this time, the client application 22 issues a close system call by designating a temporary descriptor number for designating a socket (step S113).
Upon receiving the close system call, the client application side transmitting / receiving unit 2 outputs the close system call to the descriptor number conversion unit 8.

ディスクリプタ番号変換部8は、closeシステムコールが入力されると、closeシステムコールに指定される仮ディスクリプタ番号に基づき、管理テーブル格納部7を参照し、当該システムコールの宛先となるカーネル10の情報と、対応するディスクリプタ番号を抽出する。   When the close system call is input, the descriptor number conversion unit 8 refers to the management table storage unit 7 based on the temporary descriptor number specified in the close system call, and information on the kernel 10 that is the destination of the system call. , The corresponding descriptor number is extracted.

また、ディスクリプタ番号変換部8は、抽出したカーネル10の情報及びディスクリプタ番号と共に、closeシステムコールをサーバアプリ側送受信部1に出力する。そして、サーバアプリ側送受信部1は、ディスクリプタ番号を指定して、対応するカーネル10にcloseシステムコールを送信する(ステップS114)。   Further, the descriptor number conversion unit 8 outputs a close system call to the server application side transmitting / receiving unit 1 together with the extracted information of the kernel 10 and the descriptor number. Then, the server application side transmitting / receiving unit 1 designates the descriptor number and transmits a close system call to the corresponding kernel 10 (step S114).

なお、ソケット通信を終了するために、shutdownシステムコールを使用して、コネクションの切断を明示的に行うこともできるが、ソケットを開放すれば、コネクションの切断処理も行うために、shutdownシステムコールの発行を省略してもよい。   To terminate socket communication, the shutdown system call can be used to explicitly disconnect the connection. However, if the socket is released, the connection disconnection process is also performed. Issuance may be omitted.

つぎに、具体例として、図1に示すNW機器100の第1のプロセッサ110におけるユーザ20に実装された各アプリケーションが発行するシステムコールに対する独自ドライバ11の処理動作について説明する。   Next, as a specific example, a processing operation of the unique driver 11 for a system call issued by each application installed in the user 20 in the first processor 110 of the NW device 100 illustrated in FIG. 1 will be described.

なお、以下の説明においては、図1に示すように、第1のプロセッサ110のユーザ20に、サーバアプリ21a、クライアントアプリ22c、サーバアプリ21d及びサーバアプリ21fを実装する場合を例に挙げて説明する。また、図1に示すように、第2のプロセッサ210のユーザ20にクライアントアプリ22bを実装し、第3のプロセッサ310のユーザ20にクライアントアプリ22eを実装する場合を例に挙げて説明する。   In the following description, as shown in FIG. 1, a case where the server application 21a, the client application 22c, the server application 21d, and the server application 21f are installed in the user 20 of the first processor 110 is described as an example. To do. Further, as illustrated in FIG. 1, the case where the client application 22b is mounted on the user 20 of the second processor 210 and the client application 22e is mounted on the user 20 of the third processor 310 will be described as an example.

さらに、図1において、クライアントアプリ22cとサーバアプリ21dとは、第1のプロセッサ110のカーネル10を互いに使用して、ソケット通信を行うものである。また、サーバアプリ21aは、第2のプロセッサ210上で動作するクライアントアプリ22bとのソケット通信を行い、サーバアプリ21fは、第3のプロセッサ310上で動作するクライアントアプリ22eとのソケット通信を行うものである。   Further, in FIG. 1, a client application 22c and a server application 21d perform socket communication by using the kernel 10 of the first processor 110 with each other. The server application 21a performs socket communication with the client application 22b that operates on the second processor 210, and the server application 21f performs socket communication with the client application 22e that operates on the third processor 310. It is.

ここで、NW機器100は、ネットワークI/F14のIPアドレスとして「Ay」が設定され、サーバアプリFにおける通信に使用するIPアドレスとして「Af」が設定されているものとする。また、他NW機器200は、ネットワークI/F14のIPアドレスとして「Ax」が設定されているものとする。   Here, it is assumed that the network device 100 has “Ay” set as the IP address of the network I / F 14 and “Af” set as the IP address used for communication in the server application F. Further, it is assumed that “Ax” is set as the IP address of the network I / F 14 in the other NW device 200.

また、NW機器100は、第1のプロセッサ110のカーネル10に実装されたクライアントアプリ22c及びサーバアプリ21d間の通信に使用するIPアドレスとして、カーネル10におけるループアドレスである、内部ループアドレス「Al」が設定されているものとする。   The NW device 100 also uses an internal loop address “Al” that is a loop address in the kernel 10 as an IP address used for communication between the client application 22c and the server application 21d installed in the kernel 10 of the first processor 110. Is set.

また、各アプリケーションは、ソケット通信用のポート番号がそれぞれ設定されている。すなわち、サーバアプリ21aにはポート番号「Pa」が設定され、クライアントアプリ22cにはポート番号「Pc」が設定され、サーバアプリ21dにはポート番号「Pd」が設定され、サーバアプリ21fにはポート番号「Pf」が設定されているものとする。また、クライアントアプリ22bにはポート番号「Pb」が設定され、クライアントアプリ22eにはポート番号「Pe」が設定されているものとする。   Each application is set with a port number for socket communication. That is, the port number “Pa” is set for the server application 21a, the port number “Pc” is set for the client application 22c, the port number “Pd” is set for the server application 21d, and the port number is set for the server application 21f. It is assumed that the number “Pf” is set. Further, it is assumed that the port number “Pb” is set in the client application 22b and the port number “Pe” is set in the client application 22e.

また、第1のプロセッサ110のカーネル10における独自ドライバ11は、判別条件格納部3に格納される判別条件として、例えば、下表1に示す条件が設定されているものとする。なお、下表1に示す条件は、プロセッサのシステム設計者が適宜設定するものであり、設定値をプログラマブルロジックデバイス等により再構成可能にすることが好ましい。   Further, it is assumed that the unique driver 11 in the kernel 10 of the first processor 110 is set with the conditions shown in Table 1 below as the determination conditions stored in the determination condition storage unit 3, for example. The conditions shown in Table 1 below are appropriately set by the system designer of the processor, and it is preferable that the set values can be reconfigured by a programmable logic device or the like.

Figure 0005381242
Figure 0005381242

以下、前述した環境において、サーバアプリ21a、クライアントアプリ22c、サーバアプリ21d、サーバアプリ21fの順に、各アプリケーションが、ソケット関連のシステムコールを発行した場合の独自ドライバ11の処理動作を説明する。   Hereinafter, the processing operation of the unique driver 11 when each application issues a socket-related system call in the order of the server application 21a, the client application 22c, the server application 21d, and the server application 21f in the above-described environment will be described.

なお、サーバアプリ21a、サーバアプリ21d、サーバアプリ21fから発行されるシステムコールに対する独自ドライバ11の動作は、前述した図3に示すステップS1〜ステップS18に従うものである。また、クライアントアプリ22cから発行されるシステムコールに対する独自ドライバ11の動作は、前述した図4に示すステップS101〜ステップS114に従うものである。   Note that the operation of the unique driver 11 in response to a system call issued from the server application 21a, the server application 21d, and the server application 21f follows steps S1 to S18 shown in FIG. Further, the operation of the unique driver 11 for the system call issued from the client application 22c follows the above-described steps S101 to S114 shown in FIG.

したがって、以下の説明では、管理テーブル格納部7に対する、仮ディスクリプタ番号、ディスクリプタ番号及び宛先フラグの登録の流れを主として、図6を用いて説明する。
まず、サーバアプリ21aから発行されるシステムコールに対する独自ドライバ11の動作を説明する。
Therefore, in the following description, the flow of registration of the temporary descriptor number, the descriptor number, and the destination flag for the management table storage unit 7 will be mainly described with reference to FIG.
First, the operation of the unique driver 11 in response to a system call issued from the server application 21a will be described.

独自ドライバ11は、サーバアプリ21aから発行されるsocketシステムコールを受信すると(ステップS1)、仮ディスクリプタ番号「10」を管理テーブル格納部に新規に登録する(ステップS2、ステップS3、図6(a))。また、独自ドライバ11は、仮ディスクリプタ番号「10」をサーバアプリ21aに返信する(ステップS4)。   When the unique driver 11 receives the socket system call issued from the server application 21a (step S1), the unique driver 11 newly registers the temporary descriptor number “10” in the management table storage unit (step S2, step S3, FIG. 6A). )). The unique driver 11 returns the temporary descriptor number “10” to the server application 21a (step S4).

そして、独自ドライバ11は、サーバアプリ21aから発行されるbindシステムコールを受信する(ステップS5)。このとき、bindシステムコールには、IPアドレス「Ay」が指定され、ポート番号「Pa」が指定される。   Then, the unique driver 11 receives the bind system call issued from the server application 21a (step S5). At this time, in the bind system call, the IP address “Ay” is designated, and the port number “Pa” is designated.

独自ドライバ11は、判別条件格納部3に格納される判別条件(表1の条件2)に基づき、自カーネル宛であると判断し(ステップS6)、管理テーブル格納部7に宛先フラグ「0」を設定して(ステップS7、図6(b))、socketシステムコールを自カーネル10に発行する(ステップS8)。   The unique driver 11 determines that it is addressed to its own kernel based on the determination condition (condition 2 in Table 1) stored in the determination condition storage unit 3 (step S6), and sends a destination flag “0” to the management table storage unit 7. Is set (step S7, FIG. 6B), and a socket system call is issued to the own kernel 10 (step S8).

そして、独自ドライバ11は、自カーネル10からディクリプタ番号「50」が返信されると(ステップS9)、管理テーブル格納部7にディクリプタ番号「50」を設定し(ステップS10、図6(c))、自カーネル10にbindシステムコールを発行する(ステップS11)。   When the unique driver 11 returns the decryptor number “50” from its own kernel 10 (step S9), it sets the decryptor number “50” in the management table storage unit 7 (step S10, FIG. 6C). Then, a bind system call is issued to the own kernel 10 (step S11).

これ以降は、サーバアプリ21aが仮ディスクリプタ番号「10」を指定してシステムコールを発行すると、独自ドライバ11が、仮ディスクリプタ番号「10」に基づき、管理テーブル格納部7を検索して、当該システムコールが自カーネル宛であると判断する。そして、独自ドライバ11は、仮ディスクリプタ番号「10」に基づき、管理テーブル格納部7から求めたディスクリプタ番号「50」を指定して、受信したシステムコールを自カーネル10に発行する。   Thereafter, when the server application 21a designates the temporary descriptor number “10” and issues a system call, the unique driver 11 searches the management table storage unit 7 based on the temporary descriptor number “10”, and It is determined that the call is addressed to its own kernel. Then, the unique driver 11 designates the descriptor number “50” obtained from the management table storage unit 7 based on the temporary descriptor number “10”, and issues the received system call to the own kernel 10.

つぎに、クライアントアプリ22cから発行されるシステムコールに対する独自ドライバ11の動作を説明する。
独自ドライバ11は、クライアントアプリ22cから発行されるsocketシステムコールを受信すると(ステップS101)、仮ディスクリプタ番号「11」を管理テーブル格納部に新規に登録する(ステップS102、ステップS103、図6(d))。また、独自ドライバ11は、仮ディスクリプタ番号「11」をクライアントアプリ22cに返信する(ステップS104)。
Next, the operation of the unique driver 11 in response to a system call issued from the client application 22c will be described.
When the unique driver 11 receives the socket system call issued from the client application 22c (step S101), the unique driver 11 newly registers the temporary descriptor number “11” in the management table storage unit (step S102, step S103, FIG. 6D). )). The unique driver 11 returns the temporary descriptor number “11” to the client application 22c (step S104).

そして、独自ドライバ11は、クライアントアプリ22cから発行されるconnectシステムコールを受信する(ステップS105)。このとき、connectシステムコールには、IPアドレス「Al」が指定され、ポート番号「Pc」が指定される。   Then, the unique driver 11 receives a connect system call issued from the client application 22c (step S105). At this time, the IP address “Al” is specified for the connect system call, and the port number “Pc” is specified.

独自ドライバ11は、判別条件格納部3に格納される判別条件(表1の条件3)に基づき、自カーネル宛であると判断する(ステップS106)。また、独自ドライバ11は、管理テーブル格納部7に宛先フラグ「0」を設定して(ステップS107、図6(e))、socketシステムコールを自カーネル10に発行する(ステップS108)。   The unique driver 11 determines that it is addressed to its own kernel based on the determination condition (condition 3 in Table 1) stored in the determination condition storage unit 3 (step S106). The unique driver 11 sets the destination flag “0” in the management table storage unit 7 (step S107, FIG. 6E), and issues a socket system call to the own kernel 10 (step S108).

そして、独自ドライバ11は、自カーネル10からディクリプタ番号「51」が返信されると(ステップS109)、管理テーブル格納部7にディクリプタ番号「51」を設定し(ステップS110、図6(f))、自カーネル10にconnectシステムコールを発行する(ステップS111)。   When the unique driver 11 returns the decryptor number “51” from the own kernel 10 (step S109), the unique driver 11 sets the decryptor number “51” in the management table storage unit 7 (step S110, FIG. 6 (f)). Then, a connect system call is issued to the own kernel 10 (step S111).

これ以降は、クライアントアプリ22cが仮ディスクリプタ番号「11」を指定してシステムコールを発行すると、独自ドライバ11が、仮ディスクリプタ番号「11」に基づき、管理テーブル格納部7を検索して、当該システムコールが自カーネル宛であると判断する。そして、独自ドライバ11は、仮ディスクリプタ番号「11」に基づき、管理テーブル格納部7から求めたディスクリプタ番号「51」を指定して、受信したシステムコールを自カーネル10に発行する。   Thereafter, when the client application 22c issues a system call specifying the temporary descriptor number “11”, the unique driver 11 searches the management table storage unit 7 based on the temporary descriptor number “11”, and It is determined that the call is addressed to its own kernel. Then, the unique driver 11 specifies the descriptor number “51” obtained from the management table storage unit 7 based on the temporary descriptor number “11”, and issues the received system call to the own kernel 10.

つぎに、サーバアプリ21dから発行されるシステムコールに対する独自ドライバ11の動作を説明する。
独自ドライバ11は、サーバアプリ21dから発行されるsocketシステムコールを受信すると(ステップS1)、仮ディスクリプタ番号「12」を管理テーブル格納部に新規に登録する(ステップS2、ステップS3、図6(g))。また、独自ドライバ11は、仮ディスクリプタ番号「12」をサーバアプリ21dに返信する(ステップS4)。
Next, the operation of the unique driver 11 in response to a system call issued from the server application 21d will be described.
When the unique driver 11 receives the socket system call issued from the server application 21d (step S1), the unique driver 11 newly registers the temporary descriptor number “12” in the management table storage unit (step S2, step S3, FIG. 6G). )). The unique driver 11 returns the temporary descriptor number “12” to the server application 21d (step S4).

そして、独自ドライバ11は、サーバアプリ21dから発行されるbindシステムコールを受信する(ステップS5)。このとき、bindシステムコールには、IPアドレス「Al」が指定され、ポート番号「Pd」が指定される。   Then, the unique driver 11 receives the bind system call issued from the server application 21d (step S5). At this time, in the bind system call, the IP address “Al” is designated and the port number “Pd” is designated.

独自ドライバ11は、判別条件格納部3に格納される判別条件(表1の条件4)に基づき、自カーネル宛であると判断し(ステップS6)、管理テーブル格納部7に宛先フラグ「0」を設定して(ステップS7、図6(h))、socketシステムコールを自カーネル10に発行する(ステップS8)。   The unique driver 11 determines that it is addressed to its own kernel based on the determination condition (condition 4 in Table 1) stored in the determination condition storage unit 3 (step S6), and sends a destination flag “0” to the management table storage unit 7. Is set (step S7, FIG. 6 (h)), and a socket system call is issued to the own kernel 10 (step S8).

そして、独自ドライバ11は、自カーネル10からディクリプタ番号「52」が返信されると(ステップS9)、管理テーブル格納部7にディクリプタ番号「52」を設定し(ステップS10、図6(i))、自カーネル10にbindシステムコールを発行する(ステップS11)。   When the unique driver 11 returns the decryptor number “52” from its own kernel 10 (step S9), it sets the decryptor number “52” in the management table storage unit 7 (step S10, FIG. 6 (i)). Then, a bind system call is issued to the own kernel 10 (step S11).

これ以降は、サーバアプリ21dが仮ディスクリプタ番号「12」を指定してシステムコールを発行すると、独自ドライバ11が、仮ディスクリプタ番号「12」に基づき、管理テーブル格納部7を検索して、当該システムコールが自カーネル宛であると判断する。そして、独自ドライバ11は、仮ディスクリプタ番号「12」に基づき、管理テーブル格納部7から求めたディスクリプタ番号「52」を指定して、受信したシステムコールを自カーネル10に発行する。   Thereafter, when the server application 21d designates the temporary descriptor number “12” and issues a system call, the unique driver 11 searches the management table storage unit 7 based on the temporary descriptor number “12”, and It is determined that the call is addressed to its own kernel. Then, the unique driver 11 specifies the descriptor number “52” obtained from the management table storage unit 7 based on the temporary descriptor number “12”, and issues the received system call to the own kernel 10.

つぎに、サーバアプリ21fから発行されるシステムコールに対する独自ドライバ11の動作を説明する。
独自ドライバ11は、サーバアプリ21fから発行されるsocketシステムコールを受信すると(ステップS1)、仮ディスクリプタ番号「13」を管理テーブル格納部に新規に登録する(ステップS2、ステップS3、図6(j))。また、独自ドライバ11は、仮ディスクリプタ番号「13」をサーバアプリ21fに返信する(ステップS4)。
Next, the operation of the unique driver 11 in response to a system call issued from the server application 21f will be described.
When the unique driver 11 receives the socket system call issued from the server application 21f (step S1), the unique driver 11 newly registers the temporary descriptor number “13” in the management table storage unit (step S2, step S3, FIG. 6 (j)). )). The unique driver 11 returns the temporary descriptor number “13” to the server application 21f (step S4).

そして、独自ドライバ11は、サーバアプリ21fから発行されるbindシステムコールを受信する(ステップS5)。このとき、bindシステムコールには、IPアドレス「Af」が指定され、ポート番号「Pf」が指定される。   Then, the unique driver 11 receives the bind system call issued from the server application 21f (step S5). At this time, in the bind system call, the IP address “Af” is designated and the port number “Pf” is designated.

独自ドライバ11は、判別条件格納部3に格納される判別条件(表1の条件5)に基づき、相手カーネル宛であると判断し(ステップS6)、管理テーブル格納部7に宛先フラグ「1」を設定して(ステップS7、図6(k))、socketシステムコールを相手カーネル10に発行する(ステップS8)。   The unique driver 11 determines that it is addressed to the partner kernel based on the determination condition (condition 5 in Table 1) stored in the determination condition storage unit 3 (step S6), and sends a destination flag “1” to the management table storage unit 7. Is set (step S7, FIG. 6 (k)), and a socket system call is issued to the partner kernel 10 (step S8).

そして、独自ドライバ11は、相手カーネル10からディクリプタ番号「50」が返信されると(ステップS9)、管理テーブル格納部7にディクリプタ番号「50」を設定し(ステップS10、図6(l))、相手カーネル10にbindシステムコールを発行する(ステップS11)。   When the decryptor number “50” is returned from the partner kernel 10 (step S9), the unique driver 11 sets the decryptor number “50” in the management table storage unit 7 (step S10, FIG. 6 (l)). Then, a bind system call is issued to the partner kernel 10 (step S11).

これ以降は、サーバアプリ21fが仮ディスクリプタ番号「13」を指定してシステムコールを発行すると、独自ドライバ11が、仮ディスクリプタ番号「13」に基づき、管理テーブル格納部7を検索して、当該システムコールが相手カーネル宛であると判断する。そして、独自ドライバ11は、仮ディスクリプタ番号「13」に基づき、管理テーブル格納部7から求めたディスクリプタ番号「50」を指定して、受信したシステムコールを相手カーネル10に発行する。   Thereafter, when the server application 21f designates the temporary descriptor number “13” and issues a system call, the unique driver 11 searches the management table storage unit 7 based on the temporary descriptor number “13”, and Determine that the call is destined for the opposite kernel. Then, the unique driver 11 designates the descriptor number “50” obtained from the management table storage unit 7 based on the temporary descriptor number “13”, and issues the received system call to the partner kernel 10.

以上のように、本実施形態に係るマルチプロセッサシステムは、一のプロセッサ内部に実装した各アプリ間やネットワークを介した複数のプロセッサの各アプリ間のみならず、拡張バスを介して接続した複数のプロセッサの各アプリ間におけるシステムコールの受け渡しを可能にする。これにより、本実施形態に係るマルチプロセッサシステムは、一のプロセッサに対する負荷を他のプロセッサに分散することができ、プロセッサの処理負荷分散を実現できるという作用効果を奏する。 As described above, the multiprocessor system according to the present embodiment has a plurality of applications connected not only between applications installed in one processor or between applications of a plurality of processors via a network, but also via an expansion bus. Allows system calls to be passed between applications on the processor. Thereby, the multiprocessor system according to the present embodiment can distribute the load on one processor to other processors, and has the effect of realizing the processing load distribution of the processors.

特に、本実施形態に係るマルチプロセッサシステムは、例えば、図7(a)に示すように、第1のプロセッサ110で処理していたクライアントアプリ22cを、図7(b)に示すように、第1のプロセッサ110から削除し、第3のプロセッサ310に実装する。これにより、本実施形態に係るマルチプロセッサシステムは、クライアントアプリ22cを第3のプロセッサ310により処理させることが可能になり、第1のプロセッサ110の負荷を低減することができる。また、本実施形態に係るマルチプロセッサシステムは、クライアントアプリ22cを処理するプロセッサを、第1のプロセッサ110から第3のプロセッサ310に移動することによる、クライアントアプリ22cの変更は発生せずに、低コストのプロセッサの処理負荷分散を実現できる。

In particular, in the multiprocessor system according to the present embodiment, for example, as shown in FIG. 7A, the client application 22c processed by the first processor 110 is changed to It is deleted from the first processor 110 and mounted on the third processor 310. Accordingly, the multiprocessor system according to the present embodiment can cause the client application 22c to be processed by the third processor 310, and can reduce the load on the first processor 110. In addition, the multiprocessor system according to the present embodiment reduces the client application 22c without changing the client application 22c by moving the processor that processes the client application 22c from the first processor 110 to the third processor 310. Distribute the processing load of the cost processor.

1 サーバアプリ側送受信部
2 クライアントアプリ側送受信部
3 判別条件格納部
4 システムコール保持部
5 仮ディスクリプタ番号発行部
6 システムコール再発行部
7 管理テーブル格納部
8 ディスクリプタ番号変換部
10 カーネル
11 独自ドライバ
12 ソケットインタフェース
13 I/Fドライバ
20 ユーザ
21,21a,21d,21f サーバアプリ
22,22b,22c,22e クライアントアプリ
100 NW機器
110 第1のプロセッサ
200 他NW機器
210 第2のプロセッサ
300 拡張カード
310 第3のプロセッサ
400 ネットワーク
500 拡張バス
DESCRIPTION OF SYMBOLS 1 Server application side transmission / reception part 2 Client application side transmission / reception part 3 Discrimination condition storage part 4 System call holding part 5 Temporary descriptor number issue part 6 System call reissue part 7 Management table storage part 8 Descriptor number conversion part 10 Kernel 11 Original driver 12 Socket interface 13 I / F driver 20 User 21, 21a, 21d, 21f Server application 22, 22b, 22c, 22e Client application 100 NW device 110 First processor 200 Other NW device 210 Second processor 300 Expansion card 310 Third Processor 400 network 500 expansion bus

Claims (4)

サーバ型のアプリケーション又はクライアント型のアプリケーションを動作させる一のプロセッサと、当該アプリケーションとのソケット通信を行うクライアント型のアプリケーション又はサーバ型のアプリケーションを動作させる他のプロセッサと、を備え、ソケット同士を接続して通信経路を確立するマルチプロセッサシステムにおいて、
前記一のプロセッサが、
bind又はconnectシステムコールの送信元である前記アプリケーションにおけるポート番号、及び当該アプリケーションを動作させる前記一のプロセッサ又は他のプロセッサにおけるIPアドレスに基づき、前記一のプロセッサ又は他のプロセッサにおける、当該システムコールの宛先となるカーネルを判別する条件を格納する判別条件格納部と、
前記アプリケーションからのsocketシステムコールを保持するシステムコール保持部と、
前記アプリケーションからのsocketシステムコールに対して、前記ソケットの識別子であるディスクリプタ番号に相当する仮ディスクリプタ番号を生成し、当該仮ディスクリプタ番号を当該アプリケーションに返信する仮ディスクリプタ番号発行部と、
前記アプリケーションからのbind又はconnectシステムコールに指定されるIPアドレス及びポート番号、並びに前記判別条件格納部に格納される判別条件に基づき、当該システムコールの宛先となるカーネルを特定し、前記システムコール保持部に保持されるシステムコールを当該カーネルに送信するシステムコール再発行部と、
前記socketシステムコールを受信したカーネルから返信されるディスクリプタ番号、当該socketシステムコールに対して生成された前記仮ディスクリプタ番号、及び当該socketシステムコールの宛先として特定されたカーネルを識別する宛先フラグを対応付けて格納する管理テーブル格納部と、
前記アプリケーションからのlisten、accept、send、recv、shutdown又はcloseシステムコールに指定される前記仮ディスクリプタ番号に対応する宛先フラグを、前記管理テーブル格納部から抽出し、当該抽出した宛先フラグに基づき、当該システムコールの宛先となるカーネルに当該システムコールを送信するディスクリプタ番号変換部と、
を備えていることを特徴とするマルチプロセッサシステム
Comprising: a first processor for operating the server applications or client applications of the other processors to operate the client type of the application or server applications that perform socket communication with the application, and connecting the socket with each other In a multiprocessor system that establishes a communication path
The one processor is
Based on the port number in the application that is the source of the bind or connect system call and the IP address in the one processor or the other processor that operates the application, the system call of the one processor or the other processor A determination condition storage unit for storing a condition for determining a destination kernel;
A system call holding unit for holding a socket system call from the application;
In response to a socket system call from the application, a temporary descriptor number issuing unit that generates a temporary descriptor number corresponding to a descriptor number that is an identifier of the socket, and returns the temporary descriptor number to the application;
Based on the IP address and port number specified in the bind or connect system call from the application, and the determination condition stored in the determination condition storage unit, the kernel serving as the destination of the system call is specified, and the system call holding A system call reissue unit that sends the system call held in the unit to the kernel;
Corresponds the descriptor number returned from the kernel that received the socket system call, the temporary descriptor number generated for the socket system call, and the destination flag that identifies the kernel specified as the destination of the socket system call A management table storage unit for storing
A destination flag corresponding to the temporary descriptor number specified in the listen, accept, send, recv, shutdown or close system call from the application is extracted from the management table storage unit, and based on the extracted destination flag, A descriptor number converter that transmits the system call to the kernel that is the destination of the system call;
A multiprocessor system comprising:
前記請求項1に記載のマルチプロセッサシステムにおいて、
前記システムコール保持部が、前記アプリケーションからのbind又はconnectシステムコール、及び当該bind又はconnectシステムコールの前に発行されるシステムコールを保持し、
前記システムコール再発行部が、前記システムコール保持部に保持されるsocketシステムコール以外のシステムコールを、前記ディスクリプタ番号を指定して、当該システムコールに対して特定したカーネルに送信することを特徴とするマルチプロセッサシステム
The multiprocessor system of claim 1, wherein
The system call holding unit holds a bind or connect system call from the application and a system call issued before the bind or connect system call;
The system call reissue unit sends a system call other than the socket system call held in the system call holding unit to the kernel specified for the system call by specifying the descriptor number. Multiprocessor system .
前記請求項1又は2に記載のマルチプロセッサシステムにおいて、
前記一のプロセッサをネットワーク機器に搭載し、前記他のプロセッサを拡張カードに搭載して、拡張バスを介して、当該ネットワーク機器及び拡張カードを接続していることを特徴とするマルチプロセッサシステム
In the multiprocessor system according to claim 1 or 2,
Mounting the one processor to the network device, by mounting the other processor to the expansion card, a multi-processor system via an expansion bus, and wherein the connecting the network device and the expansion card.
サーバ型のアプリケーション又はクライアント型のアプリケーションを動作させる一のプロセッサと、当該アプリケーションとのソケット通信を行うクライアント型のアプリケーション又はサーバ型のアプリケーションを動作させる他のプロセッサと、を備え、ソケット同士を接続して通信経路を確立するマルチプロセッサシステムにおける、当該一のプロセッサを機能させる制御プログラムであって、
前記一のプロセッサを、bind又はconnectシステムコールの送信元である前記アプリケーションにおけるポート番号、及び当該アプリケーションを動作させる前記一のプロセッサ又は他のプロセッサにおけるIPアドレスに基づき、前記一のプロセッサ又は他のプロセッサにおける、当該システムコールの宛先となるカーネルを判別する条件を格納する判別条件格納手段と、前記アプリケーションからのsocketシステムコールを保持するシステムコール保持手段と、前記アプリケーションからのsocketシステムコールに対して、前記ソケットの識別子であるディスクリプタ番号に相当する仮ディスクリプタ番号を生成し、当該仮ディスクリプタ番号を当該アプリケーションに返信する仮ディスクリプタ番号発行手段と、前記アプリケーションからのbind又はconnectシステムコールに指定されるIPアドレス及びポート番号、並びに前記判別条件格納手段に格納される判別条件に基づき、当該システムコールの宛先となるカーネルを特定し、前記システムコール保持手段に保持されるシステムコールを当該カーネルに送信するシステムコール再発行手段と、前記socketシステムコールを受信したカーネルから返信されるソケットのディスクリプタ番号、当該socketシステムコールに対して生成された前記仮ディスクリプタ番号、及び当該socketシステムコールの宛先として特定されたカーネルを識別する宛先フラグを対応付けて格納する管理テーブル格納手段と、前記アプリケーションからのlisten、accept、send、recv、shutdown又はcloseシステムコールに指定される前記仮ディスクリプタ番号に対応する宛先フラグを、前記管理テーブル格納手段から抽出し、当該抽出した宛先フラグに基づき、当該システムコールの宛先となるカーネルに当該システムコールを送信するディスクリプタ番号変換手段として機能させる制御プログラム。
One processor that operates a server-type application or a client-type application, and another processor that operates a client-type application or a server-type application that performs socket communication with the application, and connects sockets to each other A control program for causing the one processor to function in a multiprocessor system that establishes a communication path by
The one processor or the other processor based on the port number in the application that is the source of the bind or connect system call and the IP address in the one processor or the other processor that operates the application. A determination condition storage means for storing a condition for determining a kernel as a destination of the system call, a system call holding means for holding a socket system call from the application, and a socket system call from the application, A temporary descriptor number issuing means for generating a temporary descriptor number corresponding to a descriptor number that is an identifier of the socket and returning the temporary descriptor number to the application; and a bind from the application Identifies the kernel that is the destination of the system call based on the IP address and port number specified in the connect system call and the discrimination condition stored in the discrimination condition storage means, and is held in the system call holding means A system call reissuing means for transmitting a system call to the kernel; a descriptor number of a socket returned from the kernel that has received the socket system call; the temporary descriptor number generated for the socket system call; and the socket Management table storage means for associating and storing a destination flag for identifying a kernel specified as a system call destination, and the temporary descriptor specified in a listen, accept, send, recv, shutdown, or close system call from the application Destination file corresponding to the number The grayed, the extracts from the management table storage unit, based on the destination flags the extracted control program to function as a descriptor number conversion means for transmitting the system call to the kernel as a destination of the system call.
JP2009085606A 2009-03-31 2009-03-31 Multiprocessor system and control program Expired - Fee Related JP5381242B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009085606A JP5381242B2 (en) 2009-03-31 2009-03-31 Multiprocessor system and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009085606A JP5381242B2 (en) 2009-03-31 2009-03-31 Multiprocessor system and control program

Publications (2)

Publication Number Publication Date
JP2010237977A JP2010237977A (en) 2010-10-21
JP5381242B2 true JP5381242B2 (en) 2014-01-08

Family

ID=43092230

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009085606A Expired - Fee Related JP5381242B2 (en) 2009-03-31 2009-03-31 Multiprocessor system and control program

Country Status (1)

Country Link
JP (1) JP5381242B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150032922A1 (en) * 2012-02-28 2015-01-29 Nec Corporation Computer system, method of processing the same, and computer readble medium
JP5677393B2 (en) * 2012-09-27 2015-02-25 株式会社東芝 Information processing apparatus and instruction offloading method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5682534A (en) * 1995-09-12 1997-10-28 International Business Machines Corporation Transparent local RPC optimization
JPH11112609A (en) * 1997-10-06 1999-04-23 Toshiba Corp Communication fault recovery method for communication system and record medium recorded with program for the method
JP3042504B2 (en) * 1998-07-03 2000-05-15 富士通株式会社 Recording medium storing communication control program, communication control method, and communication control device
US20030115358A1 (en) * 2001-09-04 2003-06-19 Yeong-Hyun Yun Unified interprocess communication
JP2006127461A (en) * 2004-09-29 2006-05-18 Sony Corp Information processing device, communication processing method, and computer program

Also Published As

Publication number Publication date
JP2010237977A (en) 2010-10-21

Similar Documents

Publication Publication Date Title
JP5906246B2 (en) Launching and attaching a debugger on a compute cluster
WO2021109735A1 (en) Cross-chain-network-based resource processing method, and device
US5748897A (en) Apparatus and method for operating an aggregation of server computers using a dual-role proxy server computer
JP4965574B2 (en) Port sharing among multiple processes
US11716264B2 (en) In situ triggered function as a service within a service mesh
US8874640B2 (en) Method and system for reducing service overhead in service oriented architectures
US20110153581A1 (en) Method for Providing Connections for Application Processes to a Database Server
US8484281B2 (en) System and method for callbacks based on web service addressing
US7934218B2 (en) Interprocess communication management using a socket layer
CN110532106A (en) The means of communication, device, equipment and storage medium between process
WO2015169090A1 (en) Service-based message access layer frame and implementation method therefor
JP5381242B2 (en) Multiprocessor system and control program
WO2021114857A1 (en) Interface calling method, apparatus, computer device, and storage medium
CA2293062A1 (en) Efficient use of domain socket pairs in communication for tightly coupled transactions
US9130881B2 (en) Direct return to source (DRS) routing of customer information control systems (CICS) transactions
CN202798801U (en) Universal communication system for achieving distributed data interaction
US8712786B2 (en) Method and apparatus for controlling a multi-node process
US7757235B2 (en) Trigger support for a bi-directional broker
CN110928703B (en) Multi-process communication registration method and device
JP5530810B2 (en) Scale-out system and method and program
CN110928702B (en) Multi-process message communication system
WO2018077115A1 (en) Plug-in implementation method, apparatus, and computer storage medium
CN114726863A (en) Method, device, system and storage medium for load balancing
CN115408175A (en) API calling method and device, electronic equipment and computer-readable storage medium
JP2007026008A (en) Task integration system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130417

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130430

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130528

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: 20130903

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130916

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees