JP2005347894A - Computer system and reception interruption processing method thereof - Google Patents

Computer system and reception interruption processing method thereof Download PDF

Info

Publication number
JP2005347894A
JP2005347894A JP2004162619A JP2004162619A JP2005347894A JP 2005347894 A JP2005347894 A JP 2005347894A JP 2004162619 A JP2004162619 A JP 2004162619A JP 2004162619 A JP2004162619 A JP 2004162619A JP 2005347894 A JP2005347894 A JP 2005347894A
Authority
JP
Japan
Prior art keywords
interrupt
reception
measurement result
threshold
computer system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004162619A
Other languages
Japanese (ja)
Inventor
Kuniaki Motosawa
邦朗 本沢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2004162619A priority Critical patent/JP2005347894A/en
Publication of JP2005347894A publication Critical patent/JP2005347894A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a computer system capable of preventing consumption of a CPU time due to reception of excessive packets without the need for changing a scheduling mechanism of an operating system and preventing excessive consecution of an interruption disabled state. <P>SOLUTION: The computer system measures the number of reception interruption times from a NIC 10 and the utilizing time of a CPU due to the reception interruption. The measurement results are reset by a prescribed time period. On every occurrence of interruption, the computer system compares a threshold value with a result of measurement of the number of interruption times, inhibits the reception processing when the measurement result exceeds the threshold value and aborts received packets. Similarly, the computer system compares the measurement result of the CPU utilizing time with a threshold value, inhibits the reception processing when the measurement result exceeds the threshold value and aborts the received packets. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、ネットワークに接続可能なコンピュータシステム及びネットワーク接続装置からの受信割込みの処理方法に関する。   The present invention relates to a computer system connectable to a network and a method for processing a reception interrupt from a network connection apparatus.

近代的なオペレーティングシステムを備えたコンピュータでは、ハードウェアからの割込みが発生した場合は、その時点で実行中のプログラムを可能なところで中断し、割込み処理を優先して実行する。中断されたプログラムについては、割込み処理の終了後に、中断された場所から実行が再開される。ハードウェアからの割込み処理には、即座に実行を行わなければならない優先度の高いものと、そうではなく、割込みによって中断された他のプログラムよりも優先度が低いものもある。そのため、一般に、ハードウェアからの割込みが発生した場合、優先度が高い割込み処理のみを実行し、その他の割込みは、スケジューラに実行のタイミングを任せるようになっている。   In a computer equipped with a modern operating system, when an interrupt from hardware occurs, a program being executed at that time is interrupted where possible, and interrupt processing is executed with priority. About the interrupted program, execution is restarted from the place where it interrupted after completion | finish of interruption processing. Some interrupt processing from hardware has a higher priority that must be executed immediately, while others have a lower priority than other programs interrupted by an interrupt. For this reason, in general, when an interrupt from hardware occurs, only the interrupt processing with a high priority is executed, and the execution timing of other interrupts is left to the scheduler.

ただし、この方法においては、頻繁に割込み処理が発生した場合は、割込み処理によってCPU時間が消費されてしまい、それ以外の処理、例えばアプリケーションプログラムに割り当てられるCPU時間が減ってしまう。最悪の場合は、まったくアプリケーションプログラムが動作できない状態が発生してしまう。この場合、ユーザには、実行中のアプリケーションプログラムの動作が止まり、またそのコンピュータ自体が停止しているように見える。   However, in this method, when interrupt processing frequently occurs, CPU time is consumed by the interrupt processing, and CPU time allocated to other processing, for example, an application program is reduced. In the worst case, the application program cannot be operated at all. In this case, it seems to the user that the operation of the application program being executed is stopped and the computer itself is stopped.

具体例としては、ネットワーク接続装置であるNIC(Network Interface Card)においてサイズの小さなパケットを頻繁に受信した場合に、受信パケットの処理のみでCPU時間を消費してしまい、その他のアプリケーションプログラムの動作が非常に遅くなる、あるいは全く動作できなくなる状況が発生する。このような状況を意図的に発生させてコンピュータが提供するサービスを停止させる行為は、DoS(Denial of Services)攻撃と呼ばれている。   As a specific example, when a small packet is frequently received by a network interface card (NIC) that is a network connection device, CPU time is consumed only by processing the received packet, and the operation of other application programs There are situations where it becomes very slow or completely inoperable. The act of intentionally generating such a situation to stop a service provided by a computer is called a DoS (Denial of Services) attack.

また、意図的ではないにしても、ネットワーク機器の設定ミス等によっても、この状況は発生することがあり、コンピュータで本来実行したいアプリケーションが実行できない状況が発生することがある。   In addition, even if not intentional, this situation may occur due to a misconfiguration of the network device or the like, and there may occur a situation in which an application that the computer originally wants to execute cannot be executed.

このような状況を回避するために、オペレーティングシステムのスケジューリング機構を変更し、アプリケーションの重要度に応じて、ハードウェアからの割込み処理の実行に割り当てるCPU時間を減らす方法が考えられる。しかし、オペレーティングシステム内部の変更が不可能な場合があり、また可能であっても、多大なコストがかかるという問題がある。   In order to avoid such a situation, a method of changing the scheduling mechanism of the operating system and reducing the CPU time allocated to the execution of the interrupt processing from the hardware according to the importance of the application can be considered. However, there is a case where the internal change of the operating system is impossible, and even if it is possible, there is a problem that a great cost is required.

その他に、ネットワークからのデータのバーストの受信中にCPUに過度な負担がかかることを回避するために、最後の割込み以降に十分な数のパケットを受信し、かつ最後の割込み以降に一定時間待機状態が続くことによって割込み可能状態にする技術がある(たとえば特許文献1を参照)。
特開平9−223091号公報(段落0017)
In addition, in order to avoid overloading the CPU while receiving bursts of data from the network, receive a sufficient number of packets after the last interrupt and wait for a certain time after the last interrupt There is a technique for enabling an interruptable state by continuing the state (see, for example, Patent Document 1).
JP-A-9-223091 (paragraph 0017)

しかし、この公知の技術では、パケット数や時間のしきい値によっては割込み不可状態が過剰に継続するおそれがあり、特にネットワーク機器の設定ミス等により定常的にバースト受信が発生する場合にその傾向が高くなる。   However, with this known technique, depending on the number of packets and the time threshold, there is a possibility that the interrupt disabled state may continue excessively, especially when burst reception occurs regularly due to misconfiguration of network equipment. Becomes higher.

本発明は、オペレーティングシステムのスケジューリング機構を変更せずに、過剰なパケット受信によるCPU時間の消費を防止できるとともに、割込み不可状態の過度な継続を防止することのできるコンピュータシステムおよびその割込み制御方法を提供することを目的としている。   The present invention provides a computer system and an interrupt control method thereof capable of preventing consumption of CPU time due to excessive packet reception and preventing excessive continuation of an interrupt disabled state without changing the scheduling mechanism of the operating system. It is intended to provide.

かかる目的を達成するために、第1の発明のコンピュータシステムは、ネットワークからのパケットの受信に対して割り込みを発生するネットワーク接続装置と、ネットワーク接続装置からの割込みの回数を測定する割込み回数測定手段と、割込み回数測定手段の測定結果を決められた時間周期でリセットするリセット手段と、割込みが発生するごとに、割込み回数測定手段の測定結果と閾値とを比較し、測定結果が閾値を超えている場合は受信処理に制限を付与する受信処理制限手段とを具備することを特徴とする。   In order to achieve the above object, a computer system according to a first aspect of the present invention includes a network connection device that generates an interrupt with respect to reception of a packet from a network, and an interrupt count measuring unit that measures the number of interrupts from the network connection device. And the reset means that resets the measurement result of the interrupt count measurement means at a predetermined time period, and every time an interrupt occurs, the measurement result of the interrupt count measurement means is compared with the threshold value, and the measurement result exceeds the threshold value. If there is a reception process, the reception process restriction means for restricting the reception process is provided.

また、第2の発明のコンピュータシステムは、ネットワークからのパケットの受信に対して割り込みを発生するネットワーク接続装置と、ネットワーク接続装置からの受信割込みによるCPUの利用時間を測定するCPU利用時間測定手段と、CPU利用時間測定手段の測定結果を決められた時間周期でリセットするリセット手段と、受信割込みが発生するごとに、CPU利用時間測定手段の測定結果と閾値とを比較し、測定結果が閾値を超えている場合は受信処理に制限を付与する受信処理制限手段とを具備することを特徴とする。   According to a second aspect of the present invention, there is provided a network connection device that generates an interrupt for reception of a packet from a network, and a CPU usage time measuring unit that measures a CPU usage time due to a reception interrupt from the network connection device. , The reset means for resetting the measurement result of the CPU usage time measurement means at a predetermined time period, and the measurement result of the CPU usage time measurement means is compared with the threshold value every time a reception interrupt occurs, and the measurement result sets the threshold value. If it exceeds the maximum number, reception processing restriction means for restricting reception processing is provided.

さらに、第1の発明および第2の発明のコンピュータシステムにおいて、受信処理制限手段は、今回の受信割込みに対する受信処理を禁止し、受信パケットを破棄するようにしてもよい。   Further, in the computer systems of the first and second inventions, the reception process restricting means may prohibit the reception process for the current reception interrupt and discard the received packet.

本発明のコンピュータシステム及び受信割込み処理方法によれば、オペレーティングシステムのスケジューリング機構を変更せずに、過剰なパケット受信によるCPU時間の消費を防止できるとともに、割込み不可状態の過度な継続を防止することができる。   According to the computer system and the reception interrupt processing method of the present invention, it is possible to prevent consumption of CPU time due to excessive packet reception without changing the scheduling mechanism of the operating system and to prevent excessive continuation of the interrupt disabled state. Can do.

以下、図面を参照して本発明の実施の形態について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の一実施形態にかかるコンピュータシステムの電気的な構成を示すブロック図である。   FIG. 1 is a block diagram showing an electrical configuration of a computer system according to an embodiment of the present invention.

同図に示すように、このコンピュータシステム100は、システム全体の制御を行うCPU(Central Processing Unit)1、CPU1の作業領域として用いられるメインメモリ2、プログラムやデータを読み書き可能な記録装置であるHDD(Hard Disk Drive)などの記録装置3、デジタル放送信号を受信するチューナ4、チューナ4で受信したデジタル放送信号を復号するデコーダ5、デコーダ5によって復号されたデータを記録装置3に効率的に記録できるファイル形式であるMPEG(Moving Picture Experts Group)2の圧縮符号化データに符号化するMPEGエンコーダ6とを備える。MPEGエンコーダ6によって符号化されたデータは、CPU1の制御により、システムバス7を介してメインメモリ2に蓄積され、ブロック単位にまとめられて記録装置3に記録される。   As shown in FIG. 1, a computer system 100 includes a central processing unit (CPU) 1 that controls the entire system, a main memory 2 that is used as a work area for the CPU 1, and an HDD that is a recording device that can read and write programs and data. Recording device 3 such as (Hard Disk Drive), tuner 4 that receives the digital broadcast signal, decoder 5 that decodes the digital broadcast signal received by the tuner 4, and data that is decoded by the decoder 5 is efficiently recorded in the recording device 3. And an MPEG encoder 6 that encodes the compressed encoded data of MPEG (Moving Picture Experts Group) 2, which is a possible file format. Data encoded by the MPEG encoder 6 is stored in the main memory 2 via the system bus 7 under the control of the CPU 1, and is grouped into blocks and recorded in the recording device 3.

また、このコンピュータシステム100は、CPU1の制御により、記録装置3から読み出されたデータをシステムバス7を通じて受け取り、モニタ8にて表示可能な形式のデータに復号するMPEGデコーダ9を有する。さらに、システムバス7には、ネットワークとの接続を処理するネットワーク接続装置(以下「NIC」と呼ぶ。)10が接続されている。   The computer system 100 also includes an MPEG decoder 9 that receives data read from the recording device 3 through the system bus 7 and decodes the data into a format that can be displayed on the monitor 8 under the control of the CPU 1. Further, a network connection device (hereinafter referred to as “NIC”) 10 for processing connection with the network is connected to the system bus 7.

図2は、このコンピュータシステム100におけるソフトウェアの構成を示す図である。   FIG. 2 is a diagram showing a software configuration in the computer system 100.

OS(オペレーティングシステム)11は、このコンピュータシステム100全体のハードウェアの管理や、各アプリケーションプログラム12、13の実行を管理する。デバイスドライバ14、15はOS11に各デバイスへのアクセスの手順を提供する。ここでデバイスドライバ14は、図1のNIC10用のデバイスドライバである。以下、これをNICドライバと呼ぶ。NICドライバ14は、NIC10から割込みの発生を契機にOS11によって呼び出され、その割込みを処理する割込みハンドラ21を有する。   An OS (operating system) 11 manages the hardware management of the entire computer system 100 and the execution of the application programs 12 and 13. The device drivers 14 and 15 provide the OS 11 with a procedure for accessing each device. Here, the device driver 14 is a device driver for the NIC 10 of FIG. Hereinafter, this is referred to as a NIC driver. The NIC driver 14 has an interrupt handler 21 that is called by the OS 11 when an interrupt is generated from the NIC 10 and processes the interrupt.

図3は、割込みハンドラ21による基本的な処理の流れを示すフローチャートである。   FIG. 3 is a flowchart showing a basic processing flow by the interrupt handler 21.

割込みハンドラ21は、まず、発生した割り込み要因が処理すべき割込み要因であるかどうかを判定する(ステップ301)。処理すべき割込み要因としては、たとえば、送信完了、受信などがある。処理すべき割込み要因が判定された場合(ステップ301のYES)、割込みハンドラ21はNIC10に対する操作をロックする(ステップ302)。続いて、割込みハンドラ21は、処理すべき割込み要因が具体的に何であるかを判定し(ステップ303)、その判定した割込み要因に対応する処理を実行する(ステップ304)。割込み要因に対応する処理の実行後、NIC10に対する操作のロックを解除する(ステップ305)。   The interrupt handler 21 first determines whether the generated interrupt factor is an interrupt factor to be processed (step 301). Examples of interrupt factors to be processed include transmission completion and reception. When the interrupt factor to be processed is determined (YES in step 301), the interrupt handler 21 locks the operation on the NIC 10 (step 302). Subsequently, the interrupt handler 21 determines what is the interrupt factor to be processed (step 303), and executes processing corresponding to the determined interrupt factor (step 304). After executing the process corresponding to the interrupt factor, the operation lock on the NIC 10 is released (step 305).

図4は、図3での割込み要因に対応した処理の一つとして実行される受信処理の例を示すフローチャートである。   FIG. 4 is a flowchart showing an example of a reception process executed as one of processes corresponding to the interrupt factor in FIG.

この受信処理では、まず、受信パケットのサイズに応じたバッファを確保した後(ステップ401)、受信パケットをそのバッファにコピーし(ステップ402)、その受信パケットの属性をバッファにセットする(ステップ403)。続いて、この受信処理の上位のネットワークドライバにバッファを渡し(ステップ404)、上位のネットワークドライバでの処理が実行される。   In this reception processing, first, after securing a buffer corresponding to the size of the received packet (step 401), the received packet is copied to the buffer (step 402), and the attribute of the received packet is set in the buffer (step 403). ). Subsequently, the buffer is passed to the upper network driver of the reception process (step 404), and the process in the upper network driver is executed.

一般に、これらの処理は、UNIX(登録商標)においてカーネルモードと呼ばれる特権モードで実行され、非特権モードで実行されるユーザアプリケーションよりも高い優先度で実行される。そのため、頻繁に受信割込みが発生した場合には、最悪、ユーザアプリケーションが利用できるCPU時間が全くなくなってしまう可能性があった。   In general, these processes are executed in a privileged mode called a kernel mode in UNIX (registered trademark), and are executed with a higher priority than a user application executed in a non-privileged mode. For this reason, when reception interruptions frequently occur, there is a possibility that the CPU time that can be used by the user application is completely lost.

このコンピュータシステム100では、NICドライバ14に実装された次のような処理手順によって、かかる課題を解決するものである。   In the computer system 100, such a problem is solved by the following processing procedure implemented in the NIC driver 14.

図5はNICドライバ14の初期化処理の一部を示すフローチャート、図6はNICドライバ14の初期化処理においてメインメモリ2上に確保される領域の構成を示す図である。   FIG. 5 is a flowchart showing a part of the initialization process of the NIC driver 14, and FIG. 6 is a diagram showing a configuration of an area secured on the main memory 2 in the initialization process of the NIC driver 14.

NICドライバ14は、初期化処理において、メインメモリ2上に、割込み回数格納領域31を確保し、そこに「割込み回数」として0をセット(ステップ501)。この割込み回数格納領域31は、一定時間内にNIC10から受信割込みを受けた回数を格納する領域である。   In the initialization process, the NIC driver 14 secures an interrupt count storage area 31 on the main memory 2, and sets 0 as the “interrupt count” (step 501). The interrupt count storage area 31 is an area for storing the number of reception interrupts received from the NIC 10 within a predetermined time.

次に、NICドライバ14は、メインメモリ2上にCPU利用時間格納領域32を確保し、そこに「CPU利用時間」として0をセットする(ステップ502)。このCPU利用時間格納領域32は、一定時間内にNIC10からの割込み処理の受信処理で利用したCPU利用時間の合計を格納する領域である。   Next, the NIC driver 14 secures the CPU usage time storage area 32 on the main memory 2, and sets 0 as the “CPU usage time” (step 502). The CPU usage time storage area 32 is an area for storing the total CPU usage time used in the reception process of the interrupt process from the NIC 10 within a predetermined time.

次に、NICドライバ14は、メインメモリ2上に割込み回数閾値格納領域33を確保し、そこに「割込み回数閾値」をセットする(ステップ503)。割込み回数閾値としては、単位時間当たりに許容できる、NIC10からの受信割込み回数がセットされる。ただし、この割込み回数閾値は、システムや動作させるアプリケーションに応じて最適な値を予め用意しておき、切り替えて使用されるようにしてもよい。   Next, the NIC driver 14 secures an interrupt count threshold storage area 33 on the main memory 2, and sets an “interrupt count threshold” therein (step 503). As the interrupt count threshold, the number of interrupts received from the NIC 10 that is allowable per unit time is set. However, an optimal value may be prepared for the interrupt frequency threshold value in advance according to the system and the application to be operated, and the interrupt frequency threshold value may be switched and used.

次に、NICドライバ14は、メインメモリ2上にCPU利用時間閾値格納領域34を確保し、そこに「CPU利用時間閾値」をセットする(ステップ504)。CPU利用時間閾値としては、受信割込み処理が利用する単位時間当たりのCPU利用時間の許容値がセットされる。ただし、このCPU利用時間閾値についても、システムや動作させるアプリケーションに応じて最適な値を予め用意しておき、切り替えて使用されるようにしてもよい。   Next, the NIC driver 14 secures a CPU usage time threshold storage area 34 on the main memory 2 and sets a “CPU usage time threshold” therein (step 504). As the CPU usage time threshold, an allowable value of CPU usage time per unit time used by the reception interrupt process is set. However, this CPU usage time threshold value may be prepared in advance according to the system and the application to be operated, and used by switching.

また、NICドライバ14は、図7に示すように、一定の時間ごとに以下の処理を行う。すなわち、NICドライバ14は、一定の時間が経過する度に、割込み回数格納領域31の「割込み回数」をクリア(0をセット)し(ステップ701)、続いてCPU利用時間格納領域32の「CPU利用時間」をクリア(0をセット)する(ステップ702)。   Further, as shown in FIG. 7, the NIC driver 14 performs the following processing at regular intervals. That is, the NIC driver 14 clears (sets 0) the “interrupt count” in the interrupt count storage area 31 (step 701) each time a certain time elapses, and then continues to “CPU” in the CPU usage time storage area 32. “Use time” is cleared (set to 0) (step 702).

さらに、NICドライバ14は、NIC10からの割込みにより受信処理が起動された場合に、以下の処理を行う。   Furthermore, the NIC driver 14 performs the following process when the reception process is activated by an interrupt from the NIC 10.

図8は、割込みにより受信処理が起動された場合のNICドライバ14による処理の流れを示すフローチャートである。   FIG. 8 is a flowchart showing the flow of processing by the NIC driver 14 when reception processing is activated by an interrupt.

NICドライバ14は、受信処理における「CPU利用時間」の計測を開始し(ステップ801)、割込み回数格納領域31の「割込み回数」をインクリメントする(ステップ802)。   The NIC driver 14 starts measuring the “CPU usage time” in the reception process (step 801), and increments the “interrupt count” in the interrupt count storage area 31 (step 802).

続いて、NICドライバ14はCPU利用時間格納領域32に格納された「CPU利用時間」とCPU利用時間閾値格納領域34に格納された「CPU利用時間閾値」とを比較する(ステップ803)。「CPU利用時間」が「CPU利用時間閾値」より大きい場合は(ステップ803のYES)、「CPU利用時間」の計測を終了し、計測結果をCPU利用時間格納領域32の内容に加算して処理を終了する(ステップ806)。すなわち、今回の割込みの発生に対する受信処理を行わず、受信パケットを破棄する。このとき必要ならば、受信パケットを破棄するようNIC10を制御する。   Subsequently, the NIC driver 14 compares the “CPU usage time” stored in the CPU usage time storage area 32 with the “CPU usage time threshold” stored in the CPU usage time threshold storage area 34 (step 803). If the “CPU usage time” is greater than the “CPU usage time threshold” (YES in step 803), the measurement of the “CPU usage time” is terminated, and the measurement result is added to the contents of the CPU usage time storage area 32 for processing. Is finished (step 806). That is, the received packet is discarded without performing the reception process for the occurrence of the current interrupt. At this time, if necessary, the NIC 10 is controlled to discard the received packet.

「CPU利用時間」が「CPU利用時間閾値」以下の場合は(ステップ803のNO)、割込み回数格納領域31の「割込み回数」と割込み回数閾値格納領域33の「割込み回数閾値」とを比較する(ステップ804)。「割込み回数」が「割込み回数閾値」以下である場合は(ステップ804のNO)、図4の受信処理を行う(ステップ805)。   When “CPU usage time” is equal to or less than “CPU usage time threshold” (NO in step 803), “interrupt count” in the interrupt count storage area 31 and “interrupt count threshold” in the interrupt count threshold storage area 33 are compared. (Step 804). When the “interrupt count” is equal to or less than the “interrupt count threshold” (NO in step 804), the reception process of FIG. 4 is performed (step 805).

また、「割込み回数」が「割込み回数閾値」より大きい場合は(ステップ804のYES)、「CPU利用時間」の計測を終了し、計測結果をCPU利用時間格納領域32の内容に加算して処理を終了する(ステップ806)。すなわち、図4に示した受信処理を行わず、パケットは破棄する。必要な場合は、受信パケットを破棄するようNIC10を制御する。   If “interrupt count” is greater than “interrupt count threshold” (YES in step 804), the measurement of “CPU usage time” is terminated, and the measurement result is added to the contents of the CPU usage time storage area 32 for processing. Is finished (step 806). That is, the reception process shown in FIG. 4 is not performed and the packet is discarded. If necessary, the NIC 10 is controlled to discard the received packet.

以上の処理において、「CPU利用時間」が「CPU利用時間閾値」より大きい場合もしくは「割込み回数」が「割込み回数閾値」より大きい場合は、割込み回数もしくは受信処理に要するCPU時間が、想定した量の上限を超えていることを意味する。この状態を放置した場合、最悪、アプリケーションプログラム12、13の実行ができなくなり、コンピュータシステム100としてのサービスを提供できなくなる可能性がある。そこで、「CPU利用時間」が「CPU利用時間閾値」より大きい場合もしくは「割込み回数」が「割込み回数閾値」より大きい場合は、受信処理を行わず、パケットを破棄することで、受信パケットは失ったことになるものの、コンピュータシステム100としてのサービスの提供は継続することができる。また、受信できなかったパケットは、時間を空けて再送された際に受信処理される問題はない。さらに、CPU利用時間格納領域32および割込み回数格納領域31の各内容は一定の時間ごとにリセットされるので、割込み不可状態が過度に長く継続することがない。   In the above processing, when “CPU usage time” is greater than “CPU usage time threshold” or “interrupt count” is greater than “interrupt count threshold”, the number of interrupts or CPU time required for reception processing is assumed as an amount. It means that the upper limit of is exceeded. If this state is left unattended, the application programs 12 and 13 cannot be executed in the worst case, and the service as the computer system 100 may not be provided. Therefore, if “CPU usage time” is larger than “CPU usage time threshold” or “interrupt count” is larger than “interrupt count threshold”, the received packet is lost by discarding the packet without performing the reception process. Nevertheless, the provision of services as the computer system 100 can be continued. Further, there is no problem that a packet that could not be received is subjected to reception processing when it is retransmitted after a time interval. Furthermore, since the contents of the CPU usage time storage area 32 and the interrupt count storage area 31 are reset at regular intervals, the interrupt disabled state does not continue for an excessively long time.

このように本実施形態のコンピュータシステム100によれば、NIC10の受信割込みによるCPU時間の過度の消費を回避できることで、チューナ4で受信したデジタル放送信号の復号からデータ圧縮符号化を経て記録装置3へ記録される処理、および、記録装置3に記録されたデータを読み出し、伸長復号して再生する処理において、CPU1の動作がボトルネックとなるのを防止することができる。   As described above, according to the computer system 100 of the present embodiment, it is possible to avoid excessive consumption of the CPU time due to the reception interrupt of the NIC 10, so that the recording apparatus 3 undergoes data compression encoding from decoding of the digital broadcast signal received by the tuner 4. It is possible to prevent the operation of the CPU 1 from becoming a bottleneck in the process of recording data and the process of reading out the data recorded in the recording device 3 and decompressing and decoding the data.

なお、本発明は、上述の図示例にのみ限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。   It should be noted that the present invention is not limited to the illustrated examples described above, and it is needless to say that various modifications can be made without departing from the scope of the present invention.

たとえば、上記の実施形態の説明では、一定時間内の受信の「割込み回数」と、そのために利用した「CPU利用時間」を判断に利用しているが、単位時間での「割込み回数」、「CPU利用時間」の平均値や、移動平均値を利用するようにしてもよい。   For example, in the description of the above embodiment, the “interrupt count” of reception within a certain time and the “CPU usage time” used for the determination are used for the determination, but the “interrupt count”, “ An average value of “CPU usage time” or a moving average value may be used.

また、上記の実施形態の説明では、「CPU利用時間」が「CPU利用時間閾値」より大きい場合もしくは「割込み回数」が「割込み回数閾値」より大きい場合に、受信処理を行わず、パケットを破棄していたが、以下のようなバリエーションも適用することが可能である。   In the description of the above embodiment, when “CPU usage time” is greater than “CPU usage time threshold” or “interrupt count” is greater than “interrupt count threshold”, the reception process is not performed and the packet is discarded. However, the following variations can also be applied.

図4の受信処理において、ステップ402の受信パケットをバッファにコピーするまでは行い、以後のステップのパケットの属性をバッファにセットする処理および上位のネットワークドライバにバッファを渡す処理は、所定の複数回の受信割込みを受けた後で、まとめて実行するようにしてもよい。これにより、上位のネットワークドライバの実行回数を減らすことができる。これは、上位のネットワークドライバを実行させるためにスケジューラを起動させる実装の場合に、スケジューラ起動のオーバーヘッドを低減できるという効果に結びつく。   In the reception process of FIG. 4, the process is performed until the received packet in step 402 is copied to the buffer, and the process of setting the packet attribute in the subsequent step and the process of passing the buffer to the upper network driver are performed a plurality of times. It is also possible to execute all of them after receiving the reception interrupt. As a result, the number of executions of the upper network driver can be reduced. This leads to an effect that the overhead for starting the scheduler can be reduced in the case of an implementation in which the scheduler is started to execute the upper network driver.

また、「CPU利用時間」が「CPU利用時間閾値」より大きい場合もしくは「割込み回数」が「割込み回数閾値」より大きいことが判定された場合に、ネットワークが異常な状態であると判断して受信割込みを禁止し、その後ネットワークの状態が回復する可能性を見込んで、一定時間が経過後にNIC10の受信割込みを許可するようにしてもよい。   Also, if the “CPU usage time” is greater than the “CPU usage time threshold” or if it is determined that the “interrupt count” is greater than the “interrupt count threshold”, it is determined that the network is in an abnormal state and received. It is also possible to prohibit the interruption and allow the NIC 10 to receive a reception interrupt after a certain period of time, in anticipation of the possibility of the network state recovering thereafter.

本発明の一実施形態にかかるコンピュータシステムの電気的な構成を示すブロック図である。It is a block diagram which shows the electric constitution of the computer system concerning one Embodiment of this invention. 図1のコンピュータシステムにおけるソフトウェアの構成を示す図である。It is a figure which shows the structure of the software in the computer system of FIG. 割込みハンドラによる基本的な処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the basic process by an interrupt handler. 図3での割込み要因に対応した処理の一つとして実行される受信処理の例を示すフローチャートである。FIG. 4 is a flowchart illustrating an example of a reception process executed as one of processes corresponding to an interrupt factor in FIG. 3. NICドライバの初期化処理の一部を示すフローチャートである。5 is a flowchart showing a part of initialization processing of a NIC driver. 図5の初期化処理においてメインメモリ上に確保される領域の構成を示す図である。It is a figure which shows the structure of the area | region ensured on the main memory in the initialization process of FIG. NICドライバの一定の時間ごとに行われるリセット処理を示すフローチャートである。It is a flowchart which shows the reset process performed for every fixed time of a NIC driver. 割込みにより受信処理が起動された場合のNICドライバによる処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process by a NIC driver when a reception process is started by interruption.

符号の説明Explanation of symbols

1…CPU、2…メインメモリ、3…記録装置、10…ネットワーク接続装置(NIC)、14…NICドライバ、21…割込みハンドラ、31…割込み回数格納領域、32…CPU利用時間格納領域、33…割込み回数閾値格納領域、34…CPU利用時間閾値格納領域。   DESCRIPTION OF SYMBOLS 1 ... CPU, 2 ... Main memory, 3 ... Recording apparatus, 10 ... Network connection apparatus (NIC), 14 ... NIC driver, 21 ... Interrupt handler, 31 ... Interrupt count storage area, 32 ... CPU use time storage area, 33 ... Interrupt count threshold storage area, 34... CPU usage time threshold storage area.

Claims (5)

ネットワークからのパケットの受信に対して割り込みを発生するネットワーク接続装置と、
前記ネットワーク接続装置からの前記割込みの回数を測定する割込み回数測定手段と、 前記割込み回数測定手段の測定結果を決められた時間周期でリセットするリセット手段と、
前記割込みが発生するごとに、前記割込み回数測定手段の測定結果と閾値とを比較し、測定結果が閾値を超えている場合は受信処理に制限を付与する受信処理制限手段と
を具備することを特徴とするコンピュータシステム。
A network connection device that generates an interrupt for reception of a packet from the network;
Interrupt number measuring means for measuring the number of interrupts from the network connection device; reset means for resetting the measurement result of the interrupt number measuring means at a predetermined time period;
A reception processing restriction unit that compares a measurement result of the interruption frequency measurement unit with a threshold every time the interruption occurs, and gives a restriction to reception processing when the measurement result exceeds the threshold; A featured computer system.
ネットワークからのパケットの受信に対して割り込みを発生するネットワーク接続装置と、
前記ネットワーク接続装置からの受信割込みによるCPUの利用時間を測定するCPU利用時間測定手段と、
前記CPU利用時間測定手段の測定結果を決められた時間周期でリセットするリセット手段と、
受信割込みが発生するごとに、前記CPU利用時間測定手段の測定結果と閾値とを比較し、測定結果が閾値を超えている場合は受信処理に制限を付与する受信処理制限手段と
を具備することを特徴とするコンピュータシステム。
A network connection device that generates an interrupt for reception of a packet from the network;
CPU usage time measuring means for measuring CPU usage time due to a reception interruption from the network connection device;
Resetting means for resetting the measurement result of the CPU utilization time measuring means at a predetermined time period;
Each time a reception interrupt occurs, a measurement result of the CPU usage time measurement means is compared with a threshold, and if the measurement result exceeds the threshold, a reception processing restriction means for restricting reception processing is provided. A computer system characterized by the above.
前記受信処理制限手段は、今回の受信割込みに対する受信処理を禁止し、受信パケットを破棄することを特徴とする請求項1または2に記載のコンピュータシステム。   The computer system according to claim 1, wherein the reception processing restriction unit prohibits reception processing for a current reception interrupt and discards the received packet. ネットワークからのパケットの受信に対して割り込みを発生するネットワーク接続装置からの前記割込みの回数を測定するステップと、
割込み回数測の測定結果を決められた時間周期でリセットするステップと、
前記割込みが発生するごとに、前記割込み回数の測定結果と閾値とを比較し、測定結果が閾値を超えている場合は前記割込みに対する受信処理を禁止するステップと
を具備することを特徴とするコンピュータシステムの受信割込み処理方法。
Measuring the number of interrupts from a network connection device that generates an interrupt for reception of a packet from the network;
Resetting the interrupt count measurement result at a predetermined time period;
And a step of comparing the measurement result of the number of interruptions with a threshold each time the interruption occurs, and prohibiting reception processing for the interruption when the measurement result exceeds the threshold. System receive interrupt handling method.
ネットワークからのパケットの受信に対して割り込みを発生するネットワーク接続装置からの受信割込みによるCPUの利用時間を測定するステップと、
CPUの利用時間の測定結果を決められた時間周期でリセットするステップと、
前記割込みが発生するごとに、前記CPUの利用時間の測定結果と閾値とを比較し、測定結果が閾値を超えている場合は前記割込みに対する受信処理を禁止するステップと
を具備することを特徴とするコンピュータシステムの受信割込み処理方法。
Measuring the CPU usage time due to a reception interrupt from a network connection device that generates an interrupt for reception of a packet from the network;
Resetting the measurement result of the CPU usage time at a predetermined time period;
Comparing the measurement result of the CPU usage time with a threshold every time the interrupt occurs, and prohibiting reception processing for the interrupt if the measurement result exceeds the threshold. Receiving interrupt processing method for a computer system.
JP2004162619A 2004-05-31 2004-05-31 Computer system and reception interruption processing method thereof Pending JP2005347894A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004162619A JP2005347894A (en) 2004-05-31 2004-05-31 Computer system and reception interruption processing method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004162619A JP2005347894A (en) 2004-05-31 2004-05-31 Computer system and reception interruption processing method thereof

Publications (1)

Publication Number Publication Date
JP2005347894A true JP2005347894A (en) 2005-12-15

Family

ID=35499890

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004162619A Pending JP2005347894A (en) 2004-05-31 2004-05-31 Computer system and reception interruption processing method thereof

Country Status (1)

Country Link
JP (1) JP2005347894A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011198096A (en) * 2010-03-19 2011-10-06 Fuji Xerox Co Ltd Communication control device, image forming apparatus, and program
US8782663B2 (en) 2009-05-11 2014-07-15 Nec Corporation Terminal device, communication method used in the terminal device and recording medium
US8797575B2 (en) 2010-03-19 2014-08-05 Fuji Xerox Co., Ltd. Dynamic control of packet filtering period
JP2016149647A (en) * 2015-02-12 2016-08-18 キヤノン株式会社 Communication device, control method, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8782663B2 (en) 2009-05-11 2014-07-15 Nec Corporation Terminal device, communication method used in the terminal device and recording medium
JP2011198096A (en) * 2010-03-19 2011-10-06 Fuji Xerox Co Ltd Communication control device, image forming apparatus, and program
US8797575B2 (en) 2010-03-19 2014-08-05 Fuji Xerox Co., Ltd. Dynamic control of packet filtering period
JP2016149647A (en) * 2015-02-12 2016-08-18 キヤノン株式会社 Communication device, control method, and program

Similar Documents

Publication Publication Date Title
US6883037B2 (en) Fast data decoder that operates with reduced output buffer bounds checking
US7584312B2 (en) Data processing apparatus having improved buffer management
JP2013232207A (en) Method, system, and apparatus for scheduling computer micro-jobs for execution without disruption
JP5099090B2 (en) Multi-core system, multi-core system control method, and multi-processor
US8161234B2 (en) Dynamically switching command types to a mass storage drive
US20100223411A1 (en) Network processing control device, program, and method
JP2009110156A (en) Log output device and log output program
US7490178B2 (en) Threshold on unblocking a processing node that is blocked due data packet passing
WO2005096162A1 (en) Arbitration method and device
WO2022095862A1 (en) Thread priority adjusting method, terminal, and computer readable storage medium
JP2005347894A (en) Computer system and reception interruption processing method thereof
JP2007128425A (en) Activation processing unit, dma transfer system, dma transfer method
JP4659008B2 (en) Peripheral circuit with host load adjustment function
US20130013840A1 (en) Single pipe non-blocking architecture
EP1333683B1 (en) Method and system for memory transfer control of video line data and macroblock data
JP4853951B2 (en) Data processing device
US11550694B2 (en) Packet backpressure detection method, apparatus, and device
JP4612436B2 (en) Audio decoding device
JP2007299126A (en) Controller and program for controller
JP2005190238A (en) Real time control system
JP2007122490A (en) Computer
JP2007128396A (en) Interrupt control method and information processor
CN117827486A (en) Handle resource allocation method and system capable of improving Linux fault tolerance
JP3664079B2 (en) Job stopping method and apparatus in system freeze
JP4984153B2 (en) Block avoidance method in real-time task

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060601

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080909

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080916

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090127