JP2010128743A - Buffer management method, buffer management device, and buffer management program - Google Patents
Buffer management method, buffer management device, and buffer management program Download PDFInfo
- Publication number
- JP2010128743A JP2010128743A JP2008302128A JP2008302128A JP2010128743A JP 2010128743 A JP2010128743 A JP 2010128743A JP 2008302128 A JP2008302128 A JP 2008302128A JP 2008302128 A JP2008302128 A JP 2008302128A JP 2010128743 A JP2010128743 A JP 2010128743A
- Authority
- JP
- Japan
- Prior art keywords
- buffer
- throughput
- data
- buffer size
- buffer management
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、限られたサイズのバッファを複数の周辺装置で共有する場合において、スループットが最大になるように動的にバッファの管理を行うバッファ管理方法、バッファ管理装置及びバッファ管理プログラムに関するものである。 The present invention relates to a buffer management method, a buffer management device, and a buffer management program for dynamically managing a buffer so that throughput is maximized when a buffer of a limited size is shared by a plurality of peripheral devices. is there.
図4は、従来の一般的なデータ処理装置10を示す説明図である。
このデータ処理装置10は、例えば、パーソナルコンピュータ(以下「PC」という。)等であって、これには、複数の周辺装置(I/O)15等が接続されている。データ処理装置10は、中央処理装置(以下「CPU」という。)11、リードオンリーメモリ(以下「ROM」という。)12、ランダムアクセスメモリ(以下「RAM」という。)13及びデータバス14等により構成されている。
FIG. 4 is an explanatory diagram showing a conventional general
The
大容量のデータをデータ処理装置10と周辺装置15との間で入出力を行う場合、RAM13上にバッファを確保し、DMA(Direct Memory Access)により、CPU11を経由しないで、直接、ハードディスク等の周辺装置15とRAM13間でデータの転送を行うことが行われている。この方法は、DMAによるデータ転送時には、データバス14が占有されてしまうこととなる。その結果として、全体の処理速度が低下してしまうという問題があった。この問題を解決するために、図5に示すようなバッファ管理装置が提案されている。
When inputting / outputting a large amount of data between the
図5は、図4のデータ処理装置10を用いたバッファ管理装置を示す概略の構成図である。
FIG. 5 is a schematic configuration diagram showing a buffer management device using the
このバッファ管理装置では、データ処理装置10と、複数の周辺装置(I/O)15(=15−1〜15−n:nは整数)との間に共有メモリ20が接続されている。共有メモリ20上には、各周辺装置15に対応してバッファ21(=21−1〜21−n)がそれぞれ設けられている。バッファ21は、データ処理装置10と周辺装置15との間において入出力されるデータを一時記憶するものである。更に、ROM12内には、各周辺装置15に対応して、周辺装置15と入出力を行うためのプログラムであるデバイスドライバ12a(=12a―1〜12a―n)が格納されている。
In this buffer management device, a shared memory 20 is connected between the
この場合、データ転送時にデータバス14を使用しないため、CPU1の処理が一時的に停止することはなくなり全体の処理速度が低下することを抑えられる。
In this case, since the data bus 14 is not used at the time of data transfer, the processing of the
しかし、ハードウェア的に専用の共有メモリ20を用意することが必要となるため、RAM3上にバッファを確保する場合と比べると小さな領域しか確保できない。この方法を採用した場合、限られた所定のメモリ容量の共有メモリ20をいかに効率よく使用するかによって全体の処理速度が影響される。 However, since it is necessary to prepare a dedicated shared memory 20 in terms of hardware, only a small area can be secured as compared with the case where a buffer is secured on the RAM 3. When this method is adopted, the overall processing speed is affected by how efficiently the shared memory 20 having a limited predetermined memory capacity is used.
例えば、このように共有メモリ20に制限がある場合で、接続されている周辺装置15が1つのときは、共有メモリ20全体をその周辺装置15で専有できるため、周辺装置15とデバイスドライバ12aは、許される範囲で最大のバッファ21を割り当てることが可能であり、与えられた条件での最高の性能が得られることが期待される。
For example, when the shared memory 20 is limited in this way and there is one connected
ところが、共有メモリ20に制限がある場合で、周辺装置15が複数接続されているときは、次の点を考慮して各周辺装置15に対しバッファ21の割り当てをする必要がある。
However, when the shared memory 20 is limited and a plurality of
(1) 複数のデバイスドライバ12aが、バッファ21を確保しようとすると競合が発生するが、特定のデバイスドライバ12aにバッファ資源が偏らないようにするためには、割り当てるバッファ21のサイズを小さくしなければならない。 (1) When a plurality of device drivers 12a try to secure the buffer 21, a conflict occurs. However, in order to prevent buffer resources from being biased to a specific device driver 12a, the size of the buffer 21 to be allocated must be reduced. I must.
(2) 一方、当該のデバイスドライバ12aの入出力処理のスループットを向上させるためには、バッファサイズは大きい方が望ましい。 (2) On the other hand, in order to improve the throughput of the input / output processing of the device driver 12a, it is desirable that the buffer size is large.
(3) 更に、システムの電源を投入したままで動的に周辺装置15を追加、削除することができるホットスワップの構造を有したシステムの場合、どのような周辺装置15がいくつ接続されているかによって、バッファ21の最適な割り当てが変化することになる。
(3) Further, in the case of a system having a hot swap structure in which
(4) 周辺装置15によっては、データの入出力の機会が極めてまれなものもあり、このような装置にバッファ21を固定的に割り当てておくのは無駄である。
(4) Some
共有メモリ20を複数の周辺装置15で共有する場合は、上記の(1)〜(4)のような配慮が必要となるが、現状の技術では、一定の大きさのバッファ21を固定的に割り当てることになり、全体としての性能を最大にするようにバッファサイズを決定することは困難である。
When the shared memory 20 is shared by a plurality of
このようなバッファ管理の方法、装置等については、次のような文献に記載されている。 Such buffer management methods, devices, and the like are described in the following documents.
特許文献1には、業務プログラムが送出するバッファ取得要求に従って、その要求に最も適したサイズのバッファを選出し前記プログラムに引き渡すバッファ取得手段と、前記プログラムが送出するバッファ返却要求に従って指定されたバッファを未使用バッファとして返却しその管理情報を更新するバッファ返却手段と、前記バッファ取得手段および前記バッファ返却手段に指示されてバッファのブロックの拡張および縮退を実行しその管理情報を更新するブロック変更手段と、前記バッファ管理情報ファイルを定期的に参照してバッファサイズごとにその使用状況を監視し前記使用状況に対応してその管理指標を更新するバッファ使用頻度検査手段とを有するバッファ管理方式が記載されている。
特許文献2には、データを送信する前や受信した後にいったんバッファメモリに格納する通信装置において、データをバッファメモリに入出力する際のデータ入出力速度に関する情報に基づき、データを格納するバッファのサイズを決定するバッファサイズ算出部と、バッファサイズ算出部が決定したバッファのサイズに基づき、データを格納可能なバッファ領域を設定するバッファメモリ管理制御部とを備えている通信装置が記載されている。
上記で述べた通り、データの入出力時のバッファ容量に制限があり、且つ、複数の周辺装置15が動的に追加、削除されるような場合において、全体としての性能が最大となるようなバッファサイズの動的な調整方法及び装置が求められている。
As described above, when the buffer capacity at the time of data input / output is limited and a plurality of
しかしながら、従来の技術では、一定の大きさのバッファを固定的に割り当てることになり、全体としての性能を最大にするようにバッファサイズを決定することは困難である。 However, in the conventional technique, a buffer having a certain size is fixedly allocated, and it is difficult to determine the buffer size so as to maximize the overall performance.
一方、特許文献1の発明は、業務プログラムの要求するバッファサイズに合わせてバッファサイズを動的に変化させる技術ではあるが、システム全体のスループットを最大にするように動的にバッファサイズを変更するものではない。
On the other hand, although the invention of
特許文献2の発明は、外部のコンピュータ等から取得したデータ転送レート及びデータ転送周期等の通信パラメータ用いて、バッファサイズを計算する技術であるが、接続されている装置のスループットを動的に算出してバッファサイズを決定する技術ではない。
The invention of
本発明のバッファ管理方法は、データの処理を行うデータ処理装置と、前記データ処理装置に対してデータの入出力を行う複数の周辺装置と、前記データ処理装置と前記複数の周辺装置との間で入出力される前記データを一時記憶するバッファと、前記各周辺装置に対してそれぞれ設けられ、前記データの入出力を制御する複数のデバイスドライバと、前記デバイスドライバにおける動作のスループットに基づき、前記バッファサイズを管理するバッファ管理部とを用いたバッファ管理方法であって、前記複数のデバイスドライバのうちの特定のデバイスドライバから申告のあった前記バッファサイズに関する情報に応じたバッファサイズが確保できるか否かを行う初期処理と、前記デバイスドライバ全体における動作のスループットに対する前記特定のデバイスドライバのスループットの割合に応じて、動的に前記バッファサイズを変更する変更処理とを有することを特徴とする。 The buffer management method of the present invention includes a data processing device that processes data, a plurality of peripheral devices that input / output data to / from the data processing device, and between the data processing device and the plurality of peripheral devices. A buffer for temporarily storing the data to be input / output in the device, a plurality of device drivers provided for each of the peripheral devices, and controlling the input / output of the data, based on the throughput of the operation in the device driver, A buffer management method using a buffer management unit that manages a buffer size, and whether a buffer size according to information about the buffer size reported from a specific device driver of the plurality of device drivers can be secured The initial processing to determine whether or not the overall throughput of the device driver Depending on the ratio of the throughput of the particular device driver, and having a changing process for dynamically changing the buffer size.
本発明のバッファ管理装置は、データの処理を行うデータ処理装置と、前記データ処理装置に対してデータの入出力を行う複数の周辺装置と、前記データ処理装置と前記複数の周辺装置との間で入出力される前記データを一時記憶するバッファと、前記各周辺装置に対してそれぞれ設けられ、前記データの入出力を制御する複数のデバイスドライバと、前記デバイスドライバにおける動作のスループットに基づき、前記バッファサイズを管理するバッファ管理部とを備えたバッファ管理装置であって、前記複数のデバイスドライバのうちの特定のデバイスドライバから申告のあった前記バッファサイズに関する情報に応じたバッファサイズが確保できるか否かの初期処理を行い、前記デバイスドライバ全体における動作のスループットに対する前記特定のデバイスドライバのスループットの割合に応じて、動的に前記バッファサイズを変更することを特徴とする。 The buffer management device of the present invention includes a data processing device that processes data, a plurality of peripheral devices that input / output data to / from the data processing device, and between the data processing device and the plurality of peripheral devices. A buffer for temporarily storing the data to be input / output in the device, a plurality of device drivers provided for each of the peripheral devices, and controlling the input / output of the data, based on the throughput of the operation in the device driver, A buffer management device comprising a buffer management unit for managing a buffer size, wherein a buffer size according to information on the buffer size reported from a specific device driver of the plurality of device drivers can be secured; The initial processing of whether or not, to the throughput of the operation in the entire device driver Wherein in proportion to the throughput of a particular device driver, and wherein the dynamically changing the buffer size.
本発明のバッファ管理プログラムは、データの処理を行うデータ処理装置と、前記データ処理装置に対してデータの入出力を行う複数の周辺装置と、前記データ処理装置と前記複数の周辺装置との間で入出力される前記データを一時記憶するバッファと、前記各周辺装置に対してそれぞれ設けられ、前記データの入出力を制御する複数のデバイスドライバと、前記デバイスドライバにおける動作のスループットに基づき、前記バッファサイズを管理するバッファ管理部とを用いたバッファ管理プログラムであって、前記複数のデバイスドライバのうちの特定のデバイスドライバから申告のあった前記バッファサイズに関する情報に応じたバッファサイズが確保できるか否かの処理を行う初期処理と、前記デバイスドライバ全体における動作のスループットに対する前記特定のデバイスドライバのスループットの割合に応じて、動的に前記バッファサイズを変更するバッファサイズの変更処理とを機能させるためのバッファ管理プログラムを特徴とする。 A buffer management program according to the present invention includes a data processing device that processes data, a plurality of peripheral devices that input and output data to and from the data processing device, and the data processing device and the plurality of peripheral devices. A buffer for temporarily storing the data to be input / output in the device, a plurality of device drivers provided for each of the peripheral devices, and controlling the input / output of the data, based on the throughput of the operation in the device driver, A buffer management program using a buffer management unit that manages a buffer size, and whether a buffer size according to information on the buffer size reported from a specific device driver of the plurality of device drivers can be secured Initial processing for determining whether or not the device and the operation of the entire device driver Wherein in proportion to the throughput of a specific device driver for throughput, and wherein the buffer management program for functioning the process of changing the buffer size for dynamically changing the buffer size.
本発明のバッファ管理方法、バッファ管理装置及びバッファ管理プログラム
によれば、複数のデバイスドライバで限られた大きさの共有メモリをバッファとして利用する場合、バッファ管理装置により、各デバイスドライバのスループットが計算され、全体動作のスループットに対する当該デバイスドライバのスループットの割合に応じて動的にバッファサイズが決まるので、システム全体の性能をより効率的にすることができる。
According to the buffer management method, buffer management device, and buffer management program of the present invention, when a shared memory of a limited size is used as a buffer by a plurality of device drivers, the buffer management device calculates the throughput of each device driver. In addition, since the buffer size is dynamically determined in accordance with the ratio of the throughput of the device driver to the throughput of the entire operation, the performance of the entire system can be made more efficient.
更に、このとき、バッファサイズの決定は、バッファ管理装置が一元的に行うので各デバイスドライバは、バッファ管理に関して特別の処理を行わなくてもよいので、デバイスドライバの設計を複雑化することが抑えられる。 Further, at this time, the buffer size is determined by the buffer management apparatus in a centralized manner, so that each device driver does not have to perform any special processing regarding the buffer management, so that the design of the device driver is prevented from being complicated. It is done.
本発明を実施するための最良の形態は、以下の好ましい実施例の説明を添付図面と照らし合わせて読むと、明らかになるであろう。但し、図面はもっぱら解説のためのものであって、本発明の範囲を限定するものではない。 The best mode for carrying out the invention will become apparent from the following description of the preferred embodiments when read in conjunction with the accompanying drawings. However, the drawings are only for explanation and do not limit the scope of the present invention.
(実施例1のバッファ管理装置の構成)
図1は、本発明の実施例1におけるデータ処理装置30を用いたバッファ管理装置を示す概略の構成図である。
(Configuration of Buffer Management Device of Embodiment 1)
FIG. 1 is a schematic configuration diagram illustrating a buffer management device using the data processing device 30 according to the first embodiment of the present invention.
このバッファ管理装置は、PC等のデータ処理装置30を有し、このデータ処理装置30には、バッファ管理部40を介してプリンタ等の複数の周辺装置60(=60−1〜60−n)が接続されている。データ処理装置30は、装置全体を制御するCPU31と、各種プログラムを格納するプログラムメモリ32と、ワーキングデータ等を記憶するRAM等のデータメモリ33等とを有し、これらは、データバス34で相互に接続されている。データバス34には、バッファ管理部40が接続されている。
The buffer management device includes a data processing device 30 such as a PC, and the data processing device 30 includes a plurality of peripheral devices 60 (= 60-1 to 60-n) such as a printer via a buffer management unit 40. Is connected. The data processing device 30 includes a
バッファ管理部40は、共有メモリ41と、バッファ管理部40全体をプログラムにより制御する制御部43とを有しており、各種の周辺装置60(=60−1〜60−n)に接続されている。共有メモリ41は、各周辺装置60との入出力において各デバイスドライバによって、バッファ42として、例えば、図1のM1(42−1)、M2(42−2)、M3(42−3)のようにシェアされて使用される。
The buffer management unit 40 includes a shared memory 41 and a
制御部43は、デバイスドライバ32a(=32a−1〜32a―n)の入出力処理時間を計測する処理時間計測手段43a、当該のデバイスドライバ32aのスループプットを計算するスループット計算手段43b、全体のスループットに対する当該のデバイスドライバ32aのスループットの割合に応じてバッファサイズを計算するバッファサイズ計算手段43c及び2つのレジスタを有しており、これらは後に述べる周辺装置ごとの各種レジスタと相互に接続されている。
The
制御部43の有するレジスタの内の一つは、各デバイスドライバに割り当てられているバッファ42の総和を記憶しているバッファ割り当てサイズレジスタ(全体)(以下「BAR(全体)」という。)43dであり、別のレジスタは、各デバイスドライバのスループットの総和を記憶するスループットレジスタ(全体)(以下「TPR(全体)」という。)43eである。
One of the registers of the
次に各種レジスタ等について説明する。各種レジスタは、バッファ管理装置40に接続さている周辺装置60ごとに用意されている。バッファ要求サイズ(MIN)レジスタ(以下「BRR(MIN)」という。)44(=44−1〜44−n)は、デバイスドライバ32aが、バッファ管理部40に対し要求するバッファサイズの最小値をセットするレジスタである。バッファ要求サイズ(MAX)レジスタ(以下「BRR(MAX)」という。)45(=45−1〜45−n)は、デバイスドライバが、バッファ管理部40に対し要求するバッファサイズの最大値をセットするレジスタである。
Next, various registers will be described. Various registers are prepared for each
バッファ割り当てサイズレジスタ(以下「BAR」という。)46(=46−1〜46−n)には、バッファサイズ計算手段43cが算出したバッファサイズがセットされ、その値をデバイスドライバ32aに通知するために使用するレジスタである。バッファ転送バイト数レジスタ(以下「BTR」という。)47(=47―1〜47−n)は、デバイスドライバ32aが入出力処理を行ったときの転送バイト数をセットするためのレジスタである。バッファ転送応答カウンタ(以下「BTC」という。)48(=48−1〜48−n)は、デバイスドライバ32aが入出力処理を行っている間、処理時間計測手段43aがクロックをカウントするカウンタである。
The buffer allocation size register (hereinafter referred to as “BAR”) 46 (= 46-1 to 46-n) is set with the buffer size calculated by the buffer size calculation means 43c, and notifies the
スループットレジスタ(以下「TPR」という。)49(=49−1〜49−n)は、デバイスドライバ32aが、入出力処理を行った結果、スループット計算手段43bにおいて計算された当該デバイスドライバ32aのスループットを記憶するためのレジスタである。バッファ転送制御レジスタ(以下「BCR」という。)50(=50−1〜50−n)は、デバイスドライバ32aがバッファ管理部40に入出力の開始を通知するためのレジスタである。
A throughput register (hereinafter referred to as “TPR”) 49 (= 49-1 to 49-n) is a throughput of the
(実施例1のバッファ管理方法)
(A) 本実施例1のバッファ管理装置における初期動作
(Buffer management method of Embodiment 1)
(A) Initial operation in the buffer management apparatus of the first embodiment
図2は、図1のバッファ管理装置における初期動作を示すフローチャートである。 FIG. 2 is a flowchart showing an initial operation in the buffer management apparatus of FIG.
本実施例1のバッファ管理装置における初期処理の動作は、以下のステップにより構成される。ある周辺装置60(例えば、周辺装置60−1)に対応するデバイスドライバ32a(例えば、デバイスドライバ32a―1)は、初めてデータをやり取りする前に、要求するバッファサイズの最小値をBRR(MIN)44−1に、最大値をBRR(MAX)45−1に書き込み、使用するバッファをバッファ管理部40に要求する(ステップS1)。
The operation of the initial process in the buffer management apparatus of the first embodiment is composed of the following steps. The
バッファ管理装置40は、BRR(MIN)44−1を参照し(ステップ2)、バッファの割り当てが可能であるかをチェックする(ステップ3)。割り当てが不可能なときは(NO)、“0”をBAR46−1にセットし処理を終了する(ステップ4)。デバイスドライバ32aは、BAR46−1を参照し、“0”であればバッファ割り当てが失敗したのでバッファサイズを小さくして再試行を行う。
The buffer management device 40 refers to the BRR (MIN) 44-1 (step 2) and checks whether the buffer can be allocated (step 3). When the allocation is impossible (NO), “0” is set in the BAR 46-1 and the process is terminated (step 4). The
バッファ管理部40は、バッファの割り当てが可能なときは(YES)、BRR(MIN)44−1を参照し、そこにセットされている最小値をBAR46−1にセットする(ステップS5)。このとき、各デバイスドライバ32aに割り当てられているバッファサイズの総和が再計算され、BAR(全体)43dにセットされる。
When buffer allocation is possible (YES), the buffer management unit 40 refers to the BRR (MIN) 44-1 and sets the minimum value set therein to the BAR 46-1 (step S5). At this time, the sum of the buffer sizes assigned to each
デバイスドライバ32aは、BAR46−1にセットされたサイズのバッファ42を確保し(ステップS6)、入出力要求をBCR50−1にセットし(ステップS7)、入出力の開始をバッファ管理部40に通知する。
The
バッファ管理部40は、入出力要求を受けるとBTC48−1をクリアし(ステップS8)、データの転送を開始する。処理時間計測手段43aは、データの転送中は、クロックをカウントし、BTC48−1に加算していく(ステップS9)。入出力が完了するまではステップS9のBTC48−1のカウントを繰り返し、入出力が完了したら(ステップS10)処理時間計測手段43aは、クロックのカウントを停止して(ステップS11)転送したバイト数をBTR47−1にセットする(ステップ12)。
When receiving the input / output request, the buffer management unit 40 clears the BTC 48-1 (step S8) and starts data transfer. The processing
次にスループット計算手段43bは、BTR47−1にセットされている転送バイト数BaをBTC48−1にセットされている処理時間Paで除することにより当該のデバイスドライバのスループットTaを計算してTPR49−1にセットする(ステップS13)。例えば、転送バイト数Ba=1000バイト、処理時間Pa=200ミリ秒とすると、スループットTa=Ba/Pa=1000/0.2=5000[バイト/秒]となる。
Next, the
続いて、全体のスループットTsumを計算する(ステップS14)。全体のスループットは、共有メモリ41を共有しているすべての周辺装置60における入出力処理のスループットTiの総和であり、次の式で表わされる。
Tsum=ΣTi (1)
Subsequently, the overall throughput Tsum is calculated (step S14). The total throughput is the sum of the input / output processing throughputs Ti in all the
Tsum = ΣTi (1)
当該のスループットTaが計算されると、(1)式が再計算され全体のスループットTsumが更新される。Tsumは、TPR(全体)43eにセットされ記憶される。以上、周辺装置60−1を例として説明したが、他の周辺装置に対する処理についいても同様である。 When the throughput Ta is calculated, equation (1) is recalculated and the overall throughput Tsum is updated. Tsum is set and stored in the TPR (total) 43e. The peripheral device 60-1 has been described above as an example, but the same applies to processing for other peripheral devices.
(B) 本実施例1のバッファ管理装置における2回目以降の動作
図3は、図1のバッファ管理装置における2回目以降の動作を示すフローチャートであり、図2中の要素と共通の要素には共通の符号が付されている。
(B) Second and subsequent operations in the buffer management apparatus of the first embodiment FIG. 3 is a flowchart showing the second and subsequent operations in the buffer management apparatus of FIG. 1, and the elements common to the elements in FIG. The common code | symbol is attached | subjected.
本実施例1のバッファ管理装置における2回目以降の動作処理の動作は、以下のステップにより構成される。デバイスドライバ32aは、2回目以降のデータをやり取りする前に、バッファ42をバッファ管理部40に要求する(ステップS21)。バッファサイズ計算手段43cは、全体動作のスループットに対する当該デバイスドライバのスループットの割合を全体のバッファサイズに乗じてバッファサイズを算出し(ステップ22)、計算結果をBAR46−1にセットする(ステップS23)。
The second and subsequent operations in the buffer management apparatus of the first embodiment are configured by the following steps. The
例えば、全体のバッファサイズをMS、デバイスドライバに与えるバッファサイズをMSaとすると、
MSa=MS×(Ta/Tsum) (2)
である。
For example, if the overall buffer size is MS and the buffer size given to the device driver is MSa,
MSa = MS × (Ta / Tsum) (2)
It is.
例えば、MS=3000[バイト]、Ta=5000[バイト/秒]、
Tsum=50,000[バイト/秒]とすると、(2)式から
MSa=3000×(5000/50,000)=300[バイト]
となる。
For example, MS = 3000 [bytes], Ta = 5000 [bytes / second],
If Tsum = 50,000 [bytes / second], MSa = 3000 × (5000 / 50,000) = 300 [bytes] from equation (2)
It becomes.
デバイスドライバ32aは、BAR46−1にセットされたサイズのバッファ42を確保し(ステップS6)、入出力要求をBCR50−1にセットし(ステップS7)、入出力の開始をバッファ管理部40に通知する。ステップ6以下の動作は、図2に示したデバイスドライバ及びバッファ管理部40の動作とほぼ同様である。なお、周辺装置60−1を例として説明したが、他の周辺装置に対する処理についいても同様である。
The
(実施例1の効果)
本実施例1のバッファ管理方法、バッファ管理装置及びバッファ管理プログラムによれば、複数のデバイスドライバ32aで、限られた大きさの共有メモリ41をバッファ42として利用する場合、バッファ管理部40により、各デバイスドライバ32aのスループットが計算され、全体動作のスループットに対する当該デバイスドライバ32aのスループットの割合に応じて動的にバッファサイズが決まるので、システム全体の性能をより効率的にすることができる。
(Effect of Example 1)
According to the buffer management method, the buffer management apparatus, and the buffer management program of the first embodiment, when the shared memory 41 having a limited size is used as the
更に、このとき、バッファサイズの決定は、バッファ管理部40が一元的に行うので各デバイスドライバは32a、バッファ管理に関して特別の処理を行わなくてもよいので、デバイスドライバ32aの設計を複雑化することが抑えられる。
Further, at this time, since the buffer size is determined by the buffer management unit 40 in a centralized manner, each device driver does not need to perform special processing regarding the
(変形例)
本発明は、上記実施例に限定されず、種々の利用形態や変形が可能である。この利用形態や変形例としては、例えば、次の(a)〜(c)のようなものがある。
(Modification)
The present invention is not limited to the above-described embodiments, and various usage forms and modifications are possible. For example, the following forms (a) to (c) are available as usage forms and modifications.
(a) 実施例1では、バッファ管理部40は、プログラム制御で実現されていることで説明したが、各種回路によって実現してもよい。 (A) In the first embodiment, the buffer management unit 40 is described as being realized by program control, but may be realized by various circuits.
(b) 実施例1のCPU31、プログラムメモリ32、データメモリ33、データバス34及びバッファ管理部40を1つの大規模集積回路で実現してもよい。
(B) The
(c) 実施例1では、プログラム等をプログラムメモリ32に記憶することで説明したが、ハードディスクからデータメモリ33にプログラムをロードして実行することでもよい。
(C) In the first embodiment, the program or the like is described as being stored in the
30 データ処理装置
31 中央処理装置
32 プログラムメモリ
32a デバイスドライバ
33 データメモリ
34 データバス
40 バッファ管理部
41 共有メモリ
42 バッファ
43 制御部
43a 処理時間計測手段
43b スループット計算手段
43c バッファサイズ計算手段
60 周辺装置
30
Claims (10)
前記データ処理装置に対してデータの入出力を行う複数の周辺装置と、
前記データ処理装置と前記複数の周辺装置との間で入出力される前記データを一時記憶するバッファと、
前記各周辺装置に対してそれぞれ設けられ、前記データの入出力を制御する複数のデバイスドライバと、
前記デバイスドライバにおける動作のスループットに基づき、前記バッファサイズを管理するバッファ管理部と、
を用いたバッファ管理方法であって、
前記複数のデバイスドライバのうちの特定のデバイスドライバから申告のあった前記バッファサイズに関する情報に応じたバッファサイズが確保できるか否かを行う初期処理と、
前記デバイスドライバ全体における動作のスループットに対する前記特定のデバイスドライバのスループットの割合に応じて、動的に前記バッファサイズを変更する変更処理と、
を有することを特徴とするバッファ管理方法。 A data processing device for processing data;
A plurality of peripheral devices for inputting / outputting data to / from the data processing device;
A buffer for temporarily storing the data input / output between the data processing device and the plurality of peripheral devices;
A plurality of device drivers that are provided for each of the peripheral devices and control input / output of the data;
A buffer management unit for managing the buffer size based on the operation throughput in the device driver;
A buffer management method using
An initial process for determining whether or not a buffer size according to information on the buffer size reported from a specific device driver of the plurality of device drivers can be secured;
A change process for dynamically changing the buffer size according to a ratio of the throughput of the specific device driver to the throughput of the operation in the entire device driver;
A buffer management method comprising:
前記動作の開始から完了までの処理時間を計測する処理時間計測処理と、
前記処理時間と前記動作の転送データ量とから前記動作のスループットを計算するスループット計算処理と、
前記スループットに基づき次の前記動作で使用するバッファサイズを計算するバッファサイズ計算処理と、
を有することを特徴とする請求項1記載のバッファ管理方法。 The change process is
A processing time measurement process for measuring a processing time from the start to the completion of the operation;
Throughput calculation processing for calculating the throughput of the operation from the processing time and the transfer data amount of the operation;
A buffer size calculation process for calculating a buffer size used in the next operation based on the throughput;
The buffer management method according to claim 1, further comprising:
前記データ処理装置に対してデータの入出力を行う複数の周辺装置と、
前記データ処理装置と前記複数の周辺装置との間で入出力される前記データを一時記憶するバッファと、
前記各周辺装置に対してそれぞれ設けられ、前記データの入出力を制御する複数のデバイスドライバと、
前記デバイスドライバにおける動作のスループットに基づき、前記バッファサイズを管理するバッファ管理部と、
を備えたバッファ管理装置であって、
前記複数のデバイスドライバのうちの特定のデバイスドライバから申告のあった前記バッファサイズに関する情報に応じたバッファサイズが確保できるか否かの初期処理を行い、前記デバイスドライバ全体における動作のスループットに対する前記特定のデバイスドライバのスループットの割合に応じて、動的に前記バッファサイズを変更することを特徴とするバッファ管理装置。 A data processing device for processing data;
A plurality of peripheral devices for inputting / outputting data to / from the data processing device;
A buffer for temporarily storing the data input / output between the data processing device and the plurality of peripheral devices;
A plurality of device drivers that are provided for each of the peripheral devices and control input / output of the data;
A buffer management unit for managing the buffer size based on the operation throughput in the device driver;
A buffer management device comprising:
An initial process is performed to determine whether or not a buffer size corresponding to the information on the buffer size reported from a specific device driver among the plurality of device drivers can be secured, and the specification with respect to the operation throughput of the entire device driver A buffer management apparatus that dynamically changes the buffer size according to a throughput ratio of the device driver.
前記動作の開始から完了までの処理時間を計測する処理時間計測手段と、
前記処理時間と前記動作の転送データ量とから前記動作のスループットを計算するスループット計算手段と、
前記スループットに基づき次の前記動作で使用するバッファサイズを計算するバッファサイズ計算手段と、
を有することを特徴とする請求項5記載のバッファ管理装置。 The buffer management unit
A processing time measuring means for measuring a processing time from the start to the completion of the operation;
Throughput calculating means for calculating the throughput of the operation from the processing time and the transfer data amount of the operation;
Buffer size calculation means for calculating a buffer size to be used in the next operation based on the throughput;
The buffer management device according to claim 5, further comprising:
前記データ処理装置に対してデータの入出力を行う複数の周辺装置と、
前記データ処理装置と前記複数の周辺装置との間で入出力される前記データを一時記憶するバッファと、
前記各周辺装置に対してそれぞれ設けられ、前記データの入出力を制御する複数のデバイスドライバと、
前記デバイスドライバにおける動作のスループットに基づき、前記バッファサイズを管理するバッファ管理部と、
を用いたバッファ管理プログラムであって、
前記複数のデバイスドライバのうちの特定のデバイスドライバから申告のあった前記バッファサイズに関する情報に応じたバッファサイズが確保できるか否かの処理を行う初期処理と、
前記デバイスドライバ全体における動作のスループットに対する前記特定のデバイスドライバのスループットの割合に応じて、動的に前記バッファサイズを変更するバッファサイズの変更処理と、
を機能させるためのバッファ管理プログラム。 A data processing device for processing data;
A plurality of peripheral devices for inputting / outputting data to / from the data processing device;
A buffer for temporarily storing the data input / output between the data processing device and the plurality of peripheral devices;
A plurality of device drivers that are provided for each of the peripheral devices and control input / output of the data;
A buffer management unit for managing the buffer size based on the operation throughput in the device driver;
A buffer management program using
An initial process for performing a process as to whether or not a buffer size according to information on the buffer size reported from a specific device driver of the plurality of device drivers can be secured;
Buffer size change processing that dynamically changes the buffer size according to the ratio of the throughput of the specific device driver to the throughput of operation in the entire device driver;
A buffer management program to make it work.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008302128A JP2010128743A (en) | 2008-11-27 | 2008-11-27 | Buffer management method, buffer management device, and buffer management program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008302128A JP2010128743A (en) | 2008-11-27 | 2008-11-27 | Buffer management method, buffer management device, and buffer management program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010128743A true JP2010128743A (en) | 2010-06-10 |
Family
ID=42329098
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008302128A Pending JP2010128743A (en) | 2008-11-27 | 2008-11-27 | Buffer management method, buffer management device, and buffer management program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010128743A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000293415A (en) * | 1999-04-08 | 2000-10-20 | Fuji Xerox Co Ltd | Storage device |
JP2002108797A (en) * | 2000-09-29 | 2002-04-12 | Hitachi Ltd | System and method for driving recording device |
-
2008
- 2008-11-27 JP JP2008302128A patent/JP2010128743A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000293415A (en) * | 1999-04-08 | 2000-10-20 | Fuji Xerox Co Ltd | Storage device |
JP2002108797A (en) * | 2000-09-29 | 2002-04-12 | Hitachi Ltd | System and method for driving recording device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9274845B2 (en) | Job scheduling apparatus and job scheduling method thereof to assign jobs to a core | |
US10496427B2 (en) | Method for managing memory of virtual machine, physical host, PCIE device and configuration method thereof, and migration management device | |
JP4845522B2 (en) | System bus control device, integrated circuit and data processing system | |
CN112099941A (en) | Method, equipment and system for realizing hardware acceleration processing | |
JP2007257097A (en) | Virtual computer system and method and program for reconfiguring physical resource thereof | |
US20110161965A1 (en) | Job allocation method and apparatus for a multi-core processor | |
EP3224728B1 (en) | Providing shared cache memory allocation control in shared cache memory systems | |
JP5660149B2 (en) | Information processing apparatus, job scheduling method, and job scheduling program | |
JP2015013429A (en) | Image processing apparatus, method for controlling the same, and program | |
TWI465934B (en) | Apparatus, system and method for controlling allocation of computing resources | |
KR20180089273A (en) | Method and apparatus for implementing out-of-order resource allocation | |
JP2012022502A (en) | Print document conversion device and program | |
JPWO2010016169A1 (en) | Multiprocessor system and control method thereof | |
WO2016202153A1 (en) | Gpu resource allocation method and system | |
CN114513545B (en) | Request processing method, device, equipment and medium | |
US20100296520A1 (en) | Dynamic quality of service adjustment across a switching fabric | |
JP4659008B2 (en) | Peripheral circuit with host load adjustment function | |
WO2016085642A1 (en) | Generating approximate usage measurements for shared cache memory systems | |
US20130166794A1 (en) | Interrupt event management | |
JP6201591B2 (en) | Information processing apparatus and information processing apparatus control method | |
CN102945214B (en) | Based on the method for IO distribution optimization time delay interrupt processing task | |
JP2011257972A (en) | Image processing apparatus, program, and image processing method | |
JP2010128743A (en) | Buffer management method, buffer management device, and buffer management program | |
CN102929819B (en) | For the treatment of the method for the interrupt request of the memory device in computer system | |
US20160154603A1 (en) | Data transfer control device, apparatus including the same, and data transfer control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111118 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120928 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121023 |
|
A02 | Decision of refusal |
Effective date: 20130409 Free format text: JAPANESE INTERMEDIATE CODE: A02 |