JPS5816560B2 - Memory protection method - Google Patents

Memory protection method

Info

Publication number
JPS5816560B2
JPS5816560B2 JP52060476A JP6047677A JPS5816560B2 JP S5816560 B2 JPS5816560 B2 JP S5816560B2 JP 52060476 A JP52060476 A JP 52060476A JP 6047677 A JP6047677 A JP 6047677A JP S5816560 B2 JPS5816560 B2 JP S5816560B2
Authority
JP
Japan
Prior art keywords
register
program
main memory
memory protection
protection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP52060476A
Other languages
Japanese (ja)
Other versions
JPS53146542A (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.)
Toshiba Corp
Original Assignee
Tokyo Shibaura Electric Co 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 Tokyo Shibaura Electric Co Ltd filed Critical Tokyo Shibaura Electric Co Ltd
Priority to JP52060476A priority Critical patent/JPS5816560B2/en
Publication of JPS53146542A publication Critical patent/JPS53146542A/en
Publication of JPS5816560B2 publication Critical patent/JPS5816560B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Description

【発明の詳細な説明】 本発明は記憶保護方式、具体的にはオーバーヘッドの削
減、更には柔軟性のある特に小型電子計算機において有
効な記憶保護方式に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a storage protection method, and more particularly to a storage protection method that reduces overhead, is flexible, and is particularly effective in small electronic computers.

小型電子計算機における主記憶の保護には従来から各種
方式が提案その一つに記憶保護レジスタを用いるのが一
般的である。
Various methods have been proposed for protecting the main memory in small electronic computers, one of which is generally to use a memory protection register.

即ち1例えば64ビツトの記憶保護レジスタを設けるこ
とにより、IKバイトの単位で64にバイトの範囲で主
記憶保護が可能なものである。
That is, by providing a memory protection register of, for example, 64 bits, it is possible to protect the main memory in a range of 64 bytes in units of IK bytes.

ここで64にバイトは命令語のアドレス部で直接指定で
きる範囲であることはいうまでもない。
It goes without saying that the 64th byte is within the range that can be directly specified in the address field of the instruction word.

しかしながら、この様な記憶保護方式であると記憶保護
の単位がIKバイトであるためにきめの細かな保護は困
難であり、信頼性に乏しい。
However, in such a memory protection method, since the unit of memory protection is IK bytes, fine-grained protection is difficult and reliability is poor.

又、ハードウェア的にはたとえ小型計算機であっても6
4にバイト以上実装することができ、又、プログラムで
もその様な主記憶を利用できるにもかかわらず保護は6
4にバイトと固定(レジスタの容量による)されている
為柔軟性にも乏しい。
Also, in terms of hardware, even if it is a small computer, 6
Although it is possible to implement more than 6 bytes in 4 bytes, and programs can also use such main memory, protection is limited to 6 bytes.
Since it is fixed at 4 bytes (depending on the capacity of the register), there is little flexibility.

更に記憶保護レジスタ内に書込み許可領域を設定するた
めに複雑なビット操作を必要としていたものである。
Furthermore, complex bit operations were required to set a write-enabled area within the storage protection register.

本発明は上記欠点に鑑みてなされたものであり、論理ア
ドレス空間を拡張した場合、システム的に最適な記憶保
護機構を得ることが主目的であり、保護機能の処理性を
重視するために命令語で指定されるペースレジスタ、即
ち命令語で指定されるソフトウェア的な領域に記憶保護
領域を柔軟に関係づけることにより保護チェックの回数
を少くすること、又オペレーティングシステムの記憶保
護関連の処理を少くする様に実行するタスクのプログラ
ム的な構造に合せた保護領域を設定、即ち主記憶に可変
な任意数のプログラム区画を用意し、タスクはこれら区
画内で実行する様な記憶保護方式を提供することを目的
とする。
The present invention has been made in view of the above-mentioned drawbacks, and the main purpose of the present invention is to obtain a system-optimal storage protection mechanism when the logical address space is expanded. By flexibly relating the memory protection area to the pace register specified by the command word, that is, the software area specified by the instruction word, the number of protection checks can be reduced, and the processing related to memory protection by the operating system can be reduced. A protection area is set according to the program structure of the task to be executed, that is, a variable number of program partitions are prepared in main memory, and a memory protection method is provided in which the task is executed within these partitions. The purpose is to

以下、図面を用いて本発明に関し詳細に説明する。Hereinafter, the present invention will be explained in detail using the drawings.

第1図は本発明において用いられる命令語のフォーマッ
トを示し、図においてOPは命令コード部、R1はゼネ
ラルレジスタの番号を示し命令の第1オペランドを表わ
す。
FIG. 1 shows the format of an instruction word used in the present invention. In the figure, OP indicates an instruction code section, and R1 indicates a general register number and represents the first operand of the instruction.

XIもゼネラルレジス夕番号を示すがその内容はインデ
ックスとしてインデックス修飾に使用される。
XI also indicates the General Registry number, but its contents are used as an index for index modification.

Bはペースレジスタ番号を示しオペランドアドレスのペ
ース修飾において用いられる。
B indicates the pace register number and is used in pace modification of the operand address.

又、残りのDISPはオペランドアドレス用のデスプレ
ースタンドである。
The remaining DISP is a display stand for operand addresses.

尚、■は命令語の形式、即ち短長の形式を識別するため
のビットであり、0”となっているときには短形式、”
1”となっているときには長形式の命令語を表わす。
Note that ■ is a bit for identifying the format of the instruction word, that is, the short format, and when it is 0'', it is the short format.
1” indicates a long-form instruction word.

第2図は本発明において用いられるハードウェアの概念
図であり、図において1は主記憶装置MMであり、3つ
のプログラム区画MM、、MM2MM3を有す。
FIG. 2 is a conceptual diagram of the hardware used in the present invention. In the figure, 1 is a main memory device MM, which has three program partitions MM, MM2, MM3.

又、2は主記憶保護領域設定レジスタMPRであり、2
つのレジスタUとLが組となって1つのプログラム区画
を定義するものである。
Further, 2 is a main memory protected area setting register MPR;
A pair of registers U and L define one program section.

2つのレジスタとはプログラム区画の上限下限のアドレ
スを示すもので図にてU、Lで示す。
The two registers indicate the upper and lower limit addresses of the program section, and are indicated by U and L in the figure.

又、3は主記憶保護補助レジスタMBSRであり図にお
けるAは該レジスタの1組の構成ビットを示し、a、b
、cは3つのプログラム区画の使用を示すビットであり
、この様な組数はペースレジスタの数分だけ設けられて
いる。
Further, 3 is a main memory protection auxiliary register MBSR, and A in the figure indicates a set of configuration bits of this register, a, b
, c are bits indicating the use of three program sections, and the number of such sets is equal to the number of pace registers.

即ち、主記憶保護補助レジスタMBSR3により命令語
のB部で指示されるペースレジスタ番号で規定されると
ころのソフトウェア的な領域がどのプログラム区画にあ
てはまるかを示すこ、、とができる。
That is, the main memory protection auxiliary register MBSR3 can indicate to which program section the software area defined by the pace register number specified in the B part of the instruction word applies.

第3図は前記第2図を具体化して本発明を実現するため
のハードウェアブロック図であり、図において11は命
令語レジスタIRであり、現在実行処理中の命令語が設
定される。
FIG. 3 is a hardware block diagram for implementing the present invention by embodying FIG. 2. In the figure, reference numeral 11 is an instruction word register IR, in which the instruction word currently being executed is set.

ここに設定される内容は前記第1図の如くフォーマット
による。
The contents set here depend on the format as shown in FIG. 1 above.

12は主記憶保護領域設定レジスタMPRであり、プロ
グラム区画の上限・下限アドレスが設定される。
Reference numeral 12 is a main memory protected area setting register MPR, in which upper and lower limit addresses of the program partition are set.

又13は主記憶保護補助レジスタMBSRであり、3つ
のプログラム区画の使用を示すビットから成り、ペース
レジスタの数分例えば7個から成る。
Reference numeral 13 denotes a main memory protection auxiliary register MBSR, which consists of bits indicating the use of three program partitions, and consists of, for example, seven bits, the same number as the pace register.

又、14は実行命令のオペランドの実アドレスを格納す
るメモリアドレスレジスタMAR115は前記主記憶保
護領域設定レジスタMPR12と前記メモリアドレスレ
ジスタMAR14とを比・較する比較器COMP、16
は実アドレスがプログラム区画外と前記比較器COMP
15で判定された場合に割込みを発生させるためのフリ
ップフロップを有し、又、3つのプログラム区画と実ア
ドレスのチェックとを1区画ずつ行う様にカウンタを有
す制御部CPである。
Further, 14 is a memory address register MAR115 that stores the real address of the operand of the execution instruction, and a comparator COMP that compares the main memory protected area setting register MPR12 and the memory address register MAR14.
indicates that the real address is outside the program area and the comparator COMP
The controller CP has a flip-flop for generating an interrupt when a determination is made in step 15, and a counter for checking the three program sections and the real address one section at a time.

又、17は該制御部CP16からの制御と前記主記憶保
護補助レジスタMBSR13からの指示により前記主記
憶保護領域設定レジスタMPR12のうちのいずれかを
選択する主記憶保護領域選択回路MP R8である。
Further, 17 is a main memory protection area selection circuit MP R8 which selects one of the main memory protection area setting registers MPR12 under the control from the control unit CP16 and instructions from the main memory protection auxiliary register MBSR13.

以下第3図を使用して本発明の動作につき詳細に説明す
る。
The operation of the present invention will be explained in detail below using FIG.

まず実アドレスの計算方式は本発明の主旨でない為詳細
な説明は省略するが、命令語内で指定したところのデス
プレースタンドとペースレジスタ及びインデックスレジ
スタの内容を加算して得られるものであり、メモリアド
レスレジスタMAR’14に設定される。
First, the actual address calculation method is not the main purpose of the present invention, so a detailed explanation will be omitted, but it is obtained by adding the display stand specified in the instruction word and the contents of the pace register and index register. It is set in address register MAR'14.

この実アドレスが3つのプログラム区画内に納まるか否
かを次の様にしてチェックするものである。
It is checked as follows whether this real address fits within the three program sections.

まず、命令語レジスタIR11内に示されたペースレジ
スタ番号セ指定されるところの主記憶保護補助レジスタ
MBSR13内の3ビツトが選択される。
First, three bits in the main memory protection auxiliary register MBSR13, which are designated by the pace register number indicated in the instruction word register IR11, are selected.

主記憶保護チェックは3つのプログラム区画に対して順
次行う方式で、この順番等は制御部CP16におけるカ
ウンタにより指定され、る。
The main memory protection check is performed sequentially on the three program partitions, and the order is specified by a counter in the control unit CP16.

最初カウンタ9内容は°1′′であってプログラム区画
N111のチェックとなり、主記憶保護補助レジスタM
BSR13で示されるビットが調べられる。
Initially, the contents of the counter 9 are °1'', and the program section N111 is checked, and the main memory protection auxiliary register M
The bit indicated by BSR13 is examined.

このビット内容が”0″のとき主記憶保護チェックは省
略を意味する。
When the content of this bit is "0", it means that the main memory protection check is omitted.

このビット内容が”1”のとき主記憶保護領域設定レジ
スタMPR12内のプログラム区画番号1の領威を定義
しているところの2つのレジスタ、即ちU、、Llが選
択される。
When the content of this bit is "1", two registers defining the domain of program partition number 1 in the main memory protected area setting register MPR12, ie, U, Ll, are selected.

次に比較器COMP15にて前記メモリアドレスレジス
タMAR14に格納された実アドレスと前記選択された
主記憶保護領域設定レジスタMPR12との内容(プロ
グラム区画)との妥当性がチェックされる、 もし、実アドレスがこのプログラム区画外に存在するも
のであれば制御部CP16におけるカウンタを更新して
次のプログラム区画での正当性のチェックにうつる。
Next, the comparator COMP15 checks the validity of the real address stored in the memory address register MAR14 and the content (program section) of the selected main memory protected area setting register MPR12. If it exists outside this program partition, the counter in the control unit CP16 is updated and the validity check is performed in the next program partition.

このとき、主記憶保護補助レジスタMBSR13の次ビ
ットを調べる。
At this time, the next bit of the main memory protection auxiliary register MBSR13 is checked.

このビットの内容が1″のとき、先に説明したようにし
て実アドレスがプログラム区画%2内に存在するか否か
がチェックされる。
When the content of this bit is 1'', it is checked whether the real address is within program partition %2 as described above.

このような動作が三度繰返され、実アドレスがいずれの
プログラム区画にも存在しない場合、主記憶保護違反と
して、制御部CP16内におけるフリップフロップをセ
ットして主記憶保護違反割込みを発生させる。
If such an operation is repeated three times and the real address does not exist in any program partition, a main memory protection violation is detected and a flip-flop in the control unit CP16 is set to generate a main memory protection violation interrupt.

もし実アドレスが、いずれかのプログラム区画内に存在
すれば、正当と判断し、その時点でチェックを終了して
命令の実行を行う。
If the real address exists in any program partition, it is determined to be valid, the check is ended at that point, and the instruction is executed.

以上説明の如く本発明によると、主記憶保護チェックの
ハードウェア量およびチェック時間を少くすることが可
能であり、主記憶上に、タスクが実行可能なプログラム
区画を任意数、可変に設定する方式である為オペレーテ
ィングシステムの主記憶保護管理のオーバーヘッドの削
減とシステムの保全管理に十分な効果がある。
As explained above, according to the present invention, it is possible to reduce the hardware amount and check time for main memory protection check, and it is possible to variably set an arbitrary number of program partitions in which tasks can be executed on main memory. Therefore, it is sufficiently effective in reducing the overhead of main memory protection management of the operating system and in system maintenance management.

又、各プログラムの区画は区画先頭と区画サイズもしく
は区画終端によって決定される方式である為、きめ細か
な主記憶保護が可能となるものである。
Furthermore, since the partition of each program is determined by the beginning of the partition and the partition size or the end of the partition, fine-grained main memory protection is possible.

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

第1図は本発明において使用される命令語のフォーマッ
ト、第2図は本発明において用いられるハードウェアの
概念図、第3図は該第2図を具体化して本発明を実現す
るためのハードウェアブロック図である。 1・・・・・・主記憶装置MM、2,12・・・・・・
主記憶保護領域設定レジスタMPR13,13・・・・
・・主記憶保護補助レジスタMBSR,11・・・・・
・命令語レジスタIR,14・・・・・・メモリアドレ
スレジスタMAR115・・・・・・比較器COMP、
16・・・・・・制御部CP。
Figure 1 is the format of the instruction word used in the present invention, Figure 2 is a conceptual diagram of the hardware used in the present invention, and Figure 3 is the hardware for realizing the present invention by embodying Figure 2. It is a wear block diagram. 1... Main memory device MM, 2, 12...
Main memory protected area setting register MPR13, 13...
・・Main memory protection auxiliary register MBSR, 11・・・・
・Instruction word register IR, 14...Memory address register MAR115...Comparator COMP,
16...Control unit CP.

Claims (1)

【特許請求の範囲】[Claims] 1 ベーろ修飾のためのペースレジスタを持つ計算機シ
ステムにおいて、記憶領域に対し任意数のプログラム区
画を定義し、前記ペースレジスタ毎に前記プログラム区
画のそれぞれの使用を指定する第1のレジスタと、前記
プログラム区画を定義するために該区画の上下限アドレ
スを設定する第2のレジスタとを具備し、前記第1のレ
ジスタからの出力により前記プログラム区画の使用が指
定されている時のみ、前記第2のレジスタにより定義さ
れている区画と記憶保岬に関する命令のオペランドアド
レスで生成される実アドレスとの比較チェックを行い、
前記実アドレスが前記第2のレジスタで定義されたプロ
グラム区画内にある時に記憶領域の使用を許可すること
を特徴とする記憶保護方式。
1. In a computer system having a pace register for belo modification, a first register that defines an arbitrary number of program sections for a storage area and specifies the use of each of the program sections for each pace register; and a second register for setting upper and lower limit addresses of the program section to define the program section, and only when the use of the program section is specified by the output from the first register, the second register A comparison check is performed between the partition defined by the register and the real address generated by the operand address of the instruction regarding memory protection cape.
A storage protection method, wherein use of a storage area is permitted when the real address is within a program partition defined by the second register.
JP52060476A 1977-05-26 1977-05-26 Memory protection method Expired JPS5816560B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP52060476A JPS5816560B2 (en) 1977-05-26 1977-05-26 Memory protection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP52060476A JPS5816560B2 (en) 1977-05-26 1977-05-26 Memory protection method

Publications (2)

Publication Number Publication Date
JPS53146542A JPS53146542A (en) 1978-12-20
JPS5816560B2 true JPS5816560B2 (en) 1983-03-31

Family

ID=13143354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP52060476A Expired JPS5816560B2 (en) 1977-05-26 1977-05-26 Memory protection method

Country Status (1)

Country Link
JP (1) JPS5816560B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5956137U (en) * 1982-10-06 1984-04-12 ナイルス部品株式会社 Automatic return device for direction indicators

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5956137U (en) * 1982-10-06 1984-04-12 ナイルス部品株式会社 Automatic return device for direction indicators

Also Published As

Publication number Publication date
JPS53146542A (en) 1978-12-20

Similar Documents

Publication Publication Date Title
US4084235A (en) Emulation apparatus
US7467271B2 (en) Operating system permitting limited access to a system page
US4347565A (en) Address control system for software simulation
US5280614A (en) Apparatus and method for controlling access to data using domains
US5303378A (en) Reentrant protected mode kernel using virtual 8086 mode interrupt service routines
US5619671A (en) Method and apparatus for providing token controlled access to protected pages of memory
JP2678183B2 (en) Digital processor controller and method for runtime memory allocation
JP4391832B2 (en) Input/Output Permission Bitmaps for Compartmentalized Security
KR910001447B1 (en) Main storage access control system for virtual computing function system
JPS6248258B2 (en)
JPS5960652A (en) Data processing device
KR20060012584A (en) How to handle secure message authentication control commands
US5459872A (en) Software control of hardware interruptions
JPS5816560B2 (en) Memory protection method
JPH087680B2 (en) Instruction counter loading device
JPH0285941A (en) data processing system
JPS6049352B2 (en) data processing equipment
JPS6032220B2 (en) information processing equipment
JPS6042495B2 (en) Method of accessing privileged memory of a multi-program data processing device
JPH03113548A (en) Extension memory controller
JPS6339933B2 (en)
JPH0831033B2 (en) Data processing device
JPS62295147A (en) Virtual computer system
JPS6338729B2 (en)
JPS626351A (en) memory protection device