JP2000029852A - Multiprocessor system - Google Patents

Multiprocessor system

Info

Publication number
JP2000029852A
JP2000029852A JP10197501A JP19750198A JP2000029852A JP 2000029852 A JP2000029852 A JP 2000029852A JP 10197501 A JP10197501 A JP 10197501A JP 19750198 A JP19750198 A JP 19750198A JP 2000029852 A JP2000029852 A JP 2000029852A
Authority
JP
Japan
Prior art keywords
time
timer
user mode
storage area
processors
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
JP10197501A
Other languages
Japanese (ja)
Inventor
Yoshiaki Sawada
佳明 澤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP10197501A priority Critical patent/JP2000029852A/en
Publication of JP2000029852A publication Critical patent/JP2000029852A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)

Abstract

PROBLEM TO BE SOLVED: To accurately measure simultaneously executed user's CPU time independently of the size of a program to be executed by a processor of each user. SOLUTION: In this multiprocessor system, a system timer 3 for managing the execution time of the system, a memory 4 for sampling time from the timer 3 and storing the sampled time and two or more processors 100 to 102 for executing respective programs 150 to 152 while driving respective timers 140 to 142 are connected to a bus 2. The timer 3 is always driven, the timers 140 to 142 are stopped in kernel mode operation and driven in user mode operation and the memory 4 measures the program execution time of the user mode operation based on the time sampled from the timers 140 to 142 and the timer 3 and stored in its inside.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、マルチプロセッサ
システムに関し、特に、並列処理プログラムが複数のユ
ーザで同時に実行された場合に、その実行時間を正確に
計測できる密結合型マルチプロセッサシステムに関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiprocessor system, and more particularly, to a tightly coupled multiprocessor system capable of accurately measuring the execution time when a parallel processing program is simultaneously executed by a plurality of users.

【0002】[0002]

【従来の技術】従来、マルチプロセッサシステムにおい
ては、各ユーザが使用するプロセッサの時間を管理する
ため、システムに一つのタイマを備えて各プロセッサに
時刻を転送し、各プロセッサに同一の時刻を保持させて
いた。このような従来のマルチプロセッサシステムの一
例として、特開平3−188513号公報に開示された
「時刻管理システム」を図6に示す。
2. Description of the Related Art Conventionally, in a multiprocessor system, in order to manage the time of a processor used by each user, the system is provided with one timer, the time is transferred to each processor, and the same time is held in each processor. I was letting it. As an example of such a conventional multiprocessor system, FIG. 6 shows a "time management system" disclosed in Japanese Patent Application Laid-Open No. 3-188513.

【0003】図6によれば、上記の「時刻管理システ
ム」においては、システム制御部に一つ設けたタイマか
ら取り出した時刻を、同じくシステム制御部内に設けた
シフトレジスタにロードし、このシフトレジスタから分
割して取り出した所定ビットごとに、すべての値を転送
し終えるまでに発生する時刻の後れを予め補正し、各プ
ロセッサに順次転送して各プロセッサのシフトレジスタ
11−1,12−1に格納させ、同一の時刻を各プロセ
ッサに保持させている。
According to FIG. 6, in the above-mentioned "time management system", a time taken out from a timer provided in a system control unit is loaded into a shift register also provided in the system control unit. For each of the predetermined bits divided and extracted from, the delay of the time that occurs until all the values have been transferred is corrected in advance, and the bits are sequentially transferred to the processors and the shift registers 11-1 and 12-1 of the processors are used. , And each processor holds the same time.

【0004】[0004]

【発明が解決しようとする課題】しかし、上述したよう
な従来の技術では、ユーザ時間が実際の時間よりも大き
く計測されるという問題がある。
However, the conventional technique as described above has a problem that the user time is measured larger than the actual time.

【0005】その理由は、図7に示すように、同時実行
ユーザCPU時間の計測はマルチプロセッサ間での制御
が必要となるために、システムで唯一存在するシステム
タイマを用いて計算せざるをえないからである。つま
り、図7におけるプロセッサbがユーザモードからカー
ネルモードに遷移するときは、プログラムがカーネルモ
ードで実行し始めるたびにシステムタイマ値の取得をオ
ペレーションシステム(OS)で行う必要があり、実際
にカーネルモードで実行し始める時刻Cからシステムタ
イマ値を取得する時刻Aまでの時間差が生じてしまう。
同様にしてカーネルモードからユーザモードに遷移する
時刻を時刻Dとすると、ユーザモードへ遷移する直前の
時刻Eでシステムタイマ値の取得をOSで行う必要があ
るので時間差が生じる。この時間差はユーザモードとカ
ーネルモードの遷移するたびに蓄積され単位時間当たり
遷移する回数が多いプログラムを実行した場合にその時
間差が顕著にあらわれる。
The reason is that, as shown in FIG. 7, the measurement of the concurrently executing user CPU time requires control between the multiprocessors, so that it must be calculated using a system timer which exists only in the system. Because there is no. That is, when the processor b in FIG. 7 shifts from the user mode to the kernel mode, it is necessary to obtain a system timer value by the operation system (OS) every time the program starts executing in the kernel mode. Therefore, there is a time difference from time C at which execution is started to time A at which the system timer value is acquired.
Similarly, if the time of transition from the kernel mode to the user mode is time D, a time difference occurs because the OS needs to acquire the system timer value at time E immediately before the transition to the user mode. This time difference is accumulated each time the user mode transitions to the kernel mode, and the time difference appears remarkably when a program having a large number of transitions per unit time is executed.

【0006】そこで、本発明は、各ユーザのプロセッサ
が実行するプログラムの大きさに関わりなく、同時実行
ユーザCPU時間を正確に計測することを課題としてい
る。
Accordingly, an object of the present invention is to accurately measure the concurrently executing user CPU time regardless of the size of a program executed by each user's processor.

【0007】[0007]

【課題を解決するための手段】上記課題を解決するため
の本発明システムは、システムの実行時間を管理するシ
ステムタイマと、前記システムタイマから時刻を採取し
格納するメモリと、各々のプログラムを各々のタイマを
作動させつつ実行する2以上のプロセッサとをバスに接
続したマルチプロセッサシステムであって、前記システ
ムタイマは、前記プロセッサがカーネルモード動作中か
ユーザモード動作中であるかを問わず常時作動させ、前
記タイマは、カーネルモード動作中においては停止さ
せ、ユーザモード動作中においては作動させ、前記メモ
リは、前記タイマ及び前記システムタイマから採取し格
納した時刻に基づいて、前記ユーザモード動作における
プログラム実行時間を計測するようにしている。
A system according to the present invention for solving the above-mentioned problems includes a system timer for managing the execution time of the system, a memory for collecting and storing time from the system timer, and a program for each program. A multi-processor system in which two or more processors that execute while activating the timer are connected to a bus, wherein the system timer operates constantly regardless of whether the processor is operating in a kernel mode or a user mode. The timer is stopped during the kernel mode operation, and is operated during the user mode operation, and the memory is configured to execute the program in the user mode operation based on the time collected and stored from the timer and the system timer. The execution time is measured.

【0008】又、本発明方法は、システムの実行時間を
管理するシステムタイマと、前記システムタイマから時
刻を採取し格納するメモリと、各々のプログラムを各々
のタイマを作動させつつ実行する2以上のプロセッサと
をバスに接続したマルチプロセッサシステムを用いて、
ユーザモードにおける前記プログラム実行時間を計算す
るプログラム実行時間管理方法であって、前記メモリ
は、前記システムタイマが計測した時刻に基づいて、前
記ユーザモードにおける前記プログラム実行時間を計算
するとともに、前記システムタイマ及び前記タイマが計
測した時刻に基づいて、前記ユーザモードから前記カー
ネルモードに遷移する時間及び前記カーネルモードから
前記ユーザモードに遷移する時間を計算し、前記各計算
に基づいて、前記ユーザモードにおける前記プログラム
実行時間を補正計算するようにしている。
Further, the method of the present invention comprises a system timer for managing the execution time of the system, a memory for collecting and storing the time from the system timer, and two or more programs for executing each program while operating each timer. Using a multiprocessor system with a processor and a bus connected,
A program execution time management method for calculating the program execution time in a user mode, wherein the memory calculates the program execution time in the user mode based on a time measured by the system timer, and And based on the time measured by the timer, calculate the time to transition from the user mode to the kernel mode and the time to transition from the kernel mode to the user mode, based on each calculation, the user mode in the user mode The program execution time is corrected and calculated.

【0009】すなわち、本発明においては、各プロセッ
サにもタイマを備えさせて、時間補正を行い、誤差なく
同時実行ユーザCPU時間を算出している。
That is, in the present invention, each processor is also provided with a timer, time correction is performed, and the simultaneous execution user CPU time is calculated without error.

【0010】[0010]

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

【0011】図1は、本発明のマルチプロセッサシステ
ムの構成を示すブロック図である。図1に示すように、
本発明のマルチプロセッサシステムにおいては、複数の
プロセッサ100、101、102がバス2を介して1
台のメモリ(主記憶)4に接続されている。そして、メ
モリ4には同時実行ユーザCPU時間計測機構5が搭載
され、排他制御機構6、時刻採取機構7、同時実行数カ
ウンタ8、ユーザCPU時間格納領域9、全プロセッサ
に割り当てられる時刻格納領域G10、ユーザモードで
動いているプロセッサに割り当てられる時刻格納領域H
11、タイマ値格納領域12、補正用カウンタ13が含
まれている。また、時刻を表すためのものとして、本シ
ステムに唯一存在するシステムタイマ3とプロセッサご
とに存在するタイマ140、141、142がある。図
1では簡単のため3台のプロセッサのみ図示している。
FIG. 1 is a block diagram showing the configuration of a multiprocessor system according to the present invention. As shown in FIG.
In the multiprocessor system of the present invention, a plurality of processors 100, 101, 102
It is connected to the memory (main memory) 4 of the unit. The memory 4 is equipped with a simultaneous execution user CPU time measurement mechanism 5, and includes an exclusive control mechanism 6, a time collection mechanism 7, a simultaneous execution number counter 8, a user CPU time storage area 9, and a time storage area G10 allocated to all processors. , Time storage area H allocated to the processor operating in the user mode
11, a timer value storage area 12, and a correction counter 13 are included. The system timer 3 which is solely present in the present system and the timers 140, 141 and 142 which exist for each processor are used to represent the time. FIG. 1 shows only three processors for simplicity.

【0012】次に、このシステムの各構成要素について
説明する。
Next, each component of the system will be described.

【0013】プロセッサごとに存在するタイマ140、
141、142は、プロセッサごとのプログラム15
0、151、152がユーザモードで 実行されている
ときのみ動作(カウントアップ)するタイマである。つ
まり、プログラム150、151、152がカーネルモ
ードで実行されている間はタイマ140、141、14
2は停止される。
A timer 140 for each processor;
141 and 142 are programs 15 for each processor.
Timers that operate (count up) only when 0, 151, and 152 are executed in the user mode. That is, while the programs 150, 151, and 152 are executed in the kernel mode, the timers 140, 141, and 14 are executed.
2 is stopped.

【0014】システムタイマ3は、計算機システム運用
中は常に動作(カウントアップ)する タイマであり、
プロセッサ100、101、102の動作状態やメモリ
4の状態に影響されない。カウントアップの時間間隔単
位はタイマ140、141、142と同様である。
The system timer 3 is a timer which always operates (counts up) during operation of the computer system.
It is not affected by the operation states of the processors 100, 101, 102 and the state of the memory 4. The time interval unit of the count-up is the same as that of the timers 140, 141, and 142.

【0015】排他制御機構6は、同時実行数カウンタ
8、ユーザCPU時間格納領域9、全プロセッサに割り
当てられる時刻格納領域G10に対する参照、更新を独
占して行う権利を獲得、解放するために使用する機構で
ある。
The exclusive control mechanism 6 is used to acquire and release the right to exclusively refer to and update the concurrent execution number counter 8, the user CPU time storage area 9, and the time storage area G10 allocated to all processors. Mechanism.

【0016】時刻採取機構7は、システムタイマ3及び
タイマ140,141,142の時刻を取得する機構で
ある。
The time collecting mechanism 7 is a mechanism for obtaining the times of the system timer 3 and the timers 140, 141 and 142.

【0017】同時実行数カウンタ8は、ユーザモードで
動いているプロセッサの台数をカウントする。
The concurrent execution number counter 8 counts the number of processors operating in the user mode.

【0018】ユーザCPU時間格納領域9は、同時実行
ユーザCPU時間を示し、各々のプロセッサに格納領域
を割り当てて、各々のプロセッサがユーザモードで動作
した時間を格納する。
The user CPU time storage area 9 indicates the concurrently executing user CPU time, and allocates a storage area to each processor to store the time during which each processor operates in the user mode.

【0019】全プロセッサに割り当てられる時刻格納領
域G10、ユーザモードで動くプロセッサに割り当てら
れる時刻格納領域H11は、それぞれシステムタイマ3
の値を格納する領域である。
The time storage area G10 allocated to all processors and the time storage area H11 allocated to the processor operating in the user mode respectively include a system timer 3
Area for storing the value of

【0020】タイマ値格納領域12は、各プロセッサ1
00,101,102が保持しているタイマ140,1
41,142の値を格納する領域である。
The timer value storage area 12 stores each processor 1
Timers 140, 1 held by 00, 101, 102
This area stores the values of 41 and 142.

【0021】補正用カウンタ13は、同時実行数カウン
タの値を複写し時間補正時に使用する。
The correction counter 13 copies the value of the simultaneous execution number counter and uses it at the time of time correction.

【0022】次に、図2乃至図5を参照して 本発明の
実行時間計測システムの動作について説明する。以下、
簡単のため、図7に示すように、プロセッサaとプロセ
ッサbが同時にユーザモードで動く場合について説明す
る。すなわち、図7においては、同時実行数は、最大で
2である。
Next, the operation of the execution time measuring system of the present invention will be described with reference to FIGS. Less than,
For simplicity, a case where the processor a and the processor b simultaneously operate in the user mode as shown in FIG. 7 will be described. That is, in FIG. 7, the maximum number of simultaneous executions is two.

【0023】最初に、図2を参照して、プロセッサaが
カーネルモードからユーザモードへ実行を遷移させると
きの動作について説明する。ここで、カーネルモードと
は、ユーザが備えるプロセッサのみでプログラムを実行
するモードである。又、ユーザモードとは、マルチプロ
セッサ管理システムが備える演算装置を使用して、ユー
ザのプログラムを実行するモードである。
First, with reference to FIG. 2, an operation when the processor a transitions the execution from the kernel mode to the user mode will be described. Here, the kernel mode is a mode in which a program is executed only by a processor provided by the user. The user mode is a mode in which a user program is executed using an arithmetic device provided in the multiprocessor management system.

【0024】まず、他のプロセッサとの処理の排他制御
を行うため、ロックの設定を行う(ステップS1)。
First, a lock is set to perform exclusive control of processing with another processor (step S1).

【0025】次に、同時実行数カウンタ8のインクリメ
ントを行う(ステップS2)。これは、プロセッサaが
ユーザモードで実行し始めることにより、同時実行数が
1から2に増加したことを記録するためである。
Next, the simultaneous execution number counter 8 is incremented (step S2). This is to record that the number of simultaneous executions has increased from 1 to 2 when the processor a starts executing in the user mode.

【0026】次に、現在時刻(システムタイマ3)の採
取を行い、時刻格納領域G10と時刻格納領域H11
に、その現在時刻を格納する(ステップS3)。ここ
で、時刻格納領域G10においては、プロセッサaを含
めて全プロセッサについてアドレスを設けてそれぞれ格
納する。一方、時刻格納領域H11については、プロセ
ッサaを含めて、ユーザモードで動いている同時実行プ
ロセッサごとにアドレスを設けてそれぞれ格納する。従
って、この場合は、プロセッサa及びプロセッサbに対
して、時刻格納領域H11内にアドレスが与えられてい
る。
Next, the current time (system timer 3) is collected, and the time storage area G10 and the time storage area H11 are collected.
Is stored (step S3). Here, in the time storage area G10, addresses are provided and stored for all processors including the processor a. On the other hand, in the time storage area H11, an address is provided and stored for each concurrently executing processor operating in the user mode, including the processor a. Therefore, in this case, an address is given to the processor a and the processor b in the time storage area H11.

【0027】次に、プロセッサa内のタイマの値の取得
を行い、図7に示した時刻Bをタイマ値格納領域12中
のプロセッサaのためのアドレスに格納を行う(ステッ
プS4)。
Next, the value of the timer in the processor a is obtained, and the time B shown in FIG. 7 is stored in the address for the processor a in the timer value storage area 12 (step S4).

【0028】そして、最後に、ロックの解除を行う(ス
テップS5)。
Finally, the lock is released (step S5).

【0029】次に、図3を参照して、プロセッサbがユ
ーザモードからカーネルモードへ実行を遷移させるとき
の動作について説明する。
Next, with reference to FIG. 3, an operation when the processor b transitions the execution from the user mode to the kernel mode will be described.

【0030】まず、他のプロセッサとの処理の排他制御
を行うため、ロックの設定を行う(ステップS10)。
First, a lock is set in order to perform exclusive control of processing with another processor (step S10).

【0031】次に、同時実行数カウンタ8のデクリメン
トを行う(ステップS20)。これは、プロセッサbが
カーネルモードで実行し始めることにより、同時実行数
が減少することを記録するためである。
Next, the simultaneous execution number counter 8 is decremented (step S20). This is to record that the number of simultaneous executions decreases when the processor b starts executing in the kernel mode.

【0032】次に、システムタイマ3から時刻Aの採取
を行う(ステップS30)。
Next, time A is collected from the system timer 3 (step S30).

【0033】次に、時刻格納領域Hから、プロセッサa
が最直前にカーネルモードを終了した時刻Bを取得する
(ステップS40)。
Next, from the time storage area H, the processor a
Acquires the time B at which the kernel mode was terminated immediately before (step S40).

【0034】次に、ステップS30で取得した時刻Aか
らステップS40で 取得した時刻Bを減算する。(ス
テップS50)。この減算結果値(A−B)が、補正前
の同時実行ユーザCPU時間となる。
Next, the time B obtained in step S40 is subtracted from the time A obtained in step S30. (Step S50). This subtraction result value (AB) is the simultaneous execution user CPU time before correction.

【0035】本発明では補正を行うため、更に以下の処
理を行う。
In the present invention, the following processing is further performed to perform the correction.

【0036】まず、プロセッサbがユーザモードからカ
ーネルモードに遷移した時刻Cをプロセッサbのタイマ
から取得する(ステップS60)。
First, the time C at which the processor b transits from the user mode to the kernel mode is obtained from the timer of the processor b (step S60).

【0037】そして、次に、タイマ値格納領域12より
当プロセッサbが前回カーネルモードからユーザモード
に遷移したときの時刻D(正確には、前回ユーザモード
からカーネルモードに遷移したときの時刻(カーネルモ
ードで実行中中のプロセッサのタイマの時刻は進まな
い))を取得する(ステップS70)。
Next, from the timer value storage area 12, the time D when the processor b transited from the kernel mode to the user mode last time (more precisely, the time D when the processor b transited from the user mode to the kernel mode last time (to be precise, the kernel time) The time of the timer of the processor being executed in the mode does not advance)) is acquired (step S70).

【0038】次に、ステップS60で取得した時刻Cか
らステップS70で取得した時刻Dを減算する(ステッ
プS80)。
Next, the time D obtained in step S70 is subtracted from the time C obtained in step S60 (step S80).

【0039】次に、時刻格納領域G10よりプロセッサ
bの識別番号に相当する領域から当該プロセッサの前回
のカーネル終了時の時刻Eの取得を行い(ステップS9
0)、ステップS30で取得した時刻AからステップS
90で取得した時刻Eの減算を行う(ステップS10
0)。さらにステップS100で行った減算結果Zから
ステップS80で行った減算結果Yを減算する(ステッ
プS110)。この値H( =(Z−Y))が補正値で
ある。
Next, the time E at the time of the previous kernel termination of the processor is obtained from the area corresponding to the identification number of the processor b from the time storage area G10 (step S9).
0), from time A obtained in step S30 to step S
The time E obtained at step 90 is subtracted (step S10).
0). Further, the subtraction result Y performed in step S80 is subtracted from the subtraction result Z performed in step S100 (step S110). This value H (= (Z−Y)) is the correction value.

【0040】よって、補正前の同時実行ユーザCPU時
間Xから補正値H(を減算することにより正確な同時実
行ユーザCPU時間Tが算出される(ステップS12
0)。
Accordingly, the correct concurrent execution user CPU time T is calculated by subtracting the correction value H (from the concurrent execution user CPU time X before correction (step S12).
0).

【0041】本来なら、ここで生成された値を現在の同
時実行数カウンタ8の値に相当するユーザCPU時間格
納領域9に加算すべきであるが、ユーザで実行される時
間があまりにも短い場合、生成される値が負となり加算
結果が負になってしまう可能性があるため、現在の同時
実行数カウンタ8の値よりも小さい台数に対して加算す
る処理を施さなければならない。具体的には、ステップ
S120で生成された値と補正用カウンタ13(初期値
は同時実行数カウンタと同値)に対応する同時実行ユー
ザCPU時間を加算し、加算結果が正であるかどうかを
チェックする(ステップS130)。
Normally, the value generated here should be added to the user CPU time storage area 9 corresponding to the current value of the simultaneous execution number counter 8, but if the time executed by the user is too short, Since the generated value may be negative and the addition result may be negative, it is necessary to perform a process of adding to a number smaller than the current value of the concurrent execution number counter 8. Specifically, the value generated in step S120 and the concurrent execution user CPU time corresponding to the correction counter 13 (the initial value is the same value as the concurrent execution number counter) are added, and it is checked whether the addition result is positive. (Step S130).

【0042】結果が正の場合、その値を同時実行ユーザ
CPU時間格納領域9に格納し(ステップS140)、
最後にロックの解除を行う。(ステップS150)。
If the result is positive, the value is stored in the concurrent execution user CPU time storage area 9 (step S140),
Finally, release the lock. (Step S150).

【0043】結果が負の場合、補正カウンタに対応する
同時実行ユーザCPU時間格納領域9に0を格納する
(ステップS160)。そしてステップS130の加算
値をステップS120で生成された値とみなし(ステッ
プS170)、補正カウンタをデクリメントする(ステ
ップS180)。そして新しい補正カウンタ値でステッ
プS130の処理を行う。以後ステップS130の結果
がYとなるまでこれを繰り返す。
If the result is negative, 0 is stored in the simultaneous execution user CPU time storage area 9 corresponding to the correction counter (step S160). Then, the added value in step S130 is regarded as the value generated in step S120 (step S170), and the correction counter is decremented (step S180). Then, the process of step S130 is performed with the new correction counter value. Thereafter, this is repeated until the result of step S130 becomes Y.

【0044】以上、本発明の一つの実施形態について説
明した。特に、図5のフローチャートにおいては、ステ
ップS130、ステップS160、ステップS170、
ステップS180がループを形成している。しかし、こ
のフローチャートによれば、プロセッサの台数が多い場
合、オーバーヘッドの増加を招き性能上問題となる場合
があり得る。
As described above, one embodiment of the present invention has been described. In particular, in the flowchart of FIG. 5, step S130, step S160, step S170,
Step S180 forms a loop. However, according to this flowchart, when the number of processors is large, overhead may be increased and a problem may occur in performance.

【0045】このような場合に好適な本発明の他の実施
形態としては、ステップS130の判断処理の結果がN
の時には、直ちにステップS150に進んで処理を終え
ることが考えられる。
In another embodiment of the present invention suitable for such a case, the result of the judgment processing in step S130 is N
In the case of, it is conceivable to immediately proceed to step S150 to end the processing.

【0046】このシステムにより、性能上問題のない同
時実行ユーザCPU時間の計測が実現できる。本実施例
では、図5のフローチャートと比較して補正が不十分な
ため、同時実行ユーザCPU時間に多少の誤差が生ずる
ことになるが、それは、短時間の間にユーザモードとカ
ーネルモードの遷移が非常に多く発生するような特殊な
プログラムを実行したときのみにあらわれるものであ
り、一般的なプログラムを実行した場合には誤差はほと
んど発生せず問題とはならない。
With this system, measurement of the concurrently executing user CPU time without any problem in performance can be realized. In the present embodiment, the correction is insufficient compared with the flowchart of FIG. 5, so that a slight error occurs in the concurrently executed user CPU time. Appears only when a special program that causes a large number of occurrences is executed. When a general program is executed, little error occurs and no problem occurs.

【0047】[0047]

【発明の効果】以上説明した本発明によれば、誤差のな
い同時実行ユーザCPU時間が計測できる。その理由
は、従来算出された値に補正処理を施してあるためであ
る。
According to the present invention described above, the simultaneous execution user CPU time without error can be measured. The reason is that a correction process is performed on the conventionally calculated value.

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

【図1】本発明のマルチプロセッサシステムの構成を示
すブロック図。
FIG. 1 is a block diagram showing a configuration of a multiprocessor system of the present invention.

【図2】同時実行数が増加する場合の本発明のマルチプ
ロセッサシステムの動作を説明するフローチャート。
FIG. 2 is a flowchart illustrating the operation of the multiprocessor system of the present invention when the number of simultaneous executions increases.

【図3】同時実行数が減少する場合の本発明のマルチプ
ロセッサシステムの動作を説明するフローチャート。
FIG. 3 is a flowchart for explaining the operation of the multiprocessor system of the present invention when the number of simultaneous executions decreases.

【図4】同時実行数が減少する場合の本発明のマルチプ
ロセッサシステムの動作を説明するフローチャート(続
き)。
FIG. 4 is a flowchart (continued) for explaining the operation of the multiprocessor system of the present invention when the number of simultaneous executions decreases.

【図5】ユーザモードでの実行時間が短い場合の処理を
説明するフローチャート。
FIG. 5 is a flowchart for explaining processing when the execution time in the user mode is short.

【図6】従来の時刻管理システムの構成を示すブロック
図。
FIG. 6 is a block diagram showing a configuration of a conventional time management system.

【図7】カーネルモードとユーザモードの遷移を説明す
るタイムチャート。
FIG. 7 is a time chart for explaining a transition between a kernel mode and a user mode.

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

2 バス 3 システムタイマ 4 メモリ 5 同時実行ユーザCPU時間計測機構 6 排他制御機構 7 時刻採取機構 8 同時実行数カウンタ 9 ユーザCPU時間格納領域 10 全プロセッサにアドレスを付与してシステムタイ
マ値を格納する時刻格納領域G 11 ユーザモードで動いているプロセッサにアドレス
を付与してシステムタイマ値を格納する時刻格納領域H 12 タイマ知値格納領域 13 補正用カウンタ 100,101,102 プロセッサ 140.141,142 タイマ 150,151,152 プログラム
2 Bus 3 System timer 4 Memory 5 Simultaneous execution user CPU time measurement mechanism 6 Exclusive control mechanism 7 Time sampling mechanism 8 Simultaneous execution number counter 9 User CPU time storage area 10 Time at which addresses are assigned to all processors and the system timer value is stored Storage area G 11 Time storage area H 12 for assigning an address to a processor operating in user mode and storing a system timer value 12 Timer knowledge storage area 13 Correction counter 100, 101, 102 Processor 140.141, 142 Timer 150 , 151, 152 programs

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 システムの実行時間を管理するシステム
タイマと、前記システムタイマから時刻を採取し格納す
るメモリと、各々のプログラムを各々のタイマを作動さ
せつつ実行する2以上のプロセッサとをバスに接続した
マルチプロセッサシステムであって、 前記システムタイマは、前記プロセッサがカーネルモー
ド動作中かユーザモード動作中であるかを問わず常時作
動させ、 前記タイマは、カーネルモード動作中においては停止さ
せ、ユーザモード動作中においては作動させ、 前記メモリは、前記タイマ及び前記システムタイマから
採取し格納した時刻に基づいて、前記ユーザモード動作
におけるプログラム実行時間を計測することを特徴とす
るマルチプロセッサシステム。
1. A system timer that manages the execution time of a system, a memory that collects and stores time from the system timer, and two or more processors that execute each program while operating each timer are provided on a bus. A connected multiprocessor system, wherein the system timer always operates regardless of whether the processor is operating in the kernel mode or the user mode, and the timer is stopped during the operation in the kernel mode. The multiprocessor system is operated during a mode operation, wherein the memory measures a program execution time in the user mode operation based on a time taken and stored from the timer and the system timer.
【請求項2】 前記メモリは、前記システムタイマ及び
前記タイマの時刻を採取する時刻採取機構と、前記2以
上のプロセッサのすべてにアドレスを付与して前記シス
テムタイマの時刻を前記時刻採取機構から読み読み出し
格納する第1時刻格納領域と、前記ユーザモード動作中
の前記プロセッサにアドレスを付与して前記システムタ
イマの時刻を前記時刻採取機構から読み出し格納する第
2時刻格納領域と、前記2以上のプロセッサのすべての
タイマの時刻を時刻採取機構から読み出し格納するタイ
マ値格納領域とを備え、 前記第1時刻格納領域と、前記第2時刻格納領域と、前
記タイマ値格納領域と、前記システムタイマのそれぞれ
から採取し格納した時刻に基づいて、前記ユーザモード
動作におけるプログラム実行時間を計測することを特徴
とする請求項1記載のマルチプロセッサシステム。
2. The memory according to claim 1, further comprising: a time sampling mechanism for sampling the time of the system timer and the timer; and reading addresses of the system timer from the time sampling mechanism by assigning addresses to all of the two or more processors. A first time storage area for reading and storing, a second time storage area for giving an address to the processor in the user mode operation and reading and storing the time of the system timer from the time collecting mechanism, and the two or more processors A timer value storage area for reading and storing the times of all the timers from a time collection mechanism, wherein each of the first time storage area, the second time storage area, the timer value storage area, and the system timer Measuring the program execution time in the user mode operation based on the time collected and stored from the Multiprocessor system according to claim 1, wherein.
【請求項3】 前記メモリは、同時に前記ユーザモード
動作中のプロセッサの台数を計数する同時実行数カウン
タと、前記プロセッサの一つについてのみ処理を行うた
めの排他制御機構と、前記ユーザモードでの実行時間を
補正するための補正用カウンタと、前記補正用カウンタ
で補正済みの実行時間を同時実行に係るプロセッサにつ
いて合計するユーザCPU時間格納領域とを備えたこと
を特徴とする請求項2記載のマルチプロセッサシステ
ム。
3. The memory according to claim 2, wherein the memory includes a concurrent execution counter for counting the number of processors simultaneously operating in the user mode, an exclusive control mechanism for performing processing on only one of the processors, 3. The apparatus according to claim 2, further comprising: a correction counter for correcting an execution time; and a user CPU time storage area for summing execution times corrected by the correction counter for processors involved in simultaneous execution. Multiprocessor system.
【請求項4】 システムの実行時間を管理するシステム
タイマと、前記システムタイマから時刻を採取し格納す
るメモリと、各々のプログラムを各々のタイマを作動さ
せつつ実行する2以上のプロセッサとをバスに接続した
マルチプロセッサシステムを用いて、ユーザモードにお
ける前記プログラム実行時間を管理するプログラム実行
時間管理方法であって、 前記メモリは、前記システムタイマが計測した時刻に基
づいて、前記ユーザモードにおける前記プログラム実行
時間を計算するとともに、 前記システムタイマ及び前記タイマが計測した時刻に基
づいて、前記ユーザモードから前記カーネルモードに遷
移する時間及び前記カーネルモードから前記ユーザモー
ドに遷移する時間を計算し、 前記各計算に基づいて、前記ユーザモードにおける前記
プログラム実行時間を補正計算することを特徴とするプ
ログラム実行時間管理方法。
4. A bus comprising: a system timer for managing the execution time of the system; a memory for collecting and storing time from the system timer; and two or more processors for executing each program while operating each timer. A program execution time management method for managing the program execution time in a user mode using a connected multiprocessor system, wherein the memory executes the program execution in the user mode based on a time measured by the system timer. Calculating a time, based on a time measured by the system timer and the timer, calculating a time of transition from the user mode to the kernel mode and a time of transition from the kernel mode to the user mode; In the user mode based on A program execution time management method for correcting the program execution time.
【請求項5】 前記補正計算の結果が負の場合には、前
記補正計算の結果をゼロとみなして、同時実行に係るプ
ロセッサについて前記プログラム実行時間を合計するこ
とを特徴とするプログラム実行時間管理方法。
5. The program execution time management as claimed in claim 5, wherein when the result of said correction calculation is negative, the result of said correction calculation is regarded as zero, and said program execution times are summed up for processors involved in simultaneous execution. Method.
JP10197501A 1998-07-13 1998-07-13 Multiprocessor system Pending JP2000029852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10197501A JP2000029852A (en) 1998-07-13 1998-07-13 Multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10197501A JP2000029852A (en) 1998-07-13 1998-07-13 Multiprocessor system

Publications (1)

Publication Number Publication Date
JP2000029852A true JP2000029852A (en) 2000-01-28

Family

ID=16375530

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10197501A Pending JP2000029852A (en) 1998-07-13 1998-07-13 Multiprocessor system

Country Status (1)

Country Link
JP (1) JP2000029852A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010109669A1 (en) * 2009-03-27 2010-09-30 富士通株式会社 Information processing device, information processing system, and information processing device configuration verification method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010109669A1 (en) * 2009-03-27 2010-09-30 富士通株式会社 Information processing device, information processing system, and information processing device configuration verification method

Similar Documents

Publication Publication Date Title
US6609216B1 (en) Method for measuring performance of code sequences in a production system
US20080077928A1 (en) Multiprocessor system
JPH06222936A (en) Method for update of value of shared variable
TWI435271B (en) Central processing unit measurement facility
JPH0461381B2 (en)
CN107423206B (en) Method and device for measuring system management interruption time
JP2000029852A (en) Multiprocessor system
US6725363B1 (en) Method for filtering instructions to get more precise event counts
JP4066838B2 (en) Shared resource conflict detector and shared resource conflict detection method
JP2775817B2 (en) Information processing device
JP3884237B2 (en) Multi-thread profile method, profile device, and computer program
CN112860529A (en) Universal analysis device and method
JPH11327927A (en) Cpu using rate measurement system
US9990269B2 (en) Apparatus and method for controlling debugging of program instructions including a transaction
JPH09114750A (en) Bus controller
JP7153731B2 (en) Commit window move element
JP3795055B1 (en) Value prediction apparatus, multiprocessor system, and value prediction method
JP5375756B2 (en) Time monitoring apparatus and method
JPS63259740A (en) Performance estimating device
JP3941848B2 (en) Performance measuring apparatus, recording medium storing performance measuring program, and performance measuring method
JPH07262055A (en) Processing time predicting method for computer program and computer therefor
JP3818172B2 (en) Multiprocessor system, process control method, and process control program
JP3043265B2 (en) Timer control method
JPH09128373A (en) Support method for numerical value calculation
JPS62204351A (en) Deadlock releasing system