JP6818962B2 - Memory history management system - Google Patents
Memory history management system Download PDFInfo
- Publication number
- JP6818962B2 JP6818962B2 JP2020549909A JP2020549909A JP6818962B2 JP 6818962 B2 JP6818962 B2 JP 6818962B2 JP 2020549909 A JP2020549909 A JP 2020549909A JP 2020549909 A JP2020549909 A JP 2020549909A JP 6818962 B2 JP6818962 B2 JP 6818962B2
- Authority
- JP
- Japan
- Prior art keywords
- history
- memory
- history information
- data value
- entry
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0893—Caches characterised by their organisation or structure
- G06F12/0895—Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Hardware Design (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Memory System (AREA)
- Debugging And Monitoring (AREA)
Description
本発明は、メインメモリの過去の状態を再現するためのシステムに関するものである。 The present invention relates to a system for reproducing the past state of the main memory.
メインメモリの過去の状態を再現する各種のシステムが存在する。
例えば、特許文献1には、次のようなシステムが開示されている。
システムバスに対して発行されるコマンドが監視される。また、キャッシュメモリがバススヌープ機能を備える。キャッシュメモリの更新が発生すると、更新前のデータが記憶部に格納される。そして、記憶部に格納されたデータがメインメモリに書き戻されることにより、メインメモリがチェックポイント時の状態に戻される。There are various systems that reproduce the past state of main memory.
For example,
Commands issued to the system bus are monitored. In addition, the cache memory has a bus snoop function. When the cache memory is updated, the data before the update is stored in the storage unit. Then, the data stored in the storage unit is written back to the main memory, so that the main memory is returned to the state at the time of checkpoint.
特許文献1に開示されたシステムにおいて、バスコマンドに更新前のデータが含まれない場合には、更新前のデータを記憶部に格納するために、更新前のデータをメインメモリから読み出す必要がある。
In the system disclosed in
本発明は、データ値を含んだ履歴情報を記録するためにメインメモリからデータ値を読み出す、という処理を不要にすることを目的とする。 An object of the present invention is to eliminate the need for a process of reading a data value from a main memory in order to record history information including the data value.
本発明のメモリ履歴管理システムは、1つ以上のアクセス命令が発生する前のメインメモリの状態を再現するために、キャッシュミス時に前記メインメモリからキャッシュメモリへ読み込まれるデータ値を利用することによって、1つ以上の履歴情報を管理する。
前記キャッシュメモリは、前記メインメモリの中の複数の記憶領域に対応する複数のエントリを有する。
それぞれのエントリは、記録フラグを有する。
前記メモリ履歴管理システムは、
前記1つ以上の履歴情報が記録される履歴メモリと、
ライト命令が発生したときに、発生したライト命令の対象となる記憶領域である対象領域に対応するエントリの記録フラグを参照し、参照された記録フラグが、履歴情報の未記録を意味する未記録状態値を示す場合に、前記対象領域から前記キャッシュメモリへ読み込まれたデータ値を含む履歴情報を前記履歴メモリに記録し、且つ、参照された記録フラグに、履歴情報の記録済みを意味する記録済み状態値を設定する履歴記録回路と、を備える。The memory history management system of the present invention uses the data value read from the main memory to the cache memory at the time of a cache miss in order to reproduce the state of the main memory before the occurrence of one or more access instructions. Manage one or more history information.
The cache memory has a plurality of entries corresponding to a plurality of storage areas in the main memory.
Each entry has a record flag.
The memory history management system
A history memory in which one or more of the history information is recorded, and
When a write instruction is generated, the record flag of the entry corresponding to the target area that is the target storage area of the generated write instruction is referred to, and the referenced record flag is unrecorded, which means that the history information has not been recorded. When indicating a state value, history information including a data value read from the target area to the cache memory is recorded in the history memory, and a record indicating that the history information has been recorded is recorded in the referenced recording flag. It is provided with a history recording circuit for setting a completed state value.
本発明によれば、キャッシュミス時にメインメモリから読み込まれるデータ値が利用される。そのため、データ値を含んだ履歴情報を記録するためにメインメモリからデータ値を読み出す、という処理を不要にすることが可能となる。 According to the present invention, the data value read from the main memory at the time of a cache miss is used. Therefore, it is possible to eliminate the process of reading the data value from the main memory in order to record the history information including the data value.
実施の形態および図面において、同じ要素または対応する要素には同じ符号を付している。説明した要素と同じ符号が付された要素の説明は適宜に省略または簡略化する。図中の矢印はデータの流れ又は処理の流れを主に示している。 In embodiments and drawings, the same or corresponding elements are designated by the same reference numerals. Descriptions of elements with the same reference numerals as the described elements will be omitted or simplified as appropriate. The arrows in the figure mainly indicate the flow of data or the flow of processing.
実施の形態1.
メモリ履歴管理システム100について、図1から図24に基づいて説明する。
The memory history management system 100 will be described with reference to FIGS. 1 to 24.
***構成の説明***
図1に基づいて、メモリ履歴管理システム100の構成を説明する。
メモリ履歴管理システム100は、コンピュータ200に備わる。*** Explanation of configuration ***
The configuration of the memory history management system 100 will be described with reference to FIG.
The memory history management system 100 is provided in the
コンピュータ200は、プロセッサ201とメインメモリ202とメモリ履歴管理システム100とを備える。
プロセッサ201の具体例は、CPU(Central Processing Unit)である。
メインメモリ202の具体例は、RAM(Random Access Memory)である。The
A specific example of the
A specific example of the
メモリ履歴管理システム100は、1つ以上のアクセス命令が発生する前のメインメモリ202の状態を再現するために、1つ以上の履歴情報を管理する。履歴情報については後述する。
The memory history management system 100 manages one or more history information in order to reproduce the state of the
メモリ履歴管理システム100は、キャッシュメモリ110と履歴メモリ120とメモリ再現部130とを備える。
The memory history management system 100 includes a
キャッシュメモリ110は、ライトアロケート方式のキャッシュメモリである。
ライトアロケート方式は、ライトミス(ライト命令が発生したときのキャッシュミス)が発生したときに、メインメモリからキャッシュメモリへデータ値が読み込まれる方式である。ライトアロケート方式では、リードミス(リード命令が発生したときのキャッシュミス)が発生したときにも、メインメモリからキャッシュメモリへデータ値が読み込まれる。データ値は単にデータともいう。
メモリ履歴管理システム100では、キャッシュミス時にメインメモリ202からキャッシュメモリ110へ読み込まれるデータ値が利用される。これにより、履歴情報を記録するためにメインメモリ202からデータ値を取得する、という動作が不要となる。The
The write allocate method is a method in which a data value is read from the main memory to the cache memory when a write miss (a cache miss when a write instruction occurs) occurs. In the write allocate method, the data value is read from the main memory to the cache memory even when a read miss (a cache miss when a read instruction occurs) occurs. Data values are also simply called data.
In the memory history management system 100, the data value read from the
履歴メモリ120には、1つ以上の履歴情報が記録される。
履歴メモリ120は、メインメモリ202とは別に用意されたメモリであってもよいし、メインメモリ202の一部であってもよい。One or more history information is recorded in the
The
メモリ再現部130は、履歴メモリ120に記録された1つ以上の履歴情報に基づいて、1つ以上のライト命令が発生する前のメインメモリ202の状態を再現する要素である。
メモリ再現部130は、ソフトウェアとハードウェアとのいずれによって実現されてもよい。または、メモリ再現部130は、ソフトウェアとハードウェアとの組み合わせによって実現されてもよい。
メモリ再現部130がソフトウェアによって実現される場合、例えば、コンピュータ200をメモリ再現部130として機能させるためのプログラムがプロセッサ201によって実行される。
メモリ再現部130がハードウェアによって実現される場合、例えば、メモリ再現部130として機能する専用回路が実装される。The
The
When the
When the
図2に基づいて、メインメモリ202の構成を説明する。
メインメモリ202は、複数の記憶領域を有する。
それぞれの記憶領域は、アドレスによって識別される。The configuration of the
The
Each storage area is identified by an address.
図3に基づいて、キャッシュメモリ110の構成を説明する。
キャッシュメモリ110は、複数のエントリ111を有する。複数のエントリ111は、メインメモリ202の中の複数の記憶領域に対応する。
それぞれのエントリ111は、エントリ番号によって識別される。The configuration of the
The
Each
それぞれのエントリ111は、フラグ欄とアドレス欄とデータ値欄とを有する。
アドレス欄には、エントリ111に対応する記憶領域のアドレスが格納される。
データ値欄には、エントリ111に対応する記憶領域のデータ値が格納される。
フラグ欄は、有効フラグ(v)とダーティフラグ(d)と記録フラグ(r)とを有する。
有効フラグ(v)は、アドレスおよびデータ値が有効であるか否かを示す。アドレスおよびデータ値が有効であることを意味するフラグ値を「有効値」と称する。アドレスおよびデータ値が無効であることを意味するフラグ値を「無効値」と称する。つまり、有効フラグ(v)には、無効値(0)または有効値(1)が設定される。有効フラグ(v)の初期値は無効値(0)である。
ダーティフラグ(d)は、データ値の書き込みが行われたか否かを示す。具体的には、ダーティフラグ(d)は、エントリ111に対応する記憶領域に対するライト命令が発生したか否かを示す。データ値の書き込みが行われたことを意味するフラグ値を「書き込み状態値」と称する。データ値の書き込みが行われていないことを意味するフラグ値を「不変状態値」と称する。つまり、ダーティフラグ(d)には、不変状態値(0)または書き込み状態値(1)が設定される。ダーティフラグ(d)が書き込み状態値(1)を示す場合、エントリ111のデータ値欄に格納されているデータ値が、メインメモリ202の記憶領域に格納されているデータ値と一致していない可能性がある。このエントリ111が無効化される場合には、データ値欄に格納されているデータ値をメインメモリ202の記憶領域に書き込む必要がある。ダーティフラグ(d)の初期値は不変状態値(0)である。
記録フラグ(r)は、履歴情報が記録されたか否かを示す。履歴情報の記録済みを意味するフラグ値を「記録済み状態値」と称する。履歴情報の未記録を意味するフラグ値を「未記録状態値」と称する。つまり、記録フラグ(r)には、未記録状態値(0)または記録済み状態値(1)が設定される。記録フラグ(r)の初期値は未記録状態値(0)である。Each
The address of the storage area corresponding to the
The data value of the storage area corresponding to the
The flag column has a valid flag (v), a dirty flag (d), and a recording flag (r).
The valid flag (v) indicates whether the address and the data value are valid or not. A flag value that means that an address and a data value are valid is referred to as a "valid value". A flag value that means that the address and data values are invalid is referred to as an "invalid value". That is, an invalid value (0) or a valid value (1) is set in the valid flag (v). The initial value of the valid flag (v) is the invalid value (0).
The dirty flag (d) indicates whether or not the data value has been written. Specifically, the dirty flag (d) indicates whether or not a write instruction for the storage area corresponding to
The recording flag (r) indicates whether or not the history information has been recorded. The flag value that means that the history information has been recorded is referred to as a "recorded state value". A flag value that means unrecorded history information is referred to as an "unrecorded state value". That is, an unrecorded state value (0) or a recorded state value (1) is set in the recording flag (r). The initial value of the recording flag (r) is the unrecorded state value (0).
キャッシュメモリ110は、キャッシュ制御回路112と履歴記録回路113とを備える。
キャッシュ制御回路112は、キャッシュミス時にメインメモリ202の記憶領域からデータ値を読み込み、読み込んだデータ値をキャッシュメモリ110のエントリ111に格納する。
履歴記録回路113は、1つ以上の履歴情報を履歴メモリ120に記録する。The
The
The
図4に基づいて、メインメモリ202の記憶領域とキャッシュメモリ110のエントリ111との対応関係を説明する。
記憶領域とエントリ111とは、ダイレクトマップ方式で互いに対応付けられている。つまり、記憶領域のアドレスとエントリ111のエントリ番号とが互いに対応付けられている。
本実施の形態において、アドレス“0xN1N2N3”の記憶領域は、エントリ番号“N2”のエントリ111に対応付けられている。“N1”、“N2”および“N3”は一桁の整数を表す。
例えば、アドレス“0x100”の記憶領域は、エントリ番号“0”のエントリ111に対応付けられている。アドレス“0x110”の記憶領域とアドレス“0x110”の記憶領域とのそれぞれは、エントリ番号“1”のエントリ111に対応付けられている。アドレス“0x120”の記憶領域は、エントリ番号“2”のエントリ111に対応付けられている。アドレス“0x130”の記憶領域は、エントリ番号“3”のエントリ111に対応付けられている。The correspondence between the storage area of the
The storage area and the
In the present embodiment, the storage area of the address "0xN 1 N 2 N 3 " is associated with the
For example, the storage area at address “0x100” is associated with
図5に基づいて、履歴メモリ120の構成を説明する。
履歴メモリ120には、1つ以上の履歴情報121が記録される。
それぞれの履歴情報121は、履歴番号(#)と処理識別子とアドレスとデータ値とを含む。
履歴番号(#)は、履歴情報121を識別する。
処理識別子は、データ処理を識別する。データ処理の具体例は周期処理である。周期処理は、プロセッサ201によって周期的に実行される。処理識別子の具体例は周期番号である。周期番号は周期処理を識別する。The configuration of the
One or
Each
The history number (#) identifies the
The processing identifier identifies the data processing. A specific example of data processing is periodic processing. The periodic processing is periodically executed by the
***動作の説明***
メモリ履歴管理システム100の動作はメモリ履歴管理方法に相当する。
メモリ履歴管理方法には、履歴記録方法とメモリ再現方法とが含まれる。
履歴記録方法は、履歴記録回路113の動作に相当する。
メモリ再現方法は、メモリ再現部130の動作に相当する。*** Explanation of operation ***
The operation of the memory history management system 100 corresponds to the memory history management method.
The memory history management method includes a history recording method and a memory reproduction method.
The history recording method corresponds to the operation of the
The memory reproduction method corresponds to the operation of the
履歴記録方法とメモリ再現方法とを説明する前に、プロセッサ201とキャッシュ制御回路112とのそれぞれの動作について説明する。
プロセッサ201は、複数のデータ処理を順番に実行する。
それぞれのデータ処理には、1つ以上のアクセス命令が含まれる。アクセス命令は、リード命令とライト命令との総称である。リード命令は、データ値を読み出す命令である。ライト命令は、データ値を書き込む命令である。
以降の説明において、アクセス命令の発生は、プロセッサ201によるアクセス命令の実行に相当する。Before explaining the history recording method and the memory reproduction method, the respective operations of the
Each data process includes one or more access instructions. The access instruction is a general term for a read instruction and a write instruction. The read instruction is an instruction to read a data value. The write instruction is an instruction to write a data value.
In the following description, the generation of the access instruction corresponds to the execution of the access instruction by the
アクセス命令が発生した場合、発生したアクセス命令の情報がプロセッサ201からキャッシュ制御回路112に入力される。発生したアクセス命令の情報は、以下のような情報である。
発生したアクセス命令の情報は処理識別子を含む。この処理識別子は、実行中のデータ処理を識別する。実行中のデータ処理は、発生したアクセス命令を含むデータ処理である。
発生したアクセス命令の情報はアドレスを含む。このアドレスは、メインメモリ202の中の複数の記憶領域のうち、発生したアクセス命令の対象となる記憶領域を識別する。
発生したアクセス命令の情報はアクセス種類を含む。このアクセス種類は、発生したアクセス命令の種類である。
発生したアクセス命令がライト命令である場合、発生したアクセス命令の情報はライト値を含む。ライト値は、ライト命令で指定されたデータ値、すなわち、ライト後のデータ値である。When an access instruction is generated, the information of the generated access instruction is input from the
The information of the generated access instruction includes the processing identifier. This processing identifier identifies the data processing being performed. The data processing being executed is the data processing including the generated access instruction.
The information of the generated access instruction includes the address. This address identifies the storage area that is the target of the generated access instruction from the plurality of storage areas in the
The information of the generated access instruction includes the access type. This access type is the type of access instruction that has occurred.
When the generated access instruction is a write instruction, the information of the generated access instruction includes the write value. The write value is the data value specified by the write instruction, that is, the data value after writing.
メインメモリ202の中の複数の記憶領域のうち、発生したアクセス命令の対象となる記憶領域を「対象領域」と称する。
キャッシュメモリ110の中の複数のエントリ111のうち、対象領域に対応するエントリ111を「対応エントリ」と称する。
複数のデータ処理のうち、発生したアクセス命令を含むデータ処理を「対象処理」と称する。つまり、対象処理は、実行中のデータ処理である。Of the plurality of storage areas in the
Of the plurality of
Of a plurality of data processes, the data process including the generated access instruction is referred to as "target process". That is, the target process is the data process being executed.
キャッシュ制御回路112は、対象領域からデータ値を読み込み、読み込んだデータ値を対応エントリのデータ値欄に格納する。
但し、対象領域のデータ値が対応エントリに格納されている場合、キャッシュ制御回路112は、データ値の読み込みとデータ値の格納とを行わない。
また、対象領域とは別の記憶領域のデータ値が対応エントリのデータ値欄に格納されている場合、キャッシュ制御回路112はライトバックを行う。つまり、キャッシュ制御回路112は、対応エントリのデータ値欄に格納されているデータ値を該当の記憶領域に書き出した後に、読み込んだデータ値を対応エントリのデータ値欄に格納する。The
However, when the data value of the target area is stored in the corresponding entry, the
Further, when the data value of the storage area different from the target area is stored in the data value column of the corresponding entry, the
さらに、キャッシュ制御回路112は、以下のような処理を行う。
(1)発生したアクセス命令がライト命令である場合、キャッシュ制御回路112は、対応エントリのデータ値欄に格納されているデータ値(ライト前のデータ値)をライト後のデータ値に更新する。
さらに、キャッシュ制御回路112は、対応エントリのダーティフラグに書き込み状態値を設定する。
(2)キャッシュ制御回路112は、対象領域のアドレスを対応エントリのアドレス欄に設定する。
(3)キャッシュ制御回路112は、対応エントリの有効フラグに有効値を設定する。Further, the
(1) When the generated access instruction is a write instruction, the
Further, the
(2) The
(3) The
キャッシュ制御回路112によって得られた情報は、キャッシュ制御回路112から履歴記録回路113に入力される。
具体的には、発生したアクセス命令の情報、および、対象領域から読み込まれたデータ値、などが履歴記録回路113に入力される。The information obtained by the
Specifically, the information of the generated access instruction, the data value read from the target area, and the like are input to the
図6に基づいて、履歴記録方法を説明する。
ステップS101からステップS106は、アクセス命令が発生する毎に実行される。The history recording method will be described with reference to FIG.
Steps S101 to S106 are executed each time an access instruction is issued.
ステップS101において、履歴記録回路113は、発生したアクセス命令の種類を判定する。
発生したアクセス命令がライト命令である場合、処理はステップS102に進む。
発生したアクセス命令がリード命令である場合、処理はステップS105に進む。In step S101, the
If the generated access instruction is a write instruction, the process proceeds to step S102.
If the generated access instruction is a read instruction, the process proceeds to step S105.
ステップS102において、履歴記録回路113は、対応エントリの記録フラグを参照する。
対応エントリの記録フラグが未記録状態値を示す場合、処理はステップS103に進む。
対応エントリの記録フラグが記録済み状態値を示す場合、処理はステップS105に進む。In step S102, the
If the recording flag of the corresponding entry indicates an unrecorded state value, the process proceeds to step S103.
If the record flag of the corresponding entry indicates a recorded state value, the process proceeds to step S105.
ステップS103において、履歴記録回路113は、履歴情報を生成し、生成された履歴情報を履歴メモリ120に記録する。
記録される履歴情報は、対象処理の処理番号と、対象領域のアドレスと、ライト前のデータ値とを含む。
ライト前のデータ値は、キャッシュミス時に対象領域からキャッシュメモリ110へ読み込まれたデータ値である。
但し、対象処理の開始時に対象領域のデータ値が対応エントリのデータ値欄に格納されていた場合、ライト前のデータ値は、ライト後のデータ値が対応エントリのデータ値欄に書き込まれる前に対応エントリのデータ値欄に格納されていたデータ値である。In step S103, the
The recorded history information includes the processing number of the target processing, the address of the target area, and the data value before writing.
The data value before writing is the data value read from the target area into the
However, if the data value of the target area is stored in the data value column of the corresponding entry at the start of the target processing, the data value before writing is before the data value after writing is written in the data value column of the corresponding entry. It is the data value stored in the data value column of the corresponding entry.
ステップS104において、履歴記録回路113は、対応エントリの記録フラグに記録済み状態値を設定する。
In step S104, the
ステップS105において、履歴記録回路113は、対象処理が終了したか判定する。
In step S105, the
例えば、以下のような場合に、履歴記録回路113は、対象処理が終了したと判定する。
(1)rクリア命令がプロセッサ201から入力された場合に、履歴記録回路113は、対象処理が終了したと判定する。rクリア命令は、それぞれのエントリ111の記録フラグをクリアするための命令である。
(2)外部からrクリア信号が入力された場合に、履歴記録回路113は、対象処理が終了したと判定する。rクリア信号は、それぞれのエントリ111の記録フラグをクリアするための命令である。
(3)発生したアクセス命令が特定領域を対象とするアクセス命令である場合に、履歴記録回路113は、対象処理が終了したと判定する。特定領域は、データ処理の終了時にアクセスされる記憶領域である。For example, in the following cases, the
(1) When the r clear instruction is input from the
(2) When the r clear signal is input from the outside, the
(3) When the generated access instruction is an access instruction targeting a specific area, the
対象処理が終了した場合、処理はステップS106に進む。
対象処理が終了していない場合、履歴記録方法の処理は終了する。When the target process is completed, the process proceeds to step S106.
If the target process is not completed, the process of the history recording method ends.
ステップS106において、履歴記録回路113は、それぞれのエントリ111の記録フラグに未記録状態値を設定する。
ステップS106の後、履歴記録方法の処理は終了する。In step S106, the
After step S106, the process of the history recording method ends.
以下に、履歴記録方法の具体例を説明する。
まず、第1データ処理が実行され、その後、第2データ処理が実行されるものとする。
図7のアクセス命令リスト211は、第1データ処理に含まれる7つのアクセス命令を示している。
図8のアクセス命令リスト212は、第2データ処理に含まれる3つのアクセス命令を示している。A specific example of the history recording method will be described below.
First, it is assumed that the first data processing is executed, and then the second data processing is executed.
The access instruction list 211 of FIG. 7 shows seven access instructions included in the first data processing.
The access instruction list 212 of FIG. 8 shows three access instructions included in the second data processing.
図9から図16に基づいて、第1データ処理が実行された場合の履歴記録方法を説明する。
図9において、第1データ処理の第1アクセス命令が発生した。第1データ処理の第1アクセス命令は、アドレス“0x100”の記憶領域を対象とするリード命令である。
キャッシュ制御回路112は、アドレス“0x100”の記憶領域からデータ値“0xaaaa”を読み込み、読み込んだデータ値を第0エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第0エントリ111のアドレス欄にアドレス“0x100”を設定する。そして、キャッシュ制御回路112は、有効フラグ(v)に有効値(1)を設定する。
第1アクセス命令はリード命令であるため、履歴記録回路113は、履歴情報121を記録しない。A history recording method when the first data processing is executed will be described with reference to FIGS. 9 to 16.
In FIG. 9, the first access instruction for the first data processing has occurred. The first access instruction of the first data processing is a read instruction targeting the storage area of the address "0x100".
The
Since the first access instruction is a read instruction, the
図10において、第1データ処理の第2アクセス命令が発生した。第1データ処理の第2アクセス命令は、アドレス“0x110”の記憶領域を対象とするライト命令である。ライト値は“0x1111”である。
キャッシュ制御回路112は、アドレス“0x110”の記憶領域からデータ値“0xbbbb”を読み込み、読み込んだデータ値を第1エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第1エントリ111のアドレス欄にアドレス“0x110”を設定する。そして、キャッシュ制御回路112は、第1エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0x1111”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
履歴記録回路113は、アドレス“0x110”の記憶領域から読み込まれたライト前のデータ値“0xbbbb”を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“1”とアドレス“0x110”とが含まれる。そして、履歴記録回路113は、第1エントリの記録フラグ(r)に記録済み状態値(1)を設定する。In FIG. 10, a second access instruction for the first data processing has occurred. The second access instruction of the first data processing is a write instruction targeting the storage area of the address "0x110". The light value is "0x1111".
The
Further, the
The
図11において、第1データ処理の第3アクセス命令が発生した。第1データ処理の第3アクセス命令は、アドレス“0x120”の記憶領域を対象とするリード命令である。
キャッシュ制御回路112は、アドレス“0x120”の記憶領域からデータ値“0xcccc”を読み込み、読み込んだデータ値を第2エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第2エントリ111のアドレス欄にアドレス“0x120”を設定する。そして、キャッシュ制御回路112は、有効フラグ(v)に有効値(1)を設定する。
第2アクセス命令はリード命令であるため、履歴記録回路113は、履歴情報121を記録しない。In FIG. 11, a third access instruction for the first data processing has occurred. The third access instruction of the first data processing is a read instruction targeting the storage area of the address "0x120".
The
Since the second access instruction is a read instruction, the
図12において、第1データ処理の第4アクセス命令が発生した。第1データ処理の第4アクセス命令は、アドレス“0x120”の記憶領域を対象とするライト命令である。ライト値は“0xcccc”である。
アドレス“0x120”の記憶領域から読み出されたデータ値“0xcccc”は、第2エントリ111に格納済みである。
履歴記録回路113は、第2エントリ111からライト前のデータ値“0xcccc”を取得し、取得したデータ値を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“1”とアドレス“0x120”とが含まれる。そして、履歴記録回路113は、第2エントリ111の記録フラグ(r)に記録済み状態値(1)を設定する。
キャッシュ制御回路112は、第2エントリのデータ値欄にライト値“0xcccc”を書き込む。そして、キャッシュ制御回路112は、第2エントリのダーティフラグ(d)に書き込み状態値(1)を設定する。In FIG. 12, a fourth access instruction for the first data processing has occurred. The fourth access instruction of the first data processing is a write instruction targeting the storage area of the address "0x120". The light value is "0xcccc".
The data value "0xcccc" read from the storage area of the address "0x120" is stored in the
The
The
図13において、第1データ処理の第5アクセス命令が発生した。第1データ処理の第5アクセス命令は、アドレス“0x130”の記憶領域を対象とするライト命令である。ライト値は“0xdddd”である。
キャッシュ制御回路112は、アドレス“0x130”の記憶領域からデータ値“0xdddd”を読み込み、読み込んだデータ値を第3エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第3エントリ111のアドレス欄にアドレス“0x130”を設定する。そして、キャッシュ制御回路112は、第3エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第3エントリ111のデータ値欄にライト値“0xdddd”を書き込む。そして、キャッシュ制御回路112は、第3エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
履歴記録回路113は、アドレス“0x130”の記憶領域から読み込まれたライト前のデータ値“0xdddd”を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“1”とアドレス“0x130”とが含まれる。そして、履歴記録回路113は、第3エントリの記録フラグ(r)に記録済み状態値(1)を設定する。In FIG. 13, the fifth access instruction for the first data processing has occurred. The fifth access instruction of the first data processing is a write instruction targeting the storage area of the address "0x130". The light value is "0xdddd".
The
Further, the
The
図14において、第1データ処理の第6アクセス命令が発生した。第1データ処理の第6アクセス命令は、アドレス“0x130”の記憶領域を対象とするライト命令である。ライト値は“0x2222”である。
アドレス“0x130”の記憶領域から読み出されたデータ値“0xdddd”は、第3エントリ111に格納済みである。
第3エントリ111の記録フラグ(r)が記録済み値(1)を示すため、履歴記録回路113は、履歴情報121を記録しない。
キャッシュ制御回路112は、第3エントリ111のデータ値欄にライト値“0x2222”を書き込む。そして、キャッシュ制御回路112は、第3エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。In FIG. 14, a sixth access instruction for the first data processing has occurred. The sixth access instruction of the first data processing is a write instruction targeting the storage area of the address "0x130". The light value is "0x2222".
The data value "0xdddd" read from the storage area of the address "0x130" is stored in the
Since the recording flag (r) of the
The
図15において、第1データ処理の第7アクセス命令が発生した。第1データ処理の第7アクセス命令は、アドレス“0x130”の記憶領域を対象とするリード命令である。
アドレス“0x130”の記憶領域に対するデータ値“0x2222”が、第3エントリ111に格納されている。
第3エントリ111の記録フラグ(r)が記録済み値(1)を示すため、履歴記録回路113は、履歴情報121を記録しない。In FIG. 15, a seventh access instruction for the first data processing has occurred. The seventh access instruction of the first data processing is a read instruction targeting the storage area of the address "0x130".
The data value "0x2222" for the storage area of the address "0x130" is stored in the
Since the recording flag (r) of the
図16において、第1データ処理が終了したため、履歴記録回路113は、それぞれのエントリ111の記録フラグ(r)に未記録状態値(0)を設定する。
In FIG. 16, since the first data processing is completed, the
図17から図20に基づいて、第2データ処理が実行された場合の履歴記録方法を説明する。
図17において、第2データ処理の第1アクセス命令が発生した。第2データ処理の第1アクセス命令は、アドレス“0x110”の記憶領域を対象とするライト命令である。ライト値は“0x3333”である。
アドレス“0x110”の記憶領域に対するデータ値“0x1111”が、第1エントリ111のデータ値欄に格納されている。
第1エントリ111の記録フラグ(r)が未記録状態値(0)を示すため、履歴記録回路113は、履歴情報121を記録する。具体的には、履歴記録回路113は、第1エントリ111のデータ値欄からデータ値“0x1111”を取得し、取得されたデータ値を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“2”とアドレス“0x110”とが含まれる。そして、履歴記録回路113は、第1エントリ111の記録フラグ(r)に記録済み状態値(1)を設定する。
キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0x3333”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。A history recording method when the second data processing is executed will be described with reference to FIGS. 17 to 20.
In FIG. 17, the first access instruction for the second data processing has occurred. The first access instruction of the second data processing is a write instruction targeting the storage area of the address "0x110". The light value is "0x3333".
The data value "0x1111" for the storage area of the address "0x110" is stored in the data value column of the
Since the recording flag (r) of the
The
図18において、第2データ処理の第2アクセス命令が発生した。第2データ処理の第2アクセス命令は、アドレス“0x210”の記憶領域を対象とするライト命令である。ライト値は“0xeeee”である。
アドレス“0x210”の記憶領域に対応する第1エントリ111には、アドレス“0x110”の記憶領域に対するデータ値“0x3333”が格納されている。
そのため、キャッシュ制御回路112はライトバックを行う。つまり、キャッシュ制御回路112は、第1エントリ111のデータ値欄に格納されているデータ値“0x3333”をアドレス“0x110”の記憶領域に書き込む。
ライトバックの後、キャッシュ制御回路112(または履歴記録回路113)は、第1エントリ111の記録フラグ(r)に未記録状態値(0)を設定する。In FIG. 18, the second access instruction for the second data processing has occurred. The second access instruction of the second data processing is a write instruction targeting the storage area of the address "0x210". The light value is "0xeeee".
The data value "0x3333" for the storage area of the address "0x110" is stored in the
Therefore, the
After the writeback, the cache control circuit 112 (or the history recording circuit 113) sets the recording flag (r) of the
図19において、ライトバックの後、キャッシュ制御回路112は、アドレス“0x210”の記憶領域からデータ値“0xeeee”を読み込み、読み込んだデータ値を第1エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第1エントリ111のアドレス欄にアドレス“0x210”を設定する。そして、キャッシュ制御回路112は、第1エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0xeeee”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
履歴記録回路113は、アドレス“0x210”の記憶領域から読み込まれたライト前のデータ値“0xeeee”を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“2”とアドレス“0x210”とが含まれる。そして、履歴記録回路113は、第1エントリの記録フラグ(r)に記録済み状態値(1)を設定する。In FIG. 19, after the write-back, the
Further, the
The
図20において、第2データ処理の第3アクセス命令が発生した。第2データ処理の第3アクセス命令は、アドレス“0x110”の記憶領域を対象とするライト命令である。ライト値は“0x4444”である。
アドレス“0x110”の記憶領域に対応する第1エントリ111には、アドレス“0x210”の記憶領域に対するデータ値“0xeeee”が格納されている。
そのため、キャッシュ制御回路112はライトバックを行う。つまり、キャッシュ制御回路112は、第1エントリ111のデータ値欄に格納されているデータ値“0xeeee”をアドレス“0x210”の記憶領域に書き込む。
ライトバックの後、キャッシュ制御回路112(または履歴記録回路113)は、第1エントリ111の記録フラグ(r)に未記録状態値(0)を設定する。In FIG. 20, a third access instruction for the second data processing has occurred. The third access instruction of the second data processing is a write instruction targeting the storage area of the address "0x110". The light value is "0x4444".
The
Therefore, the
After the writeback, the cache control circuit 112 (or the history recording circuit 113) sets the recording flag (r) of the
図21において、ライトバックの後、キャッシュ制御回路112は、アドレス“0x110”の記憶領域からデータ値“0x3333”を読み込み、読み込んだデータ値を第1エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第1エントリ111のアドレス欄にアドレス“0x110”を設定する。そして、キャッシュ制御回路112は、第1エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0x3333”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
履歴記録回路113は、アドレス“0x110”の記憶領域から読み込まれたライト前のデータ値“0x3333”を含む履歴情報121を生成し、生成された履歴情報121を履歴メモリ120に記録する。履歴情報121には、さらに、処理識別子“2”とアドレス“0x110”とが含まれる。そして、履歴記録回路113は、第1エントリの記録フラグ(r)に記録済み状態値(1)を設定する。In FIG. 21, after writing back, the
Further, the
The
図22に基づいて、メモリ再現方法を説明する。
ステップS111において、メモリ再現部130は、1つ以上の履歴情報が履歴メモリ120に記録されているか判定する。A memory reproduction method will be described with reference to FIG.
In step S111, the
但し、目的のデータ処理が開始されたときのメインメモリ202の状態を再現する場合、メモリ再現部130は、目的のデータ処理以後に実行されたデータ処理の処理識別子を含んだ1つ以上の履歴情報が履歴メモリ120に記録されているか判定する。
この場合について、目的のデータ処理以後に実行されたデータ処理の処理識別子を含んだ1つ以上の履歴情報を単に1つ以上の履歴情報という。However, when reproducing the state of the
In this case, one or more historical information including the processing identifier of the data processing executed after the target data processing is simply referred to as one or more historical information.
1つ以上の履歴情報が履歴メモリ120に記録されている場合、処理はステップS112に進む。
1つ以上の履歴情報が履歴メモリ120に記録されていない場合、メモリ再現方法の処理は終了する。If one or more history information is recorded in the
If one or more history information is not recorded in the
ステップS112において、メモリ再現部130は、1つ以上の履歴情報から、記録順とは逆順に、未選択の履歴情報を1つ選択する。
この逆順は、1つ以上の履歴情報の新しい順に相当する。In step S112, the
This reverse order corresponds to the newest order of one or more historical information.
ステップS113において、メモリ再現部130は、選択された履歴情報に対応する記憶領域(対応領域)に、選択された履歴情報に含まれるデータ値を書き込む。
具体的には、対応領域は、メインメモリ202の中の複数の記憶領域のうち、選択された履歴情報に含まれるアドレスで識別される記憶領域である。In step S113, the
Specifically, the corresponding area is a storage area identified by an address included in the selected history information among a plurality of storage areas in the
ステップS114において、メモリ再現部130は、ステップS112で選択されていない履歴情報(未選択の履歴情報)が有るか判定する。
未選択の履歴情報が有る場合、処理はステップS112に進む。
未選択の履歴情報が無い場合、メモリ再現方法の処理は終了する。In step S114, the
If there is unselected history information, the process proceeds to step S112.
If there is no unselected history information, the processing of the memory reproduction method ends.
ステップS112からステップS114により、1つ以上のアクセス命令が発生する前のメインメモリ202の状態が再現される。
例えば、目的のデータ処理が開始されたときのメインメモリ202の状態が再現される。From step S112 to step S114, the state of the
For example, the state of the
以下に、メモリ再現方法の具体例を説明する。
履歴メモリ120には、図21に示す6つの履歴情報121が記録されているものとする。A specific example of the memory reproduction method will be described below.
It is assumed that the six
図23に基づいて、第2データ処理が開始されたときのメインメモリ202の状態を再現するメモリ再現方法を説明する。
メモリ再現部130は、処理識別子“2”を含んだ3つの履歴情報121から各々の履歴情報121を記録順とは逆順に選択し、選択された履歴情報121に対応する記憶領域に選択された履歴情報121に含まれるデータ値を書き込む。A memory reproduction method for reproducing the state of the
The
具体的には、メモリ再現部130は以下のように動作する。
まず、メモリ再現部130は、履歴番号“6”の履歴情報121を選択する。履歴番号“6”の履歴情報121に対応する記憶領域は、アドレス“0x110”の記憶領域である。また、履歴番号“6”の履歴情報121に含まれるデータ値は“0x3333”である。そのため、メモリ再現部130は、アドレス“0x110”の記憶領域にデータ値“0x3333”を書き込む。
次に、メモリ再現部130は、履歴番号“5”の履歴情報121を選択する。履歴番号“5”の履歴情報121に対応する記憶領域は、アドレス“0x210”の記憶領域である。また、履歴番号“5”の履歴情報121に含まれるデータ値は“0xeeee”である。そのため、メモリ再現部130は、アドレス“0x210”の記憶領域にデータ値“0xeeee”を書き込む。
そして、メモリ再現部130は、履歴番号“4”の履歴情報121を選択する。履歴番号“5”の履歴情報121に対応する記憶領域は、アドレス“0x210”の記憶領域である。また、履歴番号“5”の履歴情報121に含まれるデータ値は“0xeeee”である。そのため、メモリ再現部130は、アドレス“0x210”の記憶領域にデータ値“0xeeee”を書き込む。Specifically, the
First, the
Next, the
Then, the
これにより、第2データ処理が開始されたときのメインメモリ202の状態が再現される。
As a result, the state of the
図24に基づいて、第1データ処理が開始されたときのメインメモリ202の状態を再現するメモリ再現方法を説明する。
メモリ再現部130は、図23で説明した処理の後に、以下の処理を実行する。
メモリ再現部130は、処理識別子“1”を含んだ3つの履歴情報121から各々の履歴情報121を記録順とは逆順に選択し、選択された履歴情報121に対応する記憶領域に選択された履歴情報121に含まれるデータ値を書き込む。A memory reproduction method for reproducing the state of the
The
The
具体的には、メモリ再現部130は以下のように動作する。
まず、メモリ再現部130は、履歴番号“3”の履歴情報121を選択する。履歴番号“3”の履歴情報121に対応する記憶領域は、アドレス“0x130”の記憶領域である。また、履歴番号“3”の履歴情報121に含まれるデータ値は“0xdddd”である。そのため、メモリ再現部130は、アドレス“0x130”の記憶領域にデータ値“0xdddd”を書き込む。
次に、メモリ再現部130は、履歴番号“2”の履歴情報121を選択する。履歴番号“2”の履歴情報121に対応する記憶領域は、アドレス“0x120”の記憶領域である。また、履歴番号“2”の履歴情報121に含まれるデータ値は“0xcccc”である。そのため、メモリ再現部130は、アドレス“0x120”の記憶領域にデータ値“0xcccc”を書き込む。
そして、メモリ再現部130は、履歴番号“1”の履歴情報121を選択する。履歴番号“1”の履歴情報121に対応する記憶領域は、アドレス“0x110”の記憶領域である。また、履歴番号“1”の履歴情報121に含まれるデータ値は“0xbbbb”である。そのため、メモリ再現部130は、アドレス“0x110”の記憶領域にデータ値“0xbbbb”を書き込む。Specifically, the
First, the
Next, the
Then, the
これにより、第1データ処理が開始されたときのメインメモリ202の状態が再現される。
As a result, the state of the
***実施の形態1の効果***
メモリ履歴管理システム100は、キャッシュメモリ110の各エントリに記録フラグを有する。履歴フラグは、履歴メモリ120への書き込みの有無を示す。また、メモリ履歴管理システム100は、メインメモリ202の中の最新のデータ値と履歴メモリ120の中の履歴情報とに基づいて、メインメモリ202の中の過去のデータ値を再現するメモリ再現部130を備える。
これにより、メモリ履歴管理システム100は、メインメモリ202の状態を少ないメモリ容量で再現することができる。例えば、周期処理を行うコンピュータシステムにおいて、メモリ履歴管理システム100は、過去の周期のメモリ値を少ないメモリ容量で再現することができる。メモリ値は、メインメモリ202の中のデータ値である。
最新のメモリ値との差分を示す履歴情報に基づいて過去のデータ値が再現されるため、再現に必要なデータ量が少ない。履歴メモリ120に空きが無くなった場合、メモリ履歴管理システム100は、古い順に履歴情報を上書きすることによって、新たな履歴情報の記録を続けることができる。一方、初期値とライト時の差分データとを記録する方式では、履歴メモリに空きが無くなったために古い履歴情報が上書きされてしまうと、過去のデータ値を再現することができない。
キャッシュメモリ110の各エントリが記録フラグを有することにより、同じエントリに対する複数回のライト命令について履歴情報の記録を抑制することができる。具体的には、同じエントリに対する複数回のライト命令が発生しても、履歴情報の記録を1回にすることができる。そのため、履歴情報の記録量が削減される。
メモリ履歴管理システム100において、ライトアロケート方式のキャッシュメモリ110が利用される。そして、キャッシュミス時にメインメモリ202から読み出されるデータ値がライト前のデータ値として利用される。これにより、履歴情報の記録のためにメインメモリ202からライト前のデータ値を取得する必要がなくなる。
メモリ履歴管理システム100において、履歴情報の記録はハードウェア(履歴記録回路113)によって行われる。そのため、ソフトウェア(データ処理)の処理時間に影響を与えずに、履歴情報の記録を行うことができる。*** Effect of
The memory history management system 100 has a recording flag in each entry of the
As a result, the memory history management system 100 can reproduce the state of the
Since the past data value is reproduced based on the history information indicating the difference from the latest memory value, the amount of data required for reproduction is small. When the
Since each entry in the
In the memory history management system 100, the write-allocate
In the memory history management system 100, the recording of history information is performed by hardware (history recording circuit 113). Therefore, the history information can be recorded without affecting the processing time of the software (data processing).
***他の構成***
データ処理毎にメインメモリ202の再現を行う必要が無い場合、データ処理毎に履歴情報を管理する必要はない。つまり、履歴情報に処理識別子を含める必要はない。*** Other configurations ***
When it is not necessary to reproduce the
履歴記録回路113は、記録フラグのクリア(未記録状態値の設定)をデータ処理毎に行わなくてもよい。つまり、履歴記録回路113は、2つ以上のデータ処理が終了する毎に、各エントリの記録フラグをクリアしてもよい。例えば、履歴記録回路113は、2周期毎または4周期毎に、各エントリの記録フラグをクリアしてもよい。この場合、2周期毎または4周期毎にしかメインメモリ202の状態を再現することができない。しかし、記録される履歴情報の数が減るため、履歴メモリ120の容量を削減することが可能である。
The
実施の形態2.
ライト後のメモリ値がライト前のメモリ値と同じである場合に履歴情報を記録しない形態について、主に実施の形態1と異なる点を図25から図29に基づいて説明する。
A mode in which history information is not recorded when the memory value after writing is the same as the memory value before writing will be described mainly different from the first embodiment with reference to FIGS. 25 to 29.
***構成の説明***
メモリ履歴管理システム100の構成は、実施の形態1における構成と同じである(図1から図5を参照)。*** Explanation of configuration ***
The configuration of the memory history management system 100 is the same as the configuration in the first embodiment (see FIGS. 1 to 5).
***動作の説明***
図25に基づいて、履歴記録方法を説明する。
ステップS201において、履歴記録回路113は、発生したアクセス命令の種類を判定する。
ステップS201は、実施の形態1におけるステップS101と同じである(図6参照)。
発生したアクセス命令がライト命令である場合、処理はステップS202に進む。
発生したアクセス命令がリード命令である場合、処理はステップS206に進む。*** Explanation of operation ***
The history recording method will be described with reference to FIG. 25.
In step S201, the
Step S201 is the same as step S101 in the first embodiment (see FIG. 6).
If the generated access instruction is a write instruction, the process proceeds to step S202.
If the generated access instruction is a read instruction, the process proceeds to step S206.
ステップS202において、履歴記録回路113は、対応エントリの記録フラグを参照する。
ステップS202は、実施の形態1におけるステップS102と同じである(図6参照)。
対応エントリの記録フラグが未記録状態値を示す場合、処理はステップS203に進む。
対応エントリの記録フラグが記録済み状態値を示す場合、処理はステップS206に進む。In step S202, the
Step S202 is the same as step S102 in the first embodiment (see FIG. 6).
If the recording flag of the corresponding entry indicates an unrecorded state value, the process proceeds to step S203.
If the recording flag of the corresponding entry indicates a recorded state value, the process proceeds to step S206.
ステップS203において、履歴記録回路113は、発生したライト命令のライト後のデータ値を、発生したライト命令の対象領域からキャッシュメモリ110へ読み込まれたライト前のデータ値と比較する。
ライト後のデータ値がライト前のデータ値と異なる場合、処理はステップS204に進む。
ライト後のデータ値がライト前のデータ値と同じである場合、処理はステップS206に進む。In step S203, the
If the data value after writing is different from the data value before writing, the process proceeds to step S204.
If the data value after writing is the same as the data value before writing, the process proceeds to step S206.
ステップS204において、履歴記録回路113は、ライト前のデータ値を含んだ履歴情報を履歴メモリ120に記録する。
ステップS204は、実施の形態1におけるステップS103と同じである(図6参照)。In step S204, the
Step S204 is the same as step S103 in the first embodiment (see FIG. 6).
ステップS205において、履歴記録回路113は、対応エントリの記録フラグに記録済み状態値を設定する。
ステップS205は、実施の形態1におけるステップS104と同じである(図6参照)。In step S205, the
Step S205 is the same as step S104 in the first embodiment (see FIG. 6).
ステップS206において、履歴記録回路113は、対象処理が終了したか判定する。
対象処理が終了した場合、履歴記録回路113は、それぞれのエントリ111の記録フラグに未記録状態値を設定する。
ステップS206は、実施の形態1におけるステップS105およびステップS106と同じである(図6参照)。In step S206, the
When the target processing is completed, the
Step S206 is the same as step S105 and step S106 in the first embodiment (see FIG. 6).
以下に、履歴記録方法の具体例を説明する。
まず、第1データ処理が実行され、その後、第2データ処理が実行されるものとする。
第1データ処理において、実施の形態1と同じく、7つのアクセス命令が発生する(図7参照)。
第2データ処理において、実施の形態1と同じく、3つのアクセス命令が発生する(図8参照)。A specific example of the history recording method will be described below.
First, it is assumed that the first data processing is executed, and then the second data processing is executed.
In the first data processing, as in the first embodiment, seven access instructions are generated (see FIG. 7).
In the second data processing, as in the first embodiment, three access instructions are generated (see FIG. 8).
第1データ処理の第1アクセス命令から第1データ処理の第3アクセス命令までの3つのアクセス命令が発生した場合の処理は、実施の形態1で説明した通りである(図9から図11を参照)。 The processing when three access instructions from the first access instruction of the first data processing to the third access instruction of the first data processing are generated is as described in the first embodiment (FIGS. 9 to 11). reference).
図26において、第1データ処理の第4アクセス命令が発生した。第1データ処理の第4アクセス命令は、アドレス“0x120”の記憶領域を対象とするライト命令である。ライト後のデータ値は“0xcccc”である。
アドレス“0x120”の記憶領域から読み出されたライト前のデータ値“0xcccc”は、第2エントリ111に格納済みである。
ライト後のデータ値“0xcccc”は、ライト前のデータ値“0xcccc”と同じである。
そのため、履歴記録回路113は、履歴情報121を記録しない。また、履歴記録回路113は、第2エントリ111の記録フラグ(r)に記録済み状態値(1)を設定しない。In FIG. 26, a fourth access instruction for the first data processing has occurred. The fourth access instruction of the first data processing is a write instruction targeting the storage area of the address "0x120". The data value after writing is "0xcccc".
The data value “0xcccc” before writing read from the storage area of the address “0x120” is stored in the
The data value "0xcccc" after writing is the same as the data value "0xcccc" before writing.
Therefore, the
第1データ処理の第5アクセス命令から第1データ処理の第7アクセス命令までの3つのアクセス命令が発生した場合の処理は、実施の形態1で説明した通りである(図13から図15を参照)。 The processing when three access instructions from the fifth access instruction of the first data processing to the seventh access instruction of the first data processing are generated is as described in the first embodiment (FIGS. 13 to 15). reference).
第2データ処理の第1アクセス命令が発生した場合の処理は、実施の形態1で説明した通りである(図17参照)。 The processing when the first access instruction of the second data processing is generated is as described in the first embodiment (see FIG. 17).
図27において、第2データ処理の第2アクセス命令が発生した。第2データ処理の第2アクセス命令は、アドレス“0x210”の記憶領域を対象とするライト命令である。ライト後のデータ値は“0xeeee”である。
アドレス“0x210”の記憶領域に対応する第1エントリ111には、アドレス“0x110”の記憶領域に対するデータ値“0x3333”が格納されている。
そのため、キャッシュ制御回路112はライトバックを行う。つまり、キャッシュ制御回路112は、第1エントリ111のデータ値欄に格納されているデータ値“0x3333”をアドレス“0x110”の記憶領域に書き込む。
ライトバックの後、キャッシュ制御回路112(または履歴記録回路113)は、第1エントリ111の記録フラグ(r)に未記録状態値(0)を設定する。
図27における処理は、実施の形態1の図18における処理と同じである。In FIG. 27, the second access instruction for the second data processing has occurred. The second access instruction of the second data processing is a write instruction targeting the storage area of the address "0x210". The data value after writing is "0xeeee".
The data value "0x3333" for the storage area of the address "0x110" is stored in the
Therefore, the
After the writeback, the cache control circuit 112 (or the history recording circuit 113) sets the recording flag (r) of the
The process in FIG. 27 is the same as the process in FIG. 18 of the first embodiment.
図28において、ライトバックの後、キャッシュ制御回路112は、アドレス“0x210”の記憶領域からデータ値“0xeeee”を読み込み、読み込んだデータ値を第1エントリ111のデータ値欄に格納する。また、キャッシュ制御回路112は、第1エントリ111のアドレス欄にアドレス“0x210”を設定する。そして、キャッシュ制御回路112は、第1エントリ111の有効フラグ(v)に有効値(1)を設定する。
さらに、キャッシュ制御回路112は、第1エントリ111のデータ値欄にライト値“0xeeee”を書き込む。そして、キャッシュ制御回路112は、第1エントリ111のダーティフラグ(d)に書き込み状態値(1)を設定する。
ライト後のデータ値“0xeeee”は、ライト前のデータ値“0xeeee”と同じである。
そのため、履歴記録回路113は、履歴情報121を記録しない。また、履歴記録回路113は、第1エントリ111の記録フラグ(r)に記録済み状態値(1)を設定しない。In FIG. 28, after writing back, the
Further, the
The data value "0xeeee" after writing is the same as the data value "0xeeee" before writing.
Therefore, the
第2データ処理の第3アクセス命令が発生した場合の処理は、実施の形態1で説明した通りである(図20および図21を参照)。 The processing when the third access instruction of the second data processing is generated is as described in the first embodiment (see FIGS. 20 and 21).
図29に基づいて、第1データ処理と第2データ処理とが終了したときの履歴メモリ120を説明する。
履歴メモリ120には、4つの履歴情報121が記録されている。一方、実施の形態1では、6つの履歴情報121が記録された(図21参照)。
第1履歴情報121は、実施の形態1における第1履歴情報121に対応する。
第2履歴情報121は、実施の形態1における第3履歴情報121に対応する。
第3履歴情報121は、実施の形態1における第4履歴情報121に対応する。
第4履歴情報121は、実施の形態1における第6履歴情報121に対応する。
実施の形態1における第2履歴情報121と実施の形態1における第5履歴情報121とのそれぞれに対応する履歴情報121は、図29の履歴メモリ120に記録されていない。The
Four
The
The
The
The
The
***実施の形態2の効果***
データ値が変化しない場合に履歴情報が記録されないため、履歴メモリ120の容量を削減することができる。メインメモリ202の一部が履歴メモリ120として利用される場合、履歴メモリ120への書き込み回数が削減されることにより、メインメモリ202における帯域削減を図ることができる。*** Effect of
Since the history information is not recorded when the data value does not change, the capacity of the
***他の構成***
履歴記録回路113の代わりにキャッシュ制御回路112が、ライト後のデータ値をライト前のデータ値と比較してもよい。
ライト後のデータ値がライト前のデータ値と同じである場合、キャッシュ制御回路112は、対応エントリのダーティフラグに書き込み状態値を設定しない。つまり、対応エントリのダーティフラグは不変状態値を示す。履歴記録回路113は、対応エントリのダーティフラグを参照する。対応エントリのダーティフラグが書き込み状態値を示さない場合、つまり、対応エントリのダーティフラグが不変状態値を示す場合、履歴記録回路113は、履歴情報を記録しない。*** Other configurations ***
Instead of the
When the data value after writing is the same as the data value before writing, the
***実施の形態の補足***
メモリ履歴管理システム100の構成は、図1から図5において説明した構成に限られない。
例えば、キャッシュ制御回路112と履歴記録回路113とのそれぞれは、キャッシュメモリ110の外部に設けられてもよい。
例えば、メモリ再現部130は、コンピュータ200とは別のコンピュータに設けられてもよい。*** Supplement to the embodiment ***
The configuration of the memory history management system 100 is not limited to the configurations described with reference to FIGS. 1 to 5.
For example, each of the
For example, the
図30に基づいて、メモリ再現部130がメモリ再現装置220に設けられる例を説明する。
メモリ再現装置220は、コンピュータ200とは別に設けられたコンピュータであり、プロセッサ221およびメインメモリ222などのハードウェアを備える。また、メモリ再現装置220は、メモリ再現部223というソフトウェア要素を備える。
メインメモリ222にはメモリ再現プログラムが記憶され、プロセッサ221がメモリ再現プログラムを実行する。
メモリ再現プログラムは、メモリ再現部223としてコンピュータを機能させるためのプログラムである。
但し、メモリ再現部223は、専用回路のようなハードウェアによって実現されてもよい。An example in which the
The
A memory reproduction program is stored in the
The memory reproduction program is a program for operating a computer as a
However, the
実施の形態は、好ましい形態の例示であり、本発明の技術的範囲を制限することを意図するものではない。実施の形態は、部分的に実施してもよいし、他の形態と組み合わせて実施してもよい。フローチャート等を用いて説明した手順は、適宜に変更してもよい。 The embodiments are examples of preferred embodiments and are not intended to limit the technical scope of the invention. The embodiment may be partially implemented or may be implemented in combination with other embodiments. The procedure described using the flowchart or the like may be appropriately changed.
100 メモリ履歴管理システム、110 キャッシュメモリ、111 エントリ、112 キャッシュ制御回路、113 履歴記録回路、120 履歴メモリ、121 履歴情報、130 メモリ再現部、200 コンピュータ、201 プロセッサ、202 メインメモリ、211 アクセス命令リスト、212 アクセス命令リスト、220 メモリ再現装置、221 プロセッサ、222 メインメモリ、223 メモリ再現部。 100 memory history management system, 110 cache memory, 111 entries, 112 cache control circuit, 113 history recording circuit, 120 history memory, 121 history information, 130 memory reproduction unit, 200 computers, 201 processor, 202 main memory, 211 access instruction list , 212 access instruction list, 220 memory reproduction device, 221 processor, 222 main memory, 223 memory reproduction unit.
Claims (7)
前記キャッシュメモリは、前記メインメモリの中の複数の記憶領域に対応する複数のエントリを有し、
それぞれのエントリは、記録フラグを有し、
前記メモリ履歴管理システムは、
前記1つ以上の履歴情報が記録される履歴メモリと、
ライト命令が発生したときに、発生したライト命令の対象となる記憶領域である対象領域に対応するエントリの記録フラグを参照し、参照された記録フラグが、履歴情報の未記録を意味する未記録状態値を示す場合に、前記対象領域から前記キャッシュメモリへ読み込まれたデータ値を含む履歴情報を前記履歴メモリに記録し、且つ、参照された記録フラグに、履歴情報の記録済みを意味する記録済み状態値を設定する履歴記録回路と、を備える
メモリ履歴管理システム。One or more history information is managed by using the data value read from the main memory to the cache memory at the time of a cache miss in order to reproduce the state of the main memory before the occurrence of one or more access instructions. It is a memory history management system
The cache memory has a plurality of entries corresponding to a plurality of storage areas in the main memory.
Each entry has a record flag
The memory history management system
A history memory in which one or more of the history information is recorded, and
When a write instruction is generated, the record flag of the entry corresponding to the target area that is the target storage area of the generated write instruction is referred to, and the referenced record flag is unrecorded, which means that the history information has not been recorded. When indicating a state value, history information including a data value read from the target area to the cache memory is recorded in the history memory, and a record indicating that the history information has been recorded is recorded in the referenced recording flag. A memory history management system equipped with a history recording circuit for setting completed state values.
請求項1に記載のメモリ履歴管理システム。Each history information is selected from one or more history information recorded in the history memory in the reverse order of the recording order, and the data value included in the history information selected in the storage area corresponding to the selected history information is selected. The memory history management system according to claim 1, further comprising a memory reproduction unit that reproduces the state of the main memory before the one or more access instructions are generated by writing.
順番に実行される複数のデータ処理のそれぞれの実行中にライト命令が発生したときに、実行中のデータ処理を識別する処理識別子をさらに含む履歴情報を前記履歴メモリに記録し、
前記複数のデータ処理のそれぞれの終了時に、それぞれのエントリの記録フラグを前記未記録状態値に更新する
請求項1に記載のメモリ履歴管理システム。The history recording circuit
When a write instruction is generated during each execution of a plurality of data processes to be executed in order, history information including a process identifier that further identifies the data process being executed is recorded in the history memory.
The memory history management system according to claim 1, wherein the recording flag of each entry is updated to the unrecorded state value at the end of each of the plurality of data processes.
請求項3に記載のメモリ履歴管理システム。Select each history information from one or more history information including the processing identifier of the data processing executed after the target data processing in the reverse order of the recording order, and select it as the storage area corresponding to the selected history information. The memory history management system according to claim 3, further comprising a memory reproduction unit that reproduces the state of the main memory when the target data processing is started by writing a data value included in the history information.
請求項1から請求項4のいずれか1項に記載のメモリ履歴管理システム。The history recording circuit refers to the recording flag of the corresponding entry corresponding to the target area when the write instruction is generated, and when the referenced recording flag indicates the unrecorded state value, the write of the generated write instruction is written. The later data value is compared with the data value before writing read from the target area into the cache memory, and when the data value after writing is different from the data value before writing, the data value before writing is described. The memory history management system according to any one of claims 1 to 4, wherein history information including the above is recorded in the history memory, and the recorded state value is set in the referenced recording flag.
前記履歴記録回路は、ライトミス時に前記対象領域から前記キャッシュメモリへ読み込まれたデータ値を含む履歴情報を前記履歴メモリに記録する
請求項1から請求項5のいずれか1項に記載のメモリ履歴管理システム。The cache memory is a write-allocate type cache memory.
The memory history according to any one of claims 1 to 5, wherein the history recording circuit records history information including data values read from the target area into the cache memory at the time of a write error in the history memory. Management system.
前記キャッシュメモリが、前記履歴記録回路を備える
請求項1から請求項6のいずれか1項に記載のメモリ履歴管理システム。The memory history management system includes the cache memory.
The memory history management system according to any one of claims 1 to 6, wherein the cache memory includes the history recording circuit.
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2018/037979 WO2020075276A1 (en) | 2018-10-11 | 2018-10-11 | Memory history management system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP6818962B2 true JP6818962B2 (en) | 2021-01-27 |
| JPWO2020075276A1 JPWO2020075276A1 (en) | 2021-02-18 |
Family
ID=70164048
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020549909A Expired - Fee Related JP6818962B2 (en) | 2018-10-11 | 2018-10-11 | Memory history management system |
Country Status (3)
| Country | Link |
|---|---|
| JP (1) | JP6818962B2 (en) |
| TW (1) | TW202014899A (en) |
| WO (1) | WO2020075276A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118964232B (en) * | 2024-10-16 | 2024-12-31 | 上海芯力基半导体有限公司 | Data access method and processor |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3083786B2 (en) * | 1996-09-30 | 2000-09-04 | 株式会社東芝 | Memory update history storage device and memory update history storage method |
| JP2000181790A (en) * | 1998-12-18 | 2000-06-30 | Toshiba Corp | Memory update history storage device |
-
2018
- 2018-10-11 JP JP2020549909A patent/JP6818962B2/en not_active Expired - Fee Related
- 2018-10-11 WO PCT/JP2018/037979 patent/WO2020075276A1/en not_active Ceased
-
2019
- 2019-04-26 TW TW108114651A patent/TW202014899A/en unknown
Also Published As
| Publication number | Publication date |
|---|---|
| JPWO2020075276A1 (en) | 2021-02-18 |
| WO2020075276A1 (en) | 2020-04-16 |
| TW202014899A (en) | 2020-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4688584B2 (en) | Storage device | |
| EP2329361B1 (en) | Aggregation of write traffic to a data store | |
| US20040010663A1 (en) | Method for conducting checkpointing within a writeback cache | |
| US8914579B2 (en) | Access device, information recording device, controller, and information recording system | |
| TWI406127B (en) | How to update user data | |
| KR100370893B1 (en) | Flash memory unit and control method of flash memory | |
| CN109902034B (en) | Snapshot creating method and device, electronic equipment and machine-readable storage medium | |
| JP2013222435A (en) | Semiconductor storage device and method of controlling the same | |
| US20210263862A1 (en) | Maintaining ghost cache statistics for demoted data elements | |
| US20100205391A1 (en) | Memory system and managing method therefor | |
| JP2010152747A (en) | Storage system, cache control method and cache control program for storage | |
| JP5286796B2 (en) | Memory control device | |
| CN104137100A (en) | Database device, program, and data processing method | |
| JP2009020696A (en) | Information processing apparatus and system | |
| JP6818962B2 (en) | Memory history management system | |
| US10430287B2 (en) | Computer | |
| CN112015159B (en) | Fault record storage method based on dual-core MCU and computer system | |
| CN115048457B (en) | Method, device and storage medium for processing state data based on block chain | |
| JP2008047155A (en) | Batch erasable nonvolatile memory and mobile phone | |
| JP2009020695A (en) | Information processing apparatus and system | |
| JP2006099802A (en) | Storage controller and cache memory control method | |
| JPH08137748A (en) | Computer having copyback cache and copyback cache control method | |
| JP7572520B1 (en) | STORAGE APPARATUS, STORAGE CONTROL METHOD, AND PROGRAM | |
| JPH0784886A (en) | Cache memory control method and cache memory control device | |
| TW201418984A (en) | Method for protecting data integrity of disk and computer program product for implementing the method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201105 |
|
| A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20201105 |
|
| A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20201124 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20201201 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201228 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6818962 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |