JPH08241248A - Cache memory consistency holding method and information processor - Google Patents

Cache memory consistency holding method and information processor

Info

Publication number
JPH08241248A
JPH08241248A JP7043090A JP4309095A JPH08241248A JP H08241248 A JPH08241248 A JP H08241248A JP 7043090 A JP7043090 A JP 7043090A JP 4309095 A JP4309095 A JP 4309095A JP H08241248 A JPH08241248 A JP H08241248A
Authority
JP
Japan
Prior art keywords
cache
contents
processing
cache area
writing
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
JP7043090A
Other languages
Japanese (ja)
Inventor
Takashi Imada
敬 今田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP7043090A priority Critical patent/JPH08241248A/en
Publication of JPH08241248A publication Critical patent/JPH08241248A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To perform the write of contents held in a cache into a main storage and the update processing of the cache in parallel. CONSTITUTION: In the information processor which intermittently performs the synchronous processing to synchronize contents of the cache and those of the main storage, the cache is provided with plural cache areas 8 for data storage, and each cache area 8 is provided with a cache memory 10, where data is stored in item units based on item state data indicating the state of each item, and a controller 9 which controls the cache memory 10 by items. One cache area 8 is used to write the change contents in the main storage, and the other cache areas are used for the change of contents of the cache which is executed during the processing of write of change contents to the main storage, thus performing the synchronous processing and the update processing of the cache in parallel.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、キャッシュを具備した
情報処理装置であって、変更のあったキャッシュの内容
を主記憶へ書き込む処理を一定の条件下でのみ行なう情
報処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus having a cache, which performs a process of writing the contents of a changed cache to a main memory only under a certain condition.

【0002】[0002]

【従来の技術】従来、キャッシュを具備する情報処理装
置において、キャッシュと主記憶に記憶された内容の同
期を取る方式としては、第1に、通常はキャッシュにの
み更新を行ない、一定の条件の下でのみ間欠的にキャッ
シュと主記憶との内容の同期を取る制御方法と、第2
に、常にキャッシュと主記憶との内容の同期の処理を行
なう制御方法がある。
2. Description of the Related Art Conventionally, in an information processing apparatus having a cache, as a method of synchronizing the contents stored in the cache and the main memory, firstly, normally, only the cache is updated, and a certain condition is satisfied. A control method for intermittently synchronizing the contents of the cache and the main memory only below;
There is a control method for always synchronizing the contents of the cache and the main memory.

【0003】第1の制御方法において、間欠的にキャッ
シュと主記憶との内容の同期を行なう条件としては、キ
ャッシュに保持できる容量を超えてキャッシュへデータ
を保持する要求が生じた場合や、マルチプロセッサ構成
で他データ処理ユニットによる同一領域に対するキャッ
シュの内容の変更の要求が生じた場合や、高信頼性を要
求される情報処理装置で故障が生じた際に処理の再開を
行なうために、ある時点でのデータ処理ユニットの状態
をキャッシュを含めて主記憶に保持する制御の下での、
キャッシュと主記憶との内容の同期を取る要求などが挙
げられる。
In the first control method, the conditions for intermittently synchronizing the contents of the cache and the main memory are that there is a request to hold data in the cache beyond the capacity that can be held in the cache, It is provided to restart the processing when a request to change the cache content for the same area is made by another data processing unit in the processor configuration or when a failure occurs in the information processing apparatus that requires high reliability. Under the control of holding the state of the data processing unit at the time point in the main memory including the cache,
Examples include a request for synchronizing the contents of the cache and the main memory.

【0004】第1の制御方法は、常にキャッシュと主記
憶との同期を取る第2の制御方法に較べ、キャッシュ上
で頻繁に更新される項目が存在する場合に主記憶への書
き込み回数が減り、主記憶への書き込みの時間が短縮で
きるため、情報処理装置の性能が向上する。
The first control method reduces the number of times of writing to the main memory when there is an item that is frequently updated in the cache, as compared with the second control method in which the cache and the main memory are always synchronized. Since the time for writing to the main memory can be shortened, the performance of the information processing device is improved.

【0005】[0005]

【発明が解決しようとする課題】従来の方式では、キャ
ッシュと主記憶との同期の処理の必要が生じた場合、キ
ャッシュの必要な項目の主記憶への更新が全て終了しな
いと、新たにキャッシュへの操作を開始することができ
ない。
In the conventional method, when it becomes necessary to synchronize the cache with the main memory, all the necessary items in the cache must be updated to the main memory before a new cache is created. Unable to start the operation to.

【0006】このため、同期を取る処理が終了するまで
キャッシュを操作するデータ処理ユニットでは処理が全
く行なえなくなる。特に、キャッシュと主記憶との同期
の処理が頻繁に発生する場合には、情報処理装置の性能
が著しく低下してしまう。
Therefore, the data processing unit that operates the cache cannot perform any processing until the synchronization processing is completed. In particular, when the cache and the main memory are frequently synchronized with each other, the performance of the information processing apparatus is significantly deteriorated.

【0007】本発明は前記のような事情を考慮してなさ
れたもので、キャッシュと主記憶との内容の同期を取る
処理を一定の条件下でのみ間欠的に行なう情報処理装置
において、キャッシュに保持された内容の主記憶への書
き込みとキャッシュへの更新処理を並列的に行なうこと
を可能にすることにより、情報処理装置の性能を向上さ
せることが可能なキャッシュメモリ一貫性保持方法を提
供することを目的とする。
The present invention has been made in consideration of the above circumstances, and in an information processing apparatus for intermittently performing the processing for synchronizing the contents of the cache and the main memory only under a certain condition, (EN) A cache memory coherency holding method capable of improving the performance of an information processing apparatus by enabling writing of held contents to a main memory and updating processing to a cache in parallel. The purpose is to

【0008】[0008]

【課題を解決するための手段及び作用】[Means and Actions for Solving the Problems]

(1) データ処理ユニットごとにキャッシュ領域を二
個以上保持させ、これらをバス結合など効率的な同報通
信が可能な通信路により接続する。二個以上のキャッシ
ュ領域の一つを正のキャッシュ領域とし、他のキャッシ
ュ領域を副のキャッシュ領域とする。項目の更新は全て
のキャッシュ領域に同時に行なう。但し、正のキャッシ
ュ領域へは、データの更新とともにこのキャッシュの項
目の更新を行なったことを示すフラグをセットするが、
それ以外のキャッシュ領域にはこのフラグをセットしな
い。正のキャッシュ領域以外のキャッシュ領域で更新を
行なったことを示すフラグをセットしないことにより、
これらの領域が後に正のキャッシュ領域として使用され
た際に、キャッシュと主記憶との内容の同期を取る必要
が生じた場合に、不要な主記憶への書き込みを行なうこ
とを禁止する。キャッシュの内容を主記憶に書き込む処
理が行なわれる度に、キャッシュ領域を環状に正のキャ
ッシュ領域を割り当てながら使用する。
(1) Two or more cache areas are held for each data processing unit, and these are connected by a communication path capable of efficient broadcast communication such as bus connection. One of the two or more cache areas is a positive cache area, and the other cache areas are secondary cache areas. Items are updated in all cache areas at the same time. However, in the positive cache area, a flag indicating that this cache item has been updated along with the data update is set,
This flag is not set in other cache areas. By not setting the flag indicating that the update was done in the cache area other than the positive cache area,
When these areas are later used as a positive cache area, unnecessary writing to the main memory is prohibited when it becomes necessary to synchronize the contents of the cache and the main memory. Each time the process of writing the contents of the cache to the main memory is performed, the cache area is circularly used while allocating a positive cache area.

【0009】以下で同期中のキャッシュ領域とは、キャ
ッシュと主記憶との内容の同期を取るための処理の下に
あるキャッシュ領域のことを指すものとする。キャッシ
ュと主記憶との内容の同期を取る必要が生じた際には、
正のキャッシュ領域を同期中のキャッシュ領域とし、更
新のあったキャッシュの内容を主記憶へ書き込む処理を
開始する。今まで副であったキャッシュ領域で環状の順
序で次に正のキャッシュ領域となる順序に割り当てられ
たキャッシュ領域を正のキャッシュ領域とする。同期中
のキャッシュ領域では、同期の処理開始後に更新のあっ
たキャッシュの項目については、更新のあったキャッシ
ュの内容を主記憶へ書き込む処理が終了した際に有効に
するための、更新のあったキャッシュの内容を主記憶へ
書き込む処理を行なっている間は無視されるキャッシュ
項目の無効化を示すフラグをセットする。更新のあった
キャッシュの内容の主記憶への書き込みの処理が終了し
た時点で、同期中のキャッシュ領域で、同期中には無視
されるキャッシュ項目の無効化を示すフラグがセットさ
れた項目を実際に無効化し、同期中のキャッシュ領域で
あったキャッシュ領域を副のキャッシュ領域とし、この
キャッシュ領域に対しても、他の副のキャッシュ領域と
同時の書き込みを再開する。
In the following, the cache area being synchronized refers to the cache area under the processing for synchronizing the contents of the cache and the main memory. When it becomes necessary to synchronize the contents of the cache and main memory,
The positive cache area is set as the synchronizing cache area, and the processing of writing the updated cache contents to the main memory is started. A cache area that has been assigned as a secondary cache area in the order of the next positive cache area in the circular order is defined as a positive cache area. In the cache area during synchronization, items in the cache that were updated after the start of synchronization processing were updated to enable them when the processing of writing the updated cache contents to main memory was completed. A flag indicating invalidation of a cache item which is ignored during the process of writing the contents of the cache to the main memory is set. When the processing of writing the contents of the updated cache to the main memory is completed, the cache area that is being synced will actually see the items for which the flag indicating the invalidation of cache items that are ignored during synchronization is set. Then, the cache area that was the synchronizing cache area is set as a secondary cache area, and writing to this cache area is resumed simultaneously with other secondary cache areas.

【0010】キャッシュと主記憶との内容の同期を取る
処理を開始する際には、正のキャッシュ領域以外のキャ
ッシュ領域に、以前にキャッシュの内容を主記憶に書き
込む処理をしていたために更新することができなかった
項目が存在するかどうかを調べ、存在する場合には、正
であるキャッシュ領域の該当する項目全てを正でないキ
ャッシュ領域の該当する項目に複写してから、同期の処
理を開始する。これにより、次に正のキャッシュ領域と
なるキャッシュ領域が最新のキャッシュの状態を保持で
きる。
When the process of synchronizing the contents of the cache and the main memory is started, the contents of the cache are written to the main memory in a cache area other than the positive cache area, so that the update is updated. Check whether there is any item that could not be processed, and if there is, copy all the corresponding items in the positive cache area to the corresponding items in the non-positive cache area, and then start the synchronization process. To do. As a result, the cache area which becomes the next positive cache area can hold the latest cache state.

【0011】以上により、キャッシュと主記憶との内容
の同期を取る処理が必要となった際に、この同期を取る
処理が終了するまで、新たにキャッシュの更新を行なう
処理を開始することを待つ必要が無くなり、新たなキャ
ッシュの更新を即座に開始することにより時間的な短縮
が行なえる。
As described above, when the process of synchronizing the contents of the cache and the main memory is needed, the process waits until the process of newly updating the cache is started until the process of synchronizing the contents is completed. There is no need, and the time can be shortened by starting a new cache update immediately.

【0012】さらに、キャッシュ領域が、過去に更新の
あったキャッシュの内容を主記憶へ書き込む処理を行な
っている最中であったなどの理由により、更新が行なわ
れなかった項目を保持する場合も、複数のキャッシュ領
域が存在することで、キャッシュ内容の主記憶への書き
込みの処理が終了後再びその項目が更新されることで新
たな更新の内容を反映して、他のキャッシュ領域のデー
タを複写が必要となる可能性が減少する。
Further, in the case where the cache area holds an item which has not been updated due to the reason that the cache content which has been updated in the past is being written to the main memory, or the like. , When there are multiple cache areas, the item is updated again after the processing of writing the cache contents to the main memory is finished, and the new update contents are reflected, and the data in other cache areas are Reduces the likelihood of duplication.

【0013】(2) 前述した(1)において、以下の
点を変更する。同期中のキャッシュ領域で、同期の処理
開始後に更新のあったキャッシュの項目について、その
項目に変更を行なったことを示すフラグがセットされて
おり、同期処理により主記憶に対して書き込みを行なう
必要がある項目である場合のみ、更新のあったキャッシ
ュの内容を主記憶へ書き込む処理が終了した際に有効に
するための、更新のあったキャッシュの内容を主記憶へ
書き込む処理を行なっている間は無視されるキャッシュ
項目の無効化を示すフラグをセットする。その項目に変
更を行なったことを示すフラグがセットされていないな
らば、副のキャッシュ領域と同じく、項目の変更を行な
う。
(2) In the above (1), the following points are changed. In the cache area during synchronization, a flag indicating that the item has been changed has been set for the cache item that has been updated after the synchronization process has started, and it is necessary to write to the main memory by the synchronization process. Only when it is an item, while performing the process of writing the updated cache contents to the main memory so that it becomes effective when the process of writing the updated cache contents to the main memory is completed. Sets a flag indicating invalidation of ignored cache items. If the flag indicating that the item has been changed is not set, the item is changed as in the sub cache area.

【0014】以上により、同期中のキャッシュ領域にお
いては、キャッシュへの更新に際して、同期中のキャッ
シュ領域の、同期中のキャッシュ領域が正のキャッシュ
領域であった際のキャッシュへの更新が行なわれた項目
であるため主記憶への書き込みを行なう必要がある項目
ではない項目については、副のキャッシュ領域に対して
と同一の処理を行なうことが可能になる。これにより高
速化が可能になる。
As described above, in the cache area being synchronized, when updating the cache, the cache area being synchronized was updated to the cache when the cache area being synchronized was a positive cache area. For items that are not items that need to be written to the main memory because they are items, it is possible to perform the same processing as for the sub cache area. This enables speeding up.

【0015】また、同期処理終了後に、更新のあったキ
ャッシュの内容を主記憶へ書き込む処理を行なっていた
ために保持されていない項目を他のキャッシュ領域から
複写する必要が生じる可能性があるが、請求項第2項に
より、同期処理開始前に変更のなかった項目について
は、この複写の必要がなくなる。これにより、(1)よ
り早く同期処理を開始することが可能となる。
Further, after the synchronous process is completed, it is necessary to copy the items that are not held because the process of writing the updated cache contents to the main memory is performed from another cache area. According to the second aspect, it is not necessary to copy the items that have not been changed before the start of the synchronization processing. This makes it possible to start the synchronization processing earlier than (1).

【0016】(3) 前述した(1)または(2)の構
成で、キャッシュと主記憶との内容の同期を取る処理が
終了する前に、さらにキャッシュと主記憶との内容の同
期を取る処理が必要になった場合で、副のキャッシュ領
域が1つ以上存在する場合、まず、これまでの正のキャ
ッシュ領域の環状の割当の順序で次の順序のキャッシュ
領域を正のキャッシュ領域とする。これまで正であった
キャッシュ領域に対しては、キャッシュへの更新が行な
われた際、更新のあった項目を主記憶へ書き込む処理以
外は同期中のキャッシュ領域に対しての処理と同一の処
理を行なう。この処理を、これまで正であったキャッシ
ュ領域に対して、現在キャッシュと主記憶との内容の同
期を取る処理を行なっているキャッシュ領域が同期の処
理を終了するまで行なう。以下、これまで正であったキ
ャッシュ領域へ行なう以上の処理を、同期待ちの処理と
呼び、同期待ちの処理を行なっているキャッシュ領域
を、同期待ち中のキャッシュ領域と呼ぶ。同期を行なっ
ていたキャッシュ領域が同期の処理を終えた後に、同期
待ち中のキャッシュ領域を同期中のキャッシュ領域とし
て使用して、キャッシュと主記憶との同期を取る処理を
開始する。ここで、同期待ちの処理中にセットされた、
更新のあったキャッシュの内容を主記憶へ書き込む処理
が終了するまでは無視される無効化フラグは、同期を取
る処理においてセットされたものと同等に扱う。
(3) With the above-mentioned configuration (1) or (2), before the processing of synchronizing the contents of the cache and the main memory is completed, the processing of further synchronizing the contents of the cache and the main memory. When it becomes necessary and there is one or more secondary cache areas, first, the next cache area in the circular allocation order of the positive cache areas is set as the positive cache area. For the cache area that was positive until now, when the cache is updated, the same processing as the processing for the synchronizing cache area except the processing of writing the updated item to the main memory Do. This processing is performed until the cache area, which is currently performing the processing for synchronizing the contents of the cache and the main memory with respect to the cache area which has been positive until now, completes the synchronization processing. Hereinafter, the above-described processing for the cache area that has been positive until now is referred to as synchronization waiting processing, and the cache area performing the synchronization waiting processing is referred to as the synchronization waiting cache area. After the synchronous cache area finishes the synchronous processing, the synchronous cache area is used as the synchronous cache area, and the processing for synchronizing the cache and the main memory is started. Here, it was set during the process of waiting for synchronization,
The invalidation flag, which is ignored until the process of writing the updated cache contents to the main memory is completed, is treated in the same way as that set in the process of synchronizing.

【0017】キャッシュと主記憶との内容の同期を取る
処理が終了する前に、さらにキャッシュと主記憶との内
容の同期を取る処理が必要になった場合で、副のキャッ
シュ領域が存在しない場合は、キャッシュと主記憶との
内容の同期を取る処理が終了するまでキャッシュへの更
新を停止する。
When the process of synchronizing the contents of the cache and the main memory is required before the process of synchronizing the contents of the cache and the main memory is completed, and the sub cache area does not exist. Stops updating the cache until the process of synchronizing the contents of the cache and the main memory is completed.

【0018】特に(1)(2)の方法を拡張する場合、
キャッシュと主記憶との内容の同期を取る処理を開始す
る際、および、同期待ちの処理を開始する際には、環状
の割り当ての順序で次に正のキャッシュ領域となるキャ
ッシュ領域に、以前にキャッシュと主記憶との内容の同
期を取る処理、または、同期待ちの処理のいずれかを行
なっていたために、更新することができなかった項目が
存在するかどうかを調べる。そのような項目が存在する
場合には、正であるキャッシュ領域の該当する項目を全
ての副のキャッシュ領域の該当する項目に同時に複写を
行なってから、同期の処理を開始する。これにより、次
に正となるキャッシュ領域が最新のキャッシュの状態を
保持できる。副のキャッシュ領域全てに該当する項目へ
の複写を行なうのは、副のキャッシュ領域でこの条件に
該当する項目を持つキャッシュ領域は、次に正になるべ
きキャッシュ領域が同期の処理を行なっていた際に同期
待ちの処理を行なっていたキャッシュ領域であり、さら
に次以降に正になるべきキャッシュ領域と一致するため
である。これにより、以降に必要となるキャッシュの内
容の複写を防ぐことができる。
In particular, when expanding the methods (1) and (2),
When starting the process of synchronizing the contents of the cache and the main memory, and when starting the process of waiting for the synchronization, the cache area, which becomes the next positive cache area in the circular allocation order, is previously stored. It is checked whether or not there is an item that cannot be updated because either the process of synchronizing the contents of the cache and the main memory or the process of waiting for synchronization is being performed. If such an item exists, the corresponding item in the positive cache area is simultaneously copied to the corresponding item in all the sub cache areas, and then the synchronization process is started. As a result, the next positive cache area can hold the latest cache state. Copying to items that correspond to all of the sub cache areas is performed because the cache area that has items that meet this condition in the sub cache area is the cache area that should be the next positive. This is because it is the cache area that has been subjected to the synchronization waiting process at that time, and further coincides with the cache area that should become positive after the next. As a result, it is possible to prevent copying of the cache contents, which is required thereafter.

【0019】以上により、具備しているキャッシュ領域
の個数から1を減じた個数だけ、キャッシュと主記憶と
の内容の同期の処理を同時に制御することが可能とな
り、キャッシュ領域の個数の制限内で、キャッシュへの
操作を停止することなく、キャッシュと主記憶との同期
処理を行なうことができる。
As described above, it becomes possible to simultaneously control the processing of synchronizing the contents of the cache and the main memory by the number obtained by subtracting 1 from the number of cache areas provided, and within the limit of the number of cache areas. , The cache and the main memory can be synchronized without stopping the operation to the cache.

【0020】また、(2)の方法を採用する場合、同期
中のキャッシュ領域のみでなく同期待ち中のキャッシュ
領域についても、キャッシュへの更新に際して、主記憶
へ書き込みを行なう必要のない項目について可能となっ
た処理の簡略化の特徴を有する。
Further, when the method (2) is adopted, not only the cache area in synchronization but also the cache area waiting for synchronization can be applied to the items which do not need to be written to the main memory when updating to the cache. Has the feature of simplifying the processing.

【0021】(4) (3)の構成で、キャッシュの制
御を、キャッシュの更新を直接反映させるキャッシュ領
域で保持する最大の項目数をキャッシュ上に物理的に保
持することができる最大の個数の項目数の半分以下とす
るキャッシュの制御に置き換える。すなわち、(3)と
同一のキャッシュ容量を維持するためには、各キャッシ
ュ領域の物理的な容量を倍以上にする必要がある。
(4) With the configuration of (3), the maximum number of items held in the cache area that directly reflects the update of the cache is the maximum number of items that can be physically held in the cache. Replace with a cache control that keeps the number of items to half or less. That is, in order to maintain the same cache capacity as (3), the physical capacity of each cache area must be doubled or more.

【0022】キャッシュの内容と主記憶との同期を取る
処理が開始した後は、同期中のキャッシュ領域に対して
は、キャッシュへの変更が生じた際には、更新のあった
キャッシュの内容を主記憶へ書き込み処理を行なってい
る間は無視されるキャッシュ項目の無効化を示すフラグ
をセットすると同時に、キャッシュ領域の物理的な最大
量を上限として使用して、他の副のキャッシュ領域に行
なわれる項目の変更と同一の変更を行なう。
After the process of synchronizing the contents of the cache with the main memory is started, the contents of the cache that have been updated are updated to the cache area being synchronized when a change to the cache occurs. While writing to the main memory, set a flag indicating invalidation of cache items that are ignored, and at the same time, use the physical maximum amount of the cache area as an upper limit and perform it on other sub cache areas. Make the same changes that you make to the items listed.

【0023】以上により、同期中のキャッシュ領域にお
いても、キャッシュの更新を受け付けることが可能にな
り、全てのキャッシュ領域が単体で最新のキャッシュの
内容を保持することが可能になる。これによって、キャ
ッシュの内容と主記憶との同期の処理を開始する際に、
(1)(2)(3)で生じうる、最新のキャッシュの内
容を他のキャッシュ領域から複写する必要があるかどう
かを調べる処理と、実際に複写する処理による時間的な
遅れを解消することができる。また、(3)で必要な次
に正となるキャッシュ領域への複写の必要がないため、
副のキャッシュ領域が一つもない状態でも、正のキャッ
シュ領域をキャッシュの内容と主記憶の同期の処理を待
つ状態にすることが可能である。
As described above, the cache update can be accepted even in the synchronized cache area, and all the cache areas can individually hold the latest cache contents. As a result, when starting the process of synchronizing the cache contents with the main memory,
(1) To eliminate the time delay due to the process of checking whether the latest cache contents need to be copied from another cache area and the actual copying process that may occur in (2) and (3). You can Also, since it is not necessary to copy to the next positive cache area required in (3),
Even if there is no sub cache area, it is possible to put the positive cache area into a state of waiting for the processing of synchronizing the cache contents and the main memory.

【0024】(5) 以下、副のキャッシュ領域がキャ
ッシュへの更新を自キャッシュ領域に反映させる処理を
通常の書き込みと呼び、同期中のキャッシュ領域が更新
の内容を受け取る処理を拡張した書き込みと呼ぶことに
する。(3)の構成で、各キャッシュ領域に、さらに同
容量の拡張したキャッシュメモリを設ける。キャッシュ
領域の制御部は、キャッシュ領域中の項目ごとに、元の
キャッシュメモリと拡張したキャッシュメモリとの二つ
を、通常の書き込みに使用するか拡張した書き込みに使
用するかを指定することが可能であるものとする。
(5) Hereinafter, the process in which the secondary cache area reflects the update to the cache in its own cache area is called normal writing, and the processing in which the synchronizing cache area receives the contents of the update is called extended writing. I will decide. With the configuration of (3), an expanded cache memory having the same capacity is provided in each cache area. The control unit of the cache area can specify for each item in the cache area whether to use the original cache memory or the extended cache memory for normal writing or extended writing. Shall be

【0025】同期中のキャッシュ領域においては、通常
の書き込み用に指定されたキャッシュメモリを使用し
て、更新のあった項目を主記憶へ書き込む処理と、更新
のあったキャッシュの内容を主記憶へ書き込む処理を行
なっている間は無視される無効化を示すフラグをセット
する処理を行なう。キャッシュに対する更新に対して
は、拡張した書き込み用に指定されたキャッシュメモリ
を使用して行なう。更新されたキャッシュの内容を主記
憶へ書き込む処理が終了した後、更新のあったキャッシ
ュの内容を主記憶へ書き込む処理を行なっている間は無
視される無効化を示すフラグを持つ項目に関しては、そ
のフラグを用いて実際に無効化するとともに、その項目
について通常の書き込み用と拡張的な書き込み用の役割
の割当を交換する。
In the synchronizing cache area, the cache memory designated for normal writing is used to write the updated item to the main memory and the updated cache content to the main memory. During the writing process, a process of setting a flag indicating invalidation that is ignored is performed. The cache memory designated for extended writing is used to update the cache. After the process of writing the updated cache contents to the main memory is completed, while the process of writing the updated cache contents to the main memory is ignored, for items having a flag indicating invalidation, The flag is used to actually invalidate, and the assignment of roles for normal writing and extended writing for the item is exchanged.

【0026】以上により、同期中のキャッシュ領域にお
いても、キャッシュの更新を受け付けることが可能にな
り、全てのキャッシュ領域が単体で最新のキャッシュの
内容を保持することが可能になる。これによって、キャ
ッシュの内容と主記憶との同期の処理を開始する際に、
(1)(2)(3)で生じうる、最新のキャッシュの内
容を他のキャッシュ領域から複写する必要があるかどう
かを調べる処理と、実際に複写する処理による時間的な
遅れを解消することができる。また、(3)で必要な次
に正となるキャッシュ領域への複写の必要がないため、
副のキャッシュ領域が一つもない状態でも、正のキャッ
シュ領域をキャッシュの内容と主記憶の同期の処理を待
つ状態にすることが可能である。
As described above, the cache update can be accepted even in the cache area being synchronized, and all the cache areas can individually hold the latest cache contents. As a result, when starting the process of synchronizing the cache contents with the main memory,
(1) To eliminate the time delay due to the process of checking whether the latest cache contents need to be copied from another cache area and the actual copying process that may occur in (2) and (3). You can Also, since it is not necessary to copy to the next positive cache area required in (3),
Even if there is no sub cache area, it is possible to put the positive cache area into a state of waiting for the processing of synchronizing the cache contents and the main memory.

【0027】さらに、全てのキャッシュ領域において、
実際にキャッシュの項目の位置が同一であることが保証
されるため、各キャッシュ領域に対する更新処理の際に
項目ごとの位置を特定する処理が不要になる。これによ
って、(4)で生じる、キャッシュに対する処理を行な
う際に、キャッシュ領域ごとに物理的な位置を確認する
ために必要となる時間的な遅れを解消することができ
る。
Furthermore, in all cache areas,
Since it is actually guaranteed that the positions of the items in the cache are the same, it is not necessary to specify the position of each item when updating the cache areas. As a result, the time delay required for confirming the physical position of each cache area when performing the processing for the cache, which occurs in (4), can be eliminated.

【0028】[0028]

【実施例】以下、図面を参照して本発明の実施例を説明
する。図1は、本発明が適用される情報処理装置の構成
の一例を示したものである。図1に示すように、情報処
理装置は、データ処理ユニット(プロセッサエレメン
ト:PE)1が、通信路2を介して、主記憶(メモリエ
レメント:ME)3と接続されて構成されている。デー
タ処理ユニット1は、主記憶3からのデータの読み出
し、データの処理、主記憶3へのデータの書き込みを行
なう。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows an example of the configuration of an information processing apparatus to which the present invention is applied. As shown in FIG. 1, the information processing apparatus includes a data processing unit (processor element: PE) 1 connected to a main memory (memory element: ME) 3 via a communication path 2. The data processing unit 1 reads data from the main memory 3, processes the data, and writes the data to the main memory 3.

【0029】図2は、データ処理ユニット1の構成を示
したものである。データ処理ユニット1は、データ処理
装置(CPU)4、及びキャッシュ5を含んで構成され
ている。キャッシュ5には、データ処理装置4により主
記憶3から読み出されたデータが格納される。データ処
理装置4は、キャッシュ5に格納されたデータに対して
データ処理を行なう。
FIG. 2 shows the configuration of the data processing unit 1. The data processing unit 1 includes a data processing device (CPU) 4 and a cache 5. The cache 5 stores the data read from the main memory 3 by the data processing device 4. The data processing device 4 performs data processing on the data stored in the cache 5.

【0030】図3は、キャッシュ5の構成を示したもの
である。キャッシュ5は、図3に示すように、キャッシ
ュコントローラ6が、キャッシュ5内の通信路7を介し
て、複数のキャッシュ領域部(キャッシュセグメント)
8−1,8−2,8−3,8−4に接続されて構成され
る。キャッシュ5内の通信路7は、同報通信が可能であ
り、キャッシュ5の外部から取り込んだデータを同時に
複数のキャッシュ領域部8−1,8−2,8−3,8−
4に送信し、また、キャッシュ領域部8−1,8−2,
8−3,8−4の間でのデータの転送を行なう。キャッ
シュ領域部8−1,8−2,8−3,8−4は、環状に
順序が割り当てられるものとする。すなわち、キャッシ
ュ領域部の1つを正のキャッシュ領域とした場合に、他
のキャッシュ領域部が副のキャッシュ領域部とされ、キ
ャッシュ5の内容を主記憶3に書き込む同期処理が行な
われる度に、正のキャッシュ領域部が同期中となり、次
の順番に当たるキャッシュ領域部が新たな正のキャッシ
ュ領域部に割り当てられる。
FIG. 3 shows the structure of the cache 5. In the cache 5, as shown in FIG. 3, the cache controller 6 uses a plurality of cache area units (cache segments) via a communication path 7 in the cache 5.
8-1, 8-2, 8-3, 8-4 is connected and comprised. The communication path 7 in the cache 5 is capable of broadcast communication, and the data fetched from the outside of the cache 5 is simultaneously cached in a plurality of cache area sections 8-1, 8-2, 8-3, 8-.
4, and the cache area parts 8-1, 8-2,
Data is transferred between 8-3 and 8-4. It is assumed that the cache area units 8-1, 8-2, 8-3, and 8-4 are annularly assigned to the order. That is, when one of the cache area parts is set as the positive cache area, the other cache area parts are set as the sub cache area parts, and the synchronization processing for writing the contents of the cache 5 to the main memory 3 is performed. The positive cache area portion becomes in synchronization, and the cache area portion in the next order is assigned to the new positive cache area portion.

【0031】図4は、キャッシュ領域部8−k(k=1
〜4)の1つの構成を示したものである。キャッシュ領
域部8−kは、コントローラ9、及びキャッシュメモリ
10によって構成される。コントローラ9は、複数の項
目(ブロック)毎にキャッシュコントローラ6内で管理
されるキャッシュメモリ10の各項目毎の状態を示すデ
ータ(以下、項目状態データ)に基づいてキャッシュメ
モリ10の制御を行なう。
FIG. 4 shows the cache area section 8-k (k = 1.
4 to 4). The cache area unit 8-k includes a controller 9 and a cache memory 10. The controller 9 controls the cache memory 10 on the basis of data (hereinafter, item state data) indicating a state of each item of the cache memory 10 managed in the cache controller 6 for each of a plurality of items (blocks).

【0032】図5、キャッシュ5中の各キャッシュ領域
部8−kの状態を示すデータ(以下、キャッシュ領域部
状態データ)のデータ構造を示している。キャッシュ領
域部状態データは、キャッシュ領域部8−1,8−2,
8−3,8−4を制御するコントローラ6に置かれる。
キャッシュ領域部状態データは、各キャッシュ領域部に
対応して2ビットが設けられ、“00”で正のキャッシ
ュ領域部であることを示し、“01”で同期中のキャッ
シュ領域部であることを示し、“10”で同期待ち中の
キャッシュ領域部(第3、第4、第5実施例において用
いられる)であることを示すものとする。
FIG. 5 shows the data structure of data indicating the state of each cache area portion 8-k in the cache 5 (hereinafter, cache area portion state data). The cache area section state data includes the cache area sections 8-1, 8-2,
It is placed in the controller 6 that controls 8-3 and 8-4.
The cache area portion state data is provided with 2 bits corresponding to each cache area portion, and "00" indicates that it is a positive cache area portion, and "01" indicates that it is a synchronizing cache area portion. It is assumed that "10" is a cache area portion (used in the third, fourth, and fifth embodiments) waiting for synchronization.

【0033】正のキャッシュ領域部を示すフラグ、及び
同期中のキャッシュ領域部を示すフラグは、それぞれ同
時には1つのキャッシュ領域部に対してのみセットされ
る。なお、前述したキャッシュ領域部状態データのデー
タ構造は一例であって、3つの状態を表わすことができ
れば他のデータ構造であっても良い。
The flag indicating the positive cache area portion and the flag indicating the synchronized cache area portion are set to only one cache area portion at the same time. The data structure of the cache area part state data described above is an example, and other data structures may be used as long as they can represent three states.

【0034】図6は、キャッシュメモリ10の一つの項
目(キャッシュブロック)の状態を示す項目状態データ
(キャッシュタグ)のデータ構造を示している。項目状
態データは、各キャッシュ領域部8−kのキャッシュメ
モリ10中の複数の項目のそれぞれに対応して設けら
れ、コントローラ6に置かれる。項目状態データには、
対応する項目が保持するデータの主記憶3上での物理的
なアドレス16が、各キャッシュ領域部8−kに対応し
て存在する。また、各キャッシュ領域部8−kに対応し
て、それぞれ、項目の内容が無効であることを示すフラ
グ17(以下、無効フラグ)、更新のあったキャッシュ
の内容を主記憶3に書き込む同期処理を行なっている間
は無視され、項目の内容が無効であることを示すフラグ
18(以下、同期後無効フラグ)、項目の内容が変更さ
れたことを示すフラグ19(以下、更新フラグ)が設け
られている。同期後無効フラグ18がセットされた項目
については、同期処理の間にキャッシュの内容を変更す
る処理要求があった場合に変更されず(主記憶3に書き
込むべき内容を保持し続ける)、同期処理後には内容が
変更されていないために無効とされる。
FIG. 6 shows the data structure of item state data (cache tag) indicating the state of one item (cache block) in the cache memory 10. The item state data is provided corresponding to each of the plurality of items in the cache memory 10 of each cache area unit 8-k, and is placed in the controller 6. Item status data includes
A physical address 16 on the main memory 3 of the data held by the corresponding item exists corresponding to each cache area unit 8-k. Also, a flag 17 (hereinafter referred to as an invalid flag) indicating that the content of the item is invalid and a synchronous process of writing the updated cache content to the main memory 3 are associated with each cache area unit 8-k. A flag 18 indicating that the content of the item is invalid (hereinafter referred to as an invalid flag after synchronization) and a flag 19 indicating that the content of the item is changed (hereinafter referred to as an update flag) are provided. Has been. The items for which the post-synchronization invalid flag 18 is set are not changed when the processing request for changing the cache contents is issued during the synchronization process (the contents to be written in the main memory 3 are continuously held), and the synchronization process is performed. It is later invalidated because the contents have not been changed.

【0035】図7及び図8は、キャッシュ5を使用して
主記憶3への読み書きを行なう際の処理の内容を示した
ものである。図7中の所定の処理段階において、図8に
示す内容の処理が実行される。図8では各キャッシュ領
域部8−kの状態(正、副、同期中、同期待ち中)とキ
ャッシュ5を使用した主記憶3への操作の種類ごとに
(書き込み、読み込み、項目の無効化)、具体的な処理
が示されている。すなわち、キャッシュ領域部と操作の
種類の組み合わせのそれぞれについて、項目状態データ
中のアドレスの操作の有無、該当する項目の内容の操作
の有無、及び項目状態データ中の各種フラグに対する操
作(セット、リセット)が示されている。なお、キャッ
シュ領域部が同期中、及び同期待ち中である場合の書き
込み処理と項目の無効化の処理は、更新フラグがセット
されている場合の操作を示し、更新フラグがセットされ
ていない場合は、それぞれの操作の種類における副のキ
ャッシュ領域部に対する処理と同一になるものとする。
FIG. 7 and FIG. 8 show the contents of the processing when reading and writing to the main memory 3 using the cache 5. At a predetermined processing stage in FIG. 7, the processing having the contents shown in FIG. 8 is executed. In FIG. 8, the state of each cache area 8-k (primary, secondary, synchronizing, waiting for synchronization) and the type of operation to the main memory 3 using the cache 5 (writing, reading, invalidation of items). , Specific processing is shown. That is, for each combination of the cache area part and the type of operation, the presence or absence of the operation of the address in the item status data, the presence or absence of the operation of the content of the corresponding item, and the operation (set, reset) of various flags in the item status data. )It is shown. Note that the write processing and the item invalidation processing when the cache area is in synchronization and waiting for synchronization indicate the operation when the update flag is set, and when the update flag is not set, , And the processing for the sub cache area portion in each operation type.

【0036】図7中で行なわれるキャッシュと主記憶と
の内容の同期をとる処理(フラッシュバック処理)は、
第1実施例では図9のフローチャートに示す手順によっ
て実現され、第2、第3、第4実施例では図10のフロ
ーチャートに示す手順によって実現される。
The process for synchronizing the contents of the cache and the main memory (flashback process) performed in FIG.
This is realized by the procedure shown in the flowchart of FIG. 9 in the first embodiment, and realized by the procedure shown in the flowchart of FIG. 10 in the second, third, and fourth embodiments.

【0037】(A)次に、本発明の第1実施例の動作に
ついて説明する。キャッシュ5を使用しての主記憶3へ
の読み書きの処理は、図7のフローチャートに示す手順
により実現できる。
(A) Next, the operation of the first embodiment of the present invention will be described. The reading / writing process to / from the main memory 3 using the cache 5 can be realized by the procedure shown in the flowchart of FIG. 7.

【0038】各キャッシュ領域部でのアドレス16、無
効フラグ17、同期後無効フラグ18、更新フラグ19
の操作については、図8に表わす関係に従って行なわれ
る(ただし、図8中の同期待ち中に関しては、第3、第
4実施例を説明するために用いる)。
The address 16, invalid flag 17, post-synchronization invalid flag 18, and update flag 19 in each cache area portion
8 is performed according to the relationship shown in FIG. 8 (however, in the case of waiting for synchronization in FIG. 8, it is used for explaining the third and fourth embodiments).

【0039】まず、データ処理ユニット1が主記憶3の
ある物理アドレスが示す位置に格納されたデータに対し
て読み書き処理を行なう際には、データ処理装置4から
出力された対象とする物理アドレスをもとに、キャッシ
ュ5において必要なアドレスのデータを保持しているか
否かを調べる(ステップA1)。
First, when the data processing unit 1 performs a read / write process with respect to data stored at a position indicated by a physical address in the main memory 3, the target physical address output from the data processing device 4 is set to the target physical address. First, it is checked whether or not the cache 5 holds data at a necessary address (step A1).

【0040】すなわち、まずキャッシュ5のキャッシュ
コントローラ6は、各キャッシュ領域部8−kの状態を
示すキャッシュ領域部状態データを参照して、現在、正
のキャッシュ領域部に割り当てられたキャッシュ領域部
を判別する。そして、コントローラ6は、現在、正のキ
ャッシュ領域部に割り当てられたキャッシュ領域部の項
目状態データに格納された主記憶3上での物理的なアド
レス16を全ての項目について参照し、求める物理アド
レスに対応する項目がキャッシュメモリ10中に存在す
るかどうかを調べる。
That is, first, the cache controller 6 of the cache 5 refers to the cache area portion state data indicating the state of each cache area portion 8-k, and determines the cache area portion currently assigned to the positive cache area portion. Determine. Then, the controller 6 refers to the physical address 16 on the main memory 3 stored in the item state data of the cache area portion currently assigned to the positive cache area portion for all items, and obtains the physical address It is checked whether or not the item corresponding to exists in the cache memory 10.

【0041】求める物理アドレスに対応する項目が存在
した場合で、データ処理装置4からの処理要求が読み込
みの処理である場合(ステップA1,A2)、正のキャ
ッシュ領域部のキャッシュメモリ10に格納された該当
する項目のデータを取り出し、データ処理装置4に転送
する(ステップA3)。ここで該当した項目に対応する
項目状態データの更新フラグ19は、他のフラグと共
に、正および副のキャッシュ領域部の何れにおいてもセ
ットしない(図8に示す読み込み<hit>の処理)。
If there is an item corresponding to the desired physical address and the processing request from the data processing device 4 is a read process (steps A1 and A2), it is stored in the cache memory 10 of the positive cache area portion. The data of the corresponding item is taken out and transferred to the data processing device 4 (step A3). Here, the update flag 19 of the item status data corresponding to the applicable item is not set in any of the primary and secondary cache area parts together with other flags (processing of reading <hit> shown in FIG. 8).

【0042】一方、書き込みの処理である場合(ステッ
プA2)、キャッシュコントローラ6は、キャッシュ5
内の通信路7を介した同報通信により、同時に各キャッ
シュ領域部8−kに対して書き込み処理を要求する(更
新内容を送信する)。各キャッシュ領域部8−kのキャ
ッシュコントローラ9は、キャッシュ領域部状態データ
にセットされた自キャッシュ領域部の状態に応じて、正
または副のキャッシュ領域部である場合に、キャッシュ
メモリ10の該当する項目に対して書き込みの処理(図
8に示す書き込み<hit>の処理)を行なう(ステッ
プA4)。
On the other hand, in the case of the writing process (step A2), the cache controller 6 causes the cache 5
By the broadcast communication via the communication path 7 inside, the write processing is simultaneously requested to each cache area unit 8-k (update contents are transmitted). The cache controller 9 of each cache area unit 8-k corresponds to the cache memory 10 when it is a primary or secondary cache area unit according to the state of its own cache area unit set in the cache area unit state data. A writing process (writing <hit> process shown in FIG. 8) is performed on the item (step A4).

【0043】すなわち、正のキャッシュ領域部のコント
ローラ9は、キャッシュメモリ10の該当する項目に書
き込みを行ない、また副のキャッシュ領域部のコントロ
ーラ9は、キャッシュメモリ10の該当する項目に書き
込みを行なう。キャッシュコントローラ6は、同項目の
キャッシュ領域部状態データの更新フラグ19中の正の
キャッシュ領域部に対応するフラグをセットし、無効フ
ラグ17をリセットし、また副のキャッシュ領域部に対
応する無効フラグ17をリセットする。
That is, the controller 9 in the positive cache area section writes the corresponding item in the cache memory 10, and the controller 9 in the sub cache area section writes the corresponding item in the cache memory 10. The cache controller 6 sets a flag corresponding to the positive cache area portion in the update flag 19 of the cache area portion state data of the same item, resets the invalid flag 17, and invalid flag corresponding to the secondary cache area portion. Reset 17.

【0044】副のキャッシュ領域部について更新フラグ
をセットしないことにより、この副のキャッシュ領域が
後に正のキャッシュ領域として使用される際に、キャッ
シュ5と主記憶3とに格納された内容の同期を取る必要
が生じた場合(同期処理の場合)に、先の正のキャッシ
ュ領域部によって既に書き戻されている不要な主記憶3
への書き込みを禁止することができる。
By not setting the update flag for the sub cache area part, when the sub cache area is later used as a positive cache area, the contents stored in the cache 5 and the main memory 3 are synchronized. When it is necessary to take (in the case of synchronous processing), the unnecessary main memory 3 already written back by the previous positive cache area part 3
Writing to can be prohibited.

【0045】書き込み処理の要求があった際に、同期中
のキャッシュ領域が存在した場合、すなわちキャッシュ
5中の変更された内容を主記憶3に書き戻す同期処理
(フラッシュバック処理)が実行されている場合には、
同期中のキャッシュ領域部に対して以下のような処理を
行なう。(同期処理とキャッシュ5への書き込み処理を
並列的に行なう)。
When there is a cache area in synchronization when a write processing request is made, that is, a synchronous processing (flashback processing) for writing back the changed contents in the cache 5 to the main memory 3 is executed. If
The following processing is performed on the cache area portion during synchronization. (Synchronous processing and writing processing to the cache 5 are performed in parallel).

【0046】同期中のキャッシュ領域部に対しては、同
期処理開始後に変更があった項目については、対応する
項目状態データの全てについて、同期後無効フラグ18
の同期中のキャッシュ領域部に対応するフラグをセット
する。同期後無効フラグ18がセットされることによ
り、同期処理を行なっている間は無視されるので、同期
処理開始前に更新が行なわれていない項目に対する新た
な更新を受けても、内容が変更されず同期処理に影響を
及ぼさない。
With respect to the cache area portion being synchronized, the post-synchronization invalid flag 18 is set for all items corresponding to the item status data changed after the start of the synchronization processing.
The flag corresponding to the cache area portion in synchronization with is set. Since the post-synchronization invalid flag 18 is set, it is ignored while the synchronization processing is being performed. Therefore, even if a new update is made to an item that has not been updated before the synchronization processing is started, the content is changed. Without affecting the synchronization process.

【0047】一方、求める物理アドレスに対応する項目
が存在しなかった場合(ステップA1)、キャッシュ領
域状態部データが示す正のキャッシュ領域部における全
ての項目にわたる項目状態データを参照して、無効フラ
グ17がセットされている項目が存在するかどうかを調
べる(ステップA5)。無効フラグ17がセットされて
いる項目、すなわち空き項目が存在すれば、その項目を
読み書きの対象とするデータを格納するために使用する
ものとする(ステップA6)。正のキャッシュ領域部と
副のキャッシュ領域部の全てについて、該当する項目に
対応する項目状態データに、現在参照しようとしている
データを示す物理アドレスを書き込む。それ以外のそれ
ぞれのキャッシュ領域部に対するキャッシュメモリの内
容の更新、及びフラグの操作については、求める物理ア
ドレスが存在した場合と同一の処理を行なう。
On the other hand, if the item corresponding to the desired physical address does not exist (step A1), the invalid flag is referred to by referring to the item state data over all items in the positive cache area section indicated by the cache area state section data. It is checked whether or not there is an item for which 17 is set (step A5). If there is an item for which the invalid flag 17 is set, that is, an empty item, that item is used to store the data to be read and written (step A6). For all of the positive cache area section and the secondary cache area section, the physical address indicating the data currently being referred to is written in the item state data corresponding to the corresponding item. Regarding the update of the contents of the cache memory for each of the other cache area parts and the operation of the flag, the same processing as when the desired physical address is present is performed.

【0048】キャッシュメモリ10に空き項目が存在し
なければ(ステップA5)、空き項目を得るためにキャ
ッシュメモリ10中からデータを取り除く対象とする項
目を、任意のアルゴリズム(例えばLRU:Least Rece
ntly Used 方式)に従って決定する(ステップA7)。
If there is no empty item in the cache memory 10 (step A5), the item whose data is to be removed from the cache memory 10 to obtain the empty item is an arbitrary algorithm (for example, LRU: Least Rece.
ntly Used method) (step A7).

【0049】この選択された項目の正のキャッシュ領域
部における項目状態データに、更新フラグ19がセット
されていない場合には(ステップA8)、この項目に格
納されたデータの内容を主記憶3に反映させる必要がな
いので、この項目に対して、無効フラグ17がセットさ
れている場合と同一の処理を行なう。
When the update flag 19 is not set in the item state data in the positive cache area of the selected item (step A8), the contents of the data stored in this item are stored in the main memory 3. Since it is not necessary to reflect it, the same processing as when the invalid flag 17 is set is performed for this item.

【0050】一方、更新フラグ19がセットされていた
場合には(ステップA8)、キャッシュ5と主記憶3の
それぞれに格納された内容の同期を取る同期処理(フラ
ッシュバック処理)を開始する(ステップA9)。
On the other hand, when the update flag 19 is set (step A8), the synchronous processing (flashback processing) for synchronizing the contents stored in the cache 5 and the main memory 3 is started (step A8). A9).

【0051】なお、キャッシュ5の容量を超えたキャッ
シュ5へのデータの保持の要求が生じた場合など、キャ
ッシュ5のある項目を無効化する必要が生じた場合は、
無効化が要求された項目について、正のキャッシュ領域
部、及び副のキャッシュ領域部に対応する無効フラグ1
7をセットする(図8に示す項目の無効化の処理)。
When it is necessary to invalidate an item in the cache 5, such as when a request to hold data in the cache 5 that exceeds the capacity of the cache 5 occurs,
For the item for which invalidation is requested, invalid flag 1 corresponding to the positive cache area part and the secondary cache area part
7 is set (invalidation processing of items shown in FIG. 8).

【0052】ステップA9において、キャッシュ5と主
記憶3のそれぞれに格納された内容の同期をとる同期処
理が要求された場合、図9のフローチャートに手順を示
すフラッシュバック処理を行なう。
In step A9, when the synchronization processing for synchronizing the contents stored in the cache 5 and the contents stored in the main memory 3 is requested, the flashback processing whose procedure is shown in the flowchart of FIG. 9 is performed.

【0053】まず、キャッシュ5のキャッシュコントロ
ーラ6は、同期中のキャッシュ領域部があるか否かを判
別する(ステップB1)。同期中のキャッシュ領域部が
ある場合には、同期中のキャッシュ領域部がなくなるま
で、すなわち副のキャッシュ領域部に変更されるまで待
つ。
First, the cache controller 6 of the cache 5 determines whether or not there is a cache area portion in synchronization (step B1). If there is a cache area part in synchronization, the process waits until there is no cache area part in synchronization, that is, until the cache area part is changed to a secondary cache area part.

【0054】同期中のキャッシュ領域部がなくなると、
キャッシュコントローラ6は、補間中フラグ(図示せ
ず、キャッシュコントローラ6内に保持される)をセッ
トし、キャッシュ5への操作を停止、すなわちキャッシ
ュ5を用いた主記憶3へのアクセスを禁止する(ステッ
プB2)。
When there is no cache area in synchronization,
The cache controller 6 sets an in-interpolation flag (not shown and held in the cache controller 6) to stop the operation on the cache 5, that is, prohibit access to the main memory 3 using the cache 5 ( Step B2).

【0055】キャッシュコントローラ6は、キャッシュ
領域部状態データを参照して、環状の順序に従い、現
在、正のキャッシュ領域部であるキャッシュ領域の次の
順番に当たるキャッシュ領域部を調べ、同キャッシュ領
域部が副のキャッシュ領域部であるかどうかを調べる。
The cache controller 6 refers to the cache area portion state data and checks the cache area portion corresponding to the next order of the cache area which is currently the positive cache area portion in the circular order, and the cache area portion Check whether it is a sub cache area.

【0056】正のキャッシュ領域部の次の順序のキャッ
シュ領域部が副のキャッシュ領域部でない場合、このキ
ャッシュ領域部が副のキャッシュ領域部になるまでキャ
ッシュへの操作を停止したまま待つ。
If the cache area section next to the primary cache area section is not the sub cache area section, the operation of the cache is kept suspended until this cache area section becomes the sub cache area section.

【0057】正のキャッシュ領域部の次の順序のキャッ
シュ領域部が副のキャッシュ領域部である場合、まず、
以下のようにして、次の正のキャッシュの領域の内容を
補完するための処理を行なう。
When the cache area section next to the positive cache area section is the sub cache area section, first,
The following process is performed to complement the contents of the area of the positive cache.

【0058】キャッシュコントローラ6は、各項目に対
応する項目状態データの、正のキャッシュ領域部と次の
正のキャッシュ領域部に対応する無効フラグ17を全て
比較し、正のキャッシュ領域部に対応する無効フラグは
リセットされているが、次の正のキャッシュ領域部に対
応する無効フラグはセットされている項目の全てを判別
する。
The cache controller 6 compares all the invalid flags 17 corresponding to the positive cache area portion and the next positive cache area portion of the item state data corresponding to each item, and responds to the positive cache area portion. Although the invalid flag is reset, the invalid flag corresponding to the next positive cache area portion determines all the items that are set.

【0059】そして、正のキャッシュ領域部のキャッシ
ュメモリ10における該当する項目の内容を、次の正の
キャッシュ領域部に対応するキャッシュメモリ10の該
当する項目に複写するとともに、当該項目の次の正のキ
ャッシュ領域部に対応する無効フラグをリセットする
(ステップB3)。
Then, the contents of the corresponding item in the cache memory 10 of the positive cache area portion are copied to the corresponding item of the cache memory 10 corresponding to the next positive cache area portion, and the next positive item of the item is copied. The invalid flag corresponding to the cache area part of is reset (step B3).

【0060】すなわち、次に正のキャッシュ領域部とな
るキャッシュ領域部に、以前にキャッシュメモリ10の
内容を主記憶3に書き戻す同期処理をしていたために更
新することができなかった項目が存在すれば、正のキャ
ッシュ領域部の該当する項目全てを複写することで、次
に正のキャッシュ領域部となるキャッシュ領域部に最新
のキャッシュ5の内容を保持させることができる。
That is, there is an item that cannot be updated in the cache area portion, which is the next positive cache area portion, because the synchronization processing for previously writing back the contents of the cache memory 10 to the main memory 3 was performed. Then, by copying all the corresponding items in the positive cache area portion, the latest cache 5 content can be held in the cache area portion which will be the next positive cache area portion.

【0061】その後、キャッシュコントローラ6は、補
間中フラグをリセットして、キャッシュ5への操作を再
開する(ステップB4)。次に、以下のようにして、キ
ャッシュメモリ10の内容を主記憶3に反映させる。キ
ャッシュコントローラ6は、キャッシュ領域部状態デー
タを、それまで正のキャッシュ領域部を表わしていたフ
ラグを同期中のキャッシュ領域部を示すように変更する
とともに、正のキャッシュ領域部を示すフラグ13を、
環状に割り当てた次の順番のキャッシュ領域部に対応す
るフラグを、正のキャッシュ領域部を表わすように変更
する(ステップB5)。
After that, the cache controller 6 resets the interpolation flag and restarts the operation on the cache 5 (step B4). Next, the contents of the cache memory 10 are reflected in the main memory 3 as follows. The cache controller 6 changes the cache area part state data so that the flag representing the positive cache area part up to that point indicates the cache area part being synchronized, and sets the flag 13 indicating the positive cache area part to
The flag corresponding to the cache area portion in the next order, which is annularly assigned, is changed to indicate the positive cache area portion (step B5).

【0062】次に、項目状態データの同期中のキャッシ
ュ領域部(それまで正のキャッシュ領域部であったキャ
ッシュ処理部)に対応する更新フラグ19を全て調べ、
更新フラグ19がセットされている項目(内容に変更の
あった項目)のキャッシュメモリ10中の内容を、物理
アドレス16に応じて主記憶3に対して書き込む処理を
行なう(ステップB6)。
Next, all the update flags 19 corresponding to the cache area portion (the cache processing portion which has been the positive cache area portion until that time) in synchronization with the item state data are checked,
A process of writing the contents in the cache memory 10 of the item for which the update flag 19 is set (items whose contents have been changed) to the main memory 3 according to the physical address 16 is performed (step B6).

【0063】全ての更新フラグ19がセットされた項目
に対して処理を終了した後、同期中のキャッシュ領域部
に対応する同期後無効フラグ18を全て調べ、同期後無
効フラグ18がセットされている項目について同期中の
キャッシュ領域部に対応する無効フラグ17をセット
し、最後に同期後無効フラグ18を全てリセットする。
After the processing is completed for all the items for which all the update flags 19 are set, all the post-synchronization invalid flags 18 corresponding to the cache area portion being synchronized are checked, and the post-synchronization invalid flags 18 are set. For the item, the invalid flag 17 corresponding to the cache area portion being synchronized is set, and finally, the post-synchronization invalid flag 18 is reset.

【0064】書き込み処理が完了した後には、キャッシ
ュコントローラ6は、同期中のキャッシュ領域部を副の
キャッシュ領域部に変更し、フラッシュバック処理を終
了する(ステップB7)。
After the writing process is completed, the cache controller 6 changes the synchronizing cache area portion to the sub cache area portion, and ends the flashback processing (step B7).

【0065】変更された項目の内容を主記憶3に書き込
んだ後、その項目を無効化し、読み書きの対象とするデ
ータを格納することができるようにする(ステップA1
0)。 ここで、データ処理装置4からの処理要求が読
み込みの処理であった場合(ステップA11)、対象と
するデータを主記憶3から直接読み出し、キャッシュ5
中の正および副のキャッシュ領域の何れにおいても(各
キャッシュ領域部8−k)、該当する項目に読み出した
内容を格納する。そして、各キャッシュ領域部8−kに
おいて、内容を変更した項目に対応する項目状態データ
に対して、正および副のキャッシュ領域部について無効
フラグをリセットする(図8に示す読み込み<miss
>の処理)。
After writing the contents of the changed item in the main memory 3, the item is invalidated so that the data to be read and written can be stored (step A1).
0). Here, when the processing request from the data processing device 4 is a reading process (step A11), the target data is directly read from the main memory 3, and the cache 5
In each of the primary and secondary cache areas (each cache area section 8-k), the read content is stored in the corresponding item. Then, in each cache area unit 8-k, the invalid flag is reset for the primary and secondary cache area units for the item state data corresponding to the item whose content has been changed (read <miss shown in FIG. 8
> Processing).

【0066】一方、書き込みの処理である場合(ステッ
プA11)、読み込み処理の場合と同様に、対象とする
データを主記憶3から直接読み出し、キャッシュ5中の
正および副のキャッシュ領域の何れにおいても(各キャ
ッシュ領域部8−k)、該当する項目に読み出した内容
を格納する。そして、各キャッシュ領域部8−kにおい
て、内容を変更した項目に対応する項目状態データに対
して、正のキャッシュ領域部について、更新フラグをセ
ット、無効フラグをリセットし、副のキャッシュ領域部
について無効フラグをリセットする(図8に示す書き込
み<miss>の処理)。
On the other hand, in the case of the writing process (step A11), as in the case of the reading process, the target data is directly read from the main memory 3 and the data in both the primary and secondary cache areas in the cache 5 are read. (Each cache area 8-k) stores the read content in the corresponding item. Then, in each cache area unit 8-k, with respect to the item state data corresponding to the item whose contents have been changed, the update flag is set and the invalid flag is reset for the positive cache area unit, and the sub cache area unit is reset. The invalid flag is reset (processing of write <miss> shown in FIG. 8).

【0067】このようにして、キャッシュ5に複数のキ
ャッシュ領域部8−1,8−2,8−3,8−4を設
け、正と副に割り当て、キャッシュコントローラ6によ
る制御のもとに、それぞれが同じ内容のデータが格納さ
れるようにしている。そして、キャッシュ5と主記憶3
との内容の同期を取る必要が生じた際には正のキャッシ
ュ領域部を用い(同期中のキャッシュ領域部にして主記
憶3に書き込みを行なう)、同期処理の実行中にデータ
処理装置4から読み書き処理の処理要求があった場合に
は、同期処理を行なっていない他のキャッシュ領域部を
用いて行なう。
In this way, the cache 5 is provided with a plurality of cache area units 8-1, 8-2, 8-3, 8-4, which are allocated to the primary and secondary sides, and under the control of the cache controller 6, The data of the same content is stored in each. And cache 5 and main memory 3
When it becomes necessary to synchronize the contents of the data with the cache memory, the positive cache area portion is used (the cache area portion being synchronized is written to the main memory 3), and the data processing device 4 receives data from the data processing device 4 during the synchronization processing. When a read / write process request is issued, the cache process is performed using another cache area that has not been synchronized.

【0068】同期処理中のキャッシュ領域では、同期処
理の開始後に更新のあった項目については、同期後無効
化フラグをセットすることによって、主記憶3へ書き込
みを行なう同期処理の間は無視され、更新処理後には無
効化されるようにすることができる。また、同期処理を
行なっていたために内容が更新されていない項目につい
ては、環状の順番での先に当たるキャッシュ領域部が正
のキャッシュ領域部であって、この正の領域部が同期処
理を開始する際に、更新されていない項目の全てを複写
するので、新たに正のキャッシュ領域部に割り当てられ
る前に最新の内容を保持することができる。
In the cache area during the synchronous processing, the items updated after the synchronous processing is started are ignored during the synchronous processing of writing to the main memory 3 by setting the post-synchronization invalidation flag, It can be made invalid after the update process. For items whose contents have not been updated because the synchronization process was being performed, the first cache region part in the circular order is the positive cache region part, and this positive region part starts the synchronization process. At this time, since all the items that have not been updated are copied, the latest contents can be held before they are newly assigned to the positive cache area section.

【0069】以上のことから、同期処理が必要となった
際に、同期処理が終了するまでキャッシュ5の内容を更
新する処理を待たせることなく、並列的に即座に実行さ
せることが可能となるので、システム全体としての処理
時間の短縮が可能となる。
From the above, when the synchronous processing is required, it is possible to immediately execute the processing in parallel without waiting for the processing for updating the contents of the cache 5 until the synchronous processing is completed. Therefore, the processing time of the entire system can be shortened.

【0070】なお、第1実施例における前述した説明で
は、ステップA4において、同期中のキャッシュ領域部
に対しては、同期処理開始後に変更があった項目につい
ては、項目状態データの同期後無効フラグ18の同期中
のキャッシュ領域部に対応するフラグをセットするもの
として説明したが、次のような方法であっても良い(以
下、他の更新方法と称する。後述する第2実施例、第3
実施例、第4実施例において用いるものとする)。
In the above description of the first embodiment, in step A4, for items that have changed after the start of synchronization processing, the cache area portion being synchronized is flagged as invalid after synchronization in the item state data. Although the description has been given assuming that the flag corresponding to the cache area portion in synchronization with 18 is set, the following method may be used (hereinafter, referred to as another update method. Second Embodiment and Third Embodiment described later).
It shall be used in the embodiment and the fourth embodiment).

【0071】同期中のキャッシュ領域部では、更新フラ
グ19を参照してその項目に同期処理前に更新があった
かどうかを調べ、更新があった場合にのみ、同期後無効
フラグ18の同期中のキャッシュ領域部に対応するフラ
グをセットし、更新がなかった場合は、副のキャッシュ
領域部と同一の処理を行なう。
In the cache area during synchronization, the update flag 19 is referred to check whether or not the item has been updated before the synchronization processing. Only when there is an update, the cache after synchronization with the post-synchronization invalid flag 18 is cached. If the flag corresponding to the area portion is set and there is no update, the same processing as the sub cache area portion is performed.

【0072】このような項目で同期処理開始後の更新を
禁止することは、特に正のキャッシュ領域部が、同期処
理を開始する直前に、キャッシュの内容で不足する部分
を他のキャッシュ領域部から複写する必要のありうる方
式では、複写の量を増やし問題である。前述した他の更
新方法であれば、このような複写を減少させることがで
きる。 (B)次に、第2実施例について説明する。
Inhibiting the update after the synchronous processing is started in such an item is particularly effective for the positive cache area section from the other cache area section immediately before starting the synchronous processing. The method that may require copying increases the amount of copying, which is a problem. The other updating method described above can reduce such copying. (B) Next, a second embodiment will be described.

【0073】第2実施例では、第1実施例におけるキャ
ッシュ5と主記憶3との内容の同期をとる同期処理が終
了する前に、さらに同期処理が必要となった場合に対処
できるようにするもので、同期待ち中のキャッシュ領域
部をさらに設定することができる。同期待ち中のキャッ
シュ領域部は、次の同期中のキャッシュ領域部となるキ
ャッシュ領域部を示すものである。
In the second embodiment, it is possible to deal with the case where further synchronization processing is required before the completion of the synchronization processing for synchronizing the contents of the cache 5 and the main memory 3 in the first embodiment. In this case, it is possible to further set the cache area part waiting for synchronization. The cache area section waiting for synchronization indicates a cache area section which becomes the next cache area section during synchronization.

【0074】第2実施例における構成は、前述した第1
実施例と同じものとする。キャッシュ5を使用しての主
記憶3への読み書き処理は、図7に示す方法により実現
できる。また、前述した他の更新方法を用いているもの
とする。
The configuration of the second embodiment is the same as the first embodiment described above.
The same as in the embodiment. The read / write processing to the main memory 3 using the cache 5 can be realized by the method shown in FIG. Further, it is assumed that the other updating method described above is used.

【0075】第2実施例では、データ処理ユニット1が
主記憶3のある物理アドレスの内容を使用する際には、
第1実施例における処理に加えて、各項目状態データへ
は、同期中のキャッシュ領域部に対応する各フラグの操
作と同一の操作を、同期待ち中のキャッシュ領域部(詳
細については後述する)に対応する各フラグに対して行
なう。また、キャッシュ5の内容を無効化する必要が生
じた場合は、第1実施例における処理に加えて、同期待
ち中のキャッシュ領域部について、同期中のキャッシュ
領域部と同一の処理を行なう。
In the second embodiment, when the data processing unit 1 uses the contents of a certain physical address in the main memory 3,
In addition to the processing in the first embodiment, the same operation as the operation of each flag corresponding to the synchronizing cache area section is performed on each item state data, and the cache area section waiting for synchronization (details will be described later). For each flag corresponding to. Further, when it becomes necessary to invalidate the contents of the cache 5, the same processing as that in the synchronizing cache area portion is performed for the synchronizing cache area portion in addition to the processing in the first embodiment.

【0076】キャッシュ5と主記憶3の内容の同期の処
理が要求された場合、第2実施例では、図10のフロー
チャートに示す処理(フラッシュバック処理)を行な
う。キャッシュ5と主記憶3の内容の同期の処理が要求
された場合、まず、キャッシュ5のキャッシュコントロ
ーラ6は、正のキャッシュ領域部の次のキャッシュ領域
部が、副のキャッシュ領域部であるかどうかを調べる
(ステップC1)。ここで、副のキャッシュ領域部がな
い場合には、同期中のキャッシュ領域部が同期処理を終
了して副のキャッシュ領域部となるまで待つ。
When a process for synchronizing the contents of the cache 5 and the main memory 3 is requested, the process (flashback process) shown in the flowchart of FIG. 10 is performed in the second embodiment. When a process of synchronizing the contents of the cache 5 and the main memory 3 is requested, first, the cache controller 6 of the cache 5 determines whether the cache area part next to the positive cache area part is the sub cache area part. Is checked (step C1). Here, if there is no secondary cache area portion, it waits until the synchronizing cache area portion completes the synchronization processing and becomes the secondary cache area portion.

【0077】同期中のキャッシュ領域部が副のキャッシ
ュ領域部になると、キャッシュコントローラ6は、補間
中フラグ(図示せず、キャッシュコントローラ6内に保
持される)をセットし、キャッシュ5への操作を停止、
すなわちキャッシュ5を用いた主記憶3へのアクセスを
禁止する(ステップC2)。
When the cache area portion being synchronized becomes the secondary cache area portion, the cache controller 6 sets an interpolation flag (not shown and held in the cache controller 6) to operate the cache 5. Stop,
That is, access to the main memory 3 using the cache 5 is prohibited (step C2).

【0078】正のキャッシュ領域部の次の順序のキャッ
シュ領域部が副のキャッシュ領域部である場合、まず、
以下のようにして、次の正のキャッシュ領域(副のキャ
ッシュ領域部)の内容を補完するための処理を行なう。
When the cache area section next to the positive cache area section is the sub cache area section, first,
The following process is performed to complement the contents of the next positive cache area (secondary cache area portion).

【0079】各項目に対応する項目状態データの、正の
キャッシュ領域部と次の正のキャッシュ領域部に対応す
る無効フラグ17を全て比較し、正のキャッシュ領域部
に対応する無効フラグはリセットされているが、次の正
のキャッシュ領域部に対応する無効フラグはセットされ
ている項目の全てを判別する。そして、正のキャッシュ
領域部のキャッシュメモリ10における該当する項目の
内容を、次の正のキャッシュ領域部に対応する項目に複
写するとともに、当該項目の次の正のキャッシュ領域部
に対応する無効フラグをリセットする(ステップC
3)。
In the item state data corresponding to each item, all invalid flags 17 corresponding to the positive cache area portion and the next positive cache area portion are compared, and the invalid flag corresponding to the positive cache area portion is reset. However, the invalid flag corresponding to the next positive cache area portion discriminates all the items that are set. Then, the content of the corresponding item in the cache memory 10 of the positive cache area portion is copied to the item corresponding to the next positive cache area portion, and the invalid flag corresponding to the next positive cache area portion of the item is copied. Is reset (Step C
3).

【0080】すなわち、次に正のキャッシュ領域部とな
るキャッシュ領域部に、以前にキャッシュメモリ10の
内容を主記憶3に書き戻す同期処理、または同期待ち処
理の何れかを行なっていたために、更新できなかった項
目が存在していれば、正のキャッシュ領域部の該当する
項目を副のキャッシュ領域部の該当する項目に複写す
る。
In other words, the cache area portion, which is the next positive cache area portion, has been previously subjected to either the synchronous processing for writing back the contents of the cache memory 10 to the main memory 3 or the synchronous waiting processing. If there is an item that could not be created, the corresponding item in the positive cache area section is copied to the corresponding item in the sub cache area section.

【0081】この時、全ての副のキャッシュ領域部に対
して同時に複写を行なう。これにより、次に正となるキ
ャッシュ領域部に最新のキャッシュ5の内容を保持させ
ることができる。副のキャッシュ領域部の全てに該当す
る項目への複写を行なうのは、副のキャッシュ領域部で
この条件に該当する項目を持つキャッシュ領域部が、次
に正となるべきキャッシュ領域部が同期処理を行なって
いた際に、同期待ちの処理をしていたキャッシュ領域で
あり、さらに次以降に正になるべきキャッシュ領域部と
一致するためである。
At this time, copying is simultaneously performed on all the sub cache area portions. As a result, the latest contents of the cache 5 can be held in the cache area portion which becomes positive next. Copying to items that correspond to all of the secondary cache area part is performed by synchronizing the cache area part that has the item that meets this condition in the secondary cache area part and the cache area part that should become positive next time. This is because it is the cache area that was in the process of waiting for synchronization when performing the above process, and further matches the cache area part that should be positive after the next time.

【0082】その後、補間中フラグをリセットして、キ
ャッシュ5への操作を再開する(ステップC4)。次
に、キャッシュコントローラ6は、キャッシュ領域部状
態データを参照して、同期中のキャッシュ領域部がある
かどうか調べる(ステップC5)。
Thereafter, the in-interpolation flag is reset and the operation on the cache 5 is restarted (step C4). Next, the cache controller 6 refers to the cache area portion state data to check whether there is a cache area portion that is being synchronized (step C5).

【0083】同期中のキャッシュ領域部があるならば、
キャッシュ領域部状態データの同期待ち中のキャッシュ
領域部を示すフラグ15を、現在、正のキャッシュ領域
部であるキャッシュ領域部が同期待ち中のキャッシュフ
ラグ領域となるようにセットすると共に、環状の順序で
次の正のャッシュ領域部に当たるキャッシュ領域部を、
新たな正のキャッシュ領域部となるようにフラグ13を
セットする(ステップC7)。
If there is a cache area part in synchronization,
The flag 15 indicating the cache area portion waiting for synchronization of the cache area portion state data is set so that the cache area portion, which is currently the positive cache area portion, becomes the cache flag area waiting for synchronization, and the circular order is set. The cache area part corresponding to the next positive cache area part is
The flag 13 is set so as to become a new positive cache area portion (step C7).

【0084】ここで、キャッシュコントローラ6は、キ
ャッシュ領域部状態データを参照して、同期中のキャッ
シュ領域部があるかどうか調べる(ステップC8)。す
なわち、キャッシュコントローラ6は、現在、同期中の
キャッシュ領域部が副のキャッシュ領域部に変更される
のを待つ。
Here, the cache controller 6 refers to the cache area portion state data to check whether there is a cache area portion in synchronization (step C8). That is, the cache controller 6 waits for the currently synchronized cache area unit to be changed to the sub cache area unit.

【0085】同期中のキャッシュ領域部が副のキャッシ
ュ領域部に変更されると、キャッシュコントローラ6
は、環状の順序で次のキャッシュ領域部が同期待ち中の
キャッシュ領域部であるなら、このキャッシュ領域部に
対して、同期待ち中のキャッシュ領域部を示すフラグ1
5をリセットし、同期中のキャッシュ領域部を示すよう
にフラグ14をセットする(ステップC9)。
When the cache area portion being synchronized is changed to the sub cache area portion, the cache controller 6
If the next cache area in the circular order is the cache area waiting for the synchronization, the flag 1 indicating the cache area waiting for the synchronization is sent to this cache area.
5 is reset, and the flag 14 is set so as to indicate the cache area portion being synchronized (step C9).

【0086】一方、ステップC5において、同期中のキ
ャッシュ領域部がなかった場合、キャッシュコントロー
ラ6は、キャッシュ領域部状態データを、それまで正の
キャッシュ領域部を表わしていたフラグを同期中のキャ
ッシュ領域部を示すように変更するとともに、正のキャ
ッシュ領域部を示すフラグ13を、環状に割り当てた次
の順番のキャッシュ領域部に対応するフラグを、正のキ
ャッシュ領域部を表わすように変更する(ステップC
6)。
On the other hand, in step C5, if there is no cache area section in synchronization, the cache controller 6 sets the cache area section state data to the cache area in synchronization with the flag representing the positive cache area section until then. The flag 13 indicating the positive cache area portion is changed, and the flag corresponding to the next cache area portion allocated in a ring shape is changed to indicate the positive cache area portion (step C
6).

【0087】これまで正のキャッシュ領域部であった同
期待ち中のキャッシュ領域部に対しては、同期中のキャ
ッシュ領域部に対する処理と同一の処理、すなわち同期
処理の開始後に更新のあった項目について同期後無効化
フラグをセットし、主記憶3へ書き込みを行なう同期処
理の間は無視されるようにする(同期中のキャッシュ領
域部とは、キャッシュ5への更新が行なわれた際に更新
のあった項目を主記憶3へ書き込む処理が異なる)。同
期待ち中のキャッシュ領域部は、以上のような処理を、
同期中のキャッシュ領域部による同期処理が終了するま
で行なう。
For the cache waiting area for synchronization, which has been the positive cache area until now, the same processing as the processing for the synchronizing cache area, that is, the item that has been updated after the start of the synchronization processing is performed. The post-synchronization invalidation flag is set so that it is ignored during the synchronous processing of writing to the main memory 3 (the cache area portion during synchronization is the update of the cache 5 when the update is performed to the cache 5). The process of writing the existing items to the main memory 3 is different). The cache area waiting for synchronization performs the above processing.
The process is performed until the synchronization process by the cache area unit being synchronized is completed.

【0088】次に、項目状態データの同期中のキャッシ
ュ領域部(それまで正のキャッシュ領域部であったキャ
ッシュ処理部)に対応する更新フラグ19を全て調べ、
更新フラグ19がセットされている項目(内容に変更の
あった項目)のキャッシュメモリ10中の内容を、物理
アドレス16に応じて主記憶3に対して書き込む処理を
行なう(ステップC10)。
Next, all update flags 19 corresponding to the cache area portion (the cache processing portion which has been the positive cache area portion until that time) in synchronization with the item state data are checked,
The contents of the item (item whose contents have been changed) in which the update flag 19 is set in the cache memory 10 are written into the main memory 3 according to the physical address 16 (step C10).

【0089】同期中のキャッシュ領域部が同期処理を終
了した後、同キャッシュ領域部に対応する同期中のキャ
ッシュ領域部を示すフラグ14をリセットし、副のキャ
ッシュ領域部となるようにセットする(ステップC1
1)。
After the synchronizing cache area portion completes the synchronization processing, the flag 14 indicating the synchronizing cache area portion corresponding to the same cache area portion is reset and set to become the sub cache area portion ( Step C1
1).

【0090】なお、同期待ち中の処理中にセットされた
同期後無効フラグは、同期中のキャッシュ領域部にセッ
トされた同期後無効フラグと同等に扱う。このようにし
て、第1実施例における効果に加えて、さらに同期待ち
中のキャッシュ領域部を設けることができるので、同期
中のキャッシュ領域部が存在する際に、さらに同期処理
が必要となった場合にも対処することができる。この
際、キャッシュ5内に設けられたキャッシュ領域部の個
数の制限内(全個数から1を減じた個数分)で同期処理
を同時に制御することが可能となり、キャッシュ5への
操作を停止することなく、キャッシュ5と主記憶3との
同期処理を行なうことができる。
The post-synchronization invalid flag set during the processing waiting for the synchronization is treated in the same manner as the post-synchronization invalid flag set in the cache area during synchronization. In this way, in addition to the effect of the first embodiment, it is possible to further provide a cache area section that is waiting for synchronization, so that when there is a cache area section that is in synchronization, further synchronization processing is required. You can also deal with it. At this time, it is possible to simultaneously control the synchronous processing within the limit of the number of cache area parts provided in the cache 5 (the number obtained by subtracting 1 from the total number), and stop the operation to the cache 5. Instead, the cache 5 and the main memory 3 can be synchronized.

【0091】また、第1実施例における他の更新方法を
用いることにより、同期中のキャッシュ領域部のみでな
く同期待ち中のキャッシュ領域部についても、正のキャ
ッシュ領域部であったときに更新されていない項目につ
いては副のキャッシュ領域部に対する処理と同じように
することができる。 (C)次に、第3実施例について説明する。
Further, by using the other updating method in the first embodiment, not only the cache area portion in synchronization but also the cache area portion waiting for synchronization is updated when it is a positive cache area portion. For items that are not filled, the same process as for the sub cache area can be performed. (C) Next, a third embodiment will be described.

【0092】第3実施例では、第2実施例における各キ
ャッシュ領域8−1,8−2,8−3,8−4内のキャ
ッシュメモリ10を2つの領域に分けて、それぞれの領
域に対して制御できるようにするものである。
In the third embodiment, the cache memory 10 in each of the cache areas 8-1, 8-2, 8-3 and 8-4 in the second embodiment is divided into two areas, and each area is divided into two areas. It can be controlled.

【0093】第3実施例における構成は、前述した第2
実施例と同じものとする(ただし、キャッシュ領域部8
−k内のキャッシュメモリ10に対するコントローラ9
による制御が異なる)。また、キャッシュ5を使用して
の主記憶3への読み書き処理は、図7に示す方法により
実現できる。また、キャッシュ5と主記憶3の内容の同
期の処理が要求された場合、図10に示す処理を行なう
ことで同期の処理を行なうものとする(ただし、ステッ
プC3の処理が不要となる)。
The structure of the third embodiment is similar to that of the second embodiment.
The same as the embodiment (however, the cache area unit 8
Controller 9 for cache memory 10 in -k
Control by different). Further, the read / write processing to the main memory 3 using the cache 5 can be realized by the method shown in FIG. Further, when the processing for synchronizing the contents of the cache 5 and the main memory 3 is requested, the processing shown in FIG. 10 is performed to perform the processing for synchronization (however, the processing of step C3 is unnecessary).

【0094】コントローラ9は、キャッシュメモリ10
内の、キャッシュ5の更新を直接反映させる対象となる
最大の項目数が、キャッシュメモリ10で物理的に保持
することができる最大の項目数の半分以下となるように
制御する。(従って、第2実施例の構成と同一のキャッ
シュ容量を維持するためには、各キャッシュ領域部のキ
ャッシュメモリ10の物理的なメモリ容量を倍以上にす
る必要がある。) すなわち、同期中のキャッシュ領域部におけるコントロ
ーラ9は、キャッシュメモリ10の分割して使用する一
方の領域について、同期処理が開始された後に、キャッ
シュ5への変更が生じた際には、更新のあった内容を主
記憶3へ書き込む処理を行なっている間は無視されるさ
れるようにする同期後無効フラグを、該当する項目に対
応してセットすると共に、他方の領域についてキャッシ
ュメモリ10の物理的な最大量を上限として使用して、
他の副のキャッシュ領域部に行なわれる項目の変更と同
一の変更を行なう。
The controller 9 uses the cache memory 10
The maximum number of items in which the update of the cache 5 is directly reflected is controlled to be half or less of the maximum number of items that can be physically held in the cache memory 10. (Therefore, in order to maintain the same cache capacity as the configuration of the second embodiment, it is necessary to double the physical memory capacity of the cache memory 10 in each cache area section.) That is, during synchronization. The controller 9 in the cache area unit stores the updated contents in the main memory when the change to the cache 5 occurs after the synchronization process is started for one of the areas of the cache memory 10 to be divided and used. The post-synchronization invalid flag, which is set to be ignored during the process of writing to 3, is set corresponding to the corresponding item, and the upper limit of the physical maximum amount of the cache memory 10 for the other area is set. Using as
The same change as the item change made to the other sub cache area section is made.

【0095】これにより、同期中のキャッシュ領域部に
おいても、項目の内容の更新を受け付けることが可能と
なり、各キャッシュ領域部が単体で最新のキャッシュ5
の内容を保持することが可能となる。
As a result, it becomes possible to receive the update of the contents of the item even in the cache area section during synchronization, and each cache area section is the latest cache 5 by itself.
It is possible to retain the contents of.

【0096】第3実施例においては、キャッシュ5上の
ある項目について、キャッシュメモリ10の上での物理
的な位置は、キャッシュ領域部ごとに同一の位置にある
ことは保証されない。処理の対象とする主記憶3の物理
アドレスの内容に対応する項目が、キャッシュ5中に存
在するかどうかは、それぞれのキャッシュ領域部で全て
の項目に対応する項目状態データを調べて、無効フラグ
21がセットされていない項目全ての主記憶3上での物
理的なアドレス20を調べることで判定する。存在する
ことが判定されれば、同時に、その物理的なアドレスの
内容を保持していた項目が判明する。
In the third embodiment, it is not guaranteed that an item on the cache 5 has the same physical position on the cache memory 10 for each cache area. Whether or not the item corresponding to the content of the physical address of the main memory 3 to be processed exists in the cache 5 is checked by checking the item state data corresponding to all the items in each cache area section and the invalid flag. The determination is made by checking the physical addresses 20 on the main memory 3 of all the items for which 21 is not set. If it is determined that the physical address exists, the item that holds the content of the physical address is determined at the same time.

【0097】主記憶3の物理的なアドレスに対応する項
目がキャッシュ5に存在するか否かの判定、及び主記憶
3の物理的なアドレスに対応する項目が存在するキャッ
シュ5上の位置が判明した後の処理は、正のキャッシュ
領域部及び副のキャッシュ領域部に対しては、前述した
第2実施例と同じである。
It is determined whether an item corresponding to the physical address of the main memory 3 exists in the cache 5, and the position on the cache 5 where the item corresponding to the physical address of the main memory 3 exists is found. The processing after this is the same as that of the second embodiment described above for the positive cache area portion and the secondary cache area portion.

【0098】対象とする物理アドレスに対応する項目が
キャッシュ5に存在した場合で、読み込みの処理である
場合、正のキャッシュ領域部に格納された該当する項目
の内容を取り出し、データ処理装置4に転送する。
When the item corresponding to the target physical address exists in the cache 5 and the process is a read process, the contents of the corresponding item stored in the positive cache area portion are extracted and stored in the data processing device 4. Forward.

【0099】書き込みの処理である場合、正のキャッシ
ュ領域部のキャッシュメモリ10に書き込みを行ない、
該当する項目のキャッシュ領域部の状態を示すデータ構
造の更新フラグ19の正のキャッシュ領域部に対応する
フラグをセットする。副のキャッシュ領域部について
は、キャッシュメモリ10に内容の更新のみを行なう。
同期中のキャッシュ領域部及び同期待ち中のキャッシュ
領域部については、更新フラグ19を参照して、その項
目に変更があったかどうかを調べる。変更があった場合
は、同期中のキャッシュ領域部の同期後無効フラグ18
をセットするとともに、新たに無効フラグ17がセット
されている対象とする項目、すなわちキャッシュメモリ
10中の他方の領域における項目を同期中のキャッシュ
領域部から探し、その項目に対して、副のキャッシュ領
域部に行なった処理と同一の処理を行なう。更新がなか
った場合は、副のキャッシュ領域部と同一の処理を行な
う。
In the case of writing processing, writing is performed in the cache memory 10 in the positive cache area portion,
The flag corresponding to the positive cache area portion of the update flag 19 of the data structure indicating the state of the cache area portion of the corresponding item is set. Regarding the sub cache area portion, only the contents are updated in the cache memory 10.
For the cache area portion in synchronization and the cache area portion waiting for synchronization, the update flag 19 is referred to check whether or not the item has been changed. If there is a change, the post-synchronization invalid flag 18 of the cache area portion being synchronized
Is set and the target item for which the invalid flag 17 is newly set, that is, the item in the other area of the cache memory 10 is searched for from the cache area section in synchronization, and a secondary cache for that item is set. The same processing as that performed on the area portion is performed. If there is no update, the same processing as the sub cache area section is performed.

【0100】このようにして、キャッシュ5の内容と主
記憶3との同期をとる処理を開始する際に、前述した第
1実施例及び第2実施例において発生する、最新の内容
を他のキャッシュ領域部から複写する必要があるか否か
を判定する処理、及び判定の結果に応じて実際に複写す
る処理による時間的な遅れを解消し、さらに高速な処理
を可能とすることができる。また、第2実施例で必要と
なる次に正となるキャッシュ領域部への複写の必要がな
いため、副のキャッシュ領域部が1つもない状態であっ
ても、正のキャッシュ領域部をキャッシュ5の内容と主
記憶3の同期を待つ状態にすることが可能となる。 (D)次に、第4実施例について説明する。
In this way, when the process of synchronizing the contents of the cache 5 with the main memory 3 is started, the latest contents generated in the above-described first and second embodiments are stored in another cache. It is possible to eliminate the time delay due to the process of determining whether or not it is necessary to copy from the area portion, and the process of actually copying according to the result of the determination, and it is possible to realize higher-speed processing. Further, since copying to the next positive cache area portion required in the second embodiment is not necessary, even if there is no sub cache area portion, the positive cache area portion is cached 5 It becomes possible to wait for the synchronization between the contents of the main memory 3 and the contents of. (D) Next, a fourth embodiment will be described.

【0101】第4実施例では、第2実施例における各キ
ャッシュ領域8−1,8−2,8−3,8−4内に2つ
のキャッシュメモリを設けた構成とし、通常の書き込み
に使用するか、あるいは拡張した書き込みに使用するか
を指定することが可能とするものである。
In the fourth embodiment, two cache memories are provided in each of the cache areas 8-1, 8-2, 8-3, 8-4 in the second embodiment and used for normal writing. It is possible to specify whether to use it for extended writing.

【0102】第4実施例におけるキャッシュ領域部は、
図11に示すような構成となっている。図11に示すよ
うに、キャッシュ領域部には、コントローラ39、2つ
のキャッシュメモリ40a,40bが設けられている。
コントローラ39は、2つのキャッシュメモリ40a,
40bの制御を行なう。キャッシュメモリ40a,40
bは、一方を元のキャッシュメモリ、他方を拡張的なキ
ャッシュメモリとして使用される。
The cache area portion in the fourth embodiment is
The configuration is as shown in FIG. As shown in FIG. 11, a controller 39 and two cache memories 40a and 40b are provided in the cache area section.
The controller 39 has two cache memories 40a,
40b is controlled. Cache memory 40a, 40
One of b is used as an original cache memory and the other is used as an expansive cache memory.

【0103】図12は、キャッシュメモリ40a,40
bの一つの項目の状態を示す項目状態データのデータ構
造を示している。項目状態データは、各キャッシュ領域
部8−kのキャッシュメモリ40a,40b中の複数の
項目のそれぞれに対応して設けられ、コントローラ6に
置かれる。項目状態データには、対応する項目が保持す
るデータの主記憶3上での物理的なアドレス20、当該
項目の内容が無効であることを示すフラグ21(無効フ
ラグ)が設けられている。また、対応する項目が保持す
るデータの物理メモリ上での位置を示すアドレスが、各
キャッシュ領域部8−kに対応して設けられている。ま
た、各キャッシュ領域部8−kに対応して、それぞれ、
通常の書き込みのために元のキャッシュメモリと拡張的
なキャッシュメモリのどちらを使用するかを示すフラグ
23(以下、選択フラグ)、更新のあったキャッシュの
内容を主記憶3に書き込む処理を行なっている間は無視
され、項目の内容が無効であることを示すフラグ24
(同期後無効フラグ)、項目の内容が変更されたことを
示すフラグ25(更新フラグ)が設けられている。同期
後無効フラグ24がセットされた項目については、同期
処理の間にキャッシュの内容を変更する処理要求があっ
た場合に変更されず(主記憶3に書き込むべき内容を保
持し続ける)、同期処理後には内容が変更されていない
ために無効とされる。
FIG. 12 shows the cache memories 40a, 40.
The data structure of the item state data which shows the state of one item of b is shown. The item state data is provided corresponding to each of a plurality of items in the cache memories 40a and 40b of each cache area unit 8-k, and is placed in the controller 6. The item status data is provided with a physical address 20 of the data held by the corresponding item on the main memory 3, and a flag 21 (invalid flag) indicating that the content of the item is invalid. An address indicating the position on the physical memory of the data held by the corresponding item is provided for each cache area unit 8-k. Also, corresponding to each cache area unit 8-k,
A flag 23 (hereinafter referred to as a selection flag) indicating whether to use the original cache memory or the extended cache memory for normal writing, and a process of writing the updated cache content to the main memory 3 are performed. Flag 24 indicating that the item is invalid while
A (post-synchronization invalid flag) and a flag 25 (update flag) indicating that the content of the item has been changed are provided. The items for which the post-synchronization invalid flag 24 is set are not changed when the processing request for changing the contents of the cache is issued during the synchronization processing (the contents to be written in the main memory 3 are continuously held), and the synchronization processing is performed. It is later invalidated because the contents have not been changed.

【0104】第4実施例では、キャッシュ5を使用して
の主記憶3への読み書き処理は、図7に示す方法により
実現できる。また、キャッシュ5と主記憶3の内容の同
期の処理が要求された場合、図10に示す処理を行なう
ことで同期の処理を行なうものとする。
In the fourth embodiment, the read / write processing to the main memory 3 using the cache 5 can be realized by the method shown in FIG. Further, when the processing for synchronizing the contents of the cache 5 and the main memory 3 is requested, the processing shown in FIG. 10 is performed to perform the processing for synchronization.

【0105】データ処理装置4が主記憶3のある物理ア
ドレスが示す位置に格納されたデータに対して読み書き
処理を行なう際には、データ処理装置4から出力された
対象とする物理アドレスをもとに、キャッシュ5におい
て必要なアドレスのデータを保持しているか否かを調べ
る。
When the data processing device 4 performs a read / write process with respect to the data stored at the position indicated by a certain physical address in the main memory 3, the target physical address output from the data processing device 4 is used as a basis. First, it is checked whether or not the cache 5 holds data at a necessary address.

【0106】キャッシュコントローラ6は、主記憶3に
存在するキャッシュ5の各項目に対応する項目状態デー
タに格納された物理アドレス20を全て参照し、求める
物理アドレスに対応する項目がキャッシュ5内に存在す
るかどうかを調べる。
The cache controller 6 refers to all the physical addresses 20 stored in the item status data corresponding to each item of the cache 5 existing in the main memory 3, and the item corresponding to the desired physical address exists in the cache 5. Find out whether to do.

【0107】各キャッシュ領域部8−kは、図11に示
すように2つのキャッシュメモリ40a,40bを保持
している。キャッシュコントローラ6は、該当する項目
に対応する項目状態データの選択フラグ23を参照し、
通常の書き込み用と拡張した書き込み用のうち、通常の
書き込み用を示す一方のキャッシュメモリを選択する。
Each cache area 8-k holds two cache memories 40a and 40b as shown in FIG. The cache controller 6 refers to the selection flag 23 of the item status data corresponding to the corresponding item,
Of the normal writing and the extended writing, one cache memory indicating the normal writing is selected.

【0108】正および副のキャッシュ領域部への変更さ
れる内容を格納するキャッシュメモリ、及び同期中のキ
ャッシュ領域部で同期処理のために参照されるキャッシ
ュメモリとして、通常の書き込み用のキャッシュメモリ
を使用する。
A normal write cache memory is used as a cache memory for storing changed contents in the primary and secondary cache area parts and a cache memory referred to for synchronization processing in the synchronizing cache area part. use.

【0109】また、同期中のキャッシュ領域部で、通常
の書き込み用のキャッシュメモリの側が変更を受けてい
る際には、次のようにして拡張した書き込み用のキャッ
シュメモリを使用する。
When the normal write cache memory side is modified in the synchronizing cache area, the write cache memory extended as follows is used.

【0110】同期中、及び同期待ち中のキャッシュ領域
部において、書き込みまたは項目の無効化の処理が必要
となった際には、更新フラグ25を参照し、その項目が
変更を受けているかどうかを調べる。
When it is necessary to write or invalidate an item in the cache area that is being synchronized or is waiting for synchronization, the update flag 25 is referred to and whether or not the item has been changed is checked. Find out.

【0111】変更を受けている場合は、その項目に対応
する項目状態データの該当するキャッシュ領域部に対応
して同期後無効フラグ24をセットするとともに、選択
フラグ23を拡張した書き込み用のキャッシュメモリの
側を示すように設定し、同キャッシュメモリに対して、
副のキャッシュ領域部と同一の処理を行なう。すなわ
ち、拡張した書き込み用のキャッシュメモリに最新のキ
ャッシュ5の内容を保持させる。
If the item has been changed, the post-synchronization invalid flag 24 is set corresponding to the corresponding cache area portion of the item state data corresponding to the item, and the selection flag 23 is extended to the write cache memory. Set to indicate the side of, and for the same cache memory,
Performs the same processing as the sub cache area section. In other words, the expanded cache memory for writing holds the latest contents of the cache 5.

【0112】同期処理が終了した後、同期後無効フラグ
24がセットされている項目について、無効フラグ21
をセットするとともに、拡張した書き込み用のキャッシ
ュメモリを選択するように設定された選択フラグ24を
反転、すなわち通常の書き込み用のキャッシュメモリ側
に、通常の書き込みの対象を交換する。
After the synchronization processing is completed, the invalid flag 21 is set for the item for which the post-synchronization invalid flag 24 is set.
Is set, and the selection flag 24 set to select the extended write cache memory is inverted, that is, the normal write target is exchanged with the normal write cache memory side.

【0113】変更を受けていない場合は、通常の書き込
み用のキャッシュメモリの側に、副のキャッシュ領域部
と同一の処理を行なう。キャッシュの項目の無効化が必
要となった際には、全てのキャッシュ領域部にわたって
その項目が無効であるかどうかを管理する無効フラグ2
1をリセットする。
If no change has been made, the same processing as the sub cache area section is performed on the side of the normal write cache memory. When it becomes necessary to invalidate an item in the cache, an invalid flag 2 that manages whether the item is invalid over the entire cache area.
Reset 1

【0114】このようにして、キャッシュ5の内容と主
記憶3との同期をとる処理を開始する際に、前述した第
1実施例及び第2実施例において発生する、最新の内容
を他のキャッシュ領域部から複写する必要があるか否か
を判定する処理、及び判定の結果に応じて実際に複写す
る処理による時間的な遅れを解消することができる。ま
た、第2実施例で必要となる次に正となるキャッシュ領
域部への複写の必要がないため、副のキャッシュ領域部
が1つもない状態であっても、正のキャッシュ領域部を
キャッシュ5の内容と主記憶3の同期を待つ状態にする
ことが可能となる。
In this way, when the process of synchronizing the contents of the cache 5 with the main memory 3 is started, the latest contents generated in the above-mentioned first and second embodiments are stored in another cache. It is possible to eliminate the time delay due to the process of determining whether or not it is necessary to copy from the area portion and the process of actually copying according to the result of the determination. Further, since copying to the next positive cache area portion required in the second embodiment is not necessary, even if there is no sub cache area portion, the positive cache area portion is cached 5 It becomes possible to wait for the synchronization between the contents of the main memory 3 and the contents of.

【0115】さらに、全てのキャッシュ領域部8−kに
おいて、実際にキャッシュ5の項目の位置が同一である
ことが保証されるため、各キャッシュ領域部に対する更
新処理の際に、全ての項目に対応する項目状態データを
参照した項目位置を判別する処理が不要となる。これに
よって、第3実施例において生じる、キャッシュ5に対
する処理を行なう際に、キャッシュ領域ごとに物理的な
位置を確認するために必要となる時間的な遅れを解消
し、さらに高速な処理を可能とすることができる。
Furthermore, since it is guaranteed that the positions of the items of the cache 5 are actually the same in all the cache area parts 8-k, all the items are dealt with in the update processing for each cache area part. The process of determining the item position with reference to the item state data to be performed is unnecessary. This eliminates the time delay required for confirming the physical position for each cache area when performing the processing for the cache 5 in the third embodiment, and enables the processing at higher speed. can do.

【0116】[0116]

【発明の効果】以上詳述したように本発明によれば、キ
ャッシュに保持された内容の主記憶への書き込みとキャ
ッシュへの更新処理を並列的に行なうことを可能にする
ことによって、情報処理装置の性能を向上させることが
可能となるものである。
As described above in detail, according to the present invention, it is possible to write the content held in the cache to the main memory and update the cache in parallel, thereby processing information. It is possible to improve the performance of the device.

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

【図1】本発明が適用される情報処理装置の構成の一例
を示す図。
FIG. 1 is a diagram showing an example of a configuration of an information processing apparatus to which the present invention is applied.

【図2】図1中におけるデータ処理ユニット1の構成を
示す図。
FIG. 2 is a diagram showing a configuration of a data processing unit 1 in FIG.

【図3】図2中におけるキャッシュ5の構成を示す図。FIG. 3 is a diagram showing a configuration of a cache 5 in FIG.

【図4】図3中におけるキャッシュ領域部の構成を示す
図。
FIG. 4 is a diagram showing a configuration of a cache area unit in FIG.

【図5】キャッシュ5中の各キャッシュ領域部8−kの
状態を示すデータ(キャッシュ領域部状態データ)のデ
ータ構造を示す図。
FIG. 5 is a diagram showing a data structure of data (cache area portion state data) showing a state of each cache area portion 8-k in the cache 5;

【図6】キャッシュメモリ10の一つの項目の状態を示
す項目状態データのデータ構造を示す図。
FIG. 6 is a diagram showing a data structure of item state data showing the state of one item in the cache memory 10.

【図7】本発明におけるキャッシュ5を使用して主記憶
3への読み書きを行なう際の処理の内容を示すフローチ
ャート。
FIG. 7 is a flowchart showing the contents of processing when reading / writing data from / to the main memory 3 using the cache 5 according to the present invention.

【図8】各キャッシュ領域部8−kの状態とキャッシュ
5を使用した主記憶3への操作の種類ごとの具体的な処
理を示す図。
FIG. 8 is a diagram showing the state of each cache area unit 8-k and specific processing for each type of operation to the main memory 3 using the cache 5;

【図9】本発明の第1実施例におけるキャッシュ5と主
記憶3のそれぞれに格納された内容の同期をとる同期処
理が要求された場合の処理手順を示すフローチャート。
FIG. 9 is a flowchart showing a processing procedure when a synchronization process for synchronizing the contents stored in each of the cache 5 and the main memory 3 is requested in the first embodiment of the present invention.

【図10】本発明の第2,第3,第4実施例におけるキ
ャッシュ5と主記憶3のそれぞれに格納された内容の同
期をとる同期処理が要求された場合の処理手順を示すフ
ローチャート。
FIG. 10 is a flowchart showing a processing procedure when a synchronization process for synchronizing the contents stored in the cache 5 and the contents stored in the main memory 3 is requested in the second, third, and fourth embodiments of the present invention.

【図11】本発明の第4実施例におけるキャッシュ領域
部の構成を示す図。
FIG. 11 is a diagram showing the configuration of a cache area unit in the fourth embodiment of the present invention.

【図12】本発明の第4実施例における項目状態データ
のデータ構造を示す図。
FIG. 12 is a diagram showing a data structure of item state data in the fourth example of the present invention.

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

1…データ処理ユニット(プロセッサエレメント:P
E)、2…通信路、3…主記憶(メモリエレメント:M
E)、4…データ処理装置(CPU)、5…キャッシ
ュ、6…キャッシュコントローラ、7…通信路、8−
1,8−2,8−3,8−4…キャッシュ領域部(キャ
ッシュセグメント)、9,39…コントローラ、10,
40a,40b…キャッシュメモリ、17…無効フラ
グ、18,24…同期後無効フラグ、19,25…更新
フラグ、23…選択フラグ。
1 ... Data processing unit (processor element: P
E), 2 ... communication path, 3 ... main memory (memory element: M
E), 4 ... Data processing device (CPU), 5 ... Cache, 6 ... Cache controller, 7 ... Communication path, 8-
1, 8-2, 8-3, 8-4 ... Cache area section (cache segment), 9, 39 ... Controller, 10,
40a, 40b ... Cache memory, 17 ... Invalid flag, 18, 24 ... Synchronous invalid flag, 19, 25 ... Update flag, 23 ... Selection flag.

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 更新のあったキャッシュの内容を主記憶
へ書き込み、キャッシュと主記憶との内容の同期を取る
同期処理を、一定の条件下でのみ間欠的に行なう情報処
理装置において、 キャッシュを同一の容量を持つ二つ以上のキャッシュ領
域として多重化し、 キャッシュへの操作は、全てのキャッシュ領域に同時に
内容の更新を行ない、その際に、一つのキャッシュ領域
の書き込みの処理においてのみキャッシュの内容が更新
されたことを示す痕跡を残し、かつ、他の全てのキャッ
シュ領域に対してはキャッシュの内容が更新されたこと
を示す痕跡を残さずに行ない、 更新のあったキャッシュの内容を主記憶へ書き込む同期
処理の要求が生じた際には、内容が更新されたことを示
す痕跡を残す処理を行なうキャッシュ領域を他のキャッ
シュ領域の一つに変更し、 内容が更新されたことを示す痕跡を残していたキャッシ
ュ領域では、同期処理の開始後にキャッシュの内容に変
更が生じた項目について、データの変更は行なわず、同
期処理の終了後に無効化すべきことを示す痕跡のみを残
し、 同期処理が終了した後に、同期処理の終了後に無効化す
べきことを示す痕跡が残された項目の無効化を行ない、 同期処理が終了した後は、各キャッシュ領域に対して同
時にキャッシュの更新を行なう処理を再開し、 再び同期処理を開始する際には、キャッシュの内容が更
新されたことを示す痕跡を残すキャッシュ領域が、キャ
ッシュの内容が更新されたことを示す痕跡を持つ項目を
持ち、かつ同期処理の開始後に更新が行なわれたために
更新内容が保持されていない項目を他のキャッシュ領域
が保持している場合、この項目全てについて内容を他の
キャッシュ領域に複写してから、更新のあったキャッシ
ュの内容の主記憶への書き込みを開始し、 同期処理とキャッシュへの更新処理とを並行して行なう
ことを特徴とするキャッシュメモリ一貫性保持方法。
1. A cache in an information processing device for intermittently performing a synchronization process for writing the updated contents of a cache to a main memory and synchronizing the contents of the cache and the main memory only under a certain condition. Multiplexed as two or more cache areas with the same capacity, the operation to the cache updates the contents of all cache areas at the same time, and at that time, the cache contents are written only in one cache area. Of the cache that has been updated, and for all other cache areas without leaving a trace that the contents of the cache have been updated. When there is a request for synchronous processing to write to the cache area, a cache area that leaves a trace that the content has been updated In the cache area, which was changed to one of the areas and left a trace that the content was updated, data is not changed for items whose cache content has changed after the start of synchronous processing, and synchronous processing is not performed. After leaving the synchronization process, only the trace indicating that it should be invalidated is left, and after the synchronization process ends, the item that has the trace indicating that it should be invalidated after the synchronization process is invalidated is Restarts the cache update process for each cache area at the same time, and when the synchronization process is started again, the cache area that leaves a trace that the cache content has been updated Items that have traces indicating that they have been updated, and items that have not been updated because the update was performed after the start of synchronization processing are stored in another cache area. If the area holds it, copy the contents of all this items to another cache area, then start writing the contents of the updated cache to the main memory, and perform the synchronization process and the update process to the cache. A method for maintaining coherency in cache memory, which is characterized by performing parallel processing.
【請求項2】 前記同期処理の要求が生じた際に、 キャッシュへの内容の更新を示す痕跡を残していたキャ
ッシュ領域の変更のあった項目に対し、同期処理の開始
後にキャッシュの内容に変更がさらに生じた場合のみ、
データの変更は行なわず、更新のあったキャッシュの内
容の主記憶への書き込み処理の終了後に無効化すべきこ
とを示す痕跡のみを残し、 キャッシュへの内容の変更を示す痕跡を残していなかっ
たキャッシュ領域の変更のなかった箇所に対し、同期処
理の開始後にキャッシュの内容の変更が生じた場合は、
キャッシュの内容が更新されたことを示す痕跡を残さず
にキャッシュへの更新を行なうことを特徴とする請求項
1記載のキャッシュメモリ一貫性保持方法。
2. When the synchronous processing request is made, the cache area is changed after the synchronous processing is started with respect to the item whose cache area has been changed, which leaves a trace indicating the update of the content to the cache. Only if
A cache that does not change data, leaves only a trace that it should be invalidated after the processing of writing the contents of the updated cache to the main memory is completed, and does not leave a trace that the contents of the cache have been changed. If there is a change in the cache content after the start of synchronization processing for the area where the area has not changed,
2. The cache memory coherency holding method according to claim 1, wherein the cache memory is updated without leaving a trace that the content of the cache has been updated.
【請求項3】 同期処理を行なっている最中に、重ねて
更新のあったキャッシュの内容を主記憶に書き込む処理
を行なう要求が生じた際に、 同期処理を行なうために使用している領域に対する更新
の処理と同一の処理を行なうが主記憶への書き込みの処
理は行なわない領域をさらに増やし、 同期処理が終了した時点で、重ねて要求のあったキャッ
シュの内容を主記憶に書き込む処理を実行することを特
徴とする請求項1または請求項2記載のキャッシュメモ
リ一貫性保持方法。
3. An area used for performing the synchronous processing when a request for writing the contents of the cache that has been repeatedly updated into the main memory occurs during the synchronous processing. The same processing as the update processing to the main memory, but not the processing to write to the main memory is further increased, and when the synchronous processing ends, the processing to write the contents of the cache that has been repeatedly requested to the main memory The cache memory coherency holding method according to claim 1 or 2, wherein the method is executed.
【請求項4】 各キャッシュ領域において、キャッシュ
上に物理的に保持することができる最大の個数の項目数
の半分を、キャッシュの更新を直接反映させるキャッシ
ュ領域で保持する最大の項目数とする制御を行ない、 同期処理が開始された後は、キャッシュの内容の更新の
あったことを示す痕跡を残していたキャッシュ領域に対
しては、同期処理の開始後にキャッシュの内容に変更が
生じた箇所についてデータの更新は行なわず主記憶への
書き込み処理の終了後に無効化すべきことを示す痕跡を
残すと同時に、使用されていない他の半分の項目に対し
て更新内容を書き込む処理を行ない、 再び同一のキャッシュ領域が同期処理に使用される際に
は、キャッシュ領域に保持されているデータを使用する
ことを特徴とする請求項1、請求項2、または請求項3
記載のキャッシュメモリ一貫性保持方法。
4. A control in which, in each cache area, half of the maximum number of items physically held in the cache is set as the maximum number of items held in the cache area that directly reflects the cache update. For the cache area that left a trace that the contents of the cache were updated after the synchronous process was started, the location where the cache contents were changed after the synchronous process was started. Data is not updated and a trace indicating that it should be invalidated is left after the write processing to the main memory is completed.At the same time, the update content is written to the other half unused items, and the same process is performed again. 3. When the cache area is used for synchronous processing, the data held in the cache area is used. Or claim 3
Cache memory coherency retention method described.
【請求項5】 各キャッシュ領域は、同容量の2つのキ
ャッシュメモリを有し、各キャッシュ領域において、各
項目ごとに2つのキャッシュメモリを通常の書き込み用
と拡張した書き込み用の何れかに割り当て、 キャッシュの内容を更新する際には、各キャッシュ領域
の通常の書き込み用に割り当てられたキャッシュメモリ
に対して同時に更新を行ない、同期処理が開始された後
は、キャッシュへの内容の更新を示す痕跡を残していた
キャッシュ領域に対しては、通常の書き込み用のキャッ
シュメモリの更新のあった内容を主記憶に書き込む処理
を行なうと同時に、同期処理の開始後にキャッシュの内
容に変更が生じた箇所についてデータの更新は行なわず
主記憶への書き込み処理の終了後に無効化すべきことを
示す痕跡を通常の書き込み用のキャッシュメモリに対し
て残すとともに、拡張した書き込み用に設定されたキャ
ッシュメモリに対して更新内容を書き込む処理を行な
い、 同期処理が終了した後、拡張した書き込み用に設定され
たキャッシュメモリに対して更新内容を書き込む処理を
行なったキャッシュ領域においては、通常の書き込み用
と拡張した書き込み用との役割の割り当てを交換し、拡
張した書き込み用のキャッシュ領域への書き込みが行な
われた際も、通常の書き込み用のキャッシュメモリとの
対応する位置を使用することを特徴とする請求項1、請
求項2、または請求項3記載のキャッシュメモリ一貫性
保持方法。
5. Each cache area has two cache memories of the same capacity, and in each cache area, two cache memories are allocated to each item for normal writing and extended writing, When updating the cache contents, the cache memory allocated for normal writing in each cache area is updated at the same time, and after synchronization processing is started, a trace indicating the update of the contents to the cache. For the cache area that has been left behind, the process of writing the updated contents of the cache memory for normal writing to the main memory, and at the same time changing the contents of the cache after starting the synchronous process For normal writing, there is a trace that the data should not be updated and should be invalidated after the main memory write processing is completed. The update contents are written to the cache memory set for extended writing while remaining in the cache memory, and after the synchronization process is completed, the cache memory set for extended writing is updated. In the cache area where the contents are written, the roles of normal writing and extended writing are exchanged, and even when writing to the extended writing cache area, normal writing is performed. 4. A cache memory coherency method according to claim 1, claim 2 or claim 3, characterized in that a corresponding location with a cache memory for the same is used.
【請求項6】 更新のあったキャッシュの内容を主記憶
へ書き込み、キャッシュと主記憶との内容の同期を取る
ための同期処理を、一定の条件下で間欠的に行なう情報
処理装置において、 前記キャッシュは、データを記憶する領域を多重化する
ための複数のキャッシュ領域手段を有し、 前記キャッシュ領域手段のそれぞれは、 データを項目単位で格納するためのキャッシュメモリ
と、同キャッシュメモリ中の各項目の状態を示す項目状
態データを格納するための項目状態データ格納手段と、
前記項目状態データ格納手段に格納されたデータに応じ
て、前記キャッシュメモリに対して項目毎に制御する制
御手段とを有し、 項目の更新については全てのキャッシュ領域手段に対し
て同時に行ない、その際に、一つのキャッシュ領域にお
いてのみ書き込み処理でキャッシュの内容が更新された
ことを前記項目状態データ格納手段に設定し、 更新のあったキャッシュの内容を主記憶へ書き込む同期
処理の要求が生じた際には、前記項目状態データ格納手
段にキャッシュへの内容の更新を示すことが設定された
キャッシュ領域手段を他のキャッシュ領域手段の一つに
変更し、同期処理の開始後にキャッシュの内容に変更が
生じた箇所について、前記キャッシュメモリ中のデータ
の変更は行なわず、前記項目状態データ格納手段に同期
処理の終了後に無効化すべきことを設定し、 同期処理が終了した後に、前記制御手段は、同期処理の
終了後に無効化すべきことを示す設定された項目の無効
化を行ない、 同期処理が終了した後は、各キャッシュ領域手段に対し
て同時にキャッシュの更新を行なう処理を再開し、 再び更新処理を開始する際には、キャッシュの内容が更
新されたことを前記項目状態データ格納手段に設定され
たキャッシュ領域手段が、キャッシュの内容が更新され
た項目を持ち、かつ同期処理の開始後に更新が行なわれ
たために更新内容が保持されていない項目を他のキャッ
シュ領域手段が保持している場合、この項目全てについ
て内容を他のキャッシュ領域に複写してから、更新のあ
ったキャッシュの内容の主記憶への書き込みを開始し、 同期処理とキャッシュへの更新処理を並行して行なうこ
とを特徴とする情報処理装置。
6. An information processing apparatus for intermittently performing a synchronization process for writing the updated contents of a cache to a main memory and synchronizing the contents of the cache and the main memory under a certain condition, The cache has a plurality of cache area means for multiplexing an area for storing data, and each of the cache area means has a cache memory for storing data in item units and each of the cache memory means. Item state data storage means for storing item state data indicating the state of the item,
And a control means for controlling the cache memory for each item according to the data stored in the item state data storage means, and updating of the items is performed to all the cache area means at the same time. At this time, the fact that the cache content was updated by the write processing in only one cache area was set in the item state data storage means, and a request for synchronous processing to write the updated cache content to the main memory occurred. In this case, the cache area means in which the item state data storage means is set to indicate the update of the content to the cache is changed to one of the other cache area means, and the content of the cache is changed after the synchronization processing is started. The data in the cache memory is not changed at the location where After the completion of the synchronization processing, the control means performs the invalidation of the set item indicating that the synchronization processing is to be invalidated, and after the synchronization processing is completed, , The cache area set in the item state data storage means that the contents of the cache are updated when restarting the processing of updating the cache for each cache area means at the same time and restarting the update processing again. If the means has an item whose cache content has been updated, and another cache area means holds an item whose update content is not held because the update was performed after the start of the synchronization processing, all of this item After copying the contents to another cache area, start writing the updated cache contents to the main memory, and The information processing apparatus characterized by performing in parallel the update process.
【請求項7】 前記項目状態データ格納手段には、複数
のキャッシュ領域手段のそれぞれに関して、キャッシュ
メモリ中の物理的な位置を示すデータと、有効であるこ
とを示すフラグと、主記憶への書き込みの処理開始後に
キャッシュの内容に変更が生じた箇所についてデータの
変更は行なわず、更新のあったキャッシュの内容の主記
憶への書き込み処理の終了後に無効化すべきことを示す
フラグと、更新されたことを示すフラグが設定されるこ
とを特徴とする請求項6記載の情報処理装置。
7. The item state data storage means, for each of the plurality of cache area means, data indicating a physical position in the cache memory, a flag indicating that the data is valid, and writing to the main memory. The data is not changed at the location where the cache content has changed after the start of the processing of 1. and the flag indicating that it should be invalidated after the completion of the writing processing of the updated cache content to the main memory, and the updated 7. The information processing apparatus according to claim 6, wherein a flag indicating that is set.
【請求項8】 前記制御手段は、前記キャッシュメモリ
上に物理的に保持することができる最大の個数の項目数
の半分を、キャッシュの更新を直接反映させるキャッシ
ュ領域で保持する最大の項目数とする制御を行ない、 同期処理が開始された後は、キャッシュの内容の更新の
あったことを前記項目状態データ格納手段に設定したキ
ャッシュ領域手段に対しては、前記項目状態データ格納
手段に、主記憶への書き込みの処理開始後にキャッシュ
の内容に変更が生じた項目についてデータの更新は行な
わず同期処理の終了後に無効化すべきことを設定すると
同時に、使用されていない他の半分の項目に対して更新
内容を書き込む処理を行ない、 再び同期処理に使用される際には、他の半分の項目に対
する書き込む処理による更新内容を使用することを特徴
とする請求項6、請求項7記載の情報処理装置。
8. The control means sets half of the maximum number of items physically held in the cache memory as the maximum number of items held in a cache area that directly reflects a cache update. After the synchronization processing is started, the cache area means that has been set in the item state data storage means that the cache contents have been updated is For items whose cache contents have changed after the start of the process of writing to the memory, set that the data should not be updated and should be invalidated after the end of the synchronization process, and at the same time for the other half of the unused items The update contents are written, and when they are used again for the synchronization process, the updates made by the writing process for the other half items are used. Claim 6, wherein the door, the information processing apparatus according to claim 7 wherein.
【請求項9】 前記キャッシュ領域手段のそれぞれは、
同容量の2つのキャッシュメモリを有し、前記制御手段
は、各項目ごとに2つのキャッシュメモリを通常の書き
込み用と拡張した書き込み用の何れかに割り当て、 キャッシュの内容を更新する際には、通常の書き込み用
に割り当てられたキャッシュメモリに対して同時に更新
を行ない、同期処理が開始された後は、前記項目状態デ
ータ格納手段にキャッシュへの内容の更新を示すことが
設定されていれば、通常の書き込み用のキャッシュメモ
リの更新のあった内容を主記憶に書き込む処理を行なう
と同時に、前記通常の書き込み用のキャッシュメモリに
対して、同期処理の開始後にキャッシュの内容に変更が
生じた箇所についてデータの更新は行なわず主記憶への
書き込み処理の終了後に無効化すべきことを前記項目状
態データ格納手段に設定するとともに、拡張した書き込
み用に設定されたキャッシュメモリに対して更新内容を
書き込む処理を行ない、 同期処理が終了した後、拡張した書き込み用に設定され
たキャッシュメモリに対して更新内容を書き込む処理を
行なっていれば、通常の書き込み用と拡張した書き込み
用との役割の割り当てを交換し、拡張した書き込み用の
キャッシュ領域への書き込みが行なわれた際も、通常の
書き込み用のキャッシュメモリとの対応する位置を使用
することを特徴とする請求項6、請求項7記載の情報処
理装置。
9. Each of the cache area means comprises:
The control means has two cache memories of the same capacity, and the control means allocates the two cache memories for each item to either normal writing or extended writing and updates the contents of the cache. If the cache memory allocated for normal writing is updated at the same time, and after the synchronous processing is started, it is set that the item state data storage means indicates the content update to the cache, A place where the contents of the cache for normal writing are changed after the synchronous process is started at the same time that the process of writing the updated contents of the cache memory for ordinary writing to the main memory is performed. Data is not updated and the item state data storage means is set to invalidate after completion of the writing process to the main memory. Setting, the process of writing the updated contents to the cache memory set for extended writing, and the process of writing the updated contents to the cache memory set for extended writing after the synchronization process ends. , The role assignments for normal writing and extended writing are exchanged, and even when writing to the extended writing cache area is performed, the normal writing cache memory The information processing apparatus according to claim 6, wherein the corresponding position is used.
JP7043090A 1995-03-02 1995-03-02 Cache memory consistency holding method and information processor Pending JPH08241248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7043090A JPH08241248A (en) 1995-03-02 1995-03-02 Cache memory consistency holding method and information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7043090A JPH08241248A (en) 1995-03-02 1995-03-02 Cache memory consistency holding method and information processor

Publications (1)

Publication Number Publication Date
JPH08241248A true JPH08241248A (en) 1996-09-17

Family

ID=12654150

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7043090A Pending JPH08241248A (en) 1995-03-02 1995-03-02 Cache memory consistency holding method and information processor

Country Status (1)

Country Link
JP (1) JPH08241248A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6545978B1 (en) * 1998-04-24 2003-04-08 Fujitsu Limited Network managing method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6545978B1 (en) * 1998-04-24 2003-04-08 Fujitsu Limited Network managing method and system

Similar Documents

Publication Publication Date Title
KR100641988B1 (en) Method to provide atomic update primitives in an asymmetric heterogeneous multiprocessor environment
US7664900B2 (en) Multiprocessor system and method for processing memory access
JP2002528814A (en) Distributed transaction processing system and method
CA2182841C (en) Multi-processor system and method for synchronizing among processors
KR20180063820A (en) An apparatus and method for transferring data between address ranges in memory
JP2021519456A (en) Adjusting cache memory behavior
CN115373877A (en) Control method and device for ensuring consistency of shared cache by heterogeneous multi-core processor
US6701392B1 (en) Hierarchical approach to indentifying changing device characteristics
JP2011008674A (en) Duplex information processing system and synchronization method
JPH08241248A (en) Cache memory consistency holding method and information processor
JP5168800B2 (en) Multiprocessor system
US20050278482A1 (en) Method and system for data processing for controlling a cache memory
JP3381086B2 (en) Exclusive controllable multiprocessor system
JP3288261B2 (en) Cash system
JPH0944402A (en) Device and method for controlling storage matching of cache memory
JPH03172943A (en) Cache memory control system
US11288195B2 (en) Data processing
JPH0744459A (en) Cache control method and cache controller
JPS5928287A (en) Cache buffer controller
JPH0667979A (en) Control system for main storage device
JPH08202622A (en) Cache control method for distributed memory constitution
JPH04296950A (en) Cache memory device
JP2001166992A (en) Multi-processor system
JP2000076179A (en) System bus optimization system
JPH05225147A (en) Multiprocessor type data processing system