JPH06161889A - Method and device for estimating cache memory hit rate - Google Patents

Method and device for estimating cache memory hit rate

Info

Publication number
JPH06161889A
JPH06161889A JP4314948A JP31494892A JPH06161889A JP H06161889 A JPH06161889 A JP H06161889A JP 4314948 A JP4314948 A JP 4314948A JP 31494892 A JP31494892 A JP 31494892A JP H06161889 A JPH06161889 A JP H06161889A
Authority
JP
Japan
Prior art keywords
cache memory
program
instruction
processor
memory
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
JP4314948A
Other languages
Japanese (ja)
Inventor
Taikichi Jiyoutou
泰吉 上等
Yasuo Tachibana
康夫 立花
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP4314948A priority Critical patent/JPH06161889A/en
Publication of JPH06161889A publication Critical patent/JPH06161889A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To provide the device for easily estimating the hit rate of a cache memory used in a computer. CONSTITUTION:The computer is expressed by a queue model, and various data provided by analyzing data measured by a timer 8 to measure the processing time of a program by executing the program while changing the operation modes of cache memories 2a and 2b and by an instruction class executed number accumulating means 19 for accumulating the number of execution at every instruction classes executed at a processor 3 are substituted in a formula formularizing the processing time of the program from this model at every operation mode of cache memories 2a and 2b, and the hit rate of the cache memories 2a and 2b is calculated. A control program integrated into the computer entirely performs the setting of the operation mode, the measurement of data, the analysis of data and the calculation of the hit rate.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、計算機に使用される
キャッシュメモリに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory used in a computer.

【0002】[0002]

【従来の技術】図7は一般的な計算機システムの構成を
説明するための図である。図において1は中央処理装
置、2aは命令キャッシュメモリ、2bはデータキャッ
シュメモリ、3は中央処理装置1と命令キャッシュメモ
リ2aとデータキャッシュメモリ2bとからなるプロセ
ッサ、4はプロセッサ3で実行されるプログラムと所望
のデータが格納されている主記憶、5はプロセッサ3と
主記憶4を接続するメモリバス、6はオペレータが計算
機を操作するための操作端末、7は操作端末6とプロセ
ッサ3の間の情報の入出力を媒介する入出力装置、8は
プログラムの処理時間を計測するタイマーである。図8
は、例えば「電子情報通信学会技術研究報告Vol.8
7 No.422」、電子情報通信学会、P19に示さ
れた従来のキャッシュメモリのヒット率推定装置を示す
ものである。図において1〜8は図7と同一のものであ
り、9aは中央処理装置が命令読みだし要求をした場合
に、そのアドレスを順番に格納する命令トレースメモ
リ、9bは中央処理装置がデータアクセス要求をした場
合にそのアドレスを順番に格納するデータトレースメモ
リ、10はトレースメモリ9に格納されたメモリアドレ
スを格納順に読みだし出力するアドレス供給回路、11
はキャッシュメモリ2の動作を模擬し、アドレス供給回
路10から出力されたアドレス数のカウント機能と、供
給されたアドレスと一致するアドレスデータを格納して
いた場合に、それをヒット数としてカウントする機能と
を備えたキャッシュメモリシミュレータである。
2. Description of the Related Art FIG. 7 is a diagram for explaining the configuration of a general computer system. In the figure, 1 is a central processing unit, 2a is an instruction cache memory, 2b is a data cache memory, 3 is a processor comprising the central processing unit 1, an instruction cache memory 2a and a data cache memory 2b, and 4 is a program executed by the processor 3. And a main memory in which desired data is stored, 5 is a memory bus connecting the processor 3 and the main memory 4, 6 is an operating terminal for an operator to operate the computer, and 7 is a space between the operating terminal 6 and the processor 3. An input / output device that mediates the input and output of information, and 8 is a timer that measures the processing time of a program. Figure 8
Is, for example, “Technical Research Report Vol.8 of IEICE.
7 No. 422 ", Institute of Electronics, Information and Communication Engineers, page 19 of the conventional hit rate estimating apparatus for cache memory. In the figure, 1 to 8 are the same as those in FIG. 7, 9a is an instruction trace memory that stores the addresses in order when the central processing unit issues an instruction read request, and 9b is a data access request from the central processing unit. A data trace memory 10 for storing the addresses in order when the data is stored, an address supply circuit 10 for reading out and outputting the memory addresses stored in the trace memory 9 in the storage order, 11
Is a function of simulating the operation of the cache memory 2 and a function of counting the number of addresses output from the address supply circuit 10 and a function of counting the number of hits when the address data matching the supplied address is stored. It is a cache memory simulator equipped with and.

【0003】次に動作について説明する。主記憶4には
プロセッサ3に処理させるプログラムと所望のデータが
格納されており、操作端末6からオペレータによって入
出力装置7を介して送られた指令により、中央処理装置
1でプログラムの処理が開始される。中央処理装置1が
プログラムを実行する場合、命令やデータのアクセス要
求をキャッシュメモリ2に対して行う。キャッシュメモ
リ2を使用状態としている場合には、キャッシュメモリ
2には予め決められた規則に従って、主記憶4から読み
だされたデータが一時的に記憶されており、中央処理装
置1からのアクセス要求データがキャッシュメモリ2に
記憶されていた場合は、キャッシュメモリ2が中央処理
装置1に対してデータを供給する。またキャッシュメモ
リ2に中央処理装置1から要求されたデータが記憶され
ていなかった場合、主記憶4にアクセス要求を行い、メ
モリバス5の調停によりアクセスが許可されると主記憶
4から当該データを読み出し、中央処理装置1に対して
データを供給する。このとき主記憶4から読み出された
データは、キャッシュメモリ2に格納されているデータ
と予め決められている規則に従って置き換えられる。ま
た2つのキャッシュメモリ2が同時に主記憶4にアクセ
ス要求を発生した場合、公平にアクセス出来るようにバ
ス調停が行われ、順番にメモリアクセスが許可される。
また、キャッシュメモリの機能を使用しない場合は、デ
ータの記憶を全く行わず、中央処理装置1からメモリア
クセス要求が発生すると、キャッシュメモリ2は常に主
記憶4から当該データを読みだし、中央処理装置1に対
してデータを供給する。以上のような動作を繰り返すこ
とによりプログラムが処理され、処理を終了すると入出
力装置7を介して操作端末6に結果が送られ表示され
る。また必要に応じてタイマー8で処理時間の計測を行
う。キャッシュメモリ2のヒット率を推定する場合に
は、トレースメモリ9をプロセッサ3に接続しプログラ
ムの処理中、中央処理装置1から出力される命令やデー
タのアクセス要求をモニターし、要求が発生する度にそ
のメモリアドレスをそれぞれのトレースメモリ9に順次
格納する。命令キャッシュメモリ2aのヒット率を推定
するには、命令トレースメモリ9aに格納されたアドレ
スをアドレス供給回路10が格納された順に読みだし、
キャッシュメモリシミュレータ11に供給する。キャッ
シュメモリシミュレータ11はアドレスが供給される度
にその数をカウントし、またそのアドレスに対応したメ
モリデータを記憶していた場合にはそれをヒット数とし
てカウントする。そしてすべてのアドレスの供給が終っ
たときのヒット数と、供給されたアドレス数からヒット
率を算出している。またデータキャッシュメモリ2bの
ヒット率も、データトレースメモリ9bのデータを使用
することで同様に算出される。
Next, the operation will be described. A program to be processed by the processor 3 and desired data are stored in the main memory 4, and the processing of the program is started in the central processing unit 1 by a command sent from the operation terminal 6 by the operator via the input / output device 7. To be done. When the central processing unit 1 executes a program, it makes an access request for instructions and data to the cache memory 2. When the cache memory 2 is in use, the data read from the main memory 4 is temporarily stored in the cache memory 2 according to a predetermined rule, and the access request from the central processing unit 1 is issued. When the data is stored in the cache memory 2, the cache memory 2 supplies the data to the central processing unit 1. When the data requested by the central processing unit 1 is not stored in the cache memory 2, an access request is issued to the main memory 4, and when the access is permitted by the arbitration of the memory bus 5, the data is transferred from the main memory 4. Read out and supply data to the central processing unit 1. At this time, the data read from the main memory 4 is replaced with the data stored in the cache memory 2 according to a predetermined rule. Further, when two cache memories 2 simultaneously issue access requests to the main memory 4, bus arbitration is performed so that they can be accessed fairly, and memory access is permitted in order.
When the function of the cache memory is not used, data is not stored at all, and when a memory access request is issued from the central processing unit 1, the cache memory 2 always reads the data from the main memory 4, and the central processing unit Supply data to 1. The program is processed by repeating the above operation, and when the processing is completed, the result is sent to the operation terminal 6 via the input / output device 7 and displayed. Further, the processing time is measured by the timer 8 as needed. When estimating the hit rate of the cache memory 2, the trace memory 9 is connected to the processor 3 and the access request for the instruction or data output from the central processing unit 1 is monitored during the processing of the program, and the request is generated each time. Then, the memory address is sequentially stored in each trace memory 9. To estimate the hit rate of the instruction cache memory 2a, the addresses stored in the instruction trace memory 9a are read in the order in which the address supply circuit 10 is stored,
It is supplied to the cache memory simulator 11. The cache memory simulator 11 counts the number of times each time an address is supplied, and when the memory data corresponding to the address is stored, counts it as the number of hits. Then, the hit ratio is calculated from the number of hits when the supply of all addresses is completed and the number of supplied addresses. Further, the hit rate of the data cache memory 2b is also calculated similarly by using the data of the data trace memory 9b.

【0004】[0004]

【発明が解決しようとする課題】従来のキャッシュメモ
リのヒット率推定方法と装置では、すべてのメモリアク
セスアドレスを実行順にメモリに保存しておく必要があ
るので、多くの命令を実行するプログラムの場合は大容
量のメモリを用意しなければならず、用意されたメモリ
容量を越える場合は、メモリ容量分の部分しか評価でき
ず全体の評価ができない、ヒット率の実時間に対する変
動がわからない、実時間に対する命令キャッシュメモリ
とデータキャッシュメモリのヒット率との対応がとれな
い、また計算機シミュレーションを行うので1回の推定
に多くの時間がかかる、使用するキャッシュメモリの容
量や種類毎にシミュレータを作成する必要があるなどと
いった問題点があった。
In the conventional cache memory hit rate estimation method and apparatus, it is necessary to store all memory access addresses in the memory in the order of execution. Therefore, in the case of a program that executes many instructions. Has to prepare a large amount of memory, and when the prepared memory capacity is exceeded, only the portion corresponding to the memory capacity can be evaluated and the whole evaluation cannot be performed. There is no correspondence between the hit ratio of the instruction cache memory and the hit ratio of the data cache memory, and it takes a lot of time for one estimation because a computer simulation is performed. It is necessary to create a simulator for each capacity and type of cache memory used. There was a problem such as there being.

【0005】この発明は上記のような問題点を解消する
ためになされたもので、キャッシュメモリのヒット率
を、多くの命令を実行するプログラムの場合でも全体の
評価が可能で、かつ短時間に推定でき、また実時間との
対応がとれ、キャッシュメモリの容量や種類を変えても
容易に算出できる方法とその装置を提供することを目的
とする。
The present invention has been made to solve the above-mentioned problems, and the hit rate of the cache memory can be evaluated as a whole even in the case of a program that executes a large number of instructions, and it can be evaluated in a short time. It is an object of the present invention to provide a method and a device that can be estimated and can correspond to real time and can be easily calculated even if the capacity and type of cache memory are changed.

【0006】[0006]

【課題を解決するための手段】この発明によるキャッシ
ュメモリヒット率推定方法は、計算機を待ち行列モデル
で表現し、このモデルを用いてプロセッサで実行される
プログラムの処理時間を、プロセッサの各命令の処理サ
イクル数と、メモリサイクル数と、プログラムの実行命
令数と、命令種別毎の実行数と、主記憶アクセスの競合
によって生じる待ち時間と、キャッシュメモリのヒット
率とをパラメータとして、2つのキャッシュメモリを使
用する場合と使用しない場合をそれぞれ組み合せた動作
モード毎に定式化した処理時間式と、2つのキャッシュ
メモリのうちヒット率を推定する側のキャッシュメモリ
を使用状態とし、他方のキャッシュメモリの機能を不使
用状態としてプログラムを実行することにより計測可能
な、処理時間と、プログラムの実行命令数と、命令種別
毎の実行数とから、当該キャッシュメモリのヒット率を
算出するようにした。さらに本発明によれば、命令キャ
ッシュメモリとデータキャッシュメモリの両方を使用状
態として、プログラムを時間Tだけ実行した場合のプロ
グラムの実行命令数Nと命令種別毎の実行数と、一方の
キャッシュメモリのみを使用状態として、同一プログラ
ムをN命令だけ実行した場合の処理時間と、当該処理時
間式とからキャッシュメモリのヒット率を推定すること
を、時間Tを徐々に長くして繰り返してキャッシュメモ
リのヒット率を算出するようにした。
A cache memory hit rate estimation method according to the present invention expresses a computer by a queue model, and uses this model to calculate the processing time of a program executed by a processor for each instruction of the processor. The number of processing cycles, the number of memory cycles, the number of program execution instructions, the number of executions for each instruction type, the waiting time caused by contention for main memory access, and the cache memory hit rate are two parameters. The processing time formula formulated for each operation mode combining the case of using and the case of not using, and the cache memory on the side that estimates the hit ratio of the two cache memories is set to the use state, and the function of the other cache memory Processing time that can be measured by executing the program as Program execution command number, and a number of execution of each instruction type, and to calculate a hit rate of the cache memory. Further, according to the present invention, when both the instruction cache memory and the data cache memory are used, the program execution instruction number N and the execution number for each instruction type when the program is executed for the time T, only one cache memory When the same program is executed for N instructions, the estimation of the hit rate of the cache memory from the processing time formula is repeated by gradually increasing the time T and hitting the cache memory. The rate was calculated.

【0007】この発明によるキャッシュメモリヒット率
推定装置は、計算機にプロセッサが実行した命令種別毎
の実行数を積算する、命令種別実行数積算手段を備え
た。さらに本発明によれば、プロセッサが実行した命令
数を積算し予め設定された数と一致したときに一致信号
を出力する命令数カウント手段と、プログラムの実行開
始時から予め設定された時間経過時に、プロセッサに停
止信号を出力する第1の動作モードと、プログラムの実
行開始時から計時を開始し、命令数カウント手段から一
致信号が出力されたときに計時を停止する第2の動作モ
ードを選択可能な計時手段を備えた。さらに本発明によ
ればキャッシュメモリに使用容量を可変なキャッシュメ
モリを用い、このキャッシュメモリの使用可能容量を制
御する容量制御手段を備えた。
The cache memory hit rate estimating apparatus according to the present invention comprises a command type execution number accumulating means for accumulating the execution number for each instruction type executed by the processor in the computer. Further, according to the present invention, the instruction number counting means for accumulating the number of instructions executed by the processor and outputting a coincidence signal when they coincide with a preset number, and when a preset time has elapsed from the start of execution of the program , A first operation mode in which a stop signal is output to the processor, and a second operation mode in which time counting is started from the start of program execution and time counting is stopped when a match signal is output from the instruction number counting means Equipped with possible timing means. Further, according to the present invention, a cache memory having a variable used capacity is used as the cache memory, and a capacity control means for controlling the usable capacity of the cache memory is provided.

【0008】[0008]

【作用】この発明において待ち行列モデルから導出され
た処理時間式は、プロセッサの各命令の処理サイクル数
と、メモリサイクル数と、プログラムの実行命令数と、
命令種別毎の実行数と、主記憶アクセスの競合によって
生じる待ち時間と、キャッシュメモリのヒット率とをパ
ラメータとした理論処理時間を示し、プログラムを実行
した時に計測した処理時間と実行命令数と、命令種別毎
の実行数は、処理時間式からキャッシュメモリのヒット
率を算出するためのデータに用いられる。
In the present invention, the processing time formula derived from the queue model is the number of processing cycles of each instruction of the processor, the number of memory cycles, the number of execution instructions of the program,
The theoretical processing time with the number of executions for each instruction type, the wait time caused by contention for main memory access, and the hit rate of the cache memory as parameters is shown, and the processing time and the number of executed instructions measured when the program is executed, The number of executions for each instruction type is used as data for calculating the hit rate of the cache memory from the processing time formula.

【0009】この発明における命令種別実行数積算手段
は、実行した命令の命令種別を類別し命令種別毎の実行
数を積算する。また、命令数カウント手段はプロセッサ
が実行した命令数を積算し予め設定された数と一致した
ときに一致信号を出力し、計時手段はプログラムの実行
開始時から予め設定された時間経過時に、プロセッサに
停止信号を出力しプロセッサを停止させるか、プログラ
ムの実行開始時から計時を開始し、命令数カウント手段
から一致信号が出力されたときに計時を停止する。また
使用容量を可変なキャッシュメモリは、プロセッサが種
々の容量により同一プログラムを実行したときの処理時
間を計測可能とし、容量制御手段はキャッシュメモリの
使用可能容量を制限する。
The instruction type execution number accumulating means in the present invention classifies the instruction types of the executed instructions and accumulates the number of executions for each instruction type. Further, the instruction number counting means integrates the number of instructions executed by the processor and outputs a coincidence signal when the number of instructions coincides with a preset number, and the timing means counts the processor when a preset time elapses from the start of execution of the program. A stop signal is output to stop the processor, or clocking is started from the start of program execution, and clocking is stopped when a match signal is output from the instruction number counting means. Also, the cache memory whose usable capacity is variable enables measurement of processing time when the processor executes the same program with various capacities, and the capacity control means limits the usable capacity of the cache memory.

【0010】[0010]

【実施例】【Example】

実施例1 図1は本発明を説明するために、従来の計算機を待ち行
列で表現したモデル図である。図において1は、メモリ
にアクセスする命令がロード命令とストア命令に限定さ
れた縮小命令セット型の中央処理装置、2、4は図7に
示すものと同一のもの、5aはメモリアクセス要求呼を
主記憶4に入力する第1のメモリバス、5bは主記憶4
がサービスを終了したメモリアクセス要求呼を出力する
第2のメモリバス、12はオペレータから計算機へのプ
ログラム実行要求を示す呼Caを発生する呼の発生部、
13は呼Caによるプログラムの処理の終了を示す呼の
消滅部、14は呼Caを処理するためにこれを出力し、
また読み出した命令の実行と、実行した命令がロード命
令またはストア命令であった場合に、データ読みだし呼
Cdまたはデータ書き込み呼Csを発生する命令実行
部、15は命令実行部14から出力された呼Caをチェ
ックし、処理が終了していた場合にはそのまま呼の消滅
部13に出力し、処理が終了していない場合には命令キ
ャッシュメモリ2aに命令読みだし呼Ciを出力する条
件呼発生部、16aは呼Ciを確率hiで中央処理装置
1に出力し確率1−hiで第1のメモリバス5aに出力
する命令キャッシュメモリ2a内の第1の確率分岐部、
16bは呼Cdおよび呼Csを確率hdで中央処理装置
1に出力し確率1−hdで第1のメモリバスに出力する
データキャッシュメモリ2b内の第2の確率分岐部、1
7は主記憶4からの応答をチェックしその属性である呼
の名称により行き先を決める条件分岐部、18a〜18
dはそれぞれ呼の第1〜第4の合量部である。次に動作
について説明する。オペレータから計算機へのプログラ
ム実行指令を表す呼Caが呼の発生部12で発生する
と、呼Caは第4の合流部18dを介して命令実行部1
4に入力される。呼Caを受け取った命令実行部14は
これを処理するために呼Caを条件呼発生部15に出力
する。条件呼発生部では呼Caの処理が終了しているか
どうかがチェックされ、処理が終了している場合には呼
の消滅部13に出力されて消滅する。また処理が終了し
ていなかった場合は呼Ciを第1の確率分岐部16aに
出力する。第1の確率分岐部16aは呼Ciを確率hi
で第1の合流部18a、第4の合流部18dを介して命
令実行部14に出力、すなわち命令キャッシュメモリ2
aから命令を読みだし、確率1−hiで合流部18cと
第1のメモリバス5aを介して主記憶4に出力し、主記
憶4から命令を読みだし第2のメモリバス5b、条件分
岐部17、第1の合流部18a、第4の合流部18dを
介して命令実行部13に出力する。このとき条件分岐部
17では主記憶4でサービスを受け第2のメモリバス5
bに出力された呼の属性、すなわち名称をチェックし命
令キャッシュメモリ2a、またはデータキャッシュメモ
リ2bに出力する。命令実行部14は供給された命令を
解読実行した後、再び呼Caを条件呼発生部15に送り
出し以下同様の動作を行う。また、この間命令実行部1
4に供給された命令がロード命令またはストア命令であ
った場合、データ読みだし呼Cdまたはデータ書き込み
呼Csを発生し第2の確率分岐部16bに出力する。呼
Cdと呼Csは呼Ciの場合と同様に同確率hdでデー
タキャッシュメモリ2bとデータの出し入れを行い、確
率1−hdで主記憶4とデータの出し入れを行い、最終
的に命令実行部14に入力され消滅する。またキャッシ
ュメモリの機能を使用しない場合は第1の確率分岐部1
6a、第2の確率分岐部16bの当該分岐確率が0であ
ると考え、確率1で主記憶4に分岐する。以上のように
して呼Caは処理される。次に処理時間について説明す
る。いま呼Caの到着密度がポアソン分布に従うとする
と、これにともなって確率的に発生した呼や確率分岐で
分岐した呼、合流点で合流した呼などの分布もポアソン
分布となる。メモリバスのサービス速度が指数分布に従
うとすると、このモデルはケンドールの記号表記におけ
るM/M/1モデルとなるので、メモリバス負荷ρ、メ
モリアクセス要求呼のサービス平均待ちサイクル数Lq
はそれぞれ式(1)、(2)で求められる。式中Sはメ
モリバスの平均サービスサイクル数、λはメモリアクセ
ス要求呼の到着密度である。
Embodiment 1 FIG. 1 is a model diagram in which a conventional computer is represented by a queue in order to explain the present invention. In the figure, 1 is a reduced instruction set type central processing unit in which memory access instructions are limited to load instructions and store instructions, 2 and 4 are the same as those shown in FIG. 7, and 5a is a memory access request call. The first memory bus 5b input to the main memory 4 is the main memory 4
Is a second memory bus for outputting a memory access request call whose service has been terminated, 12 is a call generation unit for generating a call Ca indicating a program execution request from the operator to the computer,
Reference numeral 13 is a call disappearing portion indicating the end of processing of the program by the call Ca, and 14 is output to process the call Ca,
Further, when the read instruction is executed and the executed instruction is a load instruction or a store instruction, an instruction execution unit for generating a data read call Cd or a data write call Cs, and 15 is output from the instruction execution unit 14. Conditional call generation in which the call Ca is checked, and if the processing is completed, it is output to the call disappearing unit 13 as it is, and if the processing is not completed, an instruction read call Ci is output to the instruction cache memory 2a. Part 16a outputs a call Ci to the central processing unit 1 with probability hi and outputs to the first memory bus 5a with probability 1-hi, the first probability branching unit in the instruction cache memory 2a,
16b is a second probability branching unit in the data cache memory 2b which outputs the call Cd and the call Cs to the central processing unit 1 with a probability hd and outputs them to the first memory bus with a probability 1-hd;
Reference numeral 7 is a conditional branching unit for checking a response from the main memory 4 and determining a destination based on its attribute call name.
d is the 1st-4th summing part of a call, respectively. Next, the operation will be described. When a call Ca representing a program execution command from the operator to the computer is generated in the call generation unit 12, the call Ca is executed via the fourth merging unit 18d.
4 is input. The command execution unit 14 that has received the call Ca outputs the call Ca to the conditional call generation unit 15 in order to process the call Ca. The conditional call generation unit checks whether or not the processing of the call Ca is completed. If the processing is completed, it is output to the call disappearance unit 13 and disappeared. If the processing is not completed, the call Ci is output to the first probability branching unit 16a. The first probability branching unit 16a determines the call Ci as the probability hi.
Output to the instruction execution unit 14 via the first merging unit 18a and the fourth merging unit 18d, that is, the instruction cache memory 2
The instruction is read from a and output to the main memory 4 via the confluence unit 18c and the first memory bus 5a with a probability 1-hi, the instruction is read from the main memory 4, the second memory bus 5b, and the conditional branch unit. It outputs to the command execution part 13 via 17, the 1st merging part 18a, and the 4th merging part 18d. At this time, the conditional branching unit 17 receives the service in the main memory 4 and the second memory bus 5
The attribute of the call output to b, that is, the name, is checked and output to the instruction cache memory 2a or the data cache memory 2b. After the instruction execution unit 14 decodes and executes the supplied instruction, it sends the call Ca again to the conditional call generation unit 15 and performs the same operation thereafter. During this time, the instruction execution unit 1
When the instruction supplied to 4 is a load instruction or a store instruction, a data read call Cd or a data write call Cs is generated and output to the second stochastic branching unit 16b. As in the case of the call Ci, the call Cd and the call Cs move data into and out of the data cache memory 2b with the same probability hd, and move data into and out of the main memory 4 with a probability 1-hd, and finally the instruction execution unit 14 It is input to and disappears. If the cache memory function is not used, the first probability branching unit 1
6a, the second probability branching unit 16b considers that the branching probability is 0, and branches to the main memory 4 with probability 1. The call Ca is processed as described above. Next, the processing time will be described. Assuming that the arrival density of the call Ca follows the Poisson distribution, the distribution of calls that are stochastically generated, calls that branch at stochastic branching, calls that join at the confluence point, etc. also have Poisson distribution. If the service speed of the memory bus follows an exponential distribution, this model is the M / M / 1 model in Kendall's symbolic notation. Therefore, the memory bus load ρ, the average number of service waiting cycles Lq for memory access request calls, Lq.
Are calculated by equations (1) and (2), respectively. In the formula, S is the average number of service cycles of the memory bus, and λ is the arrival density of memory access request calls.

【0011】[0011]

【数1】 [Equation 1]

【0012】ここではまず、キャッシュメモリを使用す
る場合について説明する。到着密度λ、平均サービスサ
イクル数Sは、メモリアクセス呼のサービスを公平とし
ているので式(3)、(4)で求められる。式中λiは
命令読みだし呼Ciの発生頻度、λdはデータ読み出し
呼Cdの発生頻度、λsはデータ書き込み呼Csの発生
頻度、Smiは命令読みだし呼Ciのキャッシュヒット
ミス時のメモリバスサイクル数、Smdはデータ読み出
し呼Cdのキャッシュヒットミス時のメモリバスサイク
ル数、Smsはデータ書き込み呼Csのキャッシュヒッ
トミス時のメモリバスサイクル数である。
First, the case where a cache memory is used will be described. The arrival density λ and the average service cycle number S are obtained by the equations (3) and (4) because the service of the memory access call is fair. Where λi is the frequency of instruction read calls Ci, λd is the frequency of data read calls Cd, λs is the frequency of data write calls Cs, and Smi is the number of memory bus cycles at the time of a cache hit miss of the instruction read call Ci. , Smd is the number of memory bus cycles at the cache hit miss of the data read call Cd, and Sms is the number of memory bus cycles at the cache hit miss of the data write call Cs.

【0013】[0013]

【数2】 [Equation 2]

【0014】ここであるプログラムをこの計算機で実行
した場合の命令実行数をN、その内のロード命令の比率
をPd、ストア命令の比率をPs、その他の命令の比率
をPoとし、命令実行部14での命令実行確率が、この
命令の比率と同一とすると、呼Caの発生から消滅まで
の処理サイクル数Tは式(5)のように表せる。式中T
iは命令読みだし呼Ciの平均処理サイクル数、Tdは
データ読み出し呼Cdの平均処理サイクル数、Tsはデ
ータ書き込み呼Csの平均処理サイクル数、Toはその
他の命令の平均処理サイクル数である。また、命令キャ
ッシュメモリ2a、データキャッシュメモリ2bのヒッ
ト率はそれぞれ、第1の条件分岐部15a、第2の条件
分岐部15bの分岐確率と同一であるとする。
An instruction execution unit is assumed, where N is the number of executed instructions when this program is executed on this computer, Pd is the ratio of load instructions, Ps is the ratio of store instructions, and Po is the ratio of other instructions. If the instruction execution probability at 14 is the same as the ratio of this instruction, the number T of processing cycles from the generation of the call Ca to the disappearance thereof can be expressed by the equation (5). T in the formula
i is the average number of processing cycles of the instruction read call Ci, Td is the average number of processing cycles of the data read call Cd, Ts is the average number of processing cycles of the data write call Cs, and To is the average number of processing cycles of other instructions. It is also assumed that the hit rates of the instruction cache memory 2a and the data cache memory 2b are the same as the branch probabilities of the first conditional branching unit 15a and the second conditional branching unit 15b, respectively.

【0015】[0015]

【数3】 [Equation 3]

【0016】またTi、Td、Tsはキャッシュメモリ
にヒットした場合の処理サイクル数を例えば同一のSh
とすれば、それぞれ式(6)〜式(8)で表される。式
中Siは命令読みだし呼Ciのキャッシュヒットミス時
の処理サイクル数、Sdはデータ読み出し呼Cdのキャ
ッシュヒットミス時の処理サイクル数、Ssはデータ書
き込み呼Csのキャッシュヒットミス時の処理サイクル
数である。
Ti, Td, and Ts are the same number of processing cycles when the cache memory is hit, for example, the same Sh.
Then, they are respectively represented by formulas (6) to (8). In the formula, Si is the number of processing cycles when the instruction read call Ci is cache hit miss, Sd is the number of processing cycles when the data read call Cd is cache hit miss, and Ss is the number of processing cycles when the data write call Cs is cache hit miss. Is.

【0017】[0017]

【数4】 [Equation 4]

【0018】またこれからλi、λd、λsは式(9)
〜式(11)で表すことができる。
Further, from this, λi, λd, and λs are given by equation (9).
~ Can be represented by formula (11).

【0019】[0019]

【数5】 [Equation 5]

【0020】次にキャッシュメモリの機能を使用しない
場合について説明する。キャッシュメモリを使用しない
場合は、当該キャッシュメモリのヒット率が0であると
考えれば良く、式(3)〜式(8)に示した式のキャッ
シュメモリに関する各パラメータを表1に示すように、
キャッシュメモリを使用しない場合のパラメータに置き
換えることで表される。
Next, a case where the cache memory function is not used will be described. When the cache memory is not used, it can be considered that the hit rate of the cache memory is 0, and as shown in Table 1, each parameter related to the cache memory of the equations (3) to (8) is
It is expressed by substituting the parameters when the cache memory is not used.

【0021】[0021]

【表1】 [Table 1]

【0022】ここでキャッシュメモリを使用する場合と
使用しない場合の組み合せによって、表2に示すように
動作モードを定義する。
Here, the operation mode is defined as shown in Table 2 by the combination of the case where the cache memory is used and the case where the cache memory is not used.

【0023】[0023]

【表2】 [Table 2]

【0024】動作モード1〜4の処理サイクル数T1、
T2、T3、T4を式(12)〜式(15)に示す。式
中Lq1、Lq2、Lq3、Lq4はそれぞれの動作モ
ードにおける、メモリアクセス要求呼のサービス平均待
ちサイクル数である。
The number of processing cycles T1 in the operation modes 1 to 4,
Expressions (12) to (15) represent T2, T3, and T4. In the formula, Lq1, Lq2, Lq3, and Lq4 are the average service waiting cycle number of the memory access request call in each operation mode.

【0025】[0025]

【数6】 [Equation 6]

【0026】また、これは式(1)〜式(4)により式
(16)〜式(19)のように表される。
Further, this is expressed by equations (1) to (4) as equations (16) to (19).

【0027】[0027]

【数7】 [Equation 7]

【0028】以上に示したようにプログラムの処理サイ
クル数は、キャッシュメモリの動作モードに対してそれ
ぞれ数式化可能である。次に、キャッシュメモリのヒッ
ト率の推定方法について説明する。式(12)〜式(1
9)において、Smi、Smd、Sms、Si、Sd、
Ss、Sm、Sii、Sid、Sisは、装置によって
決る固有の値である。またどのようなプログラムであっ
ても、動作モードによらず実行される命令の順序、数は
同一であるので動作モードによらずN、Pd、Ps、P
o、Toは同一である。実際にプログラムを実行するこ
とで、命令種別毎の実行数を求めることが可能であり、
その総和をN、ロード命令の比率をPd、ストア命令の
比率をPs、その他の命令比率をPo、またその他の命
令個々の命令数と、プロセッサによって決っている個々
の命令の処理サイクル数からToが求められ、また処理
サイクル数も処理時間を計測して換算することで算出可
能である。従って、データキャッシュメモリ2bのヒッ
ト率hdを求めるには、式(17)を式(13)に代入
し、更に動作モード2によりプログラムを実行して求め
たN、Pd、Ps、Po、To、T2を代入すれば、式
(13)はhdについての方程式となるので、これを解
くことによりデータキャッシュメモリ2bのヒット率h
dを算出できる。また命令キャッシュメモリ2aのヒッ
ト率hiを求めるには、式(18)を式(14)に代入
し、更に動作モード3によりプログラムを実行して求め
たN、Pd、Ps、Po、To、T3を代入すれば、式
(13)はhiについての方程式となるので、これを解
くことにより命令キャッシュメモリ2aのヒット率hi
を算出できる。この発明による方法は以上のようになっ
ているので、容易に観測可能な実測値を用いて、算術計
算により任意のプログラムを実行した場合のキャッシュ
メモリのヒット率を推定できる。
As described above, the number of processing cycles of the program can be mathematically expressed for each operation mode of the cache memory. Next, a method of estimating the hit rate of the cache memory will be described. Expression (12) to Expression (1
9), Smi, Smd, Sms, Si, Sd,
Ss, Sm, Sii, Sid, and Sis are unique values determined by the device. In addition, regardless of the operation mode, the order and the number of executed instructions are the same regardless of the operation mode, so N, Pd, Ps, P
o and To are the same. By actually executing the program, it is possible to obtain the number of executions for each instruction type,
The total is N, the ratio of load instructions is Pd, the ratio of store instructions is Ps, the ratio of other instructions is Po, and the number of other individual instructions and the number of processing cycles of individual instructions determined by the processor are To. And the number of processing cycles can also be calculated by measuring the processing time and converting. Therefore, in order to obtain the hit ratio hd of the data cache memory 2b, N, Pd, Ps, Po, To, obtained by substituting the equation (17) into the equation (13) and executing the program in the operation mode 2, By substituting T2, the equation (13) becomes an equation for hd. Therefore, by solving this equation, the hit rate h of the data cache memory 2b is h.
d can be calculated. Further, in order to obtain the hit rate hi of the instruction cache memory 2a, N, Pd, Ps, Po, To, T3 obtained by substituting the equation (18) into the equation (14) and executing the program in the operation mode 3 are obtained. (13) becomes an equation for hi by substituting for, the equation (13) is solved to solve the hit rate hi of the instruction cache memory 2a.
Can be calculated. Since the method according to the present invention is as described above, it is possible to estimate the hit rate of the cache memory when an arbitrary program is executed by arithmetic calculation by using an easily observable measured value.

【0029】実施例2 表1に示す動作モード4によりプログラムを微小時間T
4だけ実行した場合の命令実行数をN、ロード命令の比
率をPd、ストア命令の比率をPs、その他の命令比率
をPo、その他の命令の平均処理サイクル数をToとす
る。また、動作モード3により同一プログラムをN命令
実行し、その処理時間をサイクル数に換算してT3とし
て、式(14)と式(18)から命令キャッシュメモリ
2aのヒット率hiを算出する。ここで式(19)を式
(15)に代入しさらに算出したhiおよびT4を処理
サイクル数に換算した値と、N、Pd、Ps、Po、T
oを代入して、データキャッシュメモリ2bのヒット率
hdを算出する。以上のような操作を時間T4を微小時
間ずつ長くして繰り返すことにより、実時間スケール上
で命令キャッシュメモリ2aのヒット率hiとデータキ
ャッシュメモリ2bのヒット率hdの推移を求めること
ができる。また動作モード3のかわりに動作モード2で
実行して先にhdを算出してからhiを算出するように
してもよい。この発明は以上のようになっているので、
容易に観測可能な実測値を用いて、算術計算により任意
のプログラムを実行した場合の、キャッシュメモリのヒ
ット率の実時間スケール上での推移を容易に推定でき
る。
Embodiment 2 The program is executed for a minute time T in the operation mode 4 shown in Table 1.
Let N be the number of executed instructions when only 4 is executed, Pd be the ratio of load instructions, Ps be the ratio of store instructions, Po be the ratio of other instructions, and To be the average number of processing cycles of other instructions. Further, the same program is executed for N instructions in the operation mode 3, the processing time is converted into the number of cycles and is set as T3, and the hit rate hi of the instruction cache memory 2a is calculated from the equations (14) and (18). Here, hi and T4 calculated by substituting the equation (19) into the equation (15) are converted into the number of processing cycles, and N, Pd, Ps, Po, and T.
By substituting o, the hit rate hd of the data cache memory 2b is calculated. By repeating the above-described operation by lengthening the time T4 by a small amount, it is possible to obtain the transitions of the hit rate hi of the instruction cache memory 2a and the hit rate hd of the data cache memory 2b on the real time scale. Further, instead of the operation mode 3, the operation mode 2 may be executed to calculate hd first and then calculate hi. Since the present invention is as described above,
It is possible to easily estimate the transition of the hit rate of the cache memory on the real-time scale when an arbitrary program is executed by arithmetic calculation by using an easily observable measured value.

【0030】実施例3 図2はこの発明の実施例3を説明するための図である。
図において1は、メモリにアクセスする命令がロード命
令とストア命令に限定された縮小命令セット型の中央処
理装置、2〜8は従来のものと同一のものであり、19
はプロセッサが実行した命令種別毎の実行数を積算する
命令種別実行数積算手段である。図3はこの装置に組み
込んだ制御プログラムの処理フローを説明するための図
である。次に動作について図3に沿って説明する。オペ
レータは従来と全く同様にして、所望のプログラムの実
行を指令する。指令を受けたプロセッサ3は、制御プロ
グラムを起動し、命令キャッシュメモリ2aのヒット率
を推定するために、プロセッサの動作モードを表2の3
としてプログラム実行させ、命令種別実行数積算手段1
8にプログラムの実行開始から終了までの間にプロセッ
サが実行した命令を順次類別させ、その命令種別毎に実
行数を積算させる。またタイマーにプログラムの処理時
間を計測させる。プログラムの実行が終了すると命令種
別実行数積算手段18で積算した、命令種別毎の実行数
とタイマー8で計測したプログラムの処理時間を読みだ
し、これからN、Pd、Ps、Po、To、T3を算出
する。次にデータキャッシュメモリ2bのヒット率を推
定するために、プロセッサの動作モードを表2の2とし
てプログラム実行させ、タイマーにプログラムの処理時
間を計測させてT2を算出する。そしてこれらのパラメ
ータを式(13)と式(17)および式(14)と式
(18)から導かれる方程式を解くプログラムに代入し
て、それぞれのヒット率hi、hdを算出し、操作端末
6に結果を出力しオペレータに知らせる。この発明によ
る装置は以上のようになっているので、多くの命令を実
行するプログラムの場合でも、命令キャッシュメモリと
データキャッシュメモリのヒット率を、短時間で求める
ことが出来る。
Third Embodiment FIG. 2 is a diagram for explaining a third embodiment of the present invention.
In FIG. 1, reference numeral 1 is a reduced instruction set type central processing unit in which memory access instructions are limited to load instructions and store instructions, and 2 to 8 are the same as conventional ones.
Is an instruction type execution number accumulation means for accumulating the number of executions of each instruction type executed by the processor. FIG. 3 is a diagram for explaining the processing flow of the control program incorporated in this apparatus. Next, the operation will be described with reference to FIG. The operator commands execution of a desired program in the same manner as in the conventional case. The processor 3 which has received the command activates the control program and sets the operation mode of the processor to 3 in Table 2 in order to estimate the hit rate of the instruction cache memory 2a.
Program execution, and instruction type execution count accumulating means 1
8 sequentially classifies the instructions executed by the processor from the start to the end of execution of the program, and accumulates the number of executions for each instruction type. Also, let the timer measure the processing time of the program. When the execution of the program is completed, the number of executions for each instruction type accumulated by the instruction type execution number accumulating unit 18 and the processing time of the program measured by the timer 8 are read out, and N, Pd, Ps, Po, To, T3 are read from this. calculate. Next, in order to estimate the hit rate of the data cache memory 2b, the program is executed with the operation mode of the processor set to 2 in Table 2, and the timer measures the processing time of the program to calculate T2. Then, these parameters are substituted into a program that solves the equations derived from the equations (13) and (17) and the equations (14) and (18) to calculate the hit rates hi and hd, and the operating terminal 6 The result is output to and the operator is notified. Since the device according to the present invention is configured as described above, even in the case of a program that executes many instructions, the hit ratio of the instruction cache memory and the data cache memory can be obtained in a short time.

【0031】実施例4 図4はこの発明の実施例4を説明するための図である。
図において1〜8、19は図2のものと同一のものであ
り、20はプロセッサが実行した命令数を積算し予め設
定した数と一致したときに一致信号を出力する命令数カ
ウント手段、21はプログラムの実行開始時から予め設
定された時間経過時に、プロセッサに停止信号を出力す
る第1の動作モードと、プログラムの実行開始時から計
時を開始し、命令数カウント手段から一致信号が出力さ
れたときに計時を停止する第2の動作モードを選択可能
な計時手段である。図5はこの装置に組み込んだ制御プ
ログラムの処理フローを説明するための図である。次に
動作について図5に沿って説明する。オペレータは従来
と全く同様にして、所望のプログラムの実行を指令す
る。指令を受けたプロセッサ3は制御プログラムを起動
し、まず図3に示した方法と同一の方法により、全体の
ヒット率hi、hdを算出する。次にプロセッサ3の動
作モードを表2の4として、プログラムを実行させタイ
マー8により処理時間Taを計測する。次にプロセッサ
3の動作モードを表2の4とし、計時手段20を第1の
動作モードとしてオペレータによって指定された計測時
間間隔tを設定し、プログラムを実行させ、命令種別実
行数積算手段18にプログラムの実行開始から、計時手
段20がプロセッサ3に停止信号を出力し、プログラム
の実行を停止させるまでの間にプロセッサ3が実行した
命令を順次類別させ、その命令種別毎に実行数を積算さ
せる。そしてプログラムの実行が停止した時点の命令種
別毎の実行数を命令種別実行数積算手段18から読みだ
し、これからN、Pd、Ps、Po、Toを算出する。
次にプロセッサの動作モードを表2の3とし、命令数カ
ウント手段19に命令数Nを設定し、計時手段20を第
2の動作モードとして、同一プログラムを実行させる。
命令数カウント手段19はプロセッサ3の命令実行数を
積算し、設定された数Nと一致すると一致信号を出力す
る。計時手段20はこの一致信号を検出して計時を停止
する。制御プログラムはプログラムの実行終了後、計時
手段20から時間を読みだしてT3を算出する。そして
これらのパラメータをまず式(14)と式(18)から
導かれる方程式を解くプログラムに代入して、ヒット率
hiを算出する。次にこれらの結果を式(15)と式
(19)から導かれる方程式を解くプログラムに代入し
てヒット率hdを算出し、結果を操作端末6に送り出し
オペレータに知らせる。以上の操作を時間tをt時間ず
つ長くしてTaを越えない範囲で繰り返す。この装置は
以上のように動作するので、任意のプログラムを実行し
た場合の、命令キャッシュメモリとデータキャッシュメ
モリのヒット率の推移を同一実時間スケール上で示すこ
とが出来る。
Fourth Embodiment FIG. 4 is a diagram for explaining a fourth embodiment of the present invention.
In the figure, 1 to 8 and 19 are the same as those in FIG. 2, and 20 is an instruction number counting means for accumulating the number of instructions executed by the processor and outputting a coincidence signal when they coincide with a preset number, 21 Is a first operation mode in which a stop signal is output to the processor when a preset time has elapsed from the start of program execution, and clocking is started from the start of program execution, and a match signal is output from the instruction number counting means. It is a time measuring means capable of selecting the second operation mode for stopping the time measurement when the time is up. FIG. 5 is a diagram for explaining the processing flow of the control program incorporated in this apparatus. Next, the operation will be described with reference to FIG. The operator commands execution of a desired program in the same manner as in the conventional case. The processor 3, which has received the command, starts the control program, and first calculates the overall hit rates hi and hd by the same method as that shown in FIG. Next, the operation mode of the processor 3 is set to 4 in Table 2, the program is executed, and the processing time Ta is measured by the timer 8. Next, the operation mode of the processor 3 is set to 4 in Table 2, the time measuring means 20 is set to the first operation mode, the measurement time interval t designated by the operator is set, the program is executed, and the instruction type execution number accumulating means 18 is set. From the start of the execution of the program until the time counting means 20 outputs the stop signal to the processor 3 and stops the execution of the program, the instructions executed by the processor 3 are sequentially classified, and the number of executions is integrated for each instruction type. . Then, the execution number for each instruction type at the time when the execution of the program is stopped is read from the instruction type execution number accumulating means 18, and N, Pd, Ps, Po, and To are calculated from this.
Next, the operating mode of the processor is set to 3 in Table 2, the number of instructions N is set in the instruction number counting means 19, and the time counting means 20 is set to the second operating mode to execute the same program.
The instruction number counting means 19 integrates the instruction execution number of the processor 3 and outputs a coincidence signal when the instruction number coincides with the set number N. The timing means 20 detects this coincidence signal and stops the timing. After the execution of the program is completed, the control program reads the time from the clock means 20 and calculates T3. Then, these parameters are first substituted into a program that solves the equations derived from the equations (14) and (18) to calculate the hit rate hi. Next, these results are substituted into a program that solves the equations derived from equations (15) and (19) to calculate the hit rate hd, and the results are sent to the operation terminal 6 to notify the operator. The above operation is repeated within a range in which the time t is increased by t hours and Ta is not exceeded. Since this device operates as described above, it is possible to show the transition of the hit rate of the instruction cache memory and the data cache memory when an arbitrary program is executed on the same real time scale.

【0032】実施例5 図6はこの発明の実施例5を説明するための図である。
図において1、3〜8、19は図2のものと同一のもの
であり、2aは使用容量をX通りに変えることが可能な
命令キャッシュメモリ、2bは使用容量をY通りに変え
ることが可能なデータキャッシュメモリ、22はキャッ
シュメモリ2の使用可能容量を制御する容量制御手段で
ある。次に動作について説明する。オペレータは従来と
全く同様にして、所望のプログラムの実行を指令する。
指令を受けたプロセッサ3はまず、容量制御手段22に
命令キャッシュメモリ2aの使用可能容量としてxを設
定し、この場合のヒット率hiを実施例2に記載のキャ
ッシュメモリヒット率推定方法によって推定する。この
操作を容量制御手段22の設定値をX通りに変更して繰
り返す。次に、容量制御手段22にデータキャッシュメ
モリ2bの使用可能容量の設定値をY通り設定し、それ
ぞれの場合のヒット率hdを実施例2に記載のキャッシ
ュメモリヒット率推定方法によって推定する。そして最
後にこれらの推定結果を操作端末6に送り出しオペレー
タに知らせる。この装置は以上のように動作するので、
任意のプログラムを実行した場合に、命令キャッシュメ
モリとデータキャッシュメモリの容量によって、ヒット
率がどのように変わるかを同一の装置により容易に推定
することが出来る。
Embodiment 5 FIG. 6 is a diagram for explaining Embodiment 5 of the present invention.
In the figure, reference numerals 1, 3 to 8 and 19 are the same as those in FIG. 2, 2a is an instruction cache memory capable of changing the used capacity in X ways, and 2b is capable of changing the used capacity in Y ways. The data cache memory 22 is a capacity control means for controlling the usable capacity of the cache memory 2. Next, the operation will be described. The operator commands execution of a desired program in the same manner as in the conventional case.
The processor 3 that received the command first sets x as the usable capacity of the instruction cache memory 2a in the capacity control means 22, and estimates the hit rate hi in this case by the cache memory hit rate estimation method described in the second embodiment. . This operation is repeated by changing the set value of the capacity control means 22 in X ways. Next, the set value of the usable capacity of the data cache memory 2b is set to Y in the capacity control means 22, and the hit rate hd in each case is estimated by the cache memory hit rate estimation method described in the second embodiment. Finally, these estimation results are sent to the operation terminal 6 to notify the operator. Since this device operates as described above,
It is possible to easily estimate how the hit rate changes depending on the capacity of the instruction cache memory and the data cache memory when an arbitrary program is executed, by the same device.

【0033】実施例6 上記実施例では中央処理装置をメモリにアクセスする命
令が、ロード命令とストア命令に限定された中央処理装
置とした場合について説明したが、一般にメモリデータ
を使用する演算命令を有する中央処理装置においても、
例えば読み出したデータを用いて演算を行う命令の場
合、その処理サイクル数Tcはロード命令とその他の命
令の組み合せとして、式(20)のように表せるので容
易に適用できる。式中Cは中央処理装置での演算サイク
ル数を示す。
Sixth Embodiment In the above embodiment, the case where the central processing unit has a central processing unit whose memory access instructions are limited to load instructions and store instructions has been described. Even in the central processing unit that has
For example, in the case of an instruction that performs an operation using the read data, the processing cycle number Tc can be easily applied because it can be expressed as a combination of the load instruction and other instructions as in Expression (20). In the formula, C indicates the number of calculation cycles in the central processing unit.

【0034】[0034]

【数8】 [Equation 8]

【0035】実施例7 上記実施例ではキャッシュメモリにヒットした場合の処
理サイクル数や、キャッシュメモリの機能を使用しない
場合のメモリバスサイクル数を読みだし、書き込みを区
別せずそれぞれ同一数としたが、それぞれ異なっていて
もよい。また、キャッシュメモリのデータ置き換え規則
にはいくつかの種類があるが、これはパラメータの値を
変えるだけで容易に対応できる。
Embodiment 7 In the above-mentioned embodiment, the number of processing cycles when the cache memory is hit and the number of memory bus cycles when the function of the cache memory is not used are read out, and the same number is used regardless of writing. , Each may be different. In addition, there are several types of cache memory data replacement rules, which can be easily dealt with by simply changing the parameter values.

【0036】実施例8 上記実施例では単一プロセッサの場合を示したが、メモ
リバスに複数のプロセッサを接続したマルチプロセッサ
に拡張した場合について説明する。上記マルチプロセッ
サを待ち行列モデルで表現し、各プロセッサに同一のプ
ログラムを実行させた場合の処理サイクル数を、プロセ
ッサの各命令の処理サイクル数と、メモリサイクル数
と、プログラムの実行命令数と、命令種別毎の実行数
と、主記憶アクセスの競合によって生じる待ち時間と、
キャッシュメモリのヒット率とをパラメータとして、キ
ャッシュメモリの機能をそれぞれ使用する場合と使用し
ない場合を組み合せた動作モード毎に定式化した場合、
各キャッシュメモリのメモリへのアクセスが公平に扱わ
れるとすると、各パラメータはプロセッサに関係なく同
一となるので、キャッシュメモリの動作モード毎の処理
サイクル数はプロセッサに関係なく同一となり、それぞ
れ式(12)〜式(15)と同一の式で表される。この
場合のバス負荷ρ、メモリアクセス時の平均サービス待
ち時間Lqはそれぞれ式(1)、式(2)と同一とな
る。一方メモリアクセス要求発生密度λと平均サービス
サイクル数Sはプロセッサ数をZとすると式(21)、
(22)で表せる。
Embodiment 8 In the above embodiment, the case of a single processor is shown, but a case of expansion to a multiprocessor in which a plurality of processors are connected to the memory bus will be explained. The multiprocessor is represented by a queuing model, the number of processing cycles when each processor executes the same program, the number of processing cycles of each instruction of the processor, the number of memory cycles, the number of execution instructions of the program, The number of executions for each instruction type and the waiting time caused by contention for main memory access,
When the cache memory hit rate is used as a parameter and formulated for each operation mode that combines the use and non-use of the cache memory function,
If access to the memory of each cache memory is treated fairly, each parameter is the same regardless of the processor. Therefore, the number of processing cycles for each operation mode of the cache memory is the same regardless of the processor, and each of the equations (12) ) -Equation (15). In this case, the bus load ρ and the average service waiting time Lq at the time of memory access are the same as in the equations (1) and (2), respectively. On the other hand, the memory access request generation density λ and the average service cycle number S are expressed by equation (21), where Z is the number of processors,
It can be expressed by (22).

【0037】[0037]

【数9】 [Equation 9]

【0038】これから、プロセッサの動作モード毎のメ
モリアクセス時の平均サービス待ち時間Lq1、Lq
2、Lq3、Lq4は、それぞれ式(23)〜式(2
6)で表せる。これから、単一プロセッサの場合と同様
の方法によりキャッシュメモリのヒット率を推定するこ
とが出来る。
From now on, the average service wait times Lq1 and Lq at the time of memory access for each operation mode of the processor
2, Lq3, and Lq4 are expressed by Equations (23) to (2), respectively.
It can be represented by 6). From this, the hit rate of the cache memory can be estimated by the same method as in the case of the single processor.

【0039】[0039]

【数10】 [Equation 10]

【0040】[0040]

【発明の効果】以上のように請求項1の発明によれば、
容易に観測可能な実測値を用いて、多くの命令を実行す
るプログラムの場合でも、全実行プロセスにわたるキャ
ッシュメモリのヒット率を、算術計算により容易に算出
できるキャッシュメモリヒット率推定方法が得られる。
As described above, according to the invention of claim 1,
Even in the case of a program that executes a large number of instructions using an easily observable measured value, a cache memory hit rate estimation method that can easily calculate the hit rate of the cache memory over all execution processes by arithmetic calculation can be obtained.

【0041】また、請求項2の発明によれば、容易に観
測可能な実測値を用いて、命令キャッシュメモリとデー
タキャッシュメモリのヒット率の、同一実時間スケール
上での推移を、算術計算により容易に算出できるキャッ
シュメモリヒット率推定方法が得られる。
According to the second aspect of the present invention, the transitions of the hit ratios of the instruction cache memory and the data cache memory on the same real time scale are calculated by using an easily observable measured value. A cache memory hit rate estimation method that can be easily calculated is obtained.

【0042】また、請求項3の発明によれば、多くの命
令を実行するプログラムの場合でも、全実行プロセスに
わたるキャッシュメモリのヒット率を、短時間で推定す
ることが可能なキャッシュメモリヒット率推定装置を得
られる。
Further, according to the invention of claim 3, even in the case of a program which executes many instructions, the cache memory hit rate estimation capable of estimating the hit rate of the cache memory over all the execution processes in a short time. You can get the device.

【0043】また、請求項4の発明によれば、命令キャ
ッシュメモリとデータキャッシュメモリのヒット率の、
同一実時間スケール上での推移を示すことが可能なキャ
ッシュメモリヒット率推定装置を得られる。
According to the invention of claim 4, the hit ratios of the instruction cache memory and the data cache memory are
It is possible to obtain a cache memory hit rate estimation device capable of showing a transition on the same real time scale.

【0044】また、請求項5の発明によれば、キャッシ
ュメモリの容量によりキャッシュメモリのヒット率が、
どのように変わるかを同一の構成により推定することが
可能なキャッシュメモリヒット率推定装置を得られる。
According to the invention of claim 5, the hit rate of the cache memory is determined by the capacity of the cache memory.
It is possible to obtain a cache memory hit rate estimation device capable of estimating how it changes with the same configuration.

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

【図1】この発明を説明するために、従来の計算機を待
ち行列で表現したモデル図である。
FIG. 1 is a model diagram in which a conventional computer is represented by a queue in order to explain the present invention.

【図2】この発明の一実施例によるキャッシュメモリヒ
ット率推定装置を示す図である。
FIG. 2 is a diagram showing a cache memory hit rate estimation device according to an embodiment of the present invention.

【図3】この発明の一実施例によるキャッシュメモリヒ
ット率推定装置に組み込んだ制御プログラムの処理フロ
ーを示す図である。
FIG. 3 is a diagram showing a processing flow of a control program incorporated in a cache memory hit rate estimation device according to an embodiment of the present invention.

【図4】この発明の他の実施例によるキャッシュメモリ
ヒット率推定装置を示す図である。
FIG. 4 is a diagram showing a cache memory hit rate estimation device according to another embodiment of the present invention.

【図5】この発明の他の実施例によるキャッシュメモリ
ヒット率推定装置に組み込んだ制御プログラムの処理フ
ローを示す図である。
FIG. 5 is a diagram showing a processing flow of a control program incorporated in a cache memory hit rate estimation device according to another embodiment of the present invention.

【図6】この発明の他の実施例によるキャッシュメモリ
ヒット率推定装置を示す図である。
FIG. 6 is a diagram showing a cache memory hit rate estimation device according to another embodiment of the present invention.

【図7】一般的な計算機システムの構成を説明するため
の図である。
FIG. 7 is a diagram for explaining the configuration of a general computer system.

【図8】従来のキャッシュメモリヒット率推定装置を示
す図である。
FIG. 8 is a diagram showing a conventional cache memory hit rate estimation device.

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

1 中央処理装置 2 キャッシュメモリ 3 プロセッサ 4 主記憶 5 メモリバス 6 操作端末 7 入出力装置 8 タイマー 9 トレースメモリ 10 アドレス供給回路 11 キャッシュメモリシミュレータ 12 呼の発生部 13 呼の消滅部 14 命令実行部 15 条件呼発生部 16 確率分岐部 17 条件分岐部 18 呼の合流部 19 命令種別実行数積算手段 20 命令数カウント手段 21 計時手段 22 容量制御手段 1 central processing unit 2 cache memory 3 processor 4 main memory 5 memory bus 6 operating terminal 7 input / output device 8 timer 9 trace memory 10 address supply circuit 11 cache memory simulator 12 call generation unit 13 call disappearance unit 14 instruction execution unit 15 Conditional call generating unit 16 Probability branching unit 17 Conditional branching unit 18 Call merging unit 19 Instruction type execution number accumulating unit 20 Instruction number counting unit 21 Timing unit 22 Capacity control unit

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成5年12月27日[Submission date] December 27, 1993

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0012[Correction target item name] 0012

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0012】ここではまず、キャッシュメモリを使用す
る場合について説明する。到着密度λ、平均サービスサ
イクル数Sは、メモリアクセス要求呼のサービスを公平
としているので式(3)、(4)で求められる。式中λ
iは命令読みだし呼Ciの発生頻度、λdはデータ読み
出し呼Cdの発生頻度、λsはデータ書き込み呼Csの
発生頻度、Smiは命令読みだし呼Ciのキャッシュヒ
ットミス時のメモリバスサイクル数、Smdはデータ読
み出し呼Cdのキャッシュヒットミス時のメモリバスサ
イクル数、Smsはデータ書き込み呼Csのキャッシュ
ヒットミス時のメモリバスサイクル数である。
First, the case where a cache memory is used will be described. The arrival density λ and the average service cycle number S are obtained by the equations (3) and (4) because the service of the memory access request call is fair. Where λ
i is the frequency of the instruction read call Ci, λd is the frequency of the data read call Cd, λs is the frequency of the data write call Cs, Smi is the number of memory bus cycles at the cache hit miss of the instruction read call Ci, Smd Is the number of memory bus cycles at the cache hit miss of the data read call Cd, and Sms is the number of memory bus cycles at the cache hit miss of the data write call Cs.

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0013[Correction target item name] 0013

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0013】[0013]

【数2】 [Equation 2]

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0027[Name of item to be corrected] 0027

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0027】[0027]

【数7】 [Equation 7]

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0031[Correction target item name] 0031

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0031】実施例4 図4はこの発明の実施例4を説明するための図である。
図において1〜8、19は図2のものと同一のものであ
り、20はプロセッサが実行した命令数を積算し予め設
定した数と一致したときに一致信号を出力する命令数カ
ウント手段、21はプログラムの実行開始時から予め設
定された時間経過時に、プロセッサに停止信号を出力す
る第1の動作モードと、プログラムの実行開始時から計
時を開始し、命令数カウント手段から一致信号が出力さ
れたときに計時を停止する第2の動作モードを選択可能
な計時手段である。図5はこの装置に組み込んだ制御プ
ログラムの処理フローを説明するための図である。次に
動作について図5に沿って説明する。オペレータは従来
と全く同様にして、所望のプログラムの実行を指令す
る。指令を受けたプロセッサ3は制御プログラムを起動
し、まず図3に示した方法と同一の方法により、全体の
ヒット率hi、hdを算出する。次にプロセッサ3の動
作モードを表2の4として、プログラムを実行させタイ
マー8により処理時間Taを計測する。次にプロセッサ
3の動作モードを表2の4とし、計時手段20を第1の
動作モードとしてオペレータによって指定された計測時
間間隔tを設定し、プログラムを実行させ、命令種別実
行数積算手段18にプログラムの実行開始から、計時手
段20がプロセッサ3に停止信号を出力し、プログラム
の実行を停止させるまでの間にプロセッサ3が実行した
命令を順次類別させ、その命令種別毎に実行数を積算さ
せる。そしてプログラムの実行が停止した時点の命令種
別毎の実行数を命令種別実行数積算手段18から読みだ
し、これからN、Pd、Ps、Po、To、T を算出
する。次にプロセッサの動作モードを表2の3とし、命
令数カウント手段19に命令数Nを設定し、計時手段2
0を第2の動作モードとして、同一プログラムを実行さ
せる。命令数カウント手段19はプロセッサ3の命令実
行数を積算し、設定された数Nと一致すると一致信号を
出力する。計時手段20はこの一致信号を検出して計時
を停止する。制御プログラムはプログラムの実行終了
後、計時手段20から時間を読みだしてT3を算出す
る。そしてこれらのパラメータをまず式(14)と式
(18)から導かれる方程式を解くプログラムに代入し
て、ヒット率hiを算出する。次にこれらの結果を式
(15)と式(19)から導かれる方程式を解くプログ
ラムに代入してヒット率hdを算出し、結果を操作端末
6に送り出しオペレータに知らせる。以上の操作を時間
tをt時間ずつ長くしてTaを越えない範囲で繰り返
す。この装置は以上のように動作するので、任意のプロ
グラムを実行した場合の、命令キャッシュメモリとデー
タキャッシュメモリのヒット率の推移を同一実時間スケ
ール上で示すことが出来る。
Fourth Embodiment FIG. 4 is a diagram for explaining a fourth embodiment of the present invention.
In the figure, 1 to 8 and 19 are the same as those in FIG. 2, and 20 is an instruction number counting means for accumulating the number of instructions executed by the processor and outputting a coincidence signal when they coincide with a preset number, 21 Is a first operation mode in which a stop signal is output to the processor when a preset time has elapsed from the start of program execution, and clocking is started from the start of program execution, and a match signal is output from the instruction number counting means. It is a time measuring means capable of selecting the second operation mode for stopping the time measurement when the time is up. FIG. 5 is a diagram for explaining the processing flow of the control program incorporated in this apparatus. Next, the operation will be described with reference to FIG. The operator commands execution of a desired program in the same manner as in the conventional case. The processor 3, which has received the command, starts the control program, and first calculates the overall hit rates hi and hd by the same method as that shown in FIG. Next, the operation mode of the processor 3 is set to 4 in Table 2, the program is executed, and the processing time Ta is measured by the timer 8. Next, the operation mode of the processor 3 is set to 4 in Table 2, the time measuring means 20 is set to the first operation mode, the measurement time interval t designated by the operator is set, the program is executed, and the instruction type execution number accumulating means 18 is set. From the start of the execution of the program until the time counting means 20 outputs the stop signal to the processor 3 and stops the execution of the program, the instructions executed by the processor 3 are sequentially classified, and the number of executions is integrated for each instruction type. . Then, the number of executions for each instruction type at the time when the execution of the program is stopped is read from the instruction type execution number accumulating means 18, and N, Pd, Ps, Po, To , and T 4 are calculated from this. Next, the operating mode of the processor is set to 3 in Table 2, the number of instructions N is set in the instruction number counting means 19, and the time counting means 2 is set.
The same program is executed with 0 as the second operation mode. The instruction number counting means 19 integrates the instruction execution number of the processor 3 and outputs a coincidence signal when the instruction number coincides with the set number N. The timing means 20 detects this coincidence signal and stops the timing. After the execution of the program is completed, the control program reads the time from the clock means 20 and calculates T3. Then, these parameters are first substituted into a program that solves the equations derived from the equations (14) and (18) to calculate the hit rate hi. Next, these results are substituted into a program that solves the equations derived from equations (15) and (19) to calculate the hit rate hd, and the results are sent to the operation terminal 6 to notify the operator. The above operation is repeated within a range in which the time t is increased by t hours and Ta is not exceeded. Since this device operates as described above, it is possible to show the transition of the hit rate of the instruction cache memory and the data cache memory when an arbitrary program is executed on the same real time scale.

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0036[Correction target item name] 0036

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0036】実施例8 上記実施例では単一プロセッサの場合を示したが、メモ
リバスに複数のプロセッサを接続したマルチプロセッサ
に拡張した場合について説明する。上記マルチプロセッ
サを待ち行列モデルで表現し、各プロセッサに同一のプ
ログラムを実行させた場合の処理サイクル数を、プロセ
ッサの各命令の処理サイクル数と、メモリサイクル数
と、プログラムの実行命令数と、命令種別毎の実行数
と、主記憶アクセスの競合によって生じる待ち時間と、
キャッシュメモリのヒット率とをパラメータとして、キ
ャッシュメモリの機能をそれぞれ使用する場合と使用し
ない場合を組み合せた動作モード毎に定式化した場合、
各キャッシュメモリのメモリへのアクセスが公平に扱わ
れるとすると、各パラメータはプロセッサに関係なく同
一となるので、キャッシュメモリの動作モード毎の処理
サイクル数はプロセッサに関係なく同一となり、それぞ
れ式(12)〜式(15)と同一の式で表される。この
場合のバス負荷ρ、メモリアクセス時の平均サービス待
ち時間Lqはそれぞれ式(1)、式(2)と同一とな
る。一方メモリアクセス要求呼の到着発生密度λと平均
サービスサイクル数Sはプロセッサ数をZとすると式
(21)、(22)で表せる。
Embodiment 8 In the above embodiment, the case of a single processor is shown, but a case of expansion to a multiprocessor in which a plurality of processors are connected to the memory bus will be explained. The multiprocessor is represented by a queuing model, the number of processing cycles when each processor executes the same program, the number of processing cycles of each instruction of the processor, the number of memory cycles, the number of execution instructions of the program, The number of executions for each instruction type and the waiting time caused by contention for main memory access,
When the cache memory hit rate is used as a parameter and formulated for each operation mode that combines the use and non-use of the cache memory function,
If access to the memory of each cache memory is treated fairly, each parameter is the same regardless of the processor. Therefore, the number of processing cycles for each operation mode of the cache memory is the same regardless of the processor, and each of the equations (12) ) -Equation (15). In this case, the bus load ρ and the average service waiting time Lq at the time of memory access are the same as in the equations (1) and (2), respectively. On the other hand, the arrival occurrence density λ of the memory access request call and the average service cycle number S can be expressed by the equations (21) and (22), where Z is the number of processors.

【手続補正6】[Procedure correction 6]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0039[Correction target item name] 0039

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0039】[0039]

【数10】 [Equation 10]

【手続補正7】[Procedure Amendment 7]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図5[Name of item to be corrected] Figure 5

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図5】 [Figure 5]

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置と各々独立かつ並列に動作
し、その機能を使用するしないを選択可能な命令キャッ
シュメモリとデータキャッシュメモリからなるプロセッ
サと、メモリバスに接続されプロセッサで実行されるプ
ログラムと所望のデータが格納された主記憶と、オペレ
ータが計算機を操作するための操作端末と、前記操作端
末とプロセッサの間の情報の入出力を媒介する入出力装
置と、プログラムの処理時間を計測可能なタイマーとを
備えた計算機で、任意のプログラムを実行した場合の前
記キャッシュメモリのヒット率を推定するキャッシュメ
モリヒット率推定方法において、前記計算機を待ち行列
モデルによって表現し、このモデルを用いて前記プロセ
ッサで実行されるプログラムの処理時間を、プロセッサ
の各命令の処理サイクル数と、メモリサイクル数と、プ
ログラムの実行命令数と、命令種別毎の実行数と、主記
憶アクセスの競合によって生じる待ち時間と、キャッシ
ュメモリのヒット率とをパラメータとして、キャッシュ
メモリの機能をそれぞれ使用する場合と使用しない場合
を組み合せた動作モード毎に定式化した処理時間式と、
前記2種類のキャッシュメモリのうちヒット率を推定す
る側のキャッシュメモリを使用状態とし、他方のキャッ
シュメモリを非使用状態としてプログラムを実行し、そ
の時にタイマーにより計測した処理時間と、プログラム
の実行命令数と、命令種別毎の実行数とから、当該キャ
ッシュメモリのヒット率を算出することを特徴とするキ
ャッシュメモリヒット率推定方法。
1. A processor comprising an instruction cache memory and a data cache memory, each of which operates independently and in parallel with a central processing unit and which can be selected not to use its function, and a program connected to the memory bus and executed by the processor. And a main memory in which desired data is stored, an operating terminal for an operator to operate a computer, an input / output device that mediates input / output of information between the operating terminal and a processor, and a processing time of a program is measured. In a cache memory hit rate estimation method for estimating the hit rate of the cache memory when an arbitrary program is executed by a computer equipped with a possible timer, the computer is represented by a queuing model, and this model is used. The processing time of the program executed by the processor is determined by the processing size of each instruction of the processor. Functions, the number of memory cycles, the number of memory cycles, the number of program execution instructions, the number of executions for each instruction type, the wait time caused by main memory access competition, and the cache memory hit rate as parameters. A processing time formula formulated for each operation mode that combines the use and non-use of each,
Of the two types of cache memories, the cache memory on the side of which the hit ratio is estimated is set to the used state, the other cache memory is set to the unused state, and the program is executed. At that time, the processing time measured by the timer and the program execution instruction are executed. A method for estimating a cache memory hit rate, characterized in that the hit rate of the cache memory is calculated from the number and the number of executions for each instruction type.
【請求項2】 中央処理装置と各々独立かつ並列に動作
し、その機能を使用するしないを選択可能な命令キャッ
シュメモリとデータキャッシュメモリからなるプロセッ
サと、メモリバスに接続されプロセッサで実行されるプ
ログラムと所望のデータが格納された主記憶と、オペレ
ータが計算機を操作するための操作端末と、前記操作端
末とプロセッサの間の情報の入出力を媒介する入出力装
置と、プログラムの処理時間を計測可能なタイマーとを
備えた計算機で、命令キャッシュメモリとデータキャッ
シュメモリの両方を使用状態として、プログラムを微小
時間Tだけ実行した場合のプログラムの実行命令数Nと
命令種別毎の実行数と、一方のキャッシュメモリのみを
使用状態として、同一プログラムをN命令だけ実行した
場合の処理時間と、前記計算機を待ち行列モデルによっ
て表現し、このモデルを用いて前記プロセッサで実行さ
れるプログラムの処理時間を、プロセッサの各命令の処
理サイクル数と、メモリサイクル数と、プログラムの実
行命令数と、命令種別毎の実行数と、主記憶アクセスの
競合によって生じる待ち時間と、キャッシュメモリのヒ
ット率とをパラメータとして、キャッシュメモリの機能
をそれぞれ使用する場合と使用しない場合を組み合せた
動作モード毎に定式化した処理時間式とから、キャッシ
ュメモリのヒット率を推定することを、時間Tを徐々に
長くして繰り返すことにより、2種類のキャッシュメモ
リのヒット率の推移を、同一の実時間スケール上で推定
することを特徴とするキャッシュメモリヒット率推定方
法。
2. A processor comprising an instruction cache memory and a data cache memory, each of which operates independently and in parallel with the central processing unit and which can be selected not to use its function, and a program connected to the memory bus and executed by the processor. And a main memory in which desired data is stored, an operating terminal for an operator to operate a computer, an input / output device that mediates input / output of information between the operating terminal and a processor, and a processing time of a program is measured. In a computer equipped with a possible timer, with both the instruction cache memory and the data cache memory in use, the number N of execution instructions of the program and the number of executions for each instruction type when the program is executed for a minute time T Processing time when the same program is executed for N instructions, using only the cache memory of The computer is represented by a queuing model, and the processing time of a program executed by the processor using this model is calculated by the number of processing cycles of each instruction of the processor, the number of memory cycles, the number of executed instructions of the program, and the instruction. Formulated for each operation mode by combining the number of executions for each type, the wait time caused by contention for main memory access, and the hit rate of the cache memory as parameters, with and without using the cache memory function. Estimating the hit rate of the cache memory from the above processing time equation and repeating the time T by gradually increasing the time T and estimating the transition of the hit rate of the two types of cache memory on the same real time scale. A method for estimating a cache memory hit rate, which comprises:
【請求項3】 中央処理装置と各々独立かつ並列に動作
し、その機能を使用するしないを選択可能な命令キャッ
シュメモリとデータキャッシュメモリからなるプロセッ
サと、メモリバスに接続されプロセッサで実行されるプ
ログラムと所望のデータが格納された主記憶と、オペレ
ータが計算機を操作するための操作端末と、前記操作端
末とプロセッサの間の情報の入出力を媒介する入出力装
置と、プログラムの処理時間を計測可能なタイマーとを
備えた計算機に、上記プロセッサで実行した命令種別毎
の実行数を積算する命令種別実行数積算手段を付加した
ことを特徴とするキャッシュメモリヒット率推定装置。
3. A processor comprising an instruction cache memory and a data cache memory, which operate independently of each other and in parallel with the central processing unit and which can be selected not to use their functions, and a program connected to the memory bus and executed by the processor. And a main memory in which desired data is stored, an operating terminal for an operator to operate a computer, an input / output device that mediates input / output of information between the operating terminal and a processor, and a processing time of a program is measured. A cache memory hit ratio estimating device, characterized in that an instruction type execution number accumulating means for accumulating the number of executions of each instruction type executed by the processor is added to a computer provided with a possible timer.
【請求項4】 プロセッサが実行した命令数を積算し、
予め設定された数と一致したときに一致信号を出力する
命令数カウント手段と、プログラムの実行開始時から予
め設定された時間経過時に、プロセッサに停止信号を出
力する第1の動作モードと、プログラムの実行開始時か
ら計時を開始し、前記命令数カウント手段から一致信号
が出力されたときに計時を停止する第2の動作モードと
を選択可能な計時手段とを備えたことを特徴とする請求
項3記載のキャッシュメモリヒット率推定装置。
4. The number of instructions executed by the processor is added up,
An instruction number counting means for outputting a coincidence signal when the number matches a preset number; a first operation mode for outputting a stop signal to the processor when a preset time has elapsed from the start of execution of the program; And a second operation mode that starts counting from the start of execution of the above and stops counting when a coincidence signal is output from the instruction number counting means. Item 3. A cache memory hit rate estimation device according to item 3.
【請求項5】 キャッシュメモリに使用容量を可変なキ
ャッシュメモリを用い、前記キャッシュメモリの使用可
能容量を制御する容量制御手段を備えたことを特徴とす
る請求項3記載のキャッシュメモリヒット率推定装置。
5. The cache memory hit ratio estimating device according to claim 3, wherein a cache memory having a variable used capacity is used as the cache memory, and capacity control means for controlling the usable capacity of the cache memory is provided. .
JP4314948A 1992-11-25 1992-11-25 Method and device for estimating cache memory hit rate Pending JPH06161889A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4314948A JPH06161889A (en) 1992-11-25 1992-11-25 Method and device for estimating cache memory hit rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4314948A JPH06161889A (en) 1992-11-25 1992-11-25 Method and device for estimating cache memory hit rate

Publications (1)

Publication Number Publication Date
JPH06161889A true JPH06161889A (en) 1994-06-10

Family

ID=18059591

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4314948A Pending JPH06161889A (en) 1992-11-25 1992-11-25 Method and device for estimating cache memory hit rate

Country Status (1)

Country Link
JP (1) JPH06161889A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100399299C (en) * 2005-10-28 2008-07-02 中国科学院计算技术研究所 Memory data processing method of cache failure processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100399299C (en) * 2005-10-28 2008-07-02 中国科学院计算技术研究所 Memory data processing method of cache failure processor

Similar Documents

Publication Publication Date Title
US6360337B1 (en) System and method to perform histogrammic counting for performance evaluation
Haban et al. Application of real-time monitoring to scheduling tasks with random execution times
US20090064149A1 (en) Latency coverage and adoption to multiprocessor test generator template creation
US20040243738A1 (en) Method for asynchronous DMA command completion notification
CN105378668A (en) Operating system-managed interrupt steering in multiprocessor systems
US20030177163A1 (en) Microprocessor comprising load monitoring function
CN111823229A (en) Mechanical arm control flow generation method, device, equipment and storage medium
CN107769987B (en) Message forwarding performance evaluation method and device
JPH06161889A (en) Method and device for estimating cache memory hit rate
CN114356571A (en) Processing method and device
JP2010286892A (en) Processing time estimation device and processing time estimation program
KR101006122B1 (en) Detection device, program, and detection method
JP3008895B2 (en) Multiprocessor load equalizer
CN108228414B (en) Linux-based processor process parameter monitoring method and monitoring system
WO2009026361A2 (en) Method, system and apparatus for measuring an idle value of a central processing unit
JPH11327927A (en) Cpu using rate measurement system
Bard A Characterization of VM/370 Workloads.
JP2012226409A (en) Multi-core processor
US20050120348A1 (en) Method of determining information about the processes which run in a program-controlled unit during the execution of a program by the program-controlled unit
JPH02300947A (en) Circuit for measuring using rate of processor
JP2000010816A (en) Tracing device for debugging
JPH10307763A (en) Bus monitor device
JP2016052029A (en) Device and method for communication lsi verification, and program
JPH02100135A (en) Method of controlling signal processor
CN116909716A (en) Event-based hardware scheduling state machine processing method, device and equipment