JP3459165B2 - Packet processing method and network architecture - Google Patents

Packet processing method and network architecture

Info

Publication number
JP3459165B2
JP3459165B2 JP26377997A JP26377997A JP3459165B2 JP 3459165 B2 JP3459165 B2 JP 3459165B2 JP 26377997 A JP26377997 A JP 26377997A JP 26377997 A JP26377997 A JP 26377997A JP 3459165 B2 JP3459165 B2 JP 3459165B2
Authority
JP
Japan
Prior art keywords
packet
processing
layer
processing means
message
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
JP26377997A
Other languages
Japanese (ja)
Other versions
JPH10155010A (en
Inventor
日出夫 須藤
Original Assignee
株式会社沖データ
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 株式会社沖データ filed Critical 株式会社沖データ
Priority to JP26377997A priority Critical patent/JP3459165B2/en
Publication of JPH10155010A publication Critical patent/JPH10155010A/en
Application granted granted Critical
Publication of JP3459165B2 publication Critical patent/JP3459165B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明はネットワ−クのノ−
ド間にコネクションを確立し、受信バッファに受信した
パケットに階層的に付加されたプロトコルを下位層から
上位層に向かって順に処理するパケット処理方法とネッ
トワ−クア−キテクチャとに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a network
The present invention relates to a packet processing method and a network architecture for establishing a connection between packets and sequentially processing a protocol hierarchically added to a packet received in a reception buffer from a lower layer to an upper layer.

【0002】[0002]

【従来の技術】従来、ネットワ−クのノ−ドに組込まれ
るOSI(Open System Interconnection) 環境の標準ネ
ットワ−クア−キテクチャは、プロトコルを階層的に並
べた構造を採っており、ISO(International Organi
zation for Standardization)等により、各層の位置付
けや、機能、層間のインタフェースなどが細かく規定さ
れている。
2. Description of the Related Art Conventionally, a standard network architecture of an OSI (Open System Interconnection) environment, which is built into a node of a network, has a structure in which protocols are hierarchically arranged, and ISO (International Organization) is adopted.
(zation for Standardization) etc., the positioning of each layer, functions, interfaces between layers, etc. are specified in detail.

【0003】ISOが規定したOSI参照モデルには、
下位から物理層、デ−タリンク層、ネットワ−ク層、ト
ランスポ−ト層、セッション層、プレゼンテ−ション
層、アプリケ−ション層の7層構造になっている。
The OSI reference model defined by ISO includes
It has a seven-layer structure including a physical layer, a data link layer, a network layer, a transport layer, a session layer, a presentation layer, and an application layer from the bottom.

【0004】ネットワ−クに送り出されるパケット形式
のデ−タには、それぞれ、各層に関する制御情報である
プロトコルがヘッダとして付加されており、各ノ−ドの
ネットワ−クア−キテクチャはネットワ−クからパケッ
トを受信してパケットのヘッッダに階層的に含まれるプ
ロトコルを各層で順次処理してパケットに含まれるデ−
タをデ−タバッファに格納するとともに、受信パケット
に対する応答パケットをネットワ−クに送信する。
The packet format data sent to the network is added with a protocol as control information for each layer as a header, and the network architecture of each node is from the network. The protocol included in the packet header is hierarchically processed in each layer, and the data included in the packet is processed.
The data is stored in the data buffer and the response packet to the received packet is transmitted to the network.

【0005】例えば、インタ−ネットプロトコル層(以
後IPと記す)はネットワ−ク層に位置し、主に一つ又
は複数の通信網を介して中継を行い、始点となるノード
から終点となるノードまでのデータ通信を行う。
For example, the internet protocol layer (hereinafter referred to as "IP") is located in the network layer and mainly relays via one or a plurality of communication networks, and the node from the start point to the end point. Data communication up to.

【0006】また、IPの上位層(トランスポ−ト層)
としてのトランスファコントロ−ルプロトコル層(以後
TCPと記す)は、経路選択や中継機能に関与せず、始
点及び終点となるノードのさらに終端間における透過的
な両方向同時転送機能を提供する。
[0006] The upper layer of IP (transport layer)
The transfer control protocol layer (hereinafter referred to as TCP) provides a transparent simultaneous bidirectional transfer function between the end point and the end point of the node that does not participate in the route selection and the relay function.

【0007】TCPをネットワ−クア−キテクチャに組
込むには、一つのコネクション(デ−タを転送するため
の論理的な通信路)に対する処理を一つのTCPタスク
で行せるようにし、N個のコネクションに対して(N+
1)個のTCPタスクを起動させる。TCPタスクの残
りの一つはマスタとして次のコネクションの確立用とし
て待機している。
In order to incorporate TCP into the network architecture, processing for one connection (logical communication path for transferring data) can be performed by one TCP task, and N connections are made. For (N +
1) Start up the TCP tasks. The other one of the TCP tasks is waiting as the master for establishing the next connection.

【0008】IPは、1つのタスクが、受信した受信パ
ケットのヘッダ処理を順次処理して対応するTCPタス
クを識別し、待機しているTCPタスクに預けていく処
理を行っている。よって確立するコネクション数とは関
係なく常に1つのタスクとして存在する。
In the IP, one task sequentially processes the header processing of the received packet received, identifies the corresponding TCP task, and deposits it in the waiting TCP task. Therefore, it always exists as one task regardless of the number of established connections.

【0009】各TCPタスクはそれぞれコネクションを
確立したクライアントタスクから受信した受信パケット
を処理し、相手のクライアントタスクに応答パケットを
送信する。このとき送信する応答パケットはただ一つ存
在するIPタスクを通る必要があるため、各TCPタス
クはIPタスクの使用権を獲得する。
Each TCP task processes a received packet received from a client task which has established a connection, and sends a response packet to the client task of the other party. Since the response packet to be transmitted at this time needs to pass through only one existing IP task, each TCP task acquires the right to use the IP task.

【0010】IPタスクはTCPタスクまたはデータリ
ンク層タスクからの呼び出し(以後POSTと記す)を
待つ。POSTとは、マルチタスク環境下のタスク間で
処理を移行する時に使用するオペレ−ションシステム
(以後OSと記す)のシステムコールである。
The IP task waits for a call (hereinafter referred to as POST) from the TCP task or the data link layer task. POST is a system call of an operation system (hereinafter referred to as OS) used when processing is transferred between tasks in a multitask environment.

【0011】ここで、簡単にIPタスクとTCPタスク
との動作を説明する。データリンク層タスクは、クライ
アントより最初のパケットを受信すると、そのヘッダか
らIPタスクを識別し、待機しているIPタスクに対し
てPOSTを行う。
Here, the operations of the IP task and the TCP task will be briefly described. When the data link layer task receives the first packet from the client, the data link layer task identifies the IP task from the header, and POSTs the waiting IP task.

【0012】IPタスクは受信パケットのヘッダからネ
ットワ−ク層に関するプロトコル処理を行い、ヘッダか
らTCPタスクを識別し、待機しているTCPマスタタ
スクに対してPOSTを行う。
The IP task performs a protocol process related to the network layer from the header of the received packet, identifies the TCP task from the header, and POSTs to the waiting TCP master task.

【0013】TCPマスタタスクは受信パケットの内容
がコネクションの開設要求と判断すると、パケットを処
理し、クライアントに対して応答パケットを送信する。
通常クライアントからの最初のパケットはコネクション
の開設を要求するパケットなので、クライアントへ応答
パケットを送信した後はタイマを動作させてスリ−ウェ
イハンドシェークの最後のパケットを待つ。
When the TCP master task determines that the content of the received packet is a connection opening request, it processes the packet and sends a response packet to the client.
Normally, the first packet from the client is a packet requesting the opening of a connection, so after transmitting the response packet to the client, the timer is activated to wait for the last packet of the three-way handshake.

【0014】TCPマスタタスクは、タイマアップする
前にクライアントからハンドシェークパケットを受信す
ると、コネクションの確立を認識する。また、コネクシ
ョン確立後の受信パケットがセッション層以上のサービ
スの要求がある場合には、新たにマスタタスクを生成し
POSTを行う。本例では、FTP(File TransferPro
tocol)マスタタスクを起動する。
When the TCP master task receives the handshake packet from the client before the timer is up, it recognizes the establishment of the connection. If the received packet after the connection is established requires a service of the session layer or higher, a new master task is generated and POST is performed. In this example, FTP (File TransferPro)
tocol) Start the master task.

【0015】FTPマスタタスクは、クライアントとの
間に制御コネクションを確立すると、fork()関数を用い
自分自身のコピー(FTPタスク)を作成する。FTP
タスクは、TCPマスタタスクに対してポートの割り当
てを行う。
When the FTP master task establishes a control connection with the client, it uses the fork () function to create a copy of itself (FTP task). FTP
The task assigns a port to the TCP master task.

【0016】TCPマスタタスクは、fork()関数を用い
自分自身のコピー(TCPタスク)を作成する。TCP
タスクは、FTPタスクとの間にデ−タコネクションを
確立し、以後クライアントから切断されるまでそのコネ
クションを管理する。
The TCP master task creates a copy of itself (TCP task) using the fork () function. TCP
The task establishes a data connection with the FTP task and manages the connection until it is disconnected from the client thereafter.

【0017】TCPマスタタスクは次のクライアントか
らのコネクションの開設要求に備えて待ち状態となる。
The TCP master task enters a waiting state in preparation for a connection opening request from the next client.

【0018】他方、TCPタスクはパケットの受信毎に
トランスポート層の処理を行い、FTPタスクに対して
POSTを行う。FTPタスクは、TCPタスクから受
信したデータを受け取り、データ中に含まれるクライア
ントからのコマンドを実行する。
On the other hand, the TCP task processes the transport layer each time a packet is received, and POSTs the FTP task. The FTP task receives the data received from the TCP task and executes the command from the client included in the data.

【0019】以上説明した組込み処理は、完全にプリエ
ンプティブに動作するラウンドロビン方式のOSの組込
みを前提としている。
The embedding processing described above is premised on the embedding of a round-robin type OS which operates completely preemptively.

【0020】[0020]

【発明が解決しようとする課題】従来のネットワ−クア
−キテクチャにあっては、複数のコネクションをそれと
同数のTCPタスクで処理するため、コネクションを処
理するプロセスを動的に複数コピーする機能(上述した
fork()関数) が必要となる。この機能は1つのプログラ
ムを複数のタスクで共有し実行させるため、タスク間の
同期を取るラウンドロビン方式の完全にプリエンプティ
ブに動作する高機能なOSを必要とするという問題点が
あった。
In the conventional network architecture, since a plurality of connections are processed by the same number of TCP tasks, a function for dynamically copying a plurality of processes for processing the connections (described above). did
fork () function is required. Since this function shares and executes one program by a plurality of tasks, there is a problem in that a highly functional OS that operates in a completely preemptive manner of a round robin system that synchronizes tasks is required.

【0021】また、各層のプロトコル処理を別々のタス
クとして動作させるとともに、トランスポート層以上の
タスクはコネクションの確立に応じてタスクがコピーさ
れるので、OS上で動作するタスクの数が増え、OSの
オーバヘッド量が増加するという問題点もあった。
Further, the protocol processing of each layer is operated as a separate task, and the tasks of the transport layer and above are copied according to the establishment of the connection, so that the number of tasks operating on the OS increases and There was also a problem in that the overhead amount of was increased.

【0022】また、プロトコル処理における各プロセス
をすべて別々のタスクが行うことにより、メモリ上の作
業領域が増大するという問題点もあった。
Further, there is a problem that the work area on the memory increases because each task in the protocol processing is performed by a different task.

【0023】本発明はネットワ−クア−キテクチャに組
み込まれるネットワ−ク層/トランスポ−ト層の負荷を
軽減し、より効率良く動作するパケット処理方法とネッ
トワークア−キテクチャとを提供することを目的とす
る。
An object of the present invention is to provide a packet processing method and a network architecture that reduce the load on the network layer / transport layer incorporated in the network architecture and operate more efficiently. To do.

【0024】[0024]

【課題を解決するための手段】上記目的を達成するため
に本発明のネットワ−クア−キテクチャにおいては、一
定時間毎に入るタイマ割込みを使用し、受信バッファに
受信されたパケットのネットワ−ク層とトランスポ−ト
層とに関するプロトコルを割込み中に一括処理して蓄積
し、プロトコルの内容から上位層のプロトコル処理手段
を指定通知する受信パケット一括処理手段と、それぞれ
のコネクションに属する最後の受信パケットに対する応
答パケットを割込み中にネットワ−クに一括して送信す
る送信パケット一括処理手段とを備える。
In order to achieve the above object, in the network architecture of the present invention, a timer interrupt that enters every fixed time is used, and the network layer of the packet received in the receiving buffer is used. For the last received packet belonging to each connection, and the received packet batch processing means for collectively processing and accumulating the protocols related to the transport layer and the transport layer during the interrupt, and designating and notifying the upper layer protocol processing means from the contents of the protocol. And a transmission packet batch processing means for collectively transmitting the response packets to the network during the interruption.

【0025】また、同じ目的を達成するために本発明の
パケット処理方法においては、少なくともネットワ−ク
層、トランスポ−ト層、セッション層、プレゼンテ−シ
ョン層、アプリケ−ション層に関するプロトコルの処理
をそれぞれ一つのタスクにし、ネットワ−ク層、トラン
スポ−ト層を一つの機能とし、セッション層、プレゼン
テ−ション層、アプリケ−ション層を一つの機能とし、
その機能に処理の優先度を持たせて動作するパケット処
理方法とし、具体的手段として、メッセ−ジに基づいて
呼び出した処理手段に起動を駆けるオペレ−ティングシ
ステム機能によるメッセ−ジ処理手段と、メッセ−ジ処
理手段により呼び出されて受信バッファから受信パケッ
トを取り出し、少なくともネットワ−ク層、トランスポ
−ト層に関するプロトコルを処理して所定量に達するま
で蓄積する第1のパケット処理手段と、セッション層、
プレゼンテ−ション層、アプリケ−ション層に関するプ
ロトコルを処理して上位層に出力する第2のパケット処
理手段と、第1のパケット処理手段から指定された第2
のパケット処理手段を呼び出すメッセ−ジをメッセ−ジ
処理手段に出力するとともに上位側待ち行列に登録し、
メッセ−ジ処理手段からの呼び出しに応じて上位側待ち
行列を参照し、第2のパケット処理手段を呼び出すソケ
ット処理手段とを備える。
Further, in order to achieve the same object, in the packet processing method of the present invention, at least the protocol processing relating to the network layer, the transport layer, the session layer, the presentation layer and the application layer is performed. One task, network layer, transport layer as one function, session layer, presentation layer, application layer as one function,
As a packet processing method that operates by giving its function a processing priority, as a concrete means, a message processing means by an operating system function that activates the processing means called based on the message, A first packet processing means called by the message processing means, extracting a received packet from the reception buffer, processing at least a protocol relating to the network layer and the transport layer, and accumulating until a predetermined amount is reached, and a session layer. ,
Second packet processing means for processing a protocol relating to the presentation layer and application layer and outputting it to an upper layer, and a second packet processing means designated by the first packet processing means.
The message for calling the packet processing means of the above is output to the message processing means and registered in the upper queue,
Socket processing means for calling the second packet processing means by referring to the upper queue in response to a call from the message processing means.

【0026】[0026]

【発明の実施の形態】本発明の実施の形態について図面
を参照しながら説明する。尚、各図面に共通な要素には
同一符号を付す。第1の実施の形態 図1は第1の実施の形態によるプリンタのネットワ−ク
ア−キテクチャを示すブロック図であり、単一な中央処
理装置1(以後CPU1と記す)上で動作する割込み処
理及びタスクを示す。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described with reference to the drawings. Elements common to the drawings are given the same reference numerals. First Embodiment FIG. 1 is a block diagram showing the network architecture of the printer according to the first embodiment, which includes an interrupt processing operation on a single central processing unit 1 (hereinafter referred to as CPU 1) and Indicates a task.

【0027】尚、ノ−ドとして、図2に示すように、対
象を回線に接続されたネットワ−クプリンタ2(以後プ
リンタ2と記す)にしぼり説明する。
Note that, as a node, as shown in FIG. 2, the description will be limited to the network printer 2 (hereinafter referred to as printer 2) connected to the line.

【0028】ネットワ−クア−キテクチャは、ネットワ
−ク接続用ハ−ドウェアとしてのNIC(Network Inte
rface Controller)3と、トランスポ−ト層及びネット
ワ−ク層のプロトコル処理手段としてのTCP/IP部
4と、クライアントとのデータの送受信を制御し、メモ
リ5上に割り当てられた受信バッファ5aを管理するI
FCタスク6とからなる。
The network architecture is a network interface (NIC) as hardware for network connection.
rface controller) 3, TCP / IP unit 4 as a protocol processing means for the transport layer and network layer, and transmission / reception of data to / from a client, and manages a reception buffer 5a allocated on the memory 5. Do I
It consists of FC task 6.

【0029】NIC3はネットワ−クからのパケットの
受信時に起動し、CPU1に割り込みをかけて受信パケ
ットを受信バッファ5に受信し、受信パケットに対する
応答パケット等を送信する時に使用される。
The NIC 3 is activated when receiving a packet from the network, interrupts the CPU 1 to receive the received packet in the receive buffer 5, and is used when transmitting a response packet to the received packet.

【0030】TCP/IP部4はタイマ割り込み時に起
動し、割り込み時間内に受信バッファ5に受信されてあ
る受信パケットのネットワ−ク層とトランスポ−ト層と
に関するプロトコル処理を一括処理してメモリ5上に割
り当てられた受信パケット一時バッファ5bに格納して
IFC(Interface Control )タスク6にPOSTを行
う受信パケット一括処理手段4aと、メモリ5上に割り
当てられた送信待ちバッファ5cに格納されてある応答
パケット等を割り込み時間内にネットワ−クに送信する
送信パケット一括処理手段4bとが設けてある。TCP
/IP部4は、TCPとIPとを別タスクとせず一つの
タスクとして動作する。
The TCP / IP unit 4 is activated at the time of a timer interrupt, and collectively processes the protocol processing relating to the network layer and the transport layer of the received packet received by the receiving buffer 5 within the interrupt time to execute the memory 5 operation. Received packet batch processing means 4a for storing the received packet in the temporary buffer 5b allocated above and POSTing to the IFC (Interface Control) task 6, and the response stored in the transmission waiting buffer 5c allocated in the memory 5. There is provided a transmission packet batch processing means 4b for transmitting packets and the like to the network within the interruption time. TCP
The / IP unit 4 operates as one task instead of separate tasks for TCP and IP.

【0031】IFCタスク6は、TCP/IP部4によ
り指定された通信アプリケーションを識別する通信アプ
リケーション識別部8と、受信パケットのセッション
層、プレゼンテ−ション層、アプリケ−ション層に関す
るプロトコルを処理する通信アプリケーション群9と、
受信パケットに含まれる受信デ−タを通信アプリケーシ
ョン群9から入力して印刷部10に出力する入出力管理
部11とからなる。
The IFC task 6 is a communication application identifying section 8 for identifying a communication application designated by the TCP / IP section 4, and a communication for processing a protocol relating to a session layer, a presentation layer and an application layer of a received packet. Application group 9,
The input / output management unit 11 inputs the reception data included in the reception packet from the communication application group 9 and outputs it to the printing unit 10.

【0032】図3は図1に示したネットワ−クア−キテ
クチャの処理時のタイムチャ−トである。TCP/IP
部4は時間t経過する毎にタイマ割り込みに入るように
設定されており、割り込み時間内にTCP/IP部4の
プロトコル処理を行う。時間tは割り込み処理時間に比
べて大きく設定されてあり、TCP/IP部4が割り込
み処理を終了するとPOSTを行い、以後、次のタイマ
割り込みに入るまでNIC3によるパケット送受信処
理、IFCタスク6によるパケット処理、印刷部10に
よる印刷処理等が行われる。
FIG. 3 is a time chart when processing the network architecture shown in FIG. TCP / IP
The unit 4 is set to enter a timer interrupt every time time t has elapsed, and the protocol processing of the TCP / IP unit 4 is performed within the interrupt time. The time t is set to be larger than the interrupt processing time, and when the TCP / IP unit 4 finishes the interrupt processing, POST is performed, and thereafter, the packet transmission / reception processing by the NIC 3 and the packet by the IFC task 6 are performed until the next timer interrupt occurs. Processing, printing processing by the printing unit 10, and the like are performed.

【0033】TCP/IP部4はタイマ割り込みにより
起動すると、受信バッファ5に受信済みの全パケットを
割り込み時間内に処理し、最後のパケットに対する応答
パケットを作成して送信待ちバッファ7bに格納する。
たとえば、受信バッファ5にクライアントAから3つの
パケットA1 〜A3 を受信してあるとすると、1回のタ
イマ割り込み処理で3つのパケットA1 〜A3 を処理
し、パケットA3 に対する応答パケットを作成して送信
待ちバッファ7bに格納する。
When activated by a timer interrupt, the TCP / IP unit 4 processes all the packets that have been received by the reception buffer 5 within the interruption time, creates a response packet for the last packet, and stores it in the transmission waiting buffer 7b.
For example, if three packets A1 to A3 have been received from the client A in the reception buffer 5, the three packets A1 to A3 are processed by one timer interrupt process, and a response packet for the packet A3 is created and transmitted. Store in the waiting buffer 7b.

【0034】また、複数のクライアントからパケットを
受信した場合にも同様に、各クライアントから受信した
最後のパケットに対して応答パケットを作成して送信待
ちバッファ7bに格納する。つまり、クライアントAか
ら3つのパケットA1 〜A3を、クライアントBから1
つのパケットB1 を、クライアントCから2つのパケッ
トC1 、C2 を受信バッファ5に受信していた場合、T
CP/IP部4は、クライアントAにはパケットA3 に
対する応答パケットを、クライアントBにはパケットB
1 に対する応答パケットを、クライアントCにはパケッ
トC2 に対する応答パケットをそれぞれ作成して送信待
ちバッファ7bに格納する。
Similarly, when packets are received from a plurality of clients, a response packet is similarly created for the last packet received from each client and stored in the transmission waiting buffer 7b. That is, three packets A1 to A3 from the client A and one packet from the client B
If one packet B1 is received from the client C and two packets C1 and C2 are received in the receiving buffer 5, T
The CP / IP unit 4 sends a response packet for the packet A3 to the client A and a packet B to the client B.
A response packet for 1 and a response packet for packet C2 are created in the client C and stored in the transmission waiting buffer 7b.

【0035】送信処理はNIC3に対して送信に必要な
情報をセットする前処理、NIC3が行う送信処理、送
信完了後行う後処理からなる。
The transmission process includes a pre-process for setting information necessary for transmission to the NIC 3, a transmission process performed by the NIC 3, and a post-process performed after the transmission is completed.

【0036】送信パタ−ンの1つ目は、TPC/IP部
4から応答される場合で、TPC/IP部4とのコネク
ション確立シーケンス時の応答、デ−タパケットに対す
る応答、ARP(Address Resolution Protocol)における物
理アドレスの問い合わせに対する応答等、受信パケット
を受信した直後に発生する送信処理であり、上述したタ
イマ割り込み処理中に行う。
The first transmission pattern is when a response is made from the TPC / IP unit 4, a response at the time of a connection establishment sequence with the TPC / IP unit 4, a response to a data packet, and an ARP (Address Resolution Protocol). ) Is a transmission process that occurs immediately after receiving a received packet, such as a response to a physical address inquiry in (1), and is performed during the timer interrupt process described above.

【0037】即ち、データパケットのストリームに対す
る単なる応答である場合には、上述した通りに直ちに送
信を行わず、受信済みの全パケットの処理が終了した後
に応答パケットを作成する。その他の応答の場合には、
直ちに送信用のパケットを作成して送信待ちバッファ7
bに格納し、タイマ割り込み処理の最後にまとめて送信
要求をNIC3に出す。
That is, in the case of a simple response to the stream of data packets, the transmission is not immediately performed as described above, but the response packet is created after the processing of all the received packets is completed. For other responses,
Immediately create a packet for transmission and wait for transmission 7
It is stored in b and the transmission requests are collectively issued to the NIC 3 at the end of the timer interrupt processing.

【0038】こうすることにより、送信パケットに対す
る応答を受信するまでのタイムアウト時間( ターンアラ
ウンド時間) を一括に管理する(以後Max Time
out処理と記す)ことができ、タイムアウト処理にか
かる負荷が減少する。
By doing so, the timeout time (turnaround time) until the response to the transmitted packet is received is collectively managed (hereinafter, Max Time).
This is referred to as out processing), and the load on the timeout processing is reduced.

【0039】本実施の形態によるア−キテクチャ組込み
におけるタイマ処理は、各コネクションを管理する情報
とともにタイマ情報をグローバルテーブルとして管理す
る。送信パケットのタイムアウト値、タイムアウトカウ
ンタ等をテーブル中に保存し、タイマ割り込み中でカウ
ンタをデクリメントし、タイマ割り込みの入る回数でタ
イムアウト時間を管理する。タイムアウト値はTCP/
IP部4のタイマ割り込みが入る時間tの倍数で定義
し、tの倍数単位の増減を行う。
The timer processing in the architecture incorporation according to the present embodiment manages the timer information as a global table together with the information for managing each connection. The timeout value of the transmission packet, the timeout counter, etc. are saved in the table, the counter is decremented during the timer interrupt, and the timeout time is managed by the number of times the timer interrupt is entered. The timeout value is TCP /
It is defined by a multiple of time t at which the timer interrupt of the IP unit 4 enters, and is increased or decreased by a multiple of t.

【0040】送信パターンの2つ目として、印刷部10
のプリンタファームウェアや通信アプリケーション群9
の通信アプリケーション等から任意の時間に発生する送
信処理がある。
As the second transmission pattern, the printing unit 10
Printer firmware and communication application group 9
There is a transmission process that occurs at any time from the communication application or the like.

【0041】従来のア−キテクチャ組込みによる送信で
は、TCPタスク及びIPタスクは、IFCタスク6か
ら送信要求を受けると、図4(A)に示すように、直ち
に送信処理を行い、NIC3へ送信処理を要求した。
In the conventional transmission by incorporating the architecture, when the TCP task and the IP task receive the transmission request from the IFC task 6, as shown in FIG. 4A, the transmission processing is immediately performed and the transmission processing is performed to the NIC 3. Requested.

【0042】しかし、アプリケーションの送信では、タ
イムアウトが存在しないか、存在しても非常に長いので
緊急に送信する必要はない。従って、本発明ではIFC
タスク6の送信要求を一定時間蓄積し、一括して送信す
る方法を採る。
However, in the transmission of the application, there is no timeout, or even if there is a timeout, it is very long, so it is not necessary to transmit it urgently. Therefore, in the present invention, IFC
A method of accumulating transmission requests of task 6 for a certain period of time and transmitting them all at once is adopted.

【0043】通信アプリケーション関数内及びプリンタ
ファームウェア内で送信要求が発生すると、通信アプリ
ケーション関数が、特定のテーブルに対して送信要求を
書き込む。実際の送信は、図4(B)に示すように、T
CP/IP部4が次に入るタイマ割り込み中に通信アプ
リケーションによってセットされたテーブル情報を参照
して行う。
When a transmission request is generated in the communication application function and the printer firmware, the communication application function writes the transmission request in a specific table. In actual transmission, as shown in FIG.
The CP / IP unit 4 refers to the table information set by the communication application during the next timer interrupt.

【0044】また、タイマ割り込み時に受信パケットが
受信バッファ5内に存在する時は、受信パケットの処理
を優先して行い、その応答パケットと一緒に送信要求を
NIC3に対して行う。
When the received packet exists in the reception buffer 5 at the time of the timer interruption, the received packet is preferentially processed and a transmission request is made to the NIC 3 together with the response packet.

【0045】次に動作について説明する。クライアント
よりランダムに送られてくるパケットは、図1に矢印
(a)、(b)で示すように、第1、2層部のNIC3
によりリアルタイムに受信される。NIC3はパケット
を受信する毎にCPU1に割り込みをかけて、割り込み
処理によりパケットを受信バッファ5に格納する。
Next, the operation will be described. Packets randomly sent from the client are the NIC 3 of the first and second layer parts as shown by arrows (a) and (b) in FIG.
Is received in real time by. The NIC 3 interrupts the CPU 1 each time it receives a packet, and stores the packet in the reception buffer 5 by interrupt processing.

【0046】TCP/IP部4は、時間t毎に入るタイ
マ割り込み中にネットワ−ク層及びトランスポ−ト層の
プロトコル処理を、図1に矢印(c)で示すように、そ
の時受信バッファ5に受信してある全パケットについて
行い、処理済みのパケットをパケット一時バッファ7a
に格納する。
The TCP / IP unit 4 stores the protocol processing of the network layer and the transport layer in the receiving buffer 5 at the time, as shown by the arrow (c) in FIG. The processing is performed for all received packets, and the processed packets are stored in the packet temporary buffer 7a.
To store.

【0047】一連の受信データストリームにおける最終
パケットを受信すると、TCP/IP部4は、ヘッダか
ら上位層プロトコル( 通信アプリケーション) を識別
し、それを通知するフラグをセットして、図1に矢印
(d)で示すように、IFCタスク6に対してPOST
を行う。
When the last packet in the series of received data streams is received, the TCP / IP unit 4 identifies the upper layer protocol (communication application) from the header and sets a flag for notifying it, and the arrow ( As shown in d), POST to IFC task 6
I do.

【0048】フラグはグローバルな変数で、TCP/I
P部4が受信データストリームを渡すべき上位層( 通信
アプリケーション) を指定するために用い、TCP/I
P部4からIFCタスク6に対して受け渡される。受け
渡し方法は、OSのメッセージパッシング機能を用い
る。
Flags are global variables, and TCP / I
It is used by the P section 4 to specify the upper layer (communication application) to which the received data stream should be passed.
It is passed from the P section 4 to the IFC task 6. The message passing function of the OS is used as the delivery method.

【0049】通信アプリケーションは、すべてIFCタ
スク6の関数として組み込まれ、指定された上位層が、
例えば、FTP9aとすると、図1に矢印(e)で示す
ように、識別部8はFTP関数をコールする。
All communication applications are installed as a function of the IFC task 6, and the designated upper layer is
For example, assuming FTP9a, the identification unit 8 calls the FTP function, as indicated by the arrow (e) in FIG.

【0050】FTP9aは、TCP/IP部4が受信し
たデータストリームを受信パケット一時バッファ7aか
ら受け取り、内容を処理する。必要であれば、図1に矢
印(f)で示すように、入出力管理部11へデータを渡
す。入出力管理部11へ渡すデータは、コネクション別
になっているので、コネクション別のキュー( 以後、I
FC−EDIT間受信キューと記す) を作成する。
The FTP 9a receives the data stream received by the TCP / IP unit 4 from the received packet temporary buffer 7a and processes the contents. If necessary, the data is passed to the input / output management unit 11, as indicated by the arrow (f) in FIG. Since the data passed to the input / output management unit 11 is connection-specific, the connection-specific queue (hereinafter, I
Create an FC-EDIT receive queue).

【0051】IFC−EDIT間受信キューは、IFC
タスク6の通信アプリケーションFTP9aから入出力
管理部11を介し、印刷部10のEDIT(編集)タス
ク10aへ印刷データ、その他を渡す待ち行列である。
印刷部10のEDITタスク10aは、図1に矢印
(g)で示すように、IFC−EDIT間受信キューか
らデータを受け取り編集処理を行う。
The IFC-EDIT receive queue is IFC.
This is a queue for transferring print data and the like from the communication application FTP 9a of the task 6 to the EDIT (edit) task 10a of the printing unit 10 via the input / output management unit 11.
The EDIT task 10a of the printing unit 10 receives data from the IFC-EDIT reception queue as shown by an arrow (g) in FIG.

【0052】ここで、従来の方法(Aとする)による受
信処理時間rAと、本実施の形態方法(Bとする)によ
る受信処理時間rBとの差Recを以下に示す。
Here, the difference Rec between the reception processing time rA according to the conventional method (denoted as A) and the reception processing time rB according to the method of the present embodiment (denoted as B) is shown below.

【0053】まず、処理をTCP/IP部4に、時間を
t内に限定し、パケット受信時間を、パケット処理時間
とOSの処理時間に分けて求める。単位時間に受信する
パケットの数をn、1パケットを処理する時間をEとす
ると一定時間tにおけるパケットの処理時間E(A,
B)は、A,B共に、 E(A,B)=E×t×n・・・・・・・・・・(1) また、OSの処理時間は、タスク生成時間とタスクスイ
ッチ時間との和とすると、fork()関数等により子タスク
を作成し実行させる時間をF、同時にアクセスする平均
コネクション数をNとすると一定時間tにおけるタスク
生成処理(コネクション確立毎生成)時間F(A)は、
Aのみ該当し、 F(A)=F×N・・・・・・・・・・・・・・(2) タスクスイッチに要する時間(POSTされてからタス
クが起動するまでの時間) において、従来の組込みにお
いて対象となるOSをPA、割込みによるマルチタスク
OSをPBとすると1パケット受信に対しIPタスク、
TCPタスクがそれぞれ起動するため一定時間tにおけ
るタスクチェンジ処理時間P(A)、P(B)は、Aで
は、1パケット受信毎にIPタスク、TCPタスクが呼
び出されるので、 P(A)=2×PA×t×n・・・・・・・・・(3) Bでは、t時間内に1度TCP/IP部4が呼ばれるの
で、 P(B)=PB・・・・・・・・・・・・・・・(4) 従来方法の一定時間tにおける受信処理に要する時間r
Aは式(1)(2)(3)より、 rA=E(A,B)+F(A)+P(A) =Etn+FN+2(PA)tn・・・(5) タイマ割り込みが起動し、割り込み内の処理が起動する
までの時間をIとすると、本方法の一定時間tにおける
受信処理に要する時間rBは、(1)(4)より、 rB=E(A,B)+P(B)+I =Etn+PB+I・・・・・・・・・(6) となるから、それらの差Recは式(5)、(6)より
次の式で示すことができる。
First, the processing is limited to the TCP / IP unit 4, the time is limited to t, and the packet reception time is divided into the packet processing time and the OS processing time to be obtained. If the number of packets received in a unit time is n and the time for processing one packet is E, the packet processing time E (A,
In B), both A and B are E (A, B) = E × t × n (1) Further, the processing time of the OS is the task generation time and the task switch time. Is F, the time for creating and executing a child task by the fork () function or the like is F, and the average number of connections to be accessed at the same time is N, the task creation processing (generation for each connection establishment) time F (A) at a fixed time t. Is
Only A is applicable, and F (A) = F × N ... (2) In the time required for task switching (time from POST to task activation), In the conventional installation, if the target OS is PA and the multitask OS due to interrupt is PB, the IP task for 1 packet reception,
Since the TCP tasks are activated respectively, the task change processing times P (A) and P (B) at a constant time t are as follows: In A, the IP task and the TCP task are called every time one packet is received, so P (A) = 2 × PA × t × n (3) In B, the TCP / IP unit 4 is called once within the time t, so P (B) = PB. (4) Time r required for reception processing at a fixed time t in the conventional method
A is calculated from the equations (1), (2) and (3): rA = E (A, B) + F (A) + P (A) = Etn + FN + 2 (PA) tn (5) Timer interrupt is activated, and Assuming that the time until the processing of (1) is activated is I, the time rB required for the receiving processing at the constant time t of this method is as follows from (1) and (4): rB = E (A, B) + P (B) + I = Etn + PB + I ... (6) Therefore, the difference Rec between them can be expressed by the following equation from equations (5) and (6).

【0054】 Rec=rA−rB =FN+2(PA)tn−PB−I・・(7) 従って、本組込み方法により一定時間tにおけるパケッ
トの受信時間をFN+2(PA)tn−PB−Iだけ短
縮することができる。
Rec = rA-rB = FN + 2 (PA) tn-PB-I ... (7) Therefore, the packet receiving time at the fixed time t is shortened by FN + 2 (PA) tn-PB-I by this embedding method. be able to.

【0055】また、従来の組込み方法では、受信側ノー
ドは1パケットを受信するとIPタスクを経由し、直ち
に制御をTCPタスクへ移す。そしてTCPタスクが1
パケットの処理を終了すると、制御を他のタスクへ移さ
なければならないので、後続のパケットの受信を待っ
て、それらをまとめて応答することは難しい。そのた
め、1パケット受信する毎に応答パケットをクライアン
トに返していた。
Further, in the conventional embedding method, when the receiving side node receives one packet, it passes the IP task and immediately transfers the control to the TCP task. And the TCP task is 1
It is difficult to wait for the reception of subsequent packets and respond to them in bulk, because control must be transferred to another task when the processing of the packets is finished. Therefore, a response packet is returned to the client every time one packet is received.

【0056】従来の方法の応答処理時間SAと本実施の
形態による方法の応答処理時間SBとの差Resは次の
ように求めることができる。
The difference Res between the response processing time SA of the conventional method and the response processing time SB of the method according to the present embodiment can be obtained as follows.

【0057】 SA=t×n×R+t×n×PA+t×n×S・・・(8) SB=N×R+S・・・・・・・・・・・・・・・・(9) 式(8)(9)より、 Res=SA−SB =tnR+tn(PA)−NR+(tn−1)S・・(10) nは単位時間に受信するパケット数、tは本実施の形態
による組込みで採用するタイマ割込みの間隔、PAは従
来の組込みにおいて対象となるOSのタスクスイッチ時
間、PBは割込みよるマルチタスクOSのタスクスイッ
チ時間、Nは同時にアクセスする平均コネクション数、
Rは1パケットの応答処理に要する時間、SはNIC3
への送信要求処理時間と送信完了割り込み処理時間の和
である。従って、本実施の形態による組込み処理によっ
て応答処理時間をtnR+tn(PA)−NR+(tn
−1)Sだけ短縮することができる。
SA = t × n × R + t × n × PA + t × n × S (8) SB = N × R + S (9) Formula ( 8) From (9), Res = SA-SB = tnR + tn (PA) -NR + (tn-1) S ... (10) n is the number of packets received per unit time, and t is adopted by the incorporation according to the present embodiment. Timer interrupt interval, PA is the task switch time of the target OS in the conventional installation, PB is the task switch time of the multi-task OS due to interrupts, N is the average number of connections to be accessed simultaneously,
R is the time required for response processing of one packet, S is NIC3
Is the sum of the transmission request processing time and the transmission completion interrupt processing time. Therefore, the response processing time is tnR + tn (PA) −NR + (tn by the built-in processing according to the present embodiment.
-1) It can be shortened by S.

【0058】また、図7に示すように、実際の送信で
は、NIC3に対して送信に必要な情報をセットする前
処理、NIC3が行う送信処理と、送信完了後行う後処
理が必要である。特に後処理は、送信完了時に割込みと
して起動されるのでレジスタの退避等で数100ミリ秒
が必要となり、従来の方法では送信の度にこの割込みが
発生する。本実施の形態による方法では時間t内に発生
する送信要求および、受信したデータの応答パケットの
送信を、NIC3に対し同時に起動をかけるため送信に
おける前処理と後処理は常に1回となる。
Further, as shown in FIG. 7, in actual transmission, preprocessing for setting information necessary for transmission to the NIC 3, transmission processing performed by the NIC 3, and postprocessing performed after completion of transmission are required. Particularly, since the post-processing is started as an interrupt when the transmission is completed, it takes several hundred milliseconds for saving the registers, etc. In the conventional method, this interrupt is generated every transmission. In the method according to the present embodiment, the transmission request generated within the time t and the transmission of the response packet of the received data are simultaneously activated to the NIC 3, so that the pre-processing and the post-processing in the transmission are always once.

【0059】送信パターン2の一定時間tにおける、従
来の組込み方法の処理時間YA、と本実施の形態による
組込み方法の処理時間YBとの差Senを求めると、 YA=t×Y×S・・・・・・・・・・・・・・(11) YB=S・・・・・・・・・・・・・・・・・・(12) 式(11)(12)より Sen=YA−YB =(tY−1)S・・・・・・・・・・・・(13) Yは単位時間内に発生する送信要求数、SはNIC3へ
の送信要求処理時間と送信完了割り込み処理時間の和で
ある。
When a difference Sen between the processing time YA of the conventional embedding method and the processing time YB of the embedding method according to the present embodiment at a constant time t of the transmission pattern 2 is calculated, YA = t × Y × S. ···················································································································· ((12) -YB = (tY-1) S ... (13) Y is the number of transmission requests generated within a unit time, S is the transmission request processing time to the NIC 3 and transmission completion interrupt processing It is the sum of time.

【0060】一定時間t内にパケットを受信している場
合は、その応答パケットと一緒に送信処理を行うため、
YBは0となり、Sen=tYSとなる。従って、本実
施の形態による組込み方法により、送信時間を( tY−
1) Sまたは、tYSだけ短縮することができる。
When the packet is received within the fixed time t, the transmission process is performed together with the response packet.
YB becomes 0, and Sen = tYS. Therefore, the transmission time is (tY-
1) It can be shortened by S or tYS.

【0061】本送信処理で送信するパケットのタイムア
ウト処理も送信パタ−ン1と同様にタイマ割り込み中で
行う。従来の送信したパケットに対するタ−ンアラウン
ド時間のタイムアウト処理は、送信したすべてのパケッ
トそれぞれに対しタイマをカウントする必要があるが、
本実施の形態による方法のように一定数のパケットを同
時に送信することにより、パケットのタイマ管理をグル
−プ化し処理時間を短縮することができる。
The time-out process for the packet to be transmitted in this transmission process is also performed during the timer interrupt as in the transmission pattern 1. In the conventional turn-around time-out process for transmitted packets, it is necessary to count the timer for each of all transmitted packets.
By transmitting a fixed number of packets at the same time as in the method according to the present embodiment, it is possible to group the packet timer management and reduce the processing time.

【0062】また、従来はコネクションの接続している
間はTCPタスクは起動したままとなり、タイムスライ
ス処理で他のタスクを実行しており、タイムスライス処
理に常に一定量のCPU資源を使用しているので、プロ
トコル処理や、プリンタファームウェアの処理の動作す
る効率が非常に悪くなる。
Conventionally, the TCP task remains activated while the connection is connected, and other tasks are executed in the time slice processing, and a constant amount of CPU resource is always used for the time slice processing. Therefore, the operating efficiency of protocol processing and printer firmware processing becomes very poor.

【0063】本実施の形態による組込み方法では、ジョ
ブのスケジューリングにプライオリティを用いた割り込
みを使用し、タイムスライスによるラウンドロビン方式
は採用していない。
In the embedding method according to the present embodiment, interrupts using priority are used for job scheduling, and the round robin method by time slice is not adopted.

【0064】第1の実施の形態によれば、TCP/IP
部は受信バッファに受信してあるすべてのパケットを割
り込み処理時間t内に処理するので、OSのオ−バヘッ
ドを削減することができ、CPUを他の有効な処理に割
り当てることができる。
According to the first embodiment, TCP / IP
Since the unit processes all the packets received in the reception buffer within the interrupt processing time t, it is possible to reduce the overhead of the OS and allocate the CPU to other effective processing.

【0065】第2の実施の形態 一般に割込み内での動作が多いと、他の処理への影響が
大きくなるので、第2の実施の形態では極力割込み内の
処理を減らし、大部分の処理をIFCタスクに組み込む
ようにしたものである。
Second Embodiment In general, if there are many operations in the interrupt, the influence on other processing becomes large. Therefore, in the second embodiment, the processing in the interrupt is reduced as much as possible, and most of the processing is omitted. It is designed to be incorporated in the IFC task.

【0066】図5は第2の実施の形態によるプリンタの
ネットワ−クア−キテクチャを示すブロック図であり、
受信割込み手段20とインタ−バルタイマ21とインタ
−フェ−ス制御手段としてのIFCタスク22とから成
る。
FIG. 5 is a block diagram showing the network architecture of the printer according to the second embodiment.
It comprises a reception interruption means 20, an interval timer 21, and an IFC task 22 as an interface control means.

【0067】受信割込み手段20は、パケットの受信時
に起動して受信パケットをメモリ5の受信バッファ5a
に格納する毎にIFCタスク22にメッセ−ジ(message
-X)を出力する。インタ−バルタイマ21はカウンタ2
1bがカウントアップする毎にIFCタスク22にメッ
セ−ジ(message-S) を出力する。
The reception interrupt means 20 is activated when a packet is received, and the reception packet is received by the reception buffer 5a of the memory 5.
Each time it is stored in the IFC task 22, a message (message
-X) is output. Interval timer 21 is counter 2
Each time 1b counts up, it outputs a message (message-S) to the IFC task 22.

【0068】IFCタスク22は、メッセ−ジを受信し
て呼び出し処理を行うメッセ−ジ処理手段24と、デ−
タリンク層(2層)、ネットワ−ク層(3層)、トラン
スポ−ト層(4層)の各プロトコルを処理して所定量に
達するまでメモリ5のパケット一時バッファ5bに蓄積
する第1のパケット処理手段23と、パケット一時バッ
ファ5bからパケットを取り出してセッション層(5
層)、プレゼンテ−ション層(6層)、アプリケ−ショ
ン(7層)の各プロトコルを処理し、デ−タをメモリ5
のデ−タバッファ5dに出力する第2のパケット処理手
段30と、第1のパケット処理手段23から呼び出され
てメッセ−ジ(message-A) をメッセ−ジ処理手段24に
出力し、メッセ−ジ処理手段24からの呼び出し応じて
第2のパケット処理手段30に起動を駆けるソケット処
理手段28と、セントロニクス、RS−232C等のケ
−ブルを制御するIFCタスク内の制御モジュ−ル32
とを備えている。
The IFC task 22 receives a message and performs a calling process on the message, and a message processing means 24.
The first packet stored in the packet temporary buffer 5b of the memory 5 by processing each protocol of the link layer (2 layers), the network layer (3 layers), and the transport layer (4 layers) until a predetermined amount is reached. A packet is taken out from the processing means 23 and the temporary packet buffer 5b and the session layer (5
Layer), presentation layer (6 layers), and application (7 layers) protocols, and the data is stored in the memory 5
Of the second packet processing means 30 for outputting to the data buffer 5d and the first packet processing means 23 for outputting a message (message-A) to the message processing means 24, In response to a call from the processing means 24, the socket processing means 28 that activates the second packet processing means 30 and the control module 32 in the IFC task that controls the cables such as Centronics and RS-232C.
It has and.

【0069】第1のパケット処理手段23は、受信割込
み手段20からメッセ−ジ処理手段24にメッセ−ジ(m
essage-X) が出力されることによって起動され、受信バ
ッファ5aから受信パケットを取り出してデ−タリンク
層(2層)のプロトコル処理を行うネットワ−クドライ
バ25と、ネットワ−クドライバ25が処理した受信パ
ケットのネットワ−ク層(3層)とトランスポ−ト層
(4層)の各プロトコルを処理してメモリ5のパケット
一時バッファ5bに蓄積するプロトコルスタック(TCP/I
P 、SPX/IPX 、その他)26と、インタ−バルタイマ2
1からメッセ−ジ処理手段24にメッセ−ジ(message-
S) が出力されることによって起動され、コネクション
を管理するタイマ処理手段31とを備えている。
The first packet processing means 23 sends a message (m) from the reception interruption means 20 to the message processing means 24.
essage-X) is output, the received packet is taken out from the reception buffer 5a and the network driver 25 that performs the protocol processing of the data link layer (layer 2) and the network driver 25 processed it. A protocol stack (TCP / I) that processes each protocol of the network layer (3 layers) and the transport layer (4 layers) of the received packet and accumulates it in the packet temporary buffer 5b of the memory 5.
P, SPX / IPX, etc.) 26 and interval timer 2
From 1 to the message processing means 24, a message (message-
S) is activated, and timer processing means 31 for managing the connection is provided.

【0070】第2のパケット処理手段30は、プロトコ
ルスタック26を使用することにより実際に他のノ−ド
と通信するアプリケ−ション(FTP、RPRINTER、その他)
27と、アプリケ−ション27が処理したデ−タのキュ
−管理を行うジョブ制御モジュ−ル29とを備えてい
る。
The second packet processing means 30 is an application (FTP, RPRINTER, etc.) that actually communicates with another node by using the protocol stack 26.
27 and a job control module 29 for managing the queue of the data processed by the application 27.

【0071】ソケット処理手段28はアプリケ−ション
27とプロトコルスタック26の間の通信行う上で共通
のインタフェ−スを提供し、プロトコルスタック26に
呼び出され、アプリケ−ション27を指定するメッセ−
ジ(message-A) をメッセ−ジ処理手段24に出力するソ
ケット(Low) 28aと、メッセ−ジ処理手段24に呼び
出されメッセ−ジに含まれる内容に基づいてアプリケ−
ション27を選択するソケット(High)28bとを有す
る。
The socket processing means 28 provides a common interface for communication between the application 27 and the protocol stack 26, and is called by the protocol stack 26 to specify the application 27.
A socket (Low) 28a for outputting the message (message-A) to the message processing means 24, and an application based on the contents included in the message called by the message processing means 24.
Socket (High) 28b for selecting the option 27.

【0072】図6はアプリケ−ションFTPの構成を示
すブロック図である。アプリケ−ションFTP27a
は、イニシャル処理部35と、メイン処理部36とから
構成される。
FIG. 6 is a block diagram showing the structure of the application FTP. Application FTP27a
Is composed of an initial processing unit 35 and a main processing unit 36.

【0073】イニシャル処理部35は、プリンタ1から
のイニシャル要求に対し、FTP内のワ−キング等の初
期化の他、アプリケ−ション登録をソケット(High)28
bに対して行う。
In response to the initial request from the printer 1, the initial processing section 35 initializes the working in the FTP, etc. and registers the application with the socket (High) 28.
Perform on b.

【0074】メイン処理36は、メッセ−ジ(message-
A) の解析部37と、下位層の状態をmessage-A によっ
て通知された時に呼び出されるコネクション管理部38
と、受信したパケットの処理を行う際に参照するデ−タ
解析部39と、デ−タ解析部39でコマンドと判断され
たときに呼ばれるコマンド分岐部40と、各コマンドの
処理群41とから成る。
The main processing 36 is a message (message-
A) analysis unit 37 and connection management unit 38 that is called when the status of the lower layer is notified by message-A
From a data analysis unit 39 referred to when processing the received packet, a command branching unit 40 called when the data analysis unit 39 determines that the command is a command, and a processing group 41 for each command. Become.

【0075】図7はコネクション管理テ−ブルの説明図
であり、コネクション別に「コネクションの状態」、
「処理中のコマンド」、「コネクションNo」、「送信
パケット数」、「相手先ポ−トNo」が配列されてあ
る。コネクション管理テ−ブルはコネクション管理部3
8により管理され、受信したパケットの処理を行う際に
にメッセ−ジ解析部37より参照される。
FIG. 7 is an explanatory diagram of the connection management table. "Connection state" for each connection,
"Processing command", "connection No", "transmission packet number", and "destination port No" are arranged. The connection management table is the connection management unit 3
8 and is referred to by the message analysis unit 37 when processing the received packet.

【0076】図8はコネクションの状態と設定値との関
係を示す説明図、図9はプロトコルスタックの各処理手
段の処理ステップ数と負荷との関係を示す負荷算出テ−
ブル、図10はパケットを再送する際の処理を示すフロ
−チャ−トである。
FIG. 8 is an explanatory view showing the relationship between the connection state and the set value, and FIG. 9 is a load calculation table showing the relationship between the number of processing steps of each processing means of the protocol stack and the load.
FIG. 10 is a flowchart showing the processing when the packet is retransmitted.

【0077】次に動作について説明する。クライアント
よりランダムに送られてくるパケットは、ネットワ−ク
接続用H/WであるNIC3からの受信割り込み信号が
CPU1に入力され、受信割り込みプログラムからなる
受信割込み手段20によってリアルタイムに受信され、
受信バッファ5aに格納される。1パケットを格納する
毎に受信割込み手段20は、図5に矢印(a)で示すよ
うに、メッセ−ジ(message-X) をIFCタスク22に対
し出力する。
Next, the operation will be described. The packet randomly sent from the client receives a reception interrupt signal from the NIC 3 which is a network connection H / W, is input to the CPU 1, and is received in real time by the reception interrupt means 20 including a reception interrupt program.
It is stored in the reception buffer 5a. Each time one packet is stored, the reception interrupt means 20 outputs a message (message-X) to the IFC task 22 as indicated by an arrow (a) in FIG.

【0078】IFCタスク22のメッセ−ジ処理手段2
4は、アイドル時はIFCタスク宛のメッセ−ジのセン
スをしている。メッセ−ジ(message-X) よりも先にIF
Cタスク宛に送られたメッセ−ジがあればIFCタスク
22はその処理を先に実行する。
Message processing means 2 of IFC task 22
No. 4 senses a message addressed to the IFC task when idle. IF before message (message-X)
If there is a message sent to the C task, the IFC task 22 executes the processing first.

【0079】メッセ−ジ処理手段24はメッセ−ジ(mes
sage-X) を受信すると、図5に矢印(b)で示すよう
に、ネットワ−クドライバ25を呼び出す。ネットワ−
クドライバ25は、通常のデ−タリンク層(2層)の処
理を行うが、複数のNIC3および複数の2層プロトコ
ル( 例えばEthernet、IEEE802.3 、IEEE802.5 等) にも
対応できる。
The message processing means 24 uses the message (mes)
sage-X), the network driver 25 is called as indicated by the arrow (b) in FIG. Network
The driver 25 performs a normal data link layer (2 layer) process, but can also handle a plurality of NICs 3 and a plurality of 2 layer protocols (eg, Ethernet, IEEE802.3, IEEE802.5, etc.).

【0080】ネットワ−クドライバ25は、デ−タリン
ク層のプロトコル処理を終了すると、図5に矢印(c)
で示すように、上位層を識別して対応するプロトコルス
タック26、例えばTCP/IP26aを呼び出す。T
CP/IP26aはTCPとIPとを別タスクとせず一
つのタスクとして作成されているので、TCP−IP間
のオ−バ−ヘッドを削減する。
When the network driver 25 completes the protocol processing of the data link layer, the arrow (c) in FIG.
As shown by, the upper layer is identified and the corresponding protocol stack 26, for example, TCP / IP 26a is called. T
Since the CP / IP 26a is created as one task, not TCP and IP as separate tasks, the overhead between TCP and IP is reduced.

【0081】TCP/IP26aは、ネットワ−クドラ
イバ25から受信したパケットのネットワ−ク層(3
層)とトランスポ−ト層(4層)のプロトコル処理を行
い、そのパケットをメモリ5のパケット一時バッファ5
bに格納し、ネットワ−クドライバ25に対して制御を
返す。
The TCP / IP 26a is used for the network layer (3) of the packet received from the network driver 25.
Layer) and transport layer (4 layers) protocol processing, and the packet is stored in the packet temporary buffer 5 of the memory 5.
It is stored in b and the control is returned to the network driver 25.

【0082】ネットワ−クドライバ25は制御をIFC
タスク22から他のタスクへ返し、次のパケットの受信
を待つ。
The network driver 25 controls the IFC.
The task 22 returns to another task and waits for the reception of the next packet.

【0083】以上の処理を数回繰り返すと、パケット一
時バッファ5bにパケットが一定量蓄積される。TCP
/IP26aはパケットが一定量に達すると、図5に矢
印(d)で示すように、ソケット(Low) 28aに対し、
対応するアプリケ−ション27を指定する情報を出力し
てパケットの受け取りを要求する。
When the above process is repeated several times, a fixed amount of packets are accumulated in the packet temporary buffer 5b. TCP
/ IP 26a, when the number of packets reaches a certain amount, as shown by the arrow (d) in FIG. 5, for socket (Low) 28a,
Information for designating the corresponding application 27 is output to request receipt of the packet.

【0084】ソケット(Low) 28aは、直接、ソケット
(High)28bを呼び出さず、図5に矢印(e)で示すよ
うに、メッセ−ジ処理手段24に対しメッセ−ジ(messa
ge-A) を出力する。本処理により、メッセ−ジ処理手段
24に起動を駆けられ、セントロニクス、RS−232
C等のケ−ブルを制御するIFCタスク内の制御モジュ
−ル32が動作するきっかけを与えることができる。
The socket (Low) 28a is a direct socket
(High) 28b is not called, and the message processing means 24 is sent to the message (messa) as shown by an arrow (e) in FIG.
ge-A) is output. By this processing, the message processing means 24 is activated, and Centronics, RS-232
The control module 32 in the IFC task that controls a cable such as C can be actuated.

【0085】メッセ−ジ処理手段24はメッセ−ジ(mes
sage-A) を受信すると、図5に矢印(f)で示すよう
に、ソケット(High)28bを呼び出す。ソケット(High)
28bは、図5に矢印(h)で示すように、メッセ−ジ
(message-A) の内容に基づいてアプリケ−ション、例え
ばFTP27aを呼び出す。
The message processing means 24 uses a message (mess).
When sage-A) is received, the socket (High) 28b is called as indicated by an arrow (f) in FIG. Socket (High)
28b is a message as indicated by an arrow (h) in FIG.
An application, for example, FTP 27a is called based on the content of (message-A).

【0086】FTP27aは、パケット一時バッファ5
bに蓄積されたパケットを全て処理し、図5に矢印
(i)で示すように、ジョブ制御モジュ−ル29を呼び
出す。
The FTP 27a is a packet temporary buffer 5
All the packets stored in b are processed, and the job control module 29 is called as indicated by an arrow (i) in FIG.

【0087】ジョブ制御モジュ−ル29は、図5に矢印
(j)で示すように、パケットのデ−タをメモリ5のデ
−タバッファ5dに格納する。
The job control module 29 stores the data of the packet in the data buffer 5d of the memory 5, as shown by the arrow (j) in FIG.

【0088】ここで、FTPの動作を図6〜図11を参
照して詳細に説明する。FTP27aはソケット(High)
28bから受信したメッセ−ジ(message-A) により呼ば
れる関数により起動される。メッセ−ジ解析部37はメ
ッセ−ジ(message-A) の内容を解析し、コネクションに
関する状態を通知するものであれば、コネクション管理
部38を呼び出す。コネクション管理部38は、メッセ
−ジ(message-A) の内容により、図7、8に示すコネク
ション管理テ−ブルの「コネクションの状態」の設定値
を変更する。
Here, the operation of the FTP will be described in detail with reference to FIGS. FTP27a is socket (High)
It is activated by a function called by the message (message-A) received from 28b. The message analysis unit 37 analyzes the content of the message (message-A), and calls the connection management unit 38 if it notifies the state of the connection. The connection management unit 38 changes the setting value of the "connection state" of the connection management table shown in FIGS. 7 and 8 according to the contents of the message (message-A).

【0089】メッセ−ジ解析部37は、メッセ−ジ(mes
sage-A) の内容がパケットの受信であれば、デ−タ解析
部39を呼び出す。デ−タ解析部39は、ソケット(Hig
h)28bに対してパケットの獲得を要求し、受信したパ
ケットの「コネクションの状態」を知るために、図7に
示したコネクション管理テ−ブルの「コネクションの状
態」を参照する。
The message analysis section 37 displays a message (mess).
If the content of sage-A) is the reception of a packet, the data analysis unit 39 is called. The data analysis unit 39 uses a socket (Hig
h) To request the packet acquisition to 28b and to know the "connection state" of the received packet, refer to the "connection state" of the connection management table shown in FIG.

【0090】「コネクションの状態」が、図8に示した
ように設定値4であれば、獲得したパケットは、印字デ
−タと判断し、ジョブ制御モジュ−ル29にパケットを
渡す。「コネクションの状態」が、設定値0、又は3で
ある場合には、パケットを受信する状態ではないので、
獲得したパケットを捨てる。
If the "connection state" is the set value 4 as shown in FIG. 8, the acquired packet is judged as print data and the packet is passed to the job control module 29. If the "connection status" is the set value 0 or 3, it means that the packet is not received.
Discard the acquired packet.

【0091】「コネクションの状態」が、設定値1、又
は2である場合には、獲得したパケットは、コマンドで
あると判断してコマンド分岐部40を呼び出す。コマン
ド分岐部40は、「コネクションの状態」が、設定値1
で受信したパケットがログイン要求(USERコマン
ド)である場合には、ログイン処理と判断し、コネクシ
ョン管理部38を呼び出す。
When the "connection state" is the set value 1 or 2, the acquired packet is judged to be a command and the command branching unit 40 is called. In the command branching unit 40, the "connection state" is set value 1
If the packet received in step 5 is a login request (USER command), it is determined to be login processing, and the connection management unit 38 is called.

【0092】「コネクションの状態」が、設定値2であ
る場合には、ログイン済であるので、ログイン要求以外
のコマンドを受け付けられるので、該当するコマンド処
理部41を呼び出す。
If the "connection state" is the set value 2, the command has been logged in, and a command other than the login request can be accepted. Therefore, the corresponding command processing unit 41 is called.

【0093】コマンド処理部41は送受信を必要とする
コマンドを受け付けた場合には、クライアントに対して
処理し、デ−タのコネクションの確立を行うために、下
位層に対してコネクションの確立要求を出す。
When the command processing unit 41 receives a command that needs to be transmitted and received, it processes the client and requests the lower layer to establish a connection in order to establish a data connection. put out.

【0094】コネクションが確立されるまでの間は、他
の処理に制御を渡すため、デ−タコネクションの確立後
の処理をコネクション管理テ−ブルの「処理中のコマン
ド」に書き込み、保持する。
Until the connection is established, control is passed to other processing, so the processing after the establishment of the data connection is written and held in the "processing command" of the connection management table.

【0095】このように、各処理が独立してコネクショ
ン管理テ−ブルの「コネクションの状態」エリアの設定
値によって動作するので、複数のコネクション管理を行
うことができる。
As described above, since each processing independently operates according to the set value in the "connection status" area of the connection management table, it is possible to manage a plurality of connections.

【0096】パケット送信時のタイマ処理は、図5に矢
印(l)〜(n)で示すように行なわれる。まず、一定
時間毎にインタ−バルタイマ21は、矢印(l)で示す
ように、IFCタスク22のメッセ−ジ処理手段24に
対してメッセ−ジ(message-S)を出力する。
Timer processing during packet transmission is performed as shown by arrows (l) to (n) in FIG. First, the interval timer 21 outputs a message (message-S) to the message processing means 24 of the IFC task 22 as shown by an arrow (1) at regular time intervals.

【0097】メッセ−ジ処理手段24はメッセ−ジ(mes
sage-S)を受信すると、矢印(m)に示すように、タイ
マ処理手段31を呼び出す。タイマ処理手段31は、矢
印(n)に示すように、必要に応じてプロトコルスタッ
ク26を呼び出す。
The message processing means 24 uses a message (mess).
When sage-S) is received, the timer processing means 31 is called as indicated by the arrow (m). The timer processing means 31 calls the protocol stack 26 as needed, as shown by the arrow (n).

【0098】タイマ処理手段31及びタイマ処理手段3
1によって呼び出されるプロトコルスタックの動作を図
10に基づいて説明する。プロトコルスタック26は、
例えばTCP/IP26aが呼び出されているものとす
る。まず、ステップS1 とステップS2 とは、全コネク
ションにおいて毎回実行しなければならない処理で、タ
イマ処理手段31を起動することにより必ず実行され
る。
Timer processing means 31 and timer processing means 3
The operation of the protocol stack called by 1 will be described with reference to FIG. The protocol stack 26
For example, assume that TCP / IP 26a is being called. First, steps S1 and S2 are processes that must be executed every time for all connections, and are always executed by activating the timer processing means 31.

【0099】即ち、「コネクションの状態」のチェッ
ク、応答待ちパケットのタイマカウント処理、パケット
の再送処理、Max Timeout処理等を実行す
る。
That is, the "connection state" check, the timer count process of the response waiting packet, the packet retransmission process, the Max Timeout process, etc. are executed.

【0100】その他のステップは、プロトコル上必ず毎
回実行する必要のない処理で、処理時間のかかるものが
多く、時間的に処理量のばらつきが大きい。これらの処
理は、図9に示すような処理ステップ数と対応する負荷
係数Gを用いる。
The other steps are processes that do not need to be executed every time according to the protocol and often take a long processing time, resulting in large variations in the processing amount. These processes use the load coefficient G corresponding to the number of processing steps as shown in FIG.

【0101】まずステップS3 で、負荷変数を初期化す
る。ステップS4 で、コネクション単位に要求される処
理を行い、1コネクションの処理が終了するまで行う。
First, in step S3, the load variable is initialized. In step S4, the processing required for each connection is performed until the processing for one connection is completed.

【0102】ステップS5 で1コネクションの処理の最
後に行った処理の負荷係数Gの合計を負荷変数に加算す
る。ステップS6 で、負荷変数が一定値(MAX) 以上であ
れば、ステップS8 で処理を中断してタイマ関数を抜け
る。このとき次にタイマ関数が呼び出された時に処理を
開始するコネクションの位置( コネクションNo.)をメモ
リ5のグロ−バルエリア内の変数に記憶しておく。
In step S5, the sum of the load coefficients G of the processing performed at the end of the processing for one connection is added to the load variable. If the load variable is equal to or greater than the constant value (MAX) in step S6, the process is interrupted in step S8 and the timer function is exited. At this time, the position of the connection (connection No.) at which the processing is started when the timer function is called next time is stored in a variable in the global area of the memory 5.

【0103】負荷変数が一定値(MAX) 以下であれば、全
コネクションの処理を終了するまでステップS3 〜ステ
ップS7 を繰り返す。
If the load variable is equal to or less than the fixed value (MAX), steps S3 to S7 are repeated until the processing of all connections is completed.

【0104】負荷変数が一定値(MAX) 以下のまま、すべ
てのコネクションの処理を終了した場合はタイマ処理を
抜ける。
When the processing of all the connections is completed while the load variable remains below the fixed value (MAX), the timer processing is terminated.

【0105】第2の実施の形態によれば、ネットワ−ク
プロトコル( 2層〜7層) 処理をシングルタスク上でソ
ケットインタフェ−スにより下位層と上位層とに分け、
OSの基本機能であるメッセ−ジによって各層の処理手
段に起動をかけ得るようにしたので、シングルタスク上
で2つの処理に優先順位をつけることができ、また、ネ
ットワ−クプロトコル処理中に割込みにより他のインタ
−フェ−ス処理を受け付けることができるので、同一タ
スク上で他のホストインタフェ−ス( セントロニクス、
RS-232C)との共存を可能とした。
According to the second embodiment, the network protocol (2nd to 7th layers) processing is divided into a lower layer and an upper layer by a socket interface on a single task.
Since the message, which is the basic function of the OS, can be used to activate the processing means of each layer, it is possible to prioritize two processes on a single task and to interrupt during network protocol processing. Can accept other interface processing, so other host interfaces (Centronics,
Enables coexistence with RS-232C).

【0106】また、タイマ処理手段を設けたことによ
り、一時期に集中しがちな処理の負荷を分散し平均化さ
せ、安定したシステム状態を保つことができる。このこ
とにより、プリンタではオ−バ−ランや、オ−バ−フロ
−等の性能を向上させ、ネットワ−ク処理の集中に関係
なく安定した性能を保つことができる。
Further, by providing the timer processing means, it is possible to maintain a stable system state by dispersing and averaging the processing loads that tend to concentrate in a temporary period. As a result, the printer can improve the performance such as overrun and overflow, and can maintain stable performance regardless of the concentration of network processing.

【0107】また、シングルタスク上で動作するアプリ
ケ−ションでマルチコネクションを確立し、管理するこ
とが可能となる。
In addition, it is possible to establish and manage multi-connection by an application operating on a single task.

【0108】第3の実施の形態 第3の実施の形態は受信バッファ5aの使用量を定期的
に検知して許容コネクション数を変化させ、処理飽和状
態からのリカバリ−を迅速にするとともに、低要求コネ
クション確立時にも、効率良く動作させるようにしたも
のである。
Third Embodiment In the third embodiment, the usage amount of the reception buffer 5a is periodically detected to change the allowable number of connections to speed up recovery from a processing saturation state and to reduce the number of connections. It is designed to operate efficiently even when a request connection is established.

【0109】図11は第3の実施の形態によるインタ−
バルタイマ処理の要部を示すブロック図、図12は許容
コネクションを増減させる際に使用するテ−ブルであ
る。
FIG. 11 shows an interface according to the third embodiment.
FIG. 12 is a block diagram showing the main part of the val timer processing, and FIG. 12 is a table used when increasing or decreasing the allowable connections.

【0110】まず、図5に示したタイマ処理手段31に
受信バッファ5aの使用量をセンスするバッファ数セン
ス部50と、図12に示したテ−ブル51aを参照して
処理負荷を判断する判断部51と、許容コネクション数
を設定するコネクション数設定部52とを設ける。
First, the timer processing means 31 shown in FIG. 5 judges the processing load by referring to the buffer number sensing unit 50 for sensing the usage amount of the reception buffer 5a and the table 51a shown in FIG. A unit 51 and a connection number setting unit 52 that sets the allowable number of connections are provided.

【0111】次に動作について図13に従って説明す
る。図13は第3の実施の形態の動作を示すフロ−チャ
−トである。ステップS1 でバッファ数センス部50は
インタ−バルタイマ21の周期で受信バッファ5aの使
用量をセンスし、ステップS2で受信バッファ5aの使
用量をグローバルに確保したメモリ5の記憶領域Xに格
納する。また、1回目のセンス時は、「前回のセンス時
の受信バッファ使用量(Y)」データは存在しないので
c、メモリ5の記憶領域Yを0xFFFFにしておく。
Next, the operation will be described with reference to FIG. FIG. 13 is a flow chart showing the operation of the third embodiment. In step S1, the buffer number sensing unit 50 senses the usage amount of the reception buffer 5a in the cycle of the interval timer 21, and stores the usage amount of the reception buffer 5a in the storage area X of the globally reserved memory 5 in step S2. At the time of the first sensing, since there is no "reception buffer usage amount (Y) at the last sensing" data, the storage area Y of the memory 5 is set to 0xFFFF.

【0112】ステップS3 で記憶領域Yの内容が0xFF
FFか否かをチェックし、0xFFFFの場合にはステッ
プS5 に分岐し、否の場合はステップS4 に分岐する。
ステップS4 で「前回のセンス時の受信バッファ使用量
(Y)」データが存在するので、「今回のセンス時の受
信バッファ使用量(X)」を用い、図12に示すテ−ブ
ル51aとの比較により、許容コネクション数の変更量
を決定し、メモリ5の記憶領域Zへ書き込む。
In step S3, the contents of the storage area Y is 0xFF.
Whether it is FF or not is checked. If it is 0xFFFF, the process branches to step S5. If not, the process branches to step S4.
In step S4, since "reception buffer use amount (Y) at the last sense" data exists, the "reception buffer use amount (X) at the present sense" is used to compare the data with the table 51a shown in FIG. By comparison, the amount of change in the allowable number of connections is determined and written in the storage area Z of the memory 5.

【0113】ステップS5 で、次のセンスに備え、「今
回センス時の受信バッファ使用量(X)」を「前回のセ
ンス時の受信バッファ使用量(Y)」へコピーする。
In step S5, the "reception buffer usage amount (X) at this time sense" is copied to the "reception buffer usage amount (Y) at the previous sense" in preparation for the next sensing.

【0114】ステップS6 で、記憶領域Zの内容が0か
否かをチェックして、0ならばステップS1 に戻って次
のインタ−バルタイマ21による起動を待ち、否ならば
ステップS7 で記憶領域Zの内容に応じたコネクション
数を増減させる。コネクション数設定部52は、記憶領
域Zの内容が0以外の時に起動し、記憶領域Zの内容に
応じたコネクション数を増減させる。本処理は、記憶領
域Zの内容が正の数である時には、各コネクションに必
要な領域の確保とイニシャライズ行う。記憶領域Zの内
容が負の数である時には各コネクションに必要な領域を
使用不可能にする。許容数までコネクションが接続して
いる場合は、コネクションが切断され次第各コネクショ
ンに必要な領域を使用不可能にする。
In step S6, it is checked whether or not the content of the storage area Z is 0. If it is 0, the procedure returns to step S1 and waits for the activation by the next interval timer 21, otherwise, in step S7 the storage area Z is returned. Increase or decrease the number of connections according to the contents of. The connection number setting unit 52 is activated when the content of the storage area Z is other than 0 and increases or decreases the number of connections according to the content of the storage area Z. In this process, when the content of the storage area Z is a positive number, an area required for each connection is secured and initialized. When the content of the storage area Z is a negative number, the area required for each connection is disabled. If the connections are connected up to the allowable number, the area required for each connection is made unavailable as soon as the connection is disconnected.

【0115】図12を用いてコネクション数設定部の動
作を説明する。コネクション数設定部52は、記憶領域
Zの内容が0以外の時に起動し、記憶領域Zの内容に応
じたコネクション数を増減させる。記憶領域Zの内容が
正の数である時には、各コネクションに必要な領域の確
保とイニシャライズ行う。記憶領域Zの内容が負の数で
ある時には各コネクションに必要な領域を使用不可能に
する。許容数までコネクションが接続している場合は、
コネクションが切断され次第各コネクションに必要な領
域を使用不可能にする。
The operation of the connection number setting unit will be described with reference to FIG. The connection number setting unit 52 is activated when the content of the storage area Z is other than 0 and increases or decreases the number of connections according to the content of the storage area Z. When the content of the storage area Z is a positive number, the area required for each connection is secured and initialized. When the content of the storage area Z is a negative number, the area required for each connection is disabled. If the connection is connected up to the allowable number,
As soon as the connection is disconnected, the area required for each connection becomes unavailable.

【0116】現在及び前回の使用受信バッファ量が全受
信バッファ量の20% 以下であった場合は、要求負荷の低
いコネクションが全コネクションの大半を占めている可
能性が高いので、コネクションの許容数を1 つ増加させ
る。
When the used reception buffer amount at the present time and the previous time is 20% or less of the total reception buffer amount, it is highly possible that the connection with the low request load occupies the majority of all the connection buffers. Increase by 1.

【0117】また、現在の使用受信バッファ量が全受信
バッファ量の80% 以上であった場合には、後工程の処理
の負荷が高く、受信バッファのオーバフローが予想され
るのでコネクションの許容数を1 つ減少させる。
If the currently used receive buffer amount is 80% or more of the total receive buffer amount, the processing load of the subsequent process is high and overflow of the receive buffer is expected. Decrease one.

【0118】現在の使用受信バッファ量が全受信バッフ
ァ量の21% 〜50% の間で、前回の使用受信バッファ量が
51% 以上であった場合は、処理負荷が下降していること
を示しているので、急激な処理負荷の下降に備えコネク
ションの許容数を1 つ増加させる。
If the currently used receive buffer amount is between 21% and 50% of the total receive buffer amount, the last used receive buffer amount is
If the value is 51% or more, it indicates that the processing load is decreasing, and the allowable number of connections is increased by 1 in preparation for a sudden decrease in processing load.

【0119】現在の使用受信バッファ量が全受信バッフ
ァ量の51% 〜80% の間で、前回の使用受信バッファ量が
50% 未満であった場合は、処理負荷が上昇していること
を示しているので、急激な処理負荷の上昇に備えコネク
ションの許容数を1 つ減少させる。
If the currently used receive buffer amount is between 51% and 80% of the total receive buffer amount, the last used receive buffer amount is
If it is less than 50%, it indicates that the processing load is increasing, so the allowable number of connections is decreased by 1 in preparation for a sudden increase in processing load.

【0120】第3の実施の形態によれば、現在行ってい
る処理の重さにより確立するコネクション数を変化させ
ることにより、処理飽和状態からのリカバリーを早くし
低要求コネクション確立時にも、より効率良く動作させ
ることができる。
According to the third embodiment, by changing the number of connections to be established depending on the weight of the processing currently being performed, recovery from the processing saturation state is speeded up, and efficiency is improved even when a low request connection is established. It can work well.

【0121】第4の実施の形態 第4の実施の形態は、図1に示した印刷部10の展開タ
スク10a等からの高負荷通知に対し、インタ−バルタ
イマ21のタイマ間隔を可変とすることにより、展開タ
スク10a等のプライオリティの低いタスクが処理負荷
の高い状態にある時に、IFCタスク22等のプライオ
リティの高いタスクを制御できるようにしたものであ
る。
Fourth Embodiment In the fourth embodiment, the timer interval of the interval timer 21 is made variable in response to a high load notification from the expansion task 10a of the printing unit 10 shown in FIG. Thus, when a low-priority task such as the expansion task 10a has a high processing load, a high-priority task such as the IFC task 22 can be controlled.

【0122】図14は第4の実施の形態による負荷監視
処理のブロック図である。負荷監視部60は図5に示し
た展開タスク10a等の処理の負荷を監視するためにプ
ライオリティの低いタスク内に設けられている。負荷通
知エリア61はメモリ5のグロ−バルエリアに設けら
れ、負荷監視部60から通知を受信し、高負荷時に他の
処理へそれを通知する。タイマ間隔値変更手段21cは
インタ−バルタイマ21に設けられ、高負荷時にインタ
−バルタイマ21のカウンタ21bのタイマ間隔値を変
更する。
FIG. 14 is a block diagram of a load monitoring process according to the fourth embodiment. The load monitoring unit 60 is provided in a low priority task in order to monitor the load of processing such as the expansion task 10a shown in FIG. The load notification area 61 is provided in the global area of the memory 5, receives a notification from the load monitoring unit 60, and notifies it to other processing when the load is high. The timer interval value changing means 21c is provided in the interval timer 21, and changes the timer interval value of the counter 21b of the interval timer 21 when the load is high.

【0123】図15はプリンタにおける展開処理とエン
ジン処理等とのタイムチャ−トであり、(a)〜(d)
は展開処理、エンジン処理、タイマ処理、その他の処理
を示している。
FIG. 15 is a time chart of the expansion processing and engine processing in the printer.
Indicates the expansion processing, engine processing, timer processing, and other processing.

【0124】時間Wは、エンジン処理期間T1 間に展開
処理が動作できる時間を示し、この時間内に一定のデー
タの展開が終了しない場合にオーバランが発生する。タ
イマ処理と、その他の処理(共に展開処理よりもプライ
オリティは高い)が時刻t1、t2 、t4 、t5 で発生
すると、実際の展開処理動作は、矢印で示す範囲とな
り、オーバランが発生しやすくなる。
The time W indicates the time during which the expansion process can operate during the engine processing period T1. If the expansion of a certain amount of data is not completed within this time, an overrun occurs. When the timer process and other processes (both of which have higher priority than the expansion process) occur at times t1, t2, t4, and t5, the actual expansion process operation is in the range indicated by the arrow, and overrun is likely to occur.

【0125】図16は第4の実施の形態の動作を示すフ
ロ−チャ−トである。
FIG. 16 is a flow chart showing the operation of the fourth embodiment.

【0126】次に動作について図16のステップに従っ
て説明する。ステップS1 でインタ−バルタイマ21の
タイマ処理21aは、タイマ割込み毎にカウントするカ
ウンタ21bがタイマ間隔値T以上なったかをセンス
し、以下だった場合はステップS2 でカウンタ21bを
インクリメントし、以上だった場合はステップS3 でプ
ロトコルスタック内のタイマ処理手段31を呼出すため
にIFCタスク22に対してメッセ−ジ(message-S)を
出力する。ステップS4 でカウンタ21bは0にリセッ
トされる。
Next, the operation will be described according to the steps of FIG. In step S1, the timer processing 21a of the interval timer 21 senses whether or not the counter 21b counting for each timer interrupt becomes equal to or more than the timer interval value T. In this case, in step S3, a message (message-S) is output to the IFC task 22 to call the timer processing means 31 in the protocol stack. The counter 21b is reset to 0 in step S4.

【0127】ステップS5 でタイマ間隔値変更手段21
cは負荷通知エリア61を参照し、負荷監視部60から
の高負荷通知が受信されていると、ステップS8 でカウ
ンタ21bのタイマ間隔値Tを2倍にのばす。高負荷通
知が受信されていない場合には、ステップS6 でカウン
タ21bのタイマ間隔値Tを調べ、変更前のデフォルト
値であった場合には本処理を終了する。変更が入ってい
る場合には、ステップS7 でタイマ間隔値Tを半分に短
縮する。負荷監視部60から負荷通知エリア61に高負
荷通知が出力され続けていると、タイマ処理手段31か
らポストされて起動されるプロトコルスタック26中の
タイマ処理は2倍単位でその間隔が延び、負荷通知エリ
ア61に高負荷通知が出力されていない時間が続くと、
デフォルトのタイマ間隔値まで二分の一単位で間隔は短
縮される。
In step S5, the timer interval value changing means 21
The c refers to the load notification area 61, and when the high load notification is received from the load monitoring unit 60, the timer interval value T of the counter 21b is doubled in step S8. If the high load notification has not been received, the timer interval value T of the counter 21b is checked in step S6, and if it is the default value before the change, this processing ends. If there is a change, the timer interval value T is shortened to half in step S7. When the high load notification is continuously output from the load monitoring unit 60 to the load notification area 61, the interval of the timer processing in the protocol stack 26 that is posted and activated by the timer processing unit 31 is extended by a unit of two, and the load is increased. If the high load notification is not output to the notification area 61 for a period of time,
The interval is reduced by one-half unit up to the default timer interval value.

【0128】本実施の形態をプリンタに適用し、展開タ
スク等からの高負荷通知に対し、タイマ処理の間隔を可
変とすることにより、図15の時間Wに示す間隔内のタ
イマ処理時間を少なくすることが可能となる。また、図
14に示す負荷通知エリアをグローバル領域に設定する
ことにより、タイマ処理以外の高負荷処理へも同時に通
知することができ、対策を入れることが可能となる。
By applying this embodiment to the printer and changing the interval of the timer processing in response to the high load notification from the developing task or the like, the timer processing time within the interval shown by the time W in FIG. It becomes possible to do. Further, by setting the load notification area shown in FIG. 14 in the global area, it is possible to notify the high load processing other than the timer processing at the same time, and it is possible to take countermeasures.

【0129】第4の実施の形態によれば、展開タスク等
からの高負荷通知に対し、タイマ処理の間隔を可変とす
ることにより、展開タスク等のプライオリティの低いタ
スクが処理負荷の高い状態にある時に、IFC等のプラ
イオリティの高いタスクを制御できる。このことによ
り、プリンタではオーバーランや、オーバーフロー等の
性能を向上させ、ネットワーク処理の集中に関係なく安
定した性能を保つことができる。
According to the fourth embodiment, by changing the timer processing interval in response to a high load notification from a deployment task or the like, a task with a low priority such as a deployment task is placed in a high processing load state. At a certain time, it is possible to control a high priority task such as IFC. As a result, the printer can be improved in performance such as overrun and overflow, and stable performance can be maintained regardless of the concentration of network processing.

【0130】第5の実施の形態 第1の実施の形態から第4の実施の形態までは単独のプ
リンタ記述言語を備えたプリンタに対応したが、第5の
実施の形態はプリンタが複数のプリンタ記述言語、プリ
ンタコントロ−ルラングエジ(PRINTER CONTROL LANGUA
GE: 以後PCLと記す)、ポストスクリプト(POST SCR
IPT:以後PSと記す)、プリンタジョブラングエジ(PR
INTER JOB LANGUAGE: 以後PJLと記す)等を備えた場
合に対応できるようにしたものである。
Fifth Embodiment Although the first to fourth embodiments correspond to printers having a single printer description language, the fifth embodiment has a plurality of printers. Description language, printer control language (PRINTER CONTROL LANGUA
GE: hereafter referred to as PCL), Postscript (POST SCR
IPT: hereafter referred to as PS), printer job runge (PR
INTER JOB LANGUAGE: hereinafter referred to as PJL), etc., so that it can be supported.

【0131】図17は第5の実施の形態によるプリンタ
のネットワ−クア−キテクチャを示すブロック図であ
り、第2の実施の形態によるプリンタと異なるところ
は、PCL、PS、PJL等のプリンタ記述言語に対応
するIFCタスク40から共通に使用できるようにネッ
トワ−クドライバ25を再入可能(一つの関数からコ−
ルされ、リタ−ンする前に他の関数からコ−ルすること
が可能である仕様)にした点と、セントロニクス、RS
−232C等のインタ−フェ−スをネットワ−クドライ
バ25と同様に共通関数にした点である。
FIG. 17 is a block diagram showing the network architecture of the printer according to the fifth embodiment, and is different from the printer according to the second embodiment in printer description languages such as PCL, PS, PJL. The network driver 25 can be re-entered so that it can be used in common by the IFC task 40 corresponding to
And that it can be called from another function before being returned), Centronics, RS
The point is that the interface such as 232C is a common function like the network driver 25.

【0132】プリンタ言語判別部41はプリンタ記述言
語に対応する各IFCタスク40やセントロニクス、R
S−232C等のインタ−フェ−スと、各プリンタ記述
言語に対応する編集部、例えばPCL用編集部42、P
S用編集部43に接続され、各IFCタスク40から出
力されるデ−タのプリンタ記述言語を判別して対応する
編集部に出力している。
The printer language discriminating section 41 is provided for each IFC task 40, Centronics, R corresponding to the printer description language.
An interface such as S-232C and an editing unit corresponding to each printer description language, for example, a PCL editing unit 42, P
The printer description language of the data output from each IFC task 40 is connected to the S editing unit 43 and is output to the corresponding editing unit.

【0133】図18はIFCタスクの構造を示すブロッ
ク図であり、第2の実施の形態によるIFCタスクの構
造と異なるところは、ネットワ−クドライバ25がIF
Cタスク40の外にある点と、上位層から呼ばれる共通
化ドライバ関数44をIFCタスク40の内部に設けた
点である。
FIG. 18 is a block diagram showing the structure of the IFC task. The difference from the structure of the IFC task according to the second embodiment is that the network driver 25 uses the IF
It is outside the C task 40, and the common driver function 44 called from the upper layer is provided inside the IFC task 40.

【0134】図19は共通関数部の構造を示すブロック
図であり、IFCタスク40のアクセスを制御するドラ
イバ(Ethernet方式、IEEE802.2 方式、IEEE802.3 方
式、SNAP方式等)をまとめたネットワ−クドライバ25
と、ネットワ−ク接続用H/Wを制御するドライバをま
とめたNICドライバ45とからなる。
FIG. 19 is a block diagram showing the structure of the common function part, which is a network in which drivers (Ethernet system, IEEE802.2 system, IEEE802.3 system, SNAP system, etc.) for controlling access to the IFC task 40 are put together. Kudryer 25
And a NIC driver 45 which is a collection of drivers for controlling the network connection H / W.

【0135】次に動作を図18を参照して説明する。第
2の実施の形態と異なるところは、メッセ−ジ処理手段
24がNICドライバ45からなる受信割り込み手段2
0から矢印(a)に示すメッセ−ジを受信すると、IF
Cタスク40の外にあるネットワ−クドライバ25を関
数コ−ルする点であり、その他の動作は第2の実施の形
態と同様である。
Next, the operation will be described with reference to FIG. The difference from the second embodiment is that the reception interrupt means 2 in which the message processing means 24 comprises a NIC driver 45.
When the message indicated by the arrow (a) is received from 0, the IF
The point is that the network driver 25 outside the C task 40 is function-called, and other operations are the same as those in the second embodiment.

【0136】第5の実施の形態によれば、メモリ容量の
大きいネットワ−クドライバをPCL、PS、PJL等
のプリンタ記述言語に対応するIFCタスクに設けるこ
となく、各IFCタスクから共通に使用できるようにし
たので、メモリを効率よく使用できる。
According to the fifth embodiment, a network driver having a large memory capacity can be commonly used by each IFC task without providing the IFC task corresponding to the printer description language such as PCL, PS, PJL. As a result, memory can be used efficiently.

【0137】第6の実施の形態 第6の実施の形態によるプリンタのネットワ−クア−キ
テクチャは、第5の実施の形態と同じである。メッセ−
ジ処理手段24は各処理手段からのメッセ−ジを受信す
るイベントコントロ−ルブロック(Event Control Bloc
k:以後ECBと記す)からメッセ−ジを取り出して処理
するが、ECBが複数あって、処理する優先度をECB
間に設けてあればタスク内の処理にも優先度を設けるこ
とができ、効率良くCPU1を動作させることができる
が、ECBが一つの場合には、タスク内の処理に優先度
を設けることができないのでCPU1を効率良く動作で
きなくなる。
Sixth Embodiment The network architecture of the printer according to the sixth embodiment is the same as that of the fifth embodiment. Messe
The message processing means 24 is an event control block for receiving messages from the respective processing means.
k: hereafter referred to as ECB), a message is taken out and processed, but there are a plurality of ECBs and the priority of processing is ECB.
If it is provided between them, it is possible to provide a priority to the processing within the task, and it is possible to operate the CPU 1 efficiently. However, if there is one ECB, the priority can be provided to the processing within the task. As a result, the CPU 1 cannot operate efficiently.

【0138】第6の実施の形態はECBが一つの場合に
も効率の良い動作ができるようにしたものである。
The sixth embodiment is such that an efficient operation can be performed even when there is one ECB.

【0139】図20は第6の実施の形態によるメッセ−
ジ処理手段の動作を示すブロック図である。メッセ−ジ
処理手段24はECB46とソケット処理手段28の上
位側待ち行列WAPFQueue 47とを参照し、ECB4
6からメッセ−ジを取り出してプロトコルスタック26
へプロトコルを処理するように要求するか、上位側待ち
行列WAPFQueue 47の処理をコ−ルするかを判定す
る。
FIG. 20 shows a message according to the sixth embodiment.
It is a block diagram which shows operation | movement of the image processing means. The message processing means 24 refers to the ECB 46 and the upper side queue WAPF Queue 47 of the socket processing means 28, and ECB4
Take the message from 6 and get the protocol stack 26
Request to process the protocol or call the processing of the upper side queue WAPF Queue 47.

【0140】図21は図20に示したメッセ−ジ処理手
段の動作を示すフロ−チャ−トである。メッセ−ジ処理
手段24はステップS1 でソケット処理手段28に上位
層待ち行列WAPFQueue 47が生成されてあるか否か
をチェックして生成されてあるならばステップS2 に分
岐し、否ならばステップS4 に分岐する。
FIG. 21 is a flow chart showing the operation of the message processing means shown in FIG. The message processing means 24 checks in step S1 whether the upper layer queue WAPFQueue 47 has been created in the socket processing means 28, and if so, branches to step S2; otherwise, the step S4. Branch to.

【0141】ステップS2 で上位層待ち行列数が所定
量、例えば10個未満か否かをチェックして10個未満
ならばステップS3 に分岐し、否ならばステップS5 に
分岐する。ステップS3 でECB46にメッセ−ジが受
信してあるか否かをチェックして受信してあるならばス
テップS4 に分岐し、否ならばステップS5 に分岐す
る。ステップS4 でプロトコルスタック26へプロトコ
ルを処理するように要求し、ステップS5 でソケット
(High)28bをコ−ルする。
In step S2, it is checked whether or not the number of upper layer queues is a predetermined amount, for example, less than 10. If less than 10, the process branches to step S3, and if not, the process branches to step S5. In step S3, it is checked whether or not a message is received by the ECB 46. If it is received, the process branches to step S4, and if not, the process branches to step S5. In step S4, the protocol stack 26 is requested to process the protocol, and in step S5, the socket (High) 28b is called.

【0142】尚、本実施の形態は第2の実施の形態にも
適用できる。
The present embodiment can be applied to the second embodiment.

【0143】第6の実施の形態によれば、OSからポス
トされたメッセ−ジを格納するECBを一つのタスクに
複数設けられない場合にも、タスク内の処理に優先度を
設けることができので、CPUを効率良く動作させるこ
とができる。
According to the sixth embodiment, even if a plurality of ECBs for storing messages posted by the OS cannot be provided in one task, it is possible to give priority to the processing within the task. Therefore, the CPU can be operated efficiently.

【0144】第7の実施の形態 第7の実施の形態によるプリンタのネットワ−クア−キ
テクチャは、第5の実施の形態と同じである。ジョブ制
御モジュ−ル29はデ−タのクライアント識別子を格納
する共通テ−ブルを有し、デ−タを出力する際にクライ
アント識別子を格納し、上位層からデ−タ送信要求を受
ける際には共通テ−ブルに基づいてクライアント識別子
を解析し、同一コネクションを通じてパケットを送受信
するようにしたものである。
Seventh Embodiment The network architecture of the printer according to the seventh embodiment is the same as that of the fifth embodiment. The job control module 29 has a common table for storing the client identifier of the data, stores the client identifier when outputting the data, and receives the data transmission request from the upper layer. Is a system which analyzes a client identifier based on a common table and transmits / receives a packet through the same connection.

【0145】図22は第7の実施の形態を示すブロック
図である。2のパケット処理手段30はジョブ制御モジ
ュ−ル29にデ−タのクライアント識別子(以後クライ
アントIDと記す)等を登録する共通テ−ブルを有す
る。
FIG. 22 is a block diagram showing the seventh embodiment. The second packet processing means 30 has a common table for registering a data client identifier (hereinafter referred to as a client ID) in the job control module 29.

【0146】共通テ−ブルにはデ−タを印刷部の編集タ
スクに送信する際に使用するDMD48と、プリンタ言
語判別部41からデ−タ送信要求を受ける際に登録する
SendDescriptor 49とがある。例えば、ネットワ−ク
ドライバ25を経由して3つのパケットを受信したとす
る。各パケットはプロトコルを処理されてアプリケ−シ
ョンAP1 、AP2 、AP4 を通じてジョブ制御モジュ
−ル29に送信されてくるものとする。
The DMD 48 used when transmitting data to the editing task of the printing section and the register when receiving the data transmission request from the printer language discrimination section 41 are registered in the common table.
There is SendDescriptor 49. For example, assume that three packets are received via the network driver 25. It is assumed that each packet is processed by the protocol and transmitted to the job control module 29 through the applications AP1, AP2, AP4.

【0147】クライアントID C1 、C2 、C3 は受
信割り込み手段20がパケットを受信した際にDMD4
8に登録される。ジョブ制御モジュ−ル29はアプリケ
−ションAP1 、AP2 、AP4 から受信する印刷デ−
タとともにクライアントIDC1 、C2 、C3 をプリン
タ言語判別部41に送信する。クライアントIDは32
ビットで構成される。最初の8ビットはIFCタスク4
0、セントロニクス、RS−232C等のインタ−フェ
−スの種別を示し、次の24ビットは各インタ−フェ−
スによって固有となる。例えばIFCタスク40の場合
には、8ビットがアプリケ−ションを示すID(AP1
、AP2 、・・・・)で、残りの16ビットが各アプ
リケ−ションにおける通番となる。このフォ−マットに
より同一のアプリケ−ションにクライアントの接続が集
中しても対応することができる。
The client IDs C1, C2 and C3 are DMD4 when the reception interrupt means 20 receives a packet.
Registered in 8. The job control module 29 receives print data received from the applications AP1, AP2 and AP4.
The client IDs C1, C2, and C3 are transmitted to the printer language discrimination unit 41 together with the data. Client ID is 32
Composed of bits. The first 8 bits are IFC task 4
0, Centronics, RS-232C, and other interface types. The next 24 bits are each interface type.
Will be unique to each. For example, in the case of the IFC task 40, an 8-bit ID (AP1
, AP2, ...) And the remaining 16 bits are the serial number in each application. With this format, it is possible to deal with the same application even if client connections are concentrated.

【0148】プリンタ言語判別部41は受信したクライ
アントに対してデ−タを送信する場合にはインタ−フェ
−スの種別をクライアントIDの最初の8ビットから判
断し、そのインタ−フェ−スのSend Descriptor 49に
登録する。
When the printer language discrimination unit 41 transmits the data to the received client, the printer language discrimination unit 41 discriminates the interface type from the first 8 bits of the client ID, and determines the interface type. Subscribe to Send Descriptor 49.

【0149】ジョブ制御モジュ−ル29はSend Descrip
tor 49を参照してアプリケ−ションを識別するビット
を読み取り、対応するアプリケ−ションをコ−ルする。
The job control module 29 is the Send Descrip
The bit identifying the application is read by referring to tor 49, and the corresponding application is called.

【0150】尚、本実施の形態は第2の実施の形態にも
適用できる。
The present embodiment can be applied to the second embodiment.

【0151】第7の実施の形態によれば、IFCタスク
等のインタ−フェ−スを使用してパケットの授受を行う
上位層が、クライアントIDの中身を意識することなく
応答パケットの送信先を特定するので、要求するクライ
アントに正確に応答パケットを送信できる。
According to the seventh embodiment, the upper layer, which transmits and receives packets by using the interface such as IFC task, determines the destination of the response packet without paying attention to the contents of the client ID. Since it is specified, the response packet can be accurately transmitted to the requesting client.

【0152】第8の実施の形態 第8の実施の形態によるプリンタのネットワ−クア−キ
テクチャは、第5の実施の形態と同じである。第8の実
施の形態はプリンタ等に組み込まれた受信バッファのサ
イズが小さい場合に、効率的な受信バッファ空き容量を
算出して受信速度を向上させるようにしたものである。
Eighth Embodiment The network architecture of the printer according to the eighth embodiment is the same as that of the fifth embodiment. In the eighth embodiment, when the size of the receiving buffer incorporated in the printer or the like is small, the effective receiving buffer free space is calculated and the receiving speed is improved.

【0153】図23はプリンタ言語判別部41とジョブ
制御モジュ−ル29との間のデ−タ受け渡し処理を示す
説明図、図24は送信側TCPと受信側TCPとの間の
デ−タ受け渡し処理を示す説明図、図25は第8の実施
の形態を示すブロック図である。第7の実施の形態で説
明したように、プリンタ言語判別部41は処理状況に応
じて受信デ−タをジョブ制御モジュ−ル29に要求する
が、図23に示すように、デ−タ要求のポ−リング間隔
が常に一定は限らない。
FIG. 23 is an explanatory diagram showing the data transfer processing between the printer language discrimination section 41 and the job control module 29, and FIG. 24 is the data transfer between the transmission side TCP and the reception side TCP. FIG. 25 is an explanatory diagram showing processing, and FIG. 25 is a block diagram showing an eighth embodiment. As described in the seventh embodiment, the printer language discriminating section 41 requests the job control module 29 for the reception data according to the processing status. However, as shown in FIG. The polling interval is not always constant.

【0154】また、TCP間の受信処理では、図24に
示すように、受信パケットを複数受信して一つの応答パ
ケットを返すブロック転送方式を使用している。さら
に、トランスポ−ト層の機能を使用するなど、送受信端
末間の距離制限は事実上無いに等しい。従って、パケッ
ト転送時間Tは非常に短い場合もあるが、非常に長い場
合もある。
Further, in the reception process between TCPs, as shown in FIG. 24, a block transfer method is used in which a plurality of received packets are received and one response packet is returned. Furthermore, the distance limitation between the transmitting and receiving terminals is practically nonexistent, such as using the function of the transport layer. Therefore, the packet transfer time T may be very short or very long.

【0155】そこでジョブ制御モジュ−ル29に定期的
にポ−リング間隔を監視して、ジョブ制御モジュ−ル2
9からプリンタ言語判別部41に転送される単位時間内
のデ−タ数Rを計数する転送デ−タ計数手段50を設け
る。
Therefore, the polling interval is regularly monitored by the job control module 29, and the job control module 2
A transfer data counting means 50 for counting the number of data R transferred from the printer 9 to the printer language discrimination unit 41 within a unit time is provided.

【0156】また、TCPの受信パケット処理時、パケ
ット転送時間Tを算出するパケット転送時間更新手段5
1をプロトコルスタック26に設ける。
Further, the packet transfer time updating means 5 for calculating the packet transfer time T when processing the TCP received packet.
1 is provided in the protocol stack 26.

【0157】また、ジョブ制御モジュ−ル29には、パ
ケット転送時間Tと単位時間にデ−タを上位層に転送す
る転送デ−タ数Rと現在の受信バッファ空容量Wとから
次回のパケットブロック転送において受信可能なデ−タ
容量Xを算出する受信可能デ−タ容量算出手段52を設
ける。
In addition, the job control module 29 uses the packet transfer time T, the number R of transfer data for transferring data to the upper layer in a unit time, and the current free space W of the receiving buffer for the next packet. Receivable data capacity calculation means 52 for calculating the receivable data capacity X in block transfer is provided.

【0158】受信可能なデ−タ容量Xは、 X=(R×T+W)・・・・・・・・・・・・(14) で算出される。The receivable data capacity X is X = (R × T + W) ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ (14) It is calculated by.

【0159】メモリ5にはパケット転送時間Tを格納す
る格納エリア53、NICドライバ45が受信パケット
を受信する毎に更新される受信バッファ空容量Wを格納
する格納エリア54、受信可能デ−タ容量算出手段52
が算出した受信可能なデ−タ容量Xを格納する格納エリ
ア55が設けてある。
The memory 5 has a storage area 53 for storing the packet transfer time T, a storage area 54 for storing the free space W of the reception buffer updated every time the NIC driver 45 receives a reception packet, and a receivable data capacity. Calculation means 52
A storage area 55 for storing the receivable data capacity X calculated by the above is provided.

【0160】プロトコルスタック26の応答パケット作
成手段56は応答パケットを作成する際に格納エリア5
5の内容を応答パケットに盛り込んで送信する。
The response packet creating means 56 of the protocol stack 26 stores the response packet in the storage area 5 when creating the response packet.
The contents of 5 are included in the response packet and transmitted.

【0161】尚、本実施の形態は第2の実施の形態にも
適用できる。
The present embodiment can also be applied to the second embodiment.

【0162】第8の実施の形態によれば、実際の受信バ
ッファサイズにとらわれず、後工程の処理速度と前工程
の受信速度を接近させることにより、高速で効率的な受
信を実現できる。
According to the eighth embodiment, high-speed and efficient reception can be realized by making the processing speed of the subsequent process and the receiving speed of the previous process close to each other regardless of the actual reception buffer size.

【0163】第9の実施の形態 第9の実施の形態によるプリンタのネットワ−クア−キ
テクチャは、第5の実施の形態と同じである。第9の実
施の形態は、受信バッファが受信デ−タで満杯になり、
送信側からの接続を確認するポ−リングパケットが受信
できず、そのパケットに対する応答パケットを送信でき
ない状態が発生する。その状態が長時間続いた場合にも
接続が切断されないようにしたものである。
Ninth Embodiment The network architecture of the printer according to the ninth embodiment is the same as that of the fifth embodiment. In the ninth embodiment, the reception buffer becomes full of reception data,
A polling packet for confirming the connection from the transmitting side cannot be received and a response packet for the packet cannot be transmitted. Even if that state continues for a long time, the connection is not cut off.

【0164】図26は第9の実施の形態を示すブロック
図であり、図19に示したデ−タリンク層以下を処理す
るNICドライバの受信構造を示す。NICドライバ4
5は、第7の実施の形態で説明した通り、受信パケット
を自層及びその上位層で共通管理する共通テ−ブルにリ
ンクされている。共通テ−ブルは各層が処理した情報や
自層の後工程である層に対して通知する情報を格納する
領域としてメモリ5に設けてある。
FIG. 26 is a block diagram showing the ninth embodiment, and shows the receiving structure of the NIC driver for processing the data link layer and below shown in FIG. NIC driver 4
As described in the seventh embodiment, the number 5 is linked to a common table for commonly managing the received packet in its own layer and its upper layer. The common table is provided in the memory 5 as an area for storing information processed by each layer and information notified to a layer which is a post process of the own layer.

【0165】受信バッファ5aには常時空けておく「常
時空きエリア」と、常時使用する「常時使用エリア」と
を設けておく。NICドライバ45は「常時空きエリ
ア」と「常時使用エリア」とを認識し、受信パケットを
優先的に「常時使用エリア」に受信するとともに共通テ
−ブルに情報(受信デ−タサイズ、受信デ−タ格納領域
の先頭アドレス、等)を格納する。「常時使用エリア」
が受信パケットで満たされると、「常時空きエリア」に
受信できるように制御する。
The reception buffer 5a is provided with an "always empty area" which is always free and an "always used area" which is always used. The NIC driver 45 recognizes the "always available area" and the "always used area", preferentially receives the received packet in the "always used area", and at the same time provides information (reception data size, reception data) in the common table. The start address of the data storage area, etc.) is stored. "Always used area"
When is filled with received packets, it is controlled so that it can be received in the "always free area".

【0166】NICドライバ45は「常時空きエリア」
に受信している状態でも、受信パケットの処理が進み、
「常時使用エリア」に空き領域ができた場合には、以降
「常時使用エリア」に受信するように制御する。「常時
空きエリア」は1〜2パケット分の領域からなり、この
エリアにパケットを受信した場合には「常時空きエリ
ア」にリンクした共通テ−ブル(特)にその情報を格納
する。
The NIC driver 45 is "always empty area"
Even if it is being received in the
When an empty area is created in the "always-used area", control is performed so that the "always-used area" will be received thereafter. The "always empty area" consists of an area for 1 to 2 packets, and when a packet is received in this area, the information is stored in a common table (special) linked to the "always empty area".

【0167】図27は第9の実施の形態の動作を示すフ
ロ−チャ−トであり、(A)はNICドライバの動作を
示し、(B)はTCPバイパス処理の動作を示す。
FIG. 27 is a flow chart showing the operation of the ninth embodiment, where (A) shows the operation of the NIC driver and (B) shows the operation of the TCP bypass processing.

【0168】先ず、NICドライバ45の動作を説明す
る。ステップS1 で「常時空きエリア」にパケットが受
信されたか否かをチェックし、受信ならばステップS2
に分岐し、否ならばステップS5 に分岐する。ステップ
S2 で共通テ−ブル(特)に空きがあるか否かをチェッ
クし、空きがあるならばステップS3 に分岐し、否なら
ばステップS6 に分岐する。ステップS3 で「常時空き
エリア」に受信されたパケットの情報を共通テ−ブル
(特)に格納する。
First, the operation of the NIC driver 45 will be described. In step S1, it is checked whether or not a packet is received in the "always free area", and if it is received, step S2
If not, the process branches to step S5. In step S2, it is checked whether or not there is a free space in the common table (special). If there is a free space, the process branches to step S3. If not, the process branches to step S6. In step S3, the information of the packet received in the "always empty area" is stored in the common table (special).

【0169】ステップS4 でTCPバイパス処理を呼び
出し、TCPバイパス処理後、ステップS1 に戻る。ス
テップS5 では通常の処理を行ってステップS1 に戻
る。ステップS6 では「常時空きエリア」に受信したパ
ケットを破棄してステップS1に戻る。
In step S4, the TCP bypass process is called, and after the TCP bypass process, the process returns to step S1. In step S5, normal processing is performed and the process returns to step S1. In step S6, the packet received in the "always empty area" is discarded and the process returns to step S1.

【0170】ステップS7 で受信パケットがパケット送
信元からのポ−リングパケットか否かをチェックし、ポ
−リングパケットならばステップS8 に分岐し、否なら
ばステップS9 に分岐する。受信側のTCPは受信バッ
ファが満杯になった等の理由で一時的に受信を止めたい
場合には、応答パケットの所定のエリアに0を格納して
送信側のTCPに送信する。送信側のTCPはこの応答
パケットを受信すると、パケットの送信を停止する。そ
して、パケットの送信を開始するタイミングを獲得する
ために、受信側のTCPにポ−リングパケットを定期的
に送信する。
In step S7, it is checked whether or not the received packet is a polling packet from the packet source. If it is a polling packet, the process branches to step S8. If not, the process branches to step S9. When the TCP on the receiving side wants to temporarily stop the reception because the receiving buffer is full or the like, it stores 0 in a predetermined area of the response packet and transmits it to the TCP on the transmitting side. When the TCP on the transmitting side receives this response packet, it stops transmitting the packet. Then, in order to acquire the timing to start the packet transmission, the polling packet is periodically transmitted to the TCP on the receiving side.

【0171】ステップS8 で応答パケットを作成して送
信する。ステップS9 で「常時空きエリア」に受信した
パケットを破棄する。
In step S8, a response packet is created and transmitted. In step S9, the packet received in the "always free area" is discarded.

【0172】尚、本実施の形態は第2の実施の形態にも
適用できる。
The present embodiment can also be applied to the second embodiment.

【0173】第9の実施の形態によれば、受信バッファ
が受信デ−タで満杯になり、長時間受信バッファが空か
ない場合でも、送信側からの接続を確認するポ−リング
パケットが受信でき、そのパケットに対する応答パケッ
トを送信できるので、コネクションを維持できるととも
に、その間低負荷の処理により接続を保つことができ
る。
According to the ninth embodiment, even if the reception buffer is full of reception data and the reception buffer is not empty for a long time, a polling packet for confirming the connection from the transmission side can be received. Since the response packet to the packet can be transmitted, the connection can be maintained and the connection can be maintained during the low load process.

【0174】[0174]

【発明の効果】本発明は、以上説明したように構成され
ているので以下に記載される効果を奏する。ネットワ−
ク層、トランスポ−ト層を受信パケット一括処理手段と
いう一つの機能で処理するようにしたので、プロトコル
処理を1回の起動で、受信バッファに受信された全パケ
ットを処理できるので、OSのオーバヘッド量を減少さ
せることができる。
Since the present invention is configured as described above, it has the following effects. Network
Since the packet layer and the transport layer are processed by one function of the received packet batch processing means, all the packets received in the reception buffer can be processed by one activation of the protocol processing, which results in the overhead of the OS. The amount can be reduced.

【0175】また、ネットワ−ク層、トランスポ−ト層
を一括処理することにより、プロトコルをネットワ−ク
層、トランスポ−ト層別に処理する場合に比べてメモリ
上の作業領域を削減できる。
Further, by collectively processing the network layer and the transport layer, the work area on the memory can be reduced as compared with the case where the protocol is processed for each of the network layer and the transport layer.

【0176】さらに、それぞれのコネクションに属する
最後の受信パケットに対する応答パケットを割込み中に
ネットワ−クに一括して送信する送信パケット一括処理
手段を備えたことにより、送信処理時間を大幅に短縮で
き、その分他の処理にCPUを動作させることができる
ので、効率良く動作するネットワ−クプロトコルのイン
プリメント手法を提供できる。
Further, the transmission packet batch processing means for collectively transmitting the response packet to the last received packet belonging to each connection to the network during the interruption can greatly reduce the transmission processing time, As a result, the CPU can be operated for other processing, so that it is possible to provide a method of implementing a network protocol that operates efficiently.

【0177】同様に、少なくともネットワ−ク層、トラ
ンスポ−ト層を第1のパケット処理手段という一つの機
能で処理するようにし、セッション層、プレゼンテ−シ
ョン層、アプリケ−ション層を第2のパケット処理手段
という一つの機能で処理するようにして、その2つの機
能間にソケット処理手段及びメッセ−ジ処理手段を介在
させて処理の優先度を持たせるようにしたことにより、
OSのオーバヘッド量を減少させることができる。
Similarly, at least the network layer and the transport layer are processed by one function of the first packet processing means, and the session layer, the presentation layer, and the application layer are processed by the second packet. By processing with one function of processing means, and by placing a socket processing means and a message processing means between the two functions to give priority to processing,
The amount of OS overhead can be reduced.

【0178】また、ネットワ−ク層、トランスポ−ト層
を一括処理することにより、プロトコルをネットワ−ク
層、トランスポ−ト層別に処理する場合に比べてメモリ
上の作業領域を削減できる。
Further, by collectively processing the network layer and the transport layer, the work area on the memory can be reduced as compared with the case where the protocol is processed for each of the network layer and the transport layer.

【0179】また、低機能OSを用いて他のインタ−フ
ェ−ス処理をも受け付けるできるようにしたので、同一
タスク上で他のホストインタフェ−ス( セントロニク
ス、RS-232C)との共存を可能にできる。
Since the low-function OS can be used to accept other interface processing as well, coexistence with other host interfaces (Centronics, RS-232C) on the same task is possible. You can

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

【図1】第1の実施の形態によるプリンタのネットワ−
クア−キテクチャを示すブロック図である。
FIG. 1 is a network of a printer according to a first embodiment.
It is a block diagram which shows a quadrature.

【図2】第1の実施の形態によるネットワ−クの構成図
である。
FIG. 2 is a configuration diagram of a network according to the first embodiment.

【図3】図1に示したネットワ−クア−キテクチャのタ
イムチャ−トである。
FIG. 3 is a time chart of the network architecture shown in FIG.

【図4】従来と本発明との送信処理の比較を示すタイム
チャ−トである。
FIG. 4 is a time chart showing a comparison of transmission processing between the related art and the present invention.

【図5】第2の実施の形態によるプリンタのネットワ−
クア−キテクチャを示すブロック図である。
FIG. 5 is a network of a printer according to a second embodiment.
It is a block diagram which shows a quadrature.

【図6】アプリケ−ションFTPの構成を示すブロック
図である。
FIG. 6 is a block diagram showing a configuration of an application FTP.

【図7】コネクション管理テ−ブルの説明図である。FIG. 7 is an explanatory diagram of a connection management table.

【図8】コネクションの状態と設定値との関係を示す説
明図である。
FIG. 8 is an explanatory diagram showing a relationship between a connection state and a set value.

【図9】処理ステップ数と負荷との関係を示す負荷算出
テ−ブルである。
FIG. 9 is a load calculation table showing the relationship between the number of processing steps and the load.

【図10】パケットを再送する際の処理を示すフロ−チ
ャ−トである。
FIG. 10 is a flowchart showing a process when a packet is retransmitted.

【図11】第3の実施の形態の要部を示すブロック図で
ある。
FIG. 11 is a block diagram showing a main part of a third embodiment.

【図12】許容コネクションを増減させる際に使用する
テ−ブルである。
FIG. 12 is a table used when increasing or decreasing the allowable connections.

【図13】第3の実施の形態の動作を示すフロ−チャ−
トである。
FIG. 13 is a flowchart showing the operation of the third embodiment.
It is

【図14】第4の実施の形態による負荷監視処理のブロ
ック図である。
FIG. 14 is a block diagram of load monitoring processing according to a fourth embodiment.

【図15】プリンタにおける展開処理とエンジン処理等
とのタイムチャ−トである。
FIG. 15 is a time chart of development processing and engine processing in the printer.

【図16】第4の実施の形態の動作を示すフロ−チャ−
トである。
FIG. 16 is a flowchart showing the operation of the fourth embodiment.
It is

【図17】第5の実施の形態によるプリンタのネットワ
−クア−キテクチャを示すブロック図である。
FIG. 17 is a block diagram showing the network architecture of the printer according to the fifth embodiment.

【図18】IFCタスクの構造を示すブロック図であ
る。
FIG. 18 is a block diagram showing the structure of an IFC task.

【図19】共通関数部の構造を示すブロック図である。FIG. 19 is a block diagram showing a structure of a common function part.

【図20】第6の実施の形態を示すブロック図である。FIG. 20 is a block diagram showing a sixth embodiment.

【図21】メッセ−ジ処理手段の動作を示すフロ−チャ
−トである。
FIG. 21 is a flow chart showing the operation of the message processing means.

【図22】第7の実施の形態を示すブロック図である。FIG. 22 is a block diagram showing a seventh embodiment.

【図23】プリンタ言語判別部とジョブ制御モジュ−ル
との間のデ−タ受け渡し処理の説明図である。
FIG. 23 is an explanatory diagram of data transfer processing between the printer language discrimination unit and the job control module.

【図24】TCP間のデ−タ受け渡し処理の説明図であ
る。
FIG. 24 is an explanatory diagram of a data transfer process between TCPs.

【図25】第8の実施の形態を示すブロック図である。FIG. 25 is a block diagram showing an eighth embodiment.

【図26】第9の実施の形態を示すブロック図である。FIG. 26 is a block diagram showing a ninth embodiment.

【図27】第9の実施の形態の動作を示すフロ−チャ−
トである。
FIG. 27 is a flowchart showing the operation of the ninth embodiment.
It is

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

1 CPU 3 NIC 4 TCP/IP部 5 メモリ 6、22、40 IFCタスク 23 第1のパケット処理手段 30 第2のパケット処理手段 1 CPU 3 NIC 4 TCP / IP section 5 memory 6, 22, 40 IFC task 23 First Packet Processing Means 30 Second Packet Processing Means

Claims (14)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】ネットワークのノード間にコネクションを
確立し、受信バッファに受信したパケットに階層的に付
加されたプロトコルを下位層から上位層に向かって順に
処理するパケット処理方法において、 少なくともネットワーク層、トランスポート層、セッシ
ョン層、プレゼンテーション層、アプリケーション層に
関するプロトコルの処理をそれぞれ一つのタスクにし、
ネットワーク層、トランスポート層を一つの第1の機能
とし、セッション層、プレゼンテーション層、アプリケ
ーション層を一つの第2の機能とし、該機能の両方が単
一の中央処理装置上で処理されるものであり、 上記パケットが所定時間内に複数受信された場合に上記
中央処理装置により前記第1の機能を優先させて 動作す
るようにしたことを特徴とするパケット処理方法。
1. A packet processing method for establishing a connection between nodes of a network and processing sequentially a protocol hierarchically added to a packet received in a reception buffer from a lower layer to an upper layer, at least the network layer, The processing of protocols related to the transport layer, session layer, presentation layer, and application layer is made into one task,
Network layer, a first function of a single transport layer, session layer, and presentation layer, a second function of a single application layer, both of the function is a single
It is processed by one central processing unit, and when multiple packets are received within a predetermined time, the above
A packet processing method, wherein a central processing unit is made to operate by giving priority to the first function .
【請求項2】ネットワークのノード間にコネクションを
確立し、受信バッファに受信したパケットに階層的に付
加されたプロトコルを下位層から上位層に向かって順に
処理するネットワークアーキテクチャにおいて、受信したパケットのプロトコルのうち少なくともネット
ワーク層、トランスポート層、セッション層、プレゼン
テーション層、アプリケーション層を処理する単一の中
央処理装置と、 一定時間毎に入るタイマ割込みを使用し、上記受信バッ
ファに受信された複数のパケットのネットワーク層とト
ランスポート層とに関するプロトコルを割込み中に上記
中央処理装置により一括処理して蓄積し、プロトコルの
内容から上位層のプロトコル処理手段を上記中央処理装
置により指定通知する受信パケット一括処理手段と、 それぞれのコネクションに属する最後の受信パケットに
対する応答パケットを上記割込み中にネットワークに
記中央処理装置により一括して送信する送信パケット一
括処理手段とを備えたことを特徴とするネットワークア
ーキテクチャ。
2. A protocol of a received packet in a network architecture in which a connection is established between nodes of a network and a protocol hierarchically added to a packet received in a reception buffer is processed in order from a lower layer to an upper layer. At least out of the net
Work layer, transport layer, session layer, presentation
Application layer, a single processing layer
A central processing unit, said during a predetermined time using a timer interrupt to enter for each, interrupt protocols for the network layer and the transport layer of a plurality of packets received in the receiving buffer
Batch and accumulated by the central processing unit, the central processing instrumentation protocol processing means of the upper layer from the contents of the protocol
Upper and received packet batch processing means for designating notified by location, a response packet to the last received packet belonging to each connection to the network during the interruption
A network architecture comprising: a transmission packet batch processing unit that collectively transmits by a central processing unit .
【請求項3】 ネットワークのノード間にコネクション
を確立し、受信バッファに受信したパケットに階層的に
付加されたプロトコルを下位層から上位層に向かって順
に処理するネットワークアーキテクチャにおいて、 一定時間毎に入るタイマ割込みを使用し、上記受信バッ
ファに受信されたパケットのネットワーク層とトランス
ポート層とに関するプロトコルを割込み中に一括処理し
て蓄積し、プロトコルの内容から上位層のプロトコル処
理手段を指定通知する受信パケット一括処理手段と、 それぞれのコネクションに属する最後の受信パケットに
対する応答パケットを上記割込み中にネットワークに一
括して送信する送信パケット一括処理手段とを備え、 上記送信パケット一括処理手段は、上記受信パケット一
括処理手段が受信パケットを一括処理中に上位層の処理
手段から発生した応答パケット送信要求を、次のタイマ
割込み時にまとめて送信を行い、それに対する受信側か
らの応答のタイムアウトをタイマ割込み回数でカウント
するタイマ処理手段を備えたことを特徴とするネットワ
ークアーキテクチャ。
3. Connection between nodes of a network
Hierarchically to the packets received in the receive buffer
The added protocols are ordered from the lower layer to the upper layer.
In a network architecture that processes in parallel, a timer interrupt that enters at regular intervals is used to
Network layer and trans
Batch processing of protocol related to port layer during interrupt
Stored in the upper layer and processed from the contents of the protocol.
Received packet batch processing means for specifying and notifying the processing means, and the last received packet belonging to each connection
Response packet to the network during the above interrupt.
Transmission packet batch processing means for collectively transmitting, the transmission packet batch processing means , the reception packet batch processing means, the response packet transmission request generated from the processing means of the upper layer during batch processing of the received packets, A network architecture characterized by comprising timer processing means for performing transmission at the time of the next timer interrupt and for counting the response timeout from the receiving side in response to the timer interrupt count.
【請求項4】 ネットワ−クのノ−ド間にコネクション
を確立し、受信バッファに受信したパケットに階層的に
付加されたプロトコルを下位層から上位層に向かって順
に処理するネットワ−クア−キテクチャにおいて、 メッセ−ジに基づいて呼び出した処理手段に起動を駆け
るオペレ−ティングシステム機能によるメッセ−ジ処理
手段と、メッセ−ジ処理手段により呼び出されて受信バ
ッファから受信パケットを取り出し、デ−タリンク層、
ネットワ−ク層、トランスポ−ト層に関するプロトコル
を処理して所定量に達するまで蓄積する第1のパケット
処理手段と、セッション層、プレゼンテ−ション層、ア
プリケ−ション層に関するプロトコルを処理して上位層
に出力する第2のパケット処理手段と、第1のパケット
処理手段から指定された第2のパケット処理手段を呼び
出すメッセ−ジをメッセ−ジ処理手段に出力し、メッセ
−ジ処理手段からの呼び出しに応じて第2のパケット処
理手段を選択するソケット処理手段とを設けたインタ−
フェ−ス制御手段と、 パケット受信時に起動し、受信パケットを受信バッファ
に格納する毎にメッセ−ジをインタ−フェ−ス制御手段
に出力する受信割り込み手段とを備えたことを特徴とす
るネットワ−クア−キテクチャ。
4. A network architecture that establishes a connection between the nodes of the network, and sequentially processes the protocols hierarchically added to the packets received in the reception buffer from the lower layer to the upper layer. In the above, in the data link layer, a message processing means by an operating system function for activating the processing means called based on the message, and a received packet fetched from the receiving buffer called by the message processing means are provided. ,
A first packet processing means for processing a protocol relating to a network layer and a transport layer and accumulating until a predetermined amount is reached, and a higher layer processing a protocol relating to a session layer, a presentation layer and an application layer. A second packet processing means for outputting to the second packet processing means and a message for calling the second packet processing means designated by the first packet processing means are outputted to the message processing means, and the message is called from the message processing means. Interface provided with socket processing means for selecting the second packet processing means according to
A network comprising: a face control means; and a reception interrupt means which is activated when a packet is received and outputs a message to the interface control means each time a received packet is stored in a reception buffer. -Qua-texture.
【請求項5】 上記第1のパケット処理手段は、上記受
信割り込み手段のメッセ−ジに基づいて呼び出され、受
信バッファから受信パケットを取り出してデ−タリンク
層のプロトコルを処理するネットワ−クドライバを有す
る請求項4記載のネットワ−クア−キテクチャ。
5. The first packet processing means is called on the basis of the message of the reception interrupting means, extracts a received packet from the reception buffer, and processes a data link layer protocol. The network architecture according to claim 4.
【請求項6】 ネットワ−クのノ−ド間にコネクション
を確立し、受信バッファに受信したパケットに階層的に
付加されたプロトコルを下位層から上位層に向かって順
に処理するネットワ−クア−キテクチャにおいて、 メッセ−ジに基づいて呼び出した処理手段に起動を駆け
るオペレ−ティングシステム機能によるメッセ−ジ処理
手段と、ネットワ−ク層、トランスポ−ト層に関するプ
ロトコルを処理して所定量に達するまで蓄積する第1の
パケット処理手段と、セッション層、プレゼンテ−ショ
ン層、アプリケ−ション層に関するプロトコルを処理し
て上位層に出力する第2のパケット処理手段と、第1の
パケット処理手段から指定された第2のパケット処理手
段を呼び出すメッセ−ジをメッセ−ジ処理手段に出力
し、メッセ−ジ処理手段からの呼び出しに応じて第2の
パケット処理手段を選択するソケット処理手段とを有す
るインタ−フェ−ス制御手段と、 パケット受信時に起動し、受信パケットを受信バッファ
に格納する毎にメッセ−ジをインタ−フェ−ス制御手段
に出力する受信割り込み手段と、 受信割り込み手段のメッセ−ジに基づいてインタ−フェ
−ス制御手段のメッセ−ジ処理手段により呼び出され、
デ−タリンク層に関するプロトコルを処理して第1のパ
ケット処理手段を呼び出すネットワ−クドライバとを備
えたことを特徴とするネットワ−クア−キテクチャ。
6. A network architecture that establishes a connection between the nodes of the network, and sequentially processes the protocols hierarchically added to the packets received in the reception buffer from the lower layer to the upper layer. In the above, the message processing means by the operating system function that activates the processing means called based on the message and the protocol related to the network layer and the transport layer are processed and accumulated until a predetermined amount is reached. Designated by the first packet processing means and the second packet processing means for processing the protocol relating to the session layer, the presentation layer, and the application layer and outputting the upper layer. A message for calling the second packet processing means is output to the message processing means, and the message processing means is output. Interface control means having a socket processing means for selecting the second packet processing means in response to a call from the same, and a message activated each time the packet is received and stored in the reception buffer. Reception interrupt means for outputting to the interface control means, and a message processing means of the interface control means based on a message of the reception interrupt means,
A network driver, comprising a network driver for processing a protocol relating to a data link layer and calling the first packet processing means.
【請求項7】 カウンタがカウンタアップする毎にメッ
セ−ジを上記インタ−フェ−ス制御手段のメッセ−ジ処
理手段に出力するインタ−バルタイマと、インタ−バル
タイマのメッセ−ジに基づいて呼び出され、上記第1の
パケット処理手段により蓄積されたパケット量を監視す
るタイマ処理手段を上記第1のパケット処理手段に設け
た請求項4記載、又は請求項6記載のネットワ−クア−
キテクチャ。
7. An interval timer which outputs a message to the message processing means of the interface control means each time the counter counts up, and is called based on the message of the interval timer. 7. The network network according to claim 4, wherein the first packet processing means is provided with timer processing means for monitoring the amount of packets accumulated by the first packet processing means.
Texture.
【請求項8】 上記タイマ処理手段は、上記第1のパケ
ット処理手段がプロトコル処理中にタイマ処理を実行
し、応答パケットの送信処理等のプライオリティの低い
処理に負荷係数を設定し、一定の負荷に達した時点でタ
イマ処理を中断し、次回のタイマ処理でその続きを実行
することにより、1回のタイマ処理時に処理する負荷を
平均化させる請求項7記載のネットワ−クア−キテクチ
ャ。
8. The timer processing means executes timer processing during protocol processing of the first packet processing means, sets a load coefficient to low priority processing such as response packet transmission processing, and sets a constant load. 8. The network architecture according to claim 7, wherein the timer processing is interrupted at the time when the timer processing reaches, and the continuation is executed in the next timer processing to average the load processed in one timer processing.
【請求項9】 上記タイマ処理部は、コネクションを増
減する際に参照するテ−ブルを記憶するテ−ブル記憶手
段と、前回起動時の受信バッファの使用量を格納してお
く第1の受信バッファ使用量記憶手段と、上記メッセ−
ジ処理手段に起動される毎に受信バッファの使用量をセ
ンスして第2の受信バッファ使用量記憶手段に格納する
バッファ量センス部と、第1の受信バッファ使用量記憶
手段の内容と第2の受信バッファ使用量記憶手段の内容
とテ−ブル記憶手段のテ−ブルとを参照して増減するコ
ネクション数を判断する判断部と、判断部の出力に基づ
いて許容コネクション数を設定するコネクション数設定
部とを備えた請求項7記載のネットワ−クア−キテクチ
ャ。
9. The timer processing section stores a table storage means for storing a table to be referred to when the number of connections is increased or decreased, and a first reception for storing a usage amount of a reception buffer at the previous activation. Buffer usage storage means and the above message
A buffer amount sensing unit that senses the usage amount of the reception buffer and stores it in the second reception buffer usage amount storage unit each time the processing unit is activated; the contents of the first reception buffer usage amount storage unit; Of the reception buffer usage amount storage means and the table of the table storage means, and a number of connections for setting the allowable number of connections based on the output of the determination part. The network architecture according to claim 7, further comprising a setting unit.
【請求項10】 上記デ−タバッファに格納されたデ−
タを処理するプライオリティの低い処理手段に設けられ
た負荷監視部と、負荷監視部からの負荷通知を記憶する
負荷通知記憶手段と、負荷通知記憶手段の内容が高負荷
通知ならば上記インタ−バルタイマに設けられたカウン
タのタイマ間隔値を大きくし、否ならばカウンタのタイ
マ間隔値を小さくするタイマ間隔値変更手段とを備えた
請求項7記載のネットワ−クア−キテクチャ。
10. The data stored in the data buffer
Load monitoring unit provided in a low-priority processing unit for processing data, load notification storage unit for storing load notification from the load monitoring unit, and the interval timer if the content of the load notification storage unit is a high load notification. 8. The network architecture according to claim 7, further comprising timer interval value changing means for increasing the timer interval value of the counter provided therein and for decreasing the timer interval value of the counter.
【請求項11】 上記メッセ−ジ処理手段はメッセ−ジ
を格納するECB(Event Control Block )を一つ有
し、ECBとソケット処理手段の上位側待ち行列とを参
照し、上位側待ち行列の登録メッセ−ジ数が所定数以上
の場合には上位側待ち行列を処理する請求項4記載、又
は請求項6記載のネットワ−クア−キテクチャ。
11. The message processing means has one ECB (Event Control Block) for storing a message, refers to the ECB and the upper queue of the socket processing means, and stores the upper queue. The network architecture according to claim 4 or 6, wherein the upper side queue is processed when the number of registered messages is a predetermined number or more.
【請求項12】 上記第2のパケット処理手段はデ−タ
のクライアントIDを格納する共通テ−ブルを有し、デ
−タを出力する際にクライアントIDを格納し、上位層
からデ−タ送信要求を受ける際には共通テ−ブルに基づ
いてクライアントIDを解析し、同一コネクションを通
じてパケットを送受信する請求項4記載、又は請求項6
記載のネットワ−クア−キテクチャ。
12. The second packet processing means has a common table for storing a client ID of data, stores the client ID when outputting the data, and stores the data from the upper layer. 5. The client ID is analyzed based on the common table when receiving the transmission request, and the packet is transmitted and received through the same connection.
The described network architecture.
【請求項13】 第1のパケット処理手段が前回の受信
パケットに対する応答パケットを送信してから今回の受
信パケットを受信までのパケット転送時間を算出するパ
ケット転送時間算出手段と、第2のパケット処理手段か
ら単位時間にデ−タを上位層に転送する転送デ−タ数を
計数する転送デ−タ数計数手段と、パケット転送時間と
転送デ−タ数と現在の受信バッファ空容量とから次回の
パケットブロック転送において受信可能なデ−タ容量を
算出する受信可能デ−タ容量算出手段とを設けた請求項
4記載、又は請求項6記載のネットワ−クア−キテクチ
ャ。
13. A packet transfer time calculating means for calculating a packet transfer time from when a first packet processing means transmits a response packet to a previous received packet to when the current received packet is received, and second packet processing. Next, from the transfer data number counting means for counting the number of transfer data for transferring the data from the means to the upper layer in a unit time, the packet transfer time, the number of transfer data, and the present receiving buffer free capacity. 7. The network architecture according to claim 4, further comprising a receivable data capacity calculating means for calculating a receivable data capacity in the packet block transfer.
【請求項14】 上記受信割り込み手段は、上記受信バ
ッファの「常時使用エリア」と「常時空きエリア」とに
受信したパケットの情報を格納する共通テ−ブルを有
し、パケットを受信する毎に共通テ−ブルを参照して
「常時空きエリア」に受信したパケットが送信側から受
信側に送信される受信可能確認用ポ−リングパケットの
場合には応答パケットを作成して送信し、受信可能確認
用ポ−リングパケット以外の場合にはそのパケットを破
棄する請求項4記載、又は請求項6記載のネットワ−ク
ア−キテクチャ。
14. The reception interrupt means has a common table for storing information of a received packet in an “always used area” and an “always free area” of the reception buffer, and each time the packet is received, a common table is stored. If the packet received in the "always empty area" with reference to the common table is a polling packet for reception confirmation that is transmitted from the transmission side to the reception side, a response packet is created and transmitted, and reception is possible. The network architecture according to claim 4 or 6, wherein the packet is discarded if it is other than a confirmation polling packet.
JP26377997A 1996-09-30 1997-09-29 Packet processing method and network architecture Expired - Fee Related JP3459165B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26377997A JP3459165B2 (en) 1996-09-30 1997-09-29 Packet processing method and network architecture

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8-258957 1996-09-30
JP25895796 1996-09-30
JP26377997A JP3459165B2 (en) 1996-09-30 1997-09-29 Packet processing method and network architecture

Publications (2)

Publication Number Publication Date
JPH10155010A JPH10155010A (en) 1998-06-09
JP3459165B2 true JP3459165B2 (en) 2003-10-20

Family

ID=26543904

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26377997A Expired - Fee Related JP3459165B2 (en) 1996-09-30 1997-09-29 Packet processing method and network architecture

Country Status (1)

Country Link
JP (1) JP3459165B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3938824B2 (en) 1999-10-29 2007-06-27 松下電器産業株式会社 Communication apparatus and communication method
JP3747887B2 (en) 2002-06-14 2006-02-22 ブラザー工業株式会社 Setting information transmission / reception system, transmission device, and program
JP5079039B2 (en) * 2002-09-24 2012-11-21 株式会社リコー Management mediation apparatus, image forming apparatus, management mediation program, and recording medium recording management mediation program
JP4432388B2 (en) * 2003-08-12 2010-03-17 株式会社日立製作所 I / O controller
US7548325B2 (en) * 2003-09-30 2009-06-16 Toshiba Corporation Method and system to manage multiple format fonts in an image generating device
JP4609070B2 (en) * 2004-12-28 2011-01-12 沖電気工業株式会社 Multi-call processing thread processing method
JP5029675B2 (en) * 2009-11-13 2012-09-19 沖電気工業株式会社 Multi-call processing thread processing method and call processing apparatus
WO2016038788A1 (en) * 2014-09-11 2016-03-17 日本電気株式会社 Communication device, communication request processing system, communication request processing method, and communication request processing program
US10846155B2 (en) * 2018-10-16 2020-11-24 Samsung Electronics Co., Ltd. Method for NVMe SSD based storage service using RPC and gRPC tunneling over PCIe +

Also Published As

Publication number Publication date
JPH10155010A (en) 1998-06-09

Similar Documents

Publication Publication Date Title
US4839798A (en) Method and apparatus for controlling job transfer between computer systems
US6483846B1 (en) Middleware-based real-time communication system
US4642758A (en) File transfer scheduling arrangement
EP0617361B1 (en) Scheduling method and apparatus for a communication network
US4860207A (en) Information transmission control apparatus for elevator system
TW200301639A (en) Method and apparatus for switching between active and standby switch fabrics with no loss of data
JP2000036839A (en) Flow control method, temporal stop control system and node
JPH0934818A (en) Method and apparatus for shortened waiting time data reception at inside of data-processing system using packet- based architecture
JP3459165B2 (en) Packet processing method and network architecture
JP2002024195A (en) Parallel processor and parallel process method
JPH117434A (en) System for processing quick arrival message in ansyncronous data communication system for plural nodes
JP3595143B2 (en) Communication attribute setting and communication volume processing
JP4630231B2 (en) Packet processing system, packet processing method, and program
US6459706B1 (en) Message-passing communication system generating task for monitoring a specific communication path
JP2001014118A (en) System and method for print data transmission and reception
JPH0662263B2 (en) Signal transmission control method for group management elevator
JP2000181656A (en) Printing data managing device and printing data managing method
JP2916185B2 (en) Dynamic selection method of incoming communication adapter
KR0135911B1 (en) Two way message transmission system
JP2000039977A (en) Print system
JP2669363B2 (en) Process switching control method and system for system call in cluster-coupled multiprocessor system
JPH06195317A (en) Data processing system
JP2000267960A (en) Method for communicating packet between plural processes and packet communication equipment
JPH0784906A (en) Method and system for communication
CN117896201A (en) Multiport communication system and method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20030715

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070808

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080808

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090808

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090808

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100808

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100808

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110808

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120808

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130808

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees