JPH0792730B2 - Data prefetch control method - Google Patents

Data prefetch control method

Info

Publication number
JPH0792730B2
JPH0792730B2 JP63146076A JP14607688A JPH0792730B2 JP H0792730 B2 JPH0792730 B2 JP H0792730B2 JP 63146076 A JP63146076 A JP 63146076A JP 14607688 A JP14607688 A JP 14607688A JP H0792730 B2 JPH0792730 B2 JP H0792730B2
Authority
JP
Japan
Prior art keywords
data
read
host computer
host
ahead
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 - Fee Related
Application number
JP63146076A
Other languages
Japanese (ja)
Other versions
JPH01314327A (en
Inventor
智宏 小野
修 木村
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63146076A priority Critical patent/JPH0792730B2/en
Publication of JPH01314327A publication Critical patent/JPH01314327A/en
Publication of JPH0792730B2 publication Critical patent/JPH0792730B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術(第5図) 発明が解決しようとする課題 課題を解決するための手段(第1図) 作用 実施例(第2図〜第4図) 発明の効果 〔概要〕 データ先読み制御方式に関し、 読出し命令を実行するときに、読出したデータの後続デ
ータを少なくとも一定量先読みして保持することを目的
とし、 データバッファと、ディスク等の外部記憶装置と、ホス
トコンピュータを備え、ホストコンピュータからデータ
読出命令が発行されると、要求されたデータを外部記憶
装置から前記データバッファへ読み出してホストコンピ
ュータに転送するとともに、その後続データを前記デー
タバッファに読み出す先読み機能を有するデータ処理装
置において、それぞれホストコンピュータから指定され
る最小先読み量及び最大先読み量が記入される記憶手段
を設け、先読み中は最小先読み量に達するまでに発行さ
れた命令で、外部記憶装置をアクセスする必要のない命
令は先読みを続けながら実行され、外部記憶装置をアク
セスする必要のある命令は先読みが最小先読み量に達す
るまで待たされるように制御するものである。
DETAILED DESCRIPTION [Table of Contents] Outline Industrial field of application Conventional technology (Fig. 5) Problem to be solved by the invention Means for solving the problem (Fig. 1) Operation Example (Fig. 2) ~ Fig. 4) Effect of the invention [Overview] Regarding a data prefetch control method, when a read command is executed, at least a predetermined amount of data subsequent to the read data is prefetched and held, and a data buffer and a disk are provided. When a data read command is issued from the host computer, the requested data is read from the external storage device to the data buffer and transferred to the host computer, and the subsequent data is transferred to the host computer. In the data processing device having the read-ahead function for reading to the data buffer, each is designated by the host computer. A storage means for entering the minimum prefetch amount and the maximum prefetch amount is provided, and during prefetching, commands issued until the minimum prefetch amount is reached and commands that do not require access to an external storage device are executed while continuing prefetching. The instruction that needs to access the external storage device is controlled so that the prefetch is kept waiting until the minimum prefetch amount is reached.

〔産業上の利用分野〕[Industrial application field]

本発明は、磁気ディスクや光ディスク等の外部記憶装置
からデータを読み出すデータ読出制御方式に係り、特
に、要求されたデータをディスクからデータバッファへ
読出してホストコンピュータに転送すると共に、その後
続データをも前記データバッファへ読出しておくデータ
先読み制御方式に関する。
The present invention relates to a data read control method for reading data from an external storage device such as a magnetic disk or an optical disk, and more particularly to reading requested data from a disk to a data buffer and transferring the data to a host computer, and also reading subsequent data. The present invention relates to a data prefetch control method for reading data into the data buffer.

計算機システムは、普通大容量の外部記憶装置を有して
おり、計算機システムを高速化する上で、外部記憶装置
へのアクセスの高速化が必須であり、外部記憶装置に対
するアクセスの高速化が要求されている。
A computer system usually has a large-capacity external storage device, and in order to speed up the computer system, high-speed access to the external storage device is essential, and high-speed access to the external storage device is required. Has been done.

中小型計算機システムにおいては、外部記憶装置をアク
セスする場合、ランダムな位置のデータのアクセスより
もシーケンシャルなデータのアクセスの方が比較的多
く、また、シーケンシャルなデータを読み出す場合、一
度に転送できるデータの量が限られているために、複数
の命令を連続して使用しなければならないときがある。
In a small-to-medium-sized computer system, when accessing an external storage device, sequential data is accessed more often than random data, and when reading sequential data, data that can be transferred at one time Due to the limited amount of, multiple instructions may have to be used in succession.

このため、ホストコンピュータからデータ読出命令が発
行されると、要求されたデータをディスクから半導体記
憶素子で構成されるデータバッファへ読み出してホスト
コンピュータに転送すると共に、その後続データを前記
データバッファへ読み込み(先読み)、次にホストコン
ピュータより発行された命令がこのデータバッファ内に
あるデータの転送要求だった場合には、ディスクから読
み出すのではなく、データバッファから直接そのデータ
を転送することにより、シーケンシャルデータを複数の
命令で読み出す際の回転待ち時間をなくし、アクセスタ
イムを見掛け上短縮する方式が提案されている(データ
先読み制御方式)。
Therefore, when a data read command is issued from the host computer, the requested data is read from the disk into a data buffer composed of semiconductor memory elements and transferred to the host computer, and the subsequent data is read into the data buffer. (Prefetch), if the next command issued by the host computer is a transfer request for the data in this data buffer, the data is transferred directly from the data buffer instead of being read from the disk. A method has been proposed in which the access waiting time is apparently shortened by eliminating the rotation waiting time when reading data with a plurality of instructions (data prefetch control method).

〔従来の技術〕[Conventional technology]

第5図は、従来例を示す図であり、(A)、(B)は従
来のデータ先読み方式におけるデータバッファの状態を
示す図、(C)はハード構成例を示す図である。第5図
において、4はデータバッファである。このデータバッ
ファ4は、通常の電算機システムと同様、磁気ディスク
制御装置2に接続されており、この磁気ディスク制御装
置2には、外部記憶装置としての磁気ディスク5が接続
されている。また、複数のホストコンピュータ1a、1bが
磁気ディスク制御装置2に接続されており、これらのホ
ストコンピュータ1a、1bはこの磁気ディスク制御装置2
を介して磁気ディスク5にアクセス可能とされている。
FIG. 5 is a diagram showing a conventional example, FIGS. 5A and 5B are diagrams showing a state of a data buffer in a conventional data prefetching method, and FIG. 5C is a diagram showing an example of a hardware configuration. In FIG. 5, reference numeral 4 is a data buffer. The data buffer 4 is connected to the magnetic disk controller 2 as in a normal computer system, and the magnetic disk controller 2 is connected to a magnetic disk 5 as an external storage device. Further, a plurality of host computers 1a and 1b are connected to the magnetic disk controller 2, and these host computers 1a and 1b are connected to the magnetic disk controller 2.
The magnetic disk 5 can be accessed via the.

このような電算機システムにおいて、ホストコンピュー
タ1aから磁気ディスク5に対してデータ読出命令がある
と、要求されたデータ41がバッファ4に読み出される。
その後、第5図(A)に示す様に、このホストコンピュ
ータ1a或いは他のホストコンピュータ1bからの読出命令
がないと、データバッファ4が満杯になるまで、データ
41に続くデータの先読みが行われる。
In such a computer system, when a data read command is issued from the host computer 1a to the magnetic disk 5, the requested data 41 is read into the buffer 4.
After that, as shown in FIG. 5 (A), if there is no read command from the host computer 1a or another host computer 1b, the data buffer 4 becomes full until the data buffer 4 becomes full.
Data read-ahead following 41 is performed.

しかし、第5図(B)に示すように、要求されたデータ
41を読み出した後、これに続いて先読みデータ42を読み
出している最中に、例えばホストコンピュータ1bからデ
ータ読出命令があると、先読みデータ42の読み出しを中
止して、直ちにホストコンピュータ1bからの要求データ
43の読み出しを開始する。その後、データバッファ4が
一杯になるまで、データ43に続くデータ44を先読みする
ことは、第5図(A)に示したと同様である。
However, as shown in Fig. 5 (B), the requested data
If, for example, a data read command is issued from the host computer 1b during the subsequent reading of the prefetch data 42 after reading 41, the read of the prefetch data 42 is stopped and the request from the host computer 1b is immediately issued. data
Start reading 43. Thereafter, prefetching the data 44 following the data 43 until the data buffer 4 is full is the same as that shown in FIG. 5 (A).

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

このように、複数のホストが外部記憶装置を共用してい
る場合で、複数のホストコンピュータ1a、1bがシーケン
シャルなデータを読み出すときの動作を考える。
In this way, consider the operation when a plurality of host computers 1a and 1b read sequential data when a plurality of hosts share an external storage device.

まず、第1のケースとして、複数のホストコンピュータ
1a、1bがそれぞれシーケンシャルなデータを読み出すと
きの動作を考える。
First, as the first case, a plurality of host computers
Consider the operation when 1a and 1b read sequential data.

まず、ホストコンピュータ1aが要求したデータを磁気デ
ィスク5からデータバッファ4に読み出し、ホストコン
ピュータ1aに転送する。次にホストコンピュータ1aが要
求したデータの後続データの先読みが行われるが、この
時、ホストコンピュータ1bからデータ読出命令が発行さ
れると、この先読みを中止して、直ちにホストコンピュ
ータ1bが要求したデータを磁気ディスク5からデータバ
ッファ4に読出しに行く。そしてホストコンピュータ1b
が要求したデータをホストBに転送し終わると、その後
続データの先読みが行われるが、この時ホストコンピュ
ータ1aから、最初に読み出したデータの後続データを読
み出す命令が発行されると、この先読みを中止し、直ち
にホストコンピュータ1aが要求したデータを転送するた
めの制御が行われる。ところが、このデータは、ホスト
コンピュータ1aが最初に要求したデータを転送した後に
必要量だけ先読みしていないので、磁気ディスク5か
ら、その2回目に要求されたものについて初めから読み
出さなければならない。
First, the data requested by the host computer 1a is read from the magnetic disk 5 to the data buffer 4 and transferred to the host computer 1a. Next, the pre-reading of the subsequent data of the data requested by the host computer 1a is performed. At this time, when the data read command is issued from the host computer 1b, the pre-reading is stopped and the data requested by the host computer 1b is immediately issued. From the magnetic disk 5 to the data buffer 4. And the host computer 1b
When the transfer of the requested data to the host B is completed, prefetching of the subsequent data is performed. However, when the host computer 1a issues an instruction to read the subsequent data of the first read data at this time, the prefetching is performed. Control is performed to stop and immediately transfer the data requested by the host computer 1a. However, since this data is not prefetched by the required amount after the host computer 1a transfers the first requested data, the data requested for the second time must be read from the magnetic disk 5 from the beginning.

このようなことが連続して発生すると、ホストコンピュ
ータ1a、ホストコンピュータ1bが要求したデータが書き
込んであるそれぞれのアドレス間を何度もシークしなけ
ればならなくなり、システム全体のスループットを向上
させる上での大きな妨げになってしまう。
If such a situation occurs continuously, it is necessary to seek many times between the respective addresses where the data requested by the host computer 1a and the host computer 1b are written, and in order to improve the throughput of the entire system. It will be a big hindrance.

次に、第2のケースとして、ホストコンピュータ1a及び
ホストコンピュータ1bからある程度長い間隔をおいてデ
ータ読出命令が発行される場合を考える。
Next, as a second case, consider a case where a data read command is issued from the host computer 1a and the host computer 1b at a somewhat long interval.

例えば、まずホストコンピュータ1aが要求したデータを
磁気ディスク5からデータバッファ4に読み出し、次い
で、その後続データを先読みする。この先読みデータが
ある程度或いはデータバッファ4が一杯になるまで先読
みされてから、ホストコンピュータ1bよりデータ読出命
令が発行されると、今度は、ホストコンピュータ1bが要
求したデータを磁気ディスク5からデータバッファ4に
読み出す。続いてその後続データを、ある程度或いはデ
ータバッファ4がFULLになるまで先読みすると、ホスト
コンピュータ1aが最初に要求したデータとその後続デー
タは破壊される。従って、この後、ホストコンピュータ
1aから最初に要求したデータの後続データを読み出す命
令が発行されると、要求されたデータをデータバッファ
4から直ちに転送することはできず、再びディスクから
読み出さなければならない。
For example, first, the data requested by the host computer 1a is read from the magnetic disk 5 to the data buffer 4, and then the subsequent data is preread. When the host computer 1b issues a data read command after the pre-read data is pre-read to some extent or until the data buffer 4 is full, the data requested by the host computer 1b is sent from the magnetic disk 5 to the data buffer 4 this time. Read to. Subsequently, when the subsequent data is prefetched to some extent or until the data buffer 4 becomes full, the data initially requested by the host computer 1a and the subsequent data are destroyed. Therefore, after this, the host computer
When the instruction to read the subsequent data of the first requested data is issued from 1a, the requested data cannot be immediately transferred from the data buffer 4 and must be read from the disk again.

このようなことが連続すると、ホストコンピュータ1aお
よびホストコンピュータ1bが要求したデータのアドレス
間を何度もシークしなければならなくなる。
If such a situation continues, it becomes necessary to seek many times between the addresses of the data requested by the host computer 1a and the host computer 1b.

以上述べたとおり、複数のホストが外部記憶装置を共用
するような場合で、複数のホストから順にデータ読出命
令が発行された時、ホストと外部記憶装置とのデータ転
送を効率よく行うことを目的としたデータ先読み機構
が、その効果を全く呈しないことがあるという課題を有
することになる。
As described above, in the case where a plurality of hosts share an external storage device, it is an object to efficiently perform data transfer between the host and the external storage device when a data read command is sequentially issued from the plurality of hosts. The data read-ahead mechanism described above has a problem that the effect may not be exhibited at all.

本発明は、このような点に鑑みてなされたものであり、
複数のホストから順にデータ読出命令が発行された時で
も、データバッファを有効に利用することにより、外部
記憶装置に対するアクセスタイムを短縮することを可能
とするデータ先読み制御方式を提供することを目的とす
る。
The present invention has been made in view of such points,
An object of the present invention is to provide a data read-ahead control method capable of shortening the access time to an external storage device by effectively using a data buffer even when a data read command is sequentially issued from a plurality of hosts. To do.

〔課題を解決するための手段〕[Means for Solving the Problems]

第1図は、本発明の原理説明図である。第1図(A)は
基本構成図であり、第1図(B)は基本的な動作を説明
するためのデータバッファ構成図である。
FIG. 1 is a diagram for explaining the principle of the present invention. FIG. 1 (A) is a basic configuration diagram, and FIG. 1 (B) is a data buffer configuration diagram for explaining a basic operation.

第1図(A)において、1a、1bはホストコンピュータで
あり、2は磁気ディスク制御装置、4はデータバッファ
であり、半導体記憶素子より構成される。また5は外部
記憶装置としての磁気ディスクである。3はこの発明に
したがって設けられたポインタであり、磁気ディスク制
御装置2に組み込まれ、各ホストコンピュータより指定
された最大先読み量と最小先読み量を記憶すると共に、
データバッファ上における各データのアドレス等を記憶
する。
In FIG. 1 (A), 1a and 1b are host computers, 2 is a magnetic disk controller, and 4 is a data buffer, which is composed of semiconductor memory elements. Reference numeral 5 is a magnetic disk as an external storage device. Reference numeral 3 denotes a pointer provided according to the present invention, which is incorporated in the magnetic disk control device 2 and stores the maximum read-ahead amount and the minimum read-ahead amount designated by each host computer.
The address of each data in the data buffer is stored.

本発明によるデータ先読み方式では、第1図(B)に示
すとおり、一方のホストコンピュータ、例えば1aから磁
気ディスク5に対して、データ読出命令が発行される
と、まずホストコンピュータ1aから要求されたデータを
磁気ディスクからデータバッファ4に読み出し、ホスト
に転送すると共に、それに続くデータを磁気ディスクか
ら読み出し(先読み)データバッファ4に格納する。こ
こで、先読みするデータの量は、各コンピュータ毎にポ
インタ3内に記憶されているそのホストコンピュータが
指定した最大および最小のデータ先読み量の範囲内にな
るようにされる。この最大先読み量、最小先読み量は、
複数のホストによって、予め指定されている。
In the data pre-reading method according to the present invention, as shown in FIG. 1 (B), when a data read command is issued from one host computer, for example, 1a, to the magnetic disk 5, it is first requested by the host computer 1a. The data is read from the magnetic disk to the data buffer 4 and transferred to the host, and the subsequent data is read from the magnetic disk (preread) and stored in the data buffer 4. Here, the amount of prefetched data is set to be within the range of the maximum and minimum data prefetch amounts designated by the host computer stored in the pointer 3 for each computer. The maximum prefetch amount and the minimum prefetch amount are
It is designated in advance by a plurality of hosts.

〔作用〕[Action]

ホストコンピュータ1aから要求されたデータを読み出
し、これをホストコンピュータ1aに転送後、同一のホス
トコンピュータ1a或いは別のホストコンピュータ1bより
命令が発行された場合、この命令がディスクアクセスを
必要としない命令であれば先読みを続けながら実行され
る。また、先読みが最小先読み量に達する前に、ホスト
コンピュータ1aあるいは1bからディスクアクセスを必要
とする命令が発行されると、その命令の実行は先読みが
最小先読み量に達するまで待たされる。先読みが最小先
読み量に達し、且つ、最大先読み量に達する前にディス
クアクセスを必要とする命令が発行されると、特定の命
令、例えば現在先読みしているデータに関する読み出し
命令を除き、先読みを中止して、即その命令が実行され
る。
After the requested data is read from the host computer 1a and transferred to the host computer 1a, if the same host computer 1a or another host computer 1b issues a command, this command is a command that does not require disk access. If so, it is executed while continuing to read ahead. If the host computer 1a or 1b issues a command that requires disk access before the prefetch reaches the minimum prefetch amount, the execution of the command is delayed until the prefetch reaches the minimum prefetch amount. When the read-ahead reaches the minimum read-ahead amount and a command that requires disk access before reaching the maximum read-ahead amount is issued, the read-ahead is canceled except for a specific command, for example, a read command related to the currently read-ahead data. Then, the command is immediately executed.

ここで、別のホストコンピュータ1bよりデータ読出命令
が発行された場合は、ホストコンピュータ1aの先読みデ
ータの後に、ホストコンピュータ1bから要求されたデー
タが格納され、その後ホストコンピュータ1bの先読みデ
ータが格納される。
Here, when a data read command is issued from another host computer 1b, the data requested by the host computer 1b is stored after the pre-read data of the host computer 1a, and then the pre-read data of the host computer 1b is stored. It

従って、この後ホストコンピュータ1aより最初に要求し
たデータの後続データを読み出す命令が発行された場合
でも、少なくとも先読みしてある分のデータだけは、デ
ィスクをアクセスすることなく、直ちにホストコンピュ
ータ1aに転送することができることになる。
Therefore, even if an instruction to read the subsequent data of the first requested data is issued from the host computer 1a, at least the prefetched data is immediately transferred to the host computer 1a without accessing the disk. You will be able to do it.

〔実施例〕〔Example〕

本発明の一実施例を第2図〜第4図にもとづき説明す
る。
An embodiment of the present invention will be described with reference to FIGS.

第2図は、本発明の一実施例のハード構成図であり、第
3図は、本発明のデータ先読み方式を適用した場合のデ
ータバッファへのデータ読出状態を示す図、第4図はそ
の動作説明用フローチャートである。
FIG. 2 is a hardware configuration diagram of an embodiment of the present invention, FIG. 3 is a diagram showing a data read state to a data buffer when the data prefetch method of the present invention is applied, and FIG. It is a flowchart for operation | movement description.

第2図において、1a、1bはそれぞれホストA、ホストB
であり、磁気ディスク制御装置2を介してディスク5に
接続されている。磁気ディスク制御装置2は、2つのI/
O制御部25、26、プロセッサ21、ROM22、RAM23、リング
バッファ制御部24を有している。RAM23は記憶部であ
り、ポインタ部23−0とスタック部23−1が用意され
る。
In FIG. 2, 1a and 1b are host A and host B, respectively.
And is connected to the disk 5 via the magnetic disk controller 2. The magnetic disk controller 2 has two I /
It has O control units 25 and 26, a processor 21, a ROM 22, a RAM 23, and a ring buffer control unit 24. The RAM 23 is a storage unit, and a pointer unit 23-0 and a stack unit 23-1 are prepared.

そしてポインタ部23−0には各ホストからそれぞれの能
力や動作状態にあわせて指定される各ホスト別の最大先
読み量と最小先読み量やバッファ4上のアドレス等が記
憶されている。このとき最大先読み量は、そのホストが
データバッファ上を使用する割合によって指定され、最
小先読み量は、ブロック数によって指定される。この実
施例では、ホストAの最小先読み量をA1、最大先読み量
をA2とし、ホストBの最小先読み量をB1、最大先読み量
をBとする。またスタック部23−1には、後述するよう
に、スタックが許可される命令が一時保持される。
The pointer unit 23-0 stores the maximum read-ahead amount and the minimum read-ahead amount for each host designated by each host in accordance with its capability and operating state, the address on the buffer 4, and the like. At this time, the maximum read-ahead amount is specified by the ratio of the host using the data buffer, and the minimum read-ahead amount is specified by the number of blocks. In this embodiment, the minimum prefetch amount of the host A is A1, the maximum prefetch amount is A2, the minimum prefetch amount of the host B is B1, and the maximum prefetch amount is B. Further, as will be described later, the stack unit 23-1 temporarily holds an instruction that allows stacking.

4は、半導体記憶装置等により構成されるデータバッフ
ァであり、この実施例では、リング構造の先入れ先出し
(FIFO)バッファを用いている。このバッファ4は、磁
気ディスク5に対して読み書きされるデータが複数ブロ
ック分記憶できる程の容量をもつ。
Reference numeral 4 is a data buffer composed of a semiconductor memory device or the like. In this embodiment, a ring structure first in first out (FIFO) buffer is used. The buffer 4 has a capacity such that data read from and written to the magnetic disk 5 can store a plurality of blocks.

第3図(A)は、本発明によるデータ先読み方式を実行
した時のデータバッファの状態の1例を示す図であり、
データ読出命令が連続的に出力された場合である。
FIG. 3A is a diagram showing an example of the state of the data buffer when the data prefetching method according to the present invention is executed,
This is the case where data read commands are continuously output.

はじめに、ホストAからデータ読出命令が発行される
と、ホストAが要求したデータ31が磁気ディスク5から
バッファ4に読み出され、ホストAに転送される。それ
に続いて、前記データ31に続いたデータ32が磁気ベィス
ク5からバッファ4に読み出される。
First, when a data read command is issued from the host A, the data 31 requested by the host A is read from the magnetic disk 5 to the buffer 4 and transferred to the host A. Subsequently, the data 32 following the data 31 is read from the magnetic disk 5 into the buffer 4.

先読みデータ32の量がホストAの最小先読み量A1を越え
た後、ホストBからデータ読出命令が出されると、ホス
トBからの要求データ33が磁気ディスク5からバッファ
4に読み出され、ホストBに転送される。それに引き続
いて前記データ33の後続データ34が読み出される。
When the data read command is issued from the host B after the amount of the read-ahead data 32 exceeds the minimum read-ahead amount A1 of the host A, the request data 33 from the host B is read from the magnetic disk 5 to the buffer 4, and the host B Transferred to. Subsequent to that, the subsequent data 34 of the data 33 is read.

その後、ホストAから、データ31に続くデータ32の読出
命令が出された場合には、直ちに、このデータ32をバッ
ファ4から読み出すことができる。
After that, when the host A issues a read command of the data 32 following the data 31, the data 32 can be immediately read from the buffer 4.

第3図(B)は、本発明によるデータ先読み方式を実行
した時のデータバッファの状態の他の例を示す図であ
る。
FIG. 3B is a diagram showing another example of the state of the data buffer when the data prefetching method according to the present invention is executed.

ホストAからデータ読出命令が発行されると、まずホス
トAが要求したデータ35を磁気ディスク5からバッファ
4に読み出し、ホストAに転送すると共に、その後続デ
ータ36を磁気ディスク5からバッファ4に読み出す。こ
の先読みがホストAに指定された最小先読みデータ量A1
に達する前に、ホストBよりデータ読出命令が発行され
ると、これはスタック部23−1にスタックされこの命令
の実行は先読みデータ量がA1に達成するまで待たされ
る。先読みデータ量がA1に達すると先読みは終了し、上
記スタックされていた命令が実行されホストBより要求
されたデータ37をディスク5からバッファ4に読み出
し、ホストBに転送すると共に、その後続データ38をも
続けてディスク5からバッファ4に読み出す。
When the data read command is issued from the host A, first, the data 35 requested by the host A is read from the magnetic disk 5 to the buffer 4 and transferred to the host A, and the subsequent data 36 is read from the magnetic disk 5 to the buffer 4. . This prefetch is the minimum prefetch data amount A1 designated by host A
If a data read command is issued from the host B before reaching 0, the command is stacked in the stack unit 23-1 and the execution of this command is waited until the prefetch data amount reaches A1. When the amount of read-ahead data reaches A1, the read-ahead ends, the stacked instruction is executed, the data 37 requested by the host B is read from the disk 5 to the buffer 4, transferred to the host B, and the subsequent data 38 Is continuously read from the disk 5 to the buffer 4.

この先読み中にホストAより最初に要求したデータの後
続データを読み出す命令が発行されると、直ちに先読み
を中止し、ホストAより要求されたデータを、ディスク
をアクセスすることなくバッファ4よりホストAに転送
する。この時ホストAより要求されたデータが先読みし
たデータ以上あった場合は、不足する分のデータのみを
ディスクより読み出し、ホストAに転送する。この後、
ホストBより最初に要求したデータの後続データを読み
出す命令が発行されると、同様にバッファ4上の先読み
したデータから直ちにホストBに転送する。
When an instruction to read the subsequent data of the first requested data is issued from the host A during the pre-reading, the pre-reading is immediately stopped, and the data requested by the host A is transferred from the buffer 4 to the host A without accessing the disk. Transfer to. At this time, if the data requested by the host A is more than the pre-read data, only the insufficient data is read from the disk and transferred to the host A. After this,
When the host B issues an instruction to read the subsequent data of the first requested data, the prefetched data in the buffer 4 is immediately transferred to the host B in the same manner.

又、上記の場合において、ホストBより要求されたデー
タ或いは先読みデータをバッファに格納中にバッファが
一杯になった場合、リング構成とされたバッファ4の初
めからデータが引き続き格納され、先に記憶してあった
ホストAに転送済のデータは、破壊されるがホストAの
先読みデータは全部或いはある程度確保され、今後この
データの読み出しが要求された時に利用する。
Further, in the above case, when the buffer is full while the data requested by the host B or the read-ahead data is being stored in the buffer, the data is continuously stored from the beginning of the buffer 4 having the ring structure and is stored first. The data already transferred to the host A is destroyed, but the read-ahead data of the host A is secured in whole or to some extent, and it is used when future reading of this data is requested.

第4図は、本発明の動作を説明するための処理フローチ
ャートである。
FIG. 4 is a processing flowchart for explaining the operation of the present invention.

処理の詳細は前記と同様のため省略するが、データ先読
み中で、最小先読み量に達しないときに発行された命令
で、ディスクをアクセスする必要のない命令は、先読み
を続けながら実行され、また最大先読み量に達するまで
に発行された命令でディスクをアクセスする必要のない
命令は、そのまま先読みを続けながら実行される。
The details of the processing are omitted because they are the same as those described above. However, during data pre-reading, an instruction issued when the minimum pre-reading amount is not reached and that does not require access to the disk is executed while continuing pre-reading. Instructions issued up to the maximum prefetch amount that do not require access to the disk are executed while continuing prefetching.

なお、フロー中、スタックが許可された命令とは、リー
ド、ライトのようにディスクへのアクセスの必要な命令
であり、その他の命令、例えば、ディスクがレディ状態
か否かを確認する命令は、スタックが許可されず、直に
実行に移されることとなる。
Incidentally, in the flow, the stack-permitted instruction is an instruction that requires access to the disk, such as read or write, and other instructions, for example, an instruction that confirms whether the disk is ready, The stack will not be allowed and will be immediately executed.

〔発明の効果〕〔The invention's effect〕

以上述べたとおり、本発明によれば、外部記憶装置を共
用する各ホストの能力や動作状態にあわせて、指定され
た最大のデータ先読み量と最小のデータ先読み量によ
り、データバッファを有効に利用するため、外部記憶装
置に対するアクセスタイムを短縮することができ、計算
機システム全体としての処理能力の向上に寄与すること
ができる。
As described above, according to the present invention, the data buffer is effectively used by the specified maximum data read-ahead amount and minimum data read-ahead amount according to the capabilities and operating states of the hosts sharing the external storage device. Therefore, it is possible to shorten the access time to the external storage device and contribute to the improvement of the processing capacity of the entire computer system.

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

第1図は本発明の原理を示す図、 第2図は本発明の実施例のハード構成図、 第3図は本発明のデータバッファへのデータ読出状態を
示す図、 第4図は本発明の処理フローを示す流れ図、 第5図は従来例を示す図である。 1a、1b……ホスト 2……磁気ディスク制御装置 3……ポインタ(記憶装置) 4……データバッファ 5……磁気ディスク
FIG. 1 is a diagram showing the principle of the present invention, FIG. 2 is a hardware configuration diagram of an embodiment of the present invention, FIG. 3 is a diagram showing a data read state to a data buffer of the present invention, and FIG. 5 is a flowchart showing the processing flow of FIG. 5, and FIG. 5 is a diagram showing a conventional example. 1a, 1b ...... Host 2 ...... Magnetic disk control device 3 ...... Pointer (storage device) 4 ...... Data buffer 5 ...... Magnetic disk

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】データバッファ(4)と、ディスク等の外
部記憶装置(5)と、ホストコンピュータ(1)を備
え、ホストコンピュータからデータ読出命令が発行され
ると、要求されたデータを外部記憶装置から前記データ
バッファへ読み出してホストコンピュータに転送すると
ともに、その後続データを前記データバッファに読み出
す先読み機能を有するデータ処理装置において、 それぞれホストコンピュータから指定される最小先読み
量及び最大先読み量が記入される記憶手段(3)を設
け、 先読み中は最小先読み量に達するまでに発行された命令
で、外部記憶装置をアクセスする必要のない命令は先読
みを続けながら実行され、外部記憶装置をアクセスする
必要のある命令は先読みが最小先読み量に達するまで待
たされるように制御することを特徴とするデータ先読み
制御方式。
1. A data buffer (4), an external storage device (5) such as a disk, and a host computer (1). When a data read command is issued from the host computer, the requested data is externally stored. In a data processing device having a read-ahead function for reading the data from the device to the data buffer and transferring the data to the host computer, and reading the subsequent data to the data buffer, the minimum read-ahead amount and the maximum read-ahead amount designated by the host computer are respectively entered. A storage means (3) is provided, and during pre-reading, an instruction issued until reaching the minimum pre-reading amount that does not need to access the external storage device is executed while continuing pre-reading, and the external storage device needs to be accessed. Some commands have a read-ahead so that the read-ahead waits until the minimum read-ahead amount is reached. Data prefetch control method, characterized in that.
JP63146076A 1988-06-14 1988-06-14 Data prefetch control method Expired - Fee Related JPH0792730B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63146076A JPH0792730B2 (en) 1988-06-14 1988-06-14 Data prefetch control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63146076A JPH0792730B2 (en) 1988-06-14 1988-06-14 Data prefetch control method

Publications (2)

Publication Number Publication Date
JPH01314327A JPH01314327A (en) 1989-12-19
JPH0792730B2 true JPH0792730B2 (en) 1995-10-09

Family

ID=15399563

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63146076A Expired - Fee Related JPH0792730B2 (en) 1988-06-14 1988-06-14 Data prefetch control method

Country Status (1)

Country Link
JP (1) JPH0792730B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5426761A (en) * 1992-12-22 1995-06-20 International Business Machines Corporation Cache DASD sequential staging and method

Also Published As

Publication number Publication date
JPH01314327A (en) 1989-12-19

Similar Documents

Publication Publication Date Title
JP2703668B2 (en) Data transfer control device and magnetic disk control device
JP3433386B2 (en) Apparatus and method for performing direct memory access to input / output storage device
JP2003504757A (en) Buffering system bus for external memory access
US6092170A (en) Data transfer apparatus between devices
US6836831B2 (en) Independent sequencers in a DRAM control structure
JP3566319B2 (en) Information storage device
JPH0792730B2 (en) Data prefetch control method
JP2523715B2 (en) Magnetic disk drive
JPS6232494B2 (en)
JP2002123420A (en) Memory access device
JP3151416B2 (en) Data transfer control device and magnetic disk device
JPH04311216A (en) External storage controller
JP2000105736A (en) Streaming memory controller for pci bus
JP2634867B2 (en) Disk cache data transfer control method
JPH0192855A (en) Disk cache control system
JPH09319657A (en) Processor provided with buffer for reading instruction
JPH0474215A (en) Data buffer control system
Bulić Direct Memory Access
WO1994022134A1 (en) Buffer control for data transfer within hard disk during idle periods
JPS60258670A (en) Data transmission and reception method
JPH051502B2 (en)
JPH04111015A (en) Information recorder
JPH05334012A (en) Large capacity disk controller
JPS58207135A (en) Access system of internal memory
JPH0477916A (en) Magnetic disk device

Legal Events

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