JP2001290704A - Device and method for controlling multiprocess - Google Patents

Device and method for controlling multiprocess

Info

Publication number
JP2001290704A
JP2001290704A JP2000105370A JP2000105370A JP2001290704A JP 2001290704 A JP2001290704 A JP 2001290704A JP 2000105370 A JP2000105370 A JP 2000105370A JP 2000105370 A JP2000105370 A JP 2000105370A JP 2001290704 A JP2001290704 A JP 2001290704A
Authority
JP
Japan
Prior art keywords
priority
block
cache memory
cache
process control
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
JP2000105370A
Other languages
Japanese (ja)
Inventor
Masahiro Fukuda
正浩 福田
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.)
Renesas Micro Systems Co Ltd
Original Assignee
Renesas Micro Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Micro Systems Co Ltd filed Critical Renesas Micro Systems Co Ltd
Priority to JP2000105370A priority Critical patent/JP2001290704A/en
Publication of JP2001290704A publication Critical patent/JP2001290704A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To avoid the decrease of the use efficiency of a cache memory and the decrease of a cache hit ratio by a plurality of processes in which priorities are set. SOLUTION: This controller is provided with a processor (1) managing the plurality of processes in which the priorities are set, a main storage device (6) shared by the plurality of processes, the cache memory (2) where the data of the storage device (6) are copied and which also consists of blocks monopolized by the plurality of processes, and a cache management table (10) representing a process monopolizing blocks in each of a plurality of blocks and also the priority of the process monopolizing the blocks, and in the case a cache error of a new process whose priority is higher than the priority represented by the table (10) takes place, the processor (1) releases the block monopolization by any of blocks whose priority is lower than the priority and sets block monopolization by a new process.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、複数のプロセスに
共有されるキャッシュメモリを備えたマルチプロセス制
御装置に関する。
The present invention relates to a multi-process control device having a cache memory shared by a plurality of processes.

【0002】[0002]

【従来の技術】近年、コンピュータ・システムにおいて
は、マイクロプロセッサの動作速度が日々向上してい
る。このようなシステムにおいては、安価で大容量の主
記憶装置が使用される。一般に、主記憶装置は、低速メ
モリからなる。低速メモリは、高速動作するマイクロプ
ロセッサのアクセス速度に追随することができない。マ
イクロプロセッサのプログラム実行速度を高速化するた
め、マイクロプロセッサと主記憶装置の間に、小容量の
高速キャッシュメモリが設けられる。
2. Description of the Related Art In computer systems, the operating speed of microprocessors has been increasing day by day. In such a system, an inexpensive and large-capacity main storage device is used. Generally, the main storage device comprises a low-speed memory. A low-speed memory cannot follow the access speed of a microprocessor that operates at a high speed. In order to increase the program execution speed of the microprocessor, a small-capacity high-speed cache memory is provided between the microprocessor and the main storage device.

【0003】キャッシュメモリを搭載したコンピュータ
・システムにおいては、アクセス頻度の高いデータや直
近に使用されたデータがキャッシュメモリに格納され
る。キャッシュメモリに対するキャッシュ・ヒットの確
率が向上すると、低速な主記憶装置に対するアクセス頻
度が低下する。主記憶装置に対するアクセス頻度が低下
すると、マイクロプロセッサのプログラム実行速度が向
上し、結果としてコンピュータ・システムによる処理の
効率が向上する。
In a computer system equipped with a cache memory, frequently accessed data and recently used data are stored in the cache memory. As the probability of a cache hit to the cache memory increases, the frequency of access to a slow main storage device decreases. When the frequency of access to the main storage device is reduced, the program execution speed of the microprocessor is improved, and as a result, the efficiency of processing by the computer system is improved.

【0004】キャッシュメモリには、データ・ワード又
はインストラクション・ワードが格納される。主記憶装
置のアクセスが発生する度に、キャッシュメモリに所望
のデータ(所望のインストラクション)が格納されてい
るか確認される。所望のデータ(所望のインストラクシ
ョン)が格納されていた場合(キャッシュ・ヒット)、
そのデータが読み出される。この場合、主記憶装置に対
する読み出し処理は実行されない。所望のデータが格納
されていない場合(キャッシュ・ミス)、そのデータ
は、主記憶装置から読み出される。主記憶装置から読み
出されたデータは、キャッシュメモリが空き領域を備え
る場合、その空き領域に書き込まれる。また、キャッシ
ュメモリに空き領域が存在しない場合、既存情報との置
き換え(リプレース)が実行される。
A data word or an instruction word is stored in the cache memory. Each time an access to the main storage device occurs, it is checked whether desired data (desired instructions) is stored in the cache memory. If desired data (desired instruction) is stored (cache hit),
The data is read. In this case, the read processing for the main storage device is not executed. If the desired data is not stored (cache miss), the data is read from main storage. When the cache memory has a free area, the data read from the main storage device is written to the free area. If there is no free area in the cache memory, replacement with existing information (replacement) is performed.

【0005】ここで、一般的なキャッシュメモリのアク
セスについて説明する。図6は、一般的なキャッシュメ
モリのアクセスの概念を示す。キャッシュメモリのアク
セス方式は、種々存在する。ここでは、セットアソシア
ティブ方式を例に説明を行う。
Here, access of a general cache memory will be described. FIG. 6 shows the concept of general cache memory access. There are various cache memory access methods. Here, the set associative method will be described as an example.

【0006】図に示されたコンピュータ・システム50
は、4ウェイ・セットアソシアティブ方式のシステムで
ある。そのシステムは、プロセッサ(CPU)51と、キ
ャッシュメモリ52と、インデックス部53と、比較器
54と、セレクタ55と、主記憶装置56と、登録資格
設定部57と、プロセス優先度部58と、登録資格判定
手段59と、ブロック選択手段60を備える。キャッシ
ュメモリ52は、4つのブロックからなる。比較器54
及び登録資格設定部57は、ブロックの数に応じて、4
段構成を備える。
[0006] The computer system 50 shown in the figure.
Is a 4-way set associative system. The system includes a processor (CPU) 51, a cache memory 52, an index unit 53, a comparator 54, a selector 55, a main storage device 56, a registration qualification setting unit 57, a process priority unit 58, A registration eligibility determination unit 59 and a block selection unit 60 are provided. The cache memory 52 includes four blocks. Comparator 54
And the registration qualification setting unit 57 determines whether
It has a step configuration.

【0007】インデックス部53は、主記憶装置56の
アドレスの一部を形成する。インデックス部53が表す
インデックスは、キャッシュメモリ52のブロック内の
アドレス(要素アドレス)を表す。
[0007] The index section 53 forms a part of the address of the main storage device 56. The index represented by the index unit 53 represents an address (element address) in a block of the cache memory 52.

【0008】キャッシュメモリ52に主記憶データが書
き込まれる(登録)場合、主記憶装置のアドレス(主記
憶アドレス)の一部(インデックス)によりブロックの
要素アドレスが指定される。一方、ブロック選択手段6
0は、アクセスすべきキャッシュメモリ52のブロック
を選択する。ブロック選択手段60に選択されたブロッ
クにおいて、インデックスが示す要素ブロックに、主記
憶データが登録される。この登録の際、要素アドレスの
指定に使用されなかった主記憶アドレスの一部が、主記
憶データと共に格納される。この格納により、キャッシ
ュメモリ52の内容と主記憶データが一対一に対応付け
られる。
When main memory data is written (registered) in the cache memory 52, an element address of a block is specified by a part (index) of an address (main memory address) of the main memory. On the other hand, the block selecting means 6
0 selects a block of the cache memory 52 to be accessed. In the block selected by the block selecting means 60, main storage data is registered in the element block indicated by the index. At the time of this registration, a part of the main storage address not used for specifying the element address is stored together with the main storage data. By this storage, the contents of the cache memory 52 and the main storage data are associated one-to-one.

【0009】キャッシュメモリ52の主記憶データを格
納する領域は、データ部と呼ばれる。同様に、主記憶ア
ドレスの一部であって、且つ、要素アドレスの指定に使
用されなかった部分が格納される領域は、タグ部と呼ば
れる。
[0009] The area of the cache memory 52 for storing main storage data is called a data section. Similarly, an area in which a part of the main memory address that is not used for specifying the element address is stored is called a tag part.

【0010】主記憶データがキャッシュメモリ52に登
録された後、その主記憶データのアクセスが発生した場
合、主記憶アドレスの一部であるインデックスが要素ア
ドレスとして使用される。その要素アドレスによりタグ
部が特定される。タグ部から読み取られたタグは、比較
器54において、主記憶アドレスの残部と比較される。
比較の結果が一致を示す場合、データ部からデータが読
み取られ、セレクタ55を介してプロセッサ51に転送
される。主記憶装置よりも高速動作が可能なキャッシュ
メモリ52からデータ読み取る時間は、主記憶装置56
をアクセスする場合よりも大幅に短い。
After the main memory data is registered in the cache memory 52, when an access to the main memory data occurs, an index which is a part of the main memory address is used as an element address. The tag part is specified by the element address. The tag read from the tag section is compared in the comparator 54 with the rest of the main memory address.
If the result of the comparison indicates a match, the data is read from the data portion and transferred to the processor 51 via the selector 55. The time required to read data from the cache memory 52, which can operate at a higher speed than the main storage device, is equal to that of the main storage device 56.
Is significantly shorter than when you access.

【0011】以上説明のキャッシュメモリ52に関する
処理において、キャッシュメモリ52のブロック数に応
じて、登録可能なデータ量が制限される。即ち、主記憶
アドレスの一部(インデックス)の内容が同じ主記憶デ
ータの登録数は、ブロック数に対応する数に制限され
る。ブロック数を超える新たな主記憶データは、登録済
みの主記憶データと置き換えられる。この際、キャッシ
ュメモリでは、使用頻度の低い主記憶データ(低頻度デ
ータ)又は長い時間アクセスされない主記憶データ(過
去データ)がキャッシュメモリから追い出される。低頻
度データ及び過去データは、優先度の高いプロセスに参
照されるデータの場合、キャッシュメモリに残されるこ
とが望ましい。プロセスの優先度は、例えば複数のプロ
セスを時分割多重化して並行処理することができるオペ
レーティングシステム(UNIX:登録商標)が使用される
際に問題となる。このオペレーティングシステムを搭載
したマルチプロセス制御装置は、処理の重要度に合わせ
てプロセスの優先度が設定される。プロセスの実行速度
は、プロセスの優先度に応じて変化する。
In the above-described processing relating to the cache memory 52, the amount of data that can be registered is limited according to the number of blocks in the cache memory 52. That is, the number of registered main storage data having the same contents of a part (index) of the main storage address is limited to the number corresponding to the number of blocks. New main storage data exceeding the number of blocks is replaced with registered main storage data. At this time, in the cache memory, main storage data (low-frequency data) that is used less frequently or main storage data that has not been accessed for a long time (past data) are evicted from the cache memory. It is desirable that the low-frequency data and the past data are left in the cache memory when the data is referred to by a process with a high priority. The priority of a process becomes a problem when, for example, an operating system (UNIX: registered trademark) capable of time-division multiplexing a plurality of processes and performing parallel processing is used. In a multi-process control device equipped with this operating system, the priority of a process is set according to the importance of a process. The execution speed of a process changes according to the priority of the process.

【0012】プロセスの優先度が考慮されたキャッシュ
メモリに関する技術は、例えば特開平9−282226
号公報に開示されている。この技術について、図6を参
照して説明する。コンピュータシステム50の登録資格
設定部57は、キャッシュメモリ52のブロック毎に、
主記憶データの登録が許可されるプロセスの優先度の範
囲を保持する。プロセス優先度設定部58は、主記憶ア
クセスを実行しようとするプロセスの優先度を設定す
る。登録資格判定手段59は、プロセス優先度設定部5
8に設定された優先度と、登録資格設定部57に保持さ
れた優先度を比較し、主記憶データを書き込むべきブロ
ックを決定する。その決定は、プロセスがアクセスしよ
うとする主記憶データがキャッシュメモリ52に登録さ
れていない場合に実行される。ブロック選択手段60
は、主記憶データを登録するブロックを選択する。
A technique relating to a cache memory in which the priority of a process is considered is disclosed in, for example, Japanese Patent Application Laid-Open No. 9-282226.
No. 6,086,045. This technique will be described with reference to FIG. The registration qualification setting unit 57 of the computer system 50
The range of the priority of the process permitted to register the main storage data is held. The process priority setting unit 58 sets the priority of a process that is to execute main memory access. The registration qualification judging means 59 includes the process priority setting unit 5
Then, the priority set to 8 and the priority held in the registration qualification setting unit 57 are compared to determine a block in which the main storage data is to be written. The determination is performed when the main storage data to be accessed by the process is not registered in the cache memory 52. Block selecting means 60
Selects a block for registering main storage data.

【0013】登録資格設定部57に登録許可優先度とし
て、「0」、「2」、「5」、「7」が設定された場合
を想定する。登録許可優先度は、値が小さくなるほど優
先度が上がる。この場合、「0」が最も高い優先度を表
す。
It is assumed that “0”, “2”, “5”, and “7” are set as registration permission priorities in registration qualification setting section 57. The registration permission priority increases as the value decreases. In this case, “0” represents the highest priority.

【0014】主記憶アクセスデータがキャッシュメモリ
52に登録されている場合(キャッシュヒット)、一般
的なメモリと同様に、キャッシュメモリ52からデータ
が読み取られ、セレクタ55を介してプロセッサ51に
転送される。
When the main memory access data is registered in the cache memory 52 (cache hit), the data is read from the cache memory 52 and transferred to the processor 51 via the selector 55 as in a general memory. .

【0015】ここで、キャッシュメモリ52のブロック
には、空き領域が存在しない場合を想定する。即ち、新
たな主記憶データが登録される場合、何れかの主記憶デ
ータがキャッシュメモリ52から追い出される。
Here, it is assumed that there is no free area in the block of the cache memory 52. That is, when new main storage data is registered, any of the main storage data is evicted from the cache memory 52.

【0016】優先度「0」が設定されたプロセスがアク
セスアドレス部(主記憶アドレス)51aをアクセスす
ると、そのプロセスが必要とする主記憶データがキャッ
シュメモリ52に登録されているか否か検索される。そ
の主記憶データが登録されていなかった場合、新たに主
記憶データがキャッシュメモリ52に登録される。主記
憶データの登録に先立ち、ブロック選択手段60におい
て、登録資格設定部57の内容とプロセス優先度設定部
58の内容が比較される。この場合、プロセス優先度設
定部58の内容は、優先度「0」を示す。登録資格設定
部57の内容は、「0」、「2」、「5」、「7」を示
す。登録資格判定部59は、4つのブロックの全てに対
する登録許可を表す判定を実行する。ブロック選択手段
60は、登録許可されたブロックの中から登録するブロ
ックを選択する。この場合、4つのブロックの全てが選
択対象である。ブロック選択手段60は、プロセス優先
度に加えて、使用頻度及びアクセス頻度に着目してブロ
ックの選択を実行する。
When a process to which the priority "0" is set accesses the access address section (main storage address) 51a, it is searched whether or not the main storage data required by the process is registered in the cache memory 52. . If the main storage data has not been registered, the main storage data is newly registered in the cache memory 52. Prior to the registration of the main storage data, the contents of the registration qualification setting unit 57 and the contents of the process priority setting unit 58 are compared in the block selection unit 60. In this case, the content of the process priority setting unit 58 indicates the priority “0”. The contents of the registration qualification setting unit 57 indicate “0”, “2”, “5”, and “7”. The registration qualification determination unit 59 executes a determination indicating registration permission for all four blocks. The block selecting means 60 selects a block to be registered from the blocks permitted to be registered. In this case, all four blocks are to be selected. The block selecting unit 60 selects a block by focusing on the use frequency and the access frequency in addition to the process priority.

【0017】ブロック選択手段60に選択されたブロッ
クでは、主記憶データの更新、即ち主記憶データの追い
出し及び登録が実行される。
In the block selected by the block selecting means 60, the main storage data is updated, ie, the main storage data is evicted and registered.

【0018】優先度「3」のプロセスが必要とする主記
憶データがキャッシュメモリ52に登録されていない場
合、登録資格判定手段59は、優先度「5」、「7」が
設定されたブロックに対する登録許可を表す判定を実行
する。ブロック選択手段60は、登録許可された2つの
ブロックから、登録を実行するブロックを選択する。選
択されたブロックには、新たな主記憶データが登録され
る。
If the main memory data required by the process of the priority "3" is not registered in the cache memory 52, the registration qualification judging means 59 determines whether the block having the priority "5" or "7" is set. Perform a determination indicating registration permission. The block selecting means 60 selects a block to be registered from the two blocks permitted to be registered. New main storage data is registered in the selected block.

【0019】以上のような処理を実行し優先度の高いプ
ロセスに対するキャッシュヒットの頻度を向上させる。
The above processing is executed to improve the frequency of cache hits for a process with a high priority.

【0020】なお、キャッシュメモリの動作に関する一
般的な技術は、上述の公報の他、例えば特開平4−10
0158号公報、特開平7−84887号公報、特開平
9−101916号公報、そして特開平10−8334
9号公報に開示されている。
The general technique relating to the operation of the cache memory is described in Japanese Patent Laid-Open No.
0158, JP-A-7-84887, JP-A-9-101916, and JP-A-10-8334
No. 9 discloses this.

【0021】[0021]

【発明が解決しようとする課題】例えば、一つのブロッ
クに複数の優先度が設定された場合、優先度の高いプロ
セスの主記憶データがキャッシュメモリ52から追い出
され、優先度の低いプロセスの主記憶データがキャッシ
ュメモリ52に登録される、という事態が発生する。こ
の場合、優先度の高いプロセスにキャッシュミスが発生
し、そのプロセスの実行時間が長引いてしまう。
For example, when a plurality of priorities are set in one block, the main memory data of the process with the higher priority is evicted from the cache memory 52, and the main memory of the process with the lower priority is removed. A situation occurs in which data is registered in the cache memory 52. In this case, a cache miss occurs in a high-priority process, and the execution time of the process is prolonged.

【0022】また、一つのブロックに一つの優先度が設
定される場合、優先度の数に合わせてブロックを設けな
ければならない。ブロック数の増大に合わせて、登録資
格設定部57及び比較器54の規模が増大し、さらに登
録資格判定手段,ブロック選択手段,そしてセレクタの構
成が複雑になる。
When one priority is set for one block, blocks must be provided in accordance with the number of priorities. As the number of blocks increases, the sizes of the registration qualification setting unit 57 and the comparator 54 increase, and the configurations of the registration qualification determination unit, the block selection unit, and the selector become complicated.

【0023】また、ブロックに空き領域が存在しても、
ブロックに設定された優先度よりもプロセスの優先度が
低い場合、そのプロセスはその空き領域に主記憶データ
を登録できない。即ち、ブロックの有効利用が阻害され
ています。
Further, even if an empty area exists in the block,
If the priority of the process is lower than the priority set for the block, the process cannot register the main storage data in the empty area. In other words, the effective use of blocks has been hindered.

【0024】又、優先度が同一である複数のプロセスが
稼動する場合、ブロックへの主記憶データの登録が交互
に実行される事態が予想される。この場合、キャッシュ
メモリ52のキャッシュヒット率が低下し、結果として
プロセスの実行速度が低下してしまう。
When a plurality of processes having the same priority operate, it is expected that the main storage data will be registered in the blocks alternately. In this case, the cache hit rate of the cache memory 52 decreases, and as a result, the execution speed of the process decreases.

【0025】本発明は、優先度が設定された複数プロセ
スによるキャッシュメモリの利用効率の低下及びキャッ
シュヒット率の低下を回避することができるマルチプロ
セス制御装置及びマルチプロセス制御方法を提供するこ
とを目的とする。
An object of the present invention is to provide a multi-process control device and a multi-process control method which can avoid a decrease in the use efficiency of a cache memory and a decrease in a cache hit rate by a plurality of processes for which priorities are set. And

【0026】[0026]

【課題を解決するための手段】その課題を解決するため
の手段が、下記のように表現される。その表現中に現れ
る技術的事項には、括弧()付きで、番号、記号等が添
記されている。その番号、記号等は、本発明の実施の複
数の形態又は複数の実施例のうちの少なくとも1つの実
施の形態又は複数の実施例を構成する技術的事項、特
に、その実施の形態又は実施例に対応する図面に表現さ
れている技術的事項に付せられている参照番号、参照記
号等に一致している。このような参照番号、参照記号
は、請求項記載の技術的事項と実施の形態又は実施例の
技術的事項との対応・橋渡しを明確にしている。このよ
うな対応・橋渡しは、請求項記載の技術的事項が実施の
形態又は実施例の技術的事項に限定されて解釈されるこ
とを意味しない。
Means for solving the problem are described as follows. The technical items appearing in the expression are appended with numbers, symbols, etc. in parentheses (). The numbers, symbols, etc. are technical items that constitute at least one embodiment or a plurality of examples of the embodiments or examples of the present invention, in particular, the embodiments or the examples. Corresponds to the reference numerals, reference symbols, and the like assigned to the technical matters expressed in the drawings corresponding to the above. Such reference numbers and reference symbols clarify the correspondence and bridging between the technical matters described in the claims and the technical matters of the embodiments or examples. Such correspondence / bridge does not mean that the technical matters described in the claims are interpreted as being limited to the technical matters of the embodiments or the examples.

【0027】本発明によるマルチプロセス制御装置は、
優先度が設定された複数のプロセスを管理するプロセッ
サ(1)と、複数のプロセスに共有される主記憶装置
(6)と、主記憶装置(6)のデータが複写され、且
つ、複数のプロセスに専有される複数のブロックからな
るキャッシュメモリ(2)と、複数のブロック毎に、ブ
ロックを専有するプロセスを表し、且つ、ブロックを専
有する前記プロセスの優先度を表すキャッシュ管理テー
ブル(10)を備え、プロセッサ(1)は、キャッシュ
管理テーブル(10)が表す優先度よりも高い新たなプ
ロセスのキャッシュミスが発生した場合、前記優先度よ
りも低い優先度の何れかのプロセスによるブロックの専
有を解除し、新たなプロセスによるブロックの専有を設
定する。
The multi-process control device according to the present invention comprises:
A processor (1) that manages a plurality of processes for which priorities have been set; a main storage device (6) shared by the plurality of processes; data in the main storage device (6) are copied; A cache memory (2) composed of a plurality of blocks occupied by a plurality of blocks, and a cache management table (10) representing, for each of the plurality of blocks, a process occupying the block and indicating a priority of the process occupying the block. The processor (1), when a cache miss of a new process higher than the priority indicated by the cache management table (10) occurs, occupies the block by any process of lower priority than the priority. Release and set block occupancy by new process.

【0028】本発明による更なるマルチプロセス制御装
置は、プロセッサ(1)が、ブロックの専有の解除を実
行したとき、専有が解除されたブロックの内容を維持
し、且つ、専有が解除されたブロックへの新たな登録が
発生したときに新たな登録に係る領域のみを更新する本
発明による更なるマルチプロセス制御装置は、プロセッ
サ(1)がキャッシュメモリを参照する際に発生するイ
ンデックスが、ブロックを特定するブロックIDと、ブ
ロック中の所定の領域を特定する要素アドレスからな
る。
[0028] A further multi-process control device according to the present invention is that, when the processor (1) executes the release of the exclusive use of a block, the contents of the released exclusive use block are maintained, and the exclusive use release block is maintained. A further multi-process control device according to the present invention that updates only the area related to the new registration when a new registration occurs in the processor (1) refers to a block in which the index generated when the processor (1) refers to the cache memory is It comprises a block ID to be specified and an element address to specify a predetermined area in the block.

【0029】本発明による更なるマルチプロセス制御装
置は、優先度が、プロセスの動作優先度を表す。
In a further multi-process control device according to the invention, the priority represents the operation priority of the process.

【0030】本発明による更なるマルチプロセス制御装
置は、優先度が、プロセスのキャッシュメモリアクセス
優先度を表す。
In a further multi-process control device according to the invention, the priority represents a cache memory access priority of the process.

【0031】本発明による更なるマルチプロセス制御装
置は、優先度が、前記プロセスの主記憶装置アクセス優
先度を表す。
In a further multi-process control device according to the invention, the priority represents a main storage access priority of the process.

【0032】本発明によるマルチプロセス処理方法は、
稼動する複数のプロセスに優先度が設定され、キャッシ
ュメモリ(2)を専有するプロセス及びプロセスの優先
度がキャッシュ管理テーブル(10)に登録され、キャ
ッシュメモリ(2)をアクセスする新たなプロセスが発
生した場合、キャッシュ管理テーブル(10)を参照し
て新たなプロセスの優先度よりも低い優先度の何れかの
プロセスを検出し、何れかのプロセスに係るキャッシュ
管理テーブル(10)への登録に代えて新たなプロセス
に係る登録が実行され、何れかのプロセスに代えて新た
なプロセスがキャッシュメモリ(2)を占有する。
The multi-process processing method according to the present invention comprises:
Priorities are set for a plurality of running processes, the processes occupying the cache memory (2) and the priorities of the processes are registered in the cache management table (10), and a new process for accessing the cache memory (2) occurs. In this case, with reference to the cache management table (10), any process having a lower priority than the priority of the new process is detected, and instead of registration in the cache management table (10) relating to any process. Thus, registration relating to the new process is executed, and the new process occupies the cache memory (2) instead of any of the processes.

【0033】本発明による更なるマルチプロセス制御方
法は、何れかのプロセスが専有していたキャッシュメモ
リ(2)の登録領域の内容は、新たなプロセスによる新
たな登録により更新されるまで維持される。
In a further multi-process control method according to the present invention, the contents of the registration area of the cache memory (2) occupied by any process are maintained until the contents are updated by new registration by a new process. .

【0034】本発明による更なるマルチプロセス制御方
法は、新たなプロセスに係るキャッシュ管理テーブル
(10)の更新が実行されるとき、新たなプロセスに係
るデータがキャッシュメモリに登録される。
In a further multi-process control method according to the present invention, when an update of the cache management table (10) relating to a new process is executed, data relating to the new process is registered in the cache memory.

【0035】[0035]

【発明の実施の形態】図1は、本発明によるマルチプロ
セス制御装置の概念を示す。図に示されたマルチプロセ
ス制御装置100は、プロセッサ(CPU)1と、キャッ
シュメモリ2と、インデックス部3と、比較器4と、セ
レクタ5と、主記憶装置6と、ブロックID(IDentifi
cation)部7を備える。プロセッサ1は、アクセスアド
レス部1aを備える。
FIG. 1 shows the concept of a multi-process control device according to the present invention. The multi-process control device 100 shown in the figure includes a processor (CPU) 1, a cache memory 2, an index unit 3, a comparator 4, a selector 5, a main storage device 6, a block ID (IDentifi
cation) unit 7. The processor 1 includes an access address unit 1a.

【0036】プロセッサ1は、マルチプロセス処理を実
行する。アクセスアドレス部1aは、主記憶装置6をア
クセスする際に参照される主記憶アドレス(アクセスア
ドレス)が格納される記憶領域である。アクセスアドレ
スの上位ビットは、経路B1を介して、キャッシュメモ
リ2及び比較器4に供給される。アクセスアドレスの下
位ビットは、経路B2を下位してインデックス部3に供
給される。ブロックID部7の内容は、経路B3を介し
てインデックス部3に供給される。タグ部の内容は、経
路B4を介して比較器4に供給される。データ部は、経
路B5を介してセレクタに接続する。主記憶装置6は、
経路B6を介してセレクタ5に接続する。セレクタ5
は、経路B7を介してプロセッサ1に接続する。
The processor 1 executes multi-process processing. The access address section 1a is a storage area in which a main storage address (access address) referred to when accessing the main storage device 6 is stored. The upper bits of the access address are supplied to the cache memory 2 and the comparator 4 via the path B1. The lower bits of the access address are supplied to the index unit 3 in the lower order of the path B2. The contents of the block ID section 7 are supplied to the index section 3 via the path B3. The contents of the tag section are supplied to the comparator 4 via the path B4. The data section is connected to the selector via the path B5. The main storage device 6
It is connected to the selector 5 via the path B6. Selector 5
Is connected to the processor 1 via the path B7.

【0037】アクセスアドレスの上位ビットは、キャッ
シュメモリに格納されたデータが有効であるかどうかの
判別に使用される。アクセスアドレスの下位ビットは、
キャッシュメモリの要素の指定に使用される。アクセス
アドレスの下位ビットは、インデックス部3において、
インデックスの下位データとして使用される。ブロック
ID部7の内容(ID)は、キャッシュメモリ2のブロ
ックの指定に使用される。そのIDは、インデックス部
3において、インデックスの上位データとして使用され
る。インデックスは、キャッシュメモリのブロックとそ
の要素アドレスの指定に使用される。
The upper bits of the access address are used to determine whether data stored in the cache memory is valid. The lower bits of the access address are
Used to specify cache memory elements. The lower bits of the access address are
Used as lower data of the index. The content (ID) of the block ID section 7 is used to specify a block in the cache memory 2. The ID is used in the index unit 3 as higher-order data of the index. The index is used to specify a block of the cache memory and its element address.

【0038】比較器4は、アクセスアドレスの上位ビッ
トの内容と、タグ部の内容を比較し、比較結果をセレク
タ5に通知する。セレクタ5は、比較器4から一致通知
を受信した場合、経路B5を有効に設定する。セレクタ
6は、比較器4から不一致通知を受信した場合、経路B
6を有効に設定する。セレクタ5は、キャッシュメモリ
2又は主記憶装置6をプロセッサ1に出力する。
The comparator 4 compares the contents of the upper bits of the access address with the contents of the tag portion, and notifies the selector 5 of the comparison result. When the selector 5 receives the match notification from the comparator 4, the selector 5 sets the path B5 to valid. When the selector 6 receives the mismatch notification from the comparator 4, the selector 6
Set 6 to valid. The selector 5 outputs the cache memory 2 or the main storage device 6 to the processor 1.

【0039】ここで、図2を参照して、本発明に係るイ
ンデックスの説明を行う。図2は、本発明に係るインデ
ックスの概念を示す。図は、図1に示されたキャッシュ
メモリ2と、アクセスアドレス部1aと、インデックス
部3と、ブロックID部7の関係を示す。
Here, the index according to the present invention will be described with reference to FIG. FIG. 2 illustrates the concept of an index according to the present invention. The figure shows the relationship among the cache memory 2, the access address part 1a, the index part 3, and the block ID part 7 shown in FIG.

【0040】アクセスアドレス部1aは、上位ビット1
bと下位ビット1cからなる。キャッシュメモリ2は、
タグ部2aとデータ部2bからなる。インデックス部3
は、上位データ3aと下位データ3bからなる。
The access address section 1a has upper bit 1
b and the lower bit 1c. The cache memory 2
It comprises a tag section 2a and a data section 2b. Index part 3
Consists of upper data 3a and lower data 3b.

【0041】タグ部2aとデータ部2bの対からなるア
クセス項目は、11ビットのインデックスで特定され
る。そのインデックスの上位3ビットは、ブロックの特
定に使用される。そのアドレスの下位8ビットは、アク
セス項目の特定に使用される。インデックスは、インデ
ックス部3に格納される。インデックスの上位データ3
aは、ブロックID部7の内容に対応する。インデック
スの下位データ3bは、アクセスアドレス部1aの下位
データに対応する。
An access item composed of a pair of the tag section 2a and the data section 2b is specified by an 11-bit index. The upper three bits of the index are used to specify a block. The lower 8 bits of the address are used to specify an access item. The index is stored in the index section 3. Top data of index 3
“a” corresponds to the content of the block ID section 7. The lower data 3b of the index corresponds to the lower data of the access address section 1a.

【0042】キャッシュメモリ2のアクセスが発生する
と、アクセスアドレス部1aの下位ビット1cの内容と
ブロックID部7の内容がインデックス部3に転送され
る。インデックス部3の内容、即ちインデックスを参照
して、キャッシュメモリ2がアクセスされる。なお、ア
クセスアドレス部1aの上位ビット1bの内容は、タグ
データとしてタグ部2aの内容と比較される。
When an access to the cache memory 2 occurs, the contents of the lower bit 1c of the access address section 1a and the contents of the block ID section 7 are transferred to the index section 3. The cache memory 2 is accessed with reference to the contents of the index unit 3, that is, the index. The contents of the upper bits 1b of the access address section 1a are compared with the contents of the tag section 2a as tag data.

【0043】本発明に係るマルチプロセス制御装置100
は、一つのブロックにひとつのプロセスが割当てられ
る。即ち、一つのブロックが複数のプロセスに共有され
る、という動作事態が発生しない。
The multi-process control device 100 according to the present invention
, One process is assigned to one block. That is, an operation situation in which one block is shared by a plurality of processes does not occur.

【0044】図3は、本発明に係るキャッシュ管理テー
ブル10の構成を示す。キャッシュ管理テーブル10
は、例えばプロセッサ1に設けられる。このキャッシュ
管理テーブル10は、キャッシュメモリ2が8ブロック
からなる場合の構成である。そのブロック数に対応し
て、第1〜8データ11〜18が設けられる。キャッシ
ュ管理テーブル10は、フラグ項目10aと、プロセス
ID項目10bと、キャッシュ使用優先度項目10c
と、ブロックID項目10dからなる。
FIG. 3 shows the configuration of the cache management table 10 according to the present invention. Cache management table 10
Is provided, for example, in the processor 1. The cache management table 10 has a configuration in a case where the cache memory 2 includes eight blocks. First to eighth data 11 to 18 are provided corresponding to the number of blocks. The cache management table 10 includes a flag item 10a, a process ID item 10b, and a cache use priority item 10c.
And a block ID item 10d.

【0045】フラグ項目10aは、使用中のブロックを
表す。内容"1"の場合、使用中を表す。プロセスID項
目10bは、ブロック使用中のプロセスを表す。キャッ
シュ優先度項目10cは、ブロック使用中のプロセスの
優先度を表す。ブロックID項目10dは、対応するブ
ロックを表す。
The flag item 10a indicates a block in use. When the content is "1", it indicates that the device is in use. The process ID item 10b indicates a process that is using a block. The cache priority item 10c indicates the priority of the process using the block. The block ID item 10d represents a corresponding block.

【0046】第1データ11は、ブロック0に関するデ
ータを表す。第2データ12は、ブロック1に関するデ
ータを表す。第3データ13は、ブロック2に関するデ
ータを表す。第4データ14は、ブロック3に関するデ
ータを表す。第5データ15は、ブロック4に関するデ
ータを表す。第6データ16は、ブロック5に関するデ
ータを表す。第7データ17は、ブロック6に関するデ
ータを表す。第8データ18は、ブロック7に関するデ
ータを表す。
The first data 11 represents data relating to block 0. The second data 12 represents data relating to the block 1. The third data 13 represents data on the block 2. The fourth data 14 represents data on the block 3. The fifth data 15 represents data relating to the block 4. The sixth data 16 represents data on the block 5. The seventh data 17 represents data on the block 6. The eighth data 18 represents data on the block 7.

【0047】図は、ブロック6及びブロック7が未使用
の場合を示している。未使用のブロックに関し、キャッ
シュ優先度項目10cは、例えば最も優先度の低い"25
5"を表す。
The figure shows a case where the blocks 6 and 7 are not used. For an unused block, the cache priority item 10c includes, for example, “25, which is the lowest priority”.
Represents 5 ".

【0048】ここで、図1〜図4を参照して、本発明に
係るマルチプロセス制御装置100の動作を説明する。図
4は、本発明に係るフローチャートを示す。
Here, the operation of the multi-process control device 100 according to the present invention will be described with reference to FIGS. FIG. 4 shows a flowchart according to the present invention.

【0049】図4において、マルチタスクOSが稼動
中、実行プロセスが切り替えられる場合、プロセッサ1
の制御により、稼動中の現プロセスのコンテキストが退
避領域に退避される(S1)。次に、プロセッサ1によ
り、現プロセスの終了に伴なうプロセス切り替えの発生
か否か判断される(S2)。現プロセスの終了の場合、
プロセッサ1は、キャッシュ管理テーブル10を参照
し、現プロセスに関する表示をクリアする(S3)。ス
テップS3の実行により、現プロセスが専有していたブ
ロックが開放される。
In FIG. 4, when the execution process is switched while the multitask OS is running, the processor 1
With this control, the context of the running current process is saved in the save area (S1). Next, it is determined by the processor 1 whether or not the process switching accompanying the termination of the current process has occurred (S2). For termination of the current process,
The processor 1 refers to the cache management table 10 and clears the display on the current process (S3). By executing step S3, the block occupied by the current process is released.

【0050】次に、マルチタスクOSのスケジューラ機
能により、次に実行する次期プロセスが選択される。プ
ロセッサ1は、キャッシュ管理テーブル10を参照し、
次期プロセスによるキャッシュ使用状況が判断される
(S4)。その判断は、プロセスID項目10bを参照
して実行される。次期プロセスがキャッシュメモリ2を
使用していなかった場合、プロセッサ1は、キャッシュ
管理テーブル10を参照して、未使用キャッシュブロッ
クを検出する(S5)。その検出は、使用中フラグ項目
10aを参照して実行される。未使用のキャッシュブロ
ックが存在しない場合、プロセッサ1は、キャッシュ管
理テーブル10を参照して、次期プロセスよりも低い優
先度を検出する。その検出は、キャッシュ優先度項目1
0cを参照して実行される。プロセッサ1は、次期キャ
ッシュの優先度よりも低い優先度が検出された場合、低
い優先度が設定されたプロセスが使用するブロックが開
放される処理を実行する(S6)。
Next, the next process to be executed next is selected by the scheduler function of the multitask OS. The processor 1 refers to the cache management table 10 and
The cache use status of the next process is determined (S4). The determination is made with reference to the process ID item 10b. If the next process does not use the cache memory 2, the processor 1 refers to the cache management table 10 and detects an unused cache block (S5). The detection is performed with reference to the in-use flag item 10a. If there is no unused cache block, the processor 1 refers to the cache management table 10 and detects a lower priority than the next process. The detection is performed in the cache priority item 1
0c. When a priority lower than the priority of the next cache is detected, the processor 1 executes a process of releasing a block used by a process with a lower priority set (S6).

【0051】プロセッサ1は、開放ブロックを生成する
と、次期プロセスに開放ブロックを割り当てる。即ち、
プロセッサ1は、キャッシュ管理テーブル10の開放ブ
ロックに関する項目、即ちキャッシュ使用優先度項目1
0cに、次期プロセスに関する優先度を登録し、さらに
プロセッサ1は、開放ブロックに関する項目、即ち使用
中フラグ項目10a及びプロセスID項目10bに、次
期プロセスに関するデータを登録する(S7)。その
後、プロセッサ1は、次期プロセスが使用するキャッシ
ュブロックのブロックID項目10dの値をブロックI
D部7に設定する(S8)。 そして、次期プロセスに
関するコンテキストを復帰させて(S9)、処理を終了
する。ステップS6,S7の実行中、開放されるブロッ
クに次期プロセスに係るデータが登録される処理が実行
されてもよい。この場合、次期プロセスは、キャッシュ
管理テーブル10への登録完了と同時に、キャッシュヒ
ットすることができる。
After generating the open block, the processor 1 allocates the open block to the next process. That is,
The processor 1 determines an item related to an open block in the cache management table 10, that is, a cache use priority item 1
The processor 1 registers the priority of the next process in 0c, and further registers the data of the next process in the items related to the open blocks, that is, the in-use flag item 10a and the process ID item 10b (S7). Thereafter, the processor 1 stores the value of the block ID item 10d of the cache block used by the next process in the block I.
It is set in the D section 7 (S8). Then, the context related to the next process is restored (S9), and the process ends. During the execution of steps S6 and S7, a process of registering data relating to the next process in the opened block may be executed. In this case, the next process can make a cache hit at the same time when the registration in the cache management table 10 is completed.

【0052】なお、ステップS4においてYESの判断
がなされた場合、ステップS8に処理が移行する。ステ
ップS5においてYESの判断がなされた場合、ステッ
プS7に処理が移行する。
If the determination in step S4 is YES, the process proceeds to step S8. If YES is determined in step S5, the process proceeds to step S7.

【0053】更に、ステップS6において、次期プロセ
スよりも優先度が低いプロセスが検出できなかった場
合、次期プロセスによるキャッシュメモリ2の使用が回
避される。また、次期プロセスよりも優先度が低いプロ
セスが検出できず、次期プロセスと同一の優先度のプロ
セスが検出された場合、優先度に加えて、アクセス頻度
等の情報に基づいて、ブロックを使用するプロセスが決
定される。
Further, if a process having a lower priority than the next process cannot be detected in step S6, the use of the cache memory 2 by the next process is avoided. If a process having a lower priority than the next process cannot be detected and a process having the same priority as the next process is detected, a block is used based on information such as access frequency in addition to the priority. The process is determined.

【0054】なお、本発明においては、一つのプロセス
に一つのブロックが割り当てられる、この割り当ての
際、キャッシュメモリ2の内容はクリアされない。キャ
ッシュメモリメモリ2において新たなデータの登録が実
行される際、その登録に係る領域のみが更新され、その
他の領域は、過去のデータが残される。このため、一端
ブロックを開放したプロセスが、再度、同一ブロックを
使用する際、そのブロックにより過去に登録されたデー
タが残っている可能性がある。これは、新たな登録を実
行しなければ、過去の登録状況が残るためである。この
ため、ブロックの使用再開時、キャッシュミスの頻度が
低下するという効果も得られる。
In the present invention, one block is allocated to one process. At this time, the contents of the cache memory 2 are not cleared. When new data is registered in the cache memory 2, only the area related to the registration is updated, and the other area retains past data. Therefore, when a process that has once released a block uses the same block again, there is a possibility that data registered in the past by that block remains. This is because the past registration status remains unless new registration is executed. For this reason, the effect of reducing the frequency of cache misses at the time of resuming the use of the block is also obtained.

【0055】以上説明のように、本発明によるマルチプ
ロセス制御装置は、実行プロセスの切り替えに合わせ
て、プロセスの優先度を考慮して、ブロック単位で割り
当てブロックが切り替えられる。このため、優先度の高
いプロセスがキャッシュメモリ2を使用する頻度が向上
し、結果として、優先度の高いプロセスにキャッシュミ
スが発生する頻度が低下する。
As described above, in the multi-process control device according to the present invention, the allocation block is switched in block units in consideration of the priority of the process in accordance with the switching of the execution process. For this reason, the frequency with which the high-priority process uses the cache memory 2 improves, and as a result, the frequency with which a cache miss occurs in the high-priority process decreases.

【0056】本発明において、プロセスの優先度は、プ
ロセス自身の優先度の他、キャッシュメモリのアクセス
順位を表す優先度、主記憶装置のアクセス順位を表す優
先度等に代えられてもよい。
In the present invention, the priority of a process may be replaced by the priority indicating the access order of the cache memory, the priority indicating the access order of the main storage device, or the like, in addition to the priority of the process itself.

【0057】本発明において、プロセスの優先度は、例
えばキャッシュメモリの稼動率に応じて適宜変更されて
もよい。この場合、例えばキャッシュミスが頻発するプ
ロセスの優先度が上げられ、キャッシュミスが少ないプ
ロセスの優先度が下げられる。この場合、キャッシュミ
スの頻度を統計データとして収集する機能が追加され
る。
In the present invention, the priority of a process may be appropriately changed according to, for example, the operating rate of a cache memory. In this case, for example, the priority of a process in which cache misses frequently occur is raised, and the priority of a process in which cache misses are small is lowered. In this case, a function of collecting the frequency of cache miss as statistical data is added.

【0058】また、本発明に係るマルチプロセス制御装
置は、図1に示されたダイレクトマッピング方式に限ら
ず、例えば、2ウェイ及び4ウェイ・セットアソシアテ
ィブ方式にも適用することができる。
The multi-process control device according to the present invention is not limited to the direct mapping method shown in FIG. 1, but can be applied to, for example, 2-way and 4-way set associative methods.

【0059】図5を参照して本発明に係る4ウェイ・セ
ットアソシアティブ方式の実施例について説明する。図
5は、本発明による他のマルチプロセス制御装置の概念
を示す。図に示されたマルチプロセス制御装置101に
は、4ウェイ・セットアソシアティブ方式が適用され
る。マルチプロセス制御装置101は、プロセッサ(CP
U)1と、第1〜4キャッシュメモリ21〜24と、イ
ンデックス部3と、比較器4と、セレクタ5と、主記憶
装置6と、ブロックID部7を備える。プロセッサ1
は、アクセスアドレス部1aを備える。比較器4は、第
1〜第4キャッシュメモリ21〜24に対応した4段構
成からなる。
An embodiment of the 4-way set associative system according to the present invention will be described with reference to FIG. FIG. 5 illustrates the concept of another multi-process control device according to the present invention. The four-way set associative method is applied to the multi-process control device 101 shown in FIG. The multi-process control device 101 includes a processor (CP
U) A first, fourth to fourth cache memories 21 to 24, an index unit 3, a comparator 4, a selector 5, a main storage device 6, and a block ID unit 7. Processor 1
Has an access address section 1a. The comparator 4 has a four-stage configuration corresponding to the first to fourth cache memories 21 to 24.

【0060】プロセッサ1は、マルチプロセス処理を実
行する。アクセスアドレス部1aは、主記憶装置6をア
クセスする際に参照される主記憶アドレス(アクセスア
ドレス)が格納される記憶領域である。アクセスアドレ
スの上位ビットは、経路B1を介して、第1〜4キャッ
シュメモリ21〜24及び比較器4に供給される。アク
セスアドレスの下位ビットは、経路B2を下位してイン
デックス部3に供給される。ブロックID部7の内容
は、経路B3を介してインデックス部3に供給される。
タグ部の内容は、経路B4を介して比較器4に供給され
る。データ部は、経路B5を介してセレクタに接続す
る。主記憶装置6は、経路B6を介してセレクタ5に接
続する。セレクタ5は、経路B7を介してプロセッサ1
に接続する。
The processor 1 performs multi-process processing. The access address section 1a is a storage area in which a main storage address (access address) referred to when accessing the main storage device 6 is stored. The upper bits of the access address are supplied to the first to fourth cache memories 21 to 24 and the comparator 4 via the path B1. The lower bits of the access address are supplied to the index unit 3 in the lower order of the path B2. The contents of the block ID section 7 are supplied to the index section 3 via the path B3.
The contents of the tag section are supplied to the comparator 4 via the path B4. The data section is connected to the selector via the path B5. The main storage device 6 is connected to the selector 5 via the path B6. The selector 5 is connected to the processor 1 via the path B7.
Connect to

【0061】アクセスアドレスの上位ビットは、キャッ
シュメモリに格納されたデータが有効であるかどうかの
判別に使用される。アクセスアドレスの下位ビットは、
キャッシュメモリの要素の指定に使用される。アクセス
アドレスの下位ビットは、インデックス部3において、
インデックスの下位データとして使用される。ブロック
ID部7の内容(ID)は、第1〜4キャッシュメモリ
21〜24のブロックの指定に使用される。そのID
は、インデックス部3において、インデックスの上位デ
ータとして使用される。インデックスは、キャッシュメ
モリのブロックとその要素アドレスの指定に使用され
る。
The upper bits of the access address are used to determine whether the data stored in the cache memory is valid. The lower bits of the access address are
Used to specify cache memory elements. The lower bits of the access address are
Used as lower data of the index. The contents (ID) of the block ID section 7 are used to specify blocks in the first to fourth cache memories 21 to 24. Its ID
Are used as upper data of the index in the index unit 3. The index is used to specify a block of the cache memory and its element address.

【0062】比較器4は、アクセスアドレスの上位ビッ
トの内容と、タグ部の内容を比較し、比較結果をセレク
タ5に通知する。セレクタ5は、比較器4から一致通知
を受信した場合、経路B5を有効に設定する。セレクタ
6は、比較器4から不一致通知を受信した場合、経路B
6を有効に設定する。セレクタ5は、第1〜4キャッシ
ュメモリ21〜24又は主記憶装置6をプロセッサ1に
出力する。
The comparator 4 compares the contents of the upper bits of the access address with the contents of the tag portion, and notifies the selector 5 of the comparison result. When the selector 5 receives the match notification from the comparator 4, the selector 5 sets the path B5 to valid. When the selector 6 receives the mismatch notification from the comparator 4, the selector 6
Set 6 to valid. The selector 5 outputs the first to fourth cache memories 21 to 24 or the main storage device 6 to the processor 1.

【0063】第1〜4キャッシュメモリ21〜24は、
例えば実行されるプロセスに応じて適宜選択される。ま
た、キャッシュメモリの数は、例えば実行されるプロセ
スの数に応じて、予め設定される。第1〜4キャッシュ
メモリ21〜24の数に応じて、比較器4の構成が増減
される。また、セレクタは、比較器4の出力に応じて、
経路B5を介して結合される第1〜4キャッシュメモリ
21〜24を選択する。
The first to fourth cache memories 21 to 24
For example, it is appropriately selected according to the process to be executed. The number of cache memories is set in advance according to, for example, the number of processes to be executed. The configuration of the comparator 4 is increased or decreased according to the number of the first to fourth cache memories 21 to 24. Further, the selector responds to the output of the comparator 4 by
The first to fourth cache memories 21 to 24 connected via the path B5 are selected.

【0064】マルチプロセス制御装置101の各キャッシ
ュメモリに対する処理は、先に図1〜図4を参照して説
明された処理と同一である。ここでは、第1〜4キャッ
シュメモリ21〜24の選択及びキャッシュミスが発生
した場合に主記憶装置6に結合するキャッシュメモリを
選択する処理が新たに加わる。この処理は、従来一般的
なマルチウェイ・セットアソシエイティブ方式において
実行される内容と同一である。
The processing for each cache memory of the multi-process control device 101 is the same as the processing described above with reference to FIGS. Here, a process of selecting the first to fourth cache memories 21 to 24 and selecting a cache memory to be connected to the main storage device 6 when a cache miss occurs is newly added. This process is the same as the content executed in the conventional general multi-way set associative system.

【0065】本発明によるマルチプロセス制御装置は、
キャッシュメモリを専有するプロセスの切り替えに伴な
い、優先度の高いプロセスにキャッシュミスが頻発する
事態が回避される。
The multi-process control device according to the present invention
With the switching of the process that exclusively uses the cache memory, it is possible to avoid a situation where a cache miss frequently occurs in a process with a high priority.

【0066】また、一端キャッシュメモリの専有が解か
れ、再度キャッシュメモリの専有が設定されたプロセス
は、過去にキャッシュメモリに登録されたデータにキャ
ッシュヒットする場合が発生するため、キャッシュメモ
リの専有開始時、キャッシュミスを繰り返す事態が回避
される。
Further, a process in which the exclusive use of the cache memory is once released and the exclusive use of the cache memory is set again causes a cache hit to data registered in the cache memory in the past. At this time, the situation of repeating cache miss is avoided.

【0067】また、稼動するプロセスが増大した場合、
優先度を表す値を調整することで、個々のプロセスの優
先度に差をつけることができる。この場合、回路規模の
増大等の負担が発生しない。
When the number of running processes increases,
By adjusting the value indicating the priority, the priority of each process can be made different. In this case, a burden such as an increase in circuit scale does not occur.

【0068】また、プロセス毎にキャッシュメモリの使
用の可否が設定される場合、キャッシュメモリが空いて
いるにもかかわらず、キャッシュメモリを専有できない
プロセスが発生する。本発明においては、優先度でキャ
ッシュメモリを専有する順位が設定されるため、優先度
の低いプロセスであっても、キャッシュメモリが空いて
いれば、キャッシュメモリを専有でき、実行効率を向上
させることができる。
When the availability of the cache memory is set for each process, a process occurs in which the cache memory cannot be occupied even though the cache memory is empty. In the present invention, since the order in which the cache memory is occupied is set according to the priority, even if the process has a low priority, the cache memory can be occupied if the cache memory is free, and the execution efficiency can be improved. Can be.

【0069】キャッシュメモリの専有解除は、キャッシ
ュメモリ管理テーブルの内容をクリアする操作のみで実
行される。このため、キャッシュメモリの専有解除及び
専有設定と同時に、キャッシュメモリに新たなプロセス
に係る主記憶のデータを登録することができる。この場
合、新たなプロセスのキャッシュミスを防止することが
できる。
The release of the exclusive use of the cache memory is executed only by the operation of clearing the contents of the cache memory management table. For this reason, the data of the main memory relating to the new process can be registered in the cache memory at the same time as the exclusive release of the cache memory and the exclusive setting. In this case, a cache miss of a new process can be prevented.

【0070】[0070]

【発明の効果】本発明によるマルチプロセス制御装置及
びマルチプロセス制御方法は、優先度が設定された複数
プロセスによるキャッシュメモリの利用効率の低下及び
キャッシュヒット率の低下を回避することができる。こ
のため、優先度の高いプロセスの実行速度がキャッシュ
メモリに係る処理のために低下する事態が回避される。
According to the multi-process control apparatus and the multi-process control method of the present invention, it is possible to avoid a decrease in the use efficiency of the cache memory and a decrease in the cache hit rate due to a plurality of processes for which priorities are set. For this reason, it is possible to avoid a situation where the execution speed of the process with a high priority is reduced due to the processing related to the cache memory.

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

【図1】図は、本発明によるマルチプロセス制御装置の
概念図である。
FIG. 1 is a conceptual diagram of a multi-process control device according to the present invention.

【図2】図は、本発明に係るインデックスの概念図であ
る。
FIG. 2 is a conceptual diagram of an index according to the present invention.

【図3】図は、本発明に係るキャッシュ管理テーブルの
構成図である。
FIG. 3 is a configuration diagram of a cache management table according to the present invention.

【図4】図は、本発明に係るフローチャートである。FIG. 4 is a flowchart according to the present invention.

【図5】図は、本発明に係る他のマルチプロセス制御装
置の概念図である。
FIG. 5 is a conceptual diagram of another multi-process control device according to the present invention.

【図6】図は、一般的なキャッシュメモリのアクセス概
念図である。
FIG. 6 is an access conceptual diagram of a general cache memory.

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

1:プロセッサ 2:キャッシュメモリ 2a:タグ部 2b:データ部 3:インデックス部 4:比較器 5:セレクタ 6:主記憶装置 7:ブロックID部 10:キャッシュ管理テーブル 1: Processor 2: Cache memory 2a: Tag section 2b: Data section 3: Index section 4: Comparator 5: Selector 6: Main storage device 7: Block ID section 10: Cache management table

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 優先度が設定された複数のプロセスを管
理するプロセッサと、 前記複数のプロセスに共有される主記憶装置と、 前記主記憶装置のデータが複写され、且つ、前記複数の
プロセスに専有される複数のブロックからなるキャッシ
ュメモリと、 前記複数のブロック毎に、前記ブロックを専有する前記
プロセスを表し、且つ、前記ブロックを専有する前記プ
ロセスの前記優先度を表すキャッシュ管理テーブルを備
え、 前記プロセッサは、前記キャッシュ管理テーブルが表す
前記優先度よりも高い新たなプロセスのキャッシュミス
が発生した場合、前記優先度の前記何れかのプロセスに
よる前記ブロックの専有を解除し、前記新たなプロセス
による前記ブロックの専有を設定するマルチプロセス制
御装置。
1. A processor for managing a plurality of processes for which priorities have been set; a main storage device shared by the plurality of processes; data in the main storage device being copied; A cache memory composed of a plurality of occupied blocks; and a cache management table representing, for each of the plurality of blocks, the process occupying the block, and indicating the priority of the process occupying the block. When a cache miss of a new process higher than the priority indicated by the cache management table occurs, the processor releases the exclusive use of the block by any of the processes of the priority and executes the process by the new process. A multi-process control device for setting exclusive use of the block.
【請求項2】 請求項1に記載のマルチプロセス制御装
置において、 前記プロセッサは、前記解除を実行したとき、専有が解
除された前記ブロックの内容を維持し、且つ、専有が解
除された前記ブロックへの新たな登録が発生したときに
前記登録に係る領域のみを更新するマルチプロセス制御
装置。
2. The multi-process control device according to claim 1, wherein, when the release is executed, the processor maintains the contents of the block whose exclusive use has been released, and the block whose exclusive use has been released. A multi-process control device that updates only an area related to the registration when a new registration occurs in the multi-process control apparatus.
【請求項3】 請求項1又は2に記載のマルチプロセス
制御装置において、 前記プロセッサが前記キャッシュメモリを参照する際に
発生するインデックスは、前記ブロックを特定するブロ
ックIDと、前記ブロック中の所定の領域を特定する要
素アドレスからなるマルチプロセス制御装置。
3. The multi-process control device according to claim 1, wherein an index generated when the processor refers to the cache memory includes a block ID specifying the block, and a predetermined ID in the block. A multi-process control device consisting of element addresses that specify an area.
【請求項4】 請求項1乃至3の何れか一項に記載のマ
ルチプロセス制御装置において、 前記優先度は、前記プロセスの動作優先度を表すマルチ
プロセス制御装置。
4. The multi-process control device according to claim 1, wherein the priority indicates an operation priority of the process.
【請求項5】 請求項1乃至3の何れか一項に記載のマ
ルチプロセス制御装置において、 前記優先度は、前記プロセスのキャッシュメモリアクセ
ス優先度を表すマルチプロセス制御装置。
5. The multi-process control device according to claim 1, wherein the priority indicates a cache memory access priority of the process.
【請求項6】 請求項1乃至3の何れか一項に記載のマ
ルチプロセス制御装置において、 前記優先度は、前記プロセスの主記憶装置アクセス優先
度を表すマルチプロセス制御装置。
6. The multi-process control device according to claim 1, wherein the priority indicates a main storage device access priority of the process.
【請求項7】 稼動する複数のプロセスに優先度が設定
され、 前記キャッシュメモリを専有する前記プロセス及び前記
プロセスの優先度がキャッシュ管理テーブルに登録さ
れ、 前記キャッシュメモリをアクセスする新たなプロセスが
発生した場合、前記キャッシュ管理テーブルを参照して
前記新たなプロセスの前記優先度よりも低い優先度の何
れかのプロセスを検出し、 前記何れかのプロセスに係る前記キャッシュ管理テーブ
ルへの登録に代えて前記新たなプロセスに係る登録が実
行され、 前記何れかのプロセスに代えて前記新たなプロセスが前
記キャッシュメモリを占有するマルチプロセス制御方
法。
7. A priority is set for a plurality of running processes, the process exclusively occupying the cache memory and the priority of the process are registered in a cache management table, and a new process for accessing the cache memory is generated. In this case, referring to the cache management table, any process having a lower priority than the priority of the new process is detected, and instead of registering any of the processes in the cache management table, A multi-process control method in which registration relating to the new process is executed, and the new process occupies the cache memory instead of any of the processes.
【請求項8】 請求項5に記載のマルチプロセス制御方
法において、 前記何れかのプロセスが専有していた前記キャッシュメ
モリの登録領域の内容は、前記新たなプロセスによる新
たな登録により更新されるまで維持されるマルチプロセ
ス制御方法。
8. The multi-process control method according to claim 5, wherein the contents of the registration area of the cache memory occupied by any of the processes are updated by new registration by the new process. Multi-process control method maintained.
【請求項9】 請求項7又は8に記載のマルチプロセス
制御方法において、 前記新たなプロセスに係る前記キャッシュ管理テーブル
の更新が実行されるとき、前記新たなプロセスに係るデ
ータが前記キャッシュメモリに登録されるマルチプロセ
ス制御方法。
9. The multi-process control method according to claim 7, wherein when updating of the cache management table relating to the new process is performed, data relating to the new process is registered in the cache memory. Multi-process control method.
JP2000105370A 2000-04-06 2000-04-06 Device and method for controlling multiprocess Pending JP2001290704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000105370A JP2001290704A (en) 2000-04-06 2000-04-06 Device and method for controlling multiprocess

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000105370A JP2001290704A (en) 2000-04-06 2000-04-06 Device and method for controlling multiprocess

Publications (1)

Publication Number Publication Date
JP2001290704A true JP2001290704A (en) 2001-10-19

Family

ID=18618745

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000105370A Pending JP2001290704A (en) 2000-04-06 2000-04-06 Device and method for controlling multiprocess

Country Status (1)

Country Link
JP (1) JP2001290704A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100953986B1 (en) 2008-08-26 2010-04-21 재단법인서울대학교산학협력재단 Method and apparatus for utilizing latency of cache miss using priority based excution
JP2011008315A (en) * 2009-06-23 2011-01-13 Internatl Business Mach Corp <Ibm> Method for controlling cache
JP2012181910A (en) * 2003-11-10 2012-09-20 Panasonic Corp Reproduction device, program, and reproduction method
JP2015036959A (en) * 2013-08-16 2015-02-23 富士通株式会社 Cache memory control program, processor including cache memory, and cache memory control method
JP2015172897A (en) * 2014-03-12 2015-10-01 日本電気株式会社 Buffer cache management device, buffer cache management method, and buffer cache management program
JP2020514868A (en) * 2017-01-13 2020-05-21 エイアールエム リミテッド Memory division
CN113938441A (en) * 2021-10-15 2022-01-14 南京金阵微电子技术有限公司 Data caching method, resource allocation method, cache, medium and electronic device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012181910A (en) * 2003-11-10 2012-09-20 Panasonic Corp Reproduction device, program, and reproduction method
KR100953986B1 (en) 2008-08-26 2010-04-21 재단법인서울대학교산학협력재단 Method and apparatus for utilizing latency of cache miss using priority based excution
JP2011008315A (en) * 2009-06-23 2011-01-13 Internatl Business Mach Corp <Ibm> Method for controlling cache
US8484423B2 (en) 2009-06-23 2013-07-09 International Business Machines Corporation Method and apparatus for controlling cache using transaction flags
JP2015036959A (en) * 2013-08-16 2015-02-23 富士通株式会社 Cache memory control program, processor including cache memory, and cache memory control method
JP2015172897A (en) * 2014-03-12 2015-10-01 日本電気株式会社 Buffer cache management device, buffer cache management method, and buffer cache management program
JP2020514868A (en) * 2017-01-13 2020-05-21 エイアールエム リミテッド Memory division
JP7265478B2 (en) 2017-01-13 2023-04-26 アーム・リミテッド memory division
CN113938441A (en) * 2021-10-15 2022-01-14 南京金阵微电子技术有限公司 Data caching method, resource allocation method, cache, medium and electronic device

Similar Documents

Publication Publication Date Title
US5535361A (en) Cache block replacement scheme based on directory control bit set/reset and hit/miss basis in a multiheading multiprocessor environment
JP3705836B2 (en) Memory sharing method for computer system
US7533227B2 (en) Method for priority scheduling and priority dispatching of store conditional operations in a store queue
EP0239181B1 (en) Interrupt requests serializing in a virtual memory data processing system
JP2002373115A (en) Replacement control method for shared cache memory and device therefor
JPH1185618A (en) Method for controlling virtual memory conversion
JP3900025B2 (en) Hit determination control method for shared cache memory and hit determination control method for shared cache memory
CN102597972B (en) virtual computer system, area management method
US8266379B2 (en) Multithreaded processor with multiple caches
JP2001290704A (en) Device and method for controlling multiprocess
WO2024045817A1 (en) Method for scheduling returned data of simt architecture processor, and corresponding processor
JPH07248967A (en) Memory control system
JP2005339299A (en) Method for cache control of storage device
JPH1173365A (en) Method for optimizing data moving operation
EP1103898A2 (en) Microprocessor and memory
US6857046B1 (en) Caching for context switching applications
US8452920B1 (en) System and method for controlling a dynamic random access memory
JPH11312092A (en) Method for switching task and data processor
JP2000047942A (en) Device and method for controlling cache memory
JP2746189B2 (en) File access control system
JP3331592B2 (en) Cache memory
JPH10254775A (en) Memory controller having common cache memory
JP2005071141A (en) Method and device for managing stack and stack management program
JPH06348596A (en) Cache memory system and method and system for cache memory access
JP3772003B2 (en) Memory management system and data management method

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040302