JP6469599B2 - Memory management system - Google Patents
Memory management system Download PDFInfo
- Publication number
- JP6469599B2 JP6469599B2 JP2016012483A JP2016012483A JP6469599B2 JP 6469599 B2 JP6469599 B2 JP 6469599B2 JP 2016012483 A JP2016012483 A JP 2016012483A JP 2016012483 A JP2016012483 A JP 2016012483A JP 6469599 B2 JP6469599 B2 JP 6469599B2
- Authority
- JP
- Japan
- Prior art keywords
- shared memory
- memory
- program
- memory management
- reliability
- 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.)
- Active
Links
- 230000015654 memory Effects 0.000 title claims description 622
- 238000000034 method Methods 0.000 claims description 82
- 230000008569 process Effects 0.000 claims description 79
- 230000005856 abnormality Effects 0.000 claims description 63
- 238000001514 detection method Methods 0.000 claims description 58
- 238000012986 modification Methods 0.000 claims description 28
- 230000004048 modification Effects 0.000 claims description 28
- 238000012545 processing Methods 0.000 description 29
- 230000006870 function Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 8
- 238000012937 correction Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 239000004065 semiconductor Substances 0.000 description 5
- 230000008859 change Effects 0.000 description 3
- 101100163911 Arabidopsis thaliana ASIL1 gene Proteins 0.000 description 2
- 101100163912 Arabidopsis thaliana ASIL2 gene Proteins 0.000 description 2
- 230000004075 alteration Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000010485 coping Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007257 malfunction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 229910052710 silicon Inorganic materials 0.000 description 1
- 239000010703 silicon Substances 0.000 description 1
Images
Description
本発明は、メモリ管理システムに関する。 The present invention relates to a memory management system.
近年、多くの車両制御は、電子化された車両制御機器を操作する電子制御装置(ECU:Electronic Control Unit)によって行われている。自動運転など車両制御に関する要求の高度化により、ECUに求められる機能も高度化、複雑化している。
その一方で、自動車の車両制御には、装置のソフトウェア・ハードウェアの誤作動を回避するための安全性もまた求められる。プログラムの安全度を示すために、開発過程での安全設計や安全性検証を行うことで認証を受けられるASILという指標がISO26262で定義されている。車両に搭載された各機器の動作を制御する制御プログラムでは安全度を高めることができるが、自動運転を実現するための高度な画像処理機能や機械学習においては、処理が複雑であるため全体を安全とすることは難しい。そのため、今後の自動運転システムでは、安全度の高い車両制御プログラムと、相対的に安全度の低い高度情報処理プログラムを混載し、これらを連携させて動かすことが求められている。
ところで、ECUは主記憶装置、すなわち物理メモリを構成の一つとして備える。物理メモリは偶発的なエラーへの対処の観点から複数の種類に分類することができ、その種類ごとにエラーに対する信頼性が異なる。信頼性の高いメモリは高コストなので、ECUには信頼性の異なる複数種類のメモリが混在して用いられることが多い。
特許文献1には、安全度の高い車両制御プログラムと安全度の低いプログラムを同一計算機上で動かす場合の、それぞれのプログラムの使うメモリのアクセス制限の基本的な仕組みが開示されている。
In recent years, many vehicle controls are performed by an electronic control unit (ECU) that operates electronic vehicle control equipment. Due to sophistication of requirements related to vehicle control such as automatic driving, the functions required of ECUs are becoming more sophisticated and complicated.
On the other hand, vehicle control of automobiles also requires safety for avoiding malfunction of software and hardware of the apparatus. In order to show the degree of safety of the program, ISO 26262 defines an index called ASIL that can be certified by performing safety design and safety verification during the development process. The control program that controls the operation of each device mounted on the vehicle can increase the safety level, but in the advanced image processing functions and machine learning for realizing automatic driving, the processing is complicated, so the whole It is difficult to be safe. Therefore, in the future automatic driving system, it is required to load a vehicle control program with a high degree of safety and an advanced information processing program with a relatively low degree of safety, and to move them in cooperation.
By the way, the ECU includes a main memory, that is, a physical memory as one of the components. The physical memory can be classified into a plurality of types from the viewpoint of coping with accidental errors, and the reliability with respect to errors differs depending on the type. Since a highly reliable memory is expensive, a plurality of types of memories with different reliability are often used together in the ECU.
特許文献1に記載されている発明では、物理メモリ上で起きる偶発的なエラーによって安全性の高いプログラムの動作が妨げられることを防ぐことができない。
In the invention described in
本発明の第1の態様によると、メモリ管理システムは、CPUと、エラーに対する信頼性が互いに異なる複数の物理メモリと、前記CPUにより実行されて安全性が互いに異なる複数のプログラムからアクセスするために前記物理メモリに作成された共有メモリに関する情報が記録されている共有メモリ管理テーブルを記憶する記憶部と、前記プログラムによる前記共有メモリへのアクセスを管理する共有メモリ管理部と、を備え、前記共有メモリ管理テーブルは、前記共有メモリの信頼性に関する情報を含み、前記共有メモリ管理部は、前記共有メモリ管理テーブルを参照して、前記共有メモリの信頼性と前記プログラムの安全性に対応する信頼性とを比較し、その比較結果に基づいて前記プログラムによる前記共有メモリへのアクセスを管理する。 According to the first aspect of the present invention, a memory management system is configured to access a CPU, a plurality of physical memories having different reliability with respect to errors, and a plurality of programs executed by the CPU and having different safety. A storage unit that stores a shared memory management table in which information relating to the shared memory created in the physical memory is recorded; and a shared memory management unit that manages access to the shared memory by the program. The memory management table includes information related to the reliability of the shared memory, and the shared memory management unit refers to the shared memory management table, and the reliability corresponding to the reliability of the shared memory and the safety of the program And accessing the shared memory by the program based on the comparison result To management.
本発明によれば、物理メモリ上で起きる偶発的なエラーによって安全性の高いプログラムの動作が妨げられることを防ぎ、安全性の高いプログラムの可用性を向上することができる。 According to the present invention, it is possible to prevent the operation of a highly secure program from being hindered by an accidental error occurring in the physical memory, and to improve the availability of a highly secure program.
<実施の形態に共通する事項:物理メモリの種類>
物理メモリは、メモリセルに蓄えられた電荷の有無により情報を記録している。この電荷が外的要因、たとえば宇宙からの中性子線により偶発的に書き変わる問題、いわゆるソフトエラーの問題が知られている。この問題に対処するために、ソフトエラーの検知や訂正が可能な物理メモリが開発されている。ソフトエラーの検知や訂正の観点から、たとえば物理メモリを、ソフトエラーに対する信頼性がそれぞれ異なる以下の3つに分類することができる。
<Items common to the embodiments: types of physical memory>
The physical memory records information based on the presence or absence of charges stored in the memory cells. There is a known problem that this charge is accidentally rewritten by external factors such as neutrons from the universe, so-called soft error. In order to deal with this problem, physical memory capable of detecting and correcting soft errors has been developed. From the viewpoint of detection and correction of soft errors, for example, physical memory can be classified into the following three types having different reliability against soft errors.
1)ノンパリティメモリ
専ら情報を記憶することに特化しており、エラーの発生の検知およびエラーの訂正を目的とした特別な構成を有しない物理メモリ。
2)パリティ付きメモリ
ソフトエラーの発生を検出するパリティビットの記憶領域を有する物理メモリ。たとえば8ビットのデータを保存する際に、Highのビット数が合計で偶数になるように1ビットのパリティビットがその8ビットのデータと関連付けて物理メモリに保存される。
3)ECC付きメモリ
ソフトエラーの検出および訂正(Error Check and Correct、ECC)が可能となるECCビットの記憶領域を有する物理メモリ。たとえば8ビットのデータが保存される際に2ビットのECCビットが算出されその8ビットのデータに関連付けて保存される。この場合は、1ビットのソフトエラーであれば検出および訂正が可能であり、2ビットのソフトエラーであれば検出のみが可能である。ECCビット数を増加させることで訂正可能なビット数を増やすことができる。
以下ではパリティビットとECCビットをまとめて「付加ビット」と呼ぶこともある。
以下に説明する実施の形態ではこの3つを対象として説明するが、本発明はチップスペアリングなど上記3つ以外の物理メモリにも適用可能である。
1) Non-parity memory A physical memory that is specialized in storing information and does not have a special configuration for the purpose of detecting the occurrence of an error and correcting the error.
2) Memory with parity Physical memory having a parity bit storage area for detecting the occurrence of a soft error. For example, when storing 8 bits of data, 1 parity bit is stored in the physical memory in association with the 8 bits of data so that the total number of high bits is an even number.
3) Memory with ECC A physical memory having a storage area of ECC bits that enables detection and correction (ECC) of soft errors. For example, when 8-bit data is stored, 2-bit ECC bits are calculated and stored in association with the 8-bit data. In this case, a 1-bit soft error can be detected and corrected, and a 2-bit soft error can be detected only. The number of bits that can be corrected can be increased by increasing the number of ECC bits.
Hereinafter, the parity bits and the ECC bits may be collectively referred to as “additional bits”.
In the embodiments described below, these three will be described, but the present invention is also applicable to physical memories other than the above three such as chip sparing.
(第1の実施の形態)
以下、図1〜図10を参照して、共有メモリ管理システムの第1の実施の形態を説明する。
図1は、本発明にかかる共有メモリ管理システム8の構成を示すブロック図である。共有メモリ管理システム8は、CPU1と、複数の物理メモリと、メモリコントローラ6と、記憶部7とを備える。CPU1、メモリコントローラ6、および記憶部7は、データバス5により接続される。
(First embodiment)
Hereinafter, a first embodiment of a shared memory management system will be described with reference to FIGS.
FIG. 1 is a block diagram showing a configuration of a shared memory management system 8 according to the present invention. The shared memory management system 8 includes a
共有メモリ管理システム8は複数の物理メモリスロットを備え、ソフトエラーに対する信頼性や容量の異なる物理メモリを接続できる。本実施の形態では、物理メモリ3a、3b、3cの3つが備えられているとする。以下では、物理メモリ3a、3b、3cを区別する必要がない場合はまとめて物理メモリ3と呼ぶ。
本明細書では、共有メモリとはいずれかの物理メモリに確保される記憶領域であって複数のプログラムからアクセスされることを前提に管理される記憶領域をいう。また共有メモリと区別するために、物理メモリに確保される記憶領域であって単独のプログラム7Aからのみアクセスされることを前提とされる記憶領域を非共有メモリと呼ぶ。
The shared memory management system 8 includes a plurality of physical memory slots, and can connect physical memories having different reliability and capacity against soft errors. In this embodiment, it is assumed that three
In this specification, the shared memory is a storage area secured in one of the physical memories and managed on the premise that it is accessed from a plurality of programs. In order to distinguish from the shared memory, a storage area secured in the physical memory and assumed to be accessed only from a
物理メモリ3は、高速に読み書きが可能な揮発性記憶領域と、SPD(Serial Presence Detect)情報を格納する小容量の不揮発性記憶領域を備える。SPD情報とは、物理メモリの特性を表す情報であり、たとえばサイズ、すなわち記憶容量、パリティビットの有無、エラー訂正可能なビット数、動作周波数である。なお、本実施の形態ではCPU1が揮発性記憶領域を備える場合は、その揮発性記憶領域も物理メモリ3の1つであるとして扱う。CPU1が揮発性記憶領域を備える場合は、CPU1の読み出し専用領域にSPD情報が格納される。そのため、物理メモリがCPU1と同一の半導体内部に配置されているか否かは、SPD情報に基づき判断できる。
The
記憶部7には複数のプログラム7A、およびオペレーティングシステム(以下、OS)7Bが格納される。
CPU1は、記憶部7に格納されたプログラム7Aを物理メモリ3に読み込んで実行する。CPU1は、プログラム7Aの指令に基づきメモリコントローラ6に物理メモリ3へのアクセス、たとえば共有メモリの作成、共有メモリの読み書き、非共有メモリの読み書き、を要求する。なお図1ではCPU1は1つのみ存在するが、共有メモリ管理システム8が複数のCPUを備えて冗長性を確保してもよい。
The storage unit 7 stores a plurality of
The
メモリコントローラ6は、物理メモリ3がデータバス5と接続されるインタフェースであり、メモリ異常検知部20を備える。メモリコントローラ6が有する基本的な機能はメモリコントローラ6が備えるハードウエアロジックにより実現され、共有メモリの処理など高度な機能はOS7B、すなわちソフトウエアにより実現される。共有メモリに関する機能は後述する。メモリコントローラ6が有する基本的な機能とは、メモリコントローラ6の物理メモリ3に対するアドレスを指定した読み書き、およびメモリ異常検知部20のメモリ異常の検知である。
The memory controller 6 is an interface for connecting the
メモリ異常検知部20は、パリティビットやECCビットの処理を行う。たとえば、メモリコントローラ6がパリティ付きメモリにデータを書き込む際は、メモリ異常検知部20がパリティビットの算出を行い、メモリコントローラ6がデータとともにそのデータに関連付けられたパリティビットをパリティ付きメモリに書きこむ。また、メモリコントローラ6がパリティ付きメモリからデータを読み込む際は、メモリコントローラ6がデータとともにそのデータに関連付けられたパリティビットを読み込むと、メモリ異常検知部20がパリティビットの整合性を確認する。データとパリティビットの整合性がある場合は異常が検出されないので特段の処理を行わない。データとパリティビットの整合性がない場合、すなわちソフトエラーを検出した場合はCPU1に処理を停止させる割り込み命令を出力する。メモリ異常検知部20は、メモリコントローラ6がECC付きメモリにアクセスする際にも同様の処理を行い、読み出しの際にエラーを検出すると訂正可能な範囲でエラーを訂正してデータをCPU1に出力し、訂正が不可能な場合はCPU1に処理を停止させる割り込み命令を出力する。たとえば1ビット訂正可能なECCメモリにおいて、メモリ異常検知部20が2ビット書き換えられたことを検出するとエラー訂正が可能な範囲を超えているためCPU1に割り込み命令を出力する。
The memory
メモリ異常検知部20の機能はたとえばCoreLink DMC-400 Dynamic Memory Controller Technical Reference Manual(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0466c/apas07s01.html)などに示されている。
The function of the memory
(共有メモリに関する機能)
OS7B、すなわちソフトウエアにより実現される、共有メモリに関する機能を説明する。図2は、OS7Bにより実現される3つの機能を機能ブロックとして表し、それら機能ブロックが作成・使用する情報を併せて示す図である。
OS7Bにより実現される機能を表す3つの機能ブロックとは、共有メモリの読み書きに関する処理を担当する共有メモリ管理部17、共有メモリを作成する共有メモリ作成部18、および共有メモリを作成する準備を行うメモリ管理初期化部19である。
(Functions related to shared memory)
A function related to the shared memory realized by the
With the three functional blocks representing the functions realized by the
これら3つの機能ブロックが作成・使用する情報は、プログラム管理テーブル12、共有メモリ管理テーブル14、物理メモリ信頼度テーブル15、および安全度対応テーブル16である。図2における破線は読み込みを行うことを示しており、図中の実線は作成や書き込みを行うことを示している。プログラム管理テーブル12、共有メモリ管理テーブル14、物理メモリ信頼度テーブル15、および安全度対応テーブル16は、物理メモリ3a、3b、3cのうち最も信頼度の高いものに配置される。
The information created and used by these three functional blocks is a program management table 12, a shared memory management table 14, a physical memory reliability table 15, and a safety level correspondence table 16. A broken line in FIG. 2 indicates that reading is performed, and a solid line in the drawing indicates that creation or writing is performed. The program management table 12, the shared memory management table 14, the physical memory reliability table 15, and the safety correspondence table 16 are arranged in the
メモリ管理初期化部19は、共有メモリ管理システム8が起動するたびに、共有メモリ管理システム8に接続されている全ての物理メモリ3からSPD情報を読み込み、後述する手順で物理メモリ信頼度テーブル15を作成する。
共有メモリ作成部18は、プログラム7Aからの共有メモリの作成要求に基づき後述する手順で共有メモリを作成し、作成した共有メモリの情報を共有メモリ管理テーブル14に書きこむ。
共有メモリ管理部17は、プログラム7Aからの共有メモリの読み書き要求に基づき、後述するようにアクセス可否を判断する。アクセス可能と判断する場合は共有メモリのアドレスを特定してメモリコントローラ6の基本的な機能により読み書きを実行し、アクセス不可と判断する場合はエラーを出力する。
The memory
Based on a shared memory creation request from the
Based on the shared memory read / write request from the
プログラム管理テーブル12には、プログラム7Aを識別するプログラム識別子と、プログラムの安全度とが関連付けて記録される。プログラム識別子とは、プログラム7Aを識別する一意な文字列であり文字列そのものに意味はない。安全度とは、たとえばISO26262においてASIL(Automotive Safety Integrity Level)を用いて分類される、プログラム7Aに欠陥があった場合のリスクの大きさを示した指標であり、QM<ASIL0<ASIL1<ASIL2<ASIL3、の順に右側ほどリスクが大きいことを示す。プログラム管理テーブル12に記録される情報は静的であり、原則として書き換えられない。
図3は、プログラム管理テーブル12の一例を示す図である。図3には、プログラム識別子がAAA、BBB,CCC,DDDである4つのプログラムが、それぞれ、ASIL2、QM、QM、ASIL1の安全度であることがわかる。
In the program management table 12, the program identifier for identifying the
FIG. 3 is a diagram illustrating an example of the program management table 12. FIG. 3 shows that the four programs whose program identifiers are AAA, BBB, CCC, and DDD have the safety levels of ASIL2, QM, QM, and ASIL1, respectively.
安全度対応テーブル16には、プログラム7Aの安全度ごとに必要な物理メモリ3の信頼度が関連付けて記録される。安全度対応テーブル16に記録される情報は静的であり、原則として書き換えられない。後述するように、あるプログラムがアクセス可能な物理メモリは、そのプログラムの安全度に対応する信頼度以上の信頼度を有するメモリである。
図4は安全度対応テーブル16の一例を示す図である。物理メモリ3の信頼度はたとえば数字により表される。物理メモリ3の信頼度は大きい数ほどエラーに対する信頼性が高く、ソフトエラーによるデータ異常が発生しにくいことを示す。図4からたとえば、安全度がASIL1のプログラムがアクセス可能な物理メモリ3は、信頼度が3または4の物理メモリ3であることがわかる。
In the safety degree correspondence table 16, the reliability of the
FIG. 4 is a diagram showing an example of the safety level correspondence table 16. The reliability of the
物理メモリ信頼度テーブル15には、共有メモリ管理システム8に搭載されるそれぞれの物理メモリ3に関して、OS7Bが管理するアドレス空間との対応、およびその物理メモリの信頼度が格納される。アドレス空間の対応は、たとえば先頭アドレスと領域の広さ、すなわちサイズとで表すことができる。ただしアドレス空間の対応は、先頭アドレスと終了アドレスで表してもよい。物理メモリ信頼度テーブル15はメモリ管理初期化部19により共有メモリ管理システム8が起動するたびに作成される。たとえば、共有メモリ管理システム8を構成する物理メモリ3を入れ替えると、メモリ管理初期化部19により新たな物理メモリ信頼度テーブル15が作成される。
図5は、物理メモリ信頼度テーブル15の一例を示す図である。図5に示す例では、共有メモリ管理システム8が3つの物理メモリを備え、それぞれの物理メモリの信頼度が0,1,3であることがわかる。
The physical memory reliability table 15 stores, for each
FIG. 5 is a diagram illustrating an example of the physical memory reliability table 15. In the example shown in FIG. 5, it can be seen that the shared memory management system 8 includes three physical memories, and the reliability of each physical memory is 0, 1, and 3.
共有メモリ管理テーブル14には、作成されている共有メモリに関する情報、すなわち、OS7Bが管理するアドレス空間における共有メモリの先頭アドレス、サイズ、共有メモリ識別子、および信頼度が記録される。共有メモリ識別子とは、異なるプログラム同士がメモリを共有するために事前に定める識別子である。共有メモリの信頼度とは、その共有メモリが格納される物理メモリの信頼度である。
図6は、共有メモリ管理テーブル14の一例を示す図である。図4に示す例では、共有メモリ識別子がSH_A、SH_B、SH_C、SH_Dの4つの共有メモリが作成されていることがわかる。
The shared memory management table 14 records information about the shared memory being created, that is, the top address, size, shared memory identifier, and reliability of the shared memory in the address space managed by the
FIG. 6 is a diagram illustrating an example of the shared memory management table 14. In the example shown in FIG. 4, it can be seen that four shared memories having shared memory identifiers SH_A, SH_B, SH_C, and SH_D are created.
(メモリ管理初期化部19の動作)
メモリ管理初期化部19による物理メモリ信頼度テーブル15の作成を説明する。
図7は、共有メモリ管理システム8が起動した際に動作するメモリ管理初期化部19の初期化処理を示すフローチャートである。以下に説明する各ステップの実行主体は共有メモリ管理システム8のCPU1である。
ステップS501では、物理メモリ信頼度テーブル15をゼロクリア、すなわち記録されている情報を削除し、ステップS502に進む。
続くステップS502〜S509の処理は共有メモリ管理システム8に接続されている物理メモリ3の数だけ繰り返され、処理対象の物理メモリ3を順番に変更する。
(Operation of the memory management initialization unit 19)
The creation of the physical memory reliability table 15 by the memory
FIG. 7 is a flowchart showing an initialization process of the memory
In step S501, the physical memory reliability table 15 is cleared to zero, that is, the recorded information is deleted, and the process proceeds to step S502.
The subsequent steps S502 to S509 are repeated by the number of
ステップS502では、処理対象の物理メモリ3のSPD情報を読み込み、続くステップS502Aでは処理対象の物理メモリの信頼度を仮にゼロに設定し、ステップS503に進む。
ステップS503では、ステップS502において読み込んだSPD情報に基づき、処理対象の物理メモリがパリティビットやECCビットを備えるか否かを判断する。いずれかを備えると判断する場合はステップS504に進み、いずれも備えない、すなわちノンパリティであると判断する場合はステップS509に進む。
ステップS504では物理メモリの信頼度を仮に1に設定し、ステップS505に進む。
In step S502, the SPD information of the
In step S503, based on the SPD information read in step S502, it is determined whether or not the physical memory to be processed has a parity bit or an ECC bit. If it is determined that any of them is provided, the process proceeds to step S504, and if none is provided, that is, if it is determined to be non-parity, the process proceeds to step S509.
In step S504, the reliability of the physical memory is temporarily set to 1, and the process proceeds to step S505.
ステップS505では、処理対象の物理メモリがECCビットを備えるか否かを判断し、ECCビットを備えると判断する場合はステップS506に進み、ECCビットを備えないと判断する場合はステップS509に進む。
ステップS506では、処理対象の物理メモリの信頼度に訂正可能ビット数を加算し、ステップS507に進む。たとえば2ビットが訂正可能であれば、その物理メモリ3の信頼度は3である。
ステップS507では、処理対象の物理メモリがCPU1と同一の半導体内部に配置されているか否かを判断する。この判断は、前述のSPD情報に基づき判断できる。同一の半導体内部に配置されていると判断する場合はステップS508に進み、同一の半導体内部に配置されていないと判断する場合はステップS509に進む。
In step S505, it is determined whether or not the physical memory to be processed has an ECC bit. If it is determined that the physical bit includes an ECC bit, the process proceeds to step S506. If it is determined that the physical bit does not include an ECC bit, the process proceeds to step S509.
In step S506, the correctable bit number is added to the reliability of the physical memory to be processed, and the process proceeds to step S507. For example, if 2 bits can be corrected, the reliability of the
In step S507, it is determined whether the physical memory to be processed is arranged in the same semiconductor as the CPU1. This determination can be made based on the aforementioned SPD information. If it is determined that they are disposed within the same semiconductor, the process proceeds to step S508. If it is determined that they are not disposed within the same semiconductor, the process proceeds to step S509.
ステップS508では、ステップS506において加算された物理メモリの信頼度にさらに1を加算する。ここで信頼度を加算する理由は2つある。第1の理由は、物理メモリがCPU1と同一の半導体内部に配置されている場合は、当該物理メモリの容量が小さく中性子線の影響を受ける確率が低いからである。第2の理由は、同一のシリコンダイに配置されていれば配線長が短く通信中のノイズの影響を受けにくいからである。次にステップS509に進む。
In step S508, 1 is further added to the reliability of the physical memory added in step S506. Here, there are two reasons for adding the reliability. The first reason is that when the physical memory is arranged in the same semiconductor as the
ステップS509では、物理メモリ信頼度テーブル15に処理対象の物理メモリに関する以下の3つの情報を書き込む。すなわち、OS7Bが管理するメモリ空間におけるその物理メモリの先頭アドレス、ステップS502において読み込んだSPD情報に含まれる物理メモリのサイズ、およびステップS502A〜ステップS508において算出した物理メモリの信頼度である。なおOS7Bが管理するメモリ空間におけるその物理メモリの先頭アドレスは、物理メモリ信頼度テーブル15に物理メモリの情報が書き込まれていなければゼロ(0x0000)であり、物理メモリの情報が書き込まれていれば最下段の物理メモリ先頭アドレスにその最下段の物理メモリのサイズを加算した値となる。
以上説明したステップS502〜ステップS509を共有メモリ管理システム8に接続されているそれぞれの物理メモリ3を対象に繰り返し、これが終了すると図7に示すフローチャートを終了する。
In step S509, the following three pieces of information related to the physical memory to be processed are written in the physical memory reliability table 15. That is, the start address of the physical memory in the memory space managed by the
Steps S502 to S509 described above are repeated for each
(共有メモリ作成部18の動作)
共有メモリ作成部18による共有メモリの割り当て、および共有メモリ管理テーブル14への追記を説明する。
図8は、メモリコントローラ6がプログラム7Aから共有メモリの作成指令を受けた際に共有メモリ作成部18が行う処理を示すフローチャートである。以下に説明する各ステップの実行主体は共有メモリ管理システム8のCPU1である。
ステップS601では、共有メモリの作成を要求したプログラム7Aの識別子、作成を要求されている共有メモリの識別子、および作成を要求されている共有メモリのサイズを読み込み、ステップS602に進む。
(Operation of shared memory creation unit 18)
Allocation of shared memory by the shared memory creation unit 18 and addition to the shared memory management table 14 will be described.
FIG. 8 is a flowchart showing the processing performed by the shared memory creating unit 18 when the memory controller 6 receives a shared memory creation command from the
In step S601, the identifier of the
ステップS602では、プログラム管理テーブル12を読み込み、ステップS603に進む。
ステップS603では、プログラム管理テーブル12を用いてステップS601において読み込んだプログラム7Aの識別子に対応する安全度を特定し、ステップS604に進む。
ステップS604では、安全度対応テーブル16を読み込みステップS605に進む。
ステップS605では、安全度対応テーブル16を用いてステップS603において特定した安全度に対応する信頼度を特定し、ステップS606に進む。
In step S602, the program management table 12 is read, and the process proceeds to step S603.
In step S603, the degree of safety corresponding to the identifier of the
In step S604, the safety degree correspondence table 16 is read, and the process proceeds to step S605.
In step S605, the reliability corresponding to the safety degree specified in step S603 is specified using the safety degree correspondence table 16, and the process proceeds to step S606.
ステップS606では、共有メモリ管理テーブル14、および物理メモリ信頼度テーブル15を読み込み、ステップS607に進む。
ステップS607では、共有メモリ管理テーブル14、および物理メモリ信頼度テーブル15を参照して、ステップS605において特定した信頼度以上の信頼度があり、まだ共有メモリに割り当てられていない領域(以下、未割当領域)が要求されたサイズ以上ある物理メモリ3を特定する。複数の物理メモリ3が特定された場合は、特定された中で最も信頼度が低い物理メモリ3を選択する。次にステップS608に進む。
ステップS608では、ステップS607において条件を満たす物理メモリ3を特定できたか否かを判断し、特定できた場合はステップS609に進み、発見できなかった場合はステップS611に進む。
In step S606, the shared memory management table 14 and the physical memory reliability table 15 are read, and the process proceeds to step S607.
In step S607, with reference to the shared memory management table 14 and the physical memory reliability table 15, an area that has a reliability higher than the reliability specified in step S605 and has not yet been allocated to the shared memory (hereinafter, unallocated). The
In step S608, it is determined whether or not the
ステップS609では、ステップS607において特定した物理メモリ3の未割当領域の先頭アドレス、要求された共有メモリのサイズ、共有メモリ識別子、および特定した物理メモリ3の信頼度を共有メモリ管理テーブル14に書きこみステップS610に進む。共有メモリ管理テーブル14にメモリ領域の情報を書き込むことにより、共有メモリを作成すると共に、作成された共有メモリに関する情報が記録された新たな共有メモリ管理テーブル14を作成したことになる。そして、作成した新たな共有メモリ管理テーブル14を記憶部7に記憶させる。
ステップS610では、作成した共有メモリのアドレスを共有メモリの作成を要求したプログラムに出力し、図8のフローチャートを終了する。
ステップS611では、共有メモリを確保できなかった旨のエラーを共有メモリの作成を要求したプログラムに出力し、図8のフローチャートを終了する。
In step S609, the start address of the unallocated area of the
In step S610, the address of the created shared memory is output to the program that requested the creation of the shared memory, and the flowchart of FIG. 8 ends.
In step S611, an error indicating that the shared memory could not be secured is output to the program that requested the creation of the shared memory, and the flowchart of FIG. 8 ends.
(共有メモリ管理部17の動作)
共有メモリ管理部17による、プログラムからの要求に応じた共有メモリへのアクセスを説明する。
図9は、共有メモリ管理部17がプログラムから共有メモリのアドレスを要求された場合の処理を示すフローチャートである。
ステップS701では、アクセスを要求したプログラム7Aの識別子、およびアクセスする対象となる共有メモリの識別子を読み込み、ステップS702に進む。
(Operation of shared memory management unit 17)
The access to the shared memory according to the request from the program by the shared memory management unit 17 will be described.
FIG. 9 is a flowchart showing processing when the shared memory management unit 17 requests the shared memory address from the program.
In step S701, the identifier of the
ステップS702では、プログラム管理テーブル12を読み込み、ステップS703に進む。
ステップS703では、プログラム管理テーブル12を用いてステップS701において読み込んだプログラム7Aの識別子に対応する安全度を特定し、ステップS704に進む。
ステップS704では、安全度対応テーブル16を読み込みステップS705に進む。
ステップS705では、安全度対応テーブル16を用いてステップS703において特定した安全度に対応する信頼度を特定し、ステップS706に進む。
In step S702, the program management table 12 is read, and the process proceeds to step S703.
In step S703, the degree of safety corresponding to the identifier of the
In step S704, the safety degree correspondence table 16 is read and the process proceeds to step S705.
In step S705, the reliability corresponding to the safety specified in step S703 is specified using the safety correspondence table 16, and the process proceeds to step S706.
ステップS706では、共有メモリ管理テーブル14を読み込み、ステップS707に進む。
ステップS707では、アクセス対象である共有メモリの信頼度を特定する。すなわち、ステップS706において読み込んだ共有メモリ管理テーブル14を参照して、ステップS701において読み込んだアクセス対象である共有メモリの識別子に対応する共有メモリ信頼度を特定する。次にステップS708に進む。
In step S706, the shared memory management table 14 is read, and the process proceeds to step S707.
In step S707, the reliability of the shared memory to be accessed is specified. That is, with reference to the shared memory management table 14 read in step S706, the shared memory reliability corresponding to the identifier of the shared memory to be accessed read in step S701 is specified. Next, the process proceeds to step S708.
ステップS708では、アクセス条件を満たすか否かの判定を行う。ここでは、ステップS707において特定した共有メモリの信頼度と、ステップS703において特定したプログラム7Aの安全度に対応する信頼度とを比較して、アクセス対象の共有メモリの信頼度がアクセスを要求したプログラム7Aの安全度に対応する信頼度以上であるか否かを判断する。その結果、アクセス対象の共有メモリの信頼度がアクセスを要求したプログラム7Aの安全度に対応する信頼度以上であれば、アクセス条件を満たすと判断してステップS709に進み、そうでない場合はアクセス条件を満たさないと判断してステップS710に進む。
たとえば、識別子が「BBB」であるプログラム7Aが共有メモリ識別子「SH_B」の共有メモリへのアクセスを要求した場合は以下のように判断される。すなわち、プログラム管理テーブル12を参照すると識別子「BBB」であるプログラム7Aの安全度は「QM」であり、物理メモリ信頼度テーブル15を参照すると安全度「QM」に対応する信頼度は「1」である。共有メモリ管理テーブル14を参照すると、共有メモリ識別子「SH_B」の共有メモリの信頼度は「2」なので、「2」>「1」でありステップS708の条件を満たすと判断できる。すなわち、アクセス対象である共有メモリ識別子「SH_B」の共有メモリの信頼性は、アクセスを要求した識別子「BBB」であるプログラム7Aの安全度「QM」に対応する信頼性よりも高いため、アクセス条件を満たすと判断することができる。
In step S708, it is determined whether an access condition is satisfied. Here, the reliability of the shared memory identified in step S707 is compared with the reliability corresponding to the safety level of the
For example, when the
ステップS709では、プログラム7Aからの要求に従い共有メモリにアクセスし、読み込んだデータの出力、または書き込みの終了を示す信号を出力して図9のフローチャートを終了する。
ステップS708において否定判定されると実行されるステップS710では、アクセスを要求したプログラム7Aにアクセスが拒否された旨のエラーを出力し、図9のフローチャートを終了する。
なおステップS709において、共有メモリ管理部17が共有メモリへのアクセスまでは行わず、プログラム7Aに共有メモリの先頭アドレスを出力してもよい。前述の例では共有メモリ識別子「SH_B」の共有メモリの先頭アドレスである「0x1000」を出力する。
In step S709, the shared memory is accessed in accordance with a request from the
In step S710, which is executed when a negative determination is made in step S708, an error indicating that access is denied is output to the
In step S709, the shared memory management unit 17 may output the start address of the shared memory to the
(メモリ異常検知部20の動作)
メモリ異常検知部20の動作、すなわちパリティビットやECCビットの処理を説明する。
図10は、メモリ異常検知部20の動作を表すフローチャートである。メモリ異常検知部20は、メモリコントローラ6がプログラム7Aからメモリへのアクセス、すなわち読み込み、および書き込みを要求されると動作を開始する。
(Operation of the memory abnormality detection unit 20)
The operation of the memory
FIG. 10 is a flowchart showing the operation of the memory
ステップS1101では、処理対象の物理メモリ3がノンパリティメモリであるか否かを判断する。処理対象がノンパリティメモリの場合はメモリ異常検知部20は処理をする必要がないので、図10に示すプログラム7Aを終了する。処理対象がノンパリティメモリではない場合、すなわちパリティ付きメモリまたはECCメモリの場合はステップS1102に進む。
ステップS1102では、メモリコントローラ6が要求されているアクセスの目的が、読み込みおよび書き込みのいずれであるかを判断する。読み込みであると判断する場合はステップS1103に進み、書き込みであると判断する場合はステップS1107に進む。
In step S1101, it is determined whether the
In step S1102, the memory controller 6 determines whether the purpose of access requested is read or write. If it is determined to be read, the process proceeds to step S1103. If it is determined to be write, the process proceeds to step S1107.
ステップS1103では、物理メモリ3から指定されたアドレスのデータと付加ビット、すなわちパリティビットまたはECCビットを読み出し、ステップS1104に進む。
ステップS1104では、付加ビットの検証、すなわちステップS1103において読み込んだデータと付加ビットとの整合性を確認し、可能であればECCビットを用いてデータを訂正する。次にステップS1105に進む。
ステップS1105では、ステップS1104における付加ビットの検証によりエラーが検出されたか否かを判断する。エラーが検出されたと判断する場合はステップS1106に進み、ステップS1106においてCPU1に対して割り込みをかけてエラー検出を通知した後、図10のフローチャートを終了する。一方、ステップS1105でエラーが検出されないと判断する場合は何もせず、そのまま図10のフローチャートを終了する。なお本ステップでは、ECCビットにより訂正可能な範囲のエラーであれば、エラーが検出されないとして扱う。
In step S1103, the data at the designated address and additional bits, that is, parity bits or ECC bits are read from the
In step S1104, verification of the additional bit, that is, the consistency between the data read in step S1103 and the additional bit is confirmed, and if possible, the data is corrected using the ECC bit. Next, the process proceeds to step S1105.
In step S1105, it is determined whether or not an error has been detected by verifying the additional bits in step S1104. If it is determined that an error has been detected, the process proceeds to step S1106. In step S1106, the
要求されているアクセスが書き込みであると判断された場合に実行されるステップS1107では、付加ビット、すなわちパリティビット、またはECCビットを算出しステップS1108に進む。
ステップS1108では、処理対象のメモリに、データおよびステップS1107において算出した付加ビットを書き込み、図10のフローチャートを終了する。
In step S1107, which is executed when it is determined that the requested access is a write, an additional bit, that is, a parity bit or an ECC bit is calculated, and the process proceeds to step S1108.
In step S1108, the data and the additional bits calculated in step S1107 are written into the processing target memory, and the flowchart of FIG.
上述した第1の実施の形態によれば、次の作用効果が得られる。
(1)共有メモリ管理システム8は、CPU1と、エラーに対する信頼性が互いに異なる複数の物理メモリ3と、CPU1により実行されて安全性が互いに異なる複数のプログラム7Aからアクセスするために物理メモリ3に作成された共有メモリに関する情報が記録されている共有メモリ管理テーブル14を記憶する記憶部7と、プログラム7Aによる共有メモリへのアクセスを管理する共有メモリ管理部17と、を備える。共有メモリ管理テーブル14は、共有メモリの信頼性に関する情報である共有メモリの信頼度を含む。共有メモリ管理部17は、共有メモリ管理テーブル14を参照して(図9ステップS707)、共有メモリの信頼性とプログラム7Aの安全性に対応する信頼性とを比較し(図9ステップS708)、その比較結果に基づいてプログラム7Aによる共有メモリへのアクセスを管理する(図9ステップS709、S710)。このようにしたので、物理メモリ3上で起きる偶発的なエラーによって安全性の高いプログラム7Aの動作が妨げられることを防ぎ、安全性の高いプログラム7Aの可用性を向上することができる。
According to the first embodiment described above, the following operational effects are obtained.
(1) The shared memory management system 8 accesses the
(2)共有メモリ管理部17は、共有メモリの信頼性がプログラム7Aの安全性に対応する信頼性よりも高いか同じである場合に(図9ステップS708:Yes)、プログラム7Aによる共有メモリへのアクセスを許可する(図9ステップS709)。一方、共有メモリの信頼性がプログラム7Aの安全性に対応する信頼性よりも低い場合に(図9ステップS708:No)、プログラム7Aによる共有メモリへのアクセスを拒否する(図9ステップS710)。
そのため、記憶部7に格納されるそれぞれのプログラム7Aは、それぞれのプログラム7Aの安全度に対応する信頼度を満たさない共有メモリにはアクセスしないため、信頼性の低い物理メモリ上で起きるエラーによって安全性の高いプログラム7Aの動作が妨げられることを防止できる。
(2) When the reliability of the shared memory is higher or the same as the reliability corresponding to the safety of the
Therefore, each
(3)共有メモリ管理システム8は、共有メモリの作成を要求したプログラム7Aの安全度に基づき複数の物理メモリ3のいずれかを選択し、選択した物理メモリ3に共有メモリを作成し、作成された共有メモリに関する情報が記録された共有メモリ管理テーブル14を作成して記憶部7に記憶させる共有メモリ作成部18を備える。
そのため、不必要に高い安全度の物理メモリ3に共有メモリを作成することがない。
(3) The shared memory management system 8 selects one of the plurality of
Therefore, a shared memory is not created in the
(4)物理メモリ3が備える不揮発性記憶領域に備えられた情報、すなわちSPD情報に基づき当該物理メモリ3の信頼度を決定するメモリ管理初期化部19を備える。メモリ管理初期化部19は、当該共有メモリ管理システム8が起動するたびに当該共有メモリ管理システム8に接続された全ての物理メモリ3について信頼度を決定し、記憶部7に格納する。
そのため、SPD情報に基づきエラー検出能力やエラー訂正能力を物理メモリの信頼度として算出することができる。また、共有メモリ管理システム8に接続する物理メモリ3の構成を変更すると、ユーザによる設定の変更を待つことなく記憶部7に追加された物理メモリ3の情報を追加することができる。
(4) The memory
Therefore, the error detection capability and error correction capability can be calculated as the reliability of the physical memory based on the SPD information. Further, when the configuration of the
上述した第1の実施の形態は、以下のように変形してもよい。
(変形例1)
上述した第1の実施の形態において示した物理メモリの信頼度、およびプログラム7Aの安全度に対応する安全度は例示であり、上述した以外の信頼度および安全度を用いてもよい。たとえば、物理メモリの信頼度を6段階以上に設定してもよいし、4段階以下に設定してもよい。また、プログラム7Aの安全度に対応する安全度にISO26262で定義されるASIL以外を用いてもよい。
The first embodiment described above may be modified as follows.
(Modification 1)
The reliability of the physical memory shown in the first embodiment and the safety corresponding to the safety of the
(変形例2)
プログラム管理テーブル12および安全度対応テーブル16を統合し、プログラム識別子とプログラム7Aが使用する共有メモリに求める信頼度とを関連付けて保存してもよい。さらに、プログラム管理テーブル12および/または安全度対応テーブル16に格納されている情報を、共有メモリ管理テーブル14や物理メモリ信頼度テーブル15と組み合わせて保存してもよい。
すなわち、共有メモリ管理システム8にプログラム管理テーブル12、共有メモリ管理テーブル14、物理メモリ信頼度テーブル15、安全度対応テーブル16の情報が格納されていれば良く、保存されている形態を問わない。
また、共有メモリ管理テーブル14において共有メモリの信頼度を記録しないこととしてもよい。すなわち、物理メモリ信頼度テーブル15の先頭アドレスおよびサイズと、共有メモリ管理テーブル14の先頭アドレスおよびサイズとを比較することで、各共有メモリがどの物理メモリに作成されたかが分かる。これにより、物理メモリの信頼度から各共有メモリの信頼度を知ることができる。そのため、共有メモリ管理テーブル14において、共有メモリの信頼度は必ずしも必要ではない。なお、共有メモリ管理テーブル14に共有メモリの信頼度が記録されない場合、その共有メモリ管理テーブル14では、先頭アドレスおよびサイズが共有メモリの信頼度に関する情報に相当する。
(Modification 2)
The program management table 12 and the safety level correspondence table 16 may be integrated, and the program identifier and the reliability required for the shared memory used by the
That is, the shared memory management system 8 only needs to store the information of the program management table 12, the shared memory management table 14, the physical memory reliability table 15, and the safety level correspondence table 16, and the stored form does not matter.
Further, the reliability of the shared memory may not be recorded in the shared memory management table 14. That is, by comparing the start address and size of the physical memory reliability table 15 with the start address and size of the shared memory management table 14, it is possible to determine in which physical memory each shared memory is created. Thereby, the reliability of each shared memory can be known from the reliability of the physical memory. For this reason, the reliability of the shared memory is not necessarily required in the shared memory management table 14. When the shared memory reliability is not recorded in the shared memory management table 14, in the shared memory management table 14, the start address and the size correspond to information related to the shared memory reliability.
(変形例3)
共有メモリ管理テーブルは、アクセス可能なプログラムの識別子が格納される列(以下、「アクセス許可欄」)をさらに備える共有メモリ管理テーブル14Aとしてもよい。この場合は、アクセスを要求したプログラムが共有メモリにアクセス可能と共有メモリ管理部17が判断した場合(図9、ステップS708:YES)に、共有メモリ管理テーブル14Aのアクセスされる共有メモリの行に、当該プログラムによる共有メモリへのアクセスを許可することを示すアクセス許可情報として、アクセスを行うプログラムのプログラム識別子を記録する。そして次回以降は、共有メモリ管理テーブル14Aのアクセス許可欄にそのプログラムの識別子が記載されていることから、アクセスが可能であることが容易に判別できる。
(Modification 3)
The shared memory management table may be a shared memory management table 14A that further includes a column (hereinafter, “access permission column”) in which identifiers of accessible programs are stored. In this case, when the shared memory management unit 17 determines that the program that requested access is accessible to the shared memory (FIG. 9, step S708: YES), the shared memory management table 14A includes a row of the shared memory to be accessed. The program identifier of the program to be accessed is recorded as access permission information indicating that the program is permitted to access the shared memory. From the next time onward, since the identifier of the program is described in the access permission column of the shared memory management table 14A, it can be easily determined that access is possible.
図11は、共有メモリ管理テーブル14Aの一例を示す図である。図11の右端に示す「アクセス許可プログラム」の列が前述のアクセス許可欄であり、アクセス許可情報としてのプログラム識別子が記録されている。アクセス許可欄にプログラム識別子が記載されたプログラムは、アクセス許可欄を参照することにより、その共有メモリにアクセス可能であることが容易に判断できる。
図12は、変形例3における共有メモリ管理部17の動作を表すフローチャートである。第1の実施の形態との差異は、ステップS702の次にステップS781、S782が実行され、ステップS709の次にステップS780が実行される点である。
FIG. 11 is a diagram illustrating an example of the shared memory management table 14A. The column of “access permission program” shown at the right end of FIG. 11 is the above-mentioned access permission column, in which a program identifier as access permission information is recorded. A program whose program identifier is written in the access permission column can easily determine that the shared memory can be accessed by referring to the access permission column.
FIG. 12 is a flowchart showing the operation of the shared memory management unit 17 in the third modification. The difference from the first embodiment is that steps S781 and S782 are executed after step S702, and step S780 is executed after step S709.
ステップS781では、共有メモリ管理テーブル14Aの、ステップS701において読み込んだ共有メモリ識別子を有する行において、アクセス許可欄にステップS701において読み込んだプログラム識別子が記載されているか否かを判断する。記載されていると判断する場合はステップS782に進んでステップS709と同様に共有メモリにアクセスする。記載されていないと判断する場合はステップS702に進み、ステップS708まで第1の実施の形態と同様に処理を行う。 In step S781, it is determined whether the program identifier read in step S701 is described in the access permission column in the row having the shared memory identifier read in step S701 of the shared memory management table 14A. If it is determined that it is described, the process proceeds to step S782 to access the shared memory in the same manner as in step S709. If it is determined that it is not described, the process proceeds to step S702, and processing is performed in the same manner as in the first embodiment until step S708.
そしてステップS709の次に実行されるステップS780では、前述のステップS781の処理が可能となるように以下の処理を行う。すなわち、共有メモリ管理テーブル14Aの、ステップS701において読み込んだ共有メモリ識別子を有する行のアクセス許可欄に、アクセスを許可したプログラムの識別子、すなわちステップS701において読み込んだプログラム識別子を追加する。以上で図12のフローチャートを終了する。
この変形例3によれば、次の作用効果が得られる。
In step S780 executed after step S709, the following processing is performed so that the processing in step S781 described above can be performed. That is, the identifier of the program permitted to access, that is, the program identifier read in step S701 is added to the access permission column of the row having the shared memory identifier read in step S701 in the shared memory management table 14A. This is the end of the flowchart of FIG.
According to the third modification, the following effects can be obtained.
(1)共有メモリ管理部17は、共有メモリの信頼性がプログラム7Aの安全性に対応する信頼性よりも高いか同じである場合に(図12ステップS708:Yes)、プログラム7Aによる共有メモリへのアクセスを許可することを示すアクセス許可情報として、そのプログラム7Aのプログラム識別子を共有メモリ管理テーブル14Aのアクセス許可欄に追加して記録する(図12ステップS780)。そして、共有メモリ管理テーブル14Aのアクセス許可欄にプログラム識別子が記録されている場合(図12ステップS781:Yes)、共有メモリ管理部17は、これに基づいてプログラム7Aによる共有メモリへのアクセスを許可する(図12ステップS782)。
そのため、共有メモリ管理部17は共有メモリ管理テーブル14Aのアクセス許可欄を参照することにより、プログラム7Aが共有メモリへのアクセスが許可されていることを容易に判別することができる。
(1) If the reliability of the shared memory is higher or the same as the reliability corresponding to the safety of the
Therefore, the shared memory management unit 17 can easily determine that the
(変形例4)
物理メモリ信頼度テーブル15に記録される物理メモリ3の信頼度は、SPD情報以外に基づいて設定されてもよい。たとえば、共有メモリ管理システム8の回路設計やSPD情報には記載されない物理メモリ3の特性に基づき、その信頼度を増減させてもよい。たとえば、物理メモリ3を鉛で覆ったことにより信頼度を「1」増加させてもよい。
(Modification 4)
The reliability of the
(変形例5)
上述した第1の実施の形態では、共有メモリ管理部17、共有メモリ作成部18、およびメモリ管理初期化部19は記憶部7に格納されるOS7Bにより実現される機能ブロックであった。しかし、共有メモリ管理部17、共有メモリ作成部18、およびメモリ管理初期化部19は他のソフトウエアにより実現されてもよいし、ASIC(application specific integrated circuit)やFPGA(Field Programmable Gate Array)により実現されてもよい。
(Modification 5)
In the first embodiment described above, the shared memory management unit 17, the shared memory creation unit 18, and the memory
(変形例6)
上述した第1の実施の形態では、プログラム管理テーブル12、共有メモリ管理テーブル14、物理メモリ信頼度テーブル15、および安全度対応テーブル16は、最も信頼度の高い物理メモリ3に配置されるとした。しかし、これらが配置されるのは物理メモリ3に限定されず、たとえばメモリコントローラ6が備える専用の記憶領域に配置されてもよい。
(Modification 6)
In the first embodiment described above, the program management table 12, the shared memory management table 14, the physical memory reliability table 15, and the safety level correspondence table 16 are arranged in the
(変形例7)
上述した第1の実施の形態では、プログラムの安全度に対応する信頼度を特定し、その特定した信頼度と共有メモリの信頼度を比較した。しかし、プログラムの安全度と共有メモリの信頼度の比較方法はこれに限定されない。共有メモリの信頼度に対応する安全度を特定し、特定した安全度とプログラムの安全度を比較してもよい。さらに、安全度や信頼度以外の第3の指標を用いて比較してもよい。すなわち、プログラムの安全度に対応する第3の指標の値を特定し、共有メモリの信頼度に対応する第3の指標の値を特定し、特定した第3の指標の値同士を比較してもよい。
(Modification 7)
In the first embodiment described above, the reliability corresponding to the safety level of the program is specified, and the specified reliability is compared with the reliability of the shared memory. However, the method for comparing the safety level of the program and the reliability level of the shared memory is not limited to this. A safety level corresponding to the reliability of the shared memory may be specified, and the specified safety level may be compared with the safety level of the program. Furthermore, the comparison may be performed using a third index other than the safety level and the reliability level. That is, the value of the third index corresponding to the degree of safety of the program is specified, the value of the third index corresponding to the reliability of the shared memory is specified, and the values of the specified third index are compared with each other Also good.
(第2の実施の形態)
図13を参照して、共有メモリ管理システムの第2の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、共有メモリを作成する際に、その共有メモリにアクセスする各プログラム7Aの安全度に対応する安全度のうち、最も高い安全度に基づき共有メモリを作成する点で、第1の実施の形態と異なる。
(Second Embodiment)
A second embodiment of the shared memory management system will be described with reference to FIG. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and different points will be mainly described. Points that are not particularly described are the same as those in the first embodiment. In the present embodiment, when a shared memory is created, the shared memory is created based on the highest safety level among the safety levels corresponding to the safety levels of the
(構成)
共有メモリ管理システム8のハードウエア構成は第1の実施の形態と同様である。記憶部7に格納されるOS7Bの一部であって、共有メモリ作成部18の動作が第1の実施の形態と異なる。
また本実施の形態では、プログラム7Aがメモリコントローラ6に共有メモリの作成指令を出力する際に、共有メモリの識別子に加えて、その共有メモリにアクセスする可能性がある全てのプログラム7Aの識別子をメモリコントローラ6に出力する。
(Constitution)
The hardware configuration of the shared memory management system 8 is the same as that of the first embodiment. It is a part of the
In the present embodiment, when the
(共有メモリ作成部18の動作)
図13は、第2の実施の形態において、メモリコントローラ6がプログラム7Aから共有メモリの作成指令を受けた際に共有メモリ作成部18が行う処理を示すフローチャートである。以下に説明する各ステップの実行主体はCPU1である。第1の実施の形態における図8と同じ処理には同一のステップ番号を付し、説明を省略する。
ステップS801では、これから作成する共有メモリにアクセスする全てのプログラム7Aの識別子、作成を要求されている共有メモリの識別子、および作成を要求されている共有メモリのサイズを読み込み、ステップS802に進む。
(Operation of shared memory creation unit 18)
FIG. 13 is a flowchart showing processing performed by the shared memory creating unit 18 when the memory controller 6 receives a shared memory creation command from the
In step S801, the identifiers of all
ステップS802ではプログラム管理テーブル12を読み込み、ステップS803に進む。
ステップS803では、プログラム管理テーブル12を用いてステップS801において読み込んだそれぞれのプログラム7Aの識別子に対応する安全度を特定し、ステップS804に進む。
ステップS804では、ステップS803において特定した安全度のうち、最高の安全度を特定してステップS604に進む。
ステップS604以降の処理は次の1点を除いて第1の実施の形態と同様である。すなわち、ステップS804において特定した最高の安全度を、第1の実施の形態におけるステップS603において特定した安全度と読みかえる。
In step S802, the program management table 12 is read, and the process proceeds to step S803.
In step S803, the degree of safety corresponding to the identifier of each
In step S804, the highest safety degree among the safety degrees specified in step S803 is specified, and the process proceeds to step S604.
The processing after step S604 is the same as that of the first embodiment except for the following one point. That is, the highest safety level specified in step S804 is read as the safety level specified in step S603 in the first embodiment.
上述した第2の実施の形態によれば、次の作用効果が得られる。
(1)共有メモリ管理システム8は、共有メモリにアクセスする複数のプログラム7Aのそれぞれの安全度のうち、最も高い安全度に基づき複数の物理メモリ3のいずれかを選択し、選択した物理メモリに共有メモリを作成し、作成された共有メモリに関する情報が記録された共有メモリ管理テーブル14を作成して記憶部7に記憶させる共有メモリ作成部18を備える。
前述した第1の実施の形態では、共有メモリにアクセスする複数のプログラム7Aのうち、最も安全度が高いプログラム7Aが共有メモリの作成指令を出力する必要があった。しかし本実施の形態ではいずれのプログラム7Aが共有メモリの作成指令を出力しても、その共有メモリのいずれもがアクセス可能な共有メモリが作成される。
また、共有メモリの作成時には予定していなかったプログラム7Aがその共有メモリにアクセスする場合であっても、共有メモリ管理部17は第1の実施の形態と同様に動作するので、共有メモリの優先度とそのプログラム7Aの安全度との関係からアクセス可否を判断することができる。
According to the second embodiment described above, the following operational effects can be obtained.
(1) The shared memory management system 8 selects one of the plurality of
In the first embodiment described above, among the plurality of
Even if the
(第2の実施の形態の変形例)
あらかじめ予定されたプログラム、すなわち共有メモリの作成時にプログラム識別子が出力されたプログラム以外は共有メモリにアクセスしないことを前提として、共有メモリ管理部17によるプログラムごとの共有メモリへのアクセス可否判断を省略してもよい。
(Modification of the second embodiment)
On the premise that only a program scheduled in advance, that is, a program whose program identifier is output when the shared memory is created, is not accessed to the shared memory, the shared memory management unit 17 determines whether to access the shared memory for each program. May be.
(第3の実施の形態)
図14を参照して、共有メモリ管理システムの第3の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、プログラム7Aの安全度の基準を満たさない共有メモリからのデータを読み込む際には、CPU割り込みを発生させないようにメモリ異常検知部20を一時的に無効にし、別途ソフトエラーを検出する点で、第1の実施の形態と異なる。
(Third embodiment)
A third embodiment of the shared memory management system will be described with reference to FIG. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and different points will be mainly described. Points that are not particularly described are the same as those in the first embodiment. In the present embodiment, when reading data from the shared memory that does not meet the safety standard of the
(構成)
共有メモリ管理システム8のハードウエア構成は第1の実施の形態と同様である。記憶部7に格納されるOS7Bの一部であって、共有メモリ管理部17の動作が第1の実施の形態と異なる。
また本実施の形態では、プログラム7Aがメモリコントローラ6に共有メモリにアクセスする際に、共有メモリの識別子に加えて、アクセスする目的、すなわち読み込み、又は書き込みを共有メモリ管理部17に伝達する。
(Constitution)
The hardware configuration of the shared memory management system 8 is the same as that of the first embodiment. It is a part of the
Further, in the present embodiment, when the
(処理の概要)
メモリ異常検知部20は、パリティビットやECCビットを用いてソフトエラーを検出し、ソフトエラーの訂正が不可能な場合はCPU1に割り込み命令を出力する。この割り込み処理は、意図しないソフトエラーの発生を知らせる点では有用ではあるが、読み込み対象の物理メモリ3の信頼度が低いことが事前に明らかである場合には他の処理も中断されるため望ましくない。そこで、信頼度が低い物理メモリ3からデータを読み出す際には一時的にメモリ異常検知部20によるCPU割り込み機能を無効化する。さらに、メモリ異常検知部20と同様にパリティビットの算出、および検証を行う機能を共有メモリ管理部17に持たせることで、従来と同様にソフトエラーを検出する。
なお、前述の“読み込み対象の物理メモリ3の信頼度が低いことが事前に明らかである場合”とは、たとえばプログラム7Aの安全度に対応する信頼度よりも、共有メモリが配置された物理メモリ3の信頼度が低い場合である。
(Outline of processing)
The memory
The above-mentioned “when it is clear in advance that the reliability of the
図14は、第3の実施の形態において共有メモリ管理部17がプログラム7Aから共有メモリへのアクセスを要求された際に実行する処理を示すフローチャートである。第1の実施の形態と同一の処理には同一のステップ番号を付して説明を省略する。
ステップS901では、アクセスを要求したプログラム7Aの識別子、共有メモリの識別子、およびアクセスの目的を読み込み、ステップS902に進む。
FIG. 14 is a flowchart illustrating a process executed when the shared memory management unit 17 requests access to the shared memory from the
In step S901, the identifier of the
ステップS902では、アクセスの目的が読み込みであるか否かを判断する。読み込みであると判断する場合は、共有メモリの信頼度がプログラム7Aの安全度に対応する信頼度の条件を満たすか否かにより処理が異なるのでその判断のためにステップS702に進む。読み込みではない、すなわち書き込みであると判断する場合は、前述の信頼度によらず常にパリティビットの算出・書き込みを行うのでステップS911に進む。
ステップS702〜ステップS707では第1の実施の形態において説明したように、プログラム7Aの安全度に対応する信頼度と、アクセス対象である共有メモリの信頼度が特定される。続くステップS708では、アクセス対象である共有メモリの信頼度がプログラム7Aの安全度に対応する信頼度以上であるか否かを判断する。条件を満たすと判断する場合はステップS910に進み、条件を満たさないと判断する場合はステップS903に進む。
In step S902, it is determined whether the purpose of access is reading. If it is determined that the data is read, the process differs depending on whether the reliability of the shared memory satisfies the reliability level corresponding to the safety level of the
In steps S702 to S707, as described in the first embodiment, the reliability corresponding to the safety level of the
ステップS903では、メモリ異常検知部20によるCPU割り込みを一時的に無効化してステップS904に進む。
ステップS904では、メモリ異常検知部20によるCPU割り込みを無効化した状態で、アクセス対象である共有メモリからデータおよびそのデータに関連付けられたパリティビットを読み込み、ステップS905に進む。
ステップS905では、メモリ異常検知部20によるCPU割り込みを有効化してステップS906に進む。
ステップS906では、ステップS904において読み込んだデータとパリティビットとの整合性を検証する。たとえば、ステップS904において読み込んだデータに含まれるHighのビット数とパリティビットのHighのビット数の合計が偶数になれば整合すると判断する。次にステップS907に進む。
In step S903, the CPU interrupt by the memory
In step S904, data and a parity bit associated with the data are read from the shared memory to be accessed in a state where the CPU interruption by the memory
In step S905, the CPU interruption by the memory
In step S906, the consistency between the data read in step S904 and the parity bit is verified. For example, if the sum of the number of high bits included in the data read in step S904 and the number of high bits of the parity bits is an even number, it is determined that the data matches. Next, the process proceeds to step S907.
ステップS907では、ステップS906においてパリティビットが整合したか否かを判断する。整合したと判断する場合はステップS908に進み、整合しない、すなわちソフトエラーが検出されたと判断する場合はステップS909に進む。
ステップS908では、ソフトエラーが検出されなかったので、ステップS904において読み込んだデータをアクセス要求を行ったプログラム7Aに出力し、図14のフローチャートを終了する。
ステップS909では、アクセス要求を行ったプログラム7Aにソフトエラーが発生し、読み込みに失敗した旨のエラーを出力し、図14のフローチャートを終了する。
In step S907, it is determined whether the parity bits are matched in step S906. If it is determined that they are consistent, the process proceeds to step S908. If it is determined that they are not consistent, that is, a soft error is detected, the process proceeds to step S909.
In step S908, since no soft error has been detected, the data read in step S904 is output to the
In step S909, a soft error has occurred in the
アクセスの目的が書き込みであった場合に実行されるステップS911では、共有メモリ管理テーブル14を読み込み、ステップS912に進む。
ステップS912では、アクセス対象である共有メモリの識別子、および共有メモリ管理テーブル14を用いて、アクセス対象である共有メモリのアドレスを特定する。
ステップS913では、共有メモリへのアクセスを要求したプログラム7Aから書き込むデータを受領し、そのデータのパリティビットを算出してステップS914に進む。
ステップS914では、ステップS912において特定したアドレスに、データおよびステップS913において算出したパリティビットを書き込み、図14のフローチャートを終了する。
In step S911 executed when the purpose of access is writing, the shared memory management table 14 is read, and the process proceeds to step S912.
In step S912, the address of the shared memory to be accessed is specified using the identifier of the shared memory to be accessed and the shared memory management table 14.
In step S913, data to be written is received from the
In step S914, the data and the parity bit calculated in step S913 are written to the address specified in step S912, and the flowchart of FIG.
上述した第3の実施の形態によれば、次の作用効果が得られる。
(1)共有メモリ管理部17は、プログラム7Aが共有メモリへデータの書き込みを行う際に(図14、ステップS902:Yes)、データの改変を検知するためのデータ改変検知符号、たとえばパリティビットを算出し、データおよびデータ改変検知符号を共有メモリに書き込む(図14、ステップS911〜S914)。共有メモリ管理部17は、プログラム7Aが共有メモリからデータの読み込みを行う際に、その共有メモリの信頼性がプログラム7Aの安全性に対応する信頼性よりも低い場合に(図14、ステップS708:No)、メモリ異常検知部20によるCPU1への割り込み処理を無効化する(図14ステップS903)。そしてこの状態で、共有メモリからデータおよびデータ改変検知符号を読み込んでデータの改変の有無を判断する(図14ステップS906)。
そのため、メモリ異常検知部20によるCPU割り込みを発生させないにもかかわらず、ソフトエラーの検出も可能とすることができる。すなわち、信頼性の低い物理メモリに作成された共有メモリにアクセスしても安全性の高いプログラムの動作が妨げられることがなく、安全性の高いプログラムの可用性を向上することができる。
According to the third embodiment described above, the following operational effects can be obtained.
(1) When the
For this reason, it is possible to detect a soft error even though no CPU interrupt is generated by the memory
(第4の実施の形態)
図15〜図16を参照して、共有メモリ管理システムの第4の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、メモリ異常検知部20が異常を検知するとCPU割り込みを発生させる代わりに異常の発生を記録させ、その記録に基づきソフトエラーを検出する点で第1の実施の形態と異なる。
本実施の形態において用いられる物理メモリ3は、ノンパリティメモリ以外、すなわちパリティ付きメモリ、またはECC付きメモリに限定する。
(Fourth embodiment)
A fourth embodiment of the shared memory management system will be described with reference to FIGS. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and different points will be mainly described. Points that are not particularly described are the same as those in the first embodiment. In the present embodiment, the first embodiment is mainly that, when the memory
The
(構成)
共有メモリ管理システム8のハードウエア構成は第1の実施の形態と同様である。記憶部7に格納されるOS7Bの一部であって、共有メモリ管理部17の動作が第1の実施の形態と異なる。
また本実施の形態では、プログラム7Aがメモリコントローラ6に共有メモリにアクセスする際に、共有メモリの識別子に加えて、アクセスする目的、すなわち読み込み、又は書き込みを共有メモリ管理部17に伝達する。
(Constitution)
The hardware configuration of the shared memory management system 8 is the same as that of the first embodiment. It is a part of the
Further, in the present embodiment, when the
(処理の概要)
メモリ異常検知部20は、パリティつきメモリではパリティビットを用いて、ECC付きメモリではECCビットを用いて、第1の実施の形態において説明したようにソフトエラーを検出する。メモリ異常検知部20はソフトエラーを検出すると、後述するメモリ異常記録テーブル21にソフトエラーが検出されたアドレスを記録する。
図15は、メモリ異常記録テーブル21の一例を示す図である。メモリ異常記録テーブル21にはソフトエラーが検出されたメモリのアドレスが記録される。図15に示す例では、2つのアドレスでソフトエラーが検出されている。
(Outline of processing)
As described in the first embodiment, the memory
FIG. 15 is a diagram illustrating an example of the memory abnormality recording table 21. In the memory abnormality recording table 21, the address of the memory where the soft error is detected is recorded. In the example shown in FIG. 15, a soft error is detected at two addresses.
共有メモリ管理部17は、共有メモリからデータを読み出す前後におけるメモリ異常記録テーブル21の差分の有無からソフトエラーの有無を判断することができる。換言すると、共有メモリからデータを読み出す前後でメモリ異常記録テーブル21に変化がなければソフトエラーが発生していないと判断でき、共有メモリからデータを読み出す前後でメモリ異常記録テーブル21に変化があればソフトエラーが発生したと判断できる。 The shared memory management unit 17 can determine the presence or absence of a soft error from the presence or absence of a difference in the memory abnormality recording table 21 before and after reading data from the shared memory. In other words, if there is no change in the memory abnormality recording table 21 before and after reading data from the shared memory, it can be determined that a soft error has not occurred, and if there is a change in the memory abnormality recording table 21 before and after reading data from the shared memory. It can be determined that a soft error has occurred.
(フローチャート)
図16は、第4の実施の形態において共有メモリ管理部17がプログラム7Aから共有メモリへのアクセスを要求された際に実行する処理を示すフローチャートである。第1の実施の形態、および第3の実施の形態と同一の処理には同一のステップ番号を付して説明を省略する。
ステップS902においてアクセスの目的が書き込みであると判断する場合はステップS911に進み、共有メモリ管理テーブル14を読み込んで書き込みアドレスを特定し(ステップS912)、データを共有メモリに書き込む(ステップS1000)。このとき、書き込んだデータのパリティビット、またはECCビットはメモリ異常検知部20により算出される。
(flowchart)
FIG. 16 is a flowchart illustrating processing executed when the shared memory management unit 17 requests access to the shared memory from the
If it is determined in step S902 that the purpose of access is write, the process proceeds to step S911, the shared memory management table 14 is read to specify the write address (step S912), and the data is written to the shared memory (step S1000). At this time, the parity bit or ECC bit of the written data is calculated by the memory
ステップS902において肯定判定されると、続くステップS702〜ステップS707では第1の実施の形態において説明したように、プログラム7Aの安全度に対応する信頼度と、アクセス対象である共有メモリの信頼度が特定される。続くステップS708では、アクセス対象である共有メモリの信頼度がプログラム7Aの安全度に対応する信頼度以上であるか否かを判断する。条件を満たすと判断する場合はステップS910に進み、条件を満たさないと判断する場合はステップS1001に進む。
ステップS1001では、メモリ異常記録テーブル21をクリア、すなわちメモリ異常記録テーブル21に格納されている情報をすべて削除してステップS1002に進む。
ステップS1002では、メモリ異常検知部20によるCPU割り込みを一時的に無効化してステップS1004に進む。
If an affirmative determination is made in step S902, in steps S702 to S707, as described in the first embodiment, the reliability corresponding to the safety level of the
In step S1001, the memory abnormality recording table 21 is cleared, that is, all information stored in the memory abnormality recording table 21 is deleted, and the process proceeds to step S1002.
In step S1002, the CPU interruption by the memory
ステップS1003では、アクセス対象である共有メモリからデータを読み込む。なおこのとき、メモリ異常検知部20によりこのデータに関連付けられるパリティビットまたはECCビットが読み込まれ、異常が検出されるとメモリ異常記録テーブル21に記録される。次にステップS1004に進む。
ステップS1004では、メモリ異常検知部20によるCPU割り込みを有効化してステップS1005に進む。
ステップS1005では、メモリ異常記録テーブル21に何らかの異常が記録されているか否か、すなわちソフトエラーが検出されたか否かを判断する。異常が記録されていると判断する場合はステップS909に進んでエラーを出力し、異常が記録されていないと判断する場合はステップS908に進んでステップS1003において読み込んだデータをアクセスを要求したプログラム7Aに出力する。以上で図16のフローチャートを終了する。
In step S1003, data is read from the shared memory to be accessed. At this time, the parity bit or ECC bit associated with this data is read by the memory
In step S1004, CPU interruption by the memory
In step S1005, it is determined whether any abnormality is recorded in the memory abnormality recording table 21, that is, whether a soft error is detected. If it is determined that an abnormality has been recorded, the process proceeds to step S909 and an error is output. If it is determined that no abnormality has been recorded, the process proceeds to step S908 and the
上述した第4の実施の形態によれば、次の作用効果が得られる。
(1)メモリ異常検知部20は、プログラム7Aが共有メモリへデータの書き込みを行う際に、データの改変を検知するためのデータ改変検知符号を算出し、データおよびデータ改変検知符号を共有メモリに書き込む。
メモリ異常検知部20は、プログラム7Aが共有メモリからデータの読み込みを行う際に、共有メモリからデータおよびデータ改変検知符号を読み込んでデータの改変の有無を判断する。
共有メモリ管理部17は、このメモリ異常検知部20の判断結果に基づいてデータの改変の有無を判断する。このように、第3の実施の形態ではパリティビットの算出やパリティビットの整合の確認を共有メモリ管理部17が行っていたが、本実施の形態ではメモリ異常検知部20がハードウエアロジックによりそれらの処理を行う。
そのため、共有メモリ管理システム8の全体として処理の負荷を軽減できる。
According to the fourth embodiment described above, the following operational effects can be obtained.
(1) The memory
When the
The shared memory management unit 17 determines whether data has been altered based on the determination result of the memory
Therefore, it is possible to reduce the processing load of the shared memory management system 8 as a whole.
上述した各実施の形態および変形例は、それぞれ組み合わせてもよい。
上記では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。
The above-described embodiments and modifications may be combined.
Although various embodiments and modifications have been described above, the present invention is not limited to these contents. Other embodiments conceivable within the scope of the technical idea of the present invention are also included in the scope of the present invention.
3、3a、3b、3c … 物理メモリ
6 … メモリコントローラ
7 … 記憶部
7A … プログラム
8 … 共有メモリ管理システム
12 … プログラム管理テーブル
14、14A … 共有メモリ管理テーブル
15 … 物理メモリ信頼度テーブル
16 … 安全度対応テーブル
17 … 共有メモリ管理部
18 … 共有メモリ作成部
19 … メモリ管理初期化部
20 … メモリ異常検知部
21 … メモリ異常記録テーブル
3, 3a, 3b, 3c ... Physical memory 6 ... Memory controller 7 ...
Claims (8)
エラーに対する信頼性が互いに異なる複数の物理メモリと、
前記CPUにより実行されて安全性が互いに異なる複数のプログラムからアクセスするために前記物理メモリに作成された共有メモリに関する情報が記録されている共有メモリ管理テーブルを記憶する記憶部と、
前記プログラムによる前記共有メモリへのアクセスを管理する共有メモリ管理部と、を備え、
前記共有メモリ管理テーブルは、前記共有メモリの信頼性に関する情報を含み、
前記共有メモリ管理部は、前記共有メモリ管理テーブルを参照して、前記共有メモリの信頼性と前記プログラムの安全性に対応する信頼性とを比較し、その比較結果に基づいて前記プログラムによる前記共有メモリへのアクセスを管理するメモリ管理システム。 CPU,
Multiple physical memories with different reliability for errors,
A storage unit for storing a shared memory management table in which information related to the shared memory created in the physical memory for accessing from a plurality of programs executed by the CPU and having different safety is stored;
A shared memory management unit for managing access to the shared memory by the program,
The shared memory management table includes information related to reliability of the shared memory,
The shared memory management unit refers to the shared memory management table to compare the reliability of the shared memory with the reliability corresponding to the safety of the program, and based on the comparison result, the shared by the program A memory management system that manages access to memory.
前記共有メモリ管理部は、
前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも高いか同じである場合に、前記プログラムによる前記共有メモリへのアクセスを許可し、
前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも低い場合に、前記プログラムによる前記共有メモリへのアクセスを拒否するメモリ管理システム。 The memory management system according to claim 1,
The shared memory management unit
Allowing access to the shared memory by the program if the reliability of the shared memory is higher than or equal to the reliability corresponding to the safety of the program;
A memory management system that denies access to the shared memory by the program when the reliability of the shared memory is lower than the reliability corresponding to the safety of the program.
前記共有メモリ管理部は、前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも高いか同じである場合に、前記プログラムによる前記共有メモリへのアクセスを許可することを示すアクセス許可情報を前記共有メモリ管理テーブルに追加して記録し、
前記共有メモリ管理テーブルに前記アクセス許可情報が記録されている場合、前記共有メモリ管理部は、前記アクセス許可情報に基づいて前記プログラムによる前記共有メモリへのアクセスを許可するメモリ管理システム。 The memory management system according to claim 2,
The shared memory management unit indicates that access to the shared memory by the program is permitted when the reliability of the shared memory is higher than or equal to the reliability corresponding to the safety of the program Add permission information to the shared memory management table and record it,
When the access permission information is recorded in the shared memory management table, the shared memory management unit permits the program to access the shared memory based on the access permission information.
前記物理メモリへアクセスが行われる際に前記物理メモリに保存された情報の異常を検知して前記CPUに割り込み処理を発生させるメモリ異常検知部をさらに備え、
前記共有メモリ管理部は、前記プログラムが前記共有メモリからデータの読み込みを行う際に、前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも低い場合に、前記メモリ異常検知部による前記CPUへの割り込み処理を無効化するメモリ管理システム。 The memory management system according to claim 1,
A memory abnormality detection unit that detects an abnormality in information stored in the physical memory when the physical memory is accessed and causes the CPU to generate an interrupt process;
The shared memory management unit, when the program reads data from the shared memory, if the reliability of the shared memory is lower than the reliability corresponding to the safety of the program, the memory abnormality detection unit The memory management system which invalidates the interruption process to the CPU by.
前記共有メモリ管理部は、前記プログラムが前記共有メモリへデータの書き込みを行う際に、前記データの改変を検知するためのデータ改変検知符号を算出し、前記データおよび前記データ改変検知符号を前記共有メモリに書き込み、
前記共有メモリ管理部は、前記プログラムが前記共有メモリからデータの読み込みを行う際に、前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも低い場合に、前記メモリ異常検知部による前記CPUへの割り込み処理を無効化した状態で、前記共有メモリから前記データおよび前記データ改変検知符号を読み込んで前記データの改変の有無を判断するメモリ管理システム。 The memory management system according to claim 4,
The shared memory management unit calculates a data modification detection code for detecting modification of the data when the program writes data to the shared memory, and the shared memory management unit calculates the data and the data modification detection code. Write to memory,
The shared memory management unit, when the program reads data from the shared memory, if the reliability of the shared memory is lower than the reliability corresponding to the safety of the program, the memory abnormality detection unit A memory management system that reads the data and the data modification detection code from the shared memory and determines whether or not the data has been modified in a state in which the interrupt process to the CPU by is disabled.
前記メモリ異常検知部は、前記プログラムが前記共有メモリへデータの書き込みを行う際に、前記データの改変を検知するためのデータ改変検知符号を算出し、前記データおよび前記データ改変検知符号を前記共有メモリに書き込み、
前記メモリ異常検知部は、前記プログラムが前記共有メモリからデータの読み込みを行う際に、前記共有メモリから前記データおよび前記データ改変検知符号を読み込んで前記データの改変の有無を判断し、
前記共有メモリ管理部は、前記メモリ異常検知部の判断結果に基づいて前記データの改変の有無を判断するメモリ管理システム。 The memory management system according to claim 4,
The memory abnormality detection unit calculates a data modification detection code for detecting modification of the data when the program writes data to the shared memory, and the data and the data modification detection code are shared. Write to memory,
The memory abnormality detection unit, when the program reads data from the shared memory, reads the data and the data modification detection code from the shared memory to determine whether the data has been modified,
The shared memory management unit is a memory management system that determines whether the data has been altered based on a determination result of the memory abnormality detection unit.
前記共有メモリの作成を要求した前記プログラムの安全度に基づき前記複数の物理メモリのいずれかを選択し、選択した前記物理メモリに前記共有メモリを作成し、作成された前記共有メモリに関する情報が記録された前記共有メモリ管理テーブルを作成して前記記憶部に記憶させる共有メモリ作成部をさらに備えるメモリ管理システム。 The memory management system according to claim 1,
Select one of the plurality of physical memories based on the degree of safety of the program that has requested creation of the shared memory, create the shared memory in the selected physical memory, and record information about the created shared memory A memory management system further comprising a shared memory creation unit that creates the shared memory management table and stores the shared memory management table in the storage unit.
前記共有メモリにアクセスする複数の前記プログラムのそれぞれの安全度のうち、最も高い安全度に基づき前記複数の物理メモリのいずれかを選択し、選択した前記物理メモリに前記共有メモリを作成し、作成された前記共有メモリに関する情報が記録された前記共有メモリ管理テーブルを作成して前記記憶部に記憶させる共有メモリ作成部をさらに備えるメモリ管理システム。
The memory management system according to claim 1,
Select one of the plurality of physical memories based on the highest safety level among the safety levels of the plurality of programs that access the shared memory, create the shared memory in the selected physical memory, and create A memory management system further comprising: a shared memory creation unit that creates the shared memory management table in which information related to the shared memory that has been recorded is stored in the storage unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016012483A JP6469599B2 (en) | 2016-01-26 | 2016-01-26 | Memory management system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016012483A JP6469599B2 (en) | 2016-01-26 | 2016-01-26 | Memory management system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017134507A JP2017134507A (en) | 2017-08-03 |
JP6469599B2 true JP6469599B2 (en) | 2019-02-13 |
Family
ID=59502840
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016012483A Active JP6469599B2 (en) | 2016-01-26 | 2016-01-26 | Memory management system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6469599B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102120044B1 (en) * | 2017-11-28 | 2020-06-09 | 현대오트론 주식회사 | Controller comprising plurality of software levels and operating method thereof |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002244869A (en) * | 2001-02-19 | 2002-08-30 | Hitachi Ltd | Memory management device |
JP2007026094A (en) * | 2005-07-15 | 2007-02-01 | Matsushita Electric Ind Co Ltd | Execution device and application program |
JP2008134736A (en) * | 2006-11-27 | 2008-06-12 | Fujifilm Corp | Electronic equipment |
JP6145345B2 (en) * | 2013-07-22 | 2017-06-07 | 日立オートモティブシステムズ株式会社 | Electronic control unit for automobile |
-
2016
- 2016-01-26 JP JP2016012483A patent/JP6469599B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017134507A (en) | 2017-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7958433B1 (en) | Methods and systems for storing data in memory using zoning | |
US20090307537A1 (en) | Flash storage device with data correction function | |
US7689869B2 (en) | Unit, method and program for detecting imprecise data | |
US20150154111A1 (en) | Apparatus and method of offloading processing from a data storage device to a host device | |
EP3633517B1 (en) | Storage device and method of operating storage device | |
KR102185150B1 (en) | Generalized write operations verification method | |
US20180157428A1 (en) | Data protection of flash storage devices during power loss | |
JP2001297038A (en) | Data storage device, recording medium, and recording medium control method | |
CN104182701B (en) | Array control unit, array and data processing method | |
US11550474B2 (en) | Data storage device and method for rewriting parameters thereof | |
JP4349532B2 (en) | MEMORY CONTROL DEVICE, MEMORY CONTROL METHOD, INFORMATION PROCESSING SYSTEM, PROGRAM THEREOF, AND STORAGE MEDIUM | |
US20120233382A1 (en) | Data storage apparatus and method for table management | |
US8069312B2 (en) | Apparatus, circuit and method of controlling memory initialization | |
JP6469599B2 (en) | Memory management system | |
JP2013171467A (en) | Information processing device, electronic control device for vehicle, and data read-write method | |
EP3955112A1 (en) | Method and apparatus for memory error detection | |
US20090138656A1 (en) | Method of skipping synchronization process for initialization of RAID1 device | |
US20070208929A1 (en) | Device information managements systems and methods | |
JP7135403B2 (en) | Dump processing device and image forming device | |
JP5765311B2 (en) | Microcomputer | |
US20230409426A1 (en) | Host-level error detection and fault correction | |
JP5786702B2 (en) | Security token, instruction execution method in security token, and computer program | |
JP6177748B2 (en) | Embedded control unit | |
JP5435647B2 (en) | Computer system, memory initialization method, and program | |
WO2023050147A1 (en) | Data protection method for memory, and storage apparatus therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20170927 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180618 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20181225 |
|
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: 20190108 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190116 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6469599 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |