JPH0934788A - Device and method for translating address - Google Patents

Device and method for translating address

Info

Publication number
JPH0934788A
JPH0934788A JP7184045A JP18404595A JPH0934788A JP H0934788 A JPH0934788 A JP H0934788A JP 7184045 A JP7184045 A JP 7184045A JP 18404595 A JP18404595 A JP 18404595A JP H0934788 A JPH0934788 A JP H0934788A
Authority
JP
Japan
Prior art keywords
address
physical
logical
reverse
entry
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.)
Withdrawn
Application number
JP7184045A
Other languages
Japanese (ja)
Inventor
Hiroshi Yamaguchi
弘 山口
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.)
Fuji Electric Co Ltd
Fuji Facom Corp
Original Assignee
Fuji Electric Co Ltd
Fuji Facom 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 Fuji Electric Co Ltd, Fuji Facom Corp filed Critical Fuji Electric Co Ltd
Priority to JP7184045A priority Critical patent/JPH0934788A/en
Publication of JPH0934788A publication Critical patent/JPH0934788A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily translate a physical address to a logical address. SOLUTION: An address translator 2 is provided with an inverse address translation table 5a for translating the physical address to the logical address and by referring to the inverse address translation table 5a of the address translator 2, the physical address in a physical address space 4 is translated to the logical address in a logical address space 6.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、アドレス変換装置及び
アドレス変換方法に関し、特に、仮想記憶方式における
物理アドレスを論理アドレスに変換するアドレス変換装
置及びアドレス変換方法に適用して好適なものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an address conversion device and an address conversion method, and is particularly suitable for application to an address conversion device and an address conversion method for converting a physical address into a logical address in a virtual memory system. .

【0002】[0002]

【従来の技術】従来のアドレス変換装置において、主記
憶装置の物理アドレス空間を実際より多くあるように見
せかけ、主記憶装置の物理アドレス空間を効率的に使用
する仮想記憶方式を採用することが一般的に行われてい
る。すなわち、プログラムが記憶される領域として、主
記憶装置の物理アドレス空間の他にジョブを実行するた
めに仮想的に設けられた論理アドレス空間を備えてい
る。主記憶装置の物理アドレス空間は実アドレス空間と
も言われ、ジョブを実行するために仮想的に設けられた
論理アドレス空間は仮想アドレス空間とも言われる。そ
して、論理アドレス空間と物理アドレス空間とを関連づ
けるために、仮想記憶というメモリ管理方式があり、仮
想記憶方式には、単一仮想記憶方式と多重仮想記憶方式
とがある。
2. Description of the Related Art In a conventional address translation device, it is common to employ a virtual memory system in which the physical address space of a main memory device appears to be larger than it actually is and the physical address space of the main memory device is used efficiently. Is done in a regular manner. That is, as a region for storing a program, in addition to the physical address space of the main storage device, a logical address space virtually provided for executing a job is provided. The physical address space of the main storage device is also called a real address space, and the logical address space virtually provided for executing a job is also called a virtual address space. Then, there is a memory management system called virtual memory in order to associate the logical address space and the physical address space, and the virtual memory system includes a single virtual memory system and a multiple virtual memory system.

【0003】単一仮想記憶方式は、図16に示すよう
に、仮想的な記憶装置上に存在し、論理アドレスが割り
振られた論理アドレス空間14、アドレス変換テーブル
15、及び主記憶装置上に存在し、物理アドレスが割り
振られた物理アドレス空間16を備えている。そして、
1つの論理アドレス空間14には、複数のプログラム1
〜nが記憶されており、各プログラム1〜nの先頭アド
レスは異なっている。
As shown in FIG. 16, the single virtual memory system exists in a virtual memory device, and exists in a logical address space 14 to which logical addresses are allocated, an address conversion table 15, and a main memory device. However, the physical address space 16 to which physical addresses are allocated is provided. And
A plurality of programs 1 are stored in one logical address space 14.
To n are stored, and the start addresses of the programs 1 to n are different.

【0004】一方、多重仮想記憶方式は、図17に示す
ように、仮想的な記憶装置上に存在し、論理アドレスが
割り振られた複数の論理アドレス空間17、各論理アド
レス空間17に対応して設けられた複数のアドレス変換
テーブル18、及び主記憶装置上に存在し、物理アドレ
スが割り振られた物理アドレス空間19を備えている。
そして、1つの論理アドレス空間17には、1つのプロ
グラム1〜nが記憶されており、各プログラム1〜nの
先頭アドレスは同一となっている。すなわち、各論理ア
ドレス空間17は独立し、他の論理アドレス空間17か
ら見えないようになっているので、各プログラム1〜n
は各論理アドレス空間17により保護され、各仮想アド
レス空間17には同一のアドレスが割り振られるように
なっている。
On the other hand, the multiple virtual storage system, as shown in FIG. 17, corresponds to a plurality of logical address spaces 17 existing on a virtual storage device and assigned logical addresses, and each logical address space 17. It is provided with a plurality of provided address conversion tables 18 and a physical address space 19 existing in the main memory and having physical addresses allocated thereto.
Further, one program 1 to n is stored in one logical address space 17, and the start addresses of the programs 1 to n are the same. That is, since each logical address space 17 is independent and invisible from the other logical address spaces 17, each program 1 to n is
Are protected by each logical address space 17, and the same address is assigned to each virtual address space 17.

【0005】図16、図17の論理アドレス空間14、
17と物理アドレス空間16、19とは、図18に示す
ように、ページと呼ばれる固定長の領域に分割されてい
る。そして、一般的な計算機システムでは、1ページの
サイズは、4KB(キロ・バイト)であり、論理アドレ
ス空間の各論理ページ0〜nには先頭の論理ページ0か
ら順に論理ページ番号0〜nが付され、物理アドレス空
間内の各物理ページ0〜nには先頭の物理ページ0から
順に物理ページ番号0〜nが付されている。
The logical address space 14 of FIG. 16 and FIG.
17, the physical address spaces 16 and 19 are divided into fixed-length areas called pages, as shown in FIG. In a general computer system, the size of one page is 4 KB (kilobytes), and each logical page 0 to n in the logical address space has logical page numbers 0 to n in order from the first logical page 0. The physical pages 0 to n in the physical address space are assigned physical page numbers 0 to n in order from the first physical page 0.

【0006】また、図16、図17のアドレス変換テー
ブル15、18は、論理アドレスを物理アドレスに変換
するものであり、各論理ページ毎に1つのエントリを持
つ。1つのエントリは、図19に示すように、論理ペー
ジ番号に対応する物理ページ番号と、エントリに格納さ
れた物理ページ番号が有効であるかどうかを示すフラグ
などの制御情報からなる。
The address conversion tables 15 and 18 shown in FIGS. 16 and 17 are for converting a logical address into a physical address, and each logical page has one entry. As shown in FIG. 19, one entry includes a physical page number corresponding to a logical page number and control information such as a flag indicating whether the physical page number stored in the entry is valid.

【0007】次に、従来のアドレス変換装置の動作につ
いて説明する。まず、図20のステップS71に示すよ
うに、計算機システムのCPUによりプログラムが実行
されてページアクセス処理が行われる場合、図16、図
17の論理アドレス空間14、17の論理アドレスが参
照される。論理アドレスの内容は、図21に示すよう
に、論理ページ番号と1ページのサイズに満たない部分
のオフセットからなる。
Next, the operation of the conventional address translation device will be described. First, as shown in step S71 of FIG. 20, when a program is executed by the CPU of the computer system to perform page access processing, the logical addresses of the logical address spaces 14 and 17 of FIGS. 16 and 17 are referred to. As shown in FIG. 21, the content of the logical address is composed of a logical page number and an offset of a portion less than the size of one page.

【0008】次に、ステップS72に示すように、論理
アドレスの内容から論理ページ番号を獲得する。次に、
ステップS73に示すように、図16、図17のアドレ
ス変換テーブル15、18を参照することにより、論理
ページ番号に対応するエントリを獲得する。
Next, as shown in step S72, a logical page number is acquired from the contents of the logical address. next,
As shown in step S73, the entry corresponding to the logical page number is acquired by referring to the address conversion tables 15 and 18 of FIGS.

【0009】次に、ステップS74において、エントリ
の制御情報に含まれる有効ビットが“1”である場合、
ステップS76に進み、図21に示すように、獲得した
アドレス変換テーブル15、18のエントリの物理ペー
ジ番号を参照することにより、図16、図17の物理ア
ドレス空間16、19の物理ページ番号を得る。このア
ドレス変換テーブル15、18の物理ページ番号と、論
理アドレスのオフセットにより、物理アドレスを得るこ
とができ、物理アドレス空間上に記憶された実際のプロ
グラムの内容にアクセスできる。
Next, in step S74, when the valid bit included in the control information of the entry is "1",
In step S76, the physical page numbers of the physical address spaces 16 and 19 of FIGS. 16 and 17 are obtained by referring to the physical page numbers of the acquired entries of the address conversion tables 15 and 18, as shown in FIG. . A physical address can be obtained from the physical page numbers of the address conversion tables 15 and 18 and the offset of the logical address, and the contents of the actual program stored in the physical address space can be accessed.

【0010】一方、ステップS74において、エントリ
の制御情報に含まれる有効ビットが“0”である場合、
すなわち、プログラムが論理アドレスを参照し、論理ペ
ージ番号から物理ページ番号を獲得する過程で物理ペー
ジ番号が存在しない場合、ステップS75に進み、CP
Uがオペレーティングシステムに対してページフォルト
割り込みを上げるページフォルト処理が行われる。
On the other hand, when the valid bit contained in the control information of the entry is "0" in step S74,
That is, when the program refers to the logical address and the physical page number does not exist in the process of acquiring the physical page number from the logical page number, the process proceeds to step S75 and CP
Page fault handling occurs where U raises a page fault interrupt to the operating system.

【0011】このページフォルト処理では、まず、ステ
ップS81に示すように、ページフォルトを起こした論
理アドレスの内容から論理ページ番号を獲得する。次
に、ステップS82に示すように、図16、17のアド
レス変換テーブル15、18を参照することにより、論
理ページ番号に対応するエントリを獲得する。
In this page fault processing, first, as shown in step S81, a logical page number is acquired from the contents of the logical address that caused the page fault. Next, as shown in step S82, the entry corresponding to the logical page number is acquired by referring to the address conversion tables 15 and 18 of FIGS.

【0012】次に、ステップS83に示すように、物理
アドレス空間16、19の空きの物理ページを獲得す
る。次に、ステップS84に示すように、ページフォル
トの原因となった論理ページ番号に対応するアドレス変
換テーブル15、18のエントリに、ステップS83で
獲得した物理ページの物理ページ番号を設定する。
Next, as shown in step S83, free physical pages in the physical address spaces 16 and 19 are acquired. Next, as shown in step S84, the physical page number of the physical page acquired in step S83 is set in the entry of the address translation tables 15 and 18 corresponding to the logical page number that caused the page fault.

【0013】次に、ステップS85に示すように、物理
ページ番号を設定したエントリの制御情報に含まれる有
効ビットを“1”にする。以上により、ページフォルト
を起こした論理ページに物理ページが割り当てられる。
このように、従来のアドレス変換装置では、プログラム
が論理アドレスを参照すると、CPUとオペレーティン
グシステムが、物理アドレスを自動的に算出する。
Next, as shown in step S85, the valid bit contained in the control information of the entry in which the physical page number is set is set to "1". As described above, the physical page is assigned to the logical page that caused the page fault.
As described above, in the conventional address translation device, when the program refers to the logical address, the CPU and the operating system automatically calculate the physical address.

【0014】[0014]

【発明が解決しようとする課題】しかしながら、従来の
アドレス変換装置では、例えば、オペレーティングシス
テムがハードディスクなどの入出力装置とデータの入出
力を行う過程で、物理アドレスを論理アドレスに容易に
変換することができなかった。
However, in the conventional address translator, for example, a physical address can be easily translated into a logical address while the operating system inputs / outputs data from / to an input / output device such as a hard disk. I couldn't.

【0015】すなわち、オペレーティングシステムを呼
び出して、プログラムの用意したバッファにデータを格
納するように入出力装置に要求を出す。この場合、オペ
レーティングシステムは、入出力装置がデータのやり取
りを行えるようにするために、プログラムの用意したバ
ッファの論理アドレスを入出力装置が理解することがで
きる物理アドレスに変換する。そして、物理アドレスに
よる入出力要求が入出力装置に行われる。その後、入出
力装置が動作を終えると、動作の終了を通知するため
に、入出力完了割り込みをオペレーティングシステムに
上げる。そして、入出力装置から割り込みが上がると、
オペレーティングシステムは、入出力装置の状態をチェ
ックし、正常に入出力が完了したかどうかを検査する。
ここで、異常終了した場合、エラーを起こしたことをプ
ログラムに伝えるとともに、エラーのトレースやロギン
グなどを行って、プログラムのデバッグに有効な情報を
利用者に伝える。
That is, the operating system is called to issue a request to the input / output device to store the data in the buffer prepared by the program. In this case, the operating system converts the logical address of the buffer prepared by the program into a physical address that can be understood by the input / output device so that the input / output device can exchange data. Then, an input / output request is made to the input / output device by the physical address. After that, when the I / O device finishes its operation, an I / O completion interrupt is sent to the operating system to notify the end of the operation. Then, when the interrupt from the input / output device rises,
The operating system checks the status of the I / O device to see if the I / O completed successfully.
Here, in the case of abnormal termination, the program is notified that an error has occurred, and error tracing and logging are performed to inform the user of information effective for debugging the program.

【0016】しかしながら、プログラムが理解できるよ
うに、エラーが発生したバッファの論理アドレスをトレ
ースやロギングなどの情報の中に付加する場合、オペレ
ーティングシステムの入出力完了割り込み処理の情報や
入出力装置の情報からでは、バッファの物理アドレスを
得ることはできても、論理アドレスを容易に得ることは
できない。すなわち、従来のアドレス変換装置では、物
理アドレスを論理アドレスに変換するためには、オペレ
ーティングシステムが管理している多くの資源を辿る必
要があるという問題があった。
However, so that the program can understand, when the logical address of the buffer in which the error has occurred is added to the information such as trace and logging, the information of the I / O completion interrupt processing of the operating system and the information of the I / O device are added. Therefore, although the physical address of the buffer can be obtained, the logical address cannot be easily obtained. That is, the conventional address translation device has a problem that it is necessary to trace many resources managed by the operating system in order to translate a physical address into a logical address.

【0017】そこで、本発明の目的は、物理アドレスを
論理アドレスに容易に変換することができるアドレス変
換装置及びアドレス変換方法を提供することである。
Therefore, an object of the present invention is to provide an address translation device and an address translation method that can easily translate a physical address into a logical address.

【0018】[0018]

【課題を解決するための手段】上述した課題を解決する
ために、請求項1の発明によれば、物理アドレスを論理
アドレスに変換する逆アドレス変換テーブルを備える。
In order to solve the above problems, according to the invention of claim 1, there is provided a reverse address conversion table for converting a physical address into a logical address.

【0019】また、請求項2の発明によれば、物理アド
レスに対応する論理アドレスの論理ページ番号を、逆ア
ドレス変換テーブルの各エントリに格納する。また、請
求項3の発明によれば、物理アドレスに対応する論理ア
ドレスの論理ページ番号と論理アドレスを利用している
プログラムの識別子とを、逆アドレス変換テーブルの各
エントリに格納する。
According to the second aspect of the invention, the logical page number of the logical address corresponding to the physical address is stored in each entry of the reverse address translation table. According to the invention of claim 3, the logical page number of the logical address corresponding to the physical address and the identifier of the program using the logical address are stored in each entry of the reverse address translation table.

【0020】また、請求項4の発明によれば、エントリ
は、格納された論理ページ番号が有効であるかどうかを
示すフラグ情報を有する。また、請求項5の発明によれ
ば、複数の段階に分割した物理アドレス空間の各物理ペ
ージに対応して逆アドレス変換テーブルのエントリを備
える。
According to the invention of claim 4, the entry has flag information indicating whether or not the stored logical page number is valid. Further, according to the invention of claim 5, an entry of the reverse address translation table is provided corresponding to each physical page of the physical address space divided into a plurality of stages.

【0021】また、請求項6の発明によれば、物理アド
レスを論理アドレスに変換する逆アドレス変換テーブル
を参照することにより、物理アドレスを論理アドレスに
変換する。
Further, according to the invention of claim 6, the physical address is converted into the logical address by referring to the reverse address conversion table for converting the physical address into the logical address.

【0022】また、請求項7の発明によれば、物理アド
レス空間を複数の段階に分割し、前記物理アドレス空間
の各物理ページに対応して各段階毎に備えられたエント
リを参照することにより、物理アドレスを論理アドレス
に変換する。
Further, according to the invention of claim 7, the physical address space is divided into a plurality of stages, and the entry provided for each stage corresponding to each physical page of the physical address space is referred to. , Converts physical address to logical address.

【0023】[0023]

【作用】請求項1の発明によれば、物理アドレスを論理
アドレスに変換する逆アドレス変換テーブルを備えるこ
とにより、物理アドレスから論理アドレスの変換を容易
に行うことができる。
According to the invention of claim 1, by providing the reverse address conversion table for converting the physical address into the logical address, the conversion from the physical address to the logical address can be easily performed.

【0024】また、請求項2の発明によれば、物理アド
レスに対応する論理アドレスの論理ページ番号を、逆ア
ドレス変換テーブルの各エントリに格納することによ
り、逆アドレス変換テーブルの1度の検索で論理ページ
番号を得ることができ、物理アドレスから論理アドレス
の変換を容易に行うことができる。
According to the second aspect of the invention, the logical page number of the logical address corresponding to the physical address is stored in each entry of the reverse address translation table, so that the reverse address translation table can be searched once. The logical page number can be obtained, and the physical address can be easily converted to the logical address.

【0025】また、請求項3の発明によれば、物理アド
レスに対応する論理アドレスの論理ページ番号と論理ア
ドレスを利用しているプログラムの識別子とを、逆アド
レス変換テーブルの各エントリに格納するようにしたの
で、各プログラムに同じ論理アドレスを割り当てた場合
においても、プログラムの識別子を参照することによ
り、特定のプログラムに容易にアクセスできる。
According to the third aspect of the invention, the logical page number of the logical address corresponding to the physical address and the identifier of the program using the logical address are stored in each entry of the reverse address translation table. Therefore, even when the same logical address is assigned to each program, a specific program can be easily accessed by referring to the program identifier.

【0026】また、請求項4の発明によれば、格納され
た論理ページ番号が有効であるかどうかを示すフラグ情
報を有するようにしたので、フラグ情報を参照すること
により、無効な論理ページ番号から論理アドレスを算出
する処理を行うことを省略できる。
Further, according to the invention of claim 4, since the stored logical page number has flag information indicating whether or not the logical page number is valid, by referring to the flag information, the invalid logical page number can be obtained. It is possible to omit the process of calculating the logical address from

【0027】また、請求項5の発明によれば、複数の段
階に分割した物理アドレス空間の各物理ページに対応し
て逆アドレス変換テーブルのエントリを備えることによ
り、不連続の物理アドレス空間に対応させて逆アドレス
変換テーブルを連続した領域に設けることができ、逆ア
ドレス変換テーブルを記憶するために必要な領域を少な
くすることができる。
According to the fifth aspect of the invention, by providing an entry of the reverse address translation table corresponding to each physical page of the physical address space divided into a plurality of stages, it is possible to correspond to the discontinuous physical address space. Thus, the reverse address conversion table can be provided in a continuous area, and the area required for storing the reverse address conversion table can be reduced.

【0028】また、請求項6の発明によれば、物理アド
レスを論理アドレスに変換する逆アドレス変換テーブル
を参照することにより、物理アドレスから論理アドレス
への変換を容易に行うことができる。
Further, according to the invention of claim 6, the physical address can be easily converted to the logical address by referring to the reverse address conversion table for converting the physical address to the logical address.

【0029】また、請求項7の発明によれば、物理アド
レス空間を複数の段階に分割し、前記物理アドレス空間
の各物理ページに対応して各段階毎に備えられたエント
リを参照することにより、物理アドレスを論理アドレス
に変換するようにしたので、不連続の物理アドレス空間
に対応させて逆アドレス変換テーブルを連続した領域に
設けることができ、逆アドレス変換テーブルを記憶する
ために必要な領域を少なくすることができる。
According to the invention of claim 7, the physical address space is divided into a plurality of stages, and the entry provided for each stage corresponding to each physical page of the physical address space is referred to. , Since the physical address is converted to the logical address, the reverse address conversion table can be provided in the continuous area corresponding to the discontinuous physical address space, and the area necessary for storing the reverse address conversion table. Can be reduced.

【0030】[0030]

【実施例】以下、本発明の第1実施例によるアドレス変
換装置を図面を参照しながら説明する。図1は、本発明
の第1実施例によるアドレス変換装置の概略構成を示す
ブロック図である。 図1において、物理アドレスが割
り振られた物理アドレス空間4を備える主記憶装置1
と、論理アドレスが割り振られた論理アドレス空間6を
備える処理装置3とは、逆アドレス変換テーブル5a及
びアドレス変換テーブル5bを備えるアドレス変換装置
2を介して接続されている。そして、物理アドレス空間
4は物理ページ0〜nに分割され、論理アドレス空間6
は、論理ページ0〜mに分割されている。この1ページ
のサイズは、例えば、4KB(キロ・バイト)に設定さ
れる。アドレス変換テーブル5bは、論理アドレスを物
理アドレスに変換するものであり、各論理ページ0〜m
毎に1つのエントリ0〜mを持っている。また、逆アド
レス変換テーブル5aは、物理アドレスを論理アドレス
に変換するものであり、各物理ページ0〜n毎に1つの
エントリ0〜nを持っている。そして、主記憶装置1の
物理ページ0〜nを示す物理ページ番号0〜nとアドレ
ス変換装置2のエントリ0〜nを示すインデックス0〜
nとはそれぞれ等しくなっている。1つのエントリ0〜
nは、図2に示すように、物理ページ0〜nに対応する
論理ページ番号0〜mと、エントリに格納された論理ペ
ージ番号が有効であるかどうかを示すフラグである有効
ビットからなる。この論理ページ番号0〜mは、逆アド
レス変換テーブル5aのインデックス0〜nに対応して
物理ページ0〜nを割り当てた場合の論理アドレスのペ
ージ番号0〜mを示している。なお、逆アドレス変換テ
ーブル5aは、論理アドレス空間6を備える処理装置3
により定められる論理アドレスが連続する場所に確保さ
れる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An address translator according to a first embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of an address translation device according to a first embodiment of the present invention. In FIG. 1, a main storage device 1 having a physical address space 4 to which physical addresses are allocated
And the processing device 3 having the logical address space 6 to which logical addresses are allocated are connected via the address translation device 2 having the reverse address translation table 5a and the address translation table 5b. The physical address space 4 is divided into physical pages 0 to n, and the logical address space 6 is divided.
Are divided into logical pages 0 to m. The size of this one page is set to 4 KB (kilobytes), for example. The address conversion table 5b is for converting a logical address into a physical address, and each logical page 0 to m.
Each has one entry 0-m. The reverse address conversion table 5a is for converting a physical address into a logical address, and has one entry 0 to n for each physical page 0 to n. Then, physical page numbers 0 to n indicating physical pages 0 to n of the main storage device 1 and indexes 0 to 0 indicating entries 0 to n of the address translation device 2
It is equal to n. One entry 0
As shown in FIG. 2, n is composed of logical page numbers 0 to m corresponding to physical pages 0 to n and a valid bit which is a flag indicating whether the logical page number stored in the entry is valid. The logical page numbers 0 to m indicate the page numbers 0 to m of the logical addresses when the physical pages 0 to n are allocated corresponding to the indexes 0 to n of the reverse address conversion table 5a. The reverse address translation table 5a is provided in the processing device 3 including the logical address space 6.
The logical addresses defined by are secured in consecutive locations.

【0031】以上の構成において、例えば、オペレーテ
ィングシステムの入出力割り込み処理ルーチンでエラー
が発生し、このエラーのデバッグ処理を行うため、エラ
ーを起こした物理アドレスを論理アドレスに変換する場
合、図4に示すように、図3の物理アドレス空間4の物
理アドレスが参照される。この物理アドレスの内容は、
物理ページ番号0〜nとオフセットからなる。そして、
図3に示すように、物理ページ番号0〜nに対応する逆
アドレス変換テーブル5aのインデックス0〜nを参照
することにより、論理アドレス空間6の論理ページ0〜
mに対応する論理ページ番号0〜mを得ることができ
る。その後、図4に示すように、この論理ページ番号0
〜mと物理アドレスのオフセットにより、論理アドレス
を容易に求めることができる。例えば、オペレーティン
グシステムが物理アドレスの00002345H番地を
獲得した場合、図3の逆アドレス変換テーブル5aを参
照することにより、論理アドレスは00005345H
であると容易にわかる。
In the above configuration, for example, when an error occurs in the input / output interrupt processing routine of the operating system, and the error-causing physical address is converted into a logical address in order to debug this error, FIG. As shown, the physical address of the physical address space 4 of FIG. 3 is referred to. The content of this physical address is
It consists of physical page numbers 0 to n and an offset. And
As shown in FIG. 3, by referring to indexes 0 to n of the reverse address translation table 5a corresponding to physical page numbers 0 to n, logical pages 0 to 0 of the logical address space 6 are referred to.
Logical page numbers 0 to m corresponding to m can be obtained. Then, as shown in FIG. 4, this logical page number 0
The logical address can be easily obtained from the offset of ~ m and the physical address. For example, when the operating system has acquired the physical address 000025345H, the logical address is 00005345H by referring to the reverse address conversion table 5a in FIG.
Is easily understood.

【0032】なお、逆アドレス変換テーブル5aに必要
なエントリ数は、例えば、図1の主記憶装置1が16M
B(メガ・バイト)の記憶容量を持つ計算機システムで
ある場合、図5に示すように、4096の数のエントリ
が必要である。例えば、エントリのインデックスが0か
ら始まる場合、インデックスは0から4095までとな
り、図5の物理アドレス空間7の物理アドレスが100
00H番地のインデックスは、16となる。すなわち、
物理ページ番号とエントリのインデックスとは等しくな
る。
The number of entries required for the reverse address translation table 5a is, for example, 16M for the main memory 1 of FIG.
For a computer system having a storage capacity of B (megabytes), as shown in FIG. 5, 4096 entries are required. For example, when the index of the entry starts from 0, the index is from 0 to 4095, and the physical address of the physical address space 7 of FIG.
The index at address 00H is 16. That is,
The physical page number and the entry index are equal.

【0033】次に、本発明の第1実施例によるアドレス
変換装置の動作について説明する。ここで、物理アドレ
スから論理アドレスへのアドレス変換に先だって、図1
の逆アドレス変換テーブル5aに情報を設定するページ
フォルト処理が行われる。すなわち、ページフォルト割
り込みが発生して、オペレーティングシステムが、論理
ページに空き物理ページを割り当ててアドレス変換テー
ブル5bを作成する時に、その割り当てられた物理ペー
ジに対応する図1の逆アドレス変換テーブル5aを作成
する。
Next, the operation of the address translator according to the first embodiment of the present invention will be described. Here, prior to the address conversion from the physical address to the logical address, FIG.
A page fault process for setting information in the reverse address translation table 5a is performed. That is, when a page fault interrupt occurs and the operating system allocates a free physical page to a logical page to create the address conversion table 5b, the reverse address conversion table 5a of FIG. 1 corresponding to the allocated physical page is displayed. create.

【0034】このページフォルト処理では、まず、図6
のステップS1に示すように、ページフォルトを起こし
た図1の処理装置3の論理アドレスの内容から論理ペー
ジ番号を獲得する。
In this page fault processing, first, as shown in FIG.
As shown in step S1 of FIG. 1, a logical page number is acquired from the contents of the logical address of the processing device 3 in FIG.

【0035】次に、ステップS2に示すように、アドレ
ス変換テーブル5bを参照することにより、論理ページ
番号に対応するエントリを獲得する。次に、ステップS
3に示すように、主記憶装置1の物理アドレス空間4の
空きの物理ページを獲得する。
Next, as shown in step S2, the entry corresponding to the logical page number is acquired by referring to the address conversion table 5b. Next, step S
As shown in FIG. 3, an empty physical page in the physical address space 4 of the main memory 1 is acquired.

【0036】次に、ステップS4に示すように、ページ
フォルトの原因となった論理ページ番号に対応するアド
レス変換テーブル5bのエントリに、ステップS3で獲
得した物理ページの物理ページ番号を設定する。
Next, as shown in step S4, the physical page number of the physical page acquired in step S3 is set in the entry of the address translation table 5b corresponding to the logical page number that caused the page fault.

【0037】次に、ステップS5に示すように、物理ペ
ージ番号を設定したアドレス変換テーブル5bのエント
リの制御情報に含まれる有効ビットを“1”にする。次
に、ステップS6に示すように、獲得した空き物理ペー
ジの物理ページ番号と同じインデックスを有する逆アド
レス変換テーブル5aのエントリを獲得する。
Next, as shown in step S5, the valid bit contained in the control information of the entry of the address conversion table 5b in which the physical page number is set is set to "1". Next, as shown in step S6, an entry of the reverse address translation table 5a having the same index as the physical page number of the obtained free physical page is obtained.

【0038】次に、ステップS7に示すように、逆アド
レス変換テーブル5aのエントリにページフォルトを起
こした論理アドレスの内容の論理ページ番号を設定す
る。次に、ステップS8に示すように、逆アドレス変換
テーブル5aのエントリの有効ビットを“1”にする。
Next, as shown in step S7, the logical page number of the contents of the logical address which caused the page fault is set in the entry of the reverse address translation table 5a. Next, as shown in step S8, the valid bit of the entry of the reverse address translation table 5a is set to "1".

【0039】次に、図6のページフォルト処理により作
成された逆アドレス変換テーブル5aに基づいて、物理
アドレスから論理アドレスへのアドレス変換処理が行わ
れる。
Next, based on the reverse address conversion table 5a created by the page fault process of FIG. 6, the address conversion process from the physical address to the logical address is performed.

【0040】すなわち、図7のステップS11に示すよ
うに、図1の主記憶装置の物理アドレス空間4における
物理アドレスの内容から物理ページ番号を獲得する。次
に、ステップS12に示すように、アドレス変換装置2
の逆アドレス変換テーブル5aを参照することにより、
物理ページ番号に対応するエントリを獲得する。
That is, as shown in step S11 of FIG. 7, the physical page number is acquired from the contents of the physical address in the physical address space 4 of the main memory of FIG. Next, as shown in step S12, the address translation device 2
By referring to the reverse address translation table 5a of
Get the entry corresponding to the physical page number.

【0041】次に、ステップS13に示すように、エン
トリの有効ビットが“1”である場合、ステップS14
に進み、獲得したエントリの論理ページ番号を参照する
ことにより、処理装置3の論理アドレス空間6における
論理ページ番号を得る。そして、ステップS15に示す
ように、逆アドレス変換テーブル5aの論理ページ番号
と、物理アドレスのオフセットにより、論理アドレスを
得ることができる。
Next, as shown in step S13, when the valid bit of the entry is "1", step S14
Then, by referring to the logical page number of the acquired entry, the logical page number in the logical address space 6 of the processing device 3 is obtained. Then, as shown in step S15, the logical address can be obtained from the logical page number of the reverse address translation table 5a and the offset of the physical address.

【0042】一方、ステップS13において、エントリ
の有効ビットが“0”である場合、すなわち、物理ペー
ジ番号から論理ページ番号を獲得する過程で論理ページ
番号が存在しない場合、ステップS14、15の処理を
行わないようにして処理を終了する。
On the other hand, when the valid bit of the entry is "0" in step S13, that is, when the logical page number does not exist in the process of acquiring the logical page number from the physical page number, the processes of steps S14 and S15 are performed. The process is terminated without performing the process.

【0043】次に、本発明の第2実施例によるアドレス
変換装置を図面を参照しながら説明する。本発明の第2
実施例は、多重仮想記憶方式を用いたアドレス変換装置
の例である。
Next, an address translation device according to a second embodiment of the present invention will be described with reference to the drawings. Second of the present invention
The embodiment is an example of an address translation device using the multiple virtual storage system.

【0044】図1において、アドレス変換装置2に多重
仮想記憶方式を用いた場合、処理装置3の論理アドレス
空間6は複数の論理アドレス空間に分割され、その分割
された論理アドレス空間に対応してアドレス変換テーブ
ル5bが複数設けられる。そして、分割された各論理ア
ドレス空間には、1つのプログラムが格納され、各論理
アドレス空間に対して同じ論理アドレスが割り振られて
いる。
In FIG. 1, when the address translation device 2 uses the multiple virtual storage system, the logical address space 6 of the processing device 3 is divided into a plurality of logical address spaces, and the divided logical address spaces are associated with each other. A plurality of address conversion tables 5b are provided. One program is stored in each of the divided logical address spaces, and the same logical address is assigned to each logical address space.

【0045】一方、逆アドレス変換テーブル5aの各エ
ントリ0〜nは、図8に示すように、物理ページ0〜n
に対応する論理ページ番号0〜mと、エントリに格納さ
れた論理ページ番号が有効であるかどうかを示すフラグ
である有効ビットと、現在実行中のプログラムを示す識
別子からなる。この論理ページ番号0〜mは、逆アドレ
ス変換テーブル5aのインデックス0〜nに対応して物
理ページ0〜nを割り当てた場合の論理アドレスのペー
ジ番号0〜mを示している。
On the other hand, the respective entries 0 to n of the reverse address translation table 5a have physical pages 0 to n as shown in FIG.
Of the logical page numbers 0 to m, a valid bit that is a flag indicating whether the logical page number stored in the entry is valid, and an identifier that indicates the program currently being executed. The logical page numbers 0 to m indicate the page numbers 0 to m of the logical addresses when the physical pages 0 to n are allocated corresponding to the indexes 0 to n of the reverse address conversion table 5a.

【0046】以上の構成において、物理アドレスを論理
アドレスに変換する場合、図1の物理アドレス空間4の
物理アドレスが参照される。この物理アドレスの内容
は、物理ページ番号0〜nとオフセットからなる。そし
て、物理ページ番号0〜nに対応する逆アドレス変換テ
ーブル5aのインデックス0〜nを参照することによ
り、論理アドレス空間6の論理ページ0〜mに対応する
論理ページ番号0〜mを得ることができる。この論理ペ
ージ番号0〜mと物理アドレスのオフセットにより、論
理アドレスを容易に求めることができる。ここで、多重
仮想記憶方式の場合、1つのプログラムに対して1つの
論理アドレス空間が割り当てられ、各論理アドレス空間
には同じ論理アドレスが割り当てられているので、逆ア
ドレス変換テーブル5aに格納されたプログラムの識別
子を参照することにより、1つの論理アドレス空間を特
定する。なお、逆アドレス変換テーブル5aに必要なエ
ントリ数は、第1実施例の場合と同じである。
In the above configuration, when converting a physical address into a logical address, the physical address in the physical address space 4 of FIG. 1 is referred to. The content of this physical address consists of physical page numbers 0 to n and an offset. Then, the logical page numbers 0 to m corresponding to the logical pages 0 to m of the logical address space 6 can be obtained by referring to the indexes 0 to n of the reverse address translation table 5a corresponding to the physical page numbers 0 to n. it can. The logical address can be easily obtained from the logical page numbers 0 to m and the offset of the physical address. Here, in the case of the multiple virtual memory system, one logical address space is allocated to one program, and the same logical address is allocated to each logical address space, so that it is stored in the reverse address conversion table 5a. One logical address space is specified by referring to the program identifier. The number of entries required for the reverse address translation table 5a is the same as in the first embodiment.

【0047】次に、本発明の第2実施例によるアドレス
変換装置の動作について説明する。ページフォルト処理
では、まず、図9のステップS21に示すように、ペー
ジフォルトを起こした図1の処理装置3の論理アドレス
の内容から論理ページ番号を獲得する。
Next, the operation of the address translator according to the second embodiment of the present invention will be described. In the page fault process, first, as shown in step S21 of FIG. 9, a logical page number is acquired from the contents of the logical address of the processor 3 of FIG.

【0048】次に、ステップS22に示すように、アド
レス変換テーブル5bを参照することにより、論理ペー
ジ番号に対応するエントリを獲得する。次に、ステップ
S23に示すように、主記憶装置1の物理アドレス空間
4の空きの物理ページを獲得する。
Next, as shown in step S22, by referring to the address conversion table 5b, the entry corresponding to the logical page number is acquired. Next, as shown in step S23, a free physical page in the physical address space 4 of the main memory 1 is acquired.

【0049】次に、ステップS24に示すように、ペー
ジフォルトの原因となった論理ページ番号に対応するア
ドレス変換テーブル5bのエントリに、ステップS3で
獲得した物理ページの物理ページ番号を設定する。
Next, as shown in step S24, the physical page number of the physical page acquired in step S3 is set in the entry of the address translation table 5b corresponding to the logical page number that caused the page fault.

【0050】次に、ステップS25に示すように、物理
ページ番号を設定したアドレス変換テーブル5bのエン
トリの制御情報に含まれる有効ビットを“1”にする。
次に、ステップS26に示すように、獲得した空き物理
ページの物理ページ番号と同じインデックスを有する逆
アドレス変換テーブル5aのエントリを獲得する。
Next, as shown in step S25, the valid bit contained in the control information of the entry of the address conversion table 5b in which the physical page number is set is set to "1".
Next, as shown in step S26, the entry of the reverse address translation table 5a having the same index as the physical page number of the obtained free physical page is obtained.

【0051】次に、ステップS27に示すように、ペー
ジフォルトを起こした論理アドレスの内容の論理ページ
番号を、逆アドレス変換テーブル5aのエントリに設定
する。
Next, as shown in step S27, the logical page number of the content of the logical address that caused the page fault is set in the entry of the reverse address translation table 5a.

【0052】次に、ステップS28に示すように、逆ア
ドレス変換テーブル5aのエントリの有効ビットを
“1”にする。次に、ステップS29に示すように、現
在実行中のプログラムの識別子を逆アドレス変換テーブ
ル5aのエントリに設定する。この場合、ページフォル
トを起こした現在実行中のプログラムの識別子は、オペ
レーティングシステムにより容易に引き出すことができ
る。
Next, as shown in step S28, the valid bit of the entry of the reverse address translation table 5a is set to "1". Next, as shown in step S29, the identifier of the program currently being executed is set in the entry of the reverse address translation table 5a. In this case, the identifier of the currently executing program that caused the page fault can be easily retrieved by the operating system.

【0053】次に、物理アドレスから論理アドレスへの
アドレス変換処理について説明する。まず、図10のス
テップS31に示すように、図1の主記憶装置の物理ア
ドレス空間4における物理アドレスの内容から物理ペー
ジ番号を獲得する。
Next, an address conversion process from a physical address to a logical address will be described. First, as shown in step S31 of FIG. 10, a physical page number is acquired from the contents of the physical address in the physical address space 4 of the main storage device of FIG.

【0054】次に、ステップS32に示すように、アド
レス変換装置2の逆アドレス変換テーブル5aを参照す
ることにより、物理ページ番号に対応するエントリを獲
得する。
Next, as shown in step S32, the entry corresponding to the physical page number is acquired by referring to the reverse address translation table 5a of the address translation device 2.

【0055】次に、ステップS33に示すように、エン
トリの有効ビットが“1”である場合、ステップS34
に進み、獲得したエントリの論理ページ番号を参照する
ことにより、処理装置3の論理アドレス空間6における
論理ページ番号を得る。
Next, as shown in step S33, when the valid bit of the entry is "1", step S34
Then, by referring to the logical page number of the acquired entry, the logical page number in the logical address space 6 of the processing device 3 is obtained.

【0056】次に、ステップS35に示すように、逆ア
ドレス変換テーブル5aの論理ページ番号と、物理アド
レスのオフセットにより、論理アドレスを得る。次に、
ステップS36に示すように、逆アドレス変換テーブル
5aのエントリからプログラムの識別子を獲得すること
により、1つの論理アドレス空間を特定する。
Next, as shown in step S35, a logical address is obtained from the logical page number of the reverse address translation table 5a and the offset of the physical address. next,
As shown in step S36, one logical address space is specified by acquiring the program identifier from the entry of the reverse address translation table 5a.

【0057】一方、ステップS33において、エントリ
の有効ビットが“0”である場合、すなわち、物理ペー
ジ番号から論理ページ番号を獲得する過程で論理ページ
番号が存在しない場合、ステップS34〜S36の処理
を行わないようにして処理を終了する。次に、本発明の
第3実施例によるアドレス変換装置を図面を参照しなが
ら説明する。本発明の第3実施例は、図1の逆アドレス
変換テーブル5aを複数段設けた場合のアドレス変換装
置の例である。
On the other hand, when the valid bit of the entry is "0" in step S33, that is, when the logical page number does not exist in the process of acquiring the logical page number from the physical page number, the processes of steps S34 to S36 are performed. The process is terminated without performing the process. Next, an address translator according to a third embodiment of the present invention will be described with reference to the drawings. The third embodiment of the present invention is an example of an address translation device in which a plurality of reverse address translation tables 5a of FIG. 1 are provided.

【0058】すなわち、図1の逆アドレス変換テーブル
5aは、論理アドレス空間6の論理ページ番号0〜mを
指定する最終段テーブルと、次段のテーブルを指定する
前段テーブルとを備える。最終段テーブルの各エントリ
0〜nは、単一仮想記憶の場合、図2に示すように、物
理ページ0〜nに対応する論理ページ番号0〜mと、エ
ントリに格納された論理ページ番号が有効であるかどう
かを示すフラグである有効ビットからなる。また、多重
仮想記憶の場合、図8に示すように、物理ページ0〜n
に対応する論理ページ番号0〜mと、エントリに格納さ
れた論理ページ番号が有効であるかどうかを示すフラグ
である有効ビットと、現在実行中のプログラムを示す識
別子からなる。なお、最終段テーブルに必要なエントリ
数は、逆変換する物理アドレス空間4のページ数分必要
である。
That is, the reverse address conversion table 5a of FIG. 1 comprises a final stage table for designating the logical page numbers 0 to m of the logical address space 6 and a front stage table for designating the next stage table. In the case of a single virtual memory, each entry 0 to n of the final stage table has logical page numbers 0 to m corresponding to physical pages 0 to n and logical page numbers stored in the entry, as shown in FIG. It consists of a valid bit which is a flag indicating whether it is valid. Further, in the case of multiple virtual storage, as shown in FIG.
Of the logical page numbers 0 to m, a valid bit that is a flag indicating whether the logical page number stored in the entry is valid, and an identifier that indicates the program currently being executed. The number of entries required for the final stage table is the same as the number of pages of the physical address space 4 to be inversely converted.

【0059】一方、前段テーブルの各エントリ0〜n
は、図11に示すように、次段の逆アドレス変換テーブ
ルの論理アドレス、すなわち、次段の逆アドレス変換テ
ーブルへのポインタと、2ビットで構成される最終段フ
ラグからなる。ここで、最終段フラグの値が“11”の
場合、次段の逆アドレス変換テーブルが最終段であるこ
とを示し、最終段フラグの値が“01”の場合、次段の
テーブルは最終段以外の逆アドレス変換テーブルである
ことを示し、最終段フラグの値が“00”の場合、この
逆アドレス変換テーブルのエントリは無効であることを
示す。なお、前段テーブルに必要なエントリ数は、計算
機システムにより任意である。
On the other hand, each entry 0 to n of the preceding table
As shown in FIG. 11, consists of a logical address of the reverse address translation table of the next stage, that is, a pointer to the reverse address translation table of the next stage, and a final stage flag composed of 2 bits. Here, when the value of the final stage flag is "11", it indicates that the reverse address translation table of the next stage is the final stage, and when the value of the final stage flag is "01", the table of the next stage is the final stage. If the value of the final stage flag is "00", it indicates that the entry of this reverse address translation table is invalid. It should be noted that the number of entries required for the preceding table is arbitrary depending on the computer system.

【0060】ここで、逆アドレス変換テーブルの段数
は、テーブルの段数を多くするとアドレスを逆変換する
時に手間がかかるので、2段程度が適当である。そし
て、2段で構成される逆アドレス変換テーブルの場合、
1段目の逆アドレス変換テーブルのエントリの分割数に
より、非連続な物理アドレス空間の先頭アドレスと領域
サイズのバウンダリが決定される。例えば、図12に示
すように、1段目の逆アドレス変換テーブル11を10
24個に分けた場合、先頭アドレスと領域サイズのバウ
ンダリは4MBとなる。
Here, the number of stages of the reverse address conversion table is preferably about two stages, because if the number of stages of the table is increased, it takes time to reverse the address. And in the case of a reverse address translation table composed of two stages,
The boundary of the start address and area size of the non-contiguous physical address space is determined by the number of divisions of the entry of the reverse address translation table in the first stage. For example, as shown in FIG. 12, the reverse address translation table 11 of the first stage is set to 10
When divided into 24, the boundary of the start address and area size is 4 MB.

【0061】以上の構成において、図12に示すよう
に、非連続な物理アドレス空間10の物理アドレスを論
理アドレスに変換する場合、図13の物理アドレスが参
照される。ここで、図12は、物理アドレス空間10が
00000000H番地から16MB存在し、1000
0000H番地から4MB存在する場合で、逆アドレス
変換テーブルを2段構成にして、物理アドレス空間10
の00000000H番地から8MB、1000000
0H番地から4MBの物理アドレスを論理アドレスに変
換する例を示す。また、物理アドレスの内容は、図13
に示すように、物理ページ番号0〜nとオフセットから
なり、物理ページ番号0〜nは、10ビット構成の1段
目の逆アドレス変換テーブル11のインデックスと最終
段の逆アドレス変換テーブル12a、12b、12cの
インデックスとからなる。そして、物理ページ番号の1
段目の逆アドレス変換テーブル11のインデックスを参
照することにより、最終段の逆アドレス変換テーブル1
2a、12b、12cのいずれかを選択し、選択された
最終段の逆アドレス変換テーブル12a、12b、12
cにおいて、物理ページ番号の最終段の逆アドレス変換
テーブル12a、12b、12cのインデックスを参照
することにより、論理アドレス空間13の論理ページに
対応する論理ページ番号を得ることができる。この論理
ページ番号と物理アドレスのオフセットにより、論理ア
ドレスを容易に求めることができる。
In the above configuration, as shown in FIG. 12, when the physical address of the non-contiguous physical address space 10 is converted into the logical address, the physical address of FIG. 13 is referred to. Here, in FIG. 12, the physical address space 10 is 16 MB from the address 00000000H, and
If there is 4 MB from address 0000H, the reverse address translation table has a two-stage structure, and physical address space 10
8000000 from address 00000000H, 1000000
An example of converting a physical address of 4 MB from address 0H into a logical address will be shown. The contents of the physical address are shown in FIG.
As shown in, the physical page numbers 0 to n and the offsets are provided. The physical page numbers 0 to n are the indexes of the reverse address translation table 11 of the first stage and the reverse address translation tables 12a and 12b of the final stage having a 10-bit configuration. , 12c indexes. And the physical page number 1
By referring to the index of the reverse address conversion table 11 of the second stage, the reverse address conversion table 1 of the final stage
2a, 12b, 12c is selected, and the reverse address conversion tables 12a, 12b, 12 at the final stage selected are selected.
In c, the logical page number corresponding to the logical page of the logical address space 13 can be obtained by referring to the index of the reverse address translation table 12a, 12b, 12c at the final stage of the physical page number. The logical address can be easily obtained from the offset of the logical page number and the physical address.

【0062】次に、本発明の第3実施例によるアドレス
変換装置の動作について説明する。ページフォルト処理
では、まず、図14のステップS41に示すように、ペ
ージフォルトを起こした論理アドレスの内容から論理ペ
ージ番号を獲得する。
Next, the operation of the address translator according to the third embodiment of the present invention will be described. In the page fault process, first, as shown in step S41 of FIG. 14, a logical page number is acquired from the contents of the logical address that caused the page fault.

【0063】次に、ステップS42に示すように、アド
レス変換テーブルを参照することにより、論理ページ番
号に対応するエントリを獲得する。次に、ステップS4
3に示すように、物理アドレス空間の空きの物理ページ
を獲得する。
Next, as shown in step S42, the entry corresponding to the logical page number is acquired by referring to the address conversion table. Next, step S4
As shown in 3, a free physical page in the physical address space is acquired.

【0064】次に、ステップS44に示すように、ペー
ジフォルトの原因となった論理ページ番号に対応するア
ドレス変換テーブルのエントリに、ステップS43で獲
得した物理ページの物理ページ番号を設定する。
Next, as shown in step S44, the physical page number of the physical page acquired in step S43 is set in the entry of the address translation table corresponding to the logical page number that caused the page fault.

【0065】次に、ステップS45に示すように、物理
ページ番号を設定したアドレス変換テーブルのエントリ
の制御情報に含まれる有効ビットを“1”にする。次
に、ステップS46に示すように、ステップS43で獲
得した物理ページの物理ページ番号を、例えば、図13
に示すように、10ビットずつとなるように2つに分割
する。 次に、ステップS47に示すように、図12の
1段目の逆アドレス変換テーブル11のインデックスを
獲得する。ここで、1段目の逆アドレス変換テーブル1
1は、図12に示すように、計算機システムの立上がり
時に、既に作成されているものとした。
Next, as shown in step S45, the valid bit contained in the control information of the entry of the address conversion table in which the physical page number is set is set to "1". Next, as shown in step S46, the physical page number of the physical page acquired in step S43 is set to, for example, FIG.
As shown in (4), it is divided into two so that 10 bits are provided. Next, as shown in step S47, the index of the reverse address conversion table 11 in the first stage of FIG. 12 is acquired. Here, the reverse address conversion table 1 of the first stage
As shown in FIG. 12, No. 1 is already created when the computer system starts up.

【0066】次に、ステップS48に示すように、1段
目の逆アドレス変換テーブル11のエントリの最終段フ
ラグを獲得する。次に、ステップS49に示すように、
ステップS48で獲得した最終段フラグの値が“11”
であるかどうかを判定する。そして、最終段フラグの値
が“11”、すなわち、次段の逆アドレス変換テーブル
が最終段の逆アドレス変換テーブル12a、12b、1
2cである場合、ステップS50に進み、最終段フラグ
の値が“11”でない場合、処理を終了する。
Next, as shown in step S48, the final stage flag of the entry of the reverse address translation table 11 of the first stage is acquired. Next, as shown in step S49,
The value of the final stage flag acquired in step S48 is "11".
Is determined. Then, the value of the final stage flag is "11", that is, the reverse address translation table of the next stage is the reverse address translation tables 12a, 12b, 1 of the final stage.
If it is 2c, the process proceeds to step S50, and if the value of the final stage flag is not "11", the process is ended.

【0067】次に、ステップS50に示すように、図1
2の最終段の逆アドレス変換テーブル12のインデック
スを獲得する。次に、ステップS51に示すように、最
終段の逆アドレス変換テーブル12ののエントリを獲得
する。
Next, as shown in step S50, as shown in FIG.
The index of the reverse address conversion table 12 at the final stage of 2 is acquired. Next, as shown in step S51, the entry of the reverse address translation table 12 at the final stage is acquired.

【0068】次に、ステップS52に示すように、ペー
ジフォルトを起こした論理アドレスの内容の論理ページ
番号を、最終段の逆アドレス変換テーブル12のエント
リに設定する。
Next, as shown in step S52, the logical page number of the content of the logical address that caused the page fault is set in the entry of the reverse address translation table 12 at the final stage.

【0069】次に、ステップS53に示すように、最終
段の逆アドレス変換テーブル12のエントリの有効ビッ
トを“1”にする。なお、多重仮想記憶方式を用いた場
合、現在実行中のプログラムの識別子を逆アドレス変換
テーブル12のエントリに設定する処理が、追加して行
われる。
Next, as shown in step S53, the valid bit of the entry of the reverse address translation table 12 at the final stage is set to "1". When the multiple virtual storage system is used, a process of setting the identifier of the program currently being executed in the entry of the reverse address translation table 12 is additionally performed.

【0070】次に、物理アドレスから論理アドレスへの
アドレス変換処理について説明する。まず、図15のス
テップS61に示すように、物理アドレス空間における
物理アドレスの内容から物理ページ番号を獲得する。
Next, an address conversion process from a physical address to a logical address will be described. First, as shown in step S61 of FIG. 15, a physical page number is acquired from the contents of the physical address in the physical address space.

【0071】次に、ステップS62に示すように、ステ
ップS61で獲得した物理ページの物理ページ番号を、
10ビットずつに分割する。次に、ステップS63に示
すように、ステップS61で獲得した物理ページ番号か
ら1段目の逆アドレス変換テーブル11のインデックス
を獲得する。
Next, as shown in step S62, the physical page number of the physical page acquired in step S61 is set to
Divide into 10 bits. Next, as shown in step S63, the index of the first-stage reverse address translation table 11 is acquired from the physical page number acquired in step S61.

【0072】次に、ステップS64に示すように、1段
目の逆アドレス変換テーブル11のエントリの最終段フ
ラグを獲得する。次に、ステップS65に示すように、
ステップS64で獲得した最終段フラグの値が“1
1”、すなわち、次段の逆アドレス変換テーブルが最終
段の逆アドレス変換テーブル12a、12b、12cで
ある場合、ステップS66に進み、最終段フラグの値が
“11”でない場合、処理を終了する。
Next, as shown in step S64, the final stage flag of the entry of the reverse address translation table 11 of the first stage is acquired. Next, as shown in step S65,
The value of the final stage flag acquired in step S64 is "1".
1 ", that is, if the next-stage reverse address translation table is the last-stage reverse address translation table 12a, 12b, 12c, the process proceeds to step S66, and if the last-stage flag value is not" 11 ", the process ends. .

【0073】次に、ステップS66に示すように、ステ
ップS61で獲得した物理ページ番号から最終段の逆ア
ドレス変換テーブル12のインデックスを獲得する。次
に、ステップS67に示すように、最終段の逆アドレス
変換テーブル12のエントリを獲得する。
Next, as shown in step S66, the index of the reverse address translation table 12 at the final stage is acquired from the physical page number acquired in step S61. Next, as shown in step S67, the entry of the final stage reverse address translation table 12 is acquired.

【0074】次に、ステップS68に示すように、ステ
ップS67で獲得したエントリの有効ビットが“1”で
ある場合、ステップS69に進み、有効ビットが“0”
である場合、処理を終了する。
Next, as shown in step S68, when the valid bit of the entry acquired in step S67 is "1", the process proceeds to step S69, and the valid bit is "0".
If so, the process ends.

【0075】次に、ステップS69に示すように、最終
段の逆アドレス変換テーブル12のエントリの論理ペー
ジ番号を獲得する。次に、ステップS70に示すよう
に、ステップS69で獲得した論理ページ番号と、物理
アドレスのオフセットにより、論理アドレスを得る。
Next, as shown in step S69, the logical page number of the entry of the reverse address translation table 12 at the final stage is acquired. Next, as shown in step S70, a logical address is obtained from the logical page number acquired in step S69 and the offset of the physical address.

【0076】なお、多重仮想記憶方式を用いた場合、逆
アドレス変換テーブル12のエントリから現在実行中の
プログラムの識別子を獲得することにより、1つの論理
アドレス空間を特定する処理が、追加して行われる。
When the multiple virtual memory system is used, the process of specifying one logical address space by additionally acquiring the identifier of the program currently being executed from the entry of the reverse address translation table 12 is additionally performed. Be seen.

【0077】また、上述した実施例では、図1の物理ア
ドレス空間4を主記憶装置1に設けた場合について説明
したが、物理アドレス空間4を主記憶装置1以外のもの
に設けた場合においても、本発明は適用可能である。例
えば、主記憶装置と特殊なレジスタ群とを有する計算機
システムにおいて、主記憶装置の最終アドレスと特殊な
レジスタ群の先頭アドレスが大きく離れていて、途中に
未実装の物理アドレス空間が存在する場合でも、逆アド
レス変換テーブルの領域を必要最小限の大きさに抑える
ことができる。
Further, in the above-described embodiment, the case where the physical address space 4 of FIG. 1 is provided in the main memory device 1 has been described, but also when the physical address space 4 is provided in a device other than the main memory device 1. The present invention is applicable. For example, in a computer system having a main storage device and a special register group, even if the final address of the main storage device and the start address of the special register group are widely separated and an unimplemented physical address space exists in the middle. The area of the reverse address translation table can be suppressed to the minimum necessary size.

【0078】[0078]

【発明の効果】以上説明したように、請求項1の発明に
よれば、物理アドレスを論理アドレスに変換する逆アド
レス変換テーブルを備えることにより、物理アドレスか
ら論理アドレスの変換を容易に行うことができる。
As described above, according to the first aspect of the invention, by providing the reverse address conversion table for converting the physical address into the logical address, the conversion from the physical address to the logical address can be easily performed. it can.

【0079】また、請求項2の発明によれば、物理アド
レスに対応する論理アドレスの論理ページ番号を、逆ア
ドレス変換テーブルの各エントリに格納することによ
り、逆アドレス変換テーブルの1度の検索で論理ページ
番号を得ることができ、物理アドレスから論理アドレス
の変換を容易に行うことができる。
According to the second aspect of the invention, the logical page number of the logical address corresponding to the physical address is stored in each entry of the reverse address translation table, so that the reverse address translation table can be searched once. The logical page number can be obtained, and the physical address can be easily converted to the logical address.

【0080】また、請求項3の発明によれば、論理アド
レスを利用しているプログラムの識別子を逆アドレス変
換テーブルの各エントリに格納することにより、各プロ
グラムに同じ論理アドレスを割り当てた場合において
も、特定のプログラムに容易にアクセスでき、プログラ
ムをデバッグなどを行う場合の効率を向上させることが
できる。
According to the third aspect of the present invention, the identifier of the program using the logical address is stored in each entry of the reverse address translation table, so that the same logical address is assigned to each program. , A specific program can be easily accessed, and the efficiency in debugging the program can be improved.

【0081】また、請求項4の発明によれば、フラグ情
報を参照することにより、無効な論理ページ番号から論
理アドレスを算出する処理を行うことを省略でき、物理
アドレスから論理アドレスへの変換処理を高速化するこ
とができる。
Further, according to the invention of claim 4, it is possible to omit the process of calculating the logical address from the invalid logical page number by referring to the flag information, and to perform the conversion process from the physical address to the logical address. Can be speeded up.

【0082】また、請求項5の発明によれば、不連続の
物理アドレス空間に対応させて逆アドレス変換テーブル
を設けることにより、全ての物理アドレス空間の物理ア
ドレスを論理アドレスに変換しない場合、逆アドレス変
換テーブルを記憶するために必要な領域を少なくするこ
とができる。
According to the fifth aspect of the present invention, the reverse address conversion table is provided so as to correspond to the discontinuous physical address spaces, so that when the physical addresses of all the physical address spaces are not converted into the logical addresses, the reverse addresses are reversed. The area required to store the address conversion table can be reduced.

【0083】また、請求項6の発明によれば、物理アド
レスを論理アドレスに変換する逆アドレス変換テーブル
を参照することにより、物理アドレスから論理アドレス
への変換を容易に行うことができる。
According to the sixth aspect of the invention, the physical address can be easily converted into the logical address by referring to the reverse address conversion table for converting the physical address into the logical address.

【0084】また、請求項7の発明によれば、物理アド
レスから論理アドレスへの変換を、物理アドレス空間を
段階に分けて行うようにしたので、不連続の物理アドレ
ス空間に対応させて逆アドレス変換テーブルを設けるこ
とができ、逆アドレス変換テーブルを記憶するために必
要な領域を少なくすることができる。
Further, according to the invention of claim 7, the conversion from the physical address to the logical address is carried out by dividing the physical address space into stages. Therefore, the reverse address is made to correspond to the discontinuous physical address space. A translation table can be provided and the area required to store the reverse address translation table can be reduced.

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

【図1】本発明の第1実施例によるアドレス変換装置の
概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an address translation device according to a first embodiment of the present invention.

【図2】本発明の第1実施例による逆アドレス変換テー
ブルのフィールドの構成を示す図である。
FIG. 2 is a diagram showing a field configuration of a reverse address translation table according to the first embodiment of the present invention.

【図3】本発明の第1実施例によるアドレス変換方法を
示す概念図である。
FIG. 3 is a conceptual diagram showing an address conversion method according to a first embodiment of the present invention.

【図4】本発明の第1実施例によるアドレス変換の流れ
を示す概念図である。
FIG. 4 is a conceptual diagram showing a flow of address conversion according to the first embodiment of the present invention.

【図5】本発明の第1実施例による逆アドレス変換テー
ブルのエントリ数を示す図である。
FIG. 5 is a diagram showing the number of entries in a reverse address translation table according to the first embodiment of the present invention.

【図6】本発明の第1実施例によるアドレス変換テーブ
ルに情報を設定するときの動作を示すフローチャートで
ある。
FIG. 6 is a flowchart showing an operation when setting information in the address conversion table according to the first embodiment of the present invention.

【図7】本発明の第1実施例によるアドレス変換装置の
動作を示すフローチャートである。
FIG. 7 is a flowchart showing the operation of the address translation device according to the first embodiment of the present invention.

【図8】本発明の第2実施例による逆アドレス変換テー
ブルのフィールドの構成を示す図である。
FIG. 8 is a diagram showing a field configuration of a reverse address translation table according to a second embodiment of the present invention.

【図9】本発明の第2実施例によるアドレス変換テーブ
ルに情報を設定するときの動作を示すフローチャートで
ある。
FIG. 9 is a flow chart showing an operation when setting information in the address conversion table according to the second embodiment of the present invention.

【図10】本発明の第2実施例によるアドレス変換装置
の動作を示すフローチャートである。
FIG. 10 is a flowchart showing the operation of the address translation device according to the second embodiment of the present invention.

【図11】本発明の第3実施例による最終段以外の逆ア
ドレス変換テーブルのフィールドの構成を示す図であ
る。
FIG. 11 is a diagram showing a field configuration of a reverse address translation table other than the final stage according to the third embodiment of the present invention.

【図12】本発明の第3実施例によるアドレス変換方法
を示す概念図である。
FIG. 12 is a conceptual diagram showing an address conversion method according to a third embodiment of the present invention.

【図13】本発明の第3実施例による物理アドレスのフ
ィールド構成を示す図である。
FIG. 13 is a diagram showing a field structure of a physical address according to a third embodiment of the present invention.

【図14】本発明の第3実施例によるアドレス変換テー
ブルに情報を設定するときの動作を示すフローチャート
である。
FIG. 14 is a flow chart showing an operation when setting information in the address conversion table according to the third embodiment of the present invention.

【図15】本発明の第3実施例によるアドレス変換装置
の動作を示すフローチャートである。
FIG. 15 is a flowchart showing the operation of the address translation device according to the third embodiment of the present invention.

【図16】従来の単一仮想記憶方式におけるアドレス変
換方法を示す概念図である。
FIG. 16 is a conceptual diagram showing an address conversion method in a conventional single virtual memory system.

【図17】従来の多重仮想記憶方式におけるアドレス変
換方法を示す概念図である。
FIG. 17 is a conceptual diagram showing an address conversion method in a conventional multiple virtual storage system.

【図18】従来の論理アドレス空間又は物理アドレス空
間におけるページの概念を示す図である。
FIG. 18 is a diagram showing the concept of a page in a conventional logical address space or physical address space.

【図19】従来のアドレス変換テーブルのフィールドの
構成を示す図である。
FIG. 19 is a diagram showing a field configuration of a conventional address translation table.

【図20】従来のアドレス変換装置の動作を示すフロー
チャートである。
FIG. 20 is a flowchart showing the operation of a conventional address translation device.

【図21】従来のアドレス変換方法を示す概念図であ
る。
FIG. 21 is a conceptual diagram showing a conventional address conversion method.

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

1 主記憶装置 2 アドレス変換装置 3 処理装置 4、7、10 物理アドレス空間 5a、8 逆アドレス変換テーブル 5b アドレス変換テーブル 6、9、13 論理アドレス空間 11 1段目逆アドレス変換テーブル 12a、12b、12c 最終段逆アドレス変換テーブ
DESCRIPTION OF SYMBOLS 1 main storage device 2 address translation device 3 processing device 4, 7, 10 physical address space 5a, 8 reverse address translation table 5b address translation table 6, 9, 13 logical address space 11 1st stage reverse address translation table 12a, 12b, 12c Last stage reverse address conversion table

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 仮想記憶方式によるアドレス変換装置に
おいて、物理アドレス(実アドレス)を論理アドレス
(仮想アドレス)に変換する逆アドレス変換テーブルを
備えることを特徴とするアドレス変換装置。
1. An address translator according to the virtual memory system, comprising an inverse address translation table for translating a physical address (real address) into a logical address (virtual address).
【請求項2】 前記逆アドレス変換テーブルは、物理ア
ドレス空間の各物理ページに対応するエントリを備え、
前記物理アドレスに対応する論理アドレスの論理ページ
番号を、前記各エントリに格納することを特徴とする請
求項1に記載のアドレス変換装置。
2. The reverse address translation table comprises an entry corresponding to each physical page of a physical address space,
The address translation device according to claim 1, wherein a logical page number of a logical address corresponding to the physical address is stored in each of the entries.
【請求項3】 前記逆アドレス変換テーブルは、物理ア
ドレス空間の各物理ページに対応するエントリを備え、
前記物理アドレスに対応する論理アドレスの論理ページ
番号と前記論理アドレスを利用しているプログラムの識
別子とを、前記エントリに格納することを特徴とする請
求項1に記載のアドレス変換装置。
3. The reverse address translation table comprises an entry corresponding to each physical page of a physical address space,
The address translation device according to claim 1, wherein a logical page number of a logical address corresponding to the physical address and an identifier of a program using the logical address are stored in the entry.
【請求項4】 前記エントリは、格納された論理ページ
番号が有効であるかどうかを示すフラグ情報を有するこ
とを特徴とする請求項2又は3に記載のアドレス変換装
置。
4. The address translation device according to claim 2, wherein the entry has flag information indicating whether or not the stored logical page number is valid.
【請求項5】 前記逆アドレス変換テーブルは、複数の
段階に分割した物理アドレス空間の各物理ページに対応
するエントリを各段階毎に備えることを特徴とする請求
項1に記載のアドレス変換装置。
5. The address translation device according to claim 1, wherein the reverse address translation table is provided with an entry corresponding to each physical page of a physical address space divided into a plurality of stages for each step.
【請求項6】 仮想記憶方式によるアドレス変換方法に
おいて、物理アドレスを論理アドレスに変換する逆アド
レス変換テーブルを参照することにより、物理アドレス
を論理アドレスに変換することを特徴とするアドレス変
換方法。
6. An address conversion method according to the virtual memory system, wherein a physical address is converted into a logical address by referring to a reverse address conversion table for converting a physical address into a logical address.
【請求項7】 仮想記憶方式によるアドレス変換方法に
おいて、物理アドレス空間を複数の段階に分割し、前記
物理アドレス空間の各物理ページに対応して各段階毎に
備えられたエントリを参照することにより、物理アドレ
スを論理アドレスに変換することを特徴とするアドレス
変換方法。
7. An address translation method using a virtual memory system, wherein a physical address space is divided into a plurality of stages, and an entry provided for each stage corresponding to each physical page of the physical address space is referred to. , An address conversion method characterized by converting a physical address into a logical address.
JP7184045A 1995-07-20 1995-07-20 Device and method for translating address Withdrawn JPH0934788A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7184045A JPH0934788A (en) 1995-07-20 1995-07-20 Device and method for translating address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7184045A JPH0934788A (en) 1995-07-20 1995-07-20 Device and method for translating address

Publications (1)

Publication Number Publication Date
JPH0934788A true JPH0934788A (en) 1997-02-07

Family

ID=16146406

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7184045A Withdrawn JPH0934788A (en) 1995-07-20 1995-07-20 Device and method for translating address

Country Status (1)

Country Link
JP (1) JPH0934788A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007519102A (en) * 2003-12-24 2007-07-12 インテル・コーポレーション Graphics memory switch

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007519102A (en) * 2003-12-24 2007-07-12 インテル・コーポレーション Graphics memory switch

Similar Documents

Publication Publication Date Title
US4992936A (en) Address translation method and apparatus therefor
US5167023A (en) Translating a dynamic transfer control instruction address in a simulated CPU processor
CN111090628A (en) Data processing method and device, storage medium and electronic equipment
JP2003114816A (en) Data structure storing indexes in computer memory
JP2000207260A (en) Method and device for storing and fetching data in/from hand-held device
US5519860A (en) Central processor index sort followed by direct record sort and write by an intelligent control unit
JPH0934788A (en) Device and method for translating address
CN112035380A (en) Data processing method, device and equipment and readable storage medium
JPS6273347A (en) Address converter
CN111026890A (en) Picture data storage method, system, device and storage medium based on index table
US20020124164A1 (en) Method for starting computer system
JPS5837884A (en) Address converting system
CN114676289A (en) Processing method, device, terminal and storage medium of prefix tree
JPH07219823A (en) Information processor
JPS59140566A (en) Information processing device
JP2612173B2 (en) Virtual computer
JPS589452B2 (en) Firmware broom
CN116932428A (en) Method for transparent transmission data of memory management unit and memory management unit
JP2635310B2 (en) Address translation device
JP2728151B2 (en) Programmable controller
JPH0792754B2 (en) Assembling device
JPS63189955A (en) Data transferring and processing system in virtual computer system
JPS5841585B2 (en) Replacement method
JPH02254550A (en) Information storage device and information processor
JPS6061851A (en) Input and output processor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20021001