JPS63197254A - Virtual memory controller - Google Patents

Virtual memory controller

Info

Publication number
JPS63197254A
JPS63197254A JP62028258A JP2825887A JPS63197254A JP S63197254 A JPS63197254 A JP S63197254A JP 62028258 A JP62028258 A JP 62028258A JP 2825887 A JP2825887 A JP 2825887A JP S63197254 A JPS63197254 A JP S63197254A
Authority
JP
Japan
Prior art keywords
address
memory
page
access
instruction
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
JP62028258A
Other languages
Japanese (ja)
Inventor
Yasuhiro Nakatsuka
康弘 中塚
Naruya Tanaka
成弥 田中
Takashi Hotta
多加志 堀田
Tadaaki Bando
忠秋 坂東
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 Ltd
Original Assignee
Hitachi 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 filed Critical Hitachi Ltd
Priority to JP62028258A priority Critical patent/JPS63197254A/en
Publication of JPS63197254A publication Critical patent/JPS63197254A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To restart an instruction without a malfunction after the page fault processing is finished by providing a means which compares the contents LA of a logic address register with the next page boundary address BA and detects that the conditions BA-N<=LA<BA are satisfied against a certain fixed natural number N. CONSTITUTION:The warnings can be issued against a 3-word access, a 4-word access, etc. In other words, it may be required to give a warning when the conditions BA-N<=LA<BA are satisfied with the logic address LA of a memory access, a page boundary BA and a prescribed natural number N (issuing the warning to an N-word access). Especially, the conditions equivalent to a state where bits n-11 are equal to 'all-1' when N=2<n>+1 (n: non-negative integer). Thus a warning signal 131 can be issued with a simple logic.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は仮想記憶を扱う計算機に係り、特にページフォ
ルト発生時の命令再開処理の簡単化に好的な手法に関す
る。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a computer that handles virtual memory, and particularly to a method suitable for simplifying instruction restart processing when a page fault occurs.

〔従来の技術〕[Conventional technology]

従来、仮想記憶計算機におけるページフォルト処理終了
後の命令再開法については、アイ・イー・イー・イー、
マイクロ 1983年6月号 第28頁から32頁(I
EEE MICROJune 1983 P2g−32
)において論じられている。
Conventionally, methods for restarting instructions after completion of page fault processing in virtual memory computers have been described by I.E.E.
Micro June 1983 issue pages 28 to 32 (I
EEE MICROJune 1983 P2g-32
) is discussed in

それによると、ページフォルト処理終了後の命令再開方
式には先頭再開と途中再開があり、詳しく述べられてい
る。ここでは、最初にページフォルトについて簡単に説
明し1次に各再開方式を説明する。
According to the document, there are two methods for restarting instructions after page fault processing is completed: restart at the beginning and restart in the middle, which are described in detail. Here, first, page faults will be briefly explained, and then each restart method will be explained.

仮想記憶とは、小容量で高速な主記憶装置と、大容量で
低速な2次記憶装置を用いて、中央演算処理装置(以下
CPU)から見た時に大容量で高速な主記憶装置がある
ように見せるものである。
Virtual memory uses a small-capacity, high-speed main storage device and a large-capacity, slow-speed secondary storage device, and has a large-capacity, high-speed main storage device when viewed from the central processing unit (CPU). It is made to look like this.

これは計算機における以下の2つの性質によって実現さ
れる。ひとつはCPUから記憶装置へのアクセスは1度
に1記憶単位に限られるということ、もうひとつは、こ
のアクセスがある時間内では記憶領域のある領域に対し
てのみ行なわれるというアクセスのロカリテイである。
This is realized by the following two properties of the computer. One is that access from the CPU to the storage device is limited to one storage unit at a time, and the other is the locality of the access, which means that this access is only made to a certain area of the storage area within a certain time. .

したがって、仮想記憶を実現するためには、現在頻度良
くアクセスが行なわれている領域を主記憶装置に格納し
、主記憶装置上に置けなかった領域は2次記憶装置上に
置くことにより、高速なメモリアクセスが可能となる。
Therefore, in order to realize virtual memory, areas that are currently frequently accessed are stored in the main memory, and areas that cannot be placed on the main memory are placed on the secondary storage to achieve high-speed access. memory access becomes possible.

ここで、メモリ上に配置する領域としてページという単
位を考え、領域は1ページごとに管理されるものとする
Here, a unit called a page is considered as an area arranged on the memory, and the area is managed on a page-by-page basis.

今、CPUが2次記憶装置上のページ内のデータを参照
しようとする場合、その領域を主記憶装置上の別のペー
ジと入れ替えなければならない。
Now, when the CPU attempts to refer to data within a page on the secondary storage device, that area must be replaced with another page on the main storage device.

したかっ7、各ページが存在する場所は時間とともに変
化するので、各ページの存在場所を管理し、CPUから
出されるアドレスを変換して対応付けなければならない
。この変換はCPU実行中に行なわれるので動的アドレ
ス変換と呼ばれる。
7. Since the location of each page changes over time, it is necessary to manage the location of each page and convert the addresses issued by the CPU to make them correspond to each other. Since this conversion is performed while the CPU is running, it is called dynamic address conversion.

変換されたアドレスは主記憶装置上のアドレスであり、
物理アドレスと呼ばれる。それに対し、CPUから出さ
れるアドレスは、ページの実在する場所を気にしないと
いう意味で論理アドレスと呼ばれる。一般に論理アドレ
ス空間は物理アドレス空間よりも広く、それ故にアドレ
ス変換を行なう時、求めるデータを含むページが主記憶
装置上に存在しない場合がある。この状態のことをペー
ジフォルトと呼び、主記憶装置へこのページを取り込む
ために行なわれる、主記憶装置と2次記憶装置とのペー
ジの入れ替えに伴う一連の処理をページフォルト処理と
いう。
The translated address is an address on main memory,
called a physical address. In contrast, the address issued by the CPU is called a logical address in the sense that it does not care about the actual location of the page. Generally, the logical address space is wider than the physical address space, so when performing address translation, there are cases where a page containing the desired data does not exist on the main memory. This state is called a page fault, and a series of processes that are performed to import this page into the main storage, which involves exchanging pages between the main storage and the secondary storage, are called page fault processing.

ページフォルト処理は大きく3つの部分に分けられる。Page fault processing can be broadly divided into three parts.

第1番目は、ページフォルト処理によって破壊される情
報をメモリへ退避すること、第2番目は、入出力コント
ローラに対してページ入れ替えの処理を指示すること、
第3番目は退避したデータを取り込み、命令を再開する
ことである。
The first is to save information destroyed by page fault processing to memory, and the second is to instruct the input/output controller to perform page replacement processing.
The third step is to import the saved data and restart the instruction.

ページフォルトはメモリアクセス時、すなわち命令実行
中におこるので、ページフォルト処理終了後はこの命令
が誤動作なく実行終了しなければならない。そのための
方式が、次に説明する命令先頭再開方式である。
Since a page fault occurs during memory access, that is, during instruction execution, the instruction must be executed without malfunction after page fault processing is completed. A method for this purpose is the instruction start restart method described below.

ページフォルト発生時には必要最小限の情報を退避し、
処理終了後は同命令を最初からもう一度実行する方式で
ある。
When a page fault occurs, save the minimum necessary information,
After the processing is completed, the same instruction is executed again from the beginning.

この場合、ページフォルト発生前に各種情報を破壊して
しまう場合があり、その時にはこの方式では誤動作する
。したがって、この方式の場合は。
In this case, various information may be destroyed before a page fault occurs, and in that case, this method will malfunction. Therefore, for this method.

各種情報を書き替える前にページフォルトがおこるかど
うかチェックするためにダミーのアクセスを行なう。こ
れによって、各種情報の書き替え時には、ページフォル
トがおこらないことが保障される。このダミーアクセス
処理をリハーサル処理という。
Before rewriting various information, dummy access is performed to check whether a page fault will occur. This ensures that a page fault does not occur when rewriting various information. This dummy access processing is called rehearsal processing.

ページフォルト発生時には、マイクロプログラム関係の
情報をも退避し、処理終了後には、命令の途中から実行
を再開する方式である。
When a page fault occurs, information related to the microprogram is also saved, and after processing is completed, execution is resumed from the middle of the instruction.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記従来技術は以下の2点について配慮されていなかっ
た。
The above conventional technology does not take into consideration the following two points.

1、リハーサル処理を行なう場合、命令の実行開始時の
ダミーアクセスによってページフォルトがおこらない状
態となるのでその後ページフォルトに起因する誤動作は
ない、(命令先頭再開方式) しかしこの方法はダミーアクセスのためのマイクロプロ
グラムを起動するので、マイクロプログラムのステップ
数を増加させる。したがって、実行サイクル数の大きな
命令に対しては有効であるが、実行サイクル数が小さな
命令に対してはオーバーヘッドが大きい。
1. When performing rehearsal processing, a page fault will not occur due to dummy access at the start of instruction execution, so there will be no malfunctions caused by page faults afterwards (instruction start restart method) However, this method uses dummy access , the number of microprogram steps increases. Therefore, although it is effective for instructions with a large number of execution cycles, the overhead is large for instructions with a small number of execution cycles.

2゜命令実行中にページフォルトがおこった場合、その
時点の各種レジスタの値を保持し、ページフォルト処理
終了後、命令、の途中から再開する方式では、情報が退
避されているので誤動作しない、(命令途中再開方式) しかし、この方法は退避すべき情報が多く、また、ペー
ジフォルトの発生するタイミングによって、退避すべき
内容も異なるので、情報退避・回復のためのオーバーヘ
ッドが大きい0例えば、ページフォルトがおこったタイ
ミングが、CPUの内部状態が変化する前か後かで退避
情報が異なる。このオーバヘッドは、複数のページフォ
ルト処理を要求し、マイクロプログラム容量を増大させ
る。
2. If a page fault occurs during instruction execution, the values of various registers at that point are retained, and after the page fault processing is completed, the system restarts from the middle of the instruction. This method prevents malfunctions because the information is saved. (Instruction mid-resume method) However, this method requires a lot of information to be saved, and the content to be saved also differs depending on the timing when a page fault occurs, so the overhead for information saving and recovery is large. The save information differs depending on whether the fault occurs before or after the internal state of the CPU changes. This overhead requires multiple page fault handling and increases microprogram capacity.

本発明の目的は、マイクロステップ数もマイクロプログ
ラム容量も増加させることなく、ページフォルト処理終
了後の命令再開を誤動作なく実現することにある。
An object of the present invention is to realize instruction restart after completion of page fault processing without malfunction, without increasing the number of microsteps or the microprogram capacity.

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

上記目的は、メモリアクセスを行なう時にそのアクセス
がページフォルトを発生する可能性があるか否かを判定
し、警告を発する手段を有することによって達成される
The above object is achieved by having means for determining whether a memory access is likely to cause a page fault and issuing a warning.

本発明の好ましい実施態様に於いては、警告を受けた時
、CP IJの状態や、メモリの内容をCPUが変化さ
せる前にダミーのアクセスを行なわせる手段を有し、さ
らに、好ましくは、該手段をメモリアクセスのコントロ
ーラに持たせることによって、マイクロプログラムのス
テップ数を増加させないことにある。
In a preferred embodiment of the present invention, when receiving a warning, there is provided means for causing the CPU to perform dummy access before the CPU changes the state of the CP IJ or the contents of the memory. By providing the means in the memory access controller, the number of steps in the microprogram is not increased.

〔作用〕[Effect]

命令実行時のメモリアクセスがページフォルトの可能性
のあるものであった時、ページフォルトの警告が発せら
れる。
A page fault warning is issued when a memory access during instruction execution has a possibility of a page fault.

このとき、好ましくは、ダミーアクセスが行なわれる。At this time, dummy access is preferably performed.

ダミーアクセスの結果ページフォルトがなかった場合は
、命令が継続される。
If there is no page fault as a result of the dummy access, the instruction continues.

ダミーアクセスの結果ページフォルトがあった場合、ペ
ージ六九替えのための一連の処理が行なわれる。処理終
了後、命令は先頭から再開されるが、CPU状態やメモ
リの内容は命令開始時のものが退避されるので、誤動作
することなく命令の先頭再開が可能である。
If a page fault occurs as a result of dummy access, a series of processes for replacing the page 69 is performed. After the processing is completed, the instruction is restarted from the beginning, but since the CPU state and memory contents at the time of the start of the instruction are saved, it is possible to restart the instruction from the beginning without malfunction.

しかも、これらの処理は警告が発せられた時にのみ行な
われるので、性能の低下は最小限に押さえられ、好まし
くは、マイクロプログラムの増大もない。
Moreover, since these processes are performed only when a warning is issued, performance degradation is minimized and, preferably, no increase in microprograms is required.

〔実施例〕〔Example〕

以下、本発明の一実施例を第1図〜第4図によって説明
する。
An embodiment of the present invention will be described below with reference to FIGS. 1 to 4.

最初に本計算機システムの用語について説明する。First, the terminology used in this computer system will be explained.

ワード;例えば1ワード2バイトから成るデータ領域ア
ドレスは1.ワードごとに 連続的に割りつけられる。
Word: For example, a data area address consisting of 1 word and 2 bytes is 1. Allocated consecutively for each word.

ブロック:例えば1ブロツク2ワードで構成されるメモ
リアクセスの単位であり、 ブロックの先頭アドレスは偶数とな るゆ ページ:例えば1ページ4にワードの領域であり、仮想
記憶システムにより管理 される最小単位である。
Block: For example, a unit of memory access consisting of 1 block and 2 words, and the start address of the block is an even number.Page: For example, an area of 4 words per page, and the smallest unit managed by a virtual memory system. be.

本計算機システムの記憶装置は仮想記憶方式によって管
理されている。すなわち、第1図において、メモリアク
セスの論理アドレスが格納されているレジスタLARI
IIの内容を動的アドレス変換機構DAT123を通し
て変換し、主メモリMM102のアドレスを格納するレ
ジスタPAR112ヘセットしてメモリアクセスを行な
う。
The storage device of this computer system is managed by a virtual storage method. That is, in FIG. 1, the register LARI stores the logical address for memory access.
The contents of II are converted through the dynamic address translation mechanism DAT123, and the address of the main memory MM102 is set in the register PAR112 for memory access.

このときレジスタLARの内容に対応するデータが主メ
モリMM102上になく、2次記憶装fiDK104上
にあるときには、メモリ管理ユニットMMU122が指
令を出し、入出力制御装[l0C103の制御により例
えば1ページ4にワードを単位として、主メモリMM1
02上のページと2次記憶装[DK104上のページと
を入れ替える。これがページフォルト処理と呼ばれるも
のである。
At this time, if the data corresponding to the contents of the register LAR is not on the main memory MM102 but on the secondary storage device fiDK104, the memory management unit MMU122 issues a command, and under the control of the input/output control unit [10C103, for example, main memory MM1 in units of words.
02 and the page on the secondary storage [DK104]. This is called page fault processing.

ページフォルトがおこるか否かは動的アドレス変換機構
DAT123を用いて変換してみなければわからない。
It is not possible to know whether a page fault will occur until conversion is performed using the dynamic address translation mechanism DAT123.

このとき以下のような不都合が生じる。第2図(a)に
示したように命令語201とその命令によって書きかえ
られるアドレス領域202が重なっており、しかも書き
込み対象となるアドレス領域202がページ境界211
をまたぐ場合や第2図(b)に示したように命令語20
3によって読み込まれるアドレス領域204と書き込ま
れるアドレス領域205どが重なっており、しかも書き
込みアドレス領域205がページ境界212をまたぐ場
合を考える。
At this time, the following inconvenience occurs. As shown in FIG. 2(a), the instruction word 201 and the address area 202 rewritten by the instruction overlap, and the address area 202 to be written is located at the page boundary 211.
When the command word 20 is used as shown in Figure 2(b),
Let us consider a case where the address area 204 to be read and the address area 205 to be written overlap with each other, and the write address area 205 straddles the page boundary 212.

第2図において右方向はアドレスの増加方向(221)
を示し、下方向は時間の経過(222)を示している。
In Figure 2, the right direction is the increasing direction of addresses (221)
, and the downward direction shows the passage of time (222).

202や205のようにページ境界をまたぐデータ領域
へのアクセスは、第2図(C)に示したような2つのブ
ロックによるアクセス(206a 、 206b)およ
び(206c 、 206d )にわけられる。これは
ページ境界は必ずブロック境界となるためである。
Accesses to data areas that straddle page boundaries, such as 202 and 205, are divided into two block accesses (206a, 206b) and (206c, 206d) as shown in FIG. 2(C). This is because page boundaries always become block boundaries.

第2図(C)における206a、 206dの部分を無
効とすれば、ページにまたがる領域206b、 206
cへの書き込みが可能となる。
If the parts 206a and 206d in FIG. 2(C) are invalidated, the areas 206b and 206 that span the page will be
It becomes possible to write to c.

第2図(a)の場合、命令を実行する以前に命令語20
1を読み込んでいるので、この部分を含むページは主記
憶装置上に存在し、書き込み領域の前半の部分のアクセ
スは異常なく終了する。次に後半の部分にアクセスした
時にページフォルトがおこると、ページフォルト処理終
了後に命令を先頭から再開できない。なぜならば言き込
みアドレス領域202の前半のアクセスによって命令語
が破壊されているからである。
In the case of FIG. 2(a), the instruction word 20 is
1 is read, the page including this portion exists on the main memory, and access to the first half of the write area ends without any abnormality. If a page fault occurs when the second half is accessed, the instruction cannot be restarted from the beginning after page fault processing is completed. This is because the instruction word is destroyed by accessing the first half of the write address area 202.

第2図(b)の場合、まず読み出しくアドレス領域20
4へのアクセスがおこなわれるが、このときメモリの内
容は書きかえられてはいないので、ここでページフォル
トがおこってもページフォルト処理の終了後、命令の先
頭から実行を再開できる。しかしながら、書き込み領域
205へのアクセスの場合は、第2図(a)の場合と同
様に書き込み領域205の後半のアクセスでページフォ
ルトが検出された時には読み出し領域204はすでに書
き換えられてしまっているのでページフォル1〜処理終
了後の命令の先頭再開は不可能となる。
In the case of FIG. 2(b), the address area 20 to be read first
4 is accessed, but the contents of the memory have not been rewritten at this time, so even if a page fault occurs here, execution can be resumed from the beginning of the instruction after page fault processing is completed. However, in the case of access to the write area 205, the read area 204 has already been rewritten by the time a page fault is detected in the latter half of the access to the write area 205, as in the case of FIG. 2(a). It becomes impossible to restart the beginning of the instruction after page fault 1 to processing ends.

従来は、この開運を解決するために、ページフォルト発
生時に退避するレジスタ類を多くして命令の途中再開を
可能とする方式や、書き込みアクセスのある命令では必
ず実際に書き込む前にダミーのアクセスを行なう方式な
どを用いていた。
Conventionally, in order to solve this problem, a method was adopted in which more registers were saved when a page fault occurred so that the instruction could be restarted midway, and a dummy access was always performed before actually writing an instruction with a write access. They used methods such as:

しかし、前者はマイクロプログラムの負担を増加させ、
後者はダミーアクセスの分だけマイクロステップ数を余
計に使い、しかもページ境界をまたがないようなアクセ
スに対してもダミーアクセスを行なってしまい、著しく
性能を低下させている。
However, the former increases the burden on the microprogram,
The latter uses an extra number of microsteps for dummy accesses, and also performs dummy accesses even for accesses that do not cross page boundaries, significantly reducing performance.

そこで、本発明ではページフォル1−がおこる可能性が
あるか否かを事前に検出し、対策することによって上記
問題点を解決する。
Therefore, the present invention solves the above problem by detecting in advance whether or not there is a possibility that page fault 1- will occur and taking countermeasures.

第3図はページフォルト警告信号の発生機構を示してい
る。論理アドレスレジスタLAR111には論理アドレ
ス1]、1a、 Hlb、 1110のようなアドレス
データが格納されている。ここで、111aはページ境
界から2ワ一ド手前のアドレスであり111bは1ワ一
ド手前、111Cはページ境界上のアドレスである。
FIG. 3 shows the generation mechanism of the page fault warning signal. Address data such as logical addresses 1], 1a, Hlb, and 1110 are stored in the logical address register LAR111. Here, 111a is an address two words before the page boundary, 111b is one word before the page boundary, and 111C is an address on the page boundary.

111aは、例えば最下位ビットがO、ビットOからビ
ット11まではオール1であり、101bは下位12ビ
ツトがオール1,101eは下位】、2ビツトがオール
0であるようなアドレスである。
111a is an address in which, for example, the least significant bit is O, bits 0 to 11 are all 1, 101b is an address in which the lower 12 bits are all 1, and 101e is the lower 2 bits are all 0.

書き込み領域が1ワードの時は、書き込み領域がページ
境界をまたぐことはないので、ページフォルト時のトラ
ブルはない。また、書き込み領域が例えば3ワ一ド以上
の時は、マイクロプログラムによってダミーリードを行
なってもマイクロプログラムのステップの増加率はあま
り大きくないのでこれも開運はない。
When the write area is one word, the write area does not straddle page boundaries, so there is no problem when a page fault occurs. Further, when the write area is, for example, 3 words or more, even if a dummy read is performed by a microprogram, the step increase rate of the microprogram is not very large, so this is also not a good luck.

書き込みアクセスが例えば2ワードの時は、以上2ケー
スのどれにも属さないので特別な処理を要する。書き込
みアドレスが1118や111Cの場合、2ワードのア
クセス領域がページ境界をまたがないので、トラブルは
発生しない。すなわち、アクセス領域がページ境界をま
たぐのは111bのケースだけである。したがって、1
11bのケースであることを検出する手段を設け、その
時のみ対策すれば良い、 1llbの特徴は下位12ビ
ツトがオール1であることであるので、第4図(a)に
示す様な12ビツトの例えば、ワイヤード・オア回路等
の論理積回路121aを用いて容易にベージフカ11月
−警告信号であるアラーム131が得られる。
For example, when the write access is for 2 words, special processing is required because it does not belong to any of the above two cases. If the write address is 1118 or 111C, no trouble occurs because the 2-word access area does not straddle the page boundary. That is, the access area straddles the page boundary only in case 111b. Therefore, 1
It is sufficient to provide a means to detect the case of 11b and take measures only in that case.Since the characteristic of 1llb is that the lower 12 bits are all 1, the 12-bit case as shown in Figure 4(a) For example, the alarm 131, which is a warning signal, can be easily obtained using an AND circuit 121a such as a wired-OR circuit.

401aにおいて信号133は、 MMtl122から
与えられる警告信号発生許可信号である。
A signal 133 in 401a is a warning signal generation permission signal given from the MMtl 122.

メモリアクセス制御部MMU122はアラーム1.31
を受けると、マイクロプログラムからのアクセス要求が
2ワードアクセスの場合に限り、DAT123に対して
アドレス111cのアドレス変換のみを行なうように指
令する。
Memory access control unit MMU122 issues alarm 1.31
When received, only when the access request from the microprogram is a 2-word access, it instructs the DAT 123 to only perform address translation of the address 111c.

アドレス111cの領域が主記憶装置内になかった場合
はページフォルト処理が行なわれて命令が先頭から再開
されるが、1lleへのアクセスでページフォルトがお
こらないことが保証されているので。
If the area at address 111c is not in the main memory, page fault processing is performed and the instruction is restarted from the beginning, but it is guaranteed that no page fault will occur when accessing 1lle.

ページフォルトに関するトラブルを避けることができる
Problems related to page faults can be avoided.

この方法でも例えば3ワ一ド以上のアクセスの場合と同
様にダミーアクセスを行なうが、これはMMU122に
よって実行されるのでマイクロプログラムのステップ数
は増加しない。
In this method as well, dummy access is performed in the same way as in the case of accessing three or more words, but since this is executed by the MMU 122, the number of steps in the microprogram does not increase.

また・アラーム131が発行されるのlまアドレスが1
115の場合だけでありダミーアクセスによりサイクル
数の増加量は平均すると4096分の1(0,025%
)となる。さらに、ダミーアクセスを行なう条件として
、ライトアクセスであることと2ワードアクセスである
こととを加えるとサイクル数の増加は皆無に等しいほど
となる。
Also, alarm 131 is issued when the address is 1.
115, and the increase in the number of cycles due to dummy access is on average 1/4096 (0,025%).
). Furthermore, if write access and 2-word access are added as conditions for performing dummy access, the increase in the number of cycles becomes almost negligible.

また、」1記実施例の他に3ワードアクセスや、4ワー
ドアクセスなどに対しでも警告を発することができる。
Further, in addition to the above embodiment, a warning can also be issued for 3-word access, 4-word access, etc.

すなわち、メモリアクセスの論理アドレスLAとページ
境界BAおよびあらかじめ定められた自然数N (Nワ
ードアクセスに対して)告を発する)において B A  N < L A < B A     (1
)なる条件を満足する時に警告を発すれば良い。
That is, B A N < L A < B A (1
) It is sufficient to issue a warning when the following conditions are satisfied.

特に N=2’+1  (nは負でない整数)の時第5
図に示したとおり、ビットnからビット11までがオー
ル1であるという条件と等価であるので。
Especially when N=2'+1 (n is a non-negative integer), the fifth
As shown in the figure, this is equivalent to the condition that all bits from bit n to bit 11 are 1.

第4図(b)(n=1のとき)や第4図(c)(n−2
のとき)のように簡単な論理で警告信号131を発する
ことが可能である。
Figure 4(b) (when n=1) and Figure 4(c) (n-2
It is possible to issue the warning signal 131 using simple logic such as when

第5図において、501はメモリのアドレスであり、5
06はページ境界である。502〜505はページ境界
506をまたぐそれぞれ2ワード、3ワード、4ワード
、5ワードのアクセス領域のバタンである。
In FIG. 5, 501 is a memory address;
06 is a page boundary. Reference numerals 502 to 505 indicate access area buttons of 2 words, 3 words, 4 words, and 5 words, respectively, which straddle the page boundary 506.

また、上記実施例では警告信号131をMMU122へ
送る場合を考えたが、第6図に示したように警告信号〕
31.をCPUl0Iのマイクロプログラム制御部分6
22によって検出することもできる。
In addition, in the above embodiment, the case where the warning signal 131 is sent to the MMU 122 was considered, but as shown in FIG.
31. Microprogram control part 6 of CPU10I
It can also be detected by 22.

マイクロプログラムによって警告が検出された場合、マ
イクロプログラムはサブルーチンへジャンプし、そこで
次ページのアドレスに対するダミーアクセスを実行する
。ダミーアクセスの実現法には以下のものが考えられる
If a warning is detected by the microprogram, it jumps to a subroutine where it performs a dummy access to the address of the next page. The following methods can be considered to implement dummy access.

■ リードアクセス ■ 書き込み信号をネゲートしたライトアクセス ■ アドレス変換のみを行なう さらに、上記実施例では、メモリへの書き込みによる誤
す」作を防ぐものであったが、cPUlo1内部のレジ
スタを変化させた後で発生するページ7、tルトにも対
処できる。
■ Read access ■ Write access by negating the write signal ■ Performs only address conversion Furthermore, although the above embodiment prevents erroneous operations caused by writing to memory, after changing the register inside cPUlo1, It can also deal with page 7 and torque that occur in .

すなわち、警告信号の発生を、メモリアクセス要求を待
たずに行なわせることにより、命令の先頭、あるいはC
PUl0I内のレジスタが命令の実行によって変化する
以前に行なわせ、ページフォルトのチェックをしてしま
う方式である。
In other words, by generating a warning signal without waiting for a memory access request, it is possible to
This is a method in which page faults are checked before the registers in PUl0I are changed by the execution of an instruction.

この方式により、スタックポインタのようなメモリアク
セスとともに変化するレジスタを持つ計算機においても
ページフォルト処理後命令の先頭再開が可能となる。
With this method, even in a computer that has a register that changes with memory access, such as a stack pointer, it is possible to restart the instruction at the beginning after processing a page fault.

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

本発明によれば、ページフォルト処理終了後に命令を先
頭から再開できるのでページフォルト処理のためのマイ
クロプログラムの負担を軽減できる。
According to the present invention, since the instruction can be restarted from the beginning after page fault processing is completed, the burden on the microprogram for page fault processing can be reduced.

また、好ましくは、アラーム信号が発生した時で、しか
も指定されたワード数のライトアクセスの時にのみダミ
ーアクセス処理を行なうので、平均するとサイクル数を
ほとんど増加させずに命令の先頭再開を可能とすること
ができる。
Preferably, dummy access processing is performed only when an alarm signal occurs and when write access is performed for a specified number of words, so that it is possible to restart the beginning of an instruction with almost no increase in the number of cycles on average. be able to.

さらに好ましくは、ダミーアクセスの発行はメモリアク
セス制御装置が自動的に行なうようにすると、マイクロ
プログラムでアラーム信号のチェック等を行なう必要が
なく、マイクロプログラムのステップ数の増加やマイグ
ロブログラム自体の複雑化を避けることができる。
More preferably, if the memory access control device automatically issues the dummy access, there is no need for the microprogram to check alarm signals, etc., and this eliminates the need for an increase in the number of steps in the microprogram and the complexity of the microprogram itself. can be avoided.

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

第1図は本発明の一実施例のシステム構成図。 第2図はページフォル1−によって引きおこされるトラ
ブルの例を示す図、第3図はペーフオルトアラームの発
生機構を示す図、第4図はページフォルトアラームの発
生論理の例を示す図、第5図はページ境界をまたぐアク
セスの例を示す図、第6図はアラーム信号をマイクロプ
ログラムで検出する場合を示す図である。 (α) ; (Cノ ー=二匹=コ ; 高3図 高4図 (α) (b) (υ (1ddreSS So+ ≦
FIG. 1 is a system configuration diagram of an embodiment of the present invention. FIG. 2 is a diagram showing an example of a trouble caused by page fault 1-, FIG. 3 is a diagram showing a mechanism for generating a page fault alarm, and FIG. 4 is a diagram showing an example of the generation logic of a page fault alarm. FIG. 5 is a diagram showing an example of access across page boundaries, and FIG. 6 is a diagram showing a case where an alarm signal is detected by a microprogram. (α); (C no = 2 animals = ko; 3rd year high school 4th year high school student (α) (b) (υ (1ddreSS So+ ≦

Claims (1)

【特許請求の範囲】 1、命令実行時に使用するメモリの論理アドレスを格納
する少なくともひとつの論理アドレスレジスタと当該レ
ジスタの内容でメモリアクセスを行なうことを要求する
信号発生手段を有し、かつ、その結果として前記論理ア
ドレスに対応するデータを受け取る命令実行部分と 上記論理アドレスを物理アドレスに変換するアドレス変
換機構と当該アドレス変換機構により生成される物理ア
ドレスを格納する物理アドレスレジスタとを有し、前記
メモリアクセス要求信号と論理アドレスレジスタの内容
を受け、上記アドレス変換機構により物理アドレスレジ
スタにセットし、当該物理アドレスに従つてメモリアク
セスを行なうことを要求する信号発生手段を有するメモ
リ管理部分と 上記物理アドレスおよび物理アドレスに対応するメモリ
アクセス要求信号を受け、対応するデータを送出する記
憶部分と を有し、仮想記憶管理を行なう計算機システムにおいて 論理アドレスレジスタの内容とAと次のページ境界アド
レスBAとを比較し、ある定められた自然数Nに対して BA−N≦−LA<BA なる条件が成立することを検出する手段を設けたことを
特徴とする仮想記憶制御装置。 2、特許請求の範囲第1項において、上記条件の成立信
号をメモリ管理部が受け、命令実行部とは独立に次のペ
ージ境界アドレスBAがアドレス変換可能か否かを検出
する手段を設けることを特徴とした仮想記憶制御装置。 3、特許請求の範囲第1項において、上記条件の成立信
号を命令実行部が受け、命令実行部の制御のもとに次の
ページ境界アドレスBAがアドレス変換可能か否かを検
出する手段を設けることを特徴とした仮想記憶制御装置
。 4、特許請求の範囲第1項において、上記条件の成立信
号の生成部分を命令実行部分の中に持ち、マイクロプロ
グラムによつて実現することを特徴とした仮想記憶制御
装置。
[Scope of Claims] 1. At least one logical address register for storing a logical address of memory used when executing an instruction, and a signal generating means for requesting memory access based on the contents of the register; an instruction execution part that receives data corresponding to the logical address as a result, an address translation mechanism that converts the logical address into a physical address, and a physical address register that stores the physical address generated by the address translation mechanism; a memory management part having a signal generating means for receiving a memory access request signal and the contents of the logical address register, setting it in the physical address register by the address translation mechanism, and requesting that memory access be performed according to the physical address; In a computer system that manages virtual memory and has a storage part that receives a memory access request signal corresponding to an address and a physical address and sends out the corresponding data, the contents of the logical address register, A, and the next page boundary address BA are used. 1. A virtual storage control device characterized by comprising means for comparing the values and detecting that the condition BA-N≦-LA<BA holds true for a certain predetermined natural number N. 2. In claim 1, the memory management unit receives a signal that the above condition is established, and is provided with means for detecting whether or not the next page boundary address BA is address convertible, independently of the instruction execution unit. A virtual memory control device featuring: 3. In claim 1, the instruction execution unit receives a signal that the above condition is established, and under the control of the instruction execution unit, means for detecting whether or not the next page boundary address BA is address convertible. A virtual storage control device comprising: 4. A virtual storage control device according to claim 1, characterized in that a part for generating a signal that the above-mentioned condition is met is included in an instruction execution part, and is realized by a microprogram.
JP62028258A 1987-02-12 1987-02-12 Virtual memory controller Pending JPS63197254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62028258A JPS63197254A (en) 1987-02-12 1987-02-12 Virtual memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62028258A JPS63197254A (en) 1987-02-12 1987-02-12 Virtual memory controller

Publications (1)

Publication Number Publication Date
JPS63197254A true JPS63197254A (en) 1988-08-16

Family

ID=12243542

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62028258A Pending JPS63197254A (en) 1987-02-12 1987-02-12 Virtual memory controller

Country Status (1)

Country Link
JP (1) JPS63197254A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9569127B2 (en) 2014-12-29 2017-02-14 International Business Machines Corporation Computer instructions for limiting access violation reporting when accessing strings and similar data structures
US9703721B2 (en) 2014-12-29 2017-07-11 International Business Machines Corporation Processing page fault exceptions in supervisory software when accessing strings and similar data structures using normal load instructions

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6073759A (en) * 1983-09-30 1985-04-25 Toshiba Corp Address conversion buffer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6073759A (en) * 1983-09-30 1985-04-25 Toshiba Corp Address conversion buffer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9569127B2 (en) 2014-12-29 2017-02-14 International Business Machines Corporation Computer instructions for limiting access violation reporting when accessing strings and similar data structures
US9703721B2 (en) 2014-12-29 2017-07-11 International Business Machines Corporation Processing page fault exceptions in supervisory software when accessing strings and similar data structures using normal load instructions

Similar Documents

Publication Publication Date Title
US4459661A (en) Channel address control system for a virtual machine system
US5187792A (en) Method and apparatus for selectively reclaiming a portion of RAM in a personal computer system
US4414627A (en) Main memory control system
JPH0425579B2 (en)
JPS6376034A (en) Multiple address space control system
JPS61114353A (en) Access collation structural body for digital data processingsystem having demand time paging memory
JPH0312339B2 (en)
US5293622A (en) Computer system with input/output cache
JPH0192856A (en) Apparatus and method for protecting main memory unit using access and defect logic signal
CN111742303A (en) Apparatus and method for accessing metadata when debugging a device
JPS63197254A (en) Virtual memory controller
JPH0567973B2 (en)
JP3061818B2 (en) Access monitor device for microprocessor
JP2845746B2 (en) Micro program controller
JPH05250263A (en) Virtual processor system and nonvolatile storage system
JPH0816478A (en) Vector data processor
JP2964504B2 (en) Document processing device
JPH02293947A (en) Virtual storage dualizing system
JPS60123944A (en) Buffer memory controlling system of information processor
JPS5972545A (en) Microprogram control system
JPH0324640A (en) Debugging system for information processor
JPS62242239A (en) Data transfer system
US20170123693A1 (en) Relocatable and Resizable Tables in a Computing Device
JPS5842546B2 (en) Store control method
JPS5918797B2 (en) Address check processing method