JP2011192012A - Data processing system and access control method - Google Patents
Data processing system and access control method Download PDFInfo
- Publication number
- JP2011192012A JP2011192012A JP2010057397A JP2010057397A JP2011192012A JP 2011192012 A JP2011192012 A JP 2011192012A JP 2010057397 A JP2010057397 A JP 2010057397A JP 2010057397 A JP2010057397 A JP 2010057397A JP 2011192012 A JP2011192012 A JP 2011192012A
- Authority
- JP
- Japan
- Prior art keywords
- data
- area
- pointer
- value
- counter register
- 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 data processing system and an access control method, and more particularly to control for accessing a memory using a data structure (hereinafter simply referred to as a structure) in a data processing system having a data processor and a memory.
近年、コンピュータ分野だけでなく、組み込みマイコンを使用した電子機器においても、C言語等の高級言語によるソフトウェア開発が一般的に行われている。高級言語によるソフトウェア開発において、構造体やポインタの使用は開発効率や品質を向上させる上で重要である。 In recent years, not only in the computer field, but also in electronic devices using embedded microcomputers, software development using high-level languages such as C language is generally performed. In software development using a high-level language, the use of structures and pointers is important for improving development efficiency and quality.
例えば、図1に示すように、構造体とポインタを用いたデータ構造がメモリ上に存在する場合を考える。構造体中にはポインタ変数がメンバとして存在するので、そのポインタが指す幾つかのメモリアドレスを手繰り、最後に実際のデータにたどり着く。この場合、実際のデータにアクセスするためには、構造体にアクセス後、ポインタの段数分のメモリアクセス回数が必要になる。そのため、実際のデータにアクセスできるまでに、多くの時間がかかり、これによる性能低下が問題となることがある。 For example, consider a case where a data structure using a structure and a pointer exists in a memory as shown in FIG. Since a pointer variable exists as a member in the structure, several memory addresses pointed to by the pointer are processed, and finally the actual data is reached. In this case, in order to access the actual data, the number of memory accesses corresponding to the number of stages of the pointer is required after accessing the structure. Therefore, it takes a long time to access the actual data, and this may cause a problem of performance degradation.
この問題を解決する1つの方法として、データを使用する側が高速にアクセスできるハードウェアキャッシュを備えることもできるが、ハードウェアコストが多くかかるという問題がある。
なお、ポインタを用いたメモリ構造体の例としては、特許文献1に開示されたものが知られ、また、データキャッシュの例としては、特許文献1に開示のものが知られている。
One way to solve this problem is to provide a hardware cache that can be accessed at high speed by the data user, but there is a problem that the hardware cost is high.
As an example of a memory structure using a pointer, one disclosed in Patent Document 1 is known, and as an example of a data cache, one disclosed in Patent Document 1 is known.
上記のように、ポインタを用いたデータ構造では、データにアクセスするために複数回のメモリアクセスが必要となるため、多くの時間を要し、コンピュータシステムの性能が低下する。
そこで、本発明の目的は、データ構造体を用いたデータ処理システムにおいて、メモリ内のデータに高速にアクセスすることにある。
As described above, the data structure using the pointer requires a plurality of memory accesses in order to access the data. Therefore, it takes a lot of time and the performance of the computer system is deteriorated.
Therefore, an object of the present invention is to access data in a memory at high speed in a data processing system using a data structure.
本発明に係るコンピュータシステムは、好ましくは、構造体が持つポインタを用いて、記憶部内のデータをアクセスすることができるコンピュータシステムにおいて、
該記憶部は、複数の該構造体を記憶する構造体領域と、データを記憶するデータ領域を有し、
該ポインタが指すデータ領域内のあるデータが変更されたときに、その値が更新されるカウンタレジスタを備えると共に、
データ領域に記憶されたデータを指定するポインタと、該ポインタを用いてアクセスされた該データ領域にあるデータを一時的に保持するデータキャッシュ領域と、該カウンタレジスタの値が更新される度に該カウンタレジスタの値を保持するカウンタ値を有する該構造体を備え、
該記憶部内のデータにアクセスする時に、該カウンタレジスタの内容と該構造体の該カウンタ値を照合し、該照合の結果に応じて、該構造体内の該データキャッシュ領域又は該ポインタによって指定されるデータ領域のデータにアクセスすることを特徴とするデータ処理システムとして構成される。
The computer system according to the present invention is preferably a computer system that can access data in a storage unit using a pointer held by a structure.
The storage unit includes a structure area that stores a plurality of the structures and a data area that stores data.
A counter register whose value is updated when certain data in the data area pointed to by the pointer is changed;
A pointer that specifies data stored in the data area, a data cache area that temporarily holds data in the data area accessed using the pointer, and a counter register value that is updated each time the value of the counter register is updated Comprising the structure having a counter value holding a value of a counter register;
When accessing the data in the storage unit, the contents of the counter register and the counter value of the structure are collated, and specified by the data cache area or the pointer in the structure according to the result of the collation The data processing system is characterized by accessing data in the data area.
好ましい例においては、該記憶部内のデータにアクセスする時に、該カウンタレジスタの内容と該構造体の該カウンタ値を照合して、照合の結果、両者が一致する場合には、該構造体内の該データキャッシュ領域内に記憶されたデータを使用し、不一致の場合には、該ポインタによって指定されるデータ領域内のデータを使用する。
また、好ましくは、該ポインタを用いてデータ領域内のデータをアクセスした場合、取得された該データを該データキャッシュ領域に保持し、かつ該カウンタレジスタの値を該構造体の該カウンタ値に保存する。
また、好ましくは、該構造体は、該データキャッシュ領域に保持されたデータが有効又は無効であることを示すフラグを有し、該ポインタが指定する該データ領域のデータが変更された場合、該フラグを無効の状態にする。
また、好ましくは、複数の該構造体が記憶される構造体領域のエントリ数が該カウンタレジスタによって表される最大値よりも大きい場合、該カウンタレジスタの値が一周する前に全ての該エントリを無効化するように、一定の複数ずつの構造体の該フラグを無効の状態にセットする。
In a preferred example, when accessing the data in the storage unit, the contents of the counter register are compared with the counter value of the structure. The data stored in the data cache area is used, and if there is a mismatch, the data in the data area specified by the pointer is used.
Preferably, when the data in the data area is accessed using the pointer, the acquired data is stored in the data cache area, and the value of the counter register is stored in the counter value of the structure. To do.
Preferably, the structure has a flag indicating that the data held in the data cache area is valid or invalid, and the data area specified by the pointer is changed when the data area is changed. Set the flag to an invalid state.
Preferably, when the number of entries in the structure area in which a plurality of the structures are stored is larger than the maximum value represented by the counter register, all the entries are deleted before the counter register makes one round. In order to invalidate, the flag of a certain plurality of structures is set to an invalid state.
また、好ましい例では、該コンピュータシステムは、ネットワークに接続されるネットワークカードと、データ処理するCPUと、前記構造体領域及び前記データ領域を有するメインメモリを有し、
前記構造体は、複数の送信相手のそれぞれに対応した制御情報を保持し、
前記カウンタレジスタは、該ネットワークカード内に設けられ、
前記データ領域は各送信相手に対する経路情報を記憶し、かつ、前記データキャッシュ領域は、ポインタで指定されたデータ領域内の該経路情報を保持し、
ある送信相手へデータを送信する場合、該ネットワークカードは該送信相手に対する制御情報の構造体を、DMA転送で該メインメモリ内の構造体領域から読み出し、さらに該データキャッシュ領域又は該構造体内の該ポインタを用いて、DMA転送で該データ領域から経路情報を読み出す。
In a preferred example, the computer system includes a network card connected to a network, a CPU for processing data, and a main memory having the structure area and the data area.
The structure holds control information corresponding to each of a plurality of transmission partners,
The counter register is provided in the network card;
The data area stores path information for each transmission partner, and the data cache area holds the path information in the data area designated by the pointer,
When transmitting data to a transmission partner, the network card reads the structure of control information for the transmission partner from the structure area in the main memory by DMA transfer, and further, the data cache area or the structure in the structure. Using the pointer, the path information is read from the data area by DMA transfer.
また、好ましい例では、データを記憶する外部低速記録媒体が接続され、かつデータ処理するCPUと、該データ領域及び該構造体領域を持つメモリを有するコンピュータシステムであって、前記ポインタは該外部低速記録媒体に記憶されるデータを指定し、かつ前記データキャッシュ領域は、該外部低速記録媒体に記憶されるデータを保持する。 In a preferred example, the external low-speed recording medium for storing data is connected, and the computer system has a CPU for processing data and a memory having the data area and the structure area, and the pointer is the external low-speed recording medium. The data stored in the recording medium is designated, and the data cache area holds the data stored in the external low-speed recording medium.
本発明に係るアクセス制御方法は、好ましくは、複数の該構造体を記憶する構造体領域と、データを記憶するデータ領域を有する記憶部内のデータに、構造体が持つポインタを用いてアクセスすることができるアクセス制御方法であって、
該構造体は、データ領域に記憶されたデータを指定するポインタと、該ポインタを用いてアクセスされた該データ領域にあるデータを一時的に保持するデータキャッシュ領域を有し、
該記憶部をアクセスする時に、該構造体の該データキャッシュ領域に記憶されたデータが有効であれば、該データキャッシュ領域より該データを得、
該構造体の該データキャッシュ領域に記憶されたデータが有効でなければ、該ポインタを用いて該データ領域をアクセスしてデータを得ることを特徴とするアクセス制御方法として構成される。
In the access control method according to the present invention, preferably, data in a storage unit having a structure area for storing a plurality of the structures and a data area for storing data is accessed using a pointer of the structure. An access control method that can
The structure has a pointer that specifies data stored in the data area, and a data cache area that temporarily holds data in the data area accessed using the pointer,
If the data stored in the data cache area of the structure is valid when accessing the storage unit, the data is obtained from the data cache area,
If the data stored in the data cache area of the structure is not valid, the access control method is configured to obtain data by accessing the data area using the pointer.
好ましい例によれば、本発明のアクセス制御方法は、複数の該構造体を記憶する構造体領域と、データを記憶するデータ領域を有する記憶部内のデータに、構造体が持つポインタを用いてアクセスするアクセス制御方法であって、
該構造体は、データ領域に記憶されたデータを指定するポインタと、該ポインタを用いてアクセスされた該データ領域にあるデータを一時的に保持するデータキャッシュ領域と、該カウンタレジスタの値が更新される度に該カウンタレジスタの値を保持するカウンタ値を有し、
該記憶部内のデータにアクセスする時に、該ポインタが指すデータ領域内のあるデータが変更されたときにその値が更新される該カウンタレジスタの内容と、該構造体の該カウンタ値を照合し、該照合の結果に応じて、該構造体内の該データキャッシュ領域又は該ポインタによって指定されるデータ領域のデータにアクセスすることを特徴とするアクセス制御方法である。
According to a preferred example, the access control method of the present invention accesses a data in a storage unit having a structure area for storing a plurality of the structures and a data area for storing data using a pointer of the structure. An access control method,
The structure includes a pointer for designating data stored in the data area, a data cache area for temporarily holding data in the data area accessed using the pointer, and a value of the counter register updated. A counter value that holds the value of the counter register each time
When accessing data in the storage unit, the contents of the counter register, whose value is updated when some data in the data area pointed to by the pointer is changed, are compared with the counter value of the structure; According to the result of the collation, the access control method is characterized in that the data in the data cache area in the structure or the data area specified by the pointer is accessed.
本発明によれば、ポインタを備えたデータ構造を用いてメモリ内のデータに高速にアクセスすることが可能となる。 According to the present invention, data in a memory can be accessed at high speed using a data structure having a pointer.
以下、図面を用いて本発明の実施例を具体的に説明する。 Embodiments of the present invention will be specifically described below with reference to the drawings.
図2は、データ構造体の構成とその配列、及びキャッシュの制御を示す。
コンピュータシステムにおけるメインメモリ等の記憶ユニットに、複数の構造体を格納する構造体領域21と、構造体のポインタによるアクセス先となるデータを格納するデータ領域22が確保される。複数の各構造体210は例えば送信先ごとに用意される。
各構造体210は、データが格納されたアドレスを示すポインタ211、アクセスされたデータ領域のデータを保持するデータキャッシュ領域213、そのキャッシュデータが有効であることを示すVビット212、カウンタ値214の各フィールドを有する。各構造体210は例えば64バイトのように同じ固定長の記憶容量を持つ。また、データキャッシュ領域213の記憶容量は一律に例えば16バイトの如きである。
FIG. 2 shows the structure of the data structure, its arrangement, and cache control.
In a storage unit such as a main memory in the computer system, a
Each
最初(1回目)、構造体210内にデータが存在しない場合、構造体のポインタ211を使用して、そのポインタで指定されるデータ領域22内のアドレスのデータを取得する。その取得したデータをデータキャッシュ領域213のフィールドに保存する。これにより2回目以降のデータのアクセスは、ポインタを使用せずに、構造体210内のキャッシュ領域213このフィールドからデータを読めばよいことになる。
Vビット212は、データキャッシュ領域213のデータが有効か否かを表す。即ち、実際のデータをデータキャッシュ領域213に保存するときに、Vビットを「1」とし、また、実際のデータが変更された場合などの理由でデータキャッシュ領域213の内容を無効にしたいときにVビットを「0」とする。
First (first time), when data does not exist in the
The
構造体内のデータを読む側例えばプロセッサには、高速にアクセスできるカウンタレジスタ24が用意される。カウンタ値214とカウンタレジスタ24とは、構造体内のデータキャッシュ領域213の値と、ポインタ211が実際に指すメモリアドレスに対応するデータ領域22内のデータとの一貫性を保つために必要となるものである。そのため、カウンタ値214とカウンタレジスタ24の内容を比較する比較器25が用いられる。比較器25はハードウェアで構成するか或いはソフトウェアで用意してもよい。
ポインタが指すメモリアドレスに存在する実際のデータを変更した際、構造体210内のデータキャッシュ213の値は、古い値となり、そのデータは使ってはいけないことになる。そのため、構造体内のVビット212を「0」にして、データキャッシュ213の内容を無効にする。
A
When actual data existing at the memory address pointed to by the pointer is changed, the value of the
次に、データ領域22内のデータとデータキャッシュ領域213内のデータの一貫性保持の制御、及びVビット212の無効化制御について説明する。
Vビット212の無効化制御は、メモリ内に多数の構造体210が配列して存在している場合、それら全ての構造体210の要素である全てのVビット212を「0」に書き換えることで行われる。しかし、全てのVビットに「0」を書き込むには時間がかかり、コンピュータシステムの性能低下を招く。その対策として、データ領域22の変更した実際のデータをキャッシュしている構造体のみのVビットを「0」に書き換えることも考えられるが、全要素のポインタを手繰る必要があり、ポインタの段数が多い場合には現実的でない。
Next, control for maintaining consistency between data in the
The invalidation control of the
本実施例では、カウンタ値214を用いて性能の低下を回避する。その方法について以下説明する。ポインタ211が指すメモリアドレスに存在する実際のデータを読み、データキャッシュ領域213にそのデータを保存するときに、カウンタレジスタ24の値を構造体210内のカウンタ値214に保存する。また、ポインタが指すデータ領域22内のメモリアドレスに存在する実際のデータが変更したときには、カウンタレジスタ24の値がインクリメントされる。構造体21のデータキャッシュ領域213内のデータを用いる場合には、構造体内のカウンタ値214とカウンタレジスタ24の値を比較器25で比較し、その結果両者が一致した場合には、データキャッシュ領域内のデータは最新であると判断して、データキャッシュ領域内のデータを使用する。
In the present embodiment, the
比較の結果、両者が一致しない場合には、データキャッシュ領域213内のデータは古いとみなし、ポインタ211を使ってデータ領域22から最新のデータを読み込み、そのデータを使用する。そして、以後のデータの使用のために、最新のデータをデータキャッシュ領域213に保存し、そのときのカウンタレジスタ24の値を構造体内のカウンタ値214に保存する。これにより、ポインタが指すメモリアドレスに存在する実際のデータを変更した際に、構造体内のデータを無効化する必要はない。
If they do not match as a result of the comparison, the data in the
しかし、データ領域22のデータの変更回数が多い場合、カウンタのラップが起こり、構造体内のデータキャッシュが古いにも拘らず、構造体内のカウンタ値214とカウンタレジスタ24の値が等しくなってしまうことがあり得る。例えば、カウンタのビット幅が5ビットの場合、カウンタ値は32通りなので、33回目のカウント値は一周して「0」に戻るので、前回の「0」なのか、一周した後の「0」(実際には33に相当している)なのか、不明になり、Vビットの無効化制御が混乱する。
However, when the number of data changes in the
そこで、カウンタレジスタ24の値が一周する前に、複数全ての構造体210内のデータキャッシュ領域213を無効にするように制御すればよい。つまり、実際のデータを更新した場合に更新した側が複数のVビットを「0」にするように制御する。
例えば、カウンタレジスタのビット幅が5ビット、構造体のエントリ数が256の場合、32通りのカウンタ値が一周する時点で全エントリを無効化制御する。図3に示すように、256/32=8エントリを1回の更新で無効化制御する。これにより1回の更新で全て構造体のVビットを「0」に書き換えて、データキャッシュ領域内のデータを無効化する必要がなくなり、性能の低下を防ぐことができる。
Therefore, control may be performed so that the
For example, when the bit width of the counter register is 5 bits and the number of structure entries is 256, all entries are controlled to be invalidated when 32 counter values go around. As shown in FIG. 3, 256/32 = 8 entries are invalidated by one update. As a result, it is not necessary to rewrite the V bits of all structures to “0” in one update and invalidate the data in the data cache area, thereby preventing performance degradation.
図4を参照して、コンピュータシステムにおける構造体のメモリアクセス制御について説明する。
このコンピュータシステム4は、データ処理するCPU41と、CPUにバスにより接続されるメインメモリ42と、CPUにチップセット43を介して接続されるネットワークカード44を有して構成される。ネットワークカード44はネットワーク9に接続される。メインメモリ42には、図2に示すような、複数の構造体21及びデータ領域22が形成される。ネットワークカード44内のコントローラLSI内にはハードウェアとしてカウンタレジスタ45が用意される。
図中の点線(矢印)はDMA書き込み、DMA読み出しのルートを表す。これらは、CPU41をルートとして通るが、CPUに内蔵されたメモリコントローラが処理を行うため、CPU中の命令がDMA処理により阻害されることはない。
With reference to FIG. 4, the memory access control of the structure in the computer system will be described.
The computer system 4 includes a
The dotted lines (arrows) in the figure represent the DMA write and DMA read routes. These pass through the
図5も参照して、構造体21について説明する。ネットワークカード44においてネットワーク9へ送信する場合の、送信相手に関する制御情報が構造体21として用意される。通常、複数の送信相手が存在するので、それらの送信相手に対応して複数のエントリ分の構造体が保持される。各送信相手に対する経路情報は、制御情報を保持する構造体とは別に管理される、メインメモリ42のデータ領域22に格納されている。ポインタ211は、その経路情報が格納されているデータ領域22のアドレスを指している。
ある送信相手へデータを送信する場合、ネットワークカード44はその送信相手に対する制御情報の構造体21を、DMA転送でメインメモリ42から読み出し、さらにその構造体内のポインタ211を用いて、DMA転送でメインメモリ42のデータ領域22から経路情報を読み出す必要がある。ここで、構造体21のデータキャッシュ領域213に経路情報を保持しておき、制御情報の構造体を読む時に、経路情報も高速にアクセスできるようにする。これにより、送信時に経路情報を読む時間を短縮することができ、送信動作の高速化が図れる。
The
When transmitting data to a transmission partner, the
次に図6を参照して、図5のコンピュータシステムにおけるCPU41が経路情報を変更する場合の処理動作について説明する。
メインメモリ42のデータ領域22内に記憶されている経路情報が更新されると(S602)、ネットワークカード44内のカウンタレジスタ45がインクリメントされる(S603)。次に、幾つかの構造体21中のVビットを「0」にしてキャッシュを無効化する(S604)。この無効化制御の動作は前述した通りである。その後、経路情報の更新処理を終了する(S605)。
Next, a processing operation when the
When the path information stored in the
次に、図7を参照して、ネットワークカードが経路情報を使用する場合の処理について説明する。
経路情報の使用処理が開始されると(S701)、メインメモリ42から制御情報の構造体210をDMA転送で読み出す(S702)。そして、Vビットをチェックした結果、Vビットが「1」であり、かつ、構造体内のカウンタ値214とネットワークカード44内のカウンタレジスタ45の値を比較して、両者の値が一致したら、データキャッシュ領域213内データを最新と見なして、データキャッシュ領域内のデータ(経路情報)を使用する(S704)。
Next, with reference to FIG. 7, a process when the network card uses route information will be described.
When the path information use process is started (S701), the
一方、Vビットが「1」でなく、上記比較の結果、両者が一致しない場合には、データキャッシュ領域内のデータ(経路情報)は最新でないため、構造体210内のポインタ211を使用して、当該ポインタが示すメインメモリ42のデータ領域22のアドレスに記憶されたデータをDMA転送で読み出してそれを使用する(S705)。その場合、最新の経路情報は、構造体210内のデータキャッシュ領域213に保管し、同時にそのときのカウンタレジスタ45の値を構造体210内のカウンタ値214にコピーする。併せてVビットを「1」にする(S706)。その後、使用したその構造体210を、DMA転送でメインメモリ42に書き戻す(S707)。
On the other hand, if the V bit is not “1” and the result of the comparison is that they do not match, the data (path information) in the data cache area is not up-to-date, so the
図8及び9を参照して、外部低速媒体を用いたデータ処理システムにおけるデータの書き込み及び読み出しの例について説明する。
最近、SDカードや光学ドライブなどの外部低速媒体の大容量化が進み、これまでのようなHDD(ハードディスクドライブ)にOS(オペレーティングシステム)を入れるだけでなく、外部低速媒体にOSを入れて、外部低速媒体から起動することが提唱されている。
An example of data writing and reading in a data processing system using an external low-speed medium will be described with reference to FIGS.
Recently, the capacity of external low-speed media such as SD cards and optical drives has been increased, and not only OS (operating system) is put in HDD (hard disk drive) like before, but also OS is put in external low-speed media, It has been proposed to start from an external low-speed medium.
例えば、図8に示すように、CPU81とメモリ(メインメモリ)82を有するマイクロプロセッサのようなコンピュータ80と、外部低速記録媒体88とが接続されたコンピュータシステムにおいて、メモリ82内に複数の構造体821を持つ。この場合、低速記憶媒体にあるポインタをたどっていくと、同じ低速記録媒体88にデータが存在し、そのデータをアクセスする際、CPU81がメモリ82にアクセスするのに比べて、非常に遅くなってしまう。
For example, in a computer system in which a
本発明は、ポインタと、外部低速媒体88中のデータを保管するキャッシュ領域と、当該キャッシュ領域のデータの有効、無効を示すVビットと、データが最新であるかどうかを示すカウンタ値を1つの構造体として構成し、この構造体をコンピュータ80内のメモリ82の一部に保持することによって、外部低速媒体に対するアクセスの高速化を可能とする。
The present invention provides a pointer, a cache area for storing data in the external low-
以下、図8及び図9を参照して、データの書込み及び読出しの動作について説明する。
図8に示すように、データ書き込み時はCPU81が外部低速媒体に直接データを書き込む(S801)。この時、メモリ82内のキャッシュデータと外部低速媒体88中のデータは異なり、それに対応するポインタのキャッシュデータは正しいデータではなくなるため、メモリ82内キャッシュデータを使わないようにしなければならない。このような場合、CPU81とメモリ82で構成されたソフトウェアカウンタ85をインクリメントして、最新のキャッシュでないことを表す(S802)。
そして、ソフトウェアカウンタ85がオーバーフローし、ラップアラウンドするため、最新のデータがキャッシュされていないにも拘らず、最新であると判定される場合がある。そのため、ソフトウェアカウンタがラップアラウンドするまでに構造体の全エントリのVビットが無効と判定されていれば上記のケースがなくなる。これより、全エントリ/ソフトウェアカウンタの最大値+1の分だけ構造体のVビットを無効とする(S803)。
Hereinafter, data writing and reading operations will be described with reference to FIGS.
As shown in FIG. 8, when writing data, the
Since the
次に、図9のように、ポインタに対応するデータ読み込み時に、必要なポインタの構造体にキャッシュされているデータが最新かどうかを判定するために、Vビットが有効(1である)であり、かつ構造体の中のカウンタ値とソフトウェアカウンタ85の値を比較して両者が一致するかをチェックする(S804)。チェックの結果、両者が一致した場合、最新の正しいデータがこの構造体にキャッシュされていると判断して、キャッシュされているデータを読み出す(S805)。
Next, as shown in FIG. 9, the V bit is valid (is 1) in order to determine whether or not the data cached in the necessary pointer structure is the latest when reading the data corresponding to the pointer. In addition, the counter value in the structure and the value of the
一方、構造体のVビットが無効(0である)であり、または構造体の中のカウンタ値とソフトウェアカウンタの値とが一致しない場合、最新のデータがその構造体にないと判断して、構造体にあるポインタをたどって低速記録媒体からデータを読み出す(S805´)。
そして、低速記録媒体からデータを読み出した後、読み出したデータをキャッシュし、次回同じデータを読み出すようにする。そのために、読み出したデータを構造体のキャッシュにコピーし、ソフトウェアカウンタの値を構造体のカウンタ値にコピーする。そしてVビットを有効にする(S806´)。
On the other hand, if the V bit of the structure is invalid (it is 0) or the counter value in the structure and the value of the software counter do not match, it is determined that the latest data is not in the structure, Following the pointer in the structure, data is read from the low-speed recording medium (S805 ').
Then, after reading data from the low-speed recording medium, the read data is cached and the same data is read next time. For this purpose, the read data is copied to the structure cache, and the software counter value is copied to the structure counter value. Then, the V bit is validated (S806 ′).
21,210:構造体 22:データ領域 211:ポインタ
212:Vビット 213:データキャッシュ領域 214:カウンタ値
24:カウンタレジスタ 25:比較器
4:コンピュータシステム 41:CPU 42:メインメモリ
43:チップセット 44:ネットワークカード 45:カウンタレジスタ。
21, 210: Structure 22: Data area 211: Pointer
212: V bit 213: Data cache area 214: Counter value 24: Counter register 25: Comparator 4: Computer system 41: CPU 42: Main memory
43: Chipset 44: Network card 45: Counter register.
Claims (10)
該記憶部は、複数の該構造体を記憶する構造体領域と、データを記憶するデータ領域を有し、
該ポインタが指すデータ領域内のあるデータが変更されたときに、その値が更新されるカウンタレジスタを備えると共に、
データ領域に記憶されたデータを指定するポインタと、該ポインタを用いてアクセスされた該データ領域にあるデータを一時的に保持するデータキャッシュ領域と、該カウンタレジスタの値が更新される度に該カウンタレジスタの値を保持するカウンタ値を有する該構造体を備え、
該記憶部内のデータにアクセスする時に、該カウンタレジスタの内容と該構造体の該カウンタ値を照合し、該照合の結果に応じて、該構造体内の該データキャッシュ領域又は該ポインタによって指定されるデータ領域のデータにアクセスすることを特徴とするデータ処理システム。 In a computer system that can access data in a storage unit using a pointer of a structure,
The storage unit includes a structure area that stores a plurality of the structures and a data area that stores data.
A counter register whose value is updated when certain data in the data area pointed to by the pointer is changed;
A pointer that specifies data stored in the data area, a data cache area that temporarily holds data in the data area accessed using the pointer, and a counter register value that is updated each time the value of the counter register is updated Comprising the structure having a counter value holding a value of a counter register;
When accessing the data in the storage unit, the contents of the counter register and the counter value of the structure are collated, and specified by the data cache area or the pointer in the structure according to the result of the collation A data processing system for accessing data in a data area.
前記構造体は、複数の送信相手のそれぞれに対応した制御情報を保持し、
前記カウンタレジスタは、該ネットワークカード内に設けられ、
前記データ領域は各送信相手に対する経路情報を記憶し、かつ、前記データキャッシュ領域は、ポインタで指定されたデータ領域内の該経路情報を保持し、
ある送信相手へデータを送信する場合、該ネットワークカードは該送信相手に対する制御情報の構造体を、DMA転送で該メインメモリ内の構造体領域から読み出し、さらに該データキャッシュ領域又は該構造体内の該ポインタを用いて、DMA転送で該データ領域から経路情報を読み出すことを特徴とする請求項1乃至5のいずれかの項記載のデータ処理システム。 The computer system includes a network card connected to a network, a CPU for data processing, and a main memory having the structure area and the data area,
The structure holds control information corresponding to each of a plurality of transmission partners,
The counter register is provided in the network card;
The data area stores path information for each transmission partner, and the data cache area holds the path information in the data area designated by the pointer,
When transmitting data to a transmission partner, the network card reads the structure of control information for the transmission partner from the structure area in the main memory by DMA transfer, and further, the data cache area or the structure in the structure. 6. The data processing system according to claim 1, wherein path information is read from the data area by DMA transfer using a pointer.
該構造体は、データ領域に記憶されたデータを指定するポインタと、該ポインタを用いてアクセスされた該データ領域にあるデータを一時的に保持するデータキャッシュ領域を有し、
該記憶部をアクセスする時に、該構造体の該データキャッシュ領域に記憶されたデータが有効であれば、該データキャッシュ領域より該データを得、
該構造体の該データキャッシュ領域に記憶されたデータが有効でなければ、該ポインタを用いて該データ領域をアクセスしてデータを得ることを特徴とするアクセス制御方法。 An access control method capable of accessing data in a storage unit having a structure area for storing a plurality of the structures and a data area for storing data using a pointer of the structure,
The structure has a pointer that specifies data stored in the data area, and a data cache area that temporarily holds data in the data area accessed using the pointer,
If the data stored in the data cache area of the structure is valid when accessing the storage unit, the data is obtained from the data cache area,
An access control method comprising: obtaining data by accessing the data area using the pointer if the data stored in the data cache area of the structure is not valid.
該構造体は、データ領域に記憶されたデータを指定するポインタと、該ポインタを用いてアクセスされた該データ領域にあるデータを一時的に保持するデータキャッシュ領域と、該カウンタレジスタの値が更新される度に該カウンタレジスタの値を保持するカウンタ値を有し、
該記憶部内のデータにアクセスする時に、該ポインタが指すデータ領域内のあるデータが変更されたときにその値が更新される該カウンタレジスタの内容と、該構造体の該カウンタ値を照合し、該照合の結果に応じて、該構造体内の該データキャッシュ領域又は該ポインタによって指定されるデータ領域のデータにアクセスすることを特徴とするアクセス制御方法。 An access control method for accessing data in a storage unit having a structure area for storing a plurality of the structures and a data area for storing data using a pointer of the structure,
The structure includes a pointer for designating data stored in the data area, a data cache area for temporarily holding data in the data area accessed using the pointer, and a value of the counter register updated. A counter value that holds the value of the counter register each time
When accessing data in the storage unit, the contents of the counter register, whose value is updated when some data in the data area pointed to by the pointer is changed, are compared with the counter value of the structure; An access control method comprising: accessing data in the data cache area or the data area designated by the pointer in the structure according to the result of the collation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010057397A JP2011192012A (en) | 2010-03-15 | 2010-03-15 | Data processing system and access control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010057397A JP2011192012A (en) | 2010-03-15 | 2010-03-15 | Data processing system and access control method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011192012A true JP2011192012A (en) | 2011-09-29 |
Family
ID=44796852
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010057397A Pending JP2011192012A (en) | 2010-03-15 | 2010-03-15 | Data processing system and access control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011192012A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023184285A1 (en) * | 2022-03-30 | 2023-10-05 | 华为技术有限公司 | Data transmission method and apparatus |
-
2010
- 2010-03-15 JP JP2010057397A patent/JP2011192012A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023184285A1 (en) * | 2022-03-30 | 2023-10-05 | 华为技术有限公司 | Data transmission method and apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2016499B1 (en) | Migrating data that is subject to access by input/output devices | |
US8131945B2 (en) | Disowning cache entries on aging out of the entry | |
US20110173400A1 (en) | Buffer memory device, memory system, and data transfer method | |
US10997078B2 (en) | Method, apparatus, and non-transitory readable medium for accessing non-volatile memory | |
US10860481B2 (en) | Data recovery method, data recovery system, and computer program product | |
US20160179671A1 (en) | Mirroring a cache having a modified cache state | |
JP5583274B2 (en) | Method for managing computer memory, corresponding computer program product, and data storage device therefor | |
US8352646B2 (en) | Direct access to cache memory | |
WO2012137098A1 (en) | Extending cache for an external storage system into individual servers | |
JP2000227878A (en) | Data managing method for asynchronous i/o cache memory | |
JP2007048296A (en) | Method, apparatus and system for invalidating multiple address cache entries | |
US20130042068A1 (en) | Shadow registers for least recently used data in cache | |
JP2011022926A (en) | Data storage device and cache control method | |
US7577791B2 (en) | Virtualized load buffers | |
JP4113524B2 (en) | Cache memory system and control method thereof | |
JP4666511B2 (en) | Memory caching in data processing | |
US10489300B1 (en) | Increasing caching efficiency using cache data patterns | |
US10649902B2 (en) | Reducing translation latency within a memory management unit using external caching structures | |
JP2011192012A (en) | Data processing system and access control method | |
EP3136245A1 (en) | Computer | |
US20130173862A1 (en) | Method for cleaning cache of processor and associated processor | |
JP3335919B2 (en) | Disk cache controller | |
JP2976867B2 (en) | I / O buffer device and management method thereof | |
JP3260566B2 (en) | Storage control method and storage control device in information processing system | |
JP2001229074A (en) | Memory controller and information processor and memory control chip |