JPS63313252A - Cache system - Google Patents

Cache system

Info

Publication number
JPS63313252A
JPS63313252A JP62150702A JP15070287A JPS63313252A JP S63313252 A JPS63313252 A JP S63313252A JP 62150702 A JP62150702 A JP 62150702A JP 15070287 A JP15070287 A JP 15070287A JP S63313252 A JPS63313252 A JP S63313252A
Authority
JP
Japan
Prior art keywords
data
cache
program
file
read
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
JP62150702A
Other languages
Japanese (ja)
Other versions
JPH0734186B2 (en
Inventor
Midori Yamamoto
緑 山本
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 JP62150702A priority Critical patent/JPH0734186B2/en
Publication of JPS63313252A publication Critical patent/JPS63313252A/en
Publication of JPH0734186B2 publication Critical patent/JPH0734186B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To suppress the number of times of I/O operation to/from files by previously caching data of a file to be frequently read out or written at the time of executing a program in a program data area. CONSTITUTION:At the time of receiving a reading instruction (d) from the program, a decision means 3 inputs cache information (f) from formed cache management information B to decide whether data to be requested to be read out exists in a data file A or a cache C. A data reading means 4 reads out file data (h) or from the data file A or cache data (i) from the cache C based on the decided result (g) of the means 3 and transfers read data (j) to the program. A writing instruction (e) is similarly processed.

Description

【発明の詳細な説明】 (産業上の利用分野〕 本発明はキャッシュシステムに関し、特にメインメモリ
上のプログラムデータ領域に作成されるプログラム内キ
ャフシェシステムに関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a cache system, and particularly to an in-program cache system created in a program data area on a main memory.

〔従来の技術〕[Conventional technology]

従来、頻繁にファイルからデータを読み出したリファイ
ルにデータを書き込んだりするアブリケーシッンプログ
ラム(以下、単にプログラムと称する)は、実行中にフ
ァイル上のデータに対する読出し要求または書込み要求
が発生すると、そのつどファイルに対する入出力(Il
o)命令を出していた。
Conventionally, an abduction program (hereinafter simply referred to as a program) that frequently reads data from a file and writes data to a refile, when a read request or write request for data on a file occurs during execution, Input/output to the file (Il)
o) He was giving orders.

ファイルがディスク装置上に構成されディスクキャッシ
ュを使用した場合でも、キャッシュに対するIloはデ
ィスクに対するIloに比べれば高速であるが、ミスヒ
ントしたときにはディスクI10よりも実行時間がかか
っていた。
Even when a file is configured on a disk device and a disk cache is used, Ilo for the cache is faster than Ilo for the disk, but when a miss hint occurs, it takes longer to execute than disk I10.

(発明が解決しようとする問題点〕 上述した従来のプログラムのI10命令処理方式では、
I10命令を多数回発するとディスク装置のIloが中
央処理装置(CPU)のIloに比べて低速なので、デ
ィスク110時間がプログラムのターンアラウンドタイ
ム(TAT)を悪化させるという欠点がある。
(Problems to be solved by the invention) In the conventional program I10 instruction processing method described above,
If the I10 command is issued many times, the Ilo of the disk device is slower than the Ilo of the central processing unit (CPU), so there is a disadvantage that the disk 110 time deteriorates the program turnaround time (TAT).

また、ディスク110時間を削減するためにディスクキ
ャッシュを使用しても、第2図に例示するように、ジョ
ブEがタイミングpでI10命令を出すと、ジップEの
割当てCPU時間がCPUから10 P (I npu
t  0utput  Processor)に命令を
発した時点で放棄されたことになるので、頻繁にI10
命令がある場合にはジップEの割当てCPU時間のうち
のジョブEの有効CPU時間が短(なってジョブEの無
効CPU時間の割合が多くなり、CPUの割当て分の利
用が非効率的になるという欠点がある。
Furthermore, even if a disk cache is used to reduce the disk time, if job E issues an I10 command at timing p, as illustrated in FIG. (I npu
Since the command is abandoned as soon as it is issued to the I10
If there is a command, the effective CPU time of job E out of the allocated CPU time of zip E will be short (as a result, the ratio of invalid CPU time of job E will increase, making the use of the allocated CPU time inefficient) There is a drawback.

一方、I10命令をほとんど皆無にしようとするとファ
イルイメージをすべてプログラム内に取り込まなければ
ならず、データ量が膨大な場合には仮想空間使用による
ページI10が発生してCPUの性能を十分に引き出せ
ないという問題点がある。
On the other hand, if you try to eliminate almost all I10 instructions, you will have to import all file images into the program, and if the amount of data is huge, page I10 will occur due to the use of virtual space, making it impossible to fully utilize the performance of the CPU. There is a problem.

本発明の目的は、上述の点に鑑み、プログラム実行時に
多数回読出しないしは書込みが行われるファイル上のデ
ータをあらかじめプログラムデータ領域にキャッシュ化
しておくことにより、ファイルに対する110回数を抑
えるようにしたキャッシュシステムを提供することにあ
る。
In view of the above-mentioned points, an object of the present invention is to cache data on a file that is read or written many times during program execution in advance in a program data area, thereby suppressing the number of times the file is cached. The goal is to provide a system.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のキャッシュシステムは、プログラムの実行に際
して外部から、指定されたファイル上のデータのうちの
多数回読出しないし書込みを行うデータ項目を入力する
入力手段と、この入力手段から入力されたデータ項目に
基づいてあらかじめ前記ファイルから該当データを読み
込み前記プログラム内にキャッシュとキャッシュ管理情
報とを作成するキャッシュ作成手段と、前記プログラム
から読出し命令または書込み命令が発行されたときに前
記キャッシュ管理情報に基づいて必要データが前記キャ
ッシュ中にあるか前記ファイル上にあるかを判断する判
断手段と、読出し命令の場合に前記判断手段による判断
に基づいて前記キャッシュまたは前記ファイルからデー
タを獲得して前記プログラムに渡すデータ読出し手段と
、書込み命令の場合に前記判断手段による判断に基づい
て前記キャッシュまたは前記ファイルに前記プログラム
からのデータを書き込むデータ書込み手段と、前記プロ
グラムの終了に際して前記キャッシュ管理情報をもとに
前記キャッシュから前記ファイルに全キャッシュデータ
を複写するデータ複写手段とを有する。
The cache system of the present invention includes an input means for externally inputting a data item to be read or written many times among data on a specified file when a program is executed, and a data item input from the input means. cache creation means for reading corresponding data from the file in advance based on the information and creating a cache and cache management information in the program; a determining means for determining whether data is in the cache or on the file; and in the case of a read command, data acquired from the cache or the file based on the determination by the determining means and data to be passed to the program. reading means; data writing means for writing data from the program into the cache or the file based on the determination by the determining means in the case of a write command; and data copying means for copying all cache data from the cache data to the file.

〔作用〕[Effect]

本発明のキャッシュシステムでは、入力手段がプログラ
ムの実行に際して外部から指定されたファイル上のデー
タのうちの多数回読出しないし書込みを行うデータ項目
を入力し、キャッシュ作成手段が入力手段から入力され
たデータ項目に基づいてあらかじめファイルから該当デ
ータを読み込みプログラム内にキャッシュとキャッシュ
管理情報とを作成し、判断手段がプログラムから続出し
命令または書込み命令が発行されたときにキャッシュ管
理情報に基づいて必要データがキャッシュ中にあるかフ
ァイル上にあるかを判断し、データ読出し手段が読出し
命令の場合に判断手段による判断に基づいてキャッシュ
またはファイルからデータを獲得してプログラムに渡し
、データ書込み手段が書込み命令の場合に判断手段によ
る判断に基づいてキャッシュまたはファイルにプログラ
ムからのデータを書き込み、データ複写手段がプログラ
ムの終了に際してキャッシュ管理情報をもとにキャッシ
ュからコア、イルに全キャッシュデータを複写する。
In the cache system of the present invention, the input means inputs a data item to be read or written many times from data on a file specified from the outside when executing a program, and the cache creation means inputs data items input from the input means. A cache and cache management information are created in the program by reading the corresponding data from a file in advance based on the item, and when the judgment means issues the command or write command one after another from the program, the necessary data is determined based on the cache management information. It is determined whether the data is in the cache or on the file, and when the data reading means is a read command, the data is acquired from the cache or the file based on the judgment by the determining means and passed to the program, and the data writing means receives the write command. In this case, the data from the program is written to the cache or file based on the judgment by the judgment means, and the data copying means copies all the cache data from the cache to the core and file based on the cache management information when the program ends.

【実施例〕【Example〕

次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be explained in detail with reference to the drawings.

第1図は本発明の一実施例を示すブロック図である。本
実施例のキャッシュシステムは、プログラム(図示せず
)の実行に際して外部から七尾されたファイルA上のデ
ータのうちの多数回読出しないし書込みを行うデータの
データ項目指定aを入力する入力手段1と、入力手段l
から入力された指定データ項目すに基づいてあらかじめ
データファイルAから該当するデータCを読み込みプロ
グラム内にキャッシュ管理情報BとキャッシュCとを作
成するキャッシュ作成手段2と、プログラムから読出し
命令dまたは書込み命令eが発行されたときにキャッシ
ュ管理情報Bからのキャッシュ情報rに基づいて必要デ
ータがキャッシュC中にあるかデータファイルA上にあ
るかを判断する判断手段3と、読出し命令dの場合に判
断手段3による判断結果gに基づいてデータファイルA
のファイルデータhまたはキャッシュCのキャッシュデ
ータiから読出しデータjを獲得してプログラムに渡す
データ読出し手段4と、書込み命令eの場合に判断手段
3による判断結果gに基づいてキャッシュCまたはデー
タファイルAにプログラムからの書込みデータkを書き
込むデータ書込み手段5と、プログラムの終了に際して
キャッシュ管理情報Bの全キャッシュ情f!!ttをも
とにキャッシュCからデータファイルAに全キャッシュ
データmを複写するデータ複写手段6とから構成されて
いる。
FIG. 1 is a block diagram showing one embodiment of the present invention. The cache system of this embodiment includes an input means 1 for inputting a data item designation a of data to be read or written many times among data on file A that is input from the outside when a program (not shown) is executed. , input means l
cache creation means 2 for reading corresponding data C from data file A in advance and creating cache management information B and cache C in a program based on specified data items inputted from the program; and a read command d or write command from the program. determining means 3 for determining whether necessary data is in cache C or data file A based on cache information r from cache management information B when e is issued; and determining in the case of read command d. Data file A based on the judgment result g by means 3
data read means 4 that acquires read data j from file data h or cache data i of cache C and passes it to the program; Data writing means 5 writes write data k from the program to f!, and all cache information f! of the cache management information B at the end of the program. ! The data copying means 6 copies all the cache data m from the cache C to the data file A based on tt.

次に、このように構成された本実施例のキャッシュシス
テムの動作について説明する。
Next, the operation of the cache system of this embodiment configured as described above will be explained.

入力手段lは、データファイルA上のデータのうちで多
数回読出しまたは書込みを行うデータのデータ項目指定
aを外部から入力する。
The input means 1 externally inputs a data item designation a of data to be read or written many times among the data on the data file A.

キャッシュ作成手段2は、入力手段lから指定データ項
目すを受は取り、指定に該当するデータCをデータファ
イルAから読み込んでキャッシュ管理情報B(キャフシ
、二に登録された項目、キャッシュ内の位置、使用量な
ど)とキャッシュCとを作成する。
The cache creation means 2 receives the designated data item from the input means 1, reads the data C corresponding to the designation from the data file A, and creates cache management information B (items registered in the cache, 2, positions in the cache). , usage amount, etc.) and cache C.

判断手段3は、プログラム(図示せず)から読出し命令
dを受は付けると、作成済のキャッシュ管理情報Bから
キャッシュ情報fを入力し、読出し要求のあったデータ
がデータファイルA上にあるかキャッシュC中にあるか
を判断する。また、判断手段3は、プログラムから書込
み命令eを受は付けたときも、同様にして書込み要求の
あったデータがデータファイルA上にあるかキャッシュ
C中にあるかを判断する。
When the determining means 3 accepts a read command d from a program (not shown), it inputs cache information f from the created cache management information B, and determines whether the data requested to be read is on the data file A. Determine whether it is in cache C. Further, when the determining means 3 accepts a write command e from the program, it similarly determines whether the data requested to be written is in the data file A or in the cache C.

データ続出し手段4は、判断手段3の判断結果gをもと
にデータファイルAからファイルデータhまたはキャッ
シュCからキャッシュデータjのどちらかを読み出し、
読出しデータjをプログラムに渡す。
The data succession means 4 reads either the file data h from the data file A or the cache data j from the cache C based on the determination result g of the determination means 3,
Pass read data j to the program.

データ書込み手段5は、判断手段3の判断結果gをもと
にプログラムから渡された書込みデータkをデータファ
イルAまたはキャッシュCのいずれか一方に書き込む。
The data writing means 5 writes the write data k passed from the program into either the data file A or the cache C based on the judgment result g of the judgment means 3.

データ複写手段6は、プログラムの終了に際してキャッ
シュ管理情報Bから全キャッシュ情報Eを得て、それを
もとにキャッシュCの全データmをデータファイルAに
書き込む。
The data copying means 6 obtains all the cache information E from the cache management information B at the end of the program, and writes all the data m of the cache C to the data file A based on it.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、プログラム実行時に多数
回読出しないし書込みが行われるファイル上のデータを
あらかじめプログラムデータ領域にキャッシュ化してお
きファイルに対するIloを最小限に抑えて通常のI1
0命令をメインメモリ中のプログラム内キャッシュに対
するI10命令に置き換えることにより、プログラムに
対する割当てCPU時間を効率的に利用でき、プログラ
ムのTATを改善できるという効果がある。
As explained above, the present invention caches data on a file that is read or written many times during program execution in advance in the program data area, minimizes Ilo for the file, and improves the normal I1
By replacing the 0 instruction with the I10 instruction for the in-program cache in the main memory, the CPU time allocated to the program can be used efficiently and the TAT of the program can be improved.

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

第1図は本発明の一実施例を示すブロック図、第2図は
非効率的なCPU利用の一例を示すタイミングチャート
である。 図において、 1・・・入力手段、。 2・・・キャッシュ作成手段、 3・・・判断手段、 4・・・データ読出し手段、 5・・・データ書込み手段、 6・・・データ複写手段、 A・・・データファイル、 B・・・キャッシュ管理情報、 C・・・キャッシュ、 a・・・データ項目指定、 b・・・指定データ項目、 C・・・データ、 d・・・読出し命令、 e・・・書込み命令、 f・・・キャッシュ情報、 g・・・判断結果、 h・・・ファイルデータ、 i・・・キャッシュデータ、 j・・・読出しデータ、 k・・・書込みデータ、 l・・・全キャッシュ情報、 m・・・全キャッシェデータである。
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a timing chart showing an example of inefficient CPU usage. In the figure, 1...input means. 2... Cache creation means, 3... Determination means, 4... Data reading means, 5... Data writing means, 6... Data copying means, A... Data file, B... Cache management information, C...Cache, a...Data item specification, b...Specified data item, C...Data, d...Read instruction, e...Write instruction, f... Cache information, g...Judgment result, h...File data, i...Cache data, j...Read data, k...Write data, l...All cache information, m... All cache data.

Claims (1)

【特許請求の範囲】 プログラムの実行に際して外部から指定されたファイル
上のデータのうちの多数回読出しないし書込みを行うデ
ータ項目を入力する入力手段と、この入力手段から入力
されたデータ項目に基づいてあらかじめ前記ファイルか
ら該当データを読み込み前記プログラム内にキャッシュ
とキャッシュ管理情報とを作成するキャッシュ作成手段
と、前記プログラムから読出し命令または書込み命令が
発行されたときに前記キャッシュ管理情報に基づいて必
要データが前記キャッシュ中にあるか前記ファイル上に
あるかを判断する判断手段と、読出し命令の場合に前記
判断手段による判断に基づいて前記キャッシュまたは前
記ファイルからデータを獲得して前記プログラムに渡す
データ読出し手段と、 書込み命令の場合に前記判断手段による判断に基づいて
前記キャッシュまたは前記ファイルに前記プログラムか
らのデータを書き込むデータ書込み手段と、 前記プログラムの終了に際して前記キャッシュ管理情報
をもとに前記キャッシュから前記ファイルに全キャッシ
ュデータを複写するデータ複写手段と、 を有することを特徴とするキャッシュシステム。
[Claims] An input means for inputting a data item to be read or written multiple times among data on a file specified from the outside when executing a program, and an a cache creation unit that reads relevant data from the file in advance and creates a cache and cache management information in the program; and a cache creation unit that reads relevant data from the file in advance and creates a cache and cache management information in the program; and when a read command or a write command is issued from the program, the necessary data is determining means for determining whether the data is in the cache or on the file; and data reading means for acquiring data from the cache or the file based on the determination by the determining means in the case of a read command and passing it to the program. and a data writing means for writing data from the program to the cache or the file based on the determination by the determining means in the case of a write command, and data writing from the cache based on the cache management information upon termination of the program. A cache system comprising: data copying means for copying all cache data to a file.
JP62150702A 1987-06-16 1987-06-16 Cash system Expired - Lifetime JPH0734186B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62150702A JPH0734186B2 (en) 1987-06-16 1987-06-16 Cash system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62150702A JPH0734186B2 (en) 1987-06-16 1987-06-16 Cash system

Publications (2)

Publication Number Publication Date
JPS63313252A true JPS63313252A (en) 1988-12-21
JPH0734186B2 JPH0734186B2 (en) 1995-04-12

Family

ID=15502549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62150702A Expired - Lifetime JPH0734186B2 (en) 1987-06-16 1987-06-16 Cash system

Country Status (1)

Country Link
JP (1) JPH0734186B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0863395A (en) * 1994-08-19 1996-03-08 Nippon Telegr & Teleph Corp <Ntt> Data access method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55157178A (en) * 1979-05-24 1980-12-06 Nec Corp Information processing unit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS55157178A (en) * 1979-05-24 1980-12-06 Nec Corp Information processing unit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0863395A (en) * 1994-08-19 1996-03-08 Nippon Telegr & Teleph Corp <Ntt> Data access method

Also Published As

Publication number Publication date
JPH0734186B2 (en) 1995-04-12

Similar Documents

Publication Publication Date Title
US5796979A (en) Data processing system having demand based write through cache with enforced ordering
JPS63313252A (en) Cache system
JP3111912B2 (en) Disk cache control method
JPH0721766B2 (en) FORTRAN I / O control processor
JPH04355818A (en) Data input/output controller
JPH0447350A (en) Main storage read/response control
JP2526728B2 (en) Disk cache automatic usage method
JPH04199444A (en) File controller
JPH04113432A (en) Virtual storage control method
JPH04299432A (en) Data base control system
JPH04181454A (en) Data access controller
JP2735400B2 (en) Asynchronous I / O control method
JPS6191738A (en) Information processor
JPH0526216B2 (en)
JPS58109952A (en) Storage access processor
JPS62134718A (en) Data access control system
JPS5891570A (en) Information processing system
JPH0250238A (en) Data processor with cache memory
JPS62271029A (en) Disk cache control system
JPH04260139A (en) File access rpocessor
JPH0293933A (en) Program developing device
JPH04291642A (en) Cache control system
JPH05143457A (en) System and method for high-speed writing from computer system into memory system
JPH02226447A (en) Computer system and memory access therefor
JPS60124750A (en) Data processing system