JPH0573420A - Computer having cache memory - Google Patents

Computer having cache memory

Info

Publication number
JPH0573420A
JPH0573420A JP3260958A JP26095891A JPH0573420A JP H0573420 A JPH0573420 A JP H0573420A JP 3260958 A JP3260958 A JP 3260958A JP 26095891 A JP26095891 A JP 26095891A JP H0573420 A JPH0573420 A JP H0573420A
Authority
JP
Japan
Prior art keywords
cache memory
program
storage device
memory
cache
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
JP3260958A
Other languages
Japanese (ja)
Other versions
JP3130591B2 (en
Inventor
Shinpei Yamaguchi
真平 山口
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP03260958A priority Critical patent/JP3130591B2/en
Publication of JPH0573420A publication Critical patent/JPH0573420A/en
Application granted granted Critical
Publication of JP3130591B2 publication Critical patent/JP3130591B2/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 improve the use efficiency of a cache memory with limited memory capacity without imposing a large burden on a hardware. CONSTITUTION:In a computer having a cache memory, at the time of development of a program, the program is recorded in a secondary storage device 7 by giving priority of a cache object. In an operation system, a table for registering and managing a program store state of a cache memory 6 is provided. At the time of executing a task, the program is read out of the secondary storage device 7, the read-out program module is stored by distributing the programs in the cache memory 6 or a main storage device 5 in accordance with the priority, based on information of the management table of the operation system, and the management table is updated.

Description

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

【0001】[0001]

【産業上の利用分野】この発明はキャッシュメモリを持
つコンピュータに関し、特にキャッシュメモリの使用効
率の向上を図ったコンピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer having a cache memory, and more particularly to a computer having improved cache memory usage efficiency.

【0002】[0002]

【従来の技術】近年のコンピュータ技術の進歩により、
CPU(中央演算処理装置:プロセッサ)の性能向上、
特に信号処理速度の高速化には著しいものがある。この
ような高速のCPUを低速の主記憶装置から切り離すた
めに小容量の高速バッファが用いられる。このバッファ
が即ちキャッシュメモリで、CPUが有する速いクロッ
クに対応するべく、CPUが最も高頻度にアクセスした
い命令や最後に使ったデータを高速メモリに予め格納し
ておき、これらを素早くアクセスするためのメモリであ
る。これは上記主記憶装置に用いられるダイナミックR
AMが速いクロックスピードのCPUのアクセスについ
ていけないことや、必要なデータがキャッシュメモリ内
にあれば時間のかかる主記憶装置へのアクセスが不要と
なり、システムの性能が向上するという利点から採用さ
れている。このようなキャッシュメモリは、CPUに内
蔵されたタイプと、CPUの外部に高速メモリを付加し
たタイプがある。
2. Description of the Related Art Due to recent advances in computer technology,
CPU (central processing unit: processor) performance improvement,
In particular, there is a remarkable increase in signal processing speed. A small capacity high speed buffer is used to separate such a high speed CPU from a low speed main memory. This buffer is a cache memory, and in order to correspond to the fast clock of the CPU, the instruction that the CPU wants to access most frequently and the last used data are stored in advance in the high speed memory, and these can be accessed quickly. It is a memory. This is the dynamic R used in the main memory device.
This is adopted because the AM cannot keep up with the access to the CPU with a high clock speed, and if the necessary data is in the cache memory, the time-consuming access to the main storage device is not necessary and the system performance is improved. .. Such a cache memory includes a type built in the CPU and a type in which a high speed memory is added to the outside of the CPU.

【0003】ところでキャッシュメモリを効率よく利用
するには、アクセスしたい情報がキャッシュメモリ内に
存在する「キャッシュ・ヒット」の割合が高くなければ
ならない。ヒットとはアクセスがキャッシュメモリだけ
で完了し、主記憶装置へのアクセスが不要の場合で、も
しアクセスしたい情報がキャッシュメモリ内に存在しな
いときは「キャッシュ・ミス」となる。このキャッシュ
・ミスの場合は主記憶装置から情報がアクセスされるた
め、高速にアクセスされないことになる。
In order to use the cache memory efficiently, the ratio of "cache hits" where the information to be accessed exists in the cache memory must be high. A hit is a case where access is completed only in the cache memory and access to the main storage device is not necessary. If the information to be accessed does not exist in the cache memory, it is a "cache miss". In the case of this cache miss, the information is accessed from the main storage device, so that it cannot be accessed at high speed.

【0004】従来から用いられているキャッシュメモリ
を備えたコンピュータのブロック図を図6に示す。キャ
ッシュメモリ1はCPU2と主記憶装置3との間に位置
し、主記憶装置3の内容を一部を蓄えておく。CPU2
からアクセス要求があったとき、そのデータがキャッシ
ュメモリ1内にあるならキャッシュメモリ1から該当デ
ータをCPU2に送り(キャッシュ・ヒット)、キャッ
シュメモリ1内にデータが存在しないときは、主記憶装
置3からデータをアクセスし、CPU2及びキャッシュ
メモリ1にデータを送る。これらのアクセス制御はキャ
ッシュコントローラ4が行う。
FIG. 6 shows a block diagram of a conventional computer having a cache memory. The cache memory 1 is located between the CPU 2 and the main storage device 3, and stores a part of the contents of the main storage device 3. CPU2
When there is an access request from the cache memory 1, if the data is in the cache memory 1, the corresponding data is sent from the cache memory 1 to the CPU 2 (cache hit). If there is no data in the cache memory 1, the main memory device 3 To access the data and send the data to the CPU 2 and the cache memory 1. The cache controller 4 performs these access controls.

【0005】[0005]

【発明が解決しようとする課題】一般にソフトウェア側
からキャッシュメモリを見ると、キャッシュメモリと主
記憶装置の区別がなく、現在実行されているプログラム
が主記憶装置で実行されているのかキャッシュメモリで
実行されているのか判らない。これはハードウェアのみ
でキャッシュメモリの制御を行っているからであるが、
ソフトウェア開発時においてプログラムを高速に実行し
たい部分は予測がつくため、ソフトウェアにある程度キ
ャッシュメモリ制御させれば、キャッシュによる処理速
度の向上が望める。
Generally, when the cache memory is viewed from the software side, there is no distinction between the cache memory and the main storage device, and whether the currently executed program is executed in the main storage device or executed in the cache memory. I do not know if it is done. This is because the cache memory is controlled only by hardware,
During software development, it is possible to predict where the program will be executed at high speed. Therefore, if the software controls the cache memory to some extent, the cache can improve the processing speed.

【0006】上記従来システムのようにハードウェアで
キャッシュメモリの制御を行う場合は、ソフトウェアの
負担が全くないという利点があるが、キャッシュメモリ
をコントロールするキャッシュコントローラのハードウ
ェアが複雑になり、またキャッシュメモリ容量を大きく
採らねばキャッシュ・ヒットの割合が少なくなってく
る。この現象はプログラムが巨大化するほど顕著にな
る。即ちハードウェア側ではプログラムのどの部分が頻
繁に実行されているかが判らないため、プログラムのモ
ジュールをすべて一様な重みでキャッシュするため、実
行頻度の高いモジュールをキャッシュメモリにキャッシ
ュしても、めったに実行しないプログラムモジュールを
キャッシュしたため、先程までキャッシュメモリにあっ
た実行頻度の高いプログラムがキャッシュメモリから追
い出される結果となる。そのためキャッシュメモリ内の
データの入れ替えが頻繁に起き、CPUの処理効率があ
まり向上されないという問題がある。特に小規模のコン
ピュータシステムでは、キャッシュメモリを搭載しても
コストの関係でキャッシュメモリの容量を大きくできな
いため、上述のようなデータ入れ替えの問題が与える影
響は大きい。
When the cache memory is controlled by hardware as in the conventional system described above, there is an advantage that there is no software load, but the hardware of the cache controller for controlling the cache memory becomes complicated, and the cache is also complicated. The ratio of cache hits decreases as the memory capacity is increased. This phenomenon becomes more remarkable as the program becomes larger. That is, since the hardware side does not know which part of the program is frequently executed, all the modules of the program are cached with a uniform weight. Therefore, even if a frequently executed module is cached in the cache memory, it rarely occurs. Since the program modules that are not executed are cached, the programs that have been executed in the cache memory and are frequently executed will be evicted from the cache memory. Therefore, there is a problem that the data in the cache memory is frequently replaced, and the processing efficiency of the CPU is not improved so much. Particularly in a small-scale computer system, even if the cache memory is installed, the capacity of the cache memory cannot be increased due to the cost, so that the problem of data replacement as described above has a great influence.

【0007】この発明は上記従来のキャッシュメモリシ
ステムの問題点に鑑みてなされたもので、キャッシュメ
モリの処理効率の向上を図ったコンピュータのキャッシ
ュメモリ管理システムを提供する。
The present invention has been made in view of the above problems of the conventional cache memory system, and provides a cache memory management system for a computer which improves the processing efficiency of the cache memory.

【0008】[0008]

【課題を解決するための手段】この発明は、上記目的を
達成するため、プログラム開発時点で高速に実行したい
プログラムを予め設定して2次記憶装置に記録し、2次
記憶装置からプログラムをメモリにロードするとき、オ
ペレーティングシステムが予め設定された上記情報を登
録した管理テーブルをもとに、プログラムモジュールを
主記憶装置若しくはキャッシュメモリに振り分けて転送
し、これに基づいてプログラムを実行する。
In order to achieve the above object, the present invention presets a program to be executed at high speed at the time of program development, records it in a secondary storage device, and stores the program from the secondary storage device in a memory. At the time of loading, the operating system allocates and transfers the program module to the main storage device or the cache memory based on the management table in which the above-mentioned information set in advance is registered, and executes the program based on this.

【0009】[0009]

【作用】ハードウェアは複雑なキャッシュメモリコント
ローラを必要とせず、高速メモリをCPUのメモリ空間
に主記憶装置と同じように配置するだけであり、実行頻
度の高いプログラムがキャッシュメモリに常駐するの
で、CPUの処理速度の向上が望める。
The hardware does not require a complicated cache memory controller, only the high-speed memory is arranged in the memory space of the CPU in the same manner as the main storage device, and the frequently executed program resides in the cache memory. It is expected that the processing speed of the CPU will be improved.

【0010】[0010]

【実施例】図1は本発明を採用するキャッシュメモリ管
理システムのブロック図である。図1において、主記憶
装置5はダイナミックメモリで構成され、通常のプログ
ラムモジュールがロードされる。ダイナミックメモリで
構成されるためCPU2からのアクセス速度は限定され
る。一方、高速メモリであるキャッシュメモリ6は高速
スタティックメモリで構成され、0〜Nのメモリブロッ
クに高速に実行したいプログラムモジュールがオペレー
ティングシステムによりロードされる。高速メモリで構
成されるためCPU2は最高速度でアクセスできる。
1 is a block diagram of a cache memory management system which employs the present invention. In FIG. 1, the main memory 5 is composed of a dynamic memory, and a normal program module is loaded therein. Since it is composed of a dynamic memory, the access speed from the CPU 2 is limited. On the other hand, the cache memory 6, which is a high-speed memory, is composed of a high-speed static memory, and a program module to be executed at high speed is loaded into the memory blocks 0 to N by the operating system. Since it is composed of a high-speed memory, the CPU 2 can access it at the maximum speed.

【0011】プログラム開発時点で、高速に実行したい
プログラムモジュールはある程度判明しているため、各
プログラムモジュールに対してキャッシュすべき優先順
位を決定し、これを付加情報としてプログラムと一緒に
ハードディスクなどで構成された2次記憶装置に記録す
る。図2は2次記憶装置7に記録されたプログラムの状
況を模型的に示し、1つのタスクのための複数のプログ
ラムモジュールが、主記憶装置5にロードするプログラ
ムモジュール群8とキャッシュメモリ6にロードするプ
ログラムモジュール群9に区別して記録される。
At the time of program development, it is known to some extent which program modules are desired to be executed at high speed. Therefore, the priority order to be cached for each program module is determined, and this is used as additional information together with the program in a hard disk or the like. It is recorded in the stored secondary storage device. FIG. 2 schematically shows a situation of a program recorded in the secondary storage device 7, in which a plurality of program modules for one task are loaded in the main memory device 5 and a program module group 8 loaded in the cache memory 6. The program module group 9 is recorded separately.

【0012】オペレーティングシステムは、図3に示す
ようなキャッシュメモリ管理テープ10を内蔵する。こ
の管理テーブル10は、少なくともタスク番号,上記優
先順位,ブロックモジュール番号の情報を登録する領域
が設定され、キャッシュメモリ6のブロック0〜Nに対
してそれぞれ対応してキャッシュメモリの各ブロックを
管理する。上記タスク番号は複数のタスクが起動してい
るとき、一つのタスク単位に付される番号であり,優先
順位はキャッシュメモリ6にロードされる順位をきめる
情報,モジュール番号は一つのプログラム内の各モジュ
ールに付された番号である。
The operating system contains a cache memory management tape 10 as shown in FIG. The management table 10 is set with an area for registering at least the information of the task number, the priority, and the block module number, and manages each block of the cache memory corresponding to blocks 0 to N of the cache memory 6, respectively. .. The task number is a number assigned to each task when a plurality of tasks are activated, the priority is information for determining the order to be loaded into the cache memory 6, and the module number is each information in one program. It is the number given to the module.

【0013】上記2次記憶装置7に通常のプログラムモ
ジュールと共に優先順位を付して記録されたキャッシュ
すべきプログラムモジュールについて、オペレーティン
グシステムはプログラムを2次記憶装置からメモリにロ
ードして実行するとき、2次記憶装置7に格納した上記
優先順位の情報をもとに、プログラムモジュールを主記
憶装置5或いはキャッシュメモリ6に配置する。オペレ
ーティングシステムの処理の流れを図4に示す。
With respect to the program modules to be cached, which are recorded in the secondary storage device 7 together with the normal program modules in order of priority, when the operating system loads the programs from the secondary storage device into the memory and executes them, The program module is arranged in the main storage device 5 or the cache memory 6 based on the above-mentioned priority information stored in the secondary storage device 7. The processing flow of the operating system is shown in FIG.

【0014】オペレーティングシステムは2次記憶装置
7から読み出したプログラムモジュールについて、プロ
グラムモジュールはキャッシュメモリにロードすべきか
否かを判断し、キャッシュ対象モジュールであれば、内
蔵するキャッシュメモリ管理テーブル10に登録された
情報をもとに、キャッシュメモリ6のどの領域が空いて
いるかを捜し出し、空き領域にプログラムモジュールを
ロードする。管理テーブルに空き領域がないときは優先
順位の低いプログラムモジュールをキャッシュメモリか
ら追い出して新たなプログラムモジュールをロードす
る。新たにキャッッシュメモリにロードした情報は管理
テーブル10に記録される。
The operating system judges whether or not the program module read from the secondary storage device 7 should be loaded into the cache memory, and if it is a cache target module, it is registered in the internal cache memory management table 10. Based on the information obtained, which area of the cache memory 6 is empty is searched for and the program module is loaded into the empty area. When there is no free area in the management table, the program module with the lower priority is expelled from the cache memory and a new program module is loaded. The information newly loaded in the cache memory is recorded in the management table 10.

【0015】1つのタスクについて2次記憶装置7から
読み出され、プログラムモジュールに付された指示に従
ってメモリ5,6にロードされたなら、CPUはプログ
ラムを実行する。プログラムの実行が終わればオペレー
ティングシステムは不要になったプログラムモジュール
をキャッシュメモリから取り除き、管理テーブルを更新
する。図5は、従来システム(a)と上記実施例(b)
でのプログラム実行時間の関係を比較した図で、1つの
プログラムモジュールをキャッシュで実行する場合は実
行時間1ms、主記憶装置による通常実行時間では3m
sを要するとすれば、従来システムのようにキャッシュ
ミスが起きている(図中両方向斜線を付して示すプログ
ラムモジュール)プログラム実行では15msを要する
が、本実施例ではキャッシュミスがほとんど起きないた
め8msの時間で済む。
If one task is read from the secondary storage device 7 and loaded into the memories 5 and 6 according to the instruction given to the program module, the CPU executes the program. When the execution of the program is completed, the operating system removes the unnecessary program module from the cache memory and updates the management table. FIG. 5 shows a conventional system (a) and the above embodiment (b).
In the figure comparing the relationship of the program execution time in, the execution time is 1 ms when one program module is executed in the cache, and the normal execution time is 3 m when the main storage device is used.
If s is required, a cache miss occurs as in the conventional system (a program module shown by hatching in both directions in the figure) requires 15 ms for program execution, but in this embodiment, a cache miss hardly occurs. It takes 8 ms.

【0016】[0016]

【発明の効果】以上のように本発明によれば、簡単なハ
ードウェア構成及び限られたメモリ容量でキャッシュメ
モリの使用効率を高めることができ、CPUの処理速度
の向上を図ることができ、特に小形コンピュータに対し
て経済性よく性能の向上を図ることができる。
As described above, according to the present invention, it is possible to improve the use efficiency of the cache memory with a simple hardware configuration and a limited memory capacity, and to improve the processing speed of the CPU. Especially for small computers, the performance can be improved economically.

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

【図1】 本発明の一実施例を示すブロック図。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】 上記実施例を説明するための2次記憶装置の
プログラム格納状態を示す模型図。
FIG. 2 is a model diagram showing a program storage state of a secondary storage device for explaining the embodiment.

【図3】 上記実施例を説明するためのオペレーティン
グシステムのキャッシュメモリ管理テーブルの模型図。
FIG. 3 is a model diagram of a cache memory management table of an operating system for explaining the above embodiment.

【図4】 上記実施例を説明するためのオペレーティン
グシステムのフローチャート。
FIG. 4 is a flowchart of an operating system for explaining the above embodiment.

【図5】 本実施例と従来システムのキャッシュを比較
する図。
FIG. 5 is a diagram comparing caches of the present embodiment and a conventional system.

【図6】 従来のキャッシュシステムを説明するブロッ
ク図。
FIG. 6 is a block diagram illustrating a conventional cache system.

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

2 CPU 5 主記憶装置 6 キャッシュメモリ 7 2次記憶装置 10 キャッシュメモリ管理テーブル 2 CPU 5 main memory device 6 cache memory 7 secondary memory device 10 cache memory management table

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 キャッシュメモリを持つコンピュータに
おいて、キャッシュ対象の優先順位を付したプログラム
を記録する2次記憶装置と、タスク実行時に上記2次記
憶装置からプログラムを読み出して、記録された優先順
位に従ってキャッシュメモリ又は主記憶装置へプログラ
ムを振り分けて格納するオペレーションシステムと、キ
ャッシュメモリのプログラム格納状況を登録してキャッ
シュメモリを管理するオペレーションシステムに設けら
れたテーブルとを備えてなることを特徴とするキャッシ
ュメモリを持つコンピュータ。
1. In a computer having a cache memory, a secondary storage device for recording a program with priorities to be cached, and a program being read from the secondary storage device at the time of executing a task, according to the recorded priority order. A cache comprising an operation system for distributing and storing a program to a cache memory or a main storage device, and a table provided in the operation system for registering the program storage status of the cache memory and managing the cache memory. A computer with memory.
JP03260958A 1991-09-11 1991-09-11 Computer with cache memory Expired - Fee Related JP3130591B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03260958A JP3130591B2 (en) 1991-09-11 1991-09-11 Computer with cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03260958A JP3130591B2 (en) 1991-09-11 1991-09-11 Computer with cache memory

Publications (2)

Publication Number Publication Date
JPH0573420A true JPH0573420A (en) 1993-03-26
JP3130591B2 JP3130591B2 (en) 2001-01-31

Family

ID=17355133

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03260958A Expired - Fee Related JP3130591B2 (en) 1991-09-11 1991-09-11 Computer with cache memory

Country Status (1)

Country Link
JP (1) JP3130591B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5516744B2 (en) * 2010-08-27 2014-06-11 富士通株式会社 Scheduler, multi-core processor system, and scheduling method
US10788782B2 (en) 2016-07-20 2020-09-29 Konica Minolta, Inc. Image forming apparatus locks down storage area of cache memory stores portion of image forming program for executing real-time image forming process

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6079962A (en) 1997-03-25 2000-06-27 Copeland Corporation Composite aluminum alloy scroll machine components

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5516744B2 (en) * 2010-08-27 2014-06-11 富士通株式会社 Scheduler, multi-core processor system, and scheduling method
US8996811B2 (en) 2010-08-27 2015-03-31 Fujitsu Limited Scheduler, multi-core processor system, and scheduling method
US9430388B2 (en) 2010-08-27 2016-08-30 Fujitsu Limited Scheduler, multi-core processor system, and scheduling method
US10788782B2 (en) 2016-07-20 2020-09-29 Konica Minolta, Inc. Image forming apparatus locks down storage area of cache memory stores portion of image forming program for executing real-time image forming process

Also Published As

Publication number Publication date
JP3130591B2 (en) 2001-01-31

Similar Documents

Publication Publication Date Title
EP0077453B1 (en) Storage subsystems with arrangements for limiting data occupancy in caches thereof
US4875155A (en) Peripheral subsystem having read/write cache with record access
US6948033B2 (en) Control method of the cache hierarchy
US4779189A (en) Peripheral subsystem initialization method and apparatus
US5418929A (en) Controller for storage unit and method of controlling storage unit
EP0071719B1 (en) Data processing apparatus including a paging storage subsystem
EP0077452B1 (en) Data promotion in storage subsystems
US5974438A (en) Scoreboard for cached multi-thread processes
JPS6238731B2 (en)
US6782454B1 (en) System and method for pre-fetching for pointer linked data structures
EP0130349A2 (en) A method for the replacement of blocks of information and its use in a data processing system
JPH02281350A (en) Cache memory management
US6202134B1 (en) Paging processing system in virtual storage device and paging processing method thereof
JPH06202951A (en) Cash memory system
JPH0573420A (en) Computer having cache memory
WO1995001600A1 (en) Predictive disk cache system
JP2000047942A (en) Device and method for controlling cache memory
JPH10254775A (en) Memory controller having common cache memory
JPH0421222B2 (en)
JPH086858A (en) Cache controller
JP3898369B2 (en) Paging processing apparatus and recording medium
JP2854668B2 (en) Disk cache control method
JP2854667B2 (en) Disk cache control method
JP2005166073A (en) Control device and control method of storage device
JP2972451B2 (en) Cache memory control method by hardware control software

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081117

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091117

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091117

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101117

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees