JPH04242848A - System for controlling cache memory by running mode - Google Patents

System for controlling cache memory by running mode

Info

Publication number
JPH04242848A
JPH04242848A JP2416161A JP41616190A JPH04242848A JP H04242848 A JPH04242848 A JP H04242848A JP 2416161 A JP2416161 A JP 2416161A JP 41616190 A JP41616190 A JP 41616190A JP H04242848 A JPH04242848 A JP H04242848A
Authority
JP
Japan
Prior art keywords
cache memory
kernel
mode
user
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2416161A
Other languages
Japanese (ja)
Other versions
JP3227707B2 (en
Inventor
Tetsuya Fujita
哲也 藤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP41616190A priority Critical patent/JP3227707B2/en
Publication of JPH04242848A publication Critical patent/JPH04242848A/en
Application granted granted Critical
Publication of JP3227707B2 publication Critical patent/JP3227707B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To prevent the degradation in hit rate of a cache memory at the time of program running mode switching in a central processing unit provided with the cache memory. CONSTITUTION:A ROM 5 for kernel where all or a part of kernel codes of an OS are stored, a cache memory 3 for kernel where data on a main storage accessed in the kernel mode is registered, and a cache memory 4 for user where data on the main storage accessed in the user mode is registered are provided, and a designating bit which designates the cache memory 3 or 4 or the ROM 5 for kernel as the registration destination of a corresponding page is included in a page table entry for virtual address conversion. At the time of memory access, a processor 1 selects and uses one of memories 3, 4, and 5 based on contents of the designating bit of the pertinent page table entry and the program running mode by select signal lines 11-1 to 11-3.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、主記憶の記憶内容の一
部の写しを保持するキャッシュメモリを有する中央処理
装置に関し、特にそのキャッシュメモリの制御方式に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a central processing unit having a cache memory that retains a copy of a portion of the contents of a main memory, and more particularly to a control method for the cache memory.

【0002】0002

【従来の技術】従来より、主記憶の記憶内容の一部の写
しを保持するキャッシュメモリを高速にアクセス可能な
メモリやレジスタ等で構成して中央処理装置に設け、主
記憶をアクセスするごとに所定のアルゴリズムに基づい
てキャッシュメモリの内容を更新して頻繁にアクセスさ
れる命令やデータはキャッシュメモリに高い確率で保存
されるようにし、主記憶からの命令やデータの取り出し
時に該当する内容がキャッシュメモリに存在すれば実際
に主記憶をアクセスすることなくキャッシュメモリから
目的とする内容が高速に取り出せるようにしている。
2. Description of the Related Art Conventionally, a cache memory that holds a copy of a portion of the contents of main memory is provided in a central processing unit, consisting of memory, registers, etc. that can be accessed at high speed. The contents of the cache memory are updated based on a predetermined algorithm so that frequently accessed instructions and data are stored in the cache memory with a high probability, and when instructions and data are retrieved from main memory, the corresponding contents are cached. If it exists in memory, the desired content can be retrieved from the cache memory at high speed without actually accessing the main memory.

【0003】0003

【発明が解決しようとする課題】上述したようなキャッ
シュメモリを使用することにより、それを使用しない中
央処理装置に比べて遥かに高速な動作が可能となる。し
かしながら、キャッシュメモリの内容は、同一のメモリ
空間の集合に対して頻繁にアクセスされることにより更
新されて初めてヒット率が高まるので、中央処理装置が
アクセスするメモリ空間の集合が変化した直後において
は、ヒット率が低下する。特に、プログラム走行モード
としてカーネルモードとユーザモードとを持つプロセッ
サにおいては、OS(オペレーティングシステム)のカ
ーネルとユーザプログラムとで格納されている領域が通
常異なるため、プログラム走行モードがカーネルモード
とユーザモードとの間で切り替わった時には中央処理装
置がアクセスするメモリ空間の集合が急激に変化し、ヒ
ット率が大幅に低下する。従って、キャッシュメモリが
暫くの間ほとんど役に立たない場合が多い。このような
キャッシュメモリのヒット率の低下は、システム全体の
処理効率の低下を招来し、プログラム走行モードの切り
替えが頻繁に行われる場合には特に問題となる。例えば
UNIXで実行されるプログラムでは、統計的にいって
ユーザプログラム実行時間の30〜40%がカーネルモ
ードで実行されているといわれており、その場合ユーザ
モード,カーネルモード間のモード切り替えが頻繁に行
われるので、この切り替え時に与える性能低下の影響は
大きい。このような問題に対し従来は特別な対策は施し
ておらず、キャッシュメモリのヒット率の高まりを、モ
ード切り替え後のメモリアクセスによるキャッシュメモ
リの更新に頼っているに過ぎなかった。
By using the cache memory as described above, much faster operation is possible than in a central processing unit that does not use it. However, the hit rate increases only when the contents of the cache memory are updated by frequently accessing the same set of memory spaces, so immediately after the set of memory spaces accessed by the central processing unit changes, , the hit rate decreases. In particular, in processors that have kernel mode and user mode as program running modes, the kernel of the OS (operating system) and the user program are usually stored in different areas, so the program running mode is different between kernel mode and user mode. When switching between the two, the set of memory spaces accessed by the central processing unit changes rapidly, and the hit rate drops significantly. Therefore, cache memory is often of little use for some time. Such a decrease in the hit rate of the cache memory causes a decrease in the processing efficiency of the entire system, which becomes a particular problem when the program running mode is frequently switched. For example, in programs executed on UNIX, it is said that statistically speaking, 30 to 40% of the user program execution time is executed in kernel mode, and in this case, the mode switching between user mode and kernel mode is frequent. Therefore, the impact of performance deterioration during this switching is significant. Conventionally, no special countermeasures have been taken to address such problems, and the only way to increase the hit rate of the cache memory is to update the cache memory through memory access after mode switching.

【0004】本発明はこのような事情に鑑みて為された
もので、その目的は、ユーザモードとカーネルモードと
の切り替え時におけるキャッシュメモリのヒット率の低
下を防止することにある。
The present invention has been made in view of the above circumstances, and its purpose is to prevent the cache memory hit rate from decreasing when switching between user mode and kernel mode.

【0005】[0005]

【課題を解決するための手段】本発明は上記の目的を達
成するために、主記憶の記憶内容の一部の写しを保持す
るキャッシュメモリを備えた中央処理装置において、前
記キャッシュメモリとしてカーネル用キャッシュメモリ
とユーザ用キャッシュメモリとを備えると共にカーネル
コードを記憶するカーネル用ROMを備え、メモリアク
セス時、プロセッサのプログラム走行モードがカーネル
モードのときは前記カーネル用キャッシュメモリまたは
前記カーネル用ROMを使用し、ユーザモードのときは
前記ユーザ用キャッシュメモリを使用する構成を有して
いる。また、仮想アドレス変換を行うためのページテー
ブルエントリに、対応するページの登録先が前記キャッ
シュメモリおよび前記カーネル用ROMの何れであるか
を指定する指定ビットを含み、メモリアクセス時、該当
するページテーブルエントリの前記指定ビットが前記キ
ャッシュメモリを指定している場合、プロセッサのプロ
グラム走行モードがカーネルモードであれば前記カーネ
ル用キャッシュメモリを使用し、ユーザモードであれば
前記ユーザ用キャッシュメモリを使用し、前記指定ビッ
トが前記カーネル用ROMを指定している場合、前記カ
ーネル用ROMを使用する構成を有している。
[Means for Solving the Problems] In order to achieve the above object, the present invention provides a central processing unit equipped with a cache memory that retains a copy of a part of the storage contents of a main memory. It is equipped with a cache memory and a user cache memory, and also has a kernel ROM for storing kernel code, and when the program execution mode of the processor is in kernel mode during memory access, the kernel cache memory or the kernel ROM is used. , has a configuration that uses the user cache memory when in user mode. In addition, a page table entry for performing virtual address translation includes a designation bit that specifies whether the corresponding page is registered in the cache memory or the kernel ROM, and when the memory is accessed, the corresponding page table entry If the specified bit of the entry specifies the cache memory, if the program running mode of the processor is kernel mode, the kernel cache memory is used; if the program run mode is user mode, the user cache memory is used; If the specification bit specifies the kernel ROM, the kernel ROM is used.

【0006】[0006]

【作用】メモリアクセス時、プロセッサのプログラム走
行モードがカーネルモードのときはカーネル用キャッシ
ュメモリまたはカーネル用ROMが使用される。従って
、カーネルモード時にアクセスされる主記憶上のデータ
はカーネル用キャッシュメモリに格納される。また、プ
ログラム走行モードがユーザモードに切り替わると、カ
ーネル用キャッシュメモリに代えてユーザ用キャッシュ
メモリが使用される。従って、カーネル用キャッシュメ
モリは切り替え時点の状態を保ち、ユーザ走行モード時
にアクセスされる主記憶上のユーザプログラムのコード
やデータはユーザ用キャッシュメモリに格納される。 再び、プログラム走行モードがカーネルモードに切り替
わると、ユーザ用キャッシュメモリに代えて再びカーネ
ル用キャッシュメモリが使用され、ユーザ用キャッシュ
メモリは切り替え時点の状態を保つ。OSのカーネルコ
ードの一部あるいは全ては、カーネル用ROMに記憶さ
れているので、それらカーネルコードはキャッシングの
対象外とされる。カーネル用キャッシュメモリ,ユーザ
用キャッシュメモリ,カーネル用ROMの選択は、具体
的には、メモリアクセス時に参照されるページテーブル
エントリの指定ビットの内容とプログラム走行モードの
種類とに基づいて行われる。
[Operation] At the time of memory access, when the program running mode of the processor is kernel mode, the kernel cache memory or kernel ROM is used. Therefore, data on the main memory that is accessed in kernel mode is stored in the kernel cache memory. Furthermore, when the program running mode is switched to user mode, the user cache memory is used instead of the kernel cache memory. Therefore, the kernel cache memory maintains the state at the time of switching, and the user program code and data in the main memory that are accessed during the user running mode are stored in the user cache memory. When the program running mode is switched to the kernel mode again, the kernel cache memory is used again instead of the user cache memory, and the user cache memory maintains the state at the time of switching. Part or all of the kernel code of the OS is stored in the kernel ROM, and therefore, such kernel code is not subject to caching. Specifically, the selection of the kernel cache memory, user cache memory, and kernel ROM is performed based on the content of the designated bit of the page table entry referenced at the time of memory access and the type of program running mode.

【0007】[0007]

【実施例】次に、本発明の実施例について図面を参照し
て詳細に説明する。図1は本発明の一実施例の要部ブロ
ック図である。本実施例においては、主記憶(図示せず
)の記憶内容の一部の写しを保持するキャッシュメモリ
としてカーネル用キャッシュメモリ3とユーザ用キャッ
シュメモリ4とを備えている。
Embodiments Next, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram of essential parts of an embodiment of the present invention. In this embodiment, a kernel cache memory 3 and a user cache memory 4 are provided as cache memories that hold a copy of a part of the storage contents of a main memory (not shown).

【0008】カーネル用キャッシュメモリ3は、カーネ
ルモード時にアクセスされる主記憶上のデータを登録す
るためのキャッシュメモリであり、プロセッサ1から選
択信号線11−3によって選択されることにより、プロ
セッサ1からアドレス信号線7上に出力されたアドレス
に対応するデータが自メモリ内に存在するか否かを調べ
、存在すればヒット結果信号線8を介してキャッシュメ
モリ制御部2にヒット信号を送出すると共にそのデータ
を双方向バス6に出力し、存在しなければヒット結果信
号線8を介してキャッシュメモリ制御部2にミスヒット
信号を送出する。
The kernel cache memory 3 is a cache memory for registering data on the main memory that is accessed in the kernel mode, and is selected by the selection signal line 11-3 from the processor 1. It is checked whether data corresponding to the address output on the address signal line 7 exists in the own memory or not, and if it exists, a hit signal is sent to the cache memory control unit 2 via the hit result signal line 8. The data is output to the bidirectional bus 6, and if the data does not exist, a miss signal is sent to the cache memory control unit 2 via the hit result signal line 8.

【0009】他方、ユーザ用キャッシュメモリ4は、ユ
ーザモード時にアクセスされる主記憶上のデータを登録
するためのキャッシュメモリであり、プロセッサ1から
選択信号線11−2によって選択されることにより、プ
ロセッサ1からアドレス信号線7上に出力されたアドレ
スに対応するデータが自メモリ内に存在するか否かを調
べ、存在すればヒット結果信号線8を介してキャッシュ
メモリ制御部2にヒット信号を送出すると共にそのデー
タを双方向バス6に出力し、存在しなければヒット結果
信号線8を介してキャッシュメモリ制御部2にミスヒッ
ト信号を送出する。
On the other hand, the user cache memory 4 is a cache memory for registering data on the main memory that is accessed in the user mode, and is selected by the processor 1 by the selection signal line 11-2. Checks whether data corresponding to the address output from 1 to the address signal line 7 exists in its own memory or not, and if so, sends a hit signal to the cache memory control unit 2 via the hit result signal line 8. At the same time, the data is output to the bidirectional bus 6, and if the data does not exist, a miss signal is sent to the cache memory control unit 2 via the hit result signal line 8.

【0010】なお、カーネル用キャッシュメモリ3およ
びユーザ用キャッシュメモリ4は、従来のキャッシュメ
モリと同様にデータアレイ,アドレスアレイ,ヒット・
ミスヒット検出回路,キャッシュメモリのリードライト
制御部などを含んでいる。
Note that the kernel cache memory 3 and the user cache memory 4 have a data array, an address array, a hit and
It includes a mishit detection circuit, a cache memory read/write control unit, etc.

【0011】また、本実施例においては、プロセッサ1
から選択信号線11−1によって選択されることにより
プロセッサ1からアドレス信号線7上に出力されたアド
レスに対応するデータを自メモリから読み出して双方向
バス6に出力するカーネル用ROM5が設けられている
。このカーネル用ROM5は、OSのカーネルコードの
全て或いは頻繁に使用される部分を記憶するROMとし
て使用される。即ち、本実施例ではOSのカーネルコー
ドの全て或いは一部をキャッシングの対象外とし、専用
のROMに記憶させている。なお、一部のカーネルコー
ドだけをカーネル用ROM5に記憶させた場合には、残
りのカーネルコードは主記憶上に置かれ、カーネル用キ
ャッシュメモリ3によるキャッシング対象となる。
Furthermore, in this embodiment, the processor 1
A kernel ROM 5 is provided which reads data corresponding to an address outputted from the processor 1 onto the address signal line 7 from its own memory and outputs it to the bidirectional bus 6 when selected by the selection signal line 11-1 from the processor 1. There is. This kernel ROM 5 is used as a ROM that stores all or frequently used portions of the kernel code of the OS. That is, in this embodiment, all or part of the OS kernel code is excluded from caching and is stored in a dedicated ROM. Note that when only a part of the kernel code is stored in the kernel ROM 5, the remaining kernel code is placed in the main memory and is subject to caching by the kernel cache memory 3.

【0012】キャッシュメモリ制御部2は、ヒット結果
信号線8,9によってカーネル用キャッシュメモリ3,
ユーザ用キャッシュメモリ4と接続され、キャッシュメ
モリリードタイミング信号線10によってプロセッサ1
と接続されている。このキャッシュメモリ制御部2は、
キャッシュメモリリード時に、ヒット結果信号線8,9
を通じてカーネル用キャッシュメモリ3またはユーザ用
キャッシュメモリ4からミスヒット信号が送られてきた
とき、ミスヒットにかかるリードデータが確定するタイ
ミングをプロセッサ1に対して信号線10により伝え、
そのタイミングまでプロセッサ1を待たせる働きをして
いる。
The cache memory control unit 2 controls the kernel cache memory 3, by the hit result signal lines 8, 9.
It is connected to the user cache memory 4 and is connected to the processor 1 by a cache memory read timing signal line 10.
is connected to. This cache memory control unit 2 is
When reading cache memory, hit result signal lines 8 and 9
When a miss signal is sent from the kernel cache memory 3 or the user cache memory 4 through the processor 1, the signal line 10 informs the processor 1 of the timing at which the read data related to the miss is determined;
It functions to make processor 1 wait until that timing.

【0013】プロセッサ1は、ユーザモード,カーネル
モードという2種のプログラム走行モードを持つ。プロ
グラム走行モードはプログラム1内部のレジスタで管理
されていて、例外や割り込みが発生したり、走行モード
切り替え用の特別なソフトウェア命令が実行されたりす
ると、プログラム走行モードがカーネルモードとユーザ
モードとの間で切り替わる。
The processor 1 has two program running modes: user mode and kernel mode. The program running mode is managed by registers inside the program 1, and when an exception or interrupt occurs or a special software instruction for switching running modes is executed, the program running mode changes between kernel mode and user mode. Switch with .

【0014】また、プロセッサ1は仮想アドレスをサポ
ートしている。図2は、プロセッサ1がアドレス変換時
に参照する仮想アドレス変換用のページテーブルの1エ
ントリのフォーマット例を示している。同図に示すよう
に仮想アドレス変換用のページテーブルのエントリには
、メモリ指定ビットb1,b2という新たな2ビットが
追加されている。ここで、メモリ指定ビットb1,b2
は必ず一方だけが“1”にされており、当該エントリに
対応するページをキャッシュメモリ(カーネル用キャッ
シュメモリ3またはユーザ用キャッシュメモリ4)に登
録する場合にはメモリ指定ビットb1を“1”とする。 また、当該エントリに対応するページがカーネル用RO
M5に登録されている場合にはメモリ指定ビットb2が
“1”となる。
The processor 1 also supports virtual addresses. FIG. 2 shows an example of the format of one entry of a page table for virtual address translation that the processor 1 refers to during address translation. As shown in the figure, two new bits, memory designation bits b1 and b2, are added to the page table entry for virtual address translation. Here, memory specification bits b1, b2
is always set to "1", and when registering the page corresponding to the entry in the cache memory (kernel cache memory 3 or user cache memory 4), memory specification bit b1 must be set to "1". do. Also, the page corresponding to the entry is the kernel RO
If it is registered in M5, the memory designation bit b2 becomes "1".

【0015】仮想アドレスをサポートしているプロセッ
サ1は、メモリをアクセスするとき、上記の仮想アドレ
ス変換用のページテーブルを参照して仮想アドレスを論
理アドレスに変換し更に物理アドレスに変換して、この
物理アドレスでカーネル用キャッシュメモリ3,ユーザ
用キャッシュメモリ4,カーネル用ROM5をアクセス
する。そして、このような処理の過程においてプロセッ
サ1は、ページテーブルのエントリにおける図2に示し
たメモリ指定ビットb1,b2を参照し、且つ、内部レ
ジスタで管理されているプログラム走行モードを参照し
、カーネル用キャッシュメモリ3,ユーザ用キャッシュ
メモリ4,カーネル用ROM5の何れか1つを選択信号
線11−1〜11−3によって選択し、アドレス信号線
7上にアドレスを送出すると共に図示しないリード/ラ
イト制御信号を送出してメモリのアクセスを行う。
When accessing memory, the processor 1 supporting virtual addresses converts the virtual address into a logical address and then into a physical address by referring to the page table for virtual address conversion described above. The kernel cache memory 3, user cache memory 4, and kernel ROM 5 are accessed using physical addresses. In the course of such processing, the processor 1 refers to the memory designation bits b1 and b2 shown in FIG. One of the user cache memory 3, user cache memory 4, and kernel ROM 5 is selected by the selection signal lines 11-1 to 11-3, and an address is sent onto the address signal line 7, as well as a read/write operation (not shown). Sends control signals to access memory.

【0016】即ち、該当するページテーブルのエントリ
におけるメモリ指定ビットb1が“1”で且つプログラ
ム走行モードがカーネルモードであると、プロセッサ1
は選択信号線11−3によってカーネル用キャッシュメ
モリ3のみを選択する。これによって、カーネル用キャ
ッシュメモリ3は自身が選択されたと判断して、アドレ
ス信号線7上のアドレスに対応するデータが自メモリ内
に存在するか否かを調べ、存在すればヒット信号をヒッ
ト結果信号線8を通じてキャッシュメモリ制御部2に通
知すると共にそのデータを双方向バス6に出力し、プロ
セッサ1はこのバス6上のデータを内部に取り込む。ま
た、該当するデータが存在しなければ、カーネル用キャ
ッシュメモリ3はミスヒット信号をヒット結果信号線8
を通じてキャッシュメモリ制御部2に通知し、キャッシ
ュメモリ制御部2は必要なデータが主記憶からカーネル
用キャッシュメモリ3に到達するまでキャッシュメモリ
リードタイミング信号線10によってプロセッサ1を待
たせる。
That is, if the memory designation bit b1 in the corresponding page table entry is "1" and the program running mode is the kernel mode, the processor 1
selects only the kernel cache memory 3 using the selection signal line 11-3. As a result, the kernel cache memory 3 determines that it has been selected, checks whether data corresponding to the address on the address signal line 7 exists in its own memory, and if so, sends a hit signal as a hit result. The cache memory controller 2 is notified through the signal line 8 and the data is output to the bidirectional bus 6, and the processor 1 takes in the data on this bus 6 internally. Furthermore, if the corresponding data does not exist, the kernel cache memory 3 transmits the miss signal to the hit result signal line 8.
The cache memory control unit 2 makes the processor 1 wait via the cache memory read timing signal line 10 until the necessary data reaches the kernel cache memory 3 from the main memory.

【0017】また、該当するページテーブルのエントリ
におけるメモリ指定ビットb1が“1”で且つプログラ
ム走行モードがユーザモードであると、プロセッサ1は
選択信号線11−2によってユーザ用キャッシュメモリ
4のみを選択する。これによって、ユーザ用キャッシュ
メモリ4は自身が選択されたと判断して、アドレス信号
線7上のアドレスに対応するデータが自メモリ内に存在
するか否かを調べ、存在すればヒット信号をヒット結果
信号線9を通じてキャッシュメモリ制御部2に通知する
と共にそのデータを双方向バス6に出力し、プロセッサ
1はこのバス6上のデータを内部に取り込む。また、該
当するデータが存在しなければ、ユーザ用キャッシュメ
モリ4はミスヒット信号をヒット結果信号線9を通じて
キャッシュメモリ制御部2に通知し、キャッシュメモリ
制御部2は必要なデータが主記憶からユーザ用キャッシ
ュメモリ4に到達するまでキャッシュメモリリードタイ
ミング信号線10によってプロセッサ1を待たせる。
Further, if the memory designation bit b1 in the corresponding page table entry is "1" and the program running mode is user mode, the processor 1 selects only the user cache memory 4 by the selection signal line 11-2. do. As a result, the user cache memory 4 determines that it has been selected, checks whether data corresponding to the address on the address signal line 7 exists in its own memory, and if so, sends a hit signal as a hit result. The cache memory control unit 2 is notified through the signal line 9 and the data is output to the bidirectional bus 6, and the processor 1 takes in the data on this bus 6 internally. If the corresponding data does not exist, the user cache memory 4 notifies the cache memory controller 2 of a miss signal through the hit result signal line 9, and the cache memory controller 2 retrieves the necessary data from the main memory for the user. The processor 1 is made to wait by the cache memory read timing signal line 10 until the cache memory 4 is reached.

【0018】更に、該当するページテーブルのエントリ
におけるメモリ指定ビットb2が“1”であると、プロ
セッサ1は選択信号線11−1によってカーネル用RO
M5のみを選択する。これによって、カーネル用ROM
5は自身が選択されたと判断して、アドレス信号線7上
のアドレスに対応するデータを自メモリから読み出して
双方向バス6に出力し、プロセッサ1はこのバス6上の
データを内部に取り込む。
Furthermore, if the memory designation bit b2 in the corresponding page table entry is "1", the processor 1 selects the kernel RO via the selection signal line 11-1.
Select only M5. With this, the kernel ROM
5 determines that it has been selected, reads data corresponding to the address on address signal line 7 from its own memory and outputs it to bidirectional bus 6, and processor 1 takes in the data on this bus 6 internally.

【0019】[0019]

【発明の効果】以上説明したように、本発明によれば、
カーネルモード時にアクセスされる主記憶上のデータは
カーネル用キャッシュメモリに登録され、ユーザモード
時にアクセスされる主記憶上のデータはユーザ用キャッ
シュメモリに登録されるので、カーネルモード時および
ユーザモード時とも同一のキャッシュメモリを使用して
いた従来方式のようにプログラム走行モード切り替え時
にキャッシュメモリのヒット率が大幅に低下することが
なくなる。
[Effects of the Invention] As explained above, according to the present invention,
Data in main memory that is accessed in kernel mode is registered in the kernel cache memory, and data in main memory that is accessed in user mode is registered in the user cache memory, so both in kernel mode and user mode. Unlike the conventional method in which the same cache memory is used, the hit rate of the cache memory does not drop significantly when switching the program running mode.

【0020】また、OSのカーネルコードの一部または
全てをキャッシングの対象から外してカーネル用ROM
に記憶したことにより、OSのカーネルコードに対する
アクセス時にキャッシュミスヒットが生じることがなく
なって高速動作が可能になると共に、限られた容量のカ
ーネル用キャッシュメモリの有効利用が可能になってそ
のヒット率が向上する。
[0020] It is also possible to exclude part or all of the OS kernel code from caching and store it in the kernel ROM.
By storing data in the memory, cache misses do not occur when accessing the OS kernel code, enabling high-speed operation, and the limited amount of kernel cache memory can be used effectively, increasing the hit rate. will improve.

【0021】更に、仮想アドレス変換を行うためのペー
ジテーブルエントリに、対応するページの登録先が前記
キャッシュメモリおよび前記カーネル用ROMの何れで
あるかを指定する指定ビットを含ませ、メモリアクセス
時に、該当するページテーブルエントリの指定ビットと
プログラム走行モードとに基づいてカーネル用キャッシ
ュメモリ,ユーザ用キャッシュメモリ,カーネル用RO
Mの中から使用するメモリを選択することにより、仮想
アドレスのページ単位に、登録されるキャッシュメモリ
およびROMの選択が可能になる。
Furthermore, a page table entry for performing virtual address conversion includes a designation bit that specifies whether the corresponding page is registered in the cache memory or the kernel ROM, and when accessing the memory, Based on the specified bit of the corresponding page table entry and the program running mode, the kernel cache memory, user cache memory, and kernel RO are
By selecting the memory to be used from M, it is possible to select the cache memory and ROM to be registered in page units of virtual addresses.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の一実施例の要部ブロック図である。FIG. 1 is a block diagram of main parts of an embodiment of the present invention.

【図2】仮想アドレス変換用のページテーブルの1エン
トリのフォーマット例を示す図である。
FIG. 2 is a diagram showing an example of the format of one entry of a page table for virtual address translation.

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

1…プロセッサ 2…キャッシュメモリ制御部 3…カーネル用キャッシュメモリ 4…ユーザ用キャッシュメモリ 5…カーネル用ROM 6…双方向バス 7…アドレス信号線 8,9…ヒット結果信号線 10…キャッシュメモリリードタイミング信号線11−
1〜11−3…選択信号線
1... Processor 2... Cache memory control unit 3... Kernel cache memory 4... User cache memory 5... Kernel ROM 6... Bidirectional bus 7... Address signal lines 8, 9... Hit result signal line 10... Cache memory read timing Signal line 11-
1 to 11-3...Selection signal line

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】  主記憶の記憶内容の一部の写しを保持
するキャッシュメモリを備えた中央処理装置において、
前記キャッシュメモリとしてカーネル用キャッシュメモ
リとユーザ用キャッシュメモリとを備えると共にカーネ
ルコードを記憶するカーネル用ROMを備え、メモリア
クセス時、プロセッサのプログラム走行モードがカーネ
ルモードのときは前記カーネル用キャッシュメモリまた
は前記カーネル用ROMを使用し、ユーザモードのとき
は前記ユーザ用キャッシュメモリを使用する走行モード
別キャッシュメモリ制御方式。
Claim 1: A central processing unit equipped with a cache memory that retains a copy of a portion of the stored contents of the main memory, comprising:
The cache memory includes a kernel cache memory and a user cache memory, and a kernel ROM for storing kernel code, and when the program running mode of the processor is kernel mode at the time of memory access, the kernel cache memory or the A cache memory control method for each running mode that uses a kernel ROM and uses the user cache memory when in user mode.
【請求項2】  仮想アドレス変換を行うためのページ
テーブルエントリに、対応するページの登録先が前記キ
ャッシュメモリおよび前記カーネル用ROMの何れであ
るかを指定する指定ビットを含み、メモリアクセス時、
該当するページテーブルエントリの前記指定ビットが前
記キャッシュメモリを指定している場合、プロセッサの
プログラム走行モードがカーネルモードであれば前記カ
ーネル用キャッシュメモリを使用し、ユーザモードであ
れば前記ユーザ用キャッシュメモリを使用し、前記指定
ビットが前記カーネル用ROMを指定している場合、前
記カーネル用ROMを使用する請求項1記載の走行モー
ド別キャッシュメモリ制御方式。
2. A page table entry for performing virtual address translation includes a designation bit that specifies whether the corresponding page is registered in the cache memory or the kernel ROM, and when accessing the memory,
If the specified bit of the corresponding page table entry specifies the cache memory, if the program running mode of the processor is kernel mode, the kernel cache memory is used; if the program execution mode of the processor is user mode, the user cache memory is used. 2. The cache memory control method for each running mode according to claim 1, wherein when the specified bit specifies the kernel ROM, the kernel ROM is used.
【請求項3】  前記カーネル用キャッシュメモリおよ
び前記ユーザ用キャッシュメモリからのヒット結果信号
を入力し、キャッシュメモリリードのミスヒット時、リ
ードデータが確定するタイミングまで前記プロセッサを
待たせるキャッシュメモリ制御手段を含む請求項1また
は2記載の走行モード別キャッシュメモリ制御方式。
3. Cache memory control means that inputs hit result signals from the kernel cache memory and the user cache memory and causes the processor to wait until read data is determined when a cache memory read miss-hit occurs. 3. The cache memory control method according to driving mode according to claim 1 or 2.
JP41616190A 1990-12-29 1990-12-29 Cache memory control method for each driving mode Expired - Fee Related JP3227707B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP41616190A JP3227707B2 (en) 1990-12-29 1990-12-29 Cache memory control method for each driving mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP41616190A JP3227707B2 (en) 1990-12-29 1990-12-29 Cache memory control method for each driving mode

Publications (2)

Publication Number Publication Date
JPH04242848A true JPH04242848A (en) 1992-08-31
JP3227707B2 JP3227707B2 (en) 2001-11-12

Family

ID=18524402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP41616190A Expired - Fee Related JP3227707B2 (en) 1990-12-29 1990-12-29 Cache memory control method for each driving mode

Country Status (1)

Country Link
JP (1) JP3227707B2 (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009069969A (en) * 2007-09-11 2009-04-02 Canon Inc Information processing method and information processor, program
US8966184B2 (en) 2011-01-31 2015-02-24 Intelligent Intellectual Property Holdings 2, LLC. Apparatus, system, and method for managing eviction of data
US9104599B2 (en) 2007-12-06 2015-08-11 Intelligent Intellectual Property Holdings 2 Llc Apparatus, system, and method for destaging cached data
US9141527B2 (en) 2011-02-25 2015-09-22 Intelligent Intellectual Property Holdings 2 Llc Managing cache pools
US9251086B2 (en) 2012-01-24 2016-02-02 SanDisk Technologies, Inc. Apparatus, system, and method for managing a cache
US9519540B2 (en) 2007-12-06 2016-12-13 Sandisk Technologies Llc Apparatus, system, and method for destaging cached data
US9612966B2 (en) 2012-07-03 2017-04-04 Sandisk Technologies Llc Systems, methods and apparatus for a virtual machine cache
US9734086B2 (en) 2006-12-06 2017-08-15 Sandisk Technologies Llc Apparatus, system, and method for a device shared between multiple independent hosts
US9767032B2 (en) 2012-01-12 2017-09-19 Sandisk Technologies Llc Systems and methods for cache endurance
US9842128B2 (en) 2013-08-01 2017-12-12 Sandisk Technologies Llc Systems and methods for atomic storage operations
US9842053B2 (en) 2013-03-15 2017-12-12 Sandisk Technologies Llc Systems and methods for persistent cache logging
US9946607B2 (en) 2015-03-04 2018-04-17 Sandisk Technologies Llc Systems and methods for storage error management
US10019353B2 (en) 2012-03-02 2018-07-10 Longitude Enterprise Flash S.A.R.L. Systems and methods for referencing data on a storage medium
US10019320B2 (en) 2013-10-18 2018-07-10 Sandisk Technologies Llc Systems and methods for distributed atomic storage operations
US10073630B2 (en) 2013-11-08 2018-09-11 Sandisk Technologies Llc Systems and methods for log coordination
US10102144B2 (en) 2013-04-16 2018-10-16 Sandisk Technologies Llc Systems, methods and interfaces for data virtualization
US10102117B2 (en) 2012-01-12 2018-10-16 Sandisk Technologies Llc Systems and methods for cache and storage device coordination
US10318495B2 (en) 2012-09-24 2019-06-11 Sandisk Technologies Llc Snapshots for a non-volatile device
US10509776B2 (en) 2012-09-24 2019-12-17 Sandisk Technologies Llc Time sequence data management
US10558561B2 (en) 2013-04-16 2020-02-11 Sandisk Technologies Llc Systems and methods for storage metadata management

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11960412B2 (en) 2006-12-06 2024-04-16 Unification Technologies Llc Systems and methods for identifying storage resources that are not in use
US11847066B2 (en) 2006-12-06 2023-12-19 Unification Technologies Llc Apparatus, system, and method for managing commands of solid-state storage using bank interleave
US9734086B2 (en) 2006-12-06 2017-08-15 Sandisk Technologies Llc Apparatus, system, and method for a device shared between multiple independent hosts
US11640359B2 (en) 2006-12-06 2023-05-02 Unification Technologies Llc Systems and methods for identifying storage resources that are not in use
US9824027B2 (en) 2006-12-06 2017-11-21 Sandisk Technologies Llc Apparatus, system, and method for a storage area network
US11573909B2 (en) 2006-12-06 2023-02-07 Unification Technologies Llc Apparatus, system, and method for managing commands of solid-state storage using bank interleave
JP2009069969A (en) * 2007-09-11 2009-04-02 Canon Inc Information processing method and information processor, program
US9104599B2 (en) 2007-12-06 2015-08-11 Intelligent Intellectual Property Holdings 2 Llc Apparatus, system, and method for destaging cached data
US9519540B2 (en) 2007-12-06 2016-12-13 Sandisk Technologies Llc Apparatus, system, and method for destaging cached data
US8966184B2 (en) 2011-01-31 2015-02-24 Intelligent Intellectual Property Holdings 2, LLC. Apparatus, system, and method for managing eviction of data
US9092337B2 (en) 2011-01-31 2015-07-28 Intelligent Intellectual Property Holdings 2 Llc Apparatus, system, and method for managing eviction of data
US9141527B2 (en) 2011-02-25 2015-09-22 Intelligent Intellectual Property Holdings 2 Llc Managing cache pools
US10102117B2 (en) 2012-01-12 2018-10-16 Sandisk Technologies Llc Systems and methods for cache and storage device coordination
US9767032B2 (en) 2012-01-12 2017-09-19 Sandisk Technologies Llc Systems and methods for cache endurance
US9251086B2 (en) 2012-01-24 2016-02-02 SanDisk Technologies, Inc. Apparatus, system, and method for managing a cache
US10019353B2 (en) 2012-03-02 2018-07-10 Longitude Enterprise Flash S.A.R.L. Systems and methods for referencing data on a storage medium
US9612966B2 (en) 2012-07-03 2017-04-04 Sandisk Technologies Llc Systems, methods and apparatus for a virtual machine cache
US10318495B2 (en) 2012-09-24 2019-06-11 Sandisk Technologies Llc Snapshots for a non-volatile device
US10509776B2 (en) 2012-09-24 2019-12-17 Sandisk Technologies Llc Time sequence data management
US9842053B2 (en) 2013-03-15 2017-12-12 Sandisk Technologies Llc Systems and methods for persistent cache logging
US10102144B2 (en) 2013-04-16 2018-10-16 Sandisk Technologies Llc Systems, methods and interfaces for data virtualization
US10558561B2 (en) 2013-04-16 2020-02-11 Sandisk Technologies Llc Systems and methods for storage metadata management
US9842128B2 (en) 2013-08-01 2017-12-12 Sandisk Technologies Llc Systems and methods for atomic storage operations
US10019320B2 (en) 2013-10-18 2018-07-10 Sandisk Technologies Llc Systems and methods for distributed atomic storage operations
US10073630B2 (en) 2013-11-08 2018-09-11 Sandisk Technologies Llc Systems and methods for log coordination
US9946607B2 (en) 2015-03-04 2018-04-17 Sandisk Technologies Llc Systems and methods for storage error management

Also Published As

Publication number Publication date
JP3227707B2 (en) 2001-11-12

Similar Documents

Publication Publication Date Title
JPH04242848A (en) System for controlling cache memory by running mode
US6456891B1 (en) System and method for transparent handling of extended register states
JPH0512116A (en) Cache memory controller
US5555395A (en) System for memory table cache reloads in a reduced number of cycles using a memory controller to set status bits in the main memory table
US4937738A (en) Data processing system which selectively bypasses a cache memory in fetching information based upon bit information of an instruction
JPH0458051B2 (en)
JPH06318177A (en) Method, device and computer system for reducing cache mistake penalty
JP3088303B2 (en) Cache memory bank controller
KR100373576B1 (en) System and method for invalidating an entry in a translation unit
JPH0327940B2 (en)
US6480940B1 (en) Method of controlling cache memory in multiprocessor system and the multiprocessor system based on detection of predetermined software module
JPH0784879A (en) Cache memory device
JP4111645B2 (en) Memory bus access control method after cache miss
JPH04369061A (en) Control system for cache memory
JP3382087B2 (en) Computer system
JP2613258B2 (en) Information processing method and apparatus
JP3039391B2 (en) Memory system
JPH05143330A (en) Stack cache and control system thereof
JPH0690732B2 (en) Microprocessor
JPH0628258A (en) Microprocessor
KR930004433B1 (en) Direct controllable cache memory
JPH08305634A (en) Information processing method and device therefor
JP3190661B2 (en) Information processing system
JP2694076B2 (en) Storage unit control device
JPH05250263A (en) Virtual processor system and nonvolatile storage system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees