JP6469599B2 - Memory management system - Google Patents

Memory management system Download PDF

Info

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
Application number
JP2016012483A
Other languages
Japanese (ja)
Other versions
JP2017134507A (en
Inventor
雅巳 平松
雅巳 平松
太雪 谷道
太雪 谷道
櫻井 康平
康平 櫻井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2016012483A priority Critical patent/JP6469599B2/en
Publication of JP2017134507A publication Critical patent/JP2017134507A/en
Application granted granted Critical
Publication of JP6469599B2 publication Critical patent/JP6469599B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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.
Patent Document 1 discloses a basic mechanism for restricting access to memory used by each program when a highly safe vehicle control program and a low safety program are run on the same computer.

特開2015−67107号公報JP-A-2015-67107

特許文献1に記載されている発明では、物理メモリ上で起きる偶発的なエラーによって安全性の高いプログラムの動作が妨げられることを防ぐことができない。   In the invention described in Patent Document 1, it is not possible to prevent the operation of a highly secure program from being hindered by an accidental error that occurs in the physical memory.

本発明の第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.

共有メモリ管理システム8の構成を示すブロック図Block diagram showing the configuration of the shared memory management system 8 OS7Bの共有メモリに関する機能を機能ブロックとして表す図The figure showing the function regarding the shared memory of OS7B as a function block プログラム管理テーブル12の一例を示す図The figure which shows an example of the program management table 12 安全度対応テーブル16の一例を示す図The figure which shows an example of the safety degree correspondence table 16 物理メモリ信頼度テーブル15の一例を示す図The figure which shows an example of the physical memory reliability table 15 共有メモリ管理テーブル14の一例を示す図The figure which shows an example of the shared memory management table 14 メモリ管理初期化部19の処理を示すフローチャートA flowchart showing processing of the memory management initialization unit 19 共有メモリ作成部18の処理を示すフローチャートFlow chart showing processing of shared memory creation unit 18 共有メモリ管理部17の処理を示すフローチャートFlow chart showing processing of shared memory management unit 17 メモリ異常検知部20の処理を示すフローチャートThe flowchart which shows the process of the memory abnormality detection part 20 変形例3における共有メモリ管理テーブル14Aの一例を示す図The figure which shows an example of the shared memory management table 14A in the modification 3. 変形例3における共有メモリ管理部17の処理を示すフローチャートThe flowchart which shows the process of the shared memory management part 17 in the modification 3. 第2の実施の形態における共有メモリ作成部18の処理を示すフローチャートThe flowchart which shows the process of the shared memory creation part 18 in 2nd Embodiment. 第3の実施の形態における共有メモリ管理部17の処理を示すフローチャートThe flowchart which shows the process of the shared memory management part 17 in 3rd Embodiment. メモリ異常記録テーブル21の一例を示す図The figure which shows an example of the memory abnormality recording table 21 第4の実施の形態における共有メモリ管理部17の動作を示すフローチャートThe flowchart which shows operation | movement of the shared memory management part 17 in 4th Embodiment.

<実施の形態に共通する事項:物理メモリの種類>
物理メモリは、メモリセルに蓄えられた電荷の有無により情報を記録している。この電荷が外的要因、たとえば宇宙からの中性子線により偶発的に書き変わる問題、いわゆるソフトエラーの問題が知られている。この問題に対処するために、ソフトエラーの検知や訂正が可能な物理メモリが開発されている。ソフトエラーの検知や訂正の観点から、たとえば物理メモリを、ソフトエラーに対する信頼性がそれぞれ異なる以下の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 CPU 1, a plurality of physical memories, a memory controller 6, and a storage unit 7. The CPU 1, the memory controller 6, and the storage unit 7 are connected by a data bus 5.

共有メモリ管理システム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 physical memories 3a, 3b, and 3c are provided. Hereinafter, when it is not necessary to distinguish between the physical memories 3a, 3b, and 3c, they are collectively referred to as a physical memory 3.
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 single program 7A is referred to as non-shared memory.

物理メモリ3は、高速に読み書きが可能な揮発性記憶領域と、SPD(Serial Presence Detect)情報を格納する小容量の不揮発性記憶領域を備える。SPD情報とは、物理メモリの特性を表す情報であり、たとえばサイズ、すなわち記憶容量、パリティビットの有無、エラー訂正可能なビット数、動作周波数である。なお、本実施の形態ではCPU1が揮発性記憶領域を備える場合は、その揮発性記憶領域も物理メモリ3の1つであるとして扱う。CPU1が揮発性記憶領域を備える場合は、CPU1の読み出し専用領域にSPD情報が格納される。そのため、物理メモリがCPU1と同一の半導体内部に配置されているか否かは、SPD情報に基づき判断できる。   The physical memory 3 includes a volatile storage area that can be read and written at high speed, and a small-capacity nonvolatile storage area that stores SPD (Serial Presence Detect) information. The SPD information is information indicating the characteristics of the physical memory, and is, for example, the size, that is, the storage capacity, the presence / absence of parity bits, the number of bits that can be corrected for errors, and the operating frequency. In the present embodiment, when the CPU 1 includes a volatile storage area, the volatile storage area is also treated as one of the physical memories 3. When the CPU 1 includes a volatile storage area, the SPD information is stored in the read-only area of the CPU 1. Therefore, whether or not the physical memory is arranged in the same semiconductor as the CPU 1 can be determined based on the SPD information.

記憶部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 programs 7A and an operating system (hereinafter referred to as OS) 7B.
The CPU 1 reads the program 7A stored in the storage unit 7 into the physical memory 3 and executes it. The CPU 1 requests the memory controller 6 to access the physical memory 3, for example, creation of the shared memory, reading / writing of the shared memory, and reading / writing of the non-shared memory based on an instruction of the program 7A. In FIG. 1, only one CPU 1 exists, but the shared memory management system 8 may include a plurality of CPUs to ensure redundancy.

メモリコントローラ6は、物理メモリ3がデータバス5と接続されるインタフェースであり、メモリ異常検知部20を備える。メモリコントローラ6が有する基本的な機能はメモリコントローラ6が備えるハードウエアロジックにより実現され、共有メモリの処理など高度な機能はOS7B、すなわちソフトウエアにより実現される。共有メモリに関する機能は後述する。メモリコントローラ6が有する基本的な機能とは、メモリコントローラ6の物理メモリ3に対するアドレスを指定した読み書き、およびメモリ異常検知部20のメモリ異常の検知である。   The memory controller 6 is an interface for connecting the physical memory 3 to the data bus 5, and includes a memory abnormality detection unit 20. The basic functions of the memory controller 6 are realized by hardware logic provided in the memory controller 6, and advanced functions such as shared memory processing are realized by the OS 7B, that is, software. Functions related to the shared memory will be described later. The basic functions of the memory controller 6 are reading / writing by designating an address to the physical memory 3 of the memory controller 6 and memory abnormality detection of the memory abnormality detection unit 20.

メモリ異常検知部20は、パリティビットやECCビットの処理を行う。たとえば、メモリコントローラ6がパリティ付きメモリにデータを書き込む際は、メモリ異常検知部20がパリティビットの算出を行い、メモリコントローラ6がデータとともにそのデータに関連付けられたパリティビットをパリティ付きメモリに書きこむ。また、メモリコントローラ6がパリティ付きメモリからデータを読み込む際は、メモリコントローラ6がデータとともにそのデータに関連付けられたパリティビットを読み込むと、メモリ異常検知部20がパリティビットの整合性を確認する。データとパリティビットの整合性がある場合は異常が検出されないので特段の処理を行わない。データとパリティビットの整合性がない場合、すなわちソフトエラーを検出した場合はCPU1に処理を停止させる割り込み命令を出力する。メモリ異常検知部20は、メモリコントローラ6がECC付きメモリにアクセスする際にも同様の処理を行い、読み出しの際にエラーを検出すると訂正可能な範囲でエラーを訂正してデータをCPU1に出力し、訂正が不可能な場合はCPU1に処理を停止させる割り込み命令を出力する。たとえば1ビット訂正可能なECCメモリにおいて、メモリ異常検知部20が2ビット書き換えられたことを検出するとエラー訂正が可能な範囲を超えているためCPU1に割り込み命令を出力する。   The memory abnormality detection unit 20 performs processing of parity bits and ECC bits. For example, when the memory controller 6 writes data to the memory with parity, the memory abnormality detection unit 20 calculates the parity bit, and the memory controller 6 writes the parity bit associated with the data together with the data to the memory with parity. . When the memory controller 6 reads data from the memory with parity, when the memory controller 6 reads the parity bit associated with the data together with the data, the memory abnormality detection unit 20 checks the consistency of the parity bit. If there is consistency between the data and the parity bit, no abnormality is detected and no special processing is performed. When there is no consistency between the data and the parity bit, that is, when a soft error is detected, an interrupt instruction for stopping the processing by the CPU 1 is output. The memory abnormality detection unit 20 performs the same processing when the memory controller 6 accesses the memory with ECC, and if an error is detected during reading, the error is corrected within a correctable range and the data is output to the CPU 1. If correction is impossible, the CPU 1 outputs an interrupt instruction for stopping the processing. For example, in an ECC memory capable of 1-bit correction, when the memory abnormality detection unit 20 detects that 2 bits have been rewritten, the error instruction is exceeded and an interrupt instruction is output to the CPU 1.

メモリ異常検知部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 abnormality detection unit 20 is, for example, CoreLink DMC-400 Dynamic Memory Controller Technical Reference Manual (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0466c/apas07s01.html ) Etc.

(共有メモリに関する機能)
OS7B、すなわちソフトウエアにより実現される、共有メモリに関する機能を説明する。図2は、OS7Bにより実現される3つの機能を機能ブロックとして表し、それら機能ブロックが作成・使用する情報を併せて示す図である。
OS7Bにより実現される機能を表す3つの機能ブロックとは、共有メモリの読み書きに関する処理を担当する共有メモリ管理部17、共有メモリを作成する共有メモリ作成部18、および共有メモリを作成する準備を行うメモリ管理初期化部19である。
(Functions related to shared memory)
A function related to the shared memory realized by the OS 7B, that is, software will be described. FIG. 2 shows the three functions realized by the OS 7B as function blocks, and also shows information created and used by these function blocks.
With the three functional blocks representing the functions realized by the OS 7B, the shared memory management unit 17 in charge of processing related to reading and writing of the shared memory, the shared memory creation unit 18 that creates the shared memory, and preparations for creating the shared memory are performed. This is a memory management initialization unit 19.

これら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 physical memories 3a, 3b, and 3c having the highest reliability.

メモリ管理初期化部19は、共有メモリ管理システム8が起動するたびに、共有メモリ管理システム8に接続されている全ての物理メモリ3からSPD情報を読み込み、後述する手順で物理メモリ信頼度テーブル15を作成する。
共有メモリ作成部18は、プログラム7Aからの共有メモリの作成要求に基づき後述する手順で共有メモリを作成し、作成した共有メモリの情報を共有メモリ管理テーブル14に書きこむ。
共有メモリ管理部17は、プログラム7Aからの共有メモリの読み書き要求に基づき、後述するようにアクセス可否を判断する。アクセス可能と判断する場合は共有メモリのアドレスを特定してメモリコントローラ6の基本的な機能により読み書きを実行し、アクセス不可と判断する場合はエラーを出力する。
The memory management initialization unit 19 reads SPD information from all the physical memories 3 connected to the shared memory management system 8 every time the shared memory management system 8 is activated, and performs the physical memory reliability table 15 in the procedure described later. Create
Based on a shared memory creation request from the program 7A, the shared memory creation unit 18 creates a shared memory according to a procedure described later, and writes information about the created shared memory into the shared memory management table 14.
Based on the shared memory read / write request from the program 7A, the shared memory management unit 17 determines whether access is possible, as will be described later. When it is determined that access is possible, the address of the shared memory is specified and read / write is executed by the basic function of the memory controller 6, and when it is determined that access is impossible, an error is output.

プログラム管理テーブル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 program 7A and the safety level of the program are recorded in association with each other. The program identifier is a unique character string for identifying the program 7A, and the character string itself has no meaning. The safety degree is an index indicating the magnitude of risk when the program 7A has a defect, for example, classified using ASIL (Automotive Safety Integrity Level) in ISO 26262, and QM <ASIL0 <ASIL1 <ASIL2 < It shows that a risk is so large on the right side in order of ASIL3. Information recorded in the program management table 12 is static and cannot be rewritten in principle.
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 physical memory 3 required for each safety degree of the program 7A is recorded in association with each other. The information recorded in the safety degree correspondence table 16 is static and cannot be rewritten in principle. As will be described later, a physical memory accessible by a certain program is a memory having a reliability higher than the reliability corresponding to the safety level of the program.
FIG. 4 is a diagram showing an example of the safety level correspondence table 16. The reliability of the physical memory 3 is represented by a number, for example. The larger the reliability of the physical memory 3 is, the higher the reliability with respect to an error is, and it indicates that data abnormality due to a soft error is less likely to occur. From FIG. 4, for example, it can be seen that the physical memory 3 accessible by the program having the safety level ASIL 1 is the physical memory 3 having the reliability 3 or 4.

物理メモリ信頼度テーブル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 physical memory 3 installed in the shared memory management system 8, correspondence with the address space managed by the OS 7B and the reliability of the physical memory. The correspondence of the address space can be expressed by, for example, the head address and the area size, that is, the size. However, the correspondence of the address space may be represented by a start address and an end address. The physical memory reliability table 15 is created every time the shared memory management system 8 is activated by the memory management initialization unit 19. For example, when the physical memory 3 constituting the shared memory management system 8 is replaced, a new physical memory reliability table 15 is created by the memory management initialization unit 19.
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 OS 7B. The shared memory identifier is an identifier determined in advance so that different programs share the memory. The reliability of the shared memory is the reliability of the physical memory in which the shared memory is stored.
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 management initialization unit 19 will be described.
FIG. 7 is a flowchart showing an initialization process of the memory management initialization unit 19 that operates when the shared memory management system 8 is activated. The execution subject of each step described below is the CPU 1 of the shared memory management system 8.
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 physical memories 3 connected to the shared memory management system 8, and the physical memory 3 to be processed is changed in order.

ステップS502では、処理対象の物理メモリ3のSPD情報を読み込み、続くステップS502Aでは処理対象の物理メモリの信頼度を仮にゼロに設定し、ステップS503に進む。
ステップS503では、ステップS502において読み込んだSPD情報に基づき、処理対象の物理メモリがパリティビットやECCビットを備えるか否かを判断する。いずれかを備えると判断する場合はステップS504に進み、いずれも備えない、すなわちノンパリティであると判断する場合はステップS509に進む。
ステップS504では物理メモリの信頼度を仮に1に設定し、ステップS505に進む。
In step S502, the SPD information of the physical memory 3 to be processed is read. In the subsequent step S502A, the reliability of the physical memory to be processed is temporarily set to zero, and the process proceeds to step S503.
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 physical memory 3 is 3.
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 CPU 1, the capacity of the physical memory is small and the probability of being affected by neutron beams is low. The second reason is that if they are arranged on the same silicon die, the wiring length is short and is not easily influenced by noise during communication. Next, the process proceeds to step S509.

ステップ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 OS 7B, the size of the physical memory included in the SPD information read in step S502, and the reliability of the physical memory calculated in steps S502A to S508. The start address of the physical memory in the memory space managed by the OS 7B is zero (0x0000) if the physical memory information is not written in the physical memory reliability table 15, and if the physical memory information is written. This is a value obtained by adding the size of the lowermost physical memory to the lowermost physical memory start address.
Steps S502 to S509 described above are repeated for each physical memory 3 connected to the shared memory management system 8, and when this is finished, the flowchart shown in FIG.

(共有メモリ作成部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 program 7A. The execution subject of each step described below is the CPU 1 of the shared memory management system 8.
In step S601, the identifier of the program 7A that has requested creation of the shared memory, the identifier of the shared memory that is requested to be created, and the size of the shared memory that is requested to be created are read, and the process proceeds to step S602.

ステップ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 program 7A read in step S601 is specified using the program management table 12, and the process proceeds to step S604.
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 physical memory 3 having an area) larger than the requested size is specified. When a plurality of physical memories 3 are specified, the physical memory 3 having the lowest reliability among the specified physical memories 3 is selected. Next, the process proceeds to step S608.
In step S608, it is determined whether or not the physical memory 3 satisfying the condition in step S607 has been identified. If it can be identified, the process proceeds to step S609, and if it cannot be found, the process proceeds to step S611.

ステップ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 physical memory 3 specified in step S607, the requested shared memory size, the shared memory identifier, and the reliability of the specified physical memory 3 are written in the shared memory management table 14. Proceed to step S610. Writing the memory area information to the shared memory management table 14 creates a shared memory and creates a new shared memory management table 14 in which information about the created shared memory is recorded. Then, the newly created shared memory management table 14 is stored in the storage unit 7.
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 program 7A that requested access and the identifier of the shared memory to be accessed are read, and the process proceeds to step S702.

ステップ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 program 7A read in step S701 is specified using the program management table 12, and the process proceeds to step S704.
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 program 7A identified in step S703, and the reliability of the shared memory to be accessed requests access. It is determined whether or not the reliability corresponds to the safety level of 7A. As a result, if the reliability of the shared memory to be accessed is equal to or higher than the reliability corresponding to the safety level of the program 7A that requested access, it is determined that the access condition is satisfied, and the process proceeds to step S709. Is not satisfied, and the process proceeds to step S710.
For example, when the program 7A having the identifier “BBB” requests access to the shared memory having the shared memory identifier “SH_B”, the determination is made as follows. That is, referring to the program management table 12, the safety level of the program 7A having the identifier “BBB” is “QM”, and referring to the physical memory reliability table 15, the reliability corresponding to the safety level “QM” is “1”. It is. Referring to the shared memory management table 14, since the reliability of the shared memory with the shared memory identifier “SH_B” is “2”, it can be determined that “2”> “1” and that the condition of step S708 is satisfied. That is, since the reliability of the shared memory with the shared memory identifier “SH_B” to be accessed is higher than the reliability corresponding to the safety level “QM” of the program 7A with the identifier “BBB” that requested access, the access condition It can be judged that

ステップ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 program 7A, a signal indicating the end of output of read data or write is output, and the flowchart of FIG. 9 ends.
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 program 7A that requested access, and the flowchart of FIG. 9 is terminated.
In step S709, the shared memory management unit 17 may output the start address of the shared memory to the program 7A without performing the access to the shared memory. In the above example, “0x1000”, which is the start address of the shared memory with the shared memory identifier “SH_B”, is output.

(メモリ異常検知部20の動作)
メモリ異常検知部20の動作、すなわちパリティビットやECCビットの処理を説明する。
図10は、メモリ異常検知部20の動作を表すフローチャートである。メモリ異常検知部20は、メモリコントローラ6がプログラム7Aからメモリへのアクセス、すなわち読み込み、および書き込みを要求されると動作を開始する。
(Operation of the memory abnormality detection unit 20)
The operation of the memory abnormality detection unit 20, that is, processing of parity bits and ECC bits will be described.
FIG. 10 is a flowchart showing the operation of the memory abnormality detection unit 20. The memory abnormality detection unit 20 starts the operation when the memory controller 6 is requested to access the memory, that is, read and write from the program 7A.

ステップS1101では、処理対象の物理メモリ3がノンパリティメモリであるか否かを判断する。処理対象がノンパリティメモリの場合はメモリ異常検知部20は処理をする必要がないので、図10に示すプログラム7Aを終了する。処理対象がノンパリティメモリではない場合、すなわちパリティ付きメモリまたはECCメモリの場合はステップS1102に進む。
ステップS1102では、メモリコントローラ6が要求されているアクセスの目的が、読み込みおよび書き込みのいずれであるかを判断する。読み込みであると判断する場合はステップS1103に進み、書き込みであると判断する場合はステップS1107に進む。
In step S1101, it is determined whether the physical memory 3 to be processed is a non-parity memory. When the processing target is a non-parity memory, the memory abnormality detection unit 20 does not need to perform processing, so the program 7A shown in FIG. If the processing target is not a non-parity memory, that is, if it is a memory with parity or an ECC memory, the process proceeds to step S1102.
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 physical memory 3, and the process proceeds to step S1104.
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 CPU 1 is interrupted to notify the error detection, and the flowchart of FIG. On the other hand, if it is determined in step S1105 that no error is detected, nothing is done and the flowchart of FIG. In this step, if the error is within a range that can be corrected by the ECC bits, the error is handled as not detected.

要求されているアクセスが書き込みであると判断された場合に実行されるステップ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 physical memory 3 to be accessed from the CPU 1, a plurality of physical memories 3 having different reliability with respect to errors, and a plurality of programs 7A executed by the CPU 1 and having different safety. A storage unit 7 that stores a shared memory management table 14 in which information about the created shared memory is recorded, and a shared memory management unit 17 that manages access to the shared memory by the program 7A are provided. The shared memory management table 14 includes the reliability of the shared memory that is information related to the reliability of the shared memory. The shared memory management unit 17 refers to the shared memory management table 14 (step S707 in FIG. 9), compares the reliability of the shared memory with the reliability corresponding to the safety of the program 7A (step S708 in FIG. 9), Based on the comparison result, access to the shared memory by the program 7A is managed (steps S709 and S710 in FIG. 9). Since it did in this way, it can prevent that the operation | movement of the highly safe program 7A is prevented by the accidental error which arises on the physical memory 3, and can improve the availability of the highly safe program 7A.

(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 program 7A (step S708: Yes in FIG. 9), the shared memory management unit 17 transfers to the shared memory by the program 7A. Is permitted (step S709 in FIG. 9). On the other hand, when the reliability of the shared memory is lower than the reliability corresponding to the safety of the program 7A (step S708: No in FIG. 9), the access to the shared memory by the program 7A is denied (step S710 in FIG. 9).
Therefore, each program 7A stored in the storage unit 7 does not access a shared memory that does not satisfy the reliability corresponding to the safety level of each program 7A, and thus is safe due to an error that occurs in a physical memory with low reliability. It is possible to prevent the operation of the highly reliable program 7A from being hindered.

(3)共有メモリ管理システム8は、共有メモリの作成を要求したプログラム7Aの安全度に基づき複数の物理メモリ3のいずれかを選択し、選択した物理メモリ3に共有メモリを作成し、作成された共有メモリに関する情報が記録された共有メモリ管理テーブル14を作成して記憶部7に記憶させる共有メモリ作成部18を備える。
そのため、不必要に高い安全度の物理メモリ3に共有メモリを作成することがない。
(3) The shared memory management system 8 selects one of the plurality of physical memories 3 based on the safety level of the program 7A that has requested creation of the shared memory, creates the shared memory in the selected physical memory 3, and creates the shared memory. A shared memory creation unit 18 for creating a shared memory management table 14 in which information related to the shared memory is recorded and storing the shared memory management table 14 in the storage unit 7.
Therefore, a shared memory is not created in the physical memory 3 with an unnecessarily high safety level.

(4)物理メモリ3が備える不揮発性記憶領域に備えられた情報、すなわちSPD情報に基づき当該物理メモリ3の信頼度を決定するメモリ管理初期化部19を備える。メモリ管理初期化部19は、当該共有メモリ管理システム8が起動するたびに当該共有メモリ管理システム8に接続された全ての物理メモリ3について信頼度を決定し、記憶部7に格納する。
そのため、SPD情報に基づきエラー検出能力やエラー訂正能力を物理メモリの信頼度として算出することができる。また、共有メモリ管理システム8に接続する物理メモリ3の構成を変更すると、ユーザによる設定の変更を待つことなく記憶部7に追加された物理メモリ3の情報を追加することができる。
(4) The memory management initialization part 19 which determines the reliability of the said physical memory 3 based on the information provided in the non-volatile storage area with which the physical memory 3 is provided, ie, SPD information, is provided. The memory management initialization unit 19 determines the reliability of all the physical memories 3 connected to the shared memory management system 8 every time the shared memory management system 8 is activated, and stores the reliability in the storage unit 7.
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 physical memory 3 connected to the shared memory management system 8 is changed, the information on the physical memory 3 added to the storage unit 7 can be added without waiting for the user to change the setting.

上述した第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 program 7A are examples, and reliability and safety other than those described above may be used. For example, the reliability of the physical memory may be set to 6 levels or more, or may be set to 4 levels or less. Moreover, you may use other than ASIL defined by ISO26262 for the safety degree corresponding to the safety degree of the program 7A.

(変形例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 program 7A may be associated and stored. Further, the information stored in the program management table 12 and / or the safety level correspondence table 16 may be stored in combination with the shared memory management table 14 or the physical memory reliability table 15.
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 program 7A (step S708: Yes in FIG. 12), the shared memory management unit 17 transfers to the shared memory by the program 7A. As the access permission information indicating that the access is permitted, the program identifier of the program 7A is added and recorded in the access permission column of the shared memory management table 14A (step S780 in FIG. 12). If the program identifier is recorded in the access permission column of the shared memory management table 14A (step S781: Yes in FIG. 12), the shared memory management unit 17 permits the program 7A to access the shared memory based on this. (Step S782 in FIG. 12).
Therefore, the shared memory management unit 17 can easily determine that the program 7A is permitted to access the shared memory by referring to the access permission column of the shared memory management table 14A.

(変形例4)
物理メモリ信頼度テーブル15に記録される物理メモリ3の信頼度は、SPD情報以外に基づいて設定されてもよい。たとえば、共有メモリ管理システム8の回路設計やSPD情報には記載されない物理メモリ3の特性に基づき、その信頼度を増減させてもよい。たとえば、物理メモリ3を鉛で覆ったことにより信頼度を「1」増加させてもよい。
(Modification 4)
The reliability of the physical memory 3 recorded in the physical memory reliability table 15 may be set based on other than SPD information. For example, the reliability may be increased or decreased based on the circuit design of the shared memory management system 8 or the characteristics of the physical memory 3 not described in the SPD information. For example, the reliability may be increased by “1” by covering the physical memory 3 with lead.

(変形例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 management initialization unit 19 are functional blocks realized by the OS 7B stored in the storage unit 7. However, the shared memory management unit 17, the shared memory creation unit 18, and the memory management initialization unit 19 may be realized by other software, or may be realized by an ASIC (application specific integrated circuit) or an FPGA (Field Programmable Gate Array). It may be realized.

(変形例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 physical memory 3 with the highest reliability. . However, these are not limited to the physical memory 3 and may be arranged in a dedicated storage area provided in the memory controller 6, for example.

(変形例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 programs 7A accessing the shared memory. This is different from the first embodiment.

(構成)
共有メモリ管理システム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 OS 7B stored in the storage unit 7, and the operation of the shared memory creation unit 18 is different from that of the first embodiment.
In the present embodiment, when the program 7A outputs a shared memory creation command to the memory controller 6, in addition to the identifier of the shared memory, identifiers of all the programs 7A that may access the shared memory are displayed. Output to the memory controller 6.

(共有メモリ作成部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 program 7A in the second embodiment. The execution subject of each step described below is CPU1. The same processes as those in FIG. 8 in the first embodiment are denoted by the same step numbers, and description thereof is omitted.
In step S801, the identifiers of all programs 7A accessing the shared memory to be created, the identifiers of the shared memory requested to be created, and the size of the shared memory requested to be created are read, and the process proceeds to step S802.

ステップ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 program 7A read in step S801 is specified using the program management table 12, and the process proceeds to step S804.
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 physical memories 3 based on the highest safety degree among the safety degrees of the plurality of programs 7A that access the shared memory, and sets the selected physical memory as the selected physical memory. A shared memory creation unit 18 is provided that creates a shared memory and creates a shared memory management table 14 in which information about the created shared memory is recorded and stores the shared memory management table 14 in the storage unit 7.
In the first embodiment described above, among the plurality of programs 7A accessing the shared memory, the program 7A having the highest degree of safety needs to output a shared memory creation command. However, in this embodiment, even if any program 7A outputs a shared memory creation command, a shared memory that can be accessed by any of the shared memories is created.
Even if the program 7A, which was not scheduled at the time of creating the shared memory, accesses the shared memory, the shared memory management unit 17 operates in the same manner as in the first embodiment. Accessability can be determined from the relationship between the degree of security and the degree of safety of the program 7A.

(第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 program 7A, the memory abnormality detection unit 20 is temporarily disabled so as not to generate a CPU interrupt. It differs from the first embodiment in that a soft error is detected.

(構成)
共有メモリ管理システム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 OS 7B stored in the storage unit 7, and the operation of the shared memory management unit 17 is different from that of the first embodiment.
Further, in the present embodiment, when the program 7A accesses the shared memory to the memory controller 6, in addition to the shared memory identifier, the purpose of access, that is, reading or writing is transmitted to the shared memory management unit 17.

(処理の概要)
メモリ異常検知部20は、パリティビットやECCビットを用いてソフトエラーを検出し、ソフトエラーの訂正が不可能な場合はCPU1に割り込み命令を出力する。この割り込み処理は、意図しないソフトエラーの発生を知らせる点では有用ではあるが、読み込み対象の物理メモリ3の信頼度が低いことが事前に明らかである場合には他の処理も中断されるため望ましくない。そこで、信頼度が低い物理メモリ3からデータを読み出す際には一時的にメモリ異常検知部20によるCPU割り込み機能を無効化する。さらに、メモリ異常検知部20と同様にパリティビットの算出、および検証を行う機能を共有メモリ管理部17に持たせることで、従来と同様にソフトエラーを検出する。
なお、前述の“読み込み対象の物理メモリ3の信頼度が低いことが事前に明らかである場合”とは、たとえばプログラム7Aの安全度に対応する信頼度よりも、共有メモリが配置された物理メモリ3の信頼度が低い場合である。
(Outline of processing)
The memory abnormality detection unit 20 detects a soft error using a parity bit or an ECC bit, and outputs an interrupt instruction to the CPU 1 when the soft error cannot be corrected. This interrupt process is useful in that it informs of the occurrence of an unintended soft error, but it is desirable because other processes are also interrupted if it is clear in advance that the reliability of the physical memory 3 to be read is low. Absent. Therefore, when reading data from the physical memory 3 with low reliability, the CPU interrupt function by the memory abnormality detection unit 20 is temporarily invalidated. Further, by providing the shared memory management unit 17 with the function of calculating and verifying parity bits as in the memory abnormality detection unit 20, a soft error is detected as in the conventional case.
The above-mentioned “when it is clear in advance that the reliability of the physical memory 3 to be read is low” means, for example, the physical memory in which the shared memory is arranged rather than the reliability corresponding to the safety level of the program 7A. This is a case where the reliability of 3 is low.

図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 program 7A in the third embodiment. The same processes as those in the first embodiment are denoted by the same step numbers and description thereof is omitted.
In step S901, the identifier of the program 7A that requested access, the identifier of the shared memory, and the purpose of access are read, and the process proceeds to step S902.

ステップ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 program 7A. Therefore, the process proceeds to step S702 for the determination. If it is determined that it is not reading, that is, writing, the parity bit is always calculated and written regardless of the reliability described above, and the process proceeds to step S911.
In steps S702 to S707, as described in the first embodiment, the reliability corresponding to the safety level of the program 7A and the reliability of the shared memory to be accessed are specified. In a succeeding step S708, it is determined whether or not the reliability of the shared memory to be accessed is equal to or higher than the reliability corresponding to the safety level of the program 7A. If it is determined that the condition is satisfied, the process proceeds to step S910. If it is determined that the condition is not satisfied, the process proceeds to step S903.

ステップ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 abnormality detection unit 20 is temporarily invalidated, and the process proceeds to step S904.
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 abnormality detection unit 20 is invalidated, and the process proceeds to step S905.
In step S905, the CPU interruption by the memory abnormality detection unit 20 is validated, and the process proceeds to step S906.
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 program 7A that made the access request, and the flowchart of FIG. 14 ends.
In step S909, a soft error has occurred in the program 7A that made the access request, and an error indicating that reading has failed is output, and the flowchart of FIG. 14 ends.

アクセスの目的が書き込みであった場合に実行されるステップ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 program 7A that has requested access to the shared memory, the parity bit of the data is calculated, and the flow proceeds to step S914.
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 program 7A writes data to the shared memory (FIG. 14, Step S902: Yes), the shared memory management unit 17 uses a data modification detection code for detecting modification of data, such as a parity bit. The data and the data alteration detection code are calculated and written in the shared memory (FIG. 14, steps S911 to S914). When the program 7A reads data from the shared memory, the shared memory management unit 17 determines that the reliability of the shared memory is lower than the reliability corresponding to the safety of the program 7A (FIG. 14, Step S708: No), interrupt processing to the CPU 1 by the memory abnormality detection unit 20 is invalidated (step S903 in FIG. 14). In this state, the data and the data alteration detection code are read from the shared memory to determine whether or not the data has been altered (step S906 in FIG. 14).
For this reason, it is possible to detect a soft error even though no CPU interrupt is generated by the memory abnormality detection unit 20. That is, even if a shared memory created in a physical memory with low reliability is accessed, the operation of a highly secure program is not hindered, and the availability of a highly secure program can be improved.

(第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 abnormality detection unit 20 detects an abnormality, the occurrence of the abnormality is recorded instead of generating a CPU interrupt, and a soft error is detected based on the recording. And different.
The physical memory 3 used in the present embodiment is limited to a memory other than a non-parity memory, that is, a memory with parity or a memory with ECC.

(構成)
共有メモリ管理システム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 OS 7B stored in the storage unit 7, and the operation of the shared memory management unit 17 is different from that of the first embodiment.
Further, in the present embodiment, when the program 7A accesses the shared memory to the memory controller 6, in addition to the shared memory identifier, the purpose of access, that is, reading or writing is transmitted to the shared memory management unit 17.

(処理の概要)
メモリ異常検知部20は、パリティつきメモリではパリティビットを用いて、ECC付きメモリではECCビットを用いて、第1の実施の形態において説明したようにソフトエラーを検出する。メモリ異常検知部20はソフトエラーを検出すると、後述するメモリ異常記録テーブル21にソフトエラーが検出されたアドレスを記録する。
図15は、メモリ異常記録テーブル21の一例を示す図である。メモリ異常記録テーブル21にはソフトエラーが検出されたメモリのアドレスが記録される。図15に示す例では、2つのアドレスでソフトエラーが検出されている。
(Outline of processing)
As described in the first embodiment, the memory abnormality detection unit 20 detects a soft error using a parity bit in a memory with parity and using an ECC bit in a memory with ECC. When the memory abnormality detection unit 20 detects a soft error, it records the address where the soft error is detected in a memory abnormality recording table 21 described later.
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 program 7A in the fourth embodiment. The same steps as those in the first embodiment and the third embodiment are denoted by the same step numbers, and description thereof is omitted.
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 abnormality detection unit 20.

ステップ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 program 7A and the reliability of the shared memory to be accessed are determined. Identified. In a succeeding step S708, it is determined whether or not the reliability of the shared memory to be accessed is equal to or higher than the reliability corresponding to the safety level of the program 7A. If it is determined that the condition is satisfied, the process proceeds to step S910. If it is determined that the condition is not satisfied, the process proceeds to step S1001.
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 abnormality detection unit 20 is temporarily invalidated, and the process proceeds to step S1004.

ステップ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 abnormality detection unit 20 and is recorded in the memory abnormality recording table 21 when an abnormality is detected. Next, the process proceeds to step S1004.
In step S1004, CPU interruption by the memory abnormality detection unit 20 is validated, and the process proceeds to step S1005.
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 program 7A that requested access to the data read in step S1003. Output to. This is the end of the flowchart of FIG.

上述した第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 abnormality detection unit 20 calculates a data modification detection code for detecting data modification when the program 7A writes data to the shared memory, and stores the data and the data modification detection code in the shared memory. Write.
When the program 7A reads data from the shared memory, the memory abnormality detection unit 20 reads the data and the data modification detection code from the shared memory and determines whether the data has been modified.
The shared memory management unit 17 determines whether data has been altered based on the determination result of the memory abnormality detection unit 20. As described above, in the third embodiment, the shared memory management unit 17 performs the parity bit calculation and the parity bit matching check. However, in the present embodiment, the memory abnormality detection unit 20 uses the hardware logic to execute them. Perform the process.
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 ... Storage unit 7A ... Program 8 ... Shared memory management system 12 ... Program management table 14, 14A ... Shared memory management table 15 ... Physical memory reliability table 16 ... Safety Degree correspondence table 17 ... Shared memory management unit 18 ... Shared memory creation unit 19 ... Memory management initialization unit 20 ... Memory abnormality detection unit 21 ... Memory abnormality recording table

Claims (8)

CPUと、
エラーに対する信頼性が互いに異なる複数の物理メモリと、
前記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.
請求項1に記載のメモリ管理システムであって、
前記共有メモリ管理部は、
前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも高いか同じである場合に、前記プログラムによる前記共有メモリへのアクセスを許可し、
前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも低い場合に、前記プログラムによる前記共有メモリへのアクセスを拒否するメモリ管理システム。
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.
請求項2に記載のメモリ管理システムであって、
前記共有メモリ管理部は、前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも高いか同じである場合に、前記プログラムによる前記共有メモリへのアクセスを許可することを示すアクセス許可情報を前記共有メモリ管理テーブルに追加して記録し、
前記共有メモリ管理テーブルに前記アクセス許可情報が記録されている場合、前記共有メモリ管理部は、前記アクセス許可情報に基づいて前記プログラムによる前記共有メモリへのアクセスを許可するメモリ管理システム。
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.
請求項1に記載のメモリ管理システムであって、
前記物理メモリへアクセスが行われる際に前記物理メモリに保存された情報の異常を検知して前記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.
請求項4に記載のメモリ管理システムであって、
前記共有メモリ管理部は、前記プログラムが前記共有メモリへデータの書き込みを行う際に、前記データの改変を検知するためのデータ改変検知符号を算出し、前記データおよび前記データ改変検知符号を前記共有メモリに書き込み、
前記共有メモリ管理部は、前記プログラムが前記共有メモリからデータの読み込みを行う際に、前記共有メモリの信頼性が前記プログラムの安全性に対応する信頼性よりも低い場合に、前記メモリ異常検知部による前記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.
請求項4に記載のメモリ管理システムであって、
前記メモリ異常検知部は、前記プログラムが前記共有メモリへデータの書き込みを行う際に、前記データの改変を検知するためのデータ改変検知符号を算出し、前記データおよび前記データ改変検知符号を前記共有メモリに書き込み、
前記メモリ異常検知部は、前記プログラムが前記共有メモリからデータの読み込みを行う際に、前記共有メモリから前記データおよび前記データ改変検知符号を読み込んで前記データの改変の有無を判断し、
前記共有メモリ管理部は、前記メモリ異常検知部の判断結果に基づいて前記データの改変の有無を判断するメモリ管理システム。
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.
請求項1に記載のメモリ管理システムであって、
前記共有メモリの作成を要求した前記プログラムの安全度に基づき前記複数の物理メモリのいずれかを選択し、選択した前記物理メモリに前記共有メモリを作成し、作成された前記共有メモリに関する情報が記録された前記共有メモリ管理テーブルを作成して前記記憶部に記憶させる共有メモリ作成部をさらに備えるメモリ管理システム。
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.
請求項1に記載のメモリ管理システムであって、
前記共有メモリにアクセスする複数の前記プログラムのそれぞれの安全度のうち、最も高い安全度に基づき前記複数の物理メモリのいずれかを選択し、選択した前記物理メモリに前記共有メモリを作成し、作成された前記共有メモリに関する情報が記録された前記共有メモリ管理テーブルを作成して前記記憶部に記憶させる共有メモリ作成部をさらに備えるメモリ管理システム。
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.
JP2016012483A 2016-01-26 2016-01-26 Memory management system Active JP6469599B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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