JPH01273153A - Virtual storage control system - Google Patents

Virtual storage control system

Info

Publication number
JPH01273153A
JPH01273153A JP63100200A JP10020088A JPH01273153A JP H01273153 A JPH01273153 A JP H01273153A JP 63100200 A JP63100200 A JP 63100200A JP 10020088 A JP10020088 A JP 10020088A JP H01273153 A JPH01273153 A JP H01273153A
Authority
JP
Japan
Prior art keywords
virtual
user program
user
virtual space
space
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
JP63100200A
Other languages
Japanese (ja)
Inventor
Akiyoshi Miura
三浦 明義
Hidehiko Akita
秋田 英彦
Shizuo Yokohata
静生 横畑
Hiroshi Fujise
藤瀬 洋
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 Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Ltd
Hitachi Microcomputer Engineering 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 Ltd, Hitachi Microcomputer Engineering Ltd filed Critical Hitachi Ltd
Priority to JP63100200A priority Critical patent/JPH01273153A/en
Publication of JPH01273153A publication Critical patent/JPH01273153A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To facilitate the shift from a real storage system and to decrease the overhead by providing plural virtual spaces and mapping them so that virtual addresses of each user program are not overlapped even between different virtual spaces. CONSTITUTION:In a virtual space 1, an OS 5 and all user programs, namely, user programs 6-10 are mapped so that address areas are not overlapped. In a virtual space 2, the OS 5 and the user programs 6-8 are mapped. In a virtual space 3, the OS 5 and a user program 9 and a user program 10 are mapped. In this case, the user programs 6-8 and the user programs 9-10 are constituted so that the address areas are not overlapped mutually not only in the same space but also between the space 2 and 3. In such a way, it can be prevented that the area of other user program is brought to access by mis take when the user program is being executed, and even if the number of user programs increases, an overhead for changing a protective key of a main stor age is not generated.

Description

【発明の詳細な説明】 本発明は仮想記憶機構を有する計算機システムにおける
仮想記憶制御方式に係り、特に、実記憶システムから容
易に移行でき、オーバヘッドの少ない仮想記憶制御方式
に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a virtual memory control method in a computer system having a virtual memory mechanism, and particularly to a virtual memory control method that can be easily migrated from a real memory system and has little overhead.

〔従来の技術〕[Conventional technology]

一般に、計算機システムにおける仮想記憶システムは、
実記憶システムと比べて、以下の点が優れている。
Generally, the virtual memory system in a computer system is
It has the following advantages compared to real memory systems.

■実記憶の利用効率がよい。■High efficiency in the use of real memory.

■実記憶容量より大きな1プログラムを実行できる。■A single program larger than the actual storage capacity can be executed.

■主記憶保護機能が高い。■High main memory protection function.

従って、実記憶システムから仮想記憶システムに移行す
ることにより、上記利点を具備することが可能となる。
Therefore, by migrating from a real storage system to a virtual storage system, it is possible to have the above advantages.

従来、計算機システムの仮想記憶制御方式については、
千田著、近代科学社発行、rMVsの機能と構造」、第
5真から第9頁において述べられているように、ただ、
一つの仮想空間を用いる単一仮想空間方式と複数の仮想
空間を用いる多重仮想空間方式とが知られている。
Conventionally, regarding virtual memory control methods for computer systems,
As stated in "Function and Structure of rMVs" written by Senda, published by Kindai Kagakusha, pages 5 to 9, only,
A single virtual space method using one virtual space and a multiple virtual space method using multiple virtual spaces are known.

単一仮想空間方式では、同時に実行する複数のプログラ
ムを1つの空間にロードするのに対し、多重仮想空間方
式ではそれぞれ1つのプログラム毎に1つの空間を割り
当てるので広い空間を使用できる。
In the single virtual space method, multiple programs to be executed simultaneously are loaded into one space, whereas in the multiple virtual space method, one space is allocated for each program, so a wide space can be used.

一方、実記憶システムから仮想記憶システムに移行する
場合、単一仮想空間方式の方が容易である。この理由は
次の通りである。
On the other hand, when migrating from a real storage system to a virtual storage system, the single virtual space method is easier. The reason for this is as follows.

■単一仮想空間方式は実記憶システムと同様、一つの空
間しか持たないので、実記憶システムのメモリ割り付は
法がその侭使える。
■The single virtual space method, like the real storage system, has only one space, so the method can be used to allocate memory in the real storage system.

■O8からユーザプログラム領域をアクセスするのに、
多重仮想空間方式のようにアドレスのほかに空間を指定
しなくて済む。実記憶システム同様、アドレスだけで一
意にアクセスしたいメモリが決まる。
■To access the user program area from O8,
Unlike the multiple virtual space method, there is no need to specify the space in addition to the address. Just like in a real memory system, the address alone determines the memory you want to access.

(発明が解決しようと午る課題〕 多重仮想空間方式では、O8がユーザ領域内(個々の仮
想空間内)の制御テーブルやバッファを管理するのに、
仮想空間アドレスのほかに仮想空間を特定するための空
間番号を合わせて覚えておく必要があり、他空間のアド
レスを参照するときに空間切り替えのオーバヘッドが発
生する。これに対し、単一仮想空間方式では実記憶シス
テム同様アドレスだけを管理すればよいからである。
(Problem to be solved by the invention) In the multiple virtual space system, although O8 manages control tables and buffers in the user area (in each virtual space),
In addition to the virtual space address, it is also necessary to remember a space number for identifying the virtual space, and when referring to addresses in other spaces, space switching overhead occurs. On the other hand, in the single virtual space method, just like the real storage system, only addresses need to be managed.

しかしながら、単一仮想空間方式は多重仮想空間方式に
比べ次のような欠点を持つ。すなわち、単一仮想空間方
式では異なるユーザプログラム間で主記憶を保護するた
め、主記憶をCPUに設けた保護キーにより分割し、実
行時に、アドレス変換テーブル(プログラム毎に設けた
仮想アドレス→実アドレス変換テーブル)上のロックの
値(JOB値)と主記憶の保護キーの値が一致した場合
のみ主記憶をアクセス可能としている。このため、計算
機で保持しているキーの上限数よりユーザプログラムの
数(JOB数)が例えば100及至200のように多く
なると実行ユーザプログラムの切り替え時に保護キーを
動的に入れ替えなければならないので、その分オーバヘ
ッドが大きくなる′。また、キーの上限数を同時実行可
能とするユーザプログラム数分にすると、キー、とロッ
クの比較時間が長くなると共に主記憶上のアドレス変換
テーブルも太き(なり、アドレス変換時開テーブルの参
照時間が長くなる。その結果仮想アドレスから物理アド
レス(実アドレス)への変換が遅くなってしまうのでキ
ーの数は一般に16程度に制限されている。一方、多重
仮想空間方式ではユーザプログラム毎に独立した空間を
割り付けることによりユーザプログラム間の主記憶保護
を行なうのでそのようなオーバヘッドは存在しない。
However, the single virtual space method has the following drawbacks compared to the multiple virtual space method. In other words, in the single virtual space method, in order to protect the main memory between different user programs, the main memory is divided using a protection key provided in the CPU, and during execution, an address conversion table (virtual address provided for each program → real address The main memory is accessible only when the lock value (JOB value) on the conversion table (conversion table) matches the protection key value of the main memory. For this reason, if the number of user programs (JOB number) exceeds the maximum number of keys held by the computer, for example 100 to 200, the protection keys must be dynamically replaced when switching user programs to be executed. The overhead increases accordingly. In addition, if the upper limit number of keys is set to the number of user programs that can be executed simultaneously, the comparison time between keys and locks will become longer, and the address translation table in main memory will also become thicker. As a result, the conversion from a virtual address to a physical address (real address) becomes slow, so the number of keys is generally limited to about 16.On the other hand, in the multiple virtual space method, each user program has an independent Since the main memory between user programs is protected by allocating this space, no such overhead exists.

以上のように、従来の仮想記憶制御方式では、単一仮想
空間方式の場合、キーの入れ替えの必要があり、また、
多重仮想空間方式の場合、空間番号により各空間を管理
する必要があり、その結果、キー切り替え時又は空間切
り替え時にオーバヘッドが発生する等、どちらの方式も
実記憶システムから移行するには問題がある。
As mentioned above, in the conventional virtual memory control method, in the case of a single virtual space method, it is necessary to replace keys, and
In the case of the multiple virtual space method, it is necessary to manage each space using a space number, and as a result, there are problems in migrating from a real storage system, such as overhead occurring when switching keys or switching spaces. .

従って、本発明の目的は、上記従来技術の問題点を解消
し、実記憶システムから容易に移行でき、オーバヘッド
の少ない仮想記憶制御方式を提供することにある。
Therefore, it is an object of the present invention to provide a virtual storage control method that can be easily migrated from a real storage system and has little overhead, solving the problems of the prior art described above.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するため、本発明は、まず基本発明(第
1発明)として、仮想記憶制御方式において、複数の仮
想空間を設け、それぞれの仮想空間には、オペレーティ
ングシステム及び相互に記憶保護可能な数だけの(数基
内の)ユーザプログラムを順にマツプする。(例えば、
キーの種類が8個の計算機では、1つの仮想空間に7個
のユーザプログラムをマツプし、残りの1つのキーは○
S w4域の保護に用いる。また、リング・プロテクシ
ョン機構の計算機では、1つのユーザプログラムだけを
マツプする。)この際に、各々のユーザプログラム領域
は、異なる仮想空間の間でも各ユーザプログラム領域が
重複しないように(各々のユーザプログラムの仮想アド
レスが重複しないように)割り付けられる。そして、各
々のユーザプログラムは、該ユーザプログラムがマツプ
されている仮想空間で実行させるように構成する。
In order to achieve the above object, the present invention first provides a basic invention (first invention) in which a plurality of virtual spaces are provided in a virtual memory control method, and each virtual space has an operating system and mutual memory protection. Map only a few (within a few) user programs in order. (for example,
In a computer with eight types of keys, seven user programs are mapped to one virtual space, and the remaining one key is
Used to protect SW4 area. Furthermore, the computer of the ring protection mechanism maps only one user program. ) At this time, each user program area is allocated so that the user program areas do not overlap even in different virtual spaces (so that the virtual addresses of each user program do not overlap). Each user program is configured to be executed in the virtual space to which the user program is mapped.

また、本発明は、第2発明として、上記第1発明におけ
る複数の仮想空間に加え、別の仮想空間を設ける。この
追加された別の仮想空間には、オペレーティングシステ
ム及び全てのユーザプログラムをマツプし、この仮想空
間でオペレーティングシステムを実行させるように構成
する。
Further, as a second invention, the present invention provides another virtual space in addition to the plurality of virtual spaces in the first invention. The operating system and all user programs are mapped to this added virtual space, and the operating system is configured to be executed in this virtual space.

〔作用〕[Effect]

上記構成に基づく作用を説明する。 The operation based on the above configuration will be explained.

上記第1発明において、1つの仮想空間には相互に保護
可能な数(キー数)以内のユーザプログラムだけがマツ
プされていて、ユーザプログラムは同一空間に配置して
も相互に記憶保護可能となっており、かつ上記保護可能
な数を超える他のユーザプログラムは別の仮想空間にマ
ツプしているので、ユーザプログラム実行中に他のユー
ザプログラムの領域を過ってアクセスするのを防ぐこと
ができる。従って、単一仮想空間方式のようにユーザプ
ログラムの数が多くなっても主記憶の保護キーを入れ替
えるオーバヘッドは生じない。また、各々のユーザプロ
グラムの仮想アドレスは、同一の仮想空間は勿論、異な
る仮想空間の間でも重複することがないので、仮想空間
が異なってもユーザプログラム領域は仮想アドレスだけ
で特定でき、それゆえ、O8は多重仮想空間方式のよう
に空間識別子を合わせて管理しなくてもすむ。即ち、各
々のユーザプログラムの仮想アドレス(例えばその上位
ビット)は、それ自体空間識別子としての機能を兼ねて
いるものである。
In the first invention, only the number of user programs that can be mutually protected (the number of keys) is mapped in one virtual space, and the user programs can mutually protect their memories even if they are placed in the same space. In addition, other user programs that exceed the number that can be protected are mapped to a separate virtual space, so it is possible to prevent the areas of other user programs from being accessed by mistake while the user program is running. . Therefore, unlike the single virtual space system, even if the number of user programs increases, there is no overhead of replacing the protection key in the main memory. In addition, the virtual address of each user program does not overlap in the same virtual space or in different virtual spaces, so even if the virtual spaces are different, the user program area can be identified only by the virtual address. , O8 eliminates the need to manage space identifiers together, unlike the multiple virtual space system. That is, the virtual address (for example, its upper bit) of each user program also functions as a space identifier.

また、上記第2発明では、上記複数の仮想空間に追加し
て、更に、全部のユーザプログラムをマツプした別の仮
想空間を設け、OSを該別の仮想空間で実行させること
により、該別の仮想空間でO5は全てのユーザプログラ
ム領域を直接アクセスできるので、ユーザプログラム領
域がマツプされている仮想空間を仮想アドレスから求め
る必要はなくなる。
Further, in the second invention, in addition to the plurality of virtual spaces, another virtual space is provided in which all the user programs are mapped, and the OS is executed in the other virtual space. Since O5 can directly access all user program areas in the virtual space, there is no need to find the virtual space in which the user program area is mapped from the virtual address.

〔実施例〕〔Example〕

最初に、具体的な実施例を説明する前に、本発明の概要
を、従来技術と比較して説明する。
First, before describing specific embodiments, an overview of the present invention will be explained in comparison with the prior art.

本発明が従来の単一仮想空間方式と異なるのは複数の仮
想空間を設けていることで明らかである。
It is clear that the present invention differs from the conventional single virtual space system in that a plurality of virtual spaces are provided.

また、従来の多重仮想空間方式との違いを第6図及び第
7図を用いて説明する。第6図に示すように、従来の多
重仮想空間方式では、それぞれのユーザプログラム領域
の仮想アドレスの重複を許しているが、本発明では重複
しないように割り付けている。従って、O3がユーザプ
ログラム領域のアドレスを特定するのに、第7図(a)
に示すように、従来の多重仮想空間方式では仮想アドレ
スのほかに空間識別子を指定しなくてはならないのに対
し、本発明では第7図(b)に示すように仮想アドレス
の上位フィールドが空間識別子を兼ねているので、仮想
アドレスのほかに空間識別子を合わせて管理する必要は
ない。なお、本発明は、ユーザプログラム領域のメモリ
割り付は方法を限定するものではな(、前記仮想アドレ
スの空間識別子フィールドの長さは可変長として取り扱
う。
Further, the difference from the conventional multiple virtual space system will be explained using FIGS. 6 and 7. As shown in FIG. 6, in the conventional multiple virtual space system, the virtual addresses of each user program area are allowed to overlap, but in the present invention, the virtual addresses are allocated so as not to overlap. Therefore, when O3 specifies the address of the user program area, as shown in FIG.
As shown in FIG. 7(b), in the conventional multiple virtual space system, a space identifier must be specified in addition to the virtual address, whereas in the present invention, as shown in FIG. 7(b), the upper field of the virtual address is a space identifier. Since it also serves as an identifier, there is no need to manage space identifiers in addition to virtual addresses. Note that the present invention does not limit the method of memory allocation for the user program area (the length of the space identifier field of the virtual address is handled as a variable length).

本発明ではさらに、前記複数の仮想空間のほかに、別の
仮想空間を1面追加し、該別の仮想空間にO5及び、全
てのユーザプログラムを前記複数の仮想空間と重複して
マツプし、O3を該別の仮想空間で実行させることによ
り、O3から全てのユーザプログラム領域を該別の仮想
空間でアクセス可能とする。ユーザプログラムは該別の
仮想空間では実行させない。
The present invention further includes adding another virtual space in addition to the plurality of virtual spaces, and mapping O5 and all user programs to the other virtual space so as to overlap with the plurality of virtual spaces, By executing O3 in the other virtual space, all user program areas can be accessed from O3 in the other virtual space. The user program is not executed in the other virtual space.

次に、本発明の実施例を図面によって説明する。Next, embodiments of the present invention will be described with reference to the drawings.

第1図は、本実施例における仮想空間内のプt′1グラ
ムの配置を示す図である。仮想空間lにはO85および
第2図に示す全てのユーザプログラム、すなわちユーザ
プログラム6ないし10をアドレス領域が重ならないよ
うにマツプする。仮想空間2にはO35およびユーザプ
ログラム6ないし8をマツプする。仮想空間3にはO3
5およびユーザプログラム9およびユーザプログラム1
0をマツプする。この場合、本実施例の特徴としてユー
ザプログラム6〜8とユーザプログラム9〜10とは、
同一空間内だけでなく、異なる空間2と3の間でも、ア
ドレス領域が相互に重複しないようになっている。第2
図はプログラムの構成を示す図である。035の下でユ
ーザプログラム6ないし10が動作している。第3図は
、変換テーブルを用いて、上記仮想空間を実現するため
の仮想アドレスから物理アドレス(実アドレス)へのア
ドレス変換手順を示す図である。第3図では、ある1つ
のプログラムについて必要な変換手順のみを示している
が、実際にはプログラム毎に異なる変換テーブルが用い
られる。仮想アドレス20は32ビツト長である。セグ
メント・テーブル・ポインタ5TP21はセグメント・
テーブル5T22の先頭物理アドレス(テーブル5T2
2の存在する位置の先頭実アドレス)を示すレジスタで
ある。
FIG. 1 is a diagram showing the arrangement of t'1-grams in the virtual space in this embodiment. O85 and all the user programs shown in FIG. 2, ie, user programs 6 to 10, are mapped in the virtual space 1 so that their address areas do not overlap. In virtual space 2, O35 and user programs 6 to 8 are mapped. O3 in virtual space 3
5 and user program 9 and user program 1
Map 0. In this case, the features of this embodiment are that user programs 6 to 8 and user programs 9 to 10 are
Address areas are made to not overlap not only within the same space but also between different spaces 2 and 3. Second
The figure shows the configuration of the program. User programs 6 to 10 are running under 035. FIG. 3 is a diagram showing an address conversion procedure from a virtual address to a physical address (real address) for realizing the above virtual space using a conversion table. Although FIG. 3 shows only the necessary conversion procedure for one program, in reality, a different conversion table is used for each program. Virtual address 20 is 32 bits long. Segment table pointer 5TP21 indicates segment table pointer 5TP21.
Starting physical address of table 5T22 (table 5T2
This is a register that indicates the starting real address of the position where 2 exists.

5T22は1024個(21°個)のエントリ5TE2
3を有し、それぞれのエントリ23はページテーブルP
T24の先頭物理アドレス(テーブルPT24が存在す
る位置の先頭実アドレス)を示す。仮想アドレス20の
上位10ビツトは、5TE23のエントリ・ナンバを表
しておリアドレス変換時、仮想アドレス20の上位10
ビツトにより当該エントリ・ナンバの5TE23の一つ
が選択される。FT24は1024個(21°個)のエ
ントリPTE25を有し、それぞれのPTH25は仮想
アドレス20に対応する物理アドレス28の上位20ビ
・ントを示すPNフィールド26および記憶保護データ
を示す2ビット長のにフィールド(キー・フィールド)
27を含む。仮想アドレス20の第12〜第21ビツト
の範囲の10ビツトは、PTH25のエントリ・ナンバ
を表しており、アドレス変換時、仮想アドレス20の第
12ビツトから第21ビツトまでの10ビツトによりP
T24のPTH25の一つ(当1亥エントリ・ナンバに
相当するエントリ)が選択される。物理アドレス2日は
32ビット長であり、アドレス変換の結果仮想アドレス
20の下位12ビツトがそのまま物理アドレス28の下
位12ビツトに反映され、選択されたPTH25内のP
Nフィールド26が示す物理アドレス上位20ビツトが
物理アドレス28の上位20ビツトに反映され、32ビ
ツト長の物理アドレス(実主メモリ上のアドレス)28
が生成される。制御レジスタ29はプログラム実行時の
メモリへの2ビツト長のアクセスJti−30(当該プ
ログラムからのみ主メモリへアクセスでき他プログラム
からはアクセスできない権利、つまり、ロック)を含む
レジスタである。制御レジスタ29内のアクセス権30
と選択されたPTH25のにフィールド27の記憶保護
データとが比較され両者の値が一致した場合のみ仮想ア
ドレス20が示す主記憶へのアクセスが可能となる。但
し、アクセス権の値“0”は特別であり、Kフィールド
の値にかかわらず任意の仮想アドレス20が示すメモリ
へのアクセスが可能である。これは、O3実行時に全て
のユーザプログラム領域をアクセスできるようにするた
めである。また、ユーザプログラムからO5に制御が移
ったとき自動的にアクセス権30の値は“0″になるよ
うになっている。
5T22 has 1024 (21°) entries 5TE2
3, each entry 23 has a page table P
It shows the starting physical address of T24 (the starting real address of the position where table PT24 exists). The upper 10 bits of virtual address 20 represent the entry number of 5TE23, and the upper 10 bits of virtual address 20 represent the entry number of 5TE23.
One of the 5TE23 of the entry number is selected by the bit. The FT24 has 1024 (21°) entries PTE25, and each PTH25 has a PN field 26 indicating the upper 20 bits of the physical address 28 corresponding to the virtual address 20 and a 2-bit length indicating memory protection data. field (key field)
Contains 27. The 10 bits in the range of the 12th to 21st bits of the virtual address 20 represent the entry number of the PTH 25. During address conversion, the 10 bits from the 12th bit to the 21st bit of the virtual address 20 represent the entry number of the PTH 25.
One of the PTH25 of T24 (the entry corresponding to the current entry number) is selected. The physical address 2 is 32 bits long, and as a result of address conversion, the lower 12 bits of the virtual address 20 are reflected as they are in the lower 12 bits of the physical address 28, and the PTH in the selected PTH 25 is
The upper 20 bits of the physical address indicated by the N field 26 are reflected in the upper 20 bits of the physical address 28, resulting in a 32-bit physical address (address on real main memory) 28.
is generated. The control register 29 is a register containing a 2-bit length access Jti-30 to the memory during program execution (the right to access the main memory only from the program and not from other programs, that is, lock). Access rights 30 in control register 29
The selected PTH 25 is compared with the storage protection data in the field 27, and only when the two values match, access to the main memory indicated by the virtual address 20 becomes possible. However, the access right value "0" is special, and the memory indicated by any virtual address 20 can be accessed regardless of the value of the K field. This is to enable access to all user program areas during O3 execution. Further, when control is transferred from the user program to O5, the value of the access right 30 is automatically set to "0".

第4図は第1図の各プログラム領域に対応するPTH,
25のにフィールド27の値を示す表である。
Figure 4 shows the PTHs corresponding to each program area in Figure 1.
25 is a table showing the values of field 27.

この実施例では、Kフィールドは前記のように2ビット
であって、1つの仮想空間にオペレーティングシステム
O8と、ユーザ側から実行できるプログラムとして、最
大3個までのユーザプロ、ダラムとを指定できる場合を
示している。但し、ユーザプログラム6とユーザプログ
ラム9はにフィールドの値が共に“1”となっており、
仮想空間1において両者のにフィールドの値が重複して
しまうが、仮想空間1では後述するようにO35しか実
行しないのでユーザプログラム実行時の主記憶保護の問
題とはならない。同様のことがユーザプロクラム7とユ
ーザプログラム10についてもいえる。第5図は第1図
に示す仮想空間1. 2. 3をマツプするためのセグ
メント・テーブルSTおよびページ・テーブルPTの関
係を示す図である。
In this embodiment, the K field is 2 bits as described above, and the operating system O8 and up to three user programs, Durham, can be specified in one virtual space as programs that can be executed by the user. It shows. However, the values of the fields in user program 6 and user program 9 are both "1",
In the virtual space 1, the values of both fields overlap, but since only O35 is executed in the virtual space 1, as will be described later, this does not pose a main memory protection problem when the user program is executed. The same thing can be said about the user program 7 and the user program 10. FIG. 5 shows the virtual space 1 shown in FIG. 2. 3 is a diagram showing the relationship between a segment table ST and a page table PT for mapping 3. FIG.

ここでは、1つのセグメント・テーブルを1つの空間に
対応させ、1つのページ・テーブルを1つのユーザプロ
グラム又はO8に対応させている。
Here, one segment table corresponds to one space, and one page table corresponds to one user program or O8.

5T40は仮想空間1を、ST41は仮想空間2を、S
T42は仮想空間3をそれぞれマツプするためのセグメ
ント・テーブルである。セグメント・テーブル5T40
.41.42の1つ1つは、第3図のセグメント・テー
ブル5T22に相当する。
5T40 is virtual space 1, ST41 is virtual space 2, S
T42 is a segment table for mapping each virtual space 3. Segment table 5T40
.. Each of 41 and 42 corresponds to the segment table 5T22 in FIG.

PT45は035を、PT46はユーザプログラム6を
、PT41はユーザプログラム7を、PT48はユーザ
プログラム8を、PT49はユーザプログラム9を、P
T50はユーザプログラム10をそれぞれマツプするた
めのページ・テーブルである。ページ・テーブルPT4
5〜50の1つ1つは、第3図のページ・テーブルPT
24に相当している。O35は各仮想空間に共通してマ
ツプするため、Sr10ないし5T42は同じPT45
をポイントしている。ユーザプログラム6ないしユーザ
プログラム8は仮想空間1および仮想空間2にマツプさ
れるため、5T40およびSr11は共にPT46ない
しPT48をポイントしている。同様に、ユーザプログ
ラム9ないしユーザプログラム10は仮想空間1および
仮想空間3にマツプされるため、Sr10およびSr1
2は共にPT49ないしPT50をポイントしている。
PT45 has 035, PT46 has user program 6, PT41 has user program 7, PT48 has user program 8, PT49 has user program 9, P
T50 is a page table for mapping each user program 10. Page table PT4
Each of 5 to 50 is the page table PT in Figure 3.
It corresponds to 24. Since O35 is commonly mapped to each virtual space, Sr10 to 5T42 are mapped to the same PT45.
is the point. Since user program 6 to user program 8 are mapped to virtual space 1 and virtual space 2, 5T40 and Sr11 both point to PT46 to PT48. Similarly, since user program 9 to user program 10 are mapped to virtual space 1 and virtual space 3, Sr10 and Sr1
2 both point to PT49 or PT50.

なお前述のように、すべてのユーザプログラム6〜10
は、異なる仮想空間の間でもアドレス領域が重複するこ
とはないので、仮想アドレス20の上位ビット(各ユー
ザプログラム毎に異なる)を見れば、それが所属してい
る空間がどれであるかわかる。即ち、この上位ビットは
、空間識別子を兼ねているということができる。
As mentioned above, all user programs 6 to 10
Since the address areas do not overlap even between different virtual spaces, by looking at the upper bits of the virtual address 20 (different for each user program), you can tell which space the virtual address belongs to. In other words, this upper bit can be said to also serve as a space identifier.

以下、O35がユーザプログラム6を選択・実行させ、
ユーザプログラム6がO35に外部記憶装置(図には示
していない)からのデータ入力サービスを要求し、次に
O85がユーザプログラム10を選択・実行させた場合
を例にとり本実施例の動作を説明する。O35がプログ
ラムのスケジュールを行ないユーザプログラム6を選択
すると、5TP21に、ユーザプログラム6が存在する
仮想空間2をマツプしている5T41のアドレス(前述
のように先頭物理アドレス)を設定する。以後、アドレ
ス変換はSr11を元に行なわれ、仮想空間2が選択さ
れる。次に、制御レジスタ29のアクセス権30に値“
1”を設定すると同時にユーザプログラム6に制御を移
す。ユーザプログラム6に制御が移った時点では、アク
セス権30の値はu 1 nになっているので、PTE
のにフィールドの値が1nであるユーザプログラム6(
第4図参照)の領域にはアクセスできるが、同じ仮想空
間2にマツプされているユーザプログラム7あるいはユ
ーザプログラム8の領域には第4図に示すようににフィ
ールドの値が異なるためアクセスすることができない。
Thereafter, O35 selects and executes the user program 6,
The operation of this embodiment will be explained by taking as an example a case where the user program 6 requests the O35 for data input service from an external storage device (not shown), and then the O85 selects and executes the user program 10. do. When O35 schedules a program and selects user program 6, it sets in 5TP21 the address of 5T41 that maps the virtual space 2 where user program 6 exists (as described above, the leading physical address). Thereafter, address translation is performed based on Sr11, and virtual space 2 is selected. Next, the access right 30 of the control register 29 is set to the value "
1", control is transferred to the user program 6. At the time the control is transferred to the user program 6, the value of the access right 30 is u 1 n, so the PTE
User program 6 (where the value of the field is 1n)
(see Figure 4), but the user program 7 or user program 8 area mapped to the same virtual space 2 cannot be accessed because the field values are different as shown in Figure 4. I can't.

ユーザプログラム6は処理を行ないバッファ・アドレス
を指定し、外部記憶装置からのデータ入力サービスを要
求し、O35に制御を戻す。035に制御が戻ったとき
、自動的に制御レジスタ29のアクセス権30の値は“
°0″に切り替わる。O35は、5TP21に5T40
のアドレスを設定し、仮想空間1に切り替える。
User program 6 performs processing, specifies a buffer address, requests data input service from external storage, and returns control to O35. When control returns to 035, the value of access right 30 of control register 29 automatically changes to “
°0''.O35 is 5TP21 to 5T40
and switch to virtual space 1.

O55は内部テーブルに、前記指定されたバッファ・ア
ドレスを格納してから、外部記憶装置を起動し、再びプ
ログラムのスケジュールを行ないユーザプログラム10
を選択する。5TP21にユーザプログラム10が存在
する仮想空間3をマツプしているSr12のアドレスを
設定する。次に、制御レジスタ29のアクセス権30に
値“2”を設定すると同時にユーザプログラム10に制
御を移す。ユーザプログラム10が処理を行なうが、処
理中に先に起動した外部記憶装置からの完了割り込みが
発生すると、−旦、O35に制御が戻る。
After storing the specified buffer address in the internal table, the O55 starts up the external storage device, schedules the program again, and executes the user program 10.
Select. The address of Sr12 that maps the virtual space 3 where the user program 10 exists is set in 5TP21. Next, the value "2" is set in the access right 30 of the control register 29, and control is transferred to the user program 10 at the same time. The user program 10 performs processing, but when a completion interrupt from the previously started external storage device occurs during the processing, control immediately returns to O35.

この場合も、自動的に制御レジスタ29のアクセス権3
0の値は“0”に切り替わる。O35は、5TP21に
5T40のアドレスを設定し、仮想空間1に切り替え、
内部テーブルに格納しておいたバッファ・アドレスを取
り出し、読み込んだデータをユーザプログラム6の領域
の指定されたバッファに書き込む。このようにO85は
全てのユーザプログラムがマツプされている仮想空間1
でユーザプログラム領域にアクセスするので、バッファ
・アドレスを管理しておくのに実行時の仮想空間の識別
子を覚えておく必要はない。そして、再びプログラムの
スケジュールを行ないユーザプログラム6を選択し、5
TP21にユーザプログラム6が存在する仮想空間2を
マツプする5T41のアドレスを設定する。次に、制御
レジスタ29のアクセス権30に値“1”を設定すると
同時にユーザプログラム6に制御を移す。
In this case as well, the access right 3 of the control register 29 is automatically
A value of 0 switches to "0". O35 sets the address of 5T40 in 5TP21, switches to virtual space 1,
The buffer address stored in the internal table is retrieved and the read data is written to the designated buffer in the user program 6 area. In this way, O85 is a virtual space 1 where all user programs are mapped.
Since the user program area is accessed in , there is no need to remember the virtual space identifier at runtime to manage buffer addresses. Then, schedule the program again and select user program 6.
The address of 5T41 that maps the virtual space 2 where the user program 6 exists is set in TP21. Next, the value "1" is set in the access right 30 of the control register 29, and control is transferred to the user program 6 at the same time.

本実施例によれば、複数のユーザプログラムを同一仮想
空間内に配置することができるので、仮想空間の数を減
らし、アドレス変換テーブルに必要なメモリ容量を小さ
くすることができる。
According to this embodiment, since a plurality of user programs can be placed in the same virtual space, the number of virtual spaces can be reduced and the memory capacity required for the address translation table can be reduced.

〔発明の効果〕〔Effect of the invention〕

以上詳しく述べたように、本発明の仮想記憶制御方式に
よれば、複数の仮想空間を設け、各々のユーザプログラ
ムの仮想アドレスが、異なる仮想空間の間でも重複しな
いようにマツプしたことにより、O3内でユーザプログ
ラム領域の制御テーブルおよびバッファを管理するのに
、従来の多重仮想空間方式のようにアドレスの外に空間
識別子を合わせて管理する必要がないので、実記憶シス
テムから容易に移行でき、また、従来の単一仮想空間方
式のようにユーザプログラム数の増加により主記憶保護
キーを増加したり入れ替えたりする必要がないので、オ
ーバヘッドの少ない仮想記憶制御方式を実現することが
できる効果を奏する。
As described in detail above, according to the virtual memory control method of the present invention, a plurality of virtual spaces are provided and the virtual addresses of each user program are mapped so that they do not overlap even between different virtual spaces. In order to manage control tables and buffers in the user program area within the system, there is no need to manage space identifiers in addition to addresses as in the conventional multiple virtual space system, so it is easy to migrate from a real storage system. In addition, unlike the conventional single virtual space method, there is no need to increase or replace main memory protection keys as the number of user programs increases, making it possible to realize a virtual memory control method with low overhead. .

また、上記複数の仮想空間に加え、全部のユーザプログ
ラムをマツプした別の仮想空間を設け、ここでO3が全
てのユーザプログラム領域をアクセスできるようにした
ことにより、ユーザプログラムのマツプされた仮想空間
を一々仮想アドレスから求める必要がないという効果を
奏する。
Additionally, in addition to the multiple virtual spaces mentioned above, another virtual space is created in which all user programs are mapped, and O3 can access all user program areas. This has the effect that it is not necessary to obtain each one from the virtual address.

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

第1図は本発明の一実施例における仮想空間の構成を示
す図、第2図はプロ、ダラム構成を示す図、第3図はア
ドレス変換手順を示す図、第4図はプログラムの保護キ
ーを示す図、第5図はアドレス変換テーブルの関係を示
す図、第6図及び第7図は本発明と多重仮想記憶方式と
の違いを示す図である。 1〜3−・−・−・・仮想空間、5・・・・−・・・0
316〜10・−−・ユーザプログラム、20−・・−
・仮想アドレス、21・・−・−・・セグメント・テー
ブル・ポインタSTP、22゜40〜42−−−−−−
−セグメント・テーブルST、23・・・・−・セグメ
ント・テーブル・エントリSTE、24゜45〜50−
・−一一一一ページ・テーブルPT、25・−・−・・
−ページ・テーブル・エントリPTE、28・−・−・
−物理アドレス、29−・−・−制御レジスタ。 第1図 艷2図 第4図 第5図 第6図 第7図 (a)
Fig. 1 is a diagram showing the configuration of a virtual space in an embodiment of the present invention, Fig. 2 is a diagram showing a program and duram configuration, Fig. 3 is a diagram showing an address conversion procedure, and Fig. 4 is a diagram showing a program protection key. FIG. 5 is a diagram showing the relationship between address translation tables, and FIGS. 6 and 7 are diagrams showing the difference between the present invention and the multiple virtual storage system. 1~3-・-・-・Virtual space, 5・・・・・・・・・0
316-10---user program, 20-...-
・Virtual address, 21...Segment table pointer STP, 22°40~42------
- Segment table ST, 23...- Segment table entry STE, 24°45~50-
・−1111 page table PT, 25・−・−・・
-Page table entry PTE, 28...
- Physical address, 29-- Control register. Figure 1 Figure 2 Figure 4 Figure 5 Figure 6 Figure 7 (a)

Claims (1)

【特許請求の範囲】 1、複数の仮想空間と、前記複数の仮想空間の各々に対
し、オペレーティングシステム及び相互に記憶保護可能
な数以内のユーザプログラムを、それらのユーザプログ
ラム領域の仮想アドレスが異なる仮想空間の間でも重複
しないように順にマップする手段と、前記各々のユーザ
プログラムを、該ユーザプログラムがマップされている
空間で実行させる手段とを備えたことを特徴とする仮想
記憶制御方式。 2、前記複数の仮想空間に加え、オペレーティングシス
テム及び全てのユーザプログラムをマップした別の仮想
空間を設け、前記オペレーティングシステムを前記別の
仮想空間で実行させるように構成したことを特徴とする
請求項1記載の仮想記憶制御方式。
[Scope of Claims] 1. A plurality of virtual spaces, and for each of the plurality of virtual spaces, an operating system and a number of user programs that can be protected mutually, and the virtual addresses of these user program areas are different. A virtual storage control method comprising: means for sequentially mapping virtual spaces so that there is no overlap; and means for executing each user program in the space to which the user program is mapped. 2. In addition to the plurality of virtual spaces, another virtual space is provided to which an operating system and all user programs are mapped, and the operating system is configured to be executed in the other virtual space. 1. The virtual memory control method according to 1.
JP63100200A 1988-04-25 1988-04-25 Virtual storage control system Pending JPH01273153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63100200A JPH01273153A (en) 1988-04-25 1988-04-25 Virtual storage control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63100200A JPH01273153A (en) 1988-04-25 1988-04-25 Virtual storage control system

Publications (1)

Publication Number Publication Date
JPH01273153A true JPH01273153A (en) 1989-11-01

Family

ID=14267660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63100200A Pending JPH01273153A (en) 1988-04-25 1988-04-25 Virtual storage control system

Country Status (1)

Country Link
JP (1) JPH01273153A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5627987A (en) * 1991-11-29 1997-05-06 Kabushiki Kaisha Toshiba Memory management and protection system for virtual memory in computer system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5627987A (en) * 1991-11-29 1997-05-06 Kabushiki Kaisha Toshiba Memory management and protection system for virtual memory in computer system

Similar Documents

Publication Publication Date Title
Dennis Segmentation and the design of multiprogrammed computer systems
EP0208428B1 (en) Direct input/output in a virtual memory system
US7409487B1 (en) Virtualization system for computers that use address space indentifiers
KR920005853B1 (en) Apparatus for controlling input/output operation in virtual memory/visual computer type data processing system
US4511964A (en) Dynamic physical memory mapping and management of independent programming environments
US6681239B1 (en) Computer system having shared address space among multiple virtual address spaces
US6349355B1 (en) Sharing executable modules between user and kernel threads
US6275917B1 (en) High-speed address translation system
US4742450A (en) Method to share copy on write segment for mapped files
US4761737A (en) Method to automatically increase the segment size of unix files in a page segmented virtual memory data processing system
US5335334A (en) Data processing apparatus having a real memory region with a corresponding fixed memory protection key value and method for allocating memories therefor
US7149873B2 (en) Methods and apparatus for a dual address space operating system
US4758946A (en) Page mapping system
EP0700000A2 (en) System and method combining a global object identifier with a local object address in a single object pointer
JPH0552540B2 (en)
JPH01207856A (en) Address space control mechanism
JPH08212136A (en) Method and apparatus for efficient sharing of virtual memoryconversion processing
US5875487A (en) System and method for providing efficient shared memory in a virtual memory system
WO2002057923A1 (en) Memory protection control device and method
US5940869A (en) System and method for providing shared memory using shared virtual segment identification in a computer system
JPS6184755A (en) Data processing system
JPH01273153A (en) Virtual storage control system
Motobayashi et al. The HITAC5020 time sharing system
US5450587A (en) Expanded memory addressing scheme
JPS63254544A (en) Control system for address conversion