JP2000339220A - Cache block reserving method and computer system with cache block reserving function - Google Patents

Cache block reserving method and computer system with cache block reserving function

Info

Publication number
JP2000339220A
JP2000339220A JP11148475A JP14847599A JP2000339220A JP 2000339220 A JP2000339220 A JP 2000339220A JP 11148475 A JP11148475 A JP 11148475A JP 14847599 A JP14847599 A JP 14847599A JP 2000339220 A JP2000339220 A JP 2000339220A
Authority
JP
Japan
Prior art keywords
physical page
cache
physical
color
thread
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
JP11148475A
Other languages
Japanese (ja)
Inventor
Atsushi Mitsuzawa
敦 光澤
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP11148475A priority Critical patent/JP2000339220A/en
Publication of JP2000339220A publication Critical patent/JP2000339220A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To make cache storage possible to be used by real time application. SOLUTION: Main storage is divided into physical pages, a set of indexes to be obtained from all addresses to be included in the physical page by a hash device is defined as color and the physical pages to be included in the main storage are classified by color IDs. In the case of execution of the real time application, when an allocation request to a storage area to be permanently arranged, namely, in which no paging is generated is performed by defining a virtual address, the size and a thread ID of the storage area as a subtracting number, the thread ID and the color ID are managed so that the physical page with specified color ID is allocated from a set of the physical pages managed for real time thread and the remaining physical page with color IDs are not allocated to other threads.

Description

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

【0001】[0001]

【発明が属する技術分野】本発明は、コンピュータシス
テムが演算装置と、アドレス変換装置と、記憶装置を有
し、該記憶装置が主記憶装置と、演算装置と主記憶装置
との間に高速なキャッシュ記憶装置を有し、前記コンピ
ュータシステムがリアルタイムアプリケーションを実行
する時、その実行にあたって、一つまたは複数のキャッ
シュブロックを独占的に使用するために予約する方法お
よびその方法を実施するための装置に関する。
BACKGROUND OF THE INVENTION The present invention relates to a computer system comprising an arithmetic unit, an address translator, and a storage unit, wherein the storage unit is a high-speed storage unit between the main storage unit and the arithmetic unit and the main storage unit. A method for reserving one or more cache blocks for exclusive use in executing a real-time application when the computer system executes a real-time application, and an apparatus for implementing the method. .

【0002】[0002]

【従来の技術】マルチメディアメール、電子会議、遠隔
コントロール、およびバーチャルリアリティのようなリ
アルタイムアプリケーションが知られている。リアルタ
イムアプリケーションは、動画像や音声のように、絶え
間なく変化する信号を、早くもなく、遅くもなく、厳格
な時間的要求のもとで、絶え間なく処理することが要求
される。もし、一定時間毎に正しく処理ができず、処理
が遅れたり、または早すぎたりすると、画像や音声の乱
れをもたらす。例えば、テレビ画像をコンピュータシス
テムで処理するには、一画面分の画像処理を一秒あたり
30回行う必要がある。これには、一画面分の画像処理
が1/30秒以下である必要があり、かつ、一画面分の
画像処理を厳格に1/30秒間隔で起動することが必要
である。もし、一画面分の画像処理時間にばらつきがあ
る場合には、最長の処理時間となる最悪な状況でも、一
画面分の画像処理が、1/30秒以下である必要があ
る。このように、コンピュータシステムで、リアルタイ
ムアプリケーションを実行するには、処理時間の正確な
予測が保証される必要があり、処理時間にばらつきがあ
る場合においては、最長の処理時間の正確な予測が保証
される必要がある。
2. Description of the Related Art Real-time applications such as multimedia mail, electronic conferencing, remote control, and virtual reality are known. Real-time applications are required to process constantly changing signals, such as moving images and sounds, quickly, not late and under strict time requirements. If processing cannot be performed correctly at regular time intervals and the processing is delayed or performed too early, the image or sound is disturbed. For example, in order to process a television image by a computer system, it is necessary to perform image processing for one screen 30 times per second. For this purpose, the image processing for one screen needs to be 1/30 second or less, and the image processing for one screen needs to be started strictly at 1/30 second intervals. If the image processing time for one screen varies, the image processing for one screen needs to be 1/30 second or less even in the worst case where the longest processing time is required. As described above, in order to execute a real-time application on a computer system, it is necessary to guarantee an accurate prediction of the processing time, and when the processing time varies, an accurate prediction of the longest processing time is guaranteed. Need to be done.

【0003】処理時間の正確な予測が保証されるための
要件の一つは、演算装置がデータをアクセスする時間が
予測可能であることである。コンピュータシステムが主
記憶とキャッシュ記憶を備えている場合、アクセス時間
は、キャッシュ記憶がヒットした時は、キャッシュ記憶
にある当該データをアクセスする時間になり、最も短
く、キャッシュ記憶がミスした時は、主記憶にある当該
データを含むキャッシュブロック全体をキャッシュ記憶
に転送する時間になり、主記憶装置がバーストモード転
送の機能を持つ場合、キャッシュ記憶を備えていない時
の時間と同一になり、キャッシュ記憶がミスした時で、
かつ当該キャッシュブロックの置き換えが必要な時で、
かつ当該キャッシュブロックを主記憶へ書き戻す必要が
あった時は、当該キャッシュブロックを主記憶に書き戻
す時間と主記憶にある当該データを含むキャッシュブロ
ック全体をキャッシュ記憶に転送する時間の和になり、
キャッシュ記憶を備えていない時のおおよそ二倍の時間
となる。このように、アクセス時間は、キャッシュ記憶
がヒットするか否かに、大きく影響される。キャッシュ
記憶がヒットするか否かは、他のスレッドが同時にキャ
ッシュ記憶を使用するか否かに大きく影響されるので、
リアルタイムアプリケーションがキャッシュ記憶の一部
または全部を独占的に使用することが保証されるのでな
ければ、アクセス時間は非決定的にばらつく。この場
合、アクセス時間の予測は、最長のアクセス時間であ
る、キャッシュブロックを主記憶に書き戻す時間と主記
憶にある当該データを含むキャッシュブロック全体をキ
ャッシュ記憶に転送する時間の和になる。この理由によ
って、従来の記憶管理方法は、リアルタイムアプリケー
ションを実行する時に、キャッシュ記憶を使用不可に設
定し、データへのアクセス時間が、主記憶にある当該デ
ータをアクセスする時間になるようにすることによっ
て、アクセス時間を決定的にして、アクセス時間の予測
可能性を保証していた。
One of the requirements for guaranteeing an accurate prediction of the processing time is that the time at which the arithmetic unit accesses data can be predicted. If the computer system has a main memory and a cache memory, the access time is the time to access the data in the cache memory when the cache memory hits, and the shortest, and when the cache memory misses, This is the time for transferring the entire cache block including the data in the main memory to the cache memory. When the main memory has a burst mode transfer function, the time becomes the same as the time when the cache memory is not provided. When I made a mistake,
And when it is necessary to replace the cache block,
When it is necessary to write the cache block back to the main memory, the sum of the time for writing the cache block back to the main memory and the time for transferring the entire cache block including the data in the main memory to the cache memory is obtained. ,
This is about twice as long as when there is no cache memory. Thus, the access time is greatly affected by whether or not the cache storage hits. Whether or not the cache storage hits is greatly affected by whether or not other threads use the cache storage at the same time.
Unless it is guaranteed that a real-time application will exclusively use some or all of the cache storage, access times will vary non-deterministically. In this case, the prediction of the access time is the sum of the longest access time, that is, the time to write back the cache block to the main memory and the time to transfer the entire cache block including the data in the main memory to the cache memory. For this reason, the conventional storage management method disables cache storage when executing a real-time application so that the access time to data is the time to access the data in main storage. Thus, the access time is decisive and the predictability of the access time is guaranteed.

【0004】[0004]

【発明が解決しようとする課題】このような記憶管理方
法によってリアルタイムアプリケーションを実行する時
には、データへのアクセスが常に主記憶へのアクセスと
なるので、演算装置の実行サイクルのほとんどがデータ
待ちになり、高速動作が必要なリアルタイムアプリケー
ションの実行には、高速な主記憶が必要になる。しか
し、主記憶の高速アクセス可能性と、主記憶に要求され
ている他の条件、例えば、主記憶がある程度の記憶容量
を持たなければならないという条件とは必ずしも両立し
ない。そのため、主記憶とキャッシュ記憶を有する、動
作周波数の高い演算装置を持つコンピュータシステムに
おいても、従来、リアルタイムアプリケーションの高速
な実行が行われていなかった。
When a real-time application is executed by such a storage management method, access to data is always access to main storage, so that most of execution cycles of the arithmetic unit wait for data. In order to execute a real-time application requiring a high-speed operation, a high-speed main memory is required. However, high-speed accessibility of the main memory is not always compatible with other conditions required for the main memory, for example, a condition that the main memory must have a certain storage capacity. Therefore, even in a computer system having an arithmetic unit having a high operating frequency and having a main memory and a cache memory, conventionally, high-speed execution of a real-time application has not been performed.

【0005】本発明の目的は、上述したような従来の記
憶管理方法が有する欠点に鑑みてなされたもので、リア
ルタイムアプリケーションがキャッシュ記憶を利用する
ことを可能にし、リアルタイムアプリケーションが使用
するキャッシュブロックが他のリアルタイムアプリケー
ションや、オペレーティングシステムや、非リアルタイ
ムアプリケーションの実行によって変更されることを確
実に回避することによって、リアルタイムアプリケーシ
ョンの実行時において、アクセス時間が非決定的にばら
つくことを回避し、予測されるアクセス時間として、主
記憶へのアクセス時間より短い時間を保証することによ
り、リアルタイムアプリケーションのより高速な処理を
行うことができるキャッシュブロック予約方法およびそ
の装置を提供することにある。
An object of the present invention has been made in view of the above-mentioned drawbacks of the conventional storage management method, and makes it possible for a real-time application to use cache storage so that a cache block used by the real-time application can be used. Ensure that access times do not vary non-deterministically when running real-time applications by ensuring that they are not modified by the execution of other real-time applications, operating systems, or non-real-time applications Provided is a cache block reservation method and device capable of performing higher-speed processing of a real-time application by guaranteeing an access time shorter than an access time to a main memory. In the door.

【0006】[0006]

【課題を解決するための手段】本発明のキャッシュブロ
ック予約方法は、演算装置と、アドレス変換装置と、記
憶装置を有し、該記憶装置が主記憶装置と、演算装置と
主記憶装置との間に高速なキャッシュ記憶装置を有し、
キャッシュ記憶装置はハッシュ装置とキャッシュブロッ
クの集合からなり、キャッシュ記憶装置はインデックス
によってキャッシュブロックの位置を指定し、キャッシ
ュ記憶装置は、演算装置が要求したデータの物理アドレ
スの一部を用いて、ハッシュ装置によってインデックス
を生成する物理アドレスキャッシュ記憶装置であり、前
記キャッシュ記憶装置は、ハッシュ装置が使用するアル
ゴリズムがモジュロハッシングアルゴリズムであり、前
記キャッシュ記憶装置は、ハッシュ装置が生成するイン
デックスの個数が、キャッシュブロック数より小さい整
数Nである、Nウェイセットアソシアティブキャッシュ
記憶装置である、コンピュータシステムによって実施さ
れる。以下の記述において、上記のコンピュータシステ
ムを「本発明を実施するためのコンピュータシステム」
と記す。
A cache block reserving method according to the present invention includes an arithmetic unit, an address translating unit, and a storage unit, and the storage unit includes a main storage unit, an arithmetic unit, and a main storage unit. Has a high-speed cache storage device in between,
The cache storage device is composed of a hash device and a set of cache blocks. The cache storage device specifies the position of the cache block by an index, and the cache storage device uses a part of the physical address of the data requested by the arithmetic device to perform the hashing. A physical address cache storage device that generates an index by a device, wherein the cache storage device uses a modulo hashing algorithm as an algorithm used by the hash device; and the cache storage device stores the index number generated by the hash device as a cache. Implemented by a computer system that is an N-way set associative cache storage, where N is an integer less than the number of blocks. In the following description, the above computer system is referred to as a "computer system for implementing the present invention."
It is written.

【0007】前掲の目的を達成するために、本発明のキ
ャッシュブロック予約方法は、主記憶装置が有する主記
憶を、物理ページに分割し、物理ページに含まれる全て
のアドレスからハッシュ装置によって得られるインデッ
クスの集合をカラーと定義し、主記憶に含まれる物理ペ
ージを、カラーIDで類別し、リアルタイムアプリケー
ションの実行時において、現在未使用なカラーIDの集
合から、一つまたは複数のカラーIDを選択し、その選
択されたカラーIDをもつ物理ページを、当該リアルタ
イムアプリケーションを実行するスレッドが独占的に使
用することができるように、スレッドIDとカラーID
とを管理する。
In order to achieve the above object, a cache block reserving method according to the present invention divides a main memory of a main memory into physical pages, and obtains the data from all addresses included in the physical pages by a hash device. A set of indices is defined as a color, physical pages included in main memory are classified by color ID, and one or more color IDs are selected from a set of color IDs that are currently unused when executing a real-time application. The thread ID and the color ID are set so that the physical page having the selected color ID can be exclusively used by the thread executing the real-time application.
And manage.

【0008】本発明のキャッシュブロック予約機能付き
コンピュータシステムは、本発明を実施するためのコン
ピュータシステムであって、物理ページ管理手段を有す
ることを特徴とする。物理ページ管理手段は、主記憶に
ある物理ページを、カラーIDで類別し、リアルタイム
アプリケーションの実行時において、現在未使用のカラ
ーIDの集合から、一つまたは複数のカラーIDを選択
し、その選択されたカラーIDをもつ物理ページを、当
該リアルタイムアプリケーションを実行するスレッドが
独占的に使用することができるように、スレッドIDと
カラーIDとを管理する機能を備えている。
[0008] A computer system with a cache block reservation function according to the present invention is a computer system for implementing the present invention, characterized by having physical page management means. The physical page management means classifies the physical pages in the main memory by a color ID, and selects one or a plurality of color IDs from a set of currently unused color IDs at the time of execution of the real-time application, and selects the selected color ID. It has a function of managing the thread ID and the color ID so that the thread executing the real-time application can exclusively use the physical page having the given color ID.

【0009】物理ページ管理手段は、物理ページ管理部
と、ページング管理部と、カーネル記憶管理部とを有す
る。物理ページ管理部は、当該コンピュータシステムが
起動された時に、アドレス変換装置が動作していない状
態で、その時点で使用されていない主記憶の領域を、物
理ページに分割し、カラーIDを付与し、いくつかのカ
ラーIDをもつ物理ページをリアルタイムスレッドとオ
ペレーティングシステム用とし、それらの物理ページを
カラーIDとスレッドIDと物理ページ番号を用いて管
理し、それ以外のカラーIDを持つ物理ページを非リア
ルタイムスレッド用として管理する。
The physical page management means has a physical page management unit, a paging management unit, and a kernel storage management unit. When the computer system is started, the physical page management unit divides an unused area of the main storage into physical pages and assigns a color ID when the address translation device is not operating at the time. The physical pages having some color IDs are used for the real-time thread and the operating system, the physical pages are managed using the color ID, the thread ID, and the physical page number, and the physical pages having the other color IDs are not used. Manage for real-time threads.

【0010】カーネル記憶管理部は、他のアプリケーシ
ョンと同一のキャッシュブロックをアクセスしないよう
に(キャッシュブロックのアクセスが衝突しないよう
に)スレッドIDを指定して物理ページを取得する。カ
ーネル記憶管理部は、また、オペレーティングシステム
が、ネットワークバッファや、スレッド構造体や、ファ
イル構造体をはじめとする、オペレーティングシステム
内部に作成するデータ構造体のための、記憶領域の割当
機能を有する。
The kernel storage management unit acquires a physical page by specifying a thread ID so as not to access the same cache block as another application (so that access to the cache block does not conflict). The kernel storage management unit also has a function of allocating a storage area for a data structure created inside the operating system, such as a network buffer, a thread structure, and a file structure, by the operating system.

【0011】ページング管理部は、リアルタイムアプリ
ケーションがキャッシュブロックをアクセスする時、オ
ペレーティングシステムや他のアプリケーションと衝突
しないように、スレッドIDを指定して物理ページを取
得した後、アドレス変換装置を用いて、仮想ページ番号
から物理ページ番号への変換を行うためのページ表を構
築する機能を有する。また、ページング管理部は、非リ
アルタイムアプリケーションが、物理ページを取得する
時に、当該非リアルタイムアプリケーションによるキャ
ッシュブロックのアクセスが、オペレーティングシステ
ムやリアルタイムアプリケーションによるアクセスと衝
突しないように、ページ表を構築する機能を有する。こ
の時、当該非リアルタイムアプリケーションのキャッシ
ュブロックへのアクセスが、他の非リアルタイムアプリ
ケーションと衝突する可能性は排除しない。
[0011] When the real-time application accesses the cache block, the paging management unit specifies a thread ID to acquire a physical page so as not to collide with the operating system or another application, and then uses an address translation device. It has a function of constructing a page table for converting a virtual page number into a physical page number. Further, the paging management unit has a function of constructing a page table so that when a non-real-time application acquires a physical page, access of the cache block by the non-real-time application does not conflict with access by the operating system or the real-time application. Have. At this time, the possibility that the access of the non-real-time application to the cache block collides with another non-real-time application is not excluded.

【0012】物理ページ管理部は、リアルタイムアプリ
ケーションの実行時において、データへのアクセスが主
記憶またはキャッシュ記憶へのアクセスになることを保
証するために、主記憶に常駐する、すなわち、ページン
グが生じない記憶領域の割当要求を、記憶領域の仮想ア
ドレスと、大きさと、スレッドIDとを引数として行っ
た時、従来の物理ページ管理方法のように、引数なしで
呼び出されて、任意の物理ページを割り当てるのではな
く、リアルタイムスレッド用に管理されている物理ペー
ジの集合から、特定のカラーIDを持つ物理ページを割
り当て、該カラーIDを持つ残りの物理ページを、他の
スレッドに割り当てられないように予約する。
[0012] The physical page manager resides in main memory to ensure that access to data is to main storage or cache storage during execution of the real-time application, ie, no paging occurs. When a storage area allocation request is made using the virtual address, size, and thread ID of the storage area as arguments, it is called without an argument to allocate an arbitrary physical page as in the conventional physical page management method. Instead of allocating a physical page with a specific color ID from a set of physical pages managed for real-time threads, reserve the remaining physical pages with the color ID so that they cannot be allocated to other threads I do.

【0013】このように、主記憶を物理ページごとに、
カラーIDを用いて類別し、リアルタイムアプリケーシ
ョンが、特定のカラーIDを持つ物理ページの集合を、
独占的に使用できるように、スレッドIDとカラーID
とを管理することによって、アプリケーションを変更せ
ずに、リアルタイムアプリケーションのキャッシュ記憶
へのアクセスが他のスレッドと衝突することが確実に回
避される。
As described above, the main memory is stored for each physical page.
Classifying using color IDs, the real-time application classifies a set of physical pages having a specific color ID into
Thread ID and color ID for exclusive use
And that the access to the cache storage of the real-time application does not conflict with other threads without changing the application.

【0014】本発明においては、主記憶を物理ページご
とに、カラーIDを用いて類別するのであるから、キャ
ッシュ記憶装置のハッシュ装置は、主記憶をページ単位
で類別できなければならない。モジュロハッシングアル
ゴリズムでは、主記憶の連続した物理ページは、キャッ
シュ記憶の連続した位置にマップされる。例えば、図1
は、16Kバイトの容量をもつ1ウェイセットアソシア
ティブキャッシュ記憶を有し、ページサイズが4Kバイ
トである場合、どのように物理ページがキャッシュ記憶
上にマップされるかを示している。
In the present invention, since the main memory is classified for each physical page using the color ID, the hash device of the cache storage device must be able to classify the main memory in page units. In the modulo hashing algorithm, successive physical pages of main storage are mapped to successive locations of cache storage. For example, FIG.
Shows how a physical page is mapped onto cache storage when it has a 1-way set associative cache storage with a capacity of 16K bytes and the page size is 4K bytes.

【0015】図1からわかるように、どの5番目の物理
ページもみなキャッシュ記憶のはじめに回り込んでい
る。同じ模様の物理ページはすべて同じ模様のキャッシ
ュ記憶の部分にマップされる。本発明においては、それ
ぞれの模様をカラーと定義し、物理ページとカラーID
との関係を次式で定義している(請求項2)。
As can be seen from FIG. 1, every fifth physical page wraps around to the beginning of cache storage. All physical pages with the same pattern are mapped to portions of cache storage with the same pattern. In the present invention, each pattern is defined as a color, and a physical page and a color ID are defined.
Is defined by the following equation (claim 2).

【0016】いま、Nウェイセットアソシアティブキャ
ッシュ記憶装置の容量をCABバイト、ページサイズを
PGBバイトとする時、主記憶のカラー数COTは、 COT = CAB /( PGB * N) (1) になる。本発明においては、物理ページ番号PFNの物
理ページと、カラーIDであるCOIとの関係を次式 COI= PFN mod COT (2) で定義する。
When the capacity of the N-way set associative cache storage device is CAB bytes and the page size is PGB bytes, the number of colors COT of the main memory is as follows: COT = CAB / (PGB * N) (1) In the present invention, the relationship between the physical page having the physical page number PFN and the color ID COI is defined by the following equation: COI = PFN mod COT (2)

【0017】[0017]

【作用】上記の物理ページ管理方法を用いることによ
り、リアルタイムアプリケーションが、オペレーティン
グシステムに対して、物理ページの割当を要求して記憶
割当要求を発行した時には、当該リアルタイムアプリケ
ーションに対して、あるカラーIDで特徴づけられる物
理ページを割り当て、この物理ページと同一のカラーI
Dを持つ物理ページは、他のリアルタイムアプリケーシ
ョンや、オペレーティングシステムや、非リアルタイム
アプリケーションに割り当てられないことを保証するこ
とにより、結果的に当該リアルタイムアプリケーション
に対して、一つまたは複数のキャッシュブロックが予約
される。
By using the above physical page management method, when a real-time application requests the operating system to allocate a physical page and issues a storage allocation request, a certain color ID is assigned to the real-time application. , And assigns the same color I as the physical page.
Physical pages with a D are guaranteed not to be allocated to other real-time applications, operating systems, or non-real-time applications, resulting in one or more cache blocks being reserved for that real-time application. Is done.

【0018】このように、リアルタイムアプリケーショ
ンが、一つまたは複数のキャッシュブロックを独占的に
使用するための予約をし、予約したキャッシュブロック
のみを用いて実行を行うことにより、あるスレッドによ
るキャッシュブロックのアクセスが他のスレッドによる
キャッシュブロックのアクセスと競合することがなくな
り、アクセス時間が非決定的にばらつくことが回避さ
れ、アクセス時間の予測可能性を、主記憶へのアクセス
時間より短い時間で実現することができ、リアルタイム
アプリケーションで必要とされる処理時間の予測可能な
計算をより高速に行うことが可能となる。
As described above, the real-time application makes a reservation for exclusive use of one or a plurality of cache blocks, and executes by using only the reserved cache blocks. To ensure that access does not conflict with access to the cache block by other threads, avoid non-deterministic access time, and achieve predictable access time in less time than main memory access time This makes it possible to calculate the processing time required for a real-time application in a predictable manner at a higher speed.

【0019】[0019]

【発明の実施の形態】図2は、本発明のキャッシュブロ
ック予約方法を実施するために用いられるコンピュータ
システムの構成の一例を示すブロック図である。本実施
形態によるコンピュータシステムは、演算装置21、ア
ドレス変換装置22、主記憶23、キャッシュ記憶2
4、補助記憶25、ページング管理部26、および物理
ページ管理部27を備えている。また、コンピュータシ
ステムは、複数のアプリケーションのそれぞれに、あた
かも、広大な線形に広がった固有の記憶領域が使えるか
のように見せる多重仮想アドレス空間による仮想記憶を
論理的機能として有し、かつ、当該複数のアプリケーシ
ョンを同時に動作させる多重プログラミングを論理的機
能として有する。
FIG. 2 is a block diagram showing an example of the configuration of a computer system used to implement a cache block reservation method according to the present invention. The computer system according to the present embodiment includes an arithmetic unit 21, an address translator 22, a main memory 23, and a cache memory 2.
4, an auxiliary storage 25, a paging management unit 26, and a physical page management unit 27. Further, the computer system has, as a logical function, a virtual memory based on a multiple virtual address space that makes it appear as if a plurality of applications have a unique storage area that is vast and linearly spread. It has multiple programming as a logical function to operate multiple applications simultaneously.

【0020】仮想記憶ではアプリケーションは、同一サ
イズのページに分割され、主記憶23は物理ページに分
割される。アプリケーションのページは、補助記憶25
に常駐し、そのアプリケーションが実行されていない時
には、補助記憶25のみに格納されているが、実行時に
は、さらに主記憶23の物理ページを占有することがで
きる。
In the virtual storage, the application is divided into pages of the same size, and the main storage 23 is divided into physical pages. The application page is stored in the auxiliary storage 25.
When the application is not executed, it is stored only in the auxiliary storage 25. However, at the time of execution, the physical page of the main storage 23 can be occupied further.

【0021】ページング管理部27は、仮想アドレス空
間毎にページ表を管理し、ページ表はアプリケーション
の各ページがどこにあるかを示す情報を保持する。すな
わち、そのアプリケーションの物理ページ番号、また
は、補助記憶25上のI/Oアドレスを保持する。実行
中のアプリケーションが、仮想アドレス空間の特定のデ
ータをアクセスした時、もし、そのデータが物理ページ
中にも存在しているなら、そのアクセスは通常通り進行
する。もし、そうでない場合には、ページフォルト割込
が発生し、その失敗したアクセスが再試行で成功するよ
うに、ページング管理部26が主記憶23を調整する
(後述)。
The paging management unit 27 manages a page table for each virtual address space, and the page table holds information indicating where each page of the application is located. That is, it holds the physical page number of the application or the I / O address on the auxiliary storage 25. When a running application accesses specific data in the virtual address space, if the data is also present in a physical page, the access proceeds normally. If not, a page fault interrupt occurs, and the paging management unit 26 adjusts the main memory 23 so that the failed access succeeds by retry (described later).

【0022】アドレス変換装置22は、仮想記憶におけ
るもっとも重要なハードウェアであり、アプリケーショ
ンの実行時に、ある1バイトのデータがアクセスされた
時に、演算装置21で生成された、該当データの仮想ア
ドレスを受け取って、それに対応する主記憶23の物理
ページ内の1バイトのデータを指定する物理アドレスを
出力する。この変換は、ページング管理部26に仮想ペ
ージ番号を送り、ページング管理部が当該アプリケーシ
ョンのページ表から、物理ページ番号を得ることによっ
て行われるが、ページング管理部26がページ表を主記
憶上で管理していると、アドレス変換が非常に遅いもの
になる。そこで、変換にかかる時間を許される程度に抑
える目的で、アドレス変換装置22に、特別な連想レジ
スタを備えさせ、その上にページ表の一部を保持し、変
換動作が演算装置21の他の動作とオーバーラップして
行えるようになっているのが一般的である。要求された
ページが、物理ページに存在していない時には、アドレ
ス変換装置がページフォルト割込を発生させる。
The address translator 22 is the most important hardware in virtual storage. When one byte of data is accessed at the time of executing an application, the address translator 22 translates the virtual address of the data generated by the arithmetic unit 21. Upon receiving the data, it outputs a physical address designating 1-byte data in the physical page of the main memory 23 corresponding to the received data. This conversion is performed by sending the virtual page number to the paging management unit 26, and the paging management unit obtains the physical page number from the page table of the application. The paging management unit 26 manages the page table on the main memory. Address translation is very slow. Therefore, for the purpose of suppressing the time required for the conversion to an allowable level, the address conversion device 22 is provided with a special associative register, a part of the page table is held thereon, and the conversion operation is performed by another operation device. Generally, the operation can be performed overlapping with the operation. When the requested page is not present in the physical page, the address translator generates a page fault interrupt.

【0023】物理ページ管理部27は、主記憶中の物理
ページのうち、 現在、オペレーティングシステムまた
はアプリケーションによって使われていない物理ページ
を管理する。
The physical page management unit 27 manages physical pages that are not currently used by the operating system or the application among the physical pages in the main memory.

【0024】ページフォルト割込は、ページング管理部
26が処理する。例えば、実行中のアプリケーション
が、補助記憶25中にはあるが、物理ページを占有して
いないページをアクセスした場合には、ページング管理
部26は、まず、物理ページ管理部27に対して、物理
ページの割当を要求する。物理ページ管理部は、主記憶
中の物理ページのうち、 現在、オペレーティングシス
テムまたはアプリケーションによって使われていない物
理ページのうち、一つの物理ページの物理ページ番号を
返す。ページング管理部26は、次に、そのアプリケー
ションの仮想アドレス空間を管理するページ表の該当ペ
ージを管理するエントリから、そのページの補助記憶2
5中でのI/Oアドレスを得る。ページング管理部26
は、最後に、物理ページ番号とI/Oアドレスを指定し
て、補助記憶25にあるページを物理ページに転送し、
ページ表のI/Oアドレスを物理ページ番号で置き換え
た後、アプリケーションの実行を再開する。
The page fault interruption is processed by the paging management unit 26. For example, if the running application accesses a page that is in the auxiliary storage 25 but does not occupy the physical page, the paging management unit 26 first sends the physical page management unit 27 Request page allocation. The physical page management unit returns the physical page number of one of the physical pages in the main memory that is not currently used by the operating system or the application. Next, the paging management unit 26 reads, from the entry for managing the corresponding page in the page table for managing the virtual address space of the application, the auxiliary storage 2 for the page.
5. Get the I / O address in 5. Paging management unit 26
Finally, the page in the auxiliary storage 25 is transferred to the physical page by designating the physical page number and the I / O address,
After replacing the I / O address in the page table with the physical page number, the execution of the application is resumed.

【0025】本実施形態のコンピュータシステムには、
主記憶23と、演算装置21と主記憶23との間に高速
キャッシュ記憶24がある。キャッシュ記憶24は、そ
れが存在していることをアプリケーションが完璧に、ま
たは、ほとんど意識しないですむように作られている。
そのため、アプリケーション自体はアドレスによって主
記憶をアクセスし続けるだけであり、キャッシュ記憶2
4はそれを制御するハードウェアによって自動的にアク
セスされる。演算装置21が、アクセスしようとする主
記憶のアドレスを生成する時、そのアドレスはキャッシ
ュ記憶24に送られ、ハードウェアがキャッシュ記憶2
4を検索してアドレスに対応するデータを探す。そのデ
ータがキャッシュ記憶24に存在すれば、あたかも主記
憶23から読み込まれたかのように、データは演算装置
21に転送される。もし、そのデータがキャッシュ記憶
24に存在しなければ、アドレスはキャッシュ記憶24
を通り過ぎて主記憶23まで届き、そこでアドレス付け
された場所がアクセスされる。この場合、データはキャ
ッシュ記憶24と演算装置21に転送される。空間的局
所性を利用するために、キャッシュ記憶24には、演算
装置21がアクセスしようとしているデータを含むブロ
ック全体が転送される。
The computer system according to the present embodiment includes:
There is a main memory 23 and a high-speed cache memory 24 between the arithmetic unit 21 and the main memory 23. The cache store 24 is designed so that the application is completely or almost unaware that it exists.
Therefore, the application itself only keeps accessing the main memory by the address.
4 is automatically accessed by the hardware controlling it. When the arithmetic unit 21 generates an address of the main memory to be accessed, the address is sent to the cache memory 24, and the hardware executes the cache memory 2
4 to search for data corresponding to the address. If the data exists in the cache memory 24, the data is transferred to the arithmetic unit 21 as if it were read from the main memory 23. If the data does not exist in cache store 24, the address is
And reaches the main memory 23, where the addressed location is accessed. In this case, the data is transferred to the cache storage 24 and the arithmetic unit 21. To take advantage of spatial locality, the entire block containing the data that the arithmetic unit 21 is trying to access is transferred to the cache storage 24.

【0026】キャッシュ記憶24の目的は、演算装置2
1に、主記憶23よりも速くデータを転送することにあ
る。そのために、演算装置21が要求したデータのアド
レスが与えられたなら、そのデータに対するキャッシュ
記憶24の検索は高速でなければならない。また、検索
技法は、高速ハードウェアの実現が実用的でかつ経済的
であるように単純でなければならない。そのため、キャ
ッシュ記憶24は単純化されたハッシュテーブル技法を
使って検索を行うことが一般的で、本実施形態のキャッ
シュ記憶24では、モジュロハッシングアルゴリズムを
用いて検索している。キャッシュ記憶24を検索するに
は、演算装置からのアドレスをハッシュし、キャッシュ
記憶24の一つまたはN個のキャッシュブロックへのイ
ンデックスを生成する。生成されたインデックスの個数
をセット連想度と呼び、セット連想度が1であるものを
1ウェイセットアソシアティブキャッシュ記憶またはダ
イレクトマップキャッシュ記憶と呼び、セット連想度が
1より大きくかつキャッシュブロック数より小さいもの
を、セットアソシアティブキャッシュ記憶と呼び、セッ
ト連想度がキャッシュブロック数に等しいものを、フル
アソシアティブキャッシュ記憶と呼ぶ。本実施形態で
は、ダイレクトマップキャッシュ記憶または、セットア
ソシアティブキャッシュ記憶が用いられている。
The purpose of the cache memory 24 is to
First, data is transferred faster than the main memory 23. Therefore, if the address of the data requested by the arithmetic unit 21 is given, the search of the cache memory 24 for the data must be performed at a high speed. Also, the search technique must be simple so that high speed hardware implementations are practical and economical. For this reason, the cache memory 24 is generally searched using a simplified hash table technique. In the cache memory 24 according to the present embodiment, the search is performed using a modulo hashing algorithm. To search the cache store 24, the address from the arithmetic unit is hashed and an index to one or N cache blocks in the cache store 24 is generated. The number of generated indices is called a set associativity, and a set associativity of 1 is called a one-way set associative cache storage or a direct map cache storage, and the set associativity is larger than 1 and smaller than the number of cache blocks. Are referred to as set associative cache storage, and those whose set associativity is equal to the number of cache blocks are referred to as full associative cache storage. In the present embodiment, direct map cache storage or set associative cache storage is used.

【0027】キャッシュ記憶24は、インデックスを生
成するために用いるデータのアドレスとして、仮想アド
レスか物理アドレスのどちらか一方を使うように設計す
ることができ、仮想アドレスを使うものを仮想アドレス
キャッシュ記憶と呼び、物理アドレスを使うものを物理
アドレスキャッシュ記憶と呼ぶ。本実施形態では、物理
アドレスキャッシュ記憶が用いられている。本実施形態
のコンピュータシステムでは、仮想記憶が用いられてお
り、演算装置21は、データを要求する時には、仮想ア
ドレスを与えるので、演算装置21とキャッシュ記憶装
置24との間にアドレス変換装置22を置き、アドレス
変換装置22が仮想アドレスを物理アドレスに変換した
結果をキャッシュ記憶24に与える。
The cache memory 24 can be designed so as to use either a virtual address or a physical address as an address of data used for generating an index. Those using the physical address are called physical address cache storage. In the present embodiment, physical address cache storage is used. In the computer system of the present embodiment, virtual storage is used, and the arithmetic unit 21 gives a virtual address when requesting data, so that the address translation unit 22 is provided between the arithmetic unit 21 and the cache storage unit 24. Then, the result obtained by the address translator 22 translating the virtual address into the physical address is given to the cache memory 24.

【0028】図3は、従来の記憶管理方法による物理ペ
ージ管理部37と、ページング管理部36と、カーネル
記憶管理部38とを説明する図である。物理ページ管理
部37とページング管理部36の機能は、図2で説明し
た通りであり、物理ページ管理部37は、主記憶中の物
理ページのうち、 現在、オペレーティングシステムま
たはアプリケーションによって使われていない物理ペー
ジを管理しており、ページング管理部36は、例えば、
ページフォルト割込を処理する時に、物理ページ管理部
37に対し、物理ページの割当を要求する。カーネル記
憶管理部38は、オペレーティングシステムが、その動
作中に動的な記憶管理が必要になった時に、オペレーテ
ィングシステムに対して記憶領域の割当と解放を行う。
なお、図2においては、説明を簡単にするために、カー
ネル記憶管理部は省略されている。
FIG. 3 is a diagram for explaining a physical page management unit 37, a paging management unit 36, and a kernel storage management unit 38 according to a conventional storage management method. The functions of the physical page management unit 37 and the paging management unit 36 are as described in FIG. 2, and the physical page management unit 37 is not currently used by the operating system or the application among the physical pages in the main memory. The physical page is managed, and the paging management unit 36, for example,
When processing a page fault interrupt, the physical page management unit 37 is requested to allocate a physical page. The kernel storage management unit 38 allocates and releases a storage area to the operating system when the operating system needs dynamic storage management during its operation.
In FIG. 2, the kernel storage management unit is omitted for the sake of simplicity.

【0029】図3で、主記憶33は、4Kバイトの物理
ページに分割されており、それぞれの物理ページの先頭
物理アドレスは、4Kバイト境界にアラインされてお
り、0x0000、0x1000、0x2000等とな
っている。それぞれの物理ページの物理ページ番号は、
物理ページの先頭アドレスを数4Kで割った値と定義さ
れ、0x0、0x1、0x2等になる。図3において
は、オペレーティングシステムが、物理ページ番号0x
0の物理ページを、リアルタイムスレッドが0x1の物
理ページを、非リアルタイムスレッドが0x5の物理ペ
ージを占有している。したがって、図3に示す状態は、
オペレーティングシステムの実行を一つのスレッドと考
えると、コンピュータシステム上で、オペレーティング
システム、リアルタイムスレッド、および非リアルタイ
ムスレッドの合計3つのスレッドが動作している状態
で、しかもそれぞれのスレッドが物理ページを1ページ
づつ占有して動作している状態である。
In FIG. 3, the main memory 33 is divided into 4K-byte physical pages, and the starting physical addresses of each physical page are aligned on 4K-byte boundaries, and are 0x0000, 0x1000, 0x2000, and the like. ing. The physical page number of each physical page is
It is defined as a value obtained by dividing the head address of the physical page by several 4K, and becomes 0x0, 0x1, 0x2, and the like. In FIG. 3, the operating system has a physical page number 0x
A physical page of 0, a real-time thread occupies a physical page of 0x1, and a non-real-time thread occupies a physical page of 0x5. Therefore, the state shown in FIG.
Assuming that the execution of the operating system is one thread, on the computer system, the operating system, the real-time thread, and the non-real-time thread are operating in a total of three threads, and each thread occupies one physical page. It is in a state of occupying and operating.

【0030】物理ページ管理部37は、現在使用されて
いない物理ページを管理するので、物理ページ番号が、
0x0、0x1、0x5以外の物理ページを管理しなけ
ればならない。図3に示されている、物理ページ管理部
の実装は、従来の物理ページ管理部による、公知の実装
で、一本のリスト構造で管理されている。こうした構造
で管理すると、多数のスレッドが物理ページの要求と解
放を繰り返すうちに、リスト構造内での物理ページ番号
の順序がランダムになり、あるスレッドが物理ページの
割当要求を出した時に、どの物理ページ番号の物理ペー
ジが割り当てられるのか、不確定になる。
The physical page management unit 37 manages a physical page that is not currently used.
Physical pages other than 0x0, 0x1, and 0x5 must be managed. The implementation of the physical page management unit shown in FIG. 3 is a known implementation by a conventional physical page management unit, and is managed in a single list structure. With this structure, as many threads repeatedly request and release physical pages, the order of physical page numbers in the list structure becomes random, and when a thread issues a physical page allocation request, It is uncertain whether the physical page of the physical page number is allocated.

【0031】ページング管理部36では、リアルタイム
スレッドと非リアルタイムスレッドに対して、固有の仮
想アドレス空間が提供するために、それぞれのページ表
を管理する。図5は、リアルタイムスレッドと非リアル
タイムスレッドの仮想アドレス空間の状況と、対応する
ページ表の状態を示す。図5では、仮想アドレス空間
が、6ページの大きさである、24Kバイトの状態を示
している。リアルタイムアプリケーション、非リアルタ
イムアプリケーションともに固有のアドレス空間を持っ
ているが、アプリケーションのアドレス空間を、オペレ
ーティングシステムも使用するため、アプリケーション
が自由に使用できるのは、図5の例では、仮想アドレス
空間の上半分だけであり、下半分はオペレーティングシ
ステムが使用する。なお、リアルタイムアプリケーショ
ンの下半分の部分と非リアルタイムアプリケーションの
下半分の部分は、全く同じ状態になるように、ページン
グ管理部がページ表を管理する。図5では、リアルタイ
ムアプリケーションと非リアルタイムアプリケーション
ともに、仮想アドレス空間の先頭のページ中のどこかを
実行中である(実行中であることを斜線で示してい
る)。ただし、ページ表によって、リアルタイムアプリ
ケーションのページ0x0は、主記憶の物理ページ0x
0を占有しており、非リアルタイムアプリケーションの
ページ0x0は、主記憶の物理ページ0x5を占有して
いる。なお、ページ表のフラグにあるVは、このページ
表エントリが有効であることを示している。この例で
は、物理ページ0x1と物理ページ0x5がキャッシュ
記憶上で衝突している。
The paging management unit 36 manages each page table in order to provide a unique virtual address space to a real-time thread and a non-real-time thread. FIG. 5 shows the status of the virtual address space of the real-time thread and the non-real-time thread and the status of the corresponding page table. FIG. 5 shows a state in which the virtual address space is 24 Kbytes, which is 6 pages in size. Although real-time applications and non-real-time applications both have their own address space, the application address space is also used by the operating system. Only half and the lower half are used by the operating system. The paging management unit manages the page table so that the lower half of the real-time application and the lower half of the non-real-time application are completely in the same state. In FIG. 5, both the real-time application and the non-real-time application are executing somewhere in the first page of the virtual address space (indicated by the hatching to indicate that they are being executed). However, according to the page table, the page 0x0 of the real-time application is replaced with the physical page 0x of the main storage.
0, and the page 0x0 of the non-real-time application occupies the physical page 0x5 of the main storage. The V in the page table flag indicates that this page table entry is valid. In this example, physical page 0x1 and physical page 0x5 collide on cache storage.

【0032】図4は、本発明の、未使用の物理ページの
管理方法による、物理ページ管理部の一実施形態の説明
図である。図4には、主記憶43と、物理ページ管理部
47と、カーネル記憶管理部48と、ページング管理部
46が示されており、図3と全く同じである。図3との
相違は、主記憶の物理ページにカラーIDが付与されて
いることと、物理ページ管理部47において、未使用の
物理ページが複数のリスト構造で管理されていることで
ある。
FIG. 4 is an explanatory diagram of one embodiment of a physical page management unit according to the method of managing unused physical pages according to the present invention. FIG. 4 shows a main memory 43, a physical page management unit 47, a kernel storage management unit 48, and a paging management unit 46, which are completely the same as those in FIG. The difference from FIG. 3 is that the color ID is assigned to the physical page of the main storage, and that the physical page management unit 47 manages unused physical pages in a plurality of list structures.

【0033】カラーIDの付与は、コンピュータシステ
ムが起動された時、アドレス変換装置が動作していない
状態で、物理ページ管理部47によって行われる。
The assignment of the color ID is performed by the physical page management unit 47 when the computer system is started up and the address translator is not operating.

【0034】図7は、本発明において、物理ページ管理
部の初期化時に、物理ページをカラーIDで 類別する
方法を示すフローチャートである。物理ページ管理部
は、まず、カラー数COTを計算する(ステップS
1)。主記憶のカラー数COTは、前記Nウェイセット
アソシアティブキャッシュ記憶装置の容量をCABバイ
ト、ページサイズをPGBとする時、 COT = CAB /( PGB * N) である。本実施形態のキャッシュ記憶が、例えば、図1
の場合と同一のである場合である、16Kバイトの容量
をもつダイレクトマップキャッシュ記憶であり、ページ
サイズが4Kバイトである場合には、カラー数COTは
4になる。物理ページ管理部47は、次に、オペレーテ
ィングシステムがその時点で使用していない物理ページ
のカラーIDを計算する。まず、先頭物理ページを演算
対象にとり(ステップS2)、当該ページを既にOSが
使用しているかを判断する(ステップS3)。当該物理
ページを未だOSが使用していない場合には、当該物理
ページのカラーIDを計算する(ステップS4)。そう
して、当該物理ページのを、計算されたカラーIDのリ
スト構造に連結する(ステップS5)。次に、当該物理
ページが最後の物理ページであるかを判断し(ステップ
S6)、最後の物理ページでなければ、次の物理ページ
に演算対象を移し(ステップS7)、ステップS3に戻
る。ステップS3において、物理ページを既にOSが使
用している場合には、ステップS6に処理を移す。この
ようにして、ステップS3からステップS6までの処理
を最後の物理ページまで繰り返す。
FIG. 7 is a flowchart showing a method for classifying physical pages by color ID when the physical page management unit is initialized in the present invention. First, the physical page management unit calculates the number of colors COT (Step S).
1). The number of colors COT of the main memory is as follows, where the capacity of the N-way set associative cache storage device is CAB bytes and the page size is PGB: COT = CAB / (PGB * N). The cache storage of the present embodiment is, for example, as shown in FIG.
In the case of a direct map cache storage having a capacity of 16 Kbytes, which is the same as the case of (1), and the page size is 4 Kbytes, the number of colors COT becomes 4. Next, the physical page management unit 47 calculates a color ID of a physical page not used by the operating system at that time. First, the top physical page is set as a calculation target (step S2), and it is determined whether the page is already used by the OS (step S3). If the OS does not use the physical page, the color ID of the physical page is calculated (step S4). Then, the physical page is linked to the calculated color ID list structure (step S5). Next, it is determined whether the physical page is the last physical page (step S6). If it is not the last physical page, the operation target is moved to the next physical page (step S7), and the process returns to step S3. If it is determined in step S3 that the physical page has already been used by the OS, the process proceeds to step S6. In this way, the processing from step S3 to step S6 is repeated up to the last physical page.

【0035】図4の例では、物理ページ番号を、カラー
数COT=4でモジュロを取ったものがカラーIDとな
り、カラーIDは、0、1、2、3のいずれかである。
なお、図4では、簡単のために、カラーIDを計算する
時点で、オペレーティングシステムがまったく主記憶を
使用していない場合を示している。図4では、カラーI
Dが0と1の物理ページを、それぞれ、オペレーティン
グシステムとリアルタイムスレッドに割り当て、カラー
ID毎にリスト構造で管理している。カラーIDが2と
3の物理ページを、非リアルタイムスレッド用として一
つのリスト構造で管理している。換言すれば、カラーI
Dが0と1の物理ページに対して特別な管理を行い、カ
ラーIDが2と3の物理ページに対しては、従来と同様
の管理を行う。カラーID毎に連結されたリスト構造
は、そのヘッダに、カラーIDとスレッドIDを保持し
ている。
In the example of FIG. 4, the physical page number obtained by modulo the color number COT = 4 is the color ID, and the color ID is one of 0, 1, 2, and 3.
FIG. 4 shows, for simplicity, a case where the operating system does not use the main storage at all when the color ID is calculated. In FIG. 4, the color I
Physical pages with D of 0 and 1 are assigned to the operating system and real-time thread, respectively, and managed in a list structure for each color ID. Physical pages with color IDs 2 and 3 are managed in a single list structure for non-real-time threads. In other words, color I
Special management is performed for physical pages with D of 0 and 1, and management similar to that of the related art is performed for physical pages with color IDs of 2 and 3. The list structure linked for each color ID holds a color ID and a thread ID in its header.

【0036】図4で、本発明における物理ページ管理部
47は、図3の物理ページ管理部37が有する、単なる
物理ページの割当機能の他に、スレッドIDを引数とし
て物理ページの割当を要求された時に、特定のカラーI
Dを持つ物理ページを割り当てる機能を持つ。カーネル
記憶管理部48は、オペレーティングシステムのスレッ
ドIDを指定して物理ページの割当を行うように、図3
のカーネル記憶管理部38に比べて変更されている。
In FIG. 4, the physical page management unit 47 of the present invention is requested to allocate a physical page by using a thread ID as an argument in addition to the simple physical page allocation function of the physical page management unit 37 of FIG. When a specific color I
It has a function of allocating a physical page having D. The kernel storage management unit 48 assigns a physical page by designating the thread ID of the operating system as shown in FIG.
Of the kernel storage management unit 38 of FIG.

【0037】ページング管理部46は、図3のページン
グ管理部36に比較して次のように変更されている。リ
アルタイムアプリケーションの実行時において、データ
へのアクセスが主記憶またはキャッシュ記憶へのアクセ
スになることを保証するために、主記憶に常駐する、す
なわち、ページングが生じない記憶領域の割当要求をオ
ペレーティングシステムまたは当該アプリケーションが
行う場合において、記憶領域の仮想アドレスと、大きさ
と、スレッドIDを引数としてページング管理部46が
呼び出された時、ページング管理部46は、そのリアル
タイムアプリケーションのスレッドIDを指定して物理
ページの割当を行う。この点が、スレッドIDと関係な
く物理ページの割当を行う図3のページング管理部36
と異なっている。図4において、ページング管理部46
が実行する処理として、スレッドID付割当/割当と記
されている用語の意味は、リアルタイムアプリケーショ
ンの実行中の場合には、スレッドIDを指定した割当を
要求し、リアルタイムアプリケーションの実行中でない
場合には、図3の、スレッドIDを指定しない従来型の
割当を要求するという意味である。
The paging management unit 46 is modified as follows as compared with the paging management unit 36 of FIG. During execution of a real-time application, in order to guarantee that access to data becomes access to main storage or cache storage, the operating system or When the paging management unit 46 is called with the virtual address of the storage area, the size, and the thread ID as arguments, the paging management unit 46 specifies the thread ID of the real-time application and specifies the physical page. Is assigned. This point is the paging management unit 36 in FIG. 3 that allocates a physical page regardless of the thread ID.
Is different. In FIG. 4, the paging management unit 46
As a process executed by the application, the meaning of the term described as assignment / assignment with thread ID means that when a real-time application is being executed, an assignment specifying a thread ID is requested, and when the real-time application is not being executed. Means that the conventional assignment without specifying the thread ID in FIG. 3 is requested.

【0038】図8は、リアルタイムスレッドおよびオペ
レーティングシステムが、一つまたは複数のカラーID
を独占的に使用するための物理ページの割当方法を示す
フローチャートである。物理ページ管理部は、まず、ス
レッドIDが引数として指定されているかどうかを判別
する(ステップS1)。もし、スレッドIDが指定され
ていない場合は、非リアルタイムスレッドからの要求で
あるので、非リアルタイムスレッドのリスト構造に連結
されている物理ページを1ページ割り当てる(ステップ
S5)。図4の実施例では、カラーIDが2か3の物理
ページが割り当てられることになるが、どちらのカラー
IDが割り当てられるかはわからない。もし、スレッド
IDが指定された場合には(ステップS1)、カラーI
D毎に管理されているリストのヘッダを検索し(ステッ
プS2)、スレッドIDが一致するリストがあれば、そ
れらのリストが空リストであるか、否かを判断し(ステ
ップS3)、空リストでないリストがある場合には、そ
のリストに連結されている物理ページを1ページ割り当
てる(ステップS4)。空リストでないリストがない場
合には、スレッドIDに有効なIDが設定されていない
リスト(有効なスレッドIDに予約されていないリスト
構造)を検索する(ステップS6)。そのようなリスト
がある場合には、当該リストのヘッダにスレッドIDを
設定することにより、当該スレッドIDを持つスレッド
がそのリストを予約する(ステップS7)。そうして、
そのリストに連結されている物理ページを割り当てる
(ステップS8)。ステップS6において、スレッドI
Dに有効なIDが設定されていないリストがない場合に
は、そのリアルタイムスレッドを強制終了する(ステッ
プS9)。
FIG. 8 shows that a real-time thread and an operating system may have one or more color IDs.
9 is a flowchart showing a method of allocating a physical page for exclusively using. First, the physical page management unit determines whether the thread ID is specified as an argument (step S1). If the thread ID is not specified, the request is from a non-real-time thread, and one physical page linked to the non-real-time thread list structure is allocated (step S5). In the embodiment of FIG. 4, a physical page having a color ID of 2 or 3 is allocated, but it is not known which color ID is allocated. If the thread ID is specified (step S1), the color I
The header of the list managed for each D is searched (step S2). If there is a list with the same thread ID, it is determined whether or not the list is an empty list (step S3). If there is a list other than the physical page, one physical page linked to the list is allocated (step S4). When there is no list that is not an empty list, a list in which a valid ID is not set in the thread ID (a list structure not reserved for a valid thread ID) is searched (step S6). If there is such a list, a thread ID is set in the header of the list, and the thread having the thread ID reserves the list (step S7). And then
A physical page linked to the list is assigned (step S8). In step S6, the thread I
If there is no list in which a valid ID is not set in D, the real-time thread is forcibly terminated (step S9).

【0039】図4では、オペレーティングシステムには
カラーIDが0の物理ページを、リアルタイムスレッド
にはカラーIDが1の物理ページを、それぞれ1ページ
ずつ割り当てられており、非リアルタイムスレッドに
は、カラーID2および3のうち、3の物理ページが割
り当てられている。
In FIG. 4, a physical page with a color ID of 0 is assigned to the operating system, a physical page with a color ID of 1 is assigned to the real-time thread, and a color ID 2 is assigned to the non-real-time thread. 3 and 3 physical pages are allocated.

【0040】図6には、本発明の物理ページ管理部を用
いた時の、リアルタイムアプリケーションと非リアルタ
イムアプリケーションの仮想アドレス空間の状態とペー
ジ表の状態が示されている。従来の物理ページ管理部を
用いた場合の、リアルタイムアプリケーションと非リア
ルタイムアプリケーションの仮想アドレス空間の状態と
ページ表の状態を示した図5と比較すると、仮想アドレ
ス空間の状態は全く同じであり、ページ表の構造は全く
同じであるが書き込まれている物理ページ番号だけが異
なることがわかる。
FIG. 6 shows the state of the virtual address space and the state of the page table of the real-time application and the non-real-time application when the physical page management unit of the present invention is used. When the state of the virtual address space and the state of the page table of the real-time application and the non-real-time application when the conventional physical page management unit is used are compared with FIG. 5 showing the state of the page table, the state of the virtual address space is completely the same. It can be seen that the structure of the table is exactly the same, but only the physical page number written is different.

【0041】図5および図6からは、キャッシュ記憶の
アクセス状況を、従来の記憶管理方法による場合と、本
発明の未使用な物理ページの管理方法による場合につい
て比較することもできる。すなわち、従来の記憶管理方
法では、キャッシュ記憶の競合が起る可能性があり、本
発明の管理方法ではその可能性はなくなる。
From FIGS. 5 and 6, it is possible to compare the access status of the cache storage between the case of the conventional storage management method and the case of the unused physical page management method of the present invention. That is, in the conventional storage management method, there is a possibility that contention of cache storage may occur, and the management method of the present invention eliminates the possibility.

【0042】図5および図6で、仮想アドレス空間の状
態が全く同じであることは、アプリケーションを変更す
る必要がないこと意味し、ページ表の構造が全く同じで
あることは、ページング管理部に対する変更がほとんど
ないことを意味する。このように、本実施例において
は、物理ページ管理部における未使用物理ページの管理
方法を工夫することにより、目的の効果を得ることが可
能である。
In FIGS. 5 and 6, the fact that the state of the virtual address space is exactly the same means that there is no need to change the application, and the fact that the structure of the page table is exactly the same means that the paging management unit has Means little change. As described above, in the present embodiment, the intended effect can be obtained by devising a method of managing unused physical pages in the physical page management unit.

【0043】[0043]

【発明の効果】以上述べたように本発明によれば、リア
ルタイムアプリケーションが、1つまたは複数のキャッ
シュブロックを独占的に使用するための予約をし、予約
したキャッシュブロックのみを用いて実行を行うことに
より、次の効果を有する。 1.リアルタイムアプリケーションを実行する時、処理
時間の予測可能な計算を実現することができる。 2.リアルタイムアプリケーションを実行する時、キャ
ッシュ記憶が使用可能になるので、高速な計算を実現す
ることができる。
As described above, according to the present invention, a real-time application makes a reservation for exclusive use of one or a plurality of cache blocks, and executes using only the reserved cache blocks. This has the following effects. 1. When executing a real-time application, a predictable calculation of the processing time can be achieved. 2. When executing a real-time application, high-speed calculation can be realized because the cache storage can be used.

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

【図1】物理ページのカラーIDによる類別と、各カラ
ーIDを持つ物理ページのキャッシュ記憶へのマッピン
グの一例を説明する図である。
FIG. 1 is a diagram illustrating an example of classification of physical pages by color ID and an example of mapping of physical pages having each color ID to cache storage.

【図2】本発明のキャッシュブロック予約方法を実施す
るために用いられるコンピュータシステムの構成の一例
を示すブロック図である。
FIG. 2 is a block diagram showing an example of a configuration of a computer system used to execute a cache block reservation method of the present invention.

【図3】従来の記憶管理方法による物理ページ管理部
と、ページング管理部と、カーネル記憶管理部とを説明
する図である。
FIG. 3 is a diagram illustrating a physical page management unit, a paging management unit, and a kernel storage management unit according to a conventional storage management method.

【図4】本発明の、未使用の物理ページの管理方法によ
る物理ページ管理部の一実施形態の説明図である。
FIG. 4 is an explanatory diagram of an embodiment of a physical page management unit according to the unused physical page management method of the present invention.

【図5】従来の記憶管理方法による、キャッシュ記憶の
アクセス状況を説明する図である。
FIG. 5 is a diagram illustrating an access state of cache storage according to a conventional storage management method.

【図6】本発明の、未使用の物理ページの管理方法によ
る、キャッシュ記憶のアクセス状況を説明する図であ
る。
FIG. 6 is a diagram illustrating an access state of a cache storage according to a method of managing unused physical pages according to the present invention.

【図7】本発明において、物理ページ管理部の初期化時
に、物理ページをカラーIDで類別する方法を示すフロ
ーチャートである。
FIG. 7 is a flowchart illustrating a method of classifying physical pages by color ID when a physical page management unit is initialized in the present invention.

【図8】本発明において、リアルタイムスレッドおよび
オペレーティングシステムが、1つまたは複数のカラー
IDを独占的に使用するための物理ページの割当方法を
示すフローチャートである。
FIG. 8 is a flowchart illustrating a method of allocating a physical page for a real-time thread and an operating system to exclusively use one or more color IDs according to the present invention.

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

21 演算装置 22 アドレス変換装置 23、33、43 主記憶 24 キャッシュ記憶 25 補助記憶 26、36、46 ページング管理部 27、37、47 物理ページ管理部 38、48 カーネル記憶管理部 Reference Signs List 21 arithmetic unit 22 address translation unit 23, 33, 43 main storage 24 cache storage 25 auxiliary storage 26, 36, 46 paging management unit 27, 37, 47 physical page management unit 38, 48 kernel storage management unit

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 コンピュータシステムが演算装置と、ア
ドレス変換装置と、記憶装置を有し、該記憶装置が主記
憶装置と、演算装置と主記憶装置との間に高速キャッシ
ュ記憶装置を有し、前記キャッシュ記憶装置はハッシュ
装置とキャッシュブロックの集合からなり、前記キャッ
シュ記憶装置はインデックスによってキャッシュブロッ
クの位置を指定し、前記キャッシュ記憶装置は、演算装
置が要求したデータの物理アドレスの一部を用いて、ハ
ッシュ装置によってインデックスを生成する物理アドレ
スキャッシュ記憶装置であり、前記キャッシュ記憶装置
は、ハッシュ装置が使用するアルゴリズムがモジュロハ
ッシングアルゴリズムであり、前記キャッシュ記憶装置
は、ハッシュ装置が生成するインデックスの個数が、キ
ャッシュブロック数より小さい整数Nである、Nウェイ
セットアソシアティブキャッシュ記憶装置である場合に
おいて、当該コンピュータシステムがリアルタイムアプ
リケーションを実行する時、その実行にあたって、リア
ルタイムアプリケーションが、一つまたは複数のキャッ
シュブロックを独占的に使用するために予約をするキャ
ッシュブロック予約方法において、 主記憶装置が有する主記憶を、物理ページに分割し、物
理ページに含まれる全てのアドレスからハッシュ装置に
よって得られるインデックスの集合をカラーと定義し、
主記憶に含まれる物理ページを、カラーIDで類別し、 リアルタイムアプリケーションの実行時において、現在
未使用なカラーIDの集合から、一つまたは複数のカラ
ーIDを選択し、その選択されたカラーIDをもつ物理
ページを、当該リアルタイムアプリケーションを実行す
るスレッドが、独占的に使用することができるように、
スレッドIDとカラーIDとを管理することを特徴とす
る、キャッシュブロック予約方法。
1. A computer system having an arithmetic unit, an address translator, and a storage unit, the storage unit having a main storage unit, and a high-speed cache storage unit between the arithmetic unit and the main storage unit. The cache storage device is composed of a hash device and a set of cache blocks. The cache storage device specifies a position of a cache block by an index, and the cache storage device uses a part of a physical address of data requested by an arithmetic device. A physical address cache storage device that generates an index using a hash device, wherein the cache storage device uses a modulo hashing algorithm as an algorithm used by the hash device, and the cache storage device stores the number of indexes generated by the hash device. Is the number of cache blocks In the case of an N-way set associative cache storage device with a smaller integer N, when the computer system executes a real-time application, the real-time application exclusively uses one or more cache blocks in executing the real-time application. In the cache block reservation method of making a reservation to do, the main storage of the main storage device is divided into physical pages, a set of indexes obtained by the hash device from all the addresses included in the physical page is defined as a color,
Physical pages included in the main memory are classified by color ID, and at the time of execution of the real-time application, one or more color IDs are selected from a set of currently unused color IDs, and the selected color IDs are determined. , So that the thread executing the real-time application can use the physical page exclusively.
A method for reserving a cache block, comprising managing a thread ID and a color ID.
【請求項2】 前記Nウェイセットアソシアティブキャ
ッシュ記憶装置の容量をCABバイト、ページサイズを
PGBバイトとする時、主記憶のカラー数COTは、 COT = CAB /( PGB * N) であり、モジュロ関数をmodとすると、物理ページの
カラーIDであるCOIを、物理ページ番号PFNか
ら、 COI= PFN mod COT で決定する、請求項1に記載のキャッシュブロック予約
方法。
2. When the capacity of the N-way set associative cache storage device is CAB bytes and the page size is PGB bytes, the number of colors COT of main memory is COT = CAB / (PGB * N), and a modulo function is provided. 2. The cache block reserving method according to claim 1, wherein COI, which is the color ID of the physical page, is determined from the physical page number PFN by the following formula: COI = PFN mod COT.
【請求項3】 演算装置と、アドレス変換装置と、記憶
装置を有し、該記憶装置が主記憶装置と、演算装置と主
記憶装置との間に高速なキャッシュ記憶装置を有し、前
記キャッシュ記憶装置はハッシュ装置とキャッシュブロ
ックの集合からなり、前記キャッシュ記憶装置はインデ
ックスによってキャッシュブロックの位置を指定し、前
記キャッシュ記憶装置は、演算装置が要求したデータの
物理アドレスの一部を用いて、ハッシュ装置によってイ
ンデックスを生成する物理アドレスキャッシュ記憶装置
であり、前記キャッシュ記憶装置は、ハッシュ装置が使
用するアルゴリズムがモジュロハッシングアルゴリズム
であり、前記キャッシュ記憶装置は、ハッシュ装置が生
成するインデックスの個数が、キャッシュブロック数よ
り小さい整数Nである、Nウェイセットアソシアティブ
キャッシュ記憶装置である、コンピュータシステムであ
って、リアルタイムアプリケーションを実行する時、そ
の実行にあたって、リアルタイムアプリケーションが、
一つまたは複数のキャッシュブロックを独占的に使用す
るために予約をするキャッシュブロック予約機能付きコ
ンピュータシステムにおいて、主記憶装置が有する主記
憶を、物理ページに分割し、物理ページに含まれる全て
のアドレスからハッシュ装置によって得られるインデッ
クスの集合をカラーと定義する時、 主記憶に含まれる物理ページを、カラーIDで類別し、 リアルタイムアプリケーションの実行時において、現在
未使用のカラーIDの集合から、一つまたは複数のカラ
ーIDを選択し、その選択されたカラーIDをもつ物理
ページを、当該リアルタイムアプリケーションを実行す
るスレッドが独占的に使用することができるように、ス
レッドIDとカラーIDとを管理する物理ページ管理手
段を有することを特徴とする、キャッシュブロック予約
機能付きコンピュータシステム。
3. The cache according to claim 1, further comprising an arithmetic unit, an address translator, and a storage unit, wherein the storage unit includes a main storage unit, and a high-speed cache storage unit between the arithmetic unit and the main storage unit. The storage device is composed of a hash device and a set of cache blocks, the cache storage device specifies the position of the cache block by an index, and the cache storage device uses a part of the physical address of the data requested by the arithmetic device, A physical address cache storage device that generates an index by a hash device, wherein the cache storage device uses a modulo hashing algorithm as an algorithm used by the hash device, and the cache storage device has a number of indexes generated by the hash device, An integer N smaller than the number of cache blocks A computer system, which is an N-way set associative cache storage device, and executes a real-time application when executing the real-time application.
In a computer system with a cache block reservation function that reserves one or more cache blocks for exclusive use, a main memory of a main storage device is divided into physical pages, and all addresses included in the physical pages are divided. When defining a set of indices obtained by a hash device from as a color, the physical pages included in the main memory are classified by color ID, and at the time of execution of a real-time application, one of the currently unused color IDs is selected from the set. Alternatively, a physical page that selects a plurality of color IDs and manages the thread ID and the color ID so that a thread that executes the real-time application can exclusively use a physical page having the selected color ID. A cache having page management means. Gerhard block reservation function with a computer system.
【請求項4】 前記Nウェイセットアソシアティブキャ
ッシュ記憶装置の容量をCABバイト、ページサイズを
PGBバイトとする時、前記物理ページ管理手段は、主
記憶のカラー数COTとして、 COT = CAB /( PGB * N) を計算し、モジュロ関数をmodとする時、物理ページ
のカラーIDであるCOIを、物理ページ番号PFNか
ら、 COI= PFN mod COT で決定する、請求項3に記載のコンピュータシステム。
4. When the capacity of the N-way set associative cache storage device is CAB bytes and the page size is PGB bytes, the physical page management means sets COT = CAB / (PGB * as the number of colors COT of main memory. 4. The computer system according to claim 3, wherein when N) is calculated and the modulo function is mod, the COI that is the color ID of the physical page is determined from the physical page number PFN by COI = PFN mod COT.
【請求項5】 前記物理ページ管理手段は、 当該コンピュータシステムが起動された時に、アドレス
変換装置が動作していない状態で、その時点で使用され
ていない主記憶の領域を、物理ページに分割し、カラー
IDを付与し、いくつかのカラーIDをもつ物理ページ
をリアルタイムスレッドとオペレーティングシステム用
とし、それらの物理ページをカラーIDとスレッドID
と物理ページ番号を用いて管理し、それ以外のカラーI
Dをもつ物理ページを非リアルタイムスレッド用として
管理する、物理ページ管理部を有する、請求項3または
4に記載のコンピュータシステム。
5. The physical page management means, when the computer system is started up, divides an area of the main storage that is not used at that time into physical pages in a state where the address translator is not operating. , A physical page having several color IDs is used for a real-time thread and an operating system, and those physical pages are assigned a color ID and a thread ID.
And physical page numbers, and the other color I
The computer system according to claim 3, further comprising a physical page management unit that manages a physical page having D for a non-real-time thread.
【請求項6】 前記物理ページ管理手段は、 ページング管理部を有し、該ページング管理部は、アド
レス変換装置が出力した仮想ページ番号を用いて、仮想
アドレス空間毎に、仮想ページ番号から物理ページ番号
への変換を行うためのページ表を構築して該ページ表を
管理する機能を有し、前記ページング管理部は、リアル
タイムアプリケーションの実行時において、データへの
アクセスが主記憶またはキャッシュ記憶へのアクセスに
なることを保証するために、主記憶に常駐する、すなわ
ち、ページングが生じない記憶領域の割当要求が行われ
た場合において、記憶領域の仮想アドレスと、大きさ
と、スレッドIDを引数として呼び出された時、物理ペ
ージ管理部に対して、スレッドIDを指定して物理ペー
ジの割当要求を行い、非リアルタイムアプリケーション
の実行時においては、スレッドIDを指定しないで物理
ページの割当要求を行い、得られた物理ページの物理ペ
ージ番号を用いてページ表を構築する、請求項5に記載
のコンピュータシステム。
6. The physical page management means has a paging management unit, and the paging management unit uses a virtual page number output by the address translation device to convert a physical page number into a physical page number for each virtual address space. It has a function of constructing a page table for converting to a number and managing the page table, and the paging management unit is configured such that, when a real-time application is executed, data access is performed to a main storage or a cache storage. In order to guarantee access, when a request is made for allocating a storage area resident in the main storage, that is, when paging does not occur, the storage area is called with the virtual address, the size, and the thread ID as arguments. Request, a physical page allocation request is made to the physical page management unit by designating the thread ID, and the non-real During im application execution, perform an allocation request of a physical page without specifying a thread ID, and build a page table using the physical page number of the resulting physical page, the computer system according to claim 5.
【請求項7】 前記物理ページ管理手段は、オペレーテ
ィングシステムが、その動作中に動的な記憶管理が必要
になった時に、物理ページ管理部に対して、オペレーテ
ィングシステムのスレッドIDを指定して物理ページの
割当要求を行い、オペレーティングシステムが作成する
データ構造のために、記憶領域の割当を行う機能を有す
る、請求項5に記載のコンピュータシステム。
7. The physical page management means according to claim 1, wherein when the operating system requires dynamic storage management during its operation, the operating system specifies a thread ID of the operating system to the physical page management unit. 6. The computer system according to claim 5, further comprising a function of making a page allocation request and allocating a storage area for a data structure created by the operating system.
【請求項8】 演算装置と、アドレス変換装置と、記憶
装置を有し、該記憶装置が主記憶装置と、演算装置と主
記憶装置との間に高速なキャッシュ記憶装置を有し、前
記キャッシュ記憶装置はハッシュ装置とキャッシュブロ
ックの集合からなり、前記キャッシュ記憶装置はインデ
ックスによってキャッシュブロックの位置を指定し、前
記キャッシュ記憶装置は、演算装置が要求したデータの
物理アドレスの一部を用いて、ハッシュ装置によってイ
ンデックスを生成する物理アドレスキャッシュ記憶装置
であり、前記キャッシュ記憶装置は、ハッシュ装置が使
用するアルゴリズムがモジュロハッシングアルゴリズム
であり、前記キャッシュ記憶装置は、ハッシュ装置が生
成するインデックスの個数が、キャッシュブロック数よ
り小さい整数Nである、Nウェイセットアソシアティブ
キャッシュ記憶装置である、コンピュータシステムであ
って、リアルタイムアプリケーションを実行する時、そ
の実行にあたって、リアルタイムアプリケーションが、
一つまたは複数のキャッシュブロックを独占的に使用す
るために予約をするキャッシュブロック予約機能付きコ
ンピュータシステムにおける、物理ページを管理する物
理ページ管理プログラムが記録されている記録媒体にお
いて、 主記憶装置が有する主記憶を、物理ページに分割し、物
理ページに含まれる全てのアドレスからハッシュ装置に
よって得られるインデックスの集合をカラーと定義し
て、それぞれのカラーにカラーIDを付与し、主記憶に
含まれる物理ページがカラーIDで類別されている時、 物理ページをカラーIDとスレッドIDで管理する物理
ページ管理プログラムは、物理ページの割当要求に対し
て、 当該物理ページを使用するオペレーティングシステムま
たはアプリケーションのスレッドIDが引数として指定
されているかどうかを判別する第1の手順と、 スレッドIDが指定されていない場合には、非リアルタ
イムスレッドに割り当てられているカラーを持つ物理ペ
ージを1ページ割り当てる第2の手順と、 スレッドIDが指定されている場合には、カラーID毎
に管理されている物理ページの集合に対して、付与され
ているスレッドIDを検索する第3の手順と、 スレッドIDが一致する物理ページの集合があれば、そ
れらの物理ページの集合すべてについて、空集合であ
る、すなわち、当該カラーIDを持つ未使用物理ページ
が存在するか、否かを判断する第4の手順と、 空集合でない場合には、当該カラーIDを持つ物理ペー
ジを1ページ割り当てる第5の手順と、 空集合の場合には、有効なスレッドIDが付与されてい
ない物理ページの集合を検索する第6の手順と、 そのような物理ページの集合がある場合には、当該カラ
ーIDの未使用物理ページの集合を、スレッドIDを付
与することにより、予約する第7の手順と、 第7の手順における当該カラーIDを持つ物理ページの
集合から、物理ページの1ページを割り当てる第8の手
順と、 第6の手順において、有効なスレッドIDが付与されて
いない物理ページの集合が存在しない場合には、そのリ
アルタイムスレッドを強制終了する第9の手順を有する
ことを特徴とする物理ページ管理プログラムを記録して
いる記録媒体。
8. An apparatus comprising an arithmetic unit, an address translator, and a storage unit, wherein the storage unit includes a main storage unit, and a high-speed cache storage unit between the operation unit and the main storage unit. The storage device is composed of a hash device and a set of cache blocks, the cache storage device specifies the position of the cache block by an index, and the cache storage device uses a part of the physical address of the data requested by the arithmetic device, A physical address cache storage device that generates an index by a hash device, wherein the cache storage device uses a modulo hashing algorithm as an algorithm used by the hash device, and the cache storage device has a number of indexes generated by the hash device, An integer N smaller than the number of cache blocks A computer system, which is an N-way set associative cache storage device, and executes a real-time application when executing the real-time application.
In a computer system having a cache block reservation function for making a reservation for exclusive use of one or a plurality of cache blocks, a recording medium in which a physical page management program for managing a physical page is recorded, wherein the main storage device has The main memory is divided into physical pages, a set of indices obtained by the hash device from all addresses included in the physical page is defined as a color, a color ID is assigned to each color, and a physical ID included in the main memory is assigned. When pages are classified by color ID, the physical page management program that manages physical pages by color ID and thread ID responds to a physical page allocation request by requesting the thread ID of the operating system or application that uses the physical page. Is specified as an argument A first procedure of determining whether or not a thread ID is specified; a second procedure of allocating one physical page having a color allocated to a non-real-time thread; and specifying a thread ID. If there is a third procedure of searching for a given thread ID for a set of physical pages managed for each color ID, and if there is a set of physical pages having the same thread ID, A fourth procedure for determining whether or not there is an unused physical page having the color ID for all sets of those physical pages; A fifth procedure of allocating one physical page having a color ID, and, in the case of an empty set, a set of physical pages to which a valid thread ID is not assigned. A sixth procedure for searching, and when there is such a set of physical pages, a seventh procedure for reserving a set of unused physical pages of the color ID by assigning a thread ID, Eighth procedure that allocates one physical page from the set of physical pages having the color ID in the seventh procedure, and in the sixth procedure, there is no set of physical pages to which a valid thread ID is not assigned. In a case, a ninth procedure for forcibly terminating the real-time thread is provided, wherein the recording medium stores a physical page management program.
JP11148475A 1999-05-27 1999-05-27 Cache block reserving method and computer system with cache block reserving function Pending JP2000339220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11148475A JP2000339220A (en) 1999-05-27 1999-05-27 Cache block reserving method and computer system with cache block reserving function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11148475A JP2000339220A (en) 1999-05-27 1999-05-27 Cache block reserving method and computer system with cache block reserving function

Publications (1)

Publication Number Publication Date
JP2000339220A true JP2000339220A (en) 2000-12-08

Family

ID=15453593

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11148475A Pending JP2000339220A (en) 1999-05-27 1999-05-27 Cache block reserving method and computer system with cache block reserving function

Country Status (1)

Country Link
JP (1) JP2000339220A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006520044A (en) * 2003-03-06 2006-08-31 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Data processing system with cache optimized for processing data flow applications
JP2009301102A (en) * 2008-06-10 2009-12-24 Nec Corp Memory system for using cache memory, its method, and its program
WO2010089799A1 (en) * 2009-02-06 2010-08-12 富士通株式会社 Cache memory system, computer system, and cache memory access method
US7895392B2 (en) 2007-01-05 2011-02-22 International Business Machines Color-based cache monitoring
JP5293974B2 (en) * 2008-03-04 2013-09-18 日本電気株式会社 Memory mapping method and memory system
JP5293611B2 (en) * 2007-12-12 2013-09-18 日本電気株式会社 Memory relocation system
US8555001B2 (en) 2008-08-25 2013-10-08 Nec Corporation Cache memory, including miss status/information and a method using the same
US8671248B2 (en) 2007-01-05 2014-03-11 International Business Machines Corporation Architecture support of memory access coloring
US8799581B2 (en) 2007-01-05 2014-08-05 International Business Machines Corporation Cache coherence monitoring and feedback
CN104794508A (en) * 2015-04-30 2015-07-22 太原理工大学 Fast tag identification protocol for timely reporting information of washing system
JP2016540290A (en) * 2013-10-23 2016-12-22 華為技術有限公司Huawei Technologies Co.,Ltd. Memory resource optimization method and apparatus

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006520044A (en) * 2003-03-06 2006-08-31 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Data processing system with cache optimized for processing data flow applications
US8799581B2 (en) 2007-01-05 2014-08-05 International Business Machines Corporation Cache coherence monitoring and feedback
US8671248B2 (en) 2007-01-05 2014-03-11 International Business Machines Corporation Architecture support of memory access coloring
US7895392B2 (en) 2007-01-05 2011-02-22 International Business Machines Color-based cache monitoring
JP5293611B2 (en) * 2007-12-12 2013-09-18 日本電気株式会社 Memory relocation system
JP5293974B2 (en) * 2008-03-04 2013-09-18 日本電気株式会社 Memory mapping method and memory system
JP2009301102A (en) * 2008-06-10 2009-12-24 Nec Corp Memory system for using cache memory, its method, and its program
US8555001B2 (en) 2008-08-25 2013-10-08 Nec Corporation Cache memory, including miss status/information and a method using the same
WO2010089799A1 (en) * 2009-02-06 2010-08-12 富士通株式会社 Cache memory system, computer system, and cache memory access method
JP2016540290A (en) * 2013-10-23 2016-12-22 華為技術有限公司Huawei Technologies Co.,Ltd. Memory resource optimization method and apparatus
US9857980B2 (en) 2013-10-23 2018-01-02 Huawei Technologies Co., Ltd. Memory resource optimization method and apparatus
US9983793B2 (en) 2013-10-23 2018-05-29 Huawei Technologies Co., Ltd. Memory resource optimization method and apparatus
CN108845960A (en) * 2013-10-23 2018-11-20 华为技术有限公司 A kind of memory resource optimization method and device
CN108845960B (en) * 2013-10-23 2023-12-29 华为技术有限公司 Memory resource optimization method and device
CN104794508A (en) * 2015-04-30 2015-07-22 太原理工大学 Fast tag identification protocol for timely reporting information of washing system
CN104794508B (en) * 2015-04-30 2017-11-07 太原理工大学 A kind of quick identification protocol of label reported in time for washing system information

Similar Documents

Publication Publication Date Title
CN113424160B (en) Processing method, processing device and related equipment
KR102456085B1 (en) Dynamic memory remapping to reduce row buffer collisions
US10552337B2 (en) Memory management and device
US10409723B2 (en) Multi-core processor supporting cache consistency, method, apparatus and system for data reading and writing by use thereof
US8095736B2 (en) Methods and systems for dynamic cache partitioning for distributed applications operating on multiprocessor architectures
US9223712B2 (en) Data cache method, device, and system in a multi-node system
US10209900B2 (en) Buffer allocation and memory management using mapping table
JP7340326B2 (en) Perform maintenance operations
US9086920B2 (en) Device for managing data buffers in a memory space divided into a plurality of memory elements
JP2011086064A (en) Storage unit and memory system
JP2000339220A (en) Cache block reserving method and computer system with cache block reserving function
US11126573B1 (en) Systems and methods for managing variable size load units
JPH11288386A (en) Computer system
US7246202B2 (en) Cache controller, cache control method, and computer system
JP6343722B2 (en) Method and device for accessing a data visitor directory in a multi-core system
WO2023029982A1 (en) Method and system for memory allocation
US6785759B1 (en) System and method for sharing I/O address translation caching across multiple host bridges
CN116225693A (en) Metadata management method, device, computer equipment and storage medium
WO2019104978A1 (en) Cache address mapping method and related device
CN115617542A (en) Memory exchange method and device, computer equipment and storage medium
US11875152B2 (en) Methods and systems for optimizing file system usage
US20180081580A1 (en) Buffer Allocation and Memory Management
JP5196249B2 (en) Memory system, method and program for using cache memory
EP4116829A1 (en) Systems and methods for managing variable size load units
WO2024078342A1 (en) Memory swap method and apparatus, and computer device and storage medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050302

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050629