JPH04314151A - Shared data area destruction preventing system - Google Patents

Shared data area destruction preventing system

Info

Publication number
JPH04314151A
JPH04314151A JP3079430A JP7943091A JPH04314151A JP H04314151 A JPH04314151 A JP H04314151A JP 3079430 A JP3079430 A JP 3079430A JP 7943091 A JP7943091 A JP 7943091A JP H04314151 A JPH04314151 A JP H04314151A
Authority
JP
Japan
Prior art keywords
shared data
data area
page
access right
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3079430A
Other languages
Japanese (ja)
Inventor
Kenichi Kubota
健一 久保田
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP3079430A priority Critical patent/JPH04314151A/en
Publication of JPH04314151A publication Critical patent/JPH04314151A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To check an access right when a memory is referred to or accessed by using directly a hardware instruction without using a macro. CONSTITUTION:The page 24a of virtual space is coordinated with the page 25a of physical space by a page table. As for the page not coordinated with the physical space in the virtual space, by setting a page fault-hit in the page table, reference or update to the page falls into interruption in viewpoint of hardware. A page fault is set previously in all the page tables in a system shared data area so as to make every reference and updata to the system shared data area the interruption, and the access right is checked in this interruption processing. At that time, by turning all the pages in the system shared data area into a page fault state, the presence of the access right to the accessed memory is checked in the extension of the interruption caused by memory access.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、電子計算機システムで
共通に使用されるデータ・エリア(以下、システム共用
データ域という)の破壊防止に役立つ共用メモリ破壊防
止方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shared memory destruction prevention method useful for preventing destruction of data areas commonly used in electronic computer systems (hereinafter referred to as system shared data areas).

【0002】0002

【従来の技術】従来のシステム共用データ域の破壊防止
方式では、システム共用データ域管理機構により割り当
てられたメモリへの参照・更新権(以下、アクセス権と
いう)をタスク対応に登録するアクセス権テーブルを持
っており、タスクがマクロになり、システム共用データ
域の参照・更新を行なうときにアクセス権テーブルをチ
ェックすることにより、不当なメモリの誤った参照・更
新を防止していた。
[Background Art] In the conventional system shared data area destruction prevention method, an access rights table registers the access rights (hereinafter referred to as access rights) to the memory allocated by the system shared data area management mechanism for each task. , the task became a macro, and by checking the access privilege table when referencing or updating the system shared data area, it prevented erroneous memory references and updates.

【0003】0003

【発明が解決しようとする課題】上述した従来のシステ
ム共用データ域の破壊防止方式においては、利用者がマ
クロを使用せず、直接、ハードウェア命令を使用するこ
とによりメモリの参照・更新を行なうことが可能であっ
た。
[Problem to be Solved by the Invention] In the conventional system shared data area destruction prevention method described above, the user does not use macros, but directly uses hardware instructions to refer to and update memory. It was possible.

【0004】したがって、利用者がマクロを使用しない
場合は、不当なメモリの参照・更新が発生しても、チェ
ックを行なうことが不可能である。
[0004] Therefore, if the user does not use macros, it is impossible to check even if an illegal memory reference or update occurs.

【0005】[0005]

【課題を解決するための手段】本発明によれば、「ペー
ジング方式による仮想記憶方式を備え、マルチプログラ
ミングを採用し、システムで共通に使用されるシステム
共用データ域と前記システム共用データ域のタスクへの
割り当てを行なうシステム共用データ域管理機構とを有
する電子計算機システムにおいて、システム共用データ
域管理機構により割り当てられたメモリへのアクセス権
を登録するアクセス権登録機構と、システム共用データ
域のページをすべてページフォルト状態にすることによ
り、メモリアクセスにより発生する割り込みの延長でア
クセスしたメモリへのアクセス権の有無をチェックする
アクセス権チェック機構とを有することを特徴とする共
用データ域破壊防止方式」が得られる。
[Means for Solving the Problems] According to the present invention, a virtual storage system using a paging method is provided, multiprogramming is adopted, and a system shared data area commonly used in the system and a task of the system shared data area are provided. In a computer system that has a system shared data area management mechanism that performs allocation to memory, an access rights registration mechanism that registers access rights to memory allocated by the system shared data area management mechanism, and an access right registration mechanism that registers access rights to memory allocated by the system shared data area A shared data area destruction prevention method characterized by having an access right check mechanism that checks whether or not there is an access right to the memory accessed as an extension of an interrupt generated by a memory access by placing all pages in a page fault state. can get.

【0006】[0006]

【実施例】次に、本発明の一実施例を示した図面を参照
して、より詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, an embodiment of the present invention will be described in more detail with reference to the drawings.

【0007】図1は本発明の一実施例の全体構成図であ
る。本実施例における電子計算機システムは、タスクが
実行される中央処理装置などの処理実行手段11と、主
記憶装置などの記憶手段12とから構成される。21,
22はタスク、23はシステム共用データ域のページテ
ーブルである。24は仮想空間、25は記憶手段上の物
理空間を示す。26,27はタスク21,22のアクス
セ権テーブルである。アクセスけテーブルの各エントリ
26a,26b,……,27a,27b,……は仮想空
間のページ24a,24b,……についてタスクにアク
スセ権があるかどうかを示す。
FIG. 1 is an overall configuration diagram of an embodiment of the present invention. The computer system in this embodiment is comprised of processing execution means 11 such as a central processing unit on which tasks are executed, and storage means 12 such as a main storage device. 21,
22 is a task, and 23 is a page table of the system shared data area. 24 is a virtual space, and 25 is a physical space on the storage means. 26 and 27 are access rights tables for tasks 21 and 22. Each entry 26a, 26b, . . . , 27a, 27b, .

【0008】また、仮想空間のページはページテーブル
によって物理空間のページに対応づけられている。例え
ば、ページ24aはページ25aに対応づけられる。ま
た、仮想空間で、物理空間と対応づけられていないペー
ジについてはページテーブルにページフォルトビットを
設定することにより、該ページに対する参照・更新はハ
ード的に割り込みとなる。
[0008] Furthermore, pages in the virtual space are associated with pages in the physical space by a page table. For example, page 24a is associated with page 25a. Furthermore, by setting a page fault bit in the page table for a page that is not associated with a physical space in the virtual space, references and updates to the page become hardware interrupts.

【0009】本実施例においては、システム共用データ
域のページテーブルのすべてにページフォルトを設定し
ておき、システム共用データ域に対する参照・更新すべ
て割り込みとし、この割り込み書りのなかでアクセス権
のチェックを行なう。
In this embodiment, page faults are set for all page tables in the system shared data area, all references and updates to the system shared data area are treated as interrupts, and access rights are checked during this interrupt writing. Do this.

【0010】図2はアクセク権のチェック処理を示し、
アクセス権チェック処理A1と、参照・更新処理A2と
から成る。前述したように、タスクからシステム共用デ
ータあ行なわれると割り込みが発生し、割り込み処理の
延長でアクセク権チェックの処理が行なわれる。
FIG. 2 shows access right checking processing,
It consists of an access right check process A1 and a reference/update process A2. As described above, when a task accesses system-shared data, an interrupt is generated, and as an extension of the interrupt processing, the access right check process is performed.

【0011】まず、処理A1でアクセスしようとしたペ
ージにアクセス権があるかどうかアクセス権テーブルの
ページに対応するエントリを参照することによりチェッ
クする。もし、アクセス権があれば参照・更新処理A2
を行ない、なければ処理A2は行なわずに、割り込み処
理を行なう。
First, in process A1, it is checked whether or not the page to be accessed has an access right by referring to the entry corresponding to the page in the access right table. If you have access rights, reference/update processing A2
If not, processing A2 is not performed and interrupt processing is performed.

【0012】次に、図3および図4を参照して、アクセ
ス権登録処理について説明する。
Next, the access right registration process will be explained with reference to FIGS. 3 and 4.

【0013】図3は、各タスクへのメモリ割り当ての場
合のアクセス権登録の処理を示し、メモリ割り当て処理
B1と、アクセス権登録処理B2と、割り当てアドレス
返却処理B3とから成り、メモリ確保のマクロ等で行な
われる処理である。タスクからメモリ割り当ての要求が
あると、処理B1では、システム共用データ域管理機構
がシステム共用データ域の未使用ページのアドレスを返
却する。次に、処理B2では、アクセス権テーブルの返
却されたページに対応するエントリにアクセス権有りの
表示を行なう。最後に処理B3でタスクに割り当てられ
たアドレスを返却する。
FIG. 3 shows the access right registration process for memory allocation to each task, which consists of memory allocation process B1, access right registration process B2, and allocated address return process B3. This is the process performed in etc. When a task requests memory allocation, in process B1, the system shared data area management mechanism returns the address of an unused page in the system shared data area. Next, in process B2, an entry corresponding to the returned page in the access right table is displayed as having access right. Finally, in process B3, the address assigned to the task is returned.

【0014】図4は、タスク間でシステム共用データ域
をやり取りする処理で、タスク間通信処理C1と、アク
セス権登録処理C2とから成り、タスク間通信のマクロ
内で行なわれる。あるタスクから、他のタスクへの通信
の要求があると処理C1でデータの受け渡しなどのタス
ク間通信処理が行なわれる。ここで受け渡されるデータ
は、タスク間で共用可能なシステム共用データ域にある
ので、処理C2でデータを受け取ったタスクのアクセス
権テーブルの受け渡されたデータのアドレスに対応する
エントリをアクセス権有りとする。それによって、該タ
スクでも該メモリへの参照・更新が可能となる。
FIG. 4 shows a process for exchanging system-shared data areas between tasks, which consists of an inter-task communication process C1 and an access right registration process C2, and is performed within the inter-task communication macro. When there is a request for communication from one task to another task, inter-task communication processing such as data exchange is performed in process C1. The data passed here is in the system shared data area that can be shared between tasks, so in process C2, the entry corresponding to the address of the passed data is set in the access privilege table of the task that received the data. shall be. Thereby, the task can also refer to and update the memory.

【0015】[0015]

【発明の効果】以上説明したように、本発明におけるシ
ステム共用データ域破壊防止方式は、システム共用デー
タ域のページをすべてページフォルト状態にすることに
より、メモリアクセスにより発生する割り込みの延長で
アクセスしたメモリへのアクセス権の有無をチェックす
ることにより、利用者がマクロを使用せず、直接、ハー
ドウェア命令を使用することによるメモリの参照・更新
を行なった場合にもアクセス権のチェックが可能となり
、プログラムのバグ等によるアクセス権のないページの
参照・更新によるトラブルの発生の防止とバグの早期発
見に役立てることができる。
[Effects of the Invention] As explained above, the system shared data area destruction prevention method according to the present invention puts all pages of the system shared data area into a page fault state, thereby preventing accesses by extension of interrupts generated by memory accesses. By checking whether or not the user has access rights to memory, access rights can be checked even when the user refers to or updates memory directly by using hardware instructions without using macros. This can be useful for preventing troubles caused by viewing or updating pages to which you do not have access rights due to program bugs, etc., and for early detection of bugs.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明の一実施例の全体構成図である。FIG. 1 is an overall configuration diagram of an embodiment of the present invention.

【図2】本実施例におけるアクセス権のチェック処理を
説明する図である。
FIG. 2 is a diagram illustrating access right checking processing in this embodiment.

【図3】本実施例におけるシステム共用データ域なメモ
リ割り当て処理を説明する図である。
FIG. 3 is a diagram illustrating memory allocation processing for a system-shared data area in this embodiment.

【図4】本実施例におけるタスク間通信の処理を説明す
る図である。
FIG. 4 is a diagram illustrating inter-task communication processing in this embodiment.

【符号の説明】[Explanation of symbols]

11    処理実行手段 12    記憶手段 21,22    タスク 23    ページテーブル 23a,23b,23c    ページテーブル上のエ
ントリ 24    仮想空間 24a,24b    仮想空間上のページ25   
 物理空間 25a,25b    物理空間上のページ26,27
    アクセス権テーブル26a,26b    ア
クセス権テーブル26のエントリ27a,27b   
 アクセス権テーブル27のエントリA1    アク
セス権チェック処理 A2    参照・更新処理 B1    メモリ割り当て処理 B2    アクセス権登録処理 C1    タスク間通信処理 C2    アクセス権登録処理
11 Process execution means 12 Storage means 21, 22 Task 23 Page table 23a, 23b, 23c Entry on page table 24 Virtual space 24a, 24b Page 25 on virtual space
Physical space 25a, 25b Pages 26, 27 in physical space
Access right table 26a, 26b Entries 27a, 27b of access right table 26
Entry A1 of access right table 27 Access right check process A2 Reference/update process B1 Memory allocation process B2 Access right registration process C1 Inter-task communication process C2 Access right registration process

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  ページング方式による仮想記憶方式を
備え、マルチプログラミングを採用し、システムで共通
に使用されるシステム共用データ域と前記システム共用
データ域のタスクへの割り当てを行なうシステム共用デ
ータ域管理機構とを有する電子計算機システムにおいて
、システム共用データ域管理機構により割り当てられた
メモリへのアクセス権を登録するアクセス権登録機構と
、システム共用データ域のページをすべてページフォル
ト状態にすることにより、メモリアクセスにより発生す
る割り込みの延長でアクセスしたメモリへのアクセス権
の有無をチェックするアクセス権チェック機構とを有す
ることを特徴とする共用データ域破壊防止方式。
1. A system shared data area management mechanism that is equipped with a virtual storage system using a paging method, employs multiprogramming, and performs system shared data areas that are commonly used in the system and allocation of the system shared data areas to tasks. In a computer system that has an access right registration mechanism that registers access rights to memory allocated by the system shared data area management mechanism, and memory access by placing all pages in the system shared data area in a page fault state, A method for preventing destruction of a shared data area, comprising: an access right check mechanism that checks whether or not there is an access right to memory accessed by extension of an interrupt generated by an interrupt.
JP3079430A 1991-04-12 1991-04-12 Shared data area destruction preventing system Pending JPH04314151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3079430A JPH04314151A (en) 1991-04-12 1991-04-12 Shared data area destruction preventing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3079430A JPH04314151A (en) 1991-04-12 1991-04-12 Shared data area destruction preventing system

Publications (1)

Publication Number Publication Date
JPH04314151A true JPH04314151A (en) 1992-11-05

Family

ID=13689663

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3079430A Pending JPH04314151A (en) 1991-04-12 1991-04-12 Shared data area destruction preventing system

Country Status (1)

Country Link
JP (1) JPH04314151A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006018684A (en) * 2004-07-02 2006-01-19 Ntt Docomo Inc Task management system
JP2008529115A (en) * 2005-01-24 2008-07-31 インターナショナル・ビジネス・マシーンズ・コーポレーション Method for managing access to shared resources in a multi-processor environment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006018684A (en) * 2004-07-02 2006-01-19 Ntt Docomo Inc Task management system
JP2008529115A (en) * 2005-01-24 2008-07-31 インターナショナル・ビジネス・マシーンズ・コーポレーション Method for managing access to shared resources in a multi-processor environment
JP4866864B2 (en) * 2005-01-24 2012-02-01 インターナショナル・ビジネス・マシーンズ・コーポレーション Method and program for managing access to shared resources in a multi-processor environment

Similar Documents

Publication Publication Date Title
US5280614A (en) Apparatus and method for controlling access to data using domains
CA1261479A (en) Direct input/output in a virtual memory system
US5123094A (en) Interprocessor communications includes second CPU designating memory locations assigned to first CPU and writing their addresses into registers
US9218302B2 (en) Page table management
US7130977B1 (en) Controlling access to a control register of a microprocessor
US4891749A (en) Multiprocessor storage serialization apparatus
US4821184A (en) Universal addressing system for a digital data processing system
US7082507B1 (en) Method of controlling access to an address translation data structure of a computer system
CN1991808B (en) Method and apparatus for a guest to access a memory mapped device
JPS59130000A (en) Method of protecting virtual memory device
JP2539352B2 (en) Hierarchical multi-computer system
US5459872A (en) Software control of hardware interruptions
EP0298418B1 (en) Virtual computer system
JPS61156445A (en) Tlb purge control system
EP1124184A2 (en) Privilege promotion in computer systems
JP3585510B2 (en) Program execution management device and program execution management method
JPS6113261B2 (en)
JPS62103743A (en) Information processor
JPH077365B2 (en) Information processing equipment
JPH02105240A (en) Virtual storage managing device
JPH10334056A (en) Multiprocessor system
JPS5918797B2 (en) Address check processing method
US20090037668A1 (en) Protected portion of partition memory for computer code
JPS6011935A (en) Display device for action mode
JPH0320834A (en) Initial diagnostic method for information processor