JPH0734186B2 - Cash system - Google Patents
Cash systemInfo
- Publication number
- JPH0734186B2 JPH0734186B2 JP62150702A JP15070287A JPH0734186B2 JP H0734186 B2 JPH0734186 B2 JP H0734186B2 JP 62150702 A JP62150702 A JP 62150702A JP 15070287 A JP15070287 A JP 15070287A JP H0734186 B2 JPH0734186 B2 JP H0734186B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- cache
- program
- read
- data file
- 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.)
- Expired - Lifetime
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュシステムに関し、特にメインメモリ
上のプログラムデータ領域に作成されるプログラム内キ
ャッシュシステムに関する。The present invention relates to a cache system, and more particularly to an in-program cache system created in a program data area on a main memory.
従来、頻繁にデータファイルからデータを読み出したり
データファイルにデータを書き込んだりするアプリケー
ションプログラム(以下、単にプログラムと称する)
は、実行中にデータファイル上のデータに対する読出し
要求または書込み要求が発生すると、そのつどデータフ
ァイルに対する入出力(I/O)命令を出していた。Conventionally, an application program (hereinafter simply referred to as a program) that frequently reads data from a data file or writes data to the data file
When a read request or a write request for the data on the data file is generated during execution, has issued an input / output (I / O) instruction for the data file each time.
データファイルがディスク装置上に構成されディスクキ
ャッシュを使用した場合でも、ディスクキャッシュに対
するI/Oはディスクに対するI/Oに比べれば高速である
が、ミスヒットしたときにはディスクI/Oよりも実行時
間がかかっていた。Even if the data file is configured on the disk device and the disk cache is used, I / O to the disk cache is faster than I / O to the disk, but it takes longer than disk I / O to execute when a mishit occurs. It was hanging.
上述した従来のプログラムのI/O命令処理方式では、I/O
命令を多数回発するとディスク装置のI/Oが中央処理装
置(CPU)のI/Oに比べて低速なので、ディスクI/O時間
がプログラムのターンアラウンドタイム(TAT)を悪化
させるという欠点がある。In the conventional program I / O instruction processing method described above, I / O
When a large number of instructions are issued, the disk device I / O is slower than the central processing unit (CPU) I / O, so the disk I / O time deteriorates the program turnaround time (TAT). .
また、ディスクI/O時間を削減するためにディスクキャ
ッシュを使用しても、第2図に例示するように、ジョブ
EがタイミングpでI/O命令を出すと、ジョブEの割当
てCPU時間がCPUからIOP(Input Output Processor)に
命令を発した時点で放棄されたことになるので、頻繁に
I/O命令がある場合にはジョブEの割当てCPU時間のうち
のジョブEの有効CPU時間が短くなってジョブEの無効C
PU時間の割合が多くなり、CPUの割当て分の利用が非能
率的になるという欠点がある。Further, even if the disk cache is used to reduce the disk I / O time, if the job E issues an I / O command at the timing p as shown in FIG. Frequently because it is abandoned when the CPU issues an instruction to the IOP (Input Output Processor)
If there is an I / O command, the effective CPU time of job E out of the allocated CPU time of job E becomes shorter, and job E becomes invalid C
There is a drawback that the proportion of PU time increases and the usage of CPU allocation becomes inefficient.
一方、I/O命令をほとんど皆無にしようとするとデータ
ファイルイメージをすべてプログラム内に取り込まなけ
ればならず、データ量が膨大な場合には仮想空間使用に
よるページI/Oが発生してCPUの性能を十分に引き出せな
いという問題点がある。On the other hand, if you want to eliminate almost all I / O instructions, you have to load all the data file images into the program, and if the amount of data is huge, page I / O will occur due to the use of virtual space and CPU performance will increase. However, there is a problem in that the
本発明の目的は、上述の点に鑑み、プログラム実行時に
多数回読出しないしは書込みが行われるデータファイル
上のデータをあらかじめプログラムデータ領域にキャッ
シュ化しておくことにより、データファイルに対するI/
O回数を抑えるようにしたキャッシュシステムを提供す
ることにある。In view of the above points, an object of the present invention is to cache data in a data file, which is read or written many times during program execution, in a program data area in advance, and
It is to provide a cache system that suppresses the number of times.
本発明のキャッシュシステムは、プログラムの実行に際
して外部から指定されたデータファイル上のデータのう
ちの多数回読出しないし書込みを行うデータ項目を入力
する入力手段と、この入力手段から入力されたデータ項
目に基づいてあらかじめ前記データファイルから該当デ
ータを読み込み前記プログラム内にキャッシュとキャッ
シュ管理情報とを作成するキャッシュ作成手段と、前記
プログラムから読出し命令または書込み命令が発行され
たときに前記キャッシュ管理情報に基づいて必要データ
が前記キャッシュ中にあるかどうかを判断する判断手段
と、読出し命令の場合に前記判断手段による判断に基づ
いて前記キャッシュまたは前記データファイルからデー
タを獲得して前記プログラムに渡すデータ読出し手段
と、書込み命令の場合に前記判断手段による判断に基づ
いて前記キャッシュまたは前記データファイルに前記プ
ログラムからのデータを書き込むデータ書込み手段と、
前記プログラムの終了に際して前記キャッシュ管理情報
をもとに前記キャッシュから前記データファイルに全キ
ャッシュデータを複写するデータ複写手段とを有する。The cache system of the present invention includes an input means for inputting a data item to be read or written many times out of the data on a data file designated from the outside when the program is executed, and the data item input from the input means. Based on the cache management information when a read command or a write command is issued from the program, a cache creating unit that reads the corresponding data from the data file in advance and creates a cache and cache management information in the program. Judging means for judging whether necessary data is in the cache; and data reading means for acquiring a data from the cache or the data file and passing it to the program based on the judgment by the judging means in the case of a read command. , For writing instructions And data writing means for writing data from the program into the cache or the data file based on the determination by the determination means,
Data copy means for copying all cache data from the cache to the data file based on the cache management information at the end of the program.
本発明のキャッシュシステムでは、入力手段がプログラ
ムの実行に際して外部から指定されたデータファイル上
のデータのうちの多数回読出しないし書込みを行うデー
タ項目を入力し、キャッシュ作成手段が入力手段から入
力されたデータ項目に基づいてあらかじめデータファイ
ルから該当データを読み込みプログラム内にキャッシュ
とキャッシュ管理情報とを作成し、判断手段がプログラ
ムから読出し命令または書込み命令が発行されたときに
キャッシュ管理情報に基づいて必要データがキャッシュ
中にあるかどうかを判断し、データ読出し手段が読出し
命令の場合に判断手段による判断に基づいてキャッシュ
またはデータファイルからデータを獲得してプログラム
に渡し、データ書込み手段が書込み命令の場合に判断手
段による判断に基づいてキャッシュまたはデータファイ
ルにプログラムからのデータを書き込み、データ複写手
段がプログラムの終了に際してキャッシュ管理情報をも
とにキャッシュからデータファイルに全キャッシュデー
タを複写する。In the cache system of the present invention, the input means inputs the data item to be read or written many times out of the data on the data file designated from the outside when the program is executed, and the cache creating means is input from the input means. Based on the data item, the corresponding data is read in advance from the data file, a cache and cache management information are created in the program, and the necessary data based on the cache management information when the judgment means issues a read command or a write command from the program. Is in the cache, and when the data reading means is a read instruction, the data is obtained from the cache or the data file based on the judgment by the judging means and passed to the program, and when the data writing means is a write instruction. Based on the judgment by the judgment means There writes data from the program to the cache or data files, the data copying means for copying the entire cache data from the cache based on the cache management information upon termination of the program data file.
次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be described in detail with reference to the drawings.
第1図は本発明の一実施例を示すブロック図である。本
実施例のキャッシュシステムは、プログラム(図示せ
ず)の実行に際して外部から指定されたデータファイル
A上のデータのうちの多数回読出しないし書込みを行う
データのデータ項目指定aを入力する入力手段1と、入
力手段1から入力された指定データ項目bに基づいてあ
らかじめデータファイルAから該当するデータcを読み
込みプログラム内にキャッシュ管理情報Bとキャッシュ
Cとを作成するキャッシュ作成手段2と、プログラムか
ら読出し命令dまたは書込み命令eが発生されたときに
キャッシュ管理情報Bからのキャッシュ情報fに基づい
て必要データがキャッシュC中にあるかどうかを判断す
る判断手段3と、読出し命令dの場合に判断手段3によ
る判断結果gに基づいてデータファイルAのファイルデ
ータhまたはキャッシュCのキャッシュデータiから読
出しデータjを獲得してプログラムに渡すデータ読出し
手段4と、書込み命令eの場合に判断手段3による判断
結果gに基づいてキャッシュCまたはデータファイルA
にプログラムからの書込みデータkを書き込むデータ書
込み手段5と、プログラムの終了に際してキャッシュ管
理情報Bの全キャッシュ情報lをもとにキャッシュCか
らデータファイルAに全キャッシュデータmを複写する
データ複写手段6とから構成されている。FIG. 1 is a block diagram showing an embodiment of the present invention. The cache system according to the present embodiment has an input means 1 for inputting a data item designation a of data to be read or written many times among data on a data file A designated from the outside when a program (not shown) is executed. And cache creating means 2 for reading the corresponding data c from the data file A in advance based on the specified data item b input from the input means 1 and creating cache management information B and cache C in the program, and reading from the program When the instruction d or the write instruction e is generated, the determination means 3 for determining whether the necessary data is in the cache C based on the cache information f from the cache management information B, and the determination means for the read instruction d. The file data h of the data file A or the file A data reading means 4 to be passed to the program won read data j from the cache data i Gerhard C, cache based on a determination result by the determination unit 3 in the case of a write command e g C or data file A
Data writing means 5 for writing write data k from the program to the program, and data copying means 6 for copying all cache data m from the cache C to the data file A based on all the cache information l of the cache management information B at the end of the program. It consists of and.
次に、このように構成された本実施例のキャッシュシス
テムの動作について説明する。Next, the operation of the cache system of this embodiment configured as described above will be described.
入力手段1は、データファイルA上のデータのうちで多
数回読出しまたは書込みを行うデータのデータ項目指定
aを外部から入力する。The input means 1 inputs, from the outside, a data item designation a of data to be read or written many times among the data on the data file A.
キャッシュ作成手段2は、入力手段1から指定データ項
目bを受け取り、指定に該当するデータcをデータファ
イルAから読み込んでキャッシュ管理情報B(キャッシ
ュに登録された項目,キャッシュ内の位置,使用量な
ど)とキャッシュCとを作成する。The cache creating means 2 receives the designated data item b from the input means 1, reads the data c corresponding to the designation from the data file A, and cache management information B (items registered in the cache, position in the cache, used amount, etc.). ) And cache C.
判断手段3は、プログラム(図示せず)から読出し命令
dを受け付けると、作成済のキャッシュ管理情報Bから
キャッシュ情報fを入力し、読出し要求のあったデータ
がキャッシュC中にあるかどうかを判断する。また、判
断手段3は、プログラムから書込み命令eを受け付けた
ときも、同様にして書込み要求のあったデータがキャッ
シュC中にあるかどうかを判断する。Upon receiving a read command d from a program (not shown), the judging means 3 inputs the cache information f from the created cache management information B and judges whether the read-requested data is in the cache C or not. To do. Further, when the judging means 3 receives the write command e from the program, the judging means 3 similarly judges whether or not the data requested to be written is in the cache C.
データ読出し手段4は、判断手段3の判断結果gをもと
に読出し要求のあったデータがキャッシュC中になけれ
ばデータファイルAからファイルデータhを読み出し、
またキャッシュC中にあればキャッシュCからキャッシ
ュデータiを読み出し、読出しデータjをプログラムに
渡す。The data reading unit 4 reads the file data h from the data file A if the data requested to be read is not in the cache C based on the judgment result g of the judgment unit 3.
If it is in the cache C, the cache data i is read from the cache C and the read data j is passed to the program.
データ書込み手段5は、判断手段3の判断結果gをもと
に書込み要求のあったデータがキャッシュC中になけれ
ばプログラムから渡された書込みデータkをデータファ
イルAに書き込み、またキャッシュC中にあればプログ
ラムから渡された書込みデータkをキャッシュCに書き
込む。The data writing unit 5 writes the write data k passed from the program to the data file A if the data requested to be written is not in the cache C based on the determination result g of the determination unit 3, and also in the cache C. If there is, the write data k passed from the program is written in the cache C.
データ複写手段6は、プログラムの終了に際してキャッ
シュ管理情報Bから全キャッシュ情報lを得て、それを
もとにキャッシュCの全キャッシュデータmをデータフ
ァイルAに書き込む。The data copying means 6 obtains all the cache information 1 from the cache management information B at the end of the program, and writes all the cache data m of the cache C into the data file A based on the obtained cache information 1.
以上説明したように本発明は、プログラム実行時に多数
回読出しないし書込みが行われるデータファイル上のデ
ータをあらかじめプログラムデータ領域にキャッシュ化
しておきデータファイルに対するI/Oを最小限に抑えて
通常のI/O命令をメインメモリ中のプログラム内キャッ
シュに対するI/O命令に置き換えることにより、プログ
ラムに対する割当てCPU時間を効率的に利用でき、プロ
グラムのTATを改善できるという効果がある。As described above, according to the present invention, data on a data file, which is read or written many times during program execution, is cached in the program data area in advance, and I / O to the data file is minimized to reduce the normal I / O. By replacing the / O instruction with the I / O instruction for the in-program cache in the main memory, the allocated CPU time for the program can be efficiently used and the TAT of the program can be improved.
第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 utilization. In the figure, 1 ... input means, 2 ... cache creating means, 3 ... judging 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 designation, b ... designated data item, c ... data, d ... read command, e ... write command, 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)
れたデータファイル上のデータのうちの多数回読出しな
いし書込みを行うデータ項目を入力する入力手段と、 この入力手段から入力されたデータ項目に基づいてあら
かじめ前記データファイルから該当データを読み込み前
記プログラム内にキャッシュとキャッシュ管理情報とを
作成するキャッシュ作成手段と、 前記プログラムから読出し命令または書込み命令が発行
されたときに前記キャッシュ管理情報に基づいて必要デ
ータが前記キャッシュ中にあるかどうかを判断する判断
手段と、 読出し命令の場合に前記判断手段による判断に基づいて
前記キャッシュまたは前記データファイルからデータを
獲得して前記プログラムに渡すデータ読出し手段と、 書込み命令の場合に前記判断手段による判断に基づいて
前記キャッシュまたは前記データファイルに前記プログ
ラムからのデータを書き込むデータ書込み手段と、 前記プログラムの終了に際して前記キャッシュ管理情報
をもとに前記キャッシュから前記データファイルに全キ
ャッシュデータを複写するデータ複写手段と、 を有することを特徴とするキャッシュシステム。1. An input means for inputting a data item to be read or written many times among data on a data file designated externally when executing a program, and based on the data item input from this input means. Cache creating means for reading the corresponding data from the data file in advance and creating a cache and cache management information in the program, and necessary data based on the cache management information when a read command or a write command is issued from the program Means for determining whether or not is in the cache, and data read means for acquiring data from the cache or the data file and passing it to the program based on the determination by the determination means in the case of a read command, and In the case of an instruction, the determination means Data writing means for writing data from the program to the cache or the data file based on the judgment by the above, and copying all cache data from the cache to the data file based on the cache management information at the end of the program. A cache system comprising: a data copying unit.
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 JPS63313252A (en) | 1988-12-21 |
JPH0734186B2 true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3297966B2 (en) * | 1994-08-19 | 2002-07-02 | 日本電信電話株式会社 | Data access method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS55157178A (en) * | 1979-05-24 | 1980-12-06 | Nec Corp | Information processing unit |
-
1987
- 1987-06-16 JP JP62150702A patent/JPH0734186B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPS63313252A (en) | 1988-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4812981A (en) | Memory management system improving the efficiency of fork operations | |
JP4151977B2 (en) | Prefetching device, prefetching method, and prefetching program | |
KR102236419B1 (en) | Method, apparatus, device and storage medium for managing access request | |
EP1094392A1 (en) | Method and apparatus for interfacing with a secondary storage system | |
Russo et al. | C++ and operating systems performance: a case study | |
JPH0734186B2 (en) | Cash system | |
US11436064B2 (en) | Method for improving processing speed of input and output related to writing in operating system | |
JPH07129518A (en) | Computer system | |
KR0136111B1 (en) | Apparatus and method for synhcronization of access to main memory signal groups in a multiprocessor data processing | |
JPS603229B2 (en) | Information processing method | |
JPH0548500B2 (en) | ||
JPH04199444A (en) | File controller | |
JP2906958B2 (en) | User program loading method | |
JP2526728B2 (en) | Disk cache automatic usage method | |
JPS61245253A (en) | Input and output control system for virtual computer | |
JPH04266130A (en) | File recall control system | |
JPS63180150A (en) | Processing system for input/output buffer area acquisition | |
JPH04113432A (en) | Virtual storage control method | |
JPS6212555B2 (en) | ||
JPH03235148A (en) | Computer system | |
JPH06110857A (en) | Program dispatching system | |
JP2933569B2 (en) | Central processing unit | |
JPH11249937A (en) | Computer system | |
JP2509972B2 (en) | Environment setting method | |
JPH0520188A (en) | Cache controller |