[go: up one dir, main page]

JPS63282542A - Virtual space managing device - Google Patents

Virtual space managing device

Info

Publication number
JPS63282542A
JPS63282542A JP62115910A JP11591087A JPS63282542A JP S63282542 A JPS63282542 A JP S63282542A JP 62115910 A JP62115910 A JP 62115910A JP 11591087 A JP11591087 A JP 11591087A JP S63282542 A JPS63282542 A JP S63282542A
Authority
JP
Japan
Prior art keywords
virtual space
address
virtual
atbr
mode
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
JP62115910A
Other languages
Japanese (ja)
Inventor
Shigeru Kawamata
川又 滋
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 JP62115910A priority Critical patent/JPS63282542A/en
Publication of JPS63282542A publication Critical patent/JPS63282542A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To switch virtual spaces in nonprivileged without spoiling a protecting function among the virtual spaces by providing a means which has plural candidates to be employed as the value of a register stored with information of an address conversion table and which selects a candidate to be employed in nonprivileged mode. CONSTITUTION:Address conversion tables AT8 and AT9 are provided and a register (ATBR) table 10 determines which is used. Namely, a CPU which has the nonprivileged mode has plural candidates to be employed as the value of the register stored with the information of the address conversion tables and selects a candidate to be employed in the nonprivileged mode. Therefore, the AT8 or AT9 is selected as the address conversion table (AT) in the nonprivileged mode by changing an ATBR table pointer 11. Consequently, the virtual spaces can be switched and variation to an optional value is not possible in the nonprivileged mode, so the protecting function for other user programs and the virtual space of an OS is not lost.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、仮想空間管理装置に関するものであり、特に
、複数の仮想空間を提供するオペレーティングシステム
において、仮想空間切り換えを非特権モードのままで実
現できる仮想空間管理装置に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a virtual space management device, and in particular, in an operating system that provides a plurality of virtual spaces, virtual space switching can be performed while remaining in a non-privileged mode. This invention relates to a virtual space management device that can be realized.

〔従来の技術〕[Conventional technology]

情報処理システムにおいて、CPUが認識するアドレス
(仮想アドレス)を記憶装置中のアドレス(物理アドレ
ス)に変換するのにメモリ管理装置(以下、MMUとい
う)を用いるものがある。
Some information processing systems use a memory management unit (hereinafter referred to as MMU) to convert an address (virtual address) recognized by a CPU into an address (physical address) in a storage device.

従来のMMUにおいては、アドレス変換テーブル(以下
、ATともいう)の情報が格納されているレジスタ(以
下、ATBRともいう)の変更は、特権モードでだ、け
行えるようになっている。
In a conventional MMU, a register (hereinafter also referred to as ATBR) in which information of an address translation table (hereinafter also referred to as AT) is stored can only be changed in a privileged mode.

ここに、特権モードは、MMUの全てのレジスタの参照
あるいは変更が許可されているモードである(これに対
し、アドレス変換テーブルの情報が格納されているレジ
スタの参照あるいは変更ができないモードを非特権モー
ドという)。
Here, the privileged mode is a mode in which all registers of the MMU are allowed to be referenced or modified (on the other hand, a non-privileged mode is a mode in which the registers in which address translation table information is stored cannot be referenced or modified). mode).

上述の点を更に第4図を使って説明する。第4図番マ従
来のアドレスを変換装置での変換過程を示す概念図で、
MMUは仮想アドレス1のATBRを示すフィールド4
からATBRテーブル10を決定し、ATBRテーブル
10からAT8の位置を決定し、AT内のオフセットを
示すフィールド3からATB内のエントリを決める。こ
のエントリから物理ページ6の位置を決め、物理ページ
内のオフセットを示すフィールド2でこのページ内のア
ドレス、すなわち物理アドレス7を得ることによって、
仮想アドレス1から物理アドレス7への変換を行ってい
る。
The above points will be further explained using FIG. Figure 4 is a conceptual diagram showing the conversion process in a conventional address conversion device.
MMU is field 4 indicating ATBR of virtual address 1
The ATBR table 10 is determined from the ATBR table 10, the position of the AT8 is determined from the ATBR table 10, and the entry in the ATB is determined from the field 3 indicating the offset within the AT. By locating physical page 6 from this entry and obtaining the address within this page, i.e. physical address 7, in field 2 indicating the offset within the physical page,
Conversion is being performed from virtual address 1 to physical address 7.

なお、第4図中、5は物理アドレス空間を示している。In addition, in FIG. 4, 5 indicates a physical address space.

このようなMMUを使ってオペレーティングシステム(
以下、O8という)を実現する場合、あるユーザプログ
ラムがATBRテーブル10の内容を変更し、他のユー
ザプログラムの仮想空間やO8の仮想空間を破壊するこ
とを防ぐために、このユーザプログラムを非特権モード
、すなわちアドレス変換テーブルの情報が格納されてい
るレジスタの参照あるいは変更ができないモードで実行
させている。
Using such an MMU, the operating system (
(hereinafter referred to as O8), in order to prevent a certain user program from changing the contents of the ATBR table 10 and destroying the virtual space of other user programs and the virtual space of O8, this user program must be placed in non-privileged mode. That is, the program is executed in a mode in which it is not possible to refer to or change the register in which address translation table information is stored.

〔発明が解決しようとする問題点〕 しかし、上述した従来のMMUを使ったO8の実現では
、一つのユーザプログラムは基本的に一つの仮想空間だ
けしか割り当てられない。一つのユーザプログラムが複
数の仮想空間を有し、これらの切り換えをこのユーザプ
ログラムが行う場合、仮想空間の切り換え(同じ仮想ア
ドレスが別の物理アドレスに変換されるようになること
)のためにモードを上述したような特権モードに切り換
えなければならず、非特権モードのままでは行えず、こ
のモード変更に伴うオーバーヘッドにより高速な仮想空
間の切り換えを実現できないという欠点がある。
[Problems to be Solved by the Invention] However, in implementing O8 using the conventional MMU described above, one user program is basically allocated only to one virtual space. If one user program has multiple virtual spaces and this user program switches between them, a mode is required for virtual space switching (the same virtual address is translated to a different physical address). must be switched to the privileged mode as described above, and cannot be done in the non-privileged mode, and the overhead associated with this mode change has the disadvantage that high-speed virtual space switching cannot be achieved.

本発明の目的は、非特権モードでの仮想空間切り換えを
、仮想空間どうしの保護機能を損わずに実現できる仮想
空間管理装置を提供することにある。
An object of the present invention is to provide a virtual space management device that can realize virtual space switching in non-privileged mode without impairing the protection function between virtual spaces.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、CPUが認識するアドレスを記憶装置中のア
ドレスに変換するメモリ管理装置を有し、走行モードと
して、特権モードと非特権モードを有する情報処理シス
テムにおける仮想空間管理装置であって、 アドレス変換テーブルの情報が格納されているレジスタ
の値として採り得る複数の候補を有すると共に、採用す
べき候補を非特権モードにおいて選択可能な手段を備え
ることを特徴としている。
The present invention is a virtual space management device for an information processing system that has a memory management device that converts an address recognized by a CPU into an address in a storage device, and has a privileged mode and a non-privileged mode as running modes. The present invention is characterized in that it has a plurality of candidates that can be taken as the value of the register in which the information of the conversion table is stored, and also includes means that can select the candidate to be adopted in a non-privileged mode.

〔作用〕[Effect]

本発明の仮想空間管理装置は、アドレス変換テーブルの
情報が格納されているレジスタの値として採り得る複数
の候補を有し、採用すべき候補を非特権モードにおいて
選択することにより、非特権モードのままで仮想空間の
切り換えを行える。
The virtual space management device of the present invention has a plurality of candidates that can be taken as the value of the register in which address translation table information is stored, and selects the candidate to be adopted in the non-privileged mode. You can switch between virtual spaces with the touch of a button.

仮想空間切り換えは、従来のようにモードを特権モード
に変更することな(行えるので、高速化を図れ、しかも
仮想空間どうしの保護機能も損われることがない。
Virtual space switching can be done without changing the mode to privileged mode as in the past, increasing speed and not compromising the protection function between virtual spaces.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の仮想空間管理装置の一実施例で、仮想
アドレスが物理アドレスに変換される過程を示す。
FIG. 1 shows an embodiment of the virtual space management device of the present invention, and shows the process of converting a virtual address into a physical address.

第1図に示すように、この仮想空間管理装置ではアドレ
ス変換テーブルとしてAT8とAT9を有し、いずれを
使用するかをATBRテーブル10によって決定する。
As shown in FIG. 1, this virtual space management device has AT8 and AT9 as address translation tables, and the ATBR table 10 determines which one to use.

図示の場合は、AT8が使用中であり、AT9は未使用
の状態を示している。
In the illustrated case, AT8 is in use, and AT9 is in an unused state.

従来のMMUではATBRの候補であるATBRテーブ
ル10が一つ分しかなかったが、この仮想空間管理装置
ではここに複数の候補を格納しておける。どの候補i使
うかを指定する記憶領域としてATBRテーブルポイン
タ11を新たに設け、これを非特権モードで変更ができ
るようになっている。
In the conventional MMU, there is only one ATBR table 10, which is an ATBR candidate, but in this virtual space management device, a plurality of candidates can be stored here. An ATBR table pointer 11 is newly provided as a storage area for specifying which candidate i to use, and can be changed in non-privileged mode.

なお、第1図中、他の構成部分については、第4図の場
合と同様であって、仮想アドレス1は各フィールド2,
3.4から成り、また、符号5〜7はそれぞれ物理アド
レス空間、物理ページ、物理アドレスを示す。
Note that the other components in FIG. 1 are the same as those in FIG.
3.4, and numerals 5 to 7 indicate a physical address space, a physical page, and a physical address, respectively.

上述のように、この仮想空間管理装置は、cpUが認識
するアドレス(仮想アドレス)を記憶装室中のアドレス
(物理アドレス)に変換する機構を提供するMMUと、
走行モードとして、MMUの全てのレジスタの参照ある
いは変更が許可されている特権モードとアドレス変換テ
ーブルの情報が格納されているレジスタの参照あるいは
変更ができない非特権モードを有するCPUにおいて、
アドレス変換テーブルの情報が格納されているレジスタ
の値として採り得る複数の候補を有し、採用すべき候補
を非特権モードにおいて選択できるようになっている。
As described above, this virtual space management device includes an MMU that provides a mechanism for converting an address (virtual address) recognized by the CPU into an address (physical address) in the storage room;
In a CPU that has a privileged mode in which all registers of the MMU are allowed to be referenced or changed, and a non-privileged mode in which reference to or changes to registers storing address translation table information are not allowed as running modes,
It has a plurality of candidates that can be taken as the value of the register in which address conversion table information is stored, and the candidate to be adopted can be selected in non-privileged mode.

本実施例では、ATBRテーブルポインタ11を変更す
ることで非特櫓モードでアドレス変換テーブル(AT)
としてAT8またはAT9が選べ、これにより仮想空間
の切り換えが実現できる。また非特権モードにおいて任
意の値に変更できるわけでもないので他のユーザプログ
ラム、O8の仮想空間の保護機能も失われない。
In this embodiment, by changing the ATBR table pointer 11, the address translation table (AT) is
AT8 or AT9 can be selected as the virtual space, thereby realizing virtual space switching. Furthermore, since it is not possible to change the value to an arbitrary value in non-privileged mode, the protection function of other user programs and the virtual space of O8 is not lost.

このように、この仮想空間管理装置によれば、非特権モ
ードでの仮想空間切り換えを提供することができる。こ
れによる利点を第2図を使って更に具体的に説明する。
In this way, this virtual space management device can provide virtual space switching in non-privileged mode. The advantages resulting from this will be explained in more detail using FIG. 2.

一般的に、相互呼び出しをするようなプログラム(以下
、コル−チンという)を実現する場合、O8は各コル−
チン固有のスタックを用意する必要がある。
Generally, when implementing programs that call each other (hereinafter referred to as cortins), O8 is
It is necessary to prepare a Chin-specific stack.

第2図の場合は、ユーザ仮想空間Iと■があり、前者は
コル−チンAが実行、参照するもので、後者はコル−チ
ンBが実行、参照する。スタックの仮想空間13はコル
−チンAが使用し、スタックの仮想空間14はコル−チ
ンBが使用する。また、コル−チン固有ではコル−チン
A5が実行中、コル−チンA7は中断中であり、コル−
チン固有はコル−チンB6が中断中でコル−チンB8が
実行中であるとする。
In the case of FIG. 2, there are user virtual spaces I and (2), the former being executed and referenced by cortin A, and the latter being executed and referred to by cortin B. The stack virtual space 13 is used by Cortin A, and the stack virtual space 14 is used by Cortin B. In addition, cortin-specific cortin A5 is running, cortin A7 is suspended, and cortin
Assume that cortin B6 is suspended and cortin B8 is running.

今、このような状態において、コル−チンA5が実行さ
れているとすると、相互呼び出しを行う場合、上述の仮
想空間管理装置によって、高速なコル−チンのスタック
の切り換えができ、ユーザ仮想空間Iと■の状態を非特
権モードのままで切り換えられる。
Assuming that cortin A5 is currently being executed in this state, when a mutual call is made, the above-mentioned virtual space management device can quickly switch the cortin stack, and the user virtual space I and ■ can be switched while remaining in non-privileged mode.

すなわち、この際、次に制御を渡すべきコル−チンBは
コル−チンA5が決定し制御を渡す。これによってコル
−チンBはコル−チンB8として動きだす。この時に現
在のスタック13をこのコル−チンB8のスタック14
に切り換えなければならない。また、仮想空間Iと■の
切り換えは頻繁に行われるため、高速に行われる必要が
ある。ここで本発明に従う管理装置を使用することによ
り、非特権モードでスタック切り換えができるため高速
化が図れ、また仮想空間どうしの保護も実現できる。
That is, at this time, cortin A5 determines cortin B to which control should be transferred next and transfers control to it. As a result, cortin B starts to move as cortin B8. At this time, the current stack 13 is changed to the stack 14 of this cortin B8.
must be switched to. Furthermore, since switching between the virtual spaces I and (2) is performed frequently, it is necessary to perform the switching at high speed. Here, by using the management device according to the present invention, stack switching can be performed in a non-privileged mode, so speeding up can be achieved, and protection of virtual spaces can also be realized.

第3図は第1図の応用で、ATBRテーブルポインタの
役割をするフィールドを仮想アドレス1内に持つように
したものであり、このように、ATBRテーブル内のオ
フセントを示すフィールド12を用いる構成であっても
よい。
Figure 3 is an application of Figure 1, in which virtual address 1 has a field that functions as an ATBR table pointer, and in this way, field 12 indicating the offset in the ATBR table is used. There may be.

〔発明の効果〕 以上説明したように、本発明によれば、複数の仮想空間
の切り換えを非特権モードで実現でき、非特権モードの
ままで行えるので高速な切り換えが可能であり、仮想空
間どうしの保護機能も損わずにこれを行うことができる
[Effects of the Invention] As explained above, according to the present invention, switching between multiple virtual spaces can be realized in non-privileged mode, and high-speed switching is possible because switching can be performed in non-privileged mode. This can be done without compromising the protection functions of the system.

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

第1図は本発明の一実施例装置によるアドレス変換方式
を示す図、 第2図は本発明に従う仮想空間管理装置による高速なス
タックのスタック切り換えの様子を示す図、 第3図は本発明の他の実施例を示す図、第4図は従来の
アドレス変換装置での変換過程を示す図である。 1・・・・・仮想アドレス 2・・・・・物理ページ内のオフセットを示すフィール
ド 3・・・・・AT内のオフセットを示すフィールド 4・・・・・ATBRを示すフィールド5・・・・・物
理アドレス空間 6・・・・・物理ページ 7・・・・・物理アドレス 8、9 ・ ・ ・ AT 10・・・・・ATBRテーブル 11・・・・・ATBRテーブルポインタ12・・・・
・ATBRテーブル内のオフセントを示すフィールド 13・・・・・スタックの仮想空間(コル−チンAが使
用) 14・・・・・スタックの仮想空間(コル−チンBが使
用) A5・・・・コル−チンA(実行中) AT・・・・コル−チンA(中断中) B6・・・・コル−チンB(中断中) B8・・・・コル−チンB(実行中) 1、If・・・ユーザ仮想空間 代理人 弁理士  岩 佐  義 幸 1トー 工 の トー く j 第2図
FIG. 1 is a diagram showing an address conversion method by a device according to an embodiment of the present invention, FIG. 2 is a diagram showing a state of high-speed stack switching by a virtual space management device according to the present invention, and FIG. FIG. 4, which is a diagram showing another embodiment, is a diagram showing a conversion process in a conventional address conversion device. 1...Virtual address 2...Field 3 indicating the offset within the physical page...Field 4 indicating the offset within the AT...Field 5 indicating the ATBR...・Physical address space 6...Physical page 7...Physical addresses 8, 9...AT 10...ATBR table 11...ATBR table pointer 12...
- Field indicating the offset in the ATBR table 13... Stack virtual space (used by Colchin A) 14... Stack virtual space (used by Colchin B) A5... Cortin A (in progress) AT...Corin A (suspended) B6...Corin B (in progress) B8...Corin B (in progress) 1, If・・・User virtual space agent Patent attorney Yoshiyuki Iwasa

Claims (1)

【特許請求の範囲】[Claims] (1)CPUが認識するアドレスを記憶装置中のアドレ
スに変換するメモリ管理装置を有し、走行モードとして
、特権モードと非特権モードを有する情報処理システム
における仮想空間管理装置であって、 アドレス変換テーブルの情報が格納されているレジスタ
の値として採り得る複数の候補を有すると共に、採用す
べき候補を非特権モードにおいて選択可能な手段を備え
ることを特徴とする仮想空間管理装置。
(1) A virtual space management device for an information processing system that has a memory management device that converts an address recognized by a CPU into an address in a storage device, and has a privileged mode and a non-privileged mode as running modes, the address conversion A virtual space management device characterized by having a plurality of candidates that can be taken as values of a register in which table information is stored, and comprising means for selecting a candidate to be adopted in a non-privileged mode.
JP62115910A 1987-05-14 1987-05-14 Virtual space managing device Pending JPS63282542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62115910A JPS63282542A (en) 1987-05-14 1987-05-14 Virtual space managing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62115910A JPS63282542A (en) 1987-05-14 1987-05-14 Virtual space managing device

Publications (1)

Publication Number Publication Date
JPS63282542A true JPS63282542A (en) 1988-11-18

Family

ID=14674238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62115910A Pending JPS63282542A (en) 1987-05-14 1987-05-14 Virtual space managing device

Country Status (1)

Country Link
JP (1) JPS63282542A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04232551A (en) * 1990-05-24 1992-08-20 Internatl Business Mach Corp <Ibm> Method and apparatus for converting multiple virtaul addresses

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04232551A (en) * 1990-05-24 1992-08-20 Internatl Business Mach Corp <Ibm> Method and apparatus for converting multiple virtaul addresses

Similar Documents

Publication Publication Date Title
US4943913A (en) Operating system accessing control blocks by using home address space segment table to control instruction and operand fetch and store operations
JP2013522748A (en) Hierarchical translation table control
JPS6259812B2 (en)
JPS63282542A (en) Virtual space managing device
US4816992A (en) Method of operating a data processing system in response to an interrupt
JPS6336012B2 (en)
JPH0447853B2 (en)
JPH03148735A (en) Memory managing device
JPH01134533A (en) General-purpose register control circuit
JPH05250260A (en) Information processor for virtual storage control system having physical address read function
JPS63108448A (en) Input/output request control system
JPS6177937A (en) Information processor
JPH07141252A (en) Data processor
JPH03280132A (en) Central processing unit
JPH07262004A (en) Processor
JPH01120637A (en) Virtual computer system
JPS6222149A (en) Process switching method
JPH039431A (en) Interruption processing system
JPS61166648A (en) Information
JPS6310254A (en) Information processor
JPS61264437A (en) Computer architecture control method
JPH02217929A (en) Task switching system
JPH04557A (en) Vector processor
JPH06259317A (en) Data processor
JPS6177936A (en) Information processor