JP3454854B2 - Memory management device and method - Google Patents

Memory management device and method

Info

Publication number
JP3454854B2
JP3454854B2 JP00393793A JP393793A JP3454854B2 JP 3454854 B2 JP3454854 B2 JP 3454854B2 JP 00393793 A JP00393793 A JP 00393793A JP 393793 A JP393793 A JP 393793A JP 3454854 B2 JP3454854 B2 JP 3454854B2
Authority
JP
Japan
Prior art keywords
address
access
thread
logical
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP00393793A
Other languages
Japanese (ja)
Other versions
JPH05257811A (en
Inventor
光男 斎藤
滋博 浅野
承昊 申
浩志 野末
賢一 前田
英生 瀬川
利夫 岡本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP00393793A priority Critical patent/JP3454854B2/en
Priority to US08/021,098 priority patent/US5627987A/en
Publication of JPH05257811A publication Critical patent/JPH05257811A/en
Priority to US08/753,944 priority patent/US5890189A/en
Application granted granted Critical
Publication of JP3454854B2 publication Critical patent/JP3454854B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、メモリアクセスを制御
するメモリ管理装置及び方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory management device and method for controlling memory access.

【0002】[0002]

【従来の技術】近年、ネットワーク技術の発達や並列計
算機技術の発展により、例えばサーバ・クライアント型
プログラミングのように、複数のプログラムがデータを
共有し、協調しあって処理を進める方式が広がって来
た。
2. Description of the Related Art In recent years, with the development of network technology and parallel computer technology, a method has been spreading in which a plurality of programs share data and cooperate to perform processing, such as server / client type programming. It was

【0003】この方式では、それぞれのプログラムは、
仮想記憶の技術を用いて別々のアドレス空間におかれて
いるため、データを共有するためにはオペレーティング
システム(OS)を介してデータのやりとりをしなけれ
ばならず、OSのオ−バヘッドにより処理速度が遅くな
ってしまうという欠点があった。
In this system, each program is
Since they are placed in different address spaces using the virtual memory technology, data must be exchanged through the operating system (OS) in order to share the data, and the processing is performed by the OS overhead. It had the drawback of slowing down the speed.

【0004】そこで、一つのアドレス空間内に、実行主
体であるスレッドを複数走らせ、スレッド間のデータの
共有を、OSのオーバヘッドなしでおこなうという方式
もおこなわれている。
Therefore, a method is also used in which a plurality of threads, which are execution subjects, are run in one address space, and data is shared between the threads without the overhead of the OS.

【0005】この方式は、もともとスレッド間の保護を
考えていないものであるため、あるスレッドが使ってい
るデータを他のスレッドから保護しようとすると、オー
バヘッドの大きい方法を採らなければならない。
Since this method does not originally consider protection between threads, it is necessary to adopt a method with a large overhead in order to protect the data used by one thread from another thread.

【0006】すなわち、アドレス空間ごとの保護機能を
利用してスレッド毎に別々のアドレス空間を割り当て、
それぞれのアドレス空間に、そのスレッドからアクセス
できる部分だけを置くことになる。これはかなりオーバ
ヘッドが大きく実用的ではない。以上が第1の問題点、
つまり1つのプログラム中でスレッドごとに許されるア
クセスの種類を変えることができないという問題点であ
る。
That is, a different address space is assigned to each thread by using the protection function of each address space,
Only the part that can be accessed by the thread will be placed in each address space. This has a large overhead and is not practical. The above is the first problem,
In other words, the type of access permitted for each thread in one program cannot be changed.

【0007】さらにスレッド毎にアドレス空間を作るた
めには、それぞれの仮想空間ごとにページテーブルを用
意しなければならず、同じプログラムは別々のアドレス
空間内でも同じ位置に置かなければならないが、こうす
ると複数のスレッドで共通にアクセスできる領域につい
ても、アクセスが許されるスレッド全てが、同じ論理−
物理アドレスの変換情報を重複してぺージテーブル中に
持たなければならないため、ページテーブルとして使う
メモリが無駄である。
In order to create an address space for each thread, a page table must be prepared for each virtual space, and the same program must be placed in the same position in different address spaces. Then, even for areas that can be accessed in common by multiple threads, all threads that are allowed access have the same logic-
Since it is necessary to duplicate the physical address conversion information in the page table, the memory used as the page table is wasted.

【0008】もちろん、複数のスレッドで共通にアクセ
スできる領域の、許されるアクセス方法が同じであれ
ば、それらのスレッドで、一つのページテーブルの部分
を共有することは出来、ページテーブルとして使うメモ
リの無駄をなくすことが出来るが、この場合でもTLB
(Translation Look-aside Buffer) のようなページテー
ブルのキャッシュを使っている場合には、無駄が発生
し、アドレス変換の平均速度を低下させる。
Of course, as long as the permitted access methods of the areas commonly accessed by a plurality of threads are the same, those threads can share one page table portion and the memory used as a page table can be shared. Waste can be eliminated, but even in this case TLB
When a page table cache such as (Translation Look-aside Buffer) is used, waste occurs and the average speed of address translation is reduced.

【0009】その理由を説明すると、まず、ページテー
ブルのキャッシュの1エントリは、ページテーブルの情
報とスレッド番号を組にして持っているため、スレッド
が違えば、ページテーブルの情報が全く同じでも、異な
るキャッシュエントリを使うことになる。
To explain the reason, first, since one entry in the page table cache has a pair of page table information and thread number, if the thread is different, the page table information is exactly the same. Will use a different cache entry.

【0010】したがって、同じ論理−物理アドレス対を
なすが、スレッド番号の異なるものがキャッシュの複数
のエントリを占有してしまうことになり、ページテーブ
ルのキャッシュ内に格納できる物理アドレスの種類が少
なくなってしまい、キャッシュの大きさが小さくなった
のと同等に、アドレス変換の速度の低下が起こる。
Therefore, the same logical-physical address pair but different thread numbers occupy a plurality of entries in the cache, and the types of physical addresses that can be stored in the page table cache are reduced. As much as the size of the cache is reduced, the speed of address translation is reduced.

【0011】さらに、複数のページテーブルに置かれた
同じページに対する情報を管理しなければならないた
め、ページングの処理が複雑になるという問題点があ
る。例えば、複数のスレッドが同じ物理ページをそれぞ
れの仮想アドレス空間にマッピングしている時に、その
ページをページアウトしようとすると、その物理ページ
をマッピングしている全ての仮想空間を探して、そのペ
ージに対応するページテーブルのエントリを無効化する
処理が必要になる。
Further, since the information for the same page placed in a plurality of page tables must be managed, the paging process becomes complicated. For example, if multiple threads are mapping the same physical page to their virtual address spaces and you try to page out that page, all virtual spaces that map that physical page will be searched for and It is necessary to invalidate the corresponding page table entry.

【0012】また、ページインする時も、ページインし
ようとしている物理ページを共有する全てのアドレス空
間の、そのページに対応するページテーブルのエントリ
を直さなければならない。これらの処理時間が平均アド
レス変換時間に加算される。以上が第2の問題点、つま
り、ページテーブルや、ページテーブルのキャッシュの
メモリが無駄になり、かつ、管理が複雑になり非効率で
あるという問題点である。
Further, at the time of page-in, it is necessary to correct the entry of the page table corresponding to the page in all address spaces sharing the physical page to be page-in. These processing times are added to the average address conversion time. The above is the second problem, namely, the problem that the page table and the cache memory of the page table are wasted, and the management becomes complicated and inefficient.

【0013】さらに、別の方法として一つのアドレス空
間を複数の領域に分けて、スレッドがどの領域のプログ
ラムを実行しているかによって、そのスレッドの持つ権
限を変える、ということが、アプリケーションによって
は有効である。例えば、領域Aのデータを変えられるの
は、別のある領域Bにあるプログラムを実行しているス
レッドに限る(領域Cにあるプログラムを実行している
スレッドは領域Aのデータを変えられない)ようにすれ
ば、領域Aのデータを、一定の条件を保ちながら変更す
ることが可能となる。領域Aにデータベースのデータ、
領域Bにデータベースのプログラムでそのデータへのア
クセスルーチンを入れておけば、デ−タベ−ス処理に関
して、データベースのデータを保護しつつ、且つ、OS
を介することなく、そのデータをアクセスできるため、
高速なアクセスが可能となる。
Further, as another method, it is effective for some applications to divide one address space into a plurality of areas and change the authority of the thread depending on which area of the program the thread is executing. Is. For example, the data in area A can be changed only by the thread executing the program in another area B (the thread executing the program in area C cannot change the data in area A). By doing so, it becomes possible to change the data in the area A while maintaining a certain condition. Database data in area A,
If an access routine for accessing the data is put in the area B by a database program, the database data is protected in the database processing, and the OS is
Because you can access that data without going through
High-speed access is possible.

【0014】しかし、従来のメモリ管理装置(例えばイ
ンテル社の80486プロセッサ)では、一つのスレッ
ドが実行するプログラムの範囲をセグメント方式等を利
用することによって限定し、かつ、コールゲートを利用
して異なるアクセスレベルに移ることによってアクセス
権限を変えることは出来たが、アクセスレベルは、順序
関係を持ち、レベルが上がった場合にはそのレベル以下
でアクセス可能な領域は全てアクセスできるというもの
であり、かつハードウェアによってレベルの数を限定さ
れてしまうため、アプリケーションプログラムとOSと
カーネルといったような順序関係をもったアクセス権の
制御しか利用できないなど柔軟性に欠けるという欠点が
あった。
However, in the conventional memory management device (for example, the Intel 80486 processor), the range of the program executed by one thread is limited by using the segment method or the like, and is different by using the call gate. Although it was possible to change the access authority by moving to the access level, the access level has an order relation, and when the level increases, all areas accessible below that level can be accessed, and Since the number of levels is limited by hardware, there is a drawback that it lacks flexibility such that only the control of access rights having an order relation such as an application program, an OS and a kernel can be used.

【0015】以上が第三の問題点、つまり一つのアドレ
ス空間中に複数の領域に分けてプログラムやデータ等を
配置した場合、領域毎に許されるアクセスの種類を柔軟
に変えることができないという問題点である。
The above is the third problem, that is, when programs and data are arranged in a plurality of areas in one address space, the type of access permitted for each area cannot be flexibly changed. It is a point.

【0016】[0016]

【発明が解決しようとする課題】このように、従来のメ
モリ管理装置で、一つのアドレス空間内を実行する複数
の実行主体(スレッド)の間で保護を行おうとすると、
同じ物理ページをマッピングしているアドレス空間が多
数あるため、ページングを行なう場合には、全てのアド
レス空間を探して、そのページがマッピングされている
ものを見つけ、それらに対してページングの処理を行な
わなければならない等、オーバヘッドが大きいという第
1の問題点があった。
As described above, in the conventional memory management device, when protection is performed among a plurality of execution subjects (threads) executing in one address space,
Since there are many address spaces that map the same physical page, when paging is performed, all address spaces are searched, the ones to which the page is mapped are searched, and the paging process is performed for them. There is a first problem that the overhead is large because it must be done.

【0017】さらに、同じ物理アドレスに対してページ
テーブル中の多くのエントリを占有するために、他の物
理アドレスに対するアドレス変換を阻害することにな
り、また、ページテーブルのエントリが複数のプログラ
ムから共有されているか否かに関わらず無効化されてし
まい、エントリを満たすための不必要な処理が行なわれ
る欠点があった。また、複数のプログラムが持つアクセ
スの権利の正しさを同時に検査しなければならない場合
に、係る検査にかかる処理が複雑になってしまうという
欠点があった。つまり、ページテーブルやページテーブ
ルキャッシュに同じ情報が複数置かれてしまい、メモリ
が無駄になり、キャッシュの効果が薄れ、非効率である
という第2の問題点があった。
Further, since many entries in the page table for the same physical address are occupied, address translation for other physical addresses is hindered, and the page table entry is shared by a plurality of programs. There is a drawback that it is invalidated regardless of whether it has been done, and unnecessary processing is performed to fill the entry. In addition, when the correctness of the access right possessed by a plurality of programs must be simultaneously checked, there is a drawback in that the processing involved in the checking becomes complicated. That is, there is a second problem that the same information is plurally stored in the page table and the page table cache, the memory is wasted, the effect of the cache is weakened, and the efficiency is inefficient.

【0018】また、一つのアドレス空間を複雑の領域に
分けて、スレッドがどの領域のプログラムを実行してい
るかによって、そのスレッドの権限を変える、というこ
とは、従来のメモリ管理装置では、柔軟に行なえないと
いう第3の問題点があった。
Further, dividing one address space into complicated areas and changing the authority of the thread depending on which area of the program the thread is executing means that the conventional memory management device is flexible. There was a third problem that it could not be done.

【0019】本発明は、上記事情に鑑みなされたもの
で、複数のプログラムで共有されるアドレス空間の管理
を行ない、メモリアクセスに対してアクセス権限の制御
を適切に行なうことが出来、しかもアドレス変換時間を
延長することもないメモリ管理装置を提供することを目
的とする。
The present invention has been made in view of the above circumstances, and manages an address space shared by a plurality of programs, can appropriately control access authority for memory access, and can also perform address translation. It is an object to provide a memory management device that does not extend time.

【0020】[0020]

【課題を解決するための手段】上記第一の問題点を解決
する本発明に係るメモリ管理装置は、複数のスレッド
(実行主体)を起動して仮想空間に割り付けられたプロ
グラムを並行して実行する計算機に設けられ、論理アド
レスから物理アドレスへの変換を行なうものであって、
現在プログラムを実行しているスレッドの番号を記憶す
る手段と、前記論理アドレスをどのスレッドがアクセス
可能かを示す情報を記憶する手段と、前記スレッド番号
を持つスレッドが前記論理アドレスへアクセスしようと
する場合に前記アクセス可能かを示す情報を用いて前記
アクセスをしようとしているスレッドにアクセスの権限
があるか否かを検証する検証手段とを具備し、この検証
手段によりアクセスの正当性が保証された場合に前記論
理アドレスから物理アドレスへの変換結果を出力するこ
とを特徴とする。
A memory management apparatus according to the present invention which solves the first problem described above activates a plurality of threads (execution subjects) to execute programs allocated to a virtual space in parallel. Is provided in the computer for converting the logical address to the physical address,
Means for storing the number of the thread currently executing the program, means for storing information indicating which thread can access the logical address, and a thread having the thread number attempts to access the logical address. In this case, a verification means for verifying whether or not the thread trying to access is authorized to access by using the information indicating whether the access is possible, and the validity of the access is guaranteed by this verification means. In this case, the conversion result from the logical address to the physical address is output.

【0021】上記第二の問題点を解決する本発明に係る
メモリ管理装置は、仮想空間に割り付けられたプログラ
ムを実行する計算機に設けられ、アドレス変換テーブル
に保持されている複数のアドレスに対して指示されたア
ドレスとの一致を検出し、該一致が検出された際に前記
指示されたアドレスと対になるアドレスを出力する手段
を有するものであって、前記アドレス変換テーブル中の
アドレス対の各々に対して複数個のアクセス保護情報を
記憶する手段と、前記複数個のアクセス保護情報を参照
し、実行中のプログラムの仮想空間内の位置からのある
いはプログラムを実行中のスレッド(実行主体)による
前記指示されたアドレスへのアクセスが許可されるか否
かを検証する手段と、前記検証結果を出力する手段とを
具備したことを特徴とする。
A memory management device according to the present invention which solves the second problem described above is provided in a computer that executes a program assigned to a virtual space, and is provided for a plurality of addresses held in an address translation table. A means for detecting a match with an instructed address and outputting an address paired with the instructed address when the match is detected, each of the address pairs in the address conversion table; A means for storing a plurality of access protection information, and a thread (execution subject) from a position in the virtual space of the program being executed or executing the program with reference to the plurality of access protection information. It is characterized by comprising means for verifying whether or not access to the designated address is permitted, and means for outputting the verification result. To.

【0022】上記第三の問題点を解決する本発明に係る
メモリ管理装置は、複数の領域に分割された仮想空間に
割り付けられたプログラムを実行する計算機に設けら
れ、論理アドレスから物理アドレスへの変換を行なうも
のであって、前記論理アドレスをアクセスするプログラ
ムの置かれている領域がどれであるかを検知する手段
と、前記論理アドレスが前記仮想空間中のどの領域に置
かれているプログラムからアクセス可能かを表す情報を
記憶する手段と、プログラム実行中に前記論理アドレス
へのアクセス命令が出現した場合に前記アクセス可能か
を表す情報を用いて前記アクセス命令が置かれている領
域からのアクセスが正当か否かを検証する検証手段とを
具備し、この検証手段によりアクセスの正当性が保証さ
れた場合に、前記論理アドレスから物理アドレスへの変
換結果を出力することを特徴とする。
A memory management device according to the present invention which solves the third problem described above is provided in a computer that executes a program allocated to a virtual space divided into a plurality of areas, and is used to convert a logical address to a physical address. A means for performing conversion, which detects a region in which a program accessing the logical address is located, and a program in which the logical address is located in the virtual space. Means for storing information indicating accessibility, and access from the area where the access instruction is placed using the information indicating accessibility when an access instruction to the logical address appears during program execution And a verification means for verifying whether or not is valid, and when the validity of the access is guaranteed by this verification means, the logic And outputs a conversion result from the dress to physical addresses.

【0023】[0023]

【作用】第1の発明によれば、メモリ管理装置中にアド
レス空間中の各領域(位置)に対してスレッドごとのア
クセス可否を示す情報があり、更に現在実行中のスレッ
ドを識別できるので、現在実行中のスレッドがアクセス
先の領域(位置)にアクセスできる権限があるかの検証
を行うことで、同じアドレス空間中の異なるスレッドご
とのアクセス制御が可能となる。
According to the first aspect of the present invention, since there is information indicating whether or not each thread can access each area (position) in the address space in the memory management device, the currently executing thread can be identified. By verifying whether the currently executing thread has the right to access the area (position) of the access destination, access control for each different thread in the same address space becomes possible.

【0024】ここで、スレッドとは実行主体であり、C
PUの割り合て単位である。つまりOSはスレッド番号
ごとにCPUのレジスタ等のメモリ以外に現在の実行を
制御する情報を管理する。OS中にはこれらの情報を退
避するメモリ領域があり、スレッドを切り替える時はこ
の領域の内容とCPUのレジスタ等とを入れかえること
で実行の切替えを実現する。コンテクストとも呼ばれ
る。
Here, a thread is an execution subject, and C
It is a unit of proportion of PU. That is, the OS manages information for controlling the current execution in addition to the memory such as the register of the CPU for each thread number. The OS has a memory area for saving these pieces of information, and when switching threads, the contents of this area and the registers of the CPU are exchanged to realize execution switching. Also called the context.

【0025】第2の発明によれば、メモリ管理装置中の
ページテーブル(論理アドレスと物理アドレスの対応
表)の各エントリに対応して複数のアクセス保護情報を
保持することができるので、従来の方式のように単一の
アクセス情報しか保持できないもので構成するのと比較
してページテーブル及びそのキャッシュのメモリ使用量
が大巾に減り、効率が向上する。
According to the second aspect of the invention, a plurality of access protection information can be held corresponding to each entry of the page table (correspondence table of logical addresses and physical addresses) in the memory management device. The memory usage of the page table and its cache is greatly reduced, and the efficiency is improved, as compared with a system that can hold only a single access information as in the method.

【0026】第3の発明によれば、メモリ管理装置中に
アドレス空間の各領域(位置)に対してどの領域からア
クセスできるかを示す情報があり、更に現在実行中の領
域を識別できるので、現在実行中のプログラムがアクセ
ス先の領域(位置)にアクセスできる権限があるかの検
証が行え、同じアドレス空間中の異なる領域ごとのアク
セス制御が可能となる。
According to the third aspect of the invention, the memory management device has information indicating from which area each area (position) of the address space can be accessed, and the area currently being executed can be identified. It is possible to verify whether the currently executing program has the right to access the area (position) of the access destination, and it is possible to perform access control for different areas in the same address space.

【0027】[0027]

【実施例】【Example】

[実施例1]以下、本発明の一実施例を図面に従い説明
する。
[Embodiment 1] An embodiment of the present invention will be described below with reference to the drawings.

【0028】図1は、同実施例のメモリ管理装置の全体
構成を示すものである。この場合、メモリ管理装置1
は、アドレス変換装置2、TLB(Translation Look-as
ide Buffer) チェック装置3、スレッド番号記憶部4、
ORゲート5からなるProtection fault信号生成回路か
ら構成されている。
FIG. 1 shows the overall configuration of the memory management device of the same embodiment. In this case, the memory management device 1
Is the address translation device 2, TLB (Translation Look-as
ide Buffer) checking device 3, thread number storage unit 4,
It is composed of a protection fault signal generation circuit including an OR gate 5.

【0029】そして、メモリ管理装置1は、図示しない
CPUから論理ページ番号、すなわち論理アドレスの上
位20ビット11、現在実行中の命令が存在する論理ア
ドレスつまり、一命令前のプログラムカウンタPC(以
下LPCと略す)の上位20ビット12、CPUのメモ
リアクセスのモードの3ビット13を取り込み、物理ペ
ージ番号、すなわち物理アドレスの上位20ビット14
を出力するようにしている。この場合、現在実行してい
るスレッド番号をスレッド番号記憶部4に保存するとと
もに、論理アドレスの上位20ビット11、LPCの上
位20ビット12、CPUのメモリアクセスモードの3
ビット13およびスレッド番号記憶部4に記憶されてい
る現在実行しているスレッド番号が、アドレス変換装置
2とTLBチェック装置3に同時に与えられ、2つのモ
ジュールが同じアドレス変換を並行して行なうようにな
る。
Then, the memory management device 1 receives a logical page number from the CPU (not shown), that is, the upper 20 bits of the logical address, the logical address at which the instruction currently being executed exists, that is, the program counter PC one instruction before (hereinafter LPC). Abbreviated) and the 3 bits 13 of the memory access mode of the CPU are fetched, and the physical page number, that is, the upper 20 bits 14 of the physical address
Is output. In this case, the currently executed thread number is stored in the thread number storage unit 4, and the upper 20 bits 11 of the logical address, the upper 20 bits 12 of the LPC, and the memory access mode 3 of the CPU are set.
The currently executed thread number stored in bit 13 and the thread number storage unit 4 is simultaneously given to the address translation device 2 and the TLB check device 3 so that the two modules perform the same address translation in parallel. Become.

【0030】ここで、アドレス変換装置2は、ページテ
ーブル(主記憶上に存在するアドレス変換テーブル)を
使って論理ページ番号を物理ページ番号に変換する。一
方、TLBチェック装置3は、TLB内にキャッシュさ
れている論理アドレスと物理アドレスの対応の中に目的
とする論理アドレスが存在するかを調べ、見つかった時
にはそれに対応する物理ページ番号を出力するととも
に、アドレス変換装置2に対してTLBヒットを16を
送る。
Here, the address translation device 2 translates a logical page number into a physical page number using a page table (address translation table existing in the main memory). On the other hand, the TLB checking device 3 checks whether or not the target logical address exists in the correspondence between the logical address and the physical address cached in the TLB, and when found, outputs the physical page number corresponding to it. , Sends a TLB hit of 16 to the address translation device 2.

【0031】そして、アドレス変換装置2がTLBヒッ
ト16を受けとった時は、論理ページ番号を物理ページ
番号に変換するアドレス変換操作を中止する。また、T
LBチェック装置3が、目的とする論理ページ番号をT
LB内で見つけられなかった時は、TLBmissの信号線
17をアサートし、アドレス変換装置2によって変換が
行なわれるのを待ち、最終段である第3段目のアドレス
変換テーブルのエントリが見つかったところで、その内
容をTLBに保存し、その中から物理ページ番号を出力
する。アドレス変換装置2において、目的の論理アドレ
スに対応するページテーブルエントリが存在しないこと
が判明した場合は、ページフォルト18を発生してCP
Uに割り込む。また、両モジュールのいずれかにおい
て、アドレス変換の最中に、そのアドレスに対するアク
セスが許されないということが判明した時には、プロテ
クションフォルト19を発生しCPUに割り込む。
When the address translation device 2 receives the TLB hit 16, the address translation operation for translating the logical page number into the physical page number is stopped. Also, T
The LB check device 3 sets the target logical page number to T
When the address is not found in the LB, the TLBmiss signal line 17 is asserted, the translation by the address translation device 2 is waited for, and the entry in the address translation table at the third stage, which is the final stage, is found. , Its contents are stored in the TLB, and the physical page number is output from it. When it is determined that the page table entry corresponding to the target logical address does not exist in the address translation device 2, a page fault 18 is generated and the CP
Interrupt U. Further, when it is found that access to the address is not permitted during address translation in either of the modules, a protection fault 19 is generated and the CPU is interrupted.

【0032】図2は、TLBチェック装置3の概略構成
を示すものである。この場合、TLB31のエントリの
構成要素は、論理ページ番号311、物理ページ番号3
12、ページの属性を示す5個のフラグ313、31
4、315、316、317と、3組のスレッド番号3
18、LPC上位20ビット319、これらスレッドに
対して許されるアクセスの種類であるRWX(Rは読み
込み権,Wは書き込み権,Xは実行権を示す)のパーミ
ッションの組からなっている。以下の説明では、スレッ
ド番号318、LPC上位20ビット319、RWXの
パーミッションの組を、アクセス・コントロール・リス
ト、略してACLと呼ぶことにする。このALCは、ど
のプログラムがどの論理ページ上のコードを実行してい
る時に、これからアクセスしようとする論理ページに対
してどのようなアクセスが許されているかということを
示すものである。
FIG. 2 shows a schematic configuration of the TLB check device 3. In this case, the components of the entry of the TLB 31 are the logical page number 311 and the physical page number 3
12, five flags 313 and 31 indicating page attributes
4, 315, 316, 317 and 3 sets of thread number 3
18, LPC upper 20 bits 319, and a set of permissions of RWX (R indicates a read right, W indicates a write right, and X indicates an execute right), which is the type of access permitted to these threads. In the following description, a set of the thread number 318, the LPC upper 20 bits 319, and the RWX permission will be referred to as an access control list, or ACL for short. This ALC indicates what kind of access is permitted to the logical page to be accessed when which program is executing code on which logical page.

【0033】この場合、TLBエントリにはさらにフラ
グ領域があり、フラグ(V)313はTLBのエントリ
が有効であるか否かを示すバリッドフラグ、フラグ
(D)314はページが変更されたかを示すダーティフ
ラグ、フラグ(R)315はページがアクセスされたか
を示すリファレンスドフラグ、フラグ(M)316はペ
ージに対するACLがTLB内に存在する3組以外に存
在するか否かを示すモアフラグ、フラグ(E)317は
ページのACLのチェックを行なうかどうかを示すイネ
ーブルフラグEからなっている。また、ACLは、スレ
ッド番号318、LPC上位20ビット319に対して
3個のフラグ320、321、322を持っている。こ
の場合、フラグ(PE)320はスレッド番号の比較を
行なうか否かを示し、フラグ(TE)321はLPC上
位20ビットによる比較を行なうか否かを示し、フラグ
(B)322はスレッド番号の比較を行なう際にスレッ
ド番号の一致のみを調べるか、あるいはスレッド番号の
大小関係を調べるかを示している。
In this case, the TLB entry further has a flag area, the flag (V) 313 indicates a valid flag indicating whether the TLB entry is valid, and the flag (D) 314 indicates whether the page has been changed. A dirty flag, a flag (R) 315 is a referenced flag indicating whether the page has been accessed, and a flag (M) 316 is a more flag indicating whether or not the ACL for the page exists in a group other than the three sets existing in the TLB, and a flag ( E) 317 includes an enable flag E indicating whether or not to check the ACL of the page. Further, the ACL has three flags 320, 321, and 322 for the thread number 318 and the LPC upper 20 bits 319. In this case, the flag (PE) 320 indicates whether or not to compare the thread numbers, the flag (TE) 321 indicates whether or not to perform comparison by the upper 20 bits of the LPC, and the flag (B) 322 indicates the thread number. It indicates whether to check only the matching of thread numbers or to check the magnitude relationship of thread numbers when performing comparison.

【0034】しかして、外部からの論理ページ番号の2
0ビット11によりTLB31のエントリを特定する
と、スレッド番号の20ビット15、LPCの上位20
ビット12、CPUのアクセスモードの3ビット13が
連結器32、33で連結され、43ビットの出力331
が得られ、これとTLB31内にキャッシュされている
ACLとの比較が3個の比較器34、35、36を使っ
て行われるようになる。ここで、LPCの上位20ビッ
ト12は、後述する仮想空間の領域の領域番号の一例で
ある。
Therefore, the logical page number of 2 from the outside
When the entry of TLB 31 is specified by 0 bit 11, 20 bits of thread number, upper 20 of LPC
Bit 12 and 3 bits 13 of the access mode of the CPU are connected by the couplers 32 and 33, and the output 331 of 43 bits
Is obtained, and this is compared with the ACL cached in the TLB 31 by using the three comparators 34, 35 and 36. Here, the upper 20 bits 12 of the LPC is an example of the area number of the area of the virtual space described later.

【0035】図3は、比較器34、35、36の概略構
成を示している。この場合、比較器34、35、36
は、まったく同じものなので、ここでは比較器34につ
いてのみ述べると、加算器341、342、アンドゲー
ト343〜346、オアゲート347、348、ノアゲ
ート349、350から構成されている。
FIG. 3 shows a schematic configuration of the comparators 34, 35 and 36. In this case, the comparators 34, 35, 36
Are the same as each other, so that only the comparator 34 will be described here. It is composed of adders 341 and 342, AND gates 343 to 346, OR gates 347 and 348, and NOR gates 349 and 350.

【0036】そして、このような比較器34は、ACL
のフラグ(PE)320を0にすることで、スレッド番
号によるアクセス条件のチェックを省くことができ、全
てのスレッドに共通のアクセス許可を与えることができ
るようにしている。また、フラグ(TE)321を0に
した場合は、LPCの値によるアクセス条件の判定を行
なわず、ACLのエントリに書かれているスレッド番号
をもつスレッドは、LPCの値に関わらず、そのページ
へのアクセス許可を与えることができるようにしてい
る。また、フラグ(B)322を1にした場合は、現在
実行されているスレッド番号がACLのプログラム番号
よりも大きいか等しい時に、スレッド番号によるアクセ
ス条件を満たしているものとし、フラグ(B)322が
0の時は、二つのスレッド番号が等しい時に限り、スレ
ッド番号によるアクセス条件を満たすようにしている。
また、フラグ(B)322を1にすることにより、スレ
ッド番号をリング保護におけるレベルとして使い、スレ
ッド番号が大きいスレッドに対してより強い権利を与え
るようにしている。
Then, such a comparator 34 has an ACL
By setting the flag (PE) 320 of 1 to 0, it is possible to omit the check of the access condition by the thread number, and to give common access permission to all threads. Further, when the flag (TE) 321 is set to 0, the access condition is not determined based on the LPC value, and the thread having the thread number written in the ACL entry has the page regardless of the LPC value. Allows you to give permission to. Further, when the flag (B) 322 is set to 1, it is assumed that the access condition by the thread number is satisfied when the currently executed thread number is greater than or equal to the ACL program number, and the flag (B) 322 is set. When is 0, the access condition by the thread number is satisfied only when the two thread numbers are equal.
Further, by setting the flag (B) 322 to 1, the thread number is used as a level in ring protection, and a stronger right is given to a thread having a large thread number.

【0037】そして、比較器32は、2本の出力信号線
351、352を有している。ここで、出力信号線35
2の出力は、現在実行されているスレッドのスレッド番
号とACL内に書かれているスレッド番号がマッチし、
且つ一つ前のプログラムカウンタPC(LPC)の上位
20ビットがACL内のプログラムカウンタLPCの上
位20ビットの値にマッチした場合にアサートされる。
すなわち、CPUによるメモリアクセスの条件がこのA
CLの条件と一致していることを示すようにしている。
また、出力信号線351の出力は、出力信号線352の
出力がアサートされ、且つCPUによるメモリアクセス
が、ACLによって許可されている種類のものであった
時にアサートされる。つまり、出力信号線351の出力
がアサートされれば、メモリアクセスは許可されること
になる。
The comparator 32 has two output signal lines 351 and 352. Here, the output signal line 35
In the output of 2, the thread number of the thread currently being executed matches the thread number written in the ACL,
And it is asserted when the upper 20 bits of the previous program counter PC (LPC) matches the upper 20 bits of the program counter LPC in the ACL.
That is, the condition of memory access by the CPU is A
It is shown that it matches the CL condition.
Further, the output of the output signal line 351 is asserted when the output of the output signal line 352 is asserted and the memory access by the CPU is of a type permitted by the ACL. That is, if the output of the output signal line 351 is asserted, the memory access is permitted.

【0038】そして、図2に戻って、各比較器34、3
5、36の出力信号線351の出力の論理和をとった結
果が1であれば、TLBエントリ内の3つのACLのう
ちの一つによってアクセスが許されたことになるので、
物理ページ番号14をイネーブルし、TLBヒット信号
線16がアサートされる。また、各比較器34、35、
36の出力信号線352の出力の論理和をとった結果が
1であり、出力信号線351の出力の論理和をとった結
果が0の場合は、TLBエントリ内の3つのACLのう
ち、現在のメモリアクセスの条件に一致するものが存在
するが、CPUによるメモリアクセスのモードがこのA
CLによって許されていない種類のものであったことを
示している。この場合には、信号線38がアサートさ
れ、プロテクションフォルト191がアサートされる。
Then, returning to FIG. 2, each of the comparators 34, 3
If the result of ORing the outputs of the output signal lines 351 of 5 and 36 is 1, it means that the access is permitted by one of the three ACLs in the TLB entry.
Physical page number 14 is enabled and TLB hit signal line 16 is asserted. In addition, each comparator 34, 35,
If the result of the logical sum of the outputs of the output signal lines 352 of 36 is 1 and the result of the logical sum of the outputs of the output signal line 351 is 0, among the three ACLs in the TLB entry, There are some memory access conditions that match the memory access conditions, but the memory access mode by the CPU is
It indicates that the type was not allowed by the CL. In this case, the signal line 38 is asserted and the protection fault 191 is asserted.

【0039】また、比較器34、35、36の出力信号
線352の出力の論理和をとった結果が0であり、TL
Bエントリのモアフラグ316が0の場合は、現在のメ
モリアクセス条件に一致するACLが存在しないことを
示している。この場合は信号線40がアサートされ、プ
ロテクションフォルト191がアサートされる。
The result of the logical sum of the outputs of the output signal lines 352 of the comparators 34, 35 and 36 is 0, and TL
When the more flag 316 of the B entry is 0, it indicates that there is no ACL that matches the current memory access condition. In this case, the signal line 40 is asserted and the protection fault 191 is asserted.

【0040】TLBエントリのイネーブルフラグ317
の値が0のときは、信号線41がアサートされTLBヒ
ット信号線16がアサートされる。よってACLのチェ
ックに関係なく物理ページ番号14を出力する。また、
TLBがヒットしなかった場合には、前述のようにTL
Bmiss信号線17がアサートされる。同時に動作してい
るアドレス変換装置2によって物理ページ番号が判明す
る可能性が残されているので、その結果を待つと同時に
ACLがチェックされる。
Enable flag 317 of TLB entry
, The signal line 41 is asserted and the TLB hit signal line 16 is asserted. Therefore, the physical page number 14 is output regardless of the ACL check. Also,
If TLB does not hit, TL as described above
The Bmiss signal line 17 is asserted. Since there is a possibility that the physical page number will be known by the address translation device 2 operating at the same time, the ACL is checked at the same time as waiting for the result.

【0041】さらにTLBにはヒットしたがACLのエ
ントリにはヒットせず、かつモアビット(M)316が
1の場合はACLmiss信号線20がアサートされる。同
時に動作しているアドレス変換装置2によってACLが
チェックされる。次に、図4はアドレス変換装置2の概
略構成を示している。
Further, when the TLB is hit but the ACL entry is not hit and the more bit (M) 316 is 1, the ACLmiss signal line 20 is asserted. The ACL is checked by the address translation device 2 operating at the same time. Next, FIG. 4 shows a schematic configuration of the address translation device 2.

【0042】この場合、第1段目のアドレス変換装置2
1、第2段目のアドレス変換装置22、第3段目のアド
レス変換装置23により構成されている。そして、この
ようなアドレス変換装置2は、スレッド番号の20ビッ
ト15、LPCの上位20ビット12、CPUのアクセ
スモードの3ビット13と論理ページ番号の20ビット
11を取り込み、論理ページ番号の20ビット11に対
応する物理ページのページテーブルエントリ24を出力
するようにしている。また、TLBヒット16、プロテ
クションフォルト191を受け取った場合はアドレス変
換を中止するようにもしている。さらに、アドレス変換
の途中で、目的とする論理ページに対応する物理ページ
が存在するが、アクセスのモードが許されない種類のも
のであることが判明した場合にはプロテクションフォル
ト192を出力し、アドレス変換の途中で目的とする論
理ページに対応する物理ページが存在しないことが判明
した場合にはページフォルト18を出力するようにして
いる。第1段目のアドレス変換装置21では、ルートポ
インタ25と論理ページ番号の上位7ビット111を使
って第1段ページテーブルのエントリを決定する。
In this case, the first-stage address translation device 2
The first-stage address translation device 22 and the third-stage address translation device 23 are included. Then, such an address translation device 2 takes in 20 bits 15 of the thread number, upper 20 bits 12 of the LPC, 3 bits 13 of the access mode of the CPU and 20 bits 11 of the logical page number, and takes 20 bits of the logical page number. The page table entry 24 of the physical page corresponding to 11 is output. Further, when the TLB hit 16 and the protection fault 191 are received, the address translation is stopped. Furthermore, in the middle of address translation, if a physical page corresponding to the target logical page exists, but it is found that the access mode is of a type that is not permitted, a protection fault 192 is output and the address translation is performed. When it is determined that the physical page corresponding to the target logical page does not exist in the middle of, the page fault 18 is output. The first-stage address translation device 21 determines the entry of the first-stage page table using the root pointer 25 and the upper 7 bits 111 of the logical page number.

【0043】第2段アドレス変換装置22では、第1段
アドレス変換装置21によって判明した第2段ページテ
ーブルの先頭アドレス26と論理ページ番号の上位8ビ
ット目から上位13ビット目までの7ビットによって示
されるページテーブル内のエントリ番号112を使って
第2段ページテーブルのエントリを決定する。
In the second stage address translation unit 22, the first address 26 of the second stage page table found by the first stage address translation unit 21 and the 7 bits from the upper 8th bit to the upper 13th bit of the logical page number are used. The entry number 112 in the page table shown is used to determine the entry in the second page table.

【0044】第3段アドレス変換装置23では、第2段
アドレス変換装置22によって判明した第3段ページテ
ーブルの先頭アドレス27と論理ページ番号の下位6ビ
ットで示されるページテーブル内のエントリ番号113
を使って第3段ページテーブルのエントリを決定する。
図5は、第1段目アドレス変換装置21および第2段目
のアドレス変換装置22の概略構成を示している。
In the third stage address translation device 23, the entry number 113 in the page table indicated by the top address 27 of the third stage page table and the lower 6 bits of the logical page number found by the second stage address translation device 22.
Is used to determine the entry in the third page table.
FIG. 5 shows a schematic configuration of the first-stage address translation device 21 and the second-stage address translation device 22.

【0045】この場合、アドレス変換装置21、22
は、スレッド番号の20ビット15、LPCの上位20
ビット12、CPUのアクセスモードの3ビット13を
連結させた43ビットの信号線211、TLBヒット1
6、論理ページ番号の連続する7ビットの部分111
(112)、ルートポインタ25(先頭アドレス26)
を取り込み、このうちの論理ページ番号の連続する7ビ
ットの部分111(112)、ルートポインタ25(先
頭アドレス26)をアドレス合成器212で合成するこ
とにより、この論理ページ番号に対するページテーブル
エントリ213のアドレスを得るようにしている。
In this case, the address translation devices 21, 22
Is the 20th bit of the thread number 15 and the upper 20 of the LPC
43-bit signal line 211 that connects bit 12 and CPU access mode bit 3 13; TLB hit 1
6, 7-bit portion 111 of consecutive logical page numbers
(112), route pointer 25 (start address 26)
Is taken in, and the 7-bit portion 111 (112) in which the logical page number is continuous and the root pointer 25 (start address 26) are combined by the address combiner 212, whereby the page table entry 213 corresponding to this logical page number is stored. I'm trying to get the address.

【0046】ページテーブルエントリ213は、次レベ
ルページテーブルへのポインタ2131、3種類のフラ
グ2132〜2134、3組のACL、そのページテー
ブルエントリに対するACLが3組を越える場合に残り
のACLの置かれている場所を指すポインタ2135に
よって構成されている。
The page table entry 213 is provided with a pointer 2131 to the next level page table, three types of flags 2132 to 2134, three sets of ACLs, and the remaining ACLs when the ACL for the page table entry exceeds three sets. It is composed of a pointer 2135 that points to the place where

【0047】ここで、3種類のフラグ2132〜213
4のうちバリッドフラグ(V)2132は、ページテー
ブルエントリが有効であるかを示している。モアフラグ
(M)2133は、そのページに対応するACLがペー
ジテーブルエントリ内に存在する3組以外に存在するか
否かを示している。イネーブルフラグ(E)2134
は、ACLのチェックを行なうか否かを示している。
Here, three types of flags 2132 to 213 are set.
The valid flag (V) 2132 out of 4 indicates whether the page table entry is valid. The more flag (M) 2133 indicates whether or not the ACL corresponding to the page exists in a group other than the three sets existing in the page table entry. Enable flag (E) 2134
Indicates whether to check the ACL.

【0048】ページテーブルエントリの位置が決まる
と、バリッドフラグ2132の内容を調べ、この値が0
であれば、ページフォルト18を出力し、アドレス変換
中止装置227を起動し、アドレス変換を中止する。
When the position of the page table entry is determined, the contents of the valid flag 2132 are checked and this value is set to 0.
If so, the page fault 18 is output, the address translation stop device 227 is activated, and the address translation is stopped.

【0049】また、43ビットの信号線211の入力と
3個のACLの内容214、215、216を3つの比
較器217、218、219を使って同時に比較し、こ
の比較の結果によりアクセスが許可されることが判明し
た場合は、信号220がアサートされ、次レベルページ
テーブルへのポインタ2131の値がイネーブルされ
る。また、アクセスが不許可であることが判明した場合
は、信号221がアサートされプロテクションフォルト
192が出力される。
Further, the input of the 43-bit signal line 211 and the contents 214 of the three ACLs 214, 215 and 216 are simultaneously compared by using the three comparators 217, 218 and 219, and access is permitted according to the result of this comparison. If so, signal 220 is asserted and the value of pointer 2131 to the next level page table is enabled. If it is determined that the access is not permitted, the signal 221 is asserted and the protection fault 192 is output.

【0050】一方、現在のアクセス条件に一致するAC
Lが3つのものの中から見つからなかった場合は、モア
フラグ2133を調べる。そして、モアフラグ2133
が0であった場合には、ACLが他にないことを示して
いるので、アクセスの許可がなされないことになり、信
号223がアサートされ、プロテクションフォルト19
2を出力するようになる。また、モアフラグ2133が
1であった場合は他にもACLが存在していることにな
るので、信号224がアサートされ、ACL切替装置2
25を使って、次ACLへのポインタ2135によって
指示されている次ページテーブルエントリ226のAC
Lの組に切替えて再び比較を行なうようになる。
On the other hand, an AC that matches the current access condition
If L is not found among the three, the more flag 2133 is checked. Then, the more flag 2133
Is 0, it means that there is no other ACL, so that the access is not permitted, the signal 223 is asserted, and the protection fault 19
2 will be output. Further, when the more flag 2133 is 1, it means that there is another ACL, so the signal 224 is asserted, and the ACL switching device 2
25 of the next page table entry 226 pointed to by the next ACL pointer 2135.
The group is switched to L and the comparison is performed again.

【0051】この場合、ポインタ2135によって指示
されているACLの組の中に現在のアクセス条件に一致
するものがさらになかった場合には、モアビット226
2が1であるかを調べ、1であれば、再びACL切替装
置225によって次ACLへのポインタ2261によっ
て指される次ページテーブルエントリのACLの組に切
替えて再比較するようになる。なお、TLBヒット16
を受け取った場合はアドレス変換中止装置227により
変換処理を中止するようになる。図6は、第3段目のア
ドレス変換装置23の概略構成を示している。
In this case, if there is no more ACL set pointed to by the pointer 2135 that matches the current access condition, the more bit 226.
It is checked whether 2 is 1, and if it is 1, the ACL switching device 225 switches again to the ACL set of the next page table entry pointed to by the pointer 2261 to the next ACL, and re-comparisons are performed. In addition, TLB hit 16
When the address conversion is received, the address conversion stop device 227 stops the conversion process. FIG. 6 shows a schematic configuration of the third-stage address translation device 23.

【0052】この場合、アドレス変換装置23は、スレ
ッド番号の20ビット15、LPCの上位20ビット1
2、CPUのアクセスモードの3ビット13を連結させ
た43ビットの信号線231、TLBヒット16、論理
ページ番号の下位6ビットの部分113、先頭アドレス
27を取り込み、このうちの論理ページ番号の下位6ビ
ットの部分113と先頭アドレス27とをアドレス合成
器232で合成することにより、この論理ページ番号に
対応するページテーブルエントリ233のアドレスを得
るようにしている。
In this case, the address translation device 23 uses 20 bits 15 of the thread number and 1 higher 20 bits of the LPC.
2, the 43-bit signal line 231, which connects the 3 bits 13 of the CPU access mode, the TLB hit 16, the lower 6-bit portion 113 of the logical page number, and the start address 27 are taken in, and the lower logical page number By synthesizing the 6-bit portion 113 and the head address 27 by the address synthesizer 232, the address of the page table entry 233 corresponding to this logical page number is obtained.

【0053】ページテーブルエントリ233は、物理ペ
ージ番号2331、5種類のフラグ2332〜233
6、3組のACL、そのページテーブルエントリに対す
るACLが3組を越える場合に残りのACLの置かれて
いる場所を指すポインタ2337によって構成されてい
る。
The page table entry 233 has a physical page number 2331 and five types of flags 2332 to 233.
6 and 3 sets of ACLs, and a pointer 2337 pointing to the place where the remaining ACLs are placed when the ACLs for the page table entries exceed 3 sets.

【0054】ここで、3種類のフラグ2132〜213
4のうちバリッドフラグ(V)2332はページテーブ
ルエントリが有効であるかを示している。ダーティフラ
グ(D)2333はページが変更されたか否かを示して
いる。リファレンスドフラグ(R)2334はページに
対してアクセスがなされたか否かを示している。モアフ
ラグ(M)2335はページに対応するACLがペ−ジ
テーブルエントリ内に存在する3組以外に存在するか否
かを示している。そして、イネーブルフラグ(E)23
36はACLのチェックを行なうか否かを示している。
Here, three types of flags 2132 to 213 are set.
The valid flag (V) 2332 of 4 indicates whether the page table entry is valid. The dirty flag (D) 2333 indicates whether the page has been changed. The referenced flag (R) 2334 indicates whether or not the page is accessed. A more flag (M) 2335 indicates whether or not the ACL corresponding to the page exists in a group other than the three sets existing in the page table entry. Then, the enable flag (E) 23
Reference numeral 36 indicates whether to check the ACL.

【0055】ページテーブルエントリの位置が決まる
と、バリッドフラグ2332の内容を調べ、この値が0
であれば、ページフォルト18を出力し、アドレス変換
中止装置247を起動しアドレス変換を中止する。
When the position of the page table entry is determined, the content of the valid flag 2332 is checked and this value is 0.
If so, the page fault 18 is output, the address translation stop device 247 is activated, and the address translation is stopped.

【0056】また、43ビットの信号線231の入力と
3個のACLの内容234、235、236を3つの比
較器237、238、239を使って同時に比較し、こ
の比較の結果によりアクセスが許可されることが判明し
た場合は、信号240がアサートされ、物理ページ番号
2331とフラグ2332〜2336の組と3つのAC
Lの内容234〜236を連結した192ビットの出力
2338がイネーブルされる。また、アクセスが不許可
であることが判明した場合は、信号241がアサートさ
れ、プロテクションフォルト192が出力される。
Further, the input of the 43-bit signal line 231 and the contents 234, 235, 236 of the three ACLs are simultaneously compared by using the three comparators 237, 238, 239, and access is permitted according to the result of this comparison. Signal 240 is asserted, the set of physical page number 2331 and flags 2332 to 2336, and three ACs.
A 192-bit output 2338, which is the concatenation of the L contents 234-236, is enabled. If the access is found to be unauthorized, the signal 241 is asserted and the protection fault 192 is output.

【0057】一方、現在のアクセス条件に一致するAC
Lが3つのものの中から見つからなかった場合は、モア
フラグ2335を調べる。モアフラグ2335が0であ
った場合には、ACLが他にはないことを示しているの
で、アクセスの許可がなされないことになり、信号24
2がアサートされ、プロテクションフォルト192を出
力するようになる。また、モアフラグ2335が1であ
った場合は他にもACLが存在していることになるの
で、信号243がアサートされ、ACL切替装置245
を使って、次ACLへのポインタ2337によって指示
されている次ページテーブルエントリ246のACLの
組に切替えて、再び比較を行なう。
On the other hand, an AC that matches the current access condition
If L is not found among the three, check the more flag 2335. If the more flag 2335 is 0, it means that there is no other ACL, so that access is not permitted, and the signal 24
2 is asserted, and the protection fault 192 is output. If the more flag 2335 is 1, it means that there is another ACL, so the signal 243 is asserted, and the ACL switching device 245.
Is used to switch to the ACL set of the next page table entry 246 pointed to by the pointer 2337 to the next ACL, and the comparison is performed again.

【0058】この場合、ポインタ2135によって指示
されているACLの組の中に現在のアクセス条件に一致
するものがさらになかった場合には、モアビット226
2が1であるかを調べ、1であれば、再びACL切替装
置245によって次ACLへのポインタ2461によっ
て指されるACLの組に切替えて再び比較を行なうよう
になる。
In this case, if there is no more ACL set pointed to by the pointer 2135 that matches the current access condition, the more bit 226.
It is checked whether 2 is 1, and if it is 1, the ACL switching device 245 switches to the ACL set pointed to by the pointer 2461 to the next ACL and the comparison is performed again.

【0059】図7は、ACLの組を一回切替えた後の比
較によってアクセスが許可されることが判明した場合の
状態を示すもので、図6と同一部分には同符号を付して
示している。この場合、ページテーブルエントリ233
の物理ページ番号2331とフラグ2332〜2336
の組とページテーブルエントリ246の3つのACLの
内容247〜249を連結した192ビットの出力24
62がイネーブルされるようになる。
FIG. 7 shows a state in which access is permitted by comparison after switching the ACL set once. The same parts as those in FIG. 6 are designated by the same reference numerals. ing. In this case, the page table entry 233
Physical page number 2331 and flags 2332 to 2336
Output and a 192-bit output 24 obtained by concatenating the three ACL contents 247 to 249 of the page table entry 246.
62 will be enabled.

【0060】本実施例では、メモリ管理装置中のページ
テーブルのエントリ中に記載するACLはLPCの上位
20ビット固定であるが、この場合、アクセス元の領域
の大きさが固定される。領域の大きさを可変または複数
の領域をまとめて1つのACLで表現できれば柔軟性が
増す。その場合には図12のように1つのACL中にさ
らにマスク領域322(最大でLPC上位ビット数と同
じビット数)を設け、このマスクに従って比較を行うよ
うにすればよい。ACL中のスレッド番号についても同
様なマスク領域をさらに付加すれば複数のスレッドをグ
ループでまとめたアクセス制御が可能となる。
In this embodiment, the ACL described in the entry of the page table in the memory management device is fixed to the upper 20 bits of the LPC, but in this case, the size of the access source area is fixed. If the size of a region is variable or a plurality of regions can be collectively expressed by one ACL, flexibility increases. In that case, as shown in FIG. 12, a mask area 322 (maximum number of bits equal to the number of LPC upper bits) is further provided in one ACL, and comparison is performed according to this mask. If a similar mask area is further added to the thread number in the ACL, it is possible to control access by grouping a plurality of threads.

【0061】また、図3においてアクセス権の検証を行
う比較器の構成でスレッド番号及びLPCの比較を行う
のに、減算器341、342を用いているが、ここを論
理演算器に置きかえてもよい。この場合、一例として減
算器342のかわりにAND演算器とする。そしてアド
レス空間の上位をOSなどのシステムに、下位をアプリ
ケーションのプログラムに配置する構成とする。LPC
上位20ビット319に16進数で80000が入って
いるとLPC上位20ビット12の値が16進数で80
000以上の場合、AND演算器の出力は1になる。つ
まり、システムプログラムからのアクセスは許可され、
アプリケーションのプログラムからのアクセスは拒否さ
れる。このように種々の論理演算器及びその組合せに置
きかえることが可能になる。
Further, although the subtracters 341 and 342 are used to compare the thread number and the LPC in the configuration of the comparator for verifying the access right in FIG. 3, even if this is replaced with a logical operation unit. Good. In this case, as an example, an AND operator is used instead of the subtractor 342. The upper part of the address space is arranged in a system such as an OS, and the lower part is arranged in an application program. LPC
If the upper 20 bits 319 contain hexadecimal 80000, the value of the LPC upper 20 bits 12 is 80 hexadecimal.
When it is 000 or more, the output of the AND operator becomes 1. In other words, access from system programs is allowed,
Access from the application program is denied. In this way, it becomes possible to replace various logic operation units and combinations thereof.

【0062】また、本実施例では、論理アドレスから物
理アドレスを求めるのに3段のアドレス変換装置を利用
し、かつ、各段においてACLのチェックを行っている
が、最終段のみACLチェックを行い第1段、第2段に
おいてはACLのチェックを行わない構成も取り得る。 [実施例2]
Further, in the present embodiment, the address translation device of three stages is used to obtain the physical address from the logical address, and the ACL check is performed in each stage, but the ACL check is performed only in the final stage. It is also possible to adopt a configuration in which ACL check is not performed in the first and second stages. [Example 2]

【0063】以上第1の実施例では、従来の第1、第
2、第3の問題点を解決する手段をまとめて示したが、
ここで、上記実施例のうち、従来の第1の問題点を解決
する手段を取り出し、第2の実施例として説明する。ま
ずアクセス権限の判定に関して説明する。
As described above, in the first embodiment, the means for solving the first, second and third problems of the prior art are collectively shown.
Here, of the above-described embodiments, means for solving the first problem of the related art will be taken out and described as a second embodiment. First, the determination of access authority will be described.

【0064】図8において、論理アドレス空間80の中
には、複数のスレッド81、82が存在している。ペー
ジテーブル85は図2の一部を取り出したものである。
スレッド番号1を持つスレッド81が、あるアドレスの
メモリをアクセスする命令83を実行しようとする。こ
こで命令83は、16進数表記で1234番地のデ−タ
をロ−ドしてくることを意味する。まず、ページテーブ
ル85の中から、アクセスしようとするアドレスが存在
するページに対応するエントリが選ばれる。次に、スレ
ッド番号検出部86によって、現在実行中のスレッド番
号が検出され、このスレッド番号に一致するスレッド番
号を持った保護情報のエントリが選択される。
In FIG. 8, a plurality of threads 81 and 82 exist in the logical address space 80. The page table 85 is a part of FIG.
The thread 81 having the thread number 1 tries to execute the instruction 83 for accessing the memory at a certain address. Here, the instruction 83 means to load the data at address 1234 in hexadecimal notation. First, from the page table 85, the entry corresponding to the page where the address to be accessed exists is selected. Next, the thread number detection unit 86 detects the currently executing thread number and selects the entry of the protection information having the thread number that matches this thread number.

【0065】このエントリの中に書いてある、そのスレ
ッドに許されるアクセスの種類は、アクセスの種類検出
部84に入力される。84は、実行されつつあるアクセ
スの種類が、スレッドに許されるアクセスの種類に含ま
れるか否かを検出し、その結果を物理アドレス/プロテ
クション・フォルト信号出力部87に送る。87は、ア
クセスが許される場合は、アクセスされようとしている
論理ページの番号に対応する物理ページの番号と、論理
ページ内のオフセットを合わせて物理アドレスとして出
力する。アクセスが許されない場合は、プロテクション
フォルト信号を出力する。
The type of access permitted in the thread, which is written in this entry, is input to the access type detection unit 84. 84 detects whether or not the type of access being executed is included in the types of access permitted to the thread, and sends the result to the physical address / protection fault signal output unit 87. When access is permitted, the 87 outputs the physical page number corresponding to the number of the logical page to be accessed and the offset within the logical page as a physical address. When access is not permitted, a protection fault signal is output.

【0066】図8のページテーブル85の内容による
と、論理ページ番号が1であるページは、スレッド1か
らは読み書きが出来るが実行は出来ず、スレッド2から
は読み書きが出来ないが実行は出来る、というようにな
っている。このように、一つのアドレス空間内を走る複
数のスレッドについて、別々のアクセス権限を与えるこ
とが出来る。
According to the contents of the page table 85 in FIG. 8, the page having the logical page number 1 can be read and written by thread 1 but cannot be executed, and cannot be read and written by thread 2, but can be executed. It is supposed to be. In this way, different access privileges can be given to multiple threads running in one address space.

【0067】さらに詳しく説明すると、スレッドがある
論理ページをアクセスしようとすると、ページテーブル
の中の、前記論理ページに対応するエントリが選択さ
れ、まず、前記論理ページが有効かどうか、さらに有効
な場合に物理メモリが割り当てられているか否かを、フ
ラグによってページフォルト検出部88が検出し、もし
無効の場合や割り当てられていない場合は、ページフォ
ルトとして割り込み信号を発生する。
More specifically, when a thread tries to access a certain logical page, the entry corresponding to the logical page in the page table is selected, and whether the logical page is valid or not is determined. The page fault detection unit 88 detects whether or not the physical memory is allocated by the flag, and if it is invalid or not allocated, an interrupt signal is generated as a page fault.

【0068】それ以外の場合は、そのエントリの中に複
数存在する、アクセスを許すスレッドの番号のフィール
ドのうちで、現在実行中のスレッド番号と一致するもの
が存在するかどうかを、比較器を使って検出する。比較
器を複数用意して並列に比較すると、比較のための時間
が一回比較する時間で済むことになる。
In other cases, a comparator is used to determine whether or not there is a plurality of fields of thread numbers which are permitted to be accessed in the entry and which match the thread number of the currently executed thread. Use to detect. When a plurality of comparators are prepared and compared in parallel, the time required for comparison is the time required for one comparison.

【0069】一致するフィールドが存在しない場合は、
プロテクションフォルトとして、割り込み信号を出力す
る。一致するフィールドがあった場合は、スレッドが行
なおうとしているアクセスの種類が、そのスレッドに許
されているアクセスの種類に含まれているかどうかを、
比較器を用いて検出する。この比較は、スレッド番号の
一致を検出することと同時に行なうことで比較時間を短
縮することが出来る。含まれていることが検出されなけ
ればプロテクションフォルトとして、割り込み信号を出
力する。含まれていることが検出されたときは、アクセ
スされつつある論理ページに対応する物理ページ番号を
出力する。
If there is no matching field,
An interrupt signal is output as a protection fault. If there is a matching field, check whether the type of access the thread is trying to do is included in the type of access allowed for that thread.
Detect using a comparator. The comparison time can be shortened by performing this comparison at the same time as detecting the matching of the thread numbers. If inclusion is not detected, an interrupt signal is output as a protection fault. When the inclusion is detected, the physical page number corresponding to the logical page being accessed is output.

【0070】OSがスケジュ−リングによって、一つの
アドレス空間の中で実行するスレッドを切り替える場合
は、メモリ管理装置内のスレッド番号記憶部に保存され
ている、実行中のスレッドの番号を変更する。これによ
り、これ以降のアドレス変換時は、変更後のスレッド番
号と、その論理ページをアクセス出来るスレッド番号の
一致を調べることになる。 一つのアドレス空間の中を
実行する複数のスレッドに関するページテーブルは、一
つにまとまっているため、OSがページングを行なう時
は、前記ページテーブルの該当するエントリの、論理−
物理アドレスの対応の部分の、物理アドレスの部分を書
き換え、そのエントリに対応する物理ページが存在する
かどうかを示すフラグを更新するだけでよい。 [実施例3]さらに、第1の実施例のうち、従来の第3
の問題点を解決する手段を取り出し、第3の実施例とし
て説明する。まず、アクセス権限の判定に関して説明す
る。
When the OS switches the thread to be executed in one address space by scheduling, the number of the thread under execution stored in the thread number storage section in the memory management device is changed. As a result, at the time of subsequent address translation, the thread number after the change and the thread number that can access the logical page are checked for coincidence. Since the page tables relating to a plurality of threads executing in one address space are gathered together, when the OS performs paging, the logical table of the corresponding entry of the page table is
It suffices to rewrite the part of the physical address corresponding to the part of the physical address and update the flag indicating whether or not the physical page corresponding to the entry exists. [Embodiment 3] Further, in the first embodiment, the third embodiment
A means for solving the above problem will be taken out and explained as a third embodiment. First, the determination of access authority will be described.

【0071】図9において、論理アドレス空間90は、
複数の領域91、92、93に分割されている。ページ
テーブル96は図2の一部を取り出したものである。領
域91の中のプログラムを実行中に、あるアドレスのメ
モリをアクセスする命令94を実行しようとすると、ま
ず、ページテーブル96の中から、アクセスしようとす
るアドレスの存在するページに対応するエントリが選ば
れる。次に、領域番号検出部97によって、現在実行さ
れつつあるプログラムの存在する領域の領域番号を検出
し、この領域番号に一致する領域番号を持った保護情報
のエントリが選択される。
In FIG. 9, the logical address space 90 is
It is divided into a plurality of regions 91, 92, 93. The page table 96 is a part of FIG. When an instruction 94 for accessing a memory at a certain address is executed while the program in the area 91 is being executed, first, the entry corresponding to the page where the address to be accessed exists is selected from the page table 96. Be done. Next, the area number detection unit 97 detects the area number of the area in which the program currently being executed is present, and selects the entry of the protection information having the area number that matches this area number.

【0072】このエントリの中に書いてある、その領域
内のプログラムに対して許されるアクセスの種類は、ア
クセスの種類検出部95に入力される。95は、実行さ
れつつあるアクセスの種類が、その領域内のプログラム
に対して許されるアクセスの種類に含まれるか否かを検
出し、その結果を物理アドレス/プロテクション・フォ
ルト信号出力部98に送る。98は、アクセスが許され
る場合は、アクセスされようとしている論理ページの番
号に対応する物理ページの番号と、論理ページ内のオフ
セットを合わせて物理アドレスとして出力する。アクセ
スが許されない場合は、プロテクションフォルト信号を
出力する。
The type of access permitted in the program in the area written in this entry is input to the access type detection unit 95. 95 detects whether the type of access being executed is included in the types of access permitted to the program in the area, and sends the result to the physical address / protection fault signal output unit 98. . When the access is permitted, the 98 outputs the physical page number corresponding to the logical page number to be accessed and the offset in the logical page as a physical address. When access is not permitted, a protection fault signal is output.

【0073】図9のページテーブル96の内容による
と、論理ページ番号が10であるページは、領域1から
は読み書きは出来ないが実行は出来、領域2からは読み
書きは出来るが実行は出来ない、となっている。このよ
うに、一つの論理アドレス空間内の複数のプログラム
に、別々のアクセス権限を与えることが出来る。
According to the contents of the page table 96 of FIG. 9, the page having the logical page number 10 cannot be read / written from the area 1 but can be executed, and the page can be read / written from the area 2 but cannot be executed. Has become. In this way, different access rights can be given to multiple programs in one logical address space.

【0074】なお、論理アドレス空間を分割する領域の
大きさは、1バイト単位、ページ単位、1メガバイト単
位など、どのような単位でも構わない。また、ページの
大きさも、好きなように決めても構わない。
The size of the area into which the logical address space is divided may be any unit such as 1 byte unit, page unit or 1 megabyte unit. Also, the page size may be determined as desired.

【0075】さらに詳しく説明すると、スレッドが実行
しているプログラムが置かれている領域によって、アク
セス権限を変える場合は、実行中の命令の存在するアド
レスつまり1つ前のプログラムカウンタの上位何ビット
かを、現在実行されているプログラムの領域の番号とし
て使用する。
More specifically, when the access authority is changed depending on the area where the program executed by the thread is placed, the address at which the instruction being executed exists, that is, the number of high-order bits of the immediately preceding program counter. Is used as the number of the region of the program currently being executed.

【0076】まず、アクセスされようとしてる論理ペー
ジが有効かどうか、さらに有効な場合に物理メモリが割
り当てられているか否かを、フラグによってページフォ
ルト検出部99で検出し、もし無効の場合や割り当てら
れていない場合は、ページフォルトとして割り込み信号
を発生する。
First, the page fault detection unit 99 detects whether or not the logical page to be accessed is valid, and whether or not the physical memory is allocated when it is valid, and if it is invalid or allocated. If not, generate an interrupt signal as a page fault.

【0077】次に、アクセスを行なうプログラムが置か
れている領域の領域番号と、ページテーブル中の論理−
物理アドレスの各対応毎に記憶されている、アクセスを
許す領域の番号が一致するかどうかを、比較器を使って
検出する。一致する領域番号がない場合は、プロテクシ
ョンフォルトとして、割り込み信号を出力する。一致す
る番号があった場合は、これから実行されようとしてい
るアクセスの種類が、その領域から許されるアクセスの
種類に含まれているかどうかを比較器を用いて検出す
る。含まれていることが検出されなければプロテクショ
ンフォルトとして割り込み信号を出力する。含まれてい
ることが検出された時は、アクセスされつつある論理ペ
ージに対応する物理ページの番号を出力する。 [実施例4]さらに第1の実施例のうち、従来の第3の
問題点を解決する部分の変形例を第4の実施例として説
明する。まず、アクセス権限の判定に関して説明する。
Next, the area number of the area in which the program to be accessed is placed and the logic in the page table--
A comparator is used to detect whether or not the numbers of the access-permitted areas stored for each correspondence of physical addresses match. If there is no matching area number, an interrupt signal is output as a protection fault. When there is a matching number, the comparator detects whether the type of access to be executed from now on is included in the types of access permitted from the area. If the inclusion is not detected, an interrupt signal is output as a protection fault. When the inclusion is detected, the number of the physical page corresponding to the logical page being accessed is output. [Fourth Embodiment] Further, a modified example of the part of the first embodiment which solves the third problem of the conventional art will be described as a fourth embodiment. First, the determination of access authority will be described.

【0078】図10において、論理アドレス空間100
は、複数の領域101、102、103に分割されてい
る。領域101の中のプログラムを実行中に、あるアド
レスのメモリをアクセスする命令104を実行しようと
すると、領域番号検出部108によって現在実行されつ
つあるプログラムの存在する領域の領域番号を検出す
る。次に、その領域番号を利用してACLテーブル10
7の対応する領域番号のACLエントリを選択する。次
にアクセスしようとするアドレスの存在するページ番号
を持った保護情報のエントリが選択される。
In FIG. 10, logical address space 100
Is divided into a plurality of areas 101, 102, 103. If the instruction 104 for accessing the memory at a certain address is executed while the program in the area 101 is being executed, the area number detecting unit 108 detects the area number of the area where the program currently being executed exists. Next, using the area number, the ACL table 10
7. Select the ACL entry for the corresponding region number of 7. Next, the protection information entry having the page number where the address to be accessed exists is selected.

【0079】このエントリの中に書いてあるアクセス先
ページに対して許されるアクセスの種類はアクセスの種
類検出部105に入力される。105は実行されつつあ
るアクセスの種類が、そのアクセス先のページに対して
許されるアクセスの種類に含まれるか否かを検出しても
し許されない場合はプロテクションフォルト信号を出力
する。
The type of access permitted for the access destination page written in this entry is input to the access type detection unit 105. 105 detects whether or not the type of access being executed is included in the type of access permitted for the page of the access destination, and if not, outputs a protection fault signal.

【0080】図10のACLテーブル107の内容によ
ると、領域番号が1である領域からは論理ページ番号1
0へは読み書きはできないが実行のみ出来、論理ページ
番号11へは読み書きができるが、実行は出来ない、と
なっている。このように、一つの論理アドレス空間内の
複数のプログラムに、別々のアクセス権限を与えること
が出来る。
According to the contents of the ACL table 107 in FIG. 10, the logical page number 1 starts from the area having the area number 1.
0 cannot be read / written, but can be executed only, and logical page number 11 can be read / written, but cannot be executed. In this way, different access rights can be given to multiple programs in one logical address space.

【0081】なお、論理アドレス空間を分割する領域の
大きさは、1バイト単位、ページ単位、1メガバイト単
位など、どのような単位でも構わない。また、ページの
大きさも、好きなように決めても構わない。
The size of the area into which the logical address space is divided may be any unit such as 1 byte unit, page unit or 1 megabyte unit. Also, the page size may be determined as desired.

【0082】更に詳しく説明すると、スレッドが実行し
ているプログラムが置かれている領域によって、アクセ
ス権限を変える場合は、実行中の命令の存在するアドレ
ス、つまり1つ前のプログラムカウンタの上位何ビット
かを、現在実行されているプログラムの領域の番号とし
て使用する。
More specifically, when the access authority is changed depending on the area where the program executed by the thread is placed, the address at which the instruction being executed exists, that is, the number of high-order bits of the immediately preceding program counter. Or is used as the number of the region of the program currently being executed.

【0083】まず、アクセスされようとしてる論理ペー
ジが有効かどうか、さらに有効な場合に物理メモリが割
り当てられているか否かをページテーブル106のフラ
グによってページフォルト検出部110が検出し、もし
無効の場合や割り当てられていない場合は、ページフォ
ルトとして割り込み信号を発生する。
First, the page fault detection unit 110 detects whether the logical page to be accessed is valid and, if valid, whether physical memory is allocated, by the page fault detection unit 110. If or unassigned, generate an interrupt signal as a page fault.

【0084】次に、アクセスを行なう先の論理ページ番
号と、ACLテーブル107中の、アクセスを行なうプ
ログラムが置かれている領域の領域番号毎に記憶されて
いる、アクセスを許す論理ページの番号が一致するかど
うかを、比較器を使って検出する。一致する論理ページ
番号がない場合は、プロテクションフォルトとして、割
り込み信号を出力する。一致する番号があった場合は、
これから実行されようとしているアクセスの種類が、そ
のページに対して許されるアクセスの種類に含まれてい
るかどうかを比較器を用いて検出する。含まれているこ
とが検出されなければプロテクションフォルトとして割
り込み信号を出力する。プロテクションフォルト信号が
出力されないことで含まれていることが検出された時
は、アクセスされつつある論理ページに対応する物理ペ
ージの番号を物理アドレス出力部109から出力する。
Next, the logical page number of the access destination and the number of the logical page of the ACL table 107, which is stored for each area number of the area in which the program to be accessed is placed, are permitted. A match is detected using a comparator. If there is no matching logical page number, an interrupt signal is output as a protection fault. If there is a matching number,
A comparator is used to detect whether the type of access that is about to be executed is included in the types of access permitted for the page. If the inclusion is not detected, an interrupt signal is output as a protection fault. When it is detected that the protection fault signal is included because it is not output, the physical address output unit 109 outputs the physical page number corresponding to the logical page being accessed.

【0085】また、図10におけるACLテーブル10
7中のACLエントリはアクセス先の論理ページ番号と
そのページに対するアクセスの種類の対で記載されてい
るが、アクセス先の領域番号とその領域に対するアクセ
スの種類の対で記載してもよい。その場合、図11のよ
うになりACLテーブル107が112のように変更さ
れ、新たに設ける領域番号検出部111によって、アク
セス先のアドレスに相当する領域番号を検出して、AC
Lテーブル112の対応するエントリを選択する。あと
の処理は図10の場合と同様である。
The ACL table 10 shown in FIG.
Although the ACL entry in 7 is described as a pair of the logical page number of the access destination and the type of access to the page, it may be described as a pair of the area number of the access destination and the type of access to the area. In that case, as shown in FIG. 11, the ACL table 107 is changed to 112, and the newly provided area number detection unit 111 detects the area number corresponding to the address of the access destination, and the AC
Select the corresponding entry in the L table 112. Subsequent processing is the same as in the case of FIG.

【0086】なお、第3の実施例では領域2中の論理ア
ドレスに対して領域1中のプログラムからアクセスでき
るかという検証方法を、本実施例では領域1中のプログ
ラムを実行中に領域2中の論理アドレスに対してアクセ
スできるかという検証方法を採っているが、ページテー
ブルをハッシュを用いて構成することにより両者を融合
した検証方法も採り得る。また、本実施例でページテー
ブル106とACLテーブル107を別々に設けている
のは、メモリ容量の節約のためである。
In the third embodiment, the verification method of whether the program in the area 1 can access the logical address in the area 2 is used. In the present embodiment, the program in the area 1 is executed while the program in the area 2 is being executed. Although the verification method of whether or not the logical address of can be accessed is adopted, a verification method in which both are integrated can also be adopted by constructing the page table using hash. Further, the page table 106 and the ACL table 107 are separately provided in the present embodiment in order to save the memory capacity.

【0087】このように上記第1〜第4の実施例によれ
ば、論理アドレス空間を共有する複数のスレッドが、複
数の領域におかれているプログラムを実行することによ
って行なうメモリアクセスに対して、TLBやページテ
ーブル中の一つのエントリにACLを複数個格納して対
応させるようにしたので、同じ物理アドレスに対して多
くのエントリを占有することがなく、しかも複数のエン
トリが論理アドレスと物理アドレスの対を重複して持つ
ことがなくなる。従って、ページテーブル占有するメモ
リの量が減少する。また、TLB(ページテーブルのキ
ャッシュ)中に格納されている論理アドレスの範囲が広
くなり、TLBのヒット率を向上することができる。ま
た、TLBやページテーブル中の複数のACLのそれぞ
れと、現在実行中のスレッドのスレッド番号と実行され
ているプログラムの置かれている領域番号の組の比較を
同時に行なうことができる。このため、アドレス変換の
時間は、従来のメモリ管理装置と同等にできる。
As described above, according to the first to fourth embodiments, a plurality of threads sharing the logical address space can execute a memory access by executing a program in a plurality of areas. , A plurality of ACLs are stored in correspondence with one entry in the TLB or page table, so that many entries do not occupy the same physical address. You will not have duplicate address pairs. Therefore, the amount of memory occupied by the page table is reduced. Further, the range of logical addresses stored in the TLB (page table cache) is widened, and the TLB hit rate can be improved. Further, it is possible to simultaneously compare each of the plurality of ACLs in the TLB or the page table with the set of the thread number of the thread currently being executed and the area number in which the program being executed is placed. Therefore, the address conversion time can be made equivalent to that of the conventional memory management device.

【0088】また、上記実施例によれば、TLBを検索
中に発生したミスを、アドレスのミスと、ACLのミス
に分けることが可能となり、また、TLBのアドレスを
格納する部分と、ACLを格納する部分を、独立にペー
ジテーブル中の情報と入れ換えることができる。これに
より、TLBの一つのエントリ内に、そのエントリに対
応する論理ページに対するACLをすべて格納できない
場合でも、当該エントリを無効化せず、ACLの部分の
みを入れ換えることができる。従って、TLBミスの処
理にかかる時間を短縮することができる。これは特に、
論理アドレスを共有するスレッドあるいはプログラムの
置かれている領域の数が、一つのエントリ中に格納でき
る数より多い場合に有効である。
Further, according to the above-mentioned embodiment, it is possible to divide the miss generated during the search of the TLB into the address miss and the ACL miss, and the part for storing the TLB address and the ACL are separated. The stored portion can be independently replaced with the information in the page table. As a result, even if all the ACLs for the logical page corresponding to the entry cannot be stored in one entry of the TLB, it is possible to replace only the ACL part without invalidating the entry. Therefore, the time required to process the TLB miss can be shortened. This is especially
This is effective when the number of areas in which threads or programs that share a logical address are placed is larger than the number that can be stored in one entry.

【0089】なお、上記実施例では、ページテーブルが
保持する複数個のACLについて、スレッド番号と領域
番号の組と、その組に許可するアクセスの種類が一つづ
つ組み合わさせている場合を示したが、複数のスレッド
番号と領域番号の組に対して、共通に許可するアクセス
の種類を一つだけ記憶するようにしても良いし、複数の
スレッド番号に対して領域番号と許可するアクセスの種
類を各一つ共通に記憶しても、複数の領域番号に対して
スレッド番号と許可するアクセスの種類を各一つ共通に
記憶しても良い。スレッドあるいは領域毎に個別に許さ
れるアクセス方法を記憶させればきめ細かいアクセス権
制御ができ、一方、アクセスを許すスレッドあるいは領
域の集合に共有させて許されるアクセス方法を一つ記憶
させればアクセス権制御のきめ細かさは多少落ちるが、
ページテーブルとして使用されるメモリの量が節約でき
る。
In the above-described embodiment, a set of thread numbers and area numbers and types of access permitted to each set are combined for each of a plurality of ACLs held by the page table. However, it is also possible to store only one type of access that is commonly permitted for multiple thread number and area number pairs, or it is possible to store area numbers and types of access for multiple thread numbers. May be commonly stored, or the thread number and the type of access permitted for a plurality of area numbers may be commonly stored. Fine-grained access right control can be performed by storing the access method that is individually permitted for each thread or area. On the other hand, if you store one access method that is shared by a set of threads or areas that allow access, the access right can be controlled. The control is less precise,
The amount of memory used for the page table can be saved.

【0090】また、上記実施例では保護の最小単位を物
理ページ単位としたが、メモリ管理装置が管理できる大
きさであればどのような大きさが単位であっても、また
セグメントのように可変量であっても良い。
Further, in the above embodiment, the minimum unit of protection is the physical page unit, but any size can be used as long as it can be managed by the memory management device, and it can be changed like a segment. It may be the amount.

【0091】その他、TLBが保持するページテーブル
の一つのエントリに複数個のACLを保持するという第
2の発明は、どのように情報が格納されている場合にも
適用可能であることはもとより、ACLの内容として、
上記のスレッド番号と、領域番号であるLPC上位20
ビットの組以外でも適用可能であり、また、各信号発生
回路および制御回路の構成、各種制御信号の与え方など
も種々変更して実施することができる。また実施例4の
ようにページテーブルとACLテーブルを別々に分ける
ことにより、全体のメモリ量を減らすこともできる。
In addition, the second invention of holding a plurality of ACLs in one entry of the page table held by the TLB is applicable not only to how information is stored, but also As the contents of ACL,
The above thread number and LPC upper 20 that is the area number
The present invention can be applied to other than the bit set, and can be implemented by variously changing the configurations of the signal generating circuits and the control circuits, and how to give various control signals. Further, by dividing the page table and the ACL table separately as in the fourth embodiment, it is possible to reduce the total memory amount.

【0092】また、上記実施例によれば、アクセスの権
利の正しさを検証するため、スレッドを識別する番号だ
けでなく、スレッド毎のメモリアクセスの仕方を示すア
クセス情報のエントリを設けることが可能となり、メモ
リアクセスに対してきめ細かいアクセス権制御を行なう
ことが可能になる。
Further, according to the above-described embodiment, in order to verify the correctness of the access right, it is possible to provide not only the number for identifying the thread but also the entry of access information indicating the memory access method for each thread. Therefore, it becomes possible to perform fine access right control for memory access.

【0093】また、上記実施例によれば、メモリアクセ
ス毎にスレッド番号あるいは領域番号の全部又は一部を
マスクしてグループ化し一致の検出を行なうことが可能
となる。これはメモリアクセスに対してグループ化した
アクセス権制御を行なうようにできる。そのため、効率
的なアクセス権制御を行うことができる。
Further, according to the above-described embodiment, it is possible to mask all or part of the thread number or area number for each memory access and perform grouping to detect coincidence. This allows for grouped access rights control for memory accesses. Therefore, efficient access right control can be performed.

【0094】また、上記実施例によれば、スレッド番号
あるいは領域番号の一致を検出するだけでなく、大小関
係が成立する等、所定の論理演算結果が真となる場合を
一致が得られたとすることができ、メモリアクセスに対
してプログラム間の又はスレッド間の相対的なアクセス
権制御を行なうようにできる。
Further, according to the above embodiment, it is assumed that not only the matching of the thread number or the area number is detected, but also the matching is obtained when the predetermined logical operation result is true such as the magnitude relationship is established. It is possible to perform relative access right control between programs or threads for memory access.

【0095】[0095]

【発明の効果】本発明は、以上に説明したように構成さ
れているので、以下に記載するような効果を奏する。
Since the present invention is constructed as described above, it has the following effects.

【0096】まず、ページテーブル内の論理−物理アド
レスの対応に対して、どのスレッドがその論理アドレス
に対してアクセス可能かという情報を記憶する手段を設
けることにより、一つのアドレス空間内を実行する複数
のスレッド同士の保護を、ページテーブルのために使用
するメモリの量を無駄にすることなく、行なうことが出
来る。
First, by providing a means for storing information on which thread can access the logical address in correspondence with the logical-physical address in the page table, execution in one address space is performed. Multiple threads can be protected without wasting the amount of memory used for the page table.

【0097】更に、1つの論理−物理アドレス対に対し
て複数個のアクセス保護情報を記憶すれば、一つの論理
−物理アドレスの対応を記憶するために使われるメモリ
の量が少なくなるため、TLBに置くことができる論理
−物理アドレスの対応の数が増え、キャッシュのヒット
率が上がるため、平均のアドレス変換時間が短縮され
る。
Further, if a plurality of access protection information is stored for one logical-physical address pair, the amount of memory used for storing one logical-physical address correspondence is reduced, so that the TLB is used. Since the number of logical-physical address correspondences that can be placed in the cache increases and the cache hit rate increases, the average address translation time is shortened.

【0098】そして、一つのアドレス空間を複数の領域
に分割し、ページテーブル内の一つの論理−物理アドレ
スの対応に対して、どの領域に存在するプログラムを実
行した時に、その論理アドレスに対してアクセス可能か
という情報を1個以上記憶する手段を設けることによ
り、一つのアドレス空間内に存在する複数のプログラム
に対して別々のアクセス権限を与えることが出来る。こ
れにより、あるデータをアクセスするためには、必ず、
ある特定のアクセスプログラムを介してしか行われない
ようにすることができる。
Then, one address space is divided into a plurality of areas, and when a program existing in which area is executed for one logical-physical address correspondence in the page table, that logical address is By providing a means for storing one or more pieces of information indicating whether or not access is possible, it is possible to give different access rights to a plurality of programs existing in one address space. Therefore, in order to access certain data, be sure to
It can only be done via a certain access program.

【0099】また、一つのアドレス空間を複数の領域に
分割し、かつ複数のスレッドを実行させる場合に、ペー
ジテーブル内の論理−物理アドレスの対応に対して、ど
のスレッドがどの領域に置かれているプログラムを実行
している時に、その論理ページに対してアクセス可能か
という情報を記憶する手段を設けることにより、上で述
べた効果が同時に達成される。
Further, when one address space is divided into a plurality of areas and a plurality of threads are executed, which thread is placed in which area in correspondence with the logical-physical address correspondence in the page table. By providing a means for storing the information as to whether the logical page is accessible while the program being executed is being executed, the effects described above are achieved at the same time.

【0100】上記のアクセス可能か否かを示す複数の情
報を、並行して検証すれば、一つの論理−物理アドレス
の対応に対して複数の保護情報があっても、アクセス権
のチェックは保護情報が1個しかない場合と同じ時間で
行なうことができる。
If a plurality of pieces of information indicating whether or not the access is possible are verified in parallel, even if there are a plurality of pieces of protection information for one logical-physical address correspondence, the access right check is protected. It can be done in the same time as if there was only one piece of information.

【0101】尚、どのスレッドがアクセス可能かを示す
情報のなかのスレッド番号と、アクセスしようとしてい
るスレッドのスレッド番号の一致を調べてアクセスの正
当性を検証する際に、スレッド番号の一部をマスクする
機能を具備すれば、スレッド番号のグルーピングが可能
となるため、複数のスレッドに対して同じ権限を与えた
い場合にページテーブルに置かなければならない情報の
量とチェック時間を節約することが出来る。
When checking the legitimacy of access by checking the match between the thread number in the information indicating which thread is accessible and the thread number of the thread that is trying to access, a part of the thread number is With the masking function, thread numbers can be grouped, so the amount of information that must be placed in the page table and the check time can be saved when you want to give the same privilege to multiple threads. .

【0102】同様に、検証の際に、どのスレッドがアク
セス可能かを示す情報のなかのスレッド番号と、アクセ
スしようとしているスレッドのスレッド番号についての
論理演算の結果に基づきスレッド番号が一致したと見倣
す機能を具備することによって、スレッド番号のグルー
ピングが可能となるため、複数のスレッドに対して同じ
権限を与えたい場合にページテーブルに置かなければな
らない情報の量とチェック時間を節約することが出来
る。このようなグルーピングは領域番号についても同様
に実現できる。
Similarly, at the time of verification, it is considered that the thread number in the information indicating which thread is accessible and the thread number match based on the result of the logical operation of the thread number of the thread to be accessed. Since the thread number can be grouped by providing the copying function, it is possible to save the amount of information and check time that must be placed in the page table when the same authority is given to multiple threads. I can. Such grouping can be similarly realized for area numbers.

【0103】さらに、TLB(ページテーブルのキャッ
シュ)を検索中に発生したミスを、アドレスのミスと、
ACL(保護情報)のミスに分けることが可能となり、
また、TLBのアドレスを格納する部分と、ACLを格
納する部分を、独立にページテーブル中の情報と入れ換
えることができる。これにより、TLBの一つの論理ペ
−ジに対応するエントリ内に、その論理ページに対する
ACLをすべて格納できない場合でも、当該エントリを
無効化せず、ACLの部分のみを入れ換えることができ
る。従って、TLBミスの処理にかかる時間及び保護情
報ミスの処理にかかる時間を短縮することができる。
Furthermore, the miss that occurred during the search of the TLB (page table cache) is referred to as an address miss.
It becomes possible to divide into ACL (protected information) mistakes,
Further, the part storing the address of the TLB and the part storing the ACL can be independently replaced with the information in the page table. As a result, even if all the ACLs for the logical page cannot be stored in the entry corresponding to one logical page of the TLB, it is possible to replace only the ACL part without invalidating the entry. Therefore, it is possible to shorten the time required to process the TLB miss and the time required to process the protected information miss.

【0104】このように本発明によれば、一回のアドレ
ス変換に要する時間は従来と同等で、ページテーブルの
ヒット率が向上し、ミス処理にかかる時間を短縮できる
ことから、全体としてアドレス変換時間を短縮できるこ
とになり、また、複数のスレッドが複数の領域に分割さ
れたアドレス空間を実行する時の保護を、スレッド番号
と領域番号によってOSの介在なしで柔軟に管理するこ
とが出来るようになる。
As described above, according to the present invention, the time required for one-time address conversion is the same as that of the conventional one, the hit rate of the page table is improved, and the time taken for miss processing can be shortened. Also, the protection when a plurality of threads execute an address space divided into a plurality of areas can be flexibly managed by the thread number and the area number without OS intervention. .

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

【図1】 本発明のメモリ管理装置の一実施例を示す概
略構成図。
FIG. 1 is a schematic configuration diagram showing an embodiment of a memory management device of the present invention.

【図2】 図1に示す実施例に用いられるTLBチェッ
ク装置の概略構成を示す図。
FIG. 2 is a diagram showing a schematic configuration of a TLB check device used in the embodiment shown in FIG.

【図3】 図2に示すTLBチェック装置に用いられる
比較器の概略構成を示す図。
3 is a diagram showing a schematic configuration of a comparator used in the TLB checking device shown in FIG.

【図4】 図1に示す実施例に用いられるアドレス変換
装置の概略構成を示す図。
4 is a diagram showing a schematic configuration of an address translation device used in the embodiment shown in FIG.

【図5】 図4に示すアドレス変換装置に用いられる第
1段および第2段目のアドレス変換装置の概略構成を示
す図。
5 is a diagram showing a schematic configuration of first-stage and second-stage address translation devices used in the address translation device shown in FIG.

【図6】 図4に示すアドレス変換装置に用いられる第
3段目のアドレス変換装置の概略構成を示す図。
6 is a diagram showing a schematic configuration of a third-stage address translation device used in the address translation device shown in FIG.

【図7】 図6に示すアドレス変換装置の動作を説明す
るための図。
7 is a diagram for explaining the operation of the address translation device shown in FIG.

【図8】 本発明のメモリ管理装置の第2の実施例を示
す概略構成図。
FIG. 8 is a schematic configuration diagram showing a second embodiment of the memory management device of the present invention.

【図9】 本発明のメモリ管理装置の第3の実施例を示
す概略構成図。
FIG. 9 is a schematic configuration diagram showing a third embodiment of the memory management device of the present invention.

【図10】 本発明のメモリ管理装置の第4の実施例を
示す概略構成図。
FIG. 10 is a schematic configuration diagram showing a fourth embodiment of the memory management device of the present invention.

【図11】 第4の実施例の変形例を示す概略構成図。FIG. 11 is a schematic configuration diagram showing a modification of the fourth embodiment.

【図12】 スレッド番号あるいは領域番号の全部また
は一部をマスクする構成の一例を示す図。
FIG. 12 is a diagram showing an example of a configuration for masking all or part of a thread number or a region number.

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

1…メモリ管理装置 2…アドレス変換装置 3…TLBチェック装置 4…スレッド番号記憶部 21、22、23…アドレス変換器 25…ルートポインタ 212、232…アドレス合成器 217〜219、237〜239…比較器 225、245…ACL切替え装置 227、247…アドレス変換中止装置 31…TLB 32、33…連結器 34、35、36…比較器 80、90、100…論理アドレス空間 81、82…スレッド 83、94、104…実行しようとしている命令 84、95、105…アクセスの種類検出部 85、96、106…ページテーブル 86…スレッド番号検出部 87、98…物理アドレス/プロテクション・フォルト
信号出力部 88、99、110…ページフォルト検出部 91、92、93、101、102、103…領域 97、108…実行しようとしている命令が存在するア
ドレスを含む領域の番号検出部 107、112…ACLテーブル 109…物理アドレス出力部 111…アクセスしようとする先のアドレスを含む領域
の番号検出部
1 ... Memory management device 2 ... Address translation device 3 ... TLB check device 4 ... Thread number storage unit 21, 22, 23 ... Address translator 25 ... Route pointer 212, 232 ... Address synthesizer 217-219, 237-239 ... Comparison 225, 245 ... ACL switching device 227, 247 ... Address translation stopping device 31 ... TLB 32, 33 ... Concatenator 34, 35, 36 ... Comparator 80, 90, 100 ... Logical address space 81, 82 ... Threads 83, 94 , 104 ... Instructions to be executed 84, 95, 105 ... Access type detection units 85, 96, 106 ... Page table 86 ... Thread number detection units 87, 98 ... Physical address / protection fault signal output units 88, 99, 110 ... Page fault detection units 91, 92, 93, 101, 102, 103 ... Areas 97, 108 ... Number detection section 107 of area including address where instruction to be executed ACL table 109 ... Physical address output section 111 ... Number detection section of area including address of destination to be accessed

───────────────────────────────────────────────────── フロントページの続き (72)発明者 野末 浩志 神奈川県川崎市幸区小向東芝町1番地 株式会社東芝 研究開発センター内 (72)発明者 前田 賢一 神奈川県川崎市幸区小向東芝町1番地 株式会社東芝 研究開発センター内 (72)発明者 瀬川 英生 神奈川県川崎市幸区小向東芝町1番地 株式会社東芝 研究開発センター内 (72)発明者 岡本 利夫 神奈川県川崎市幸区小向東芝町1番地 株式会社東芝 研究開発センター内 (56)参考文献 特開 平3−228156(JP,A) 特開 平3−154949(JP,A) 特開 平3−244054(JP,A) 特開 平3−220647(JP,A) Lee R B.,Precisio n Architecture,IEE E COMPUTER,米国,IEE E,1989年 1月,Vol.22,No. 1,p.78−91 (58)調査した分野(Int.Cl.7,DB名) G06F 12/08 - 12/10 G06F 9/46 G06F 12/14 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Hiroshi Nosue 1 Komukai Toshiba-cho, Saiwai-ku, Kawasaki-shi, Kanagawa Toshiba Research & Development Center, Inc. (72) Inventor Kenichi Maeda Komukai-shiba, Saiwai-ku, Kawasaki-shi, Kanagawa No. 1 in Toshiba Research & Development Center (72) Inventor Hideo Segawa Komukai Toshiba Town, Komu-ku, Kawasaki City, Kanagawa No. 1 In Toshiba Research & Development Center (72) Inventor Toshio Okamoto Komukai, Kawasaki-shi, Kanagawa Prefecture Toshiba Town No. 1 within Toshiba Research & Development Center Co., Ltd. (56) Reference JP-A-3-228156 (JP, A) JP-A-3-154949 (JP, A) JP-A-3-244054 (JP, A) Kaihei 3-220647 (JP, A) Lee RB. , Precision Architecture, IEEE E COMPUTER, USA, IEEE E, January 1989, Vol. 22, No. 1, p. 78-91 (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 12/08-12/10 G06F 9/46 G06F 12/14

Claims (11)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のスレッドを起動して仮想空間に割
り付けられたプログラムを並行して実行する計算機に設
けられ、論理アドレスから物理アドレスへの変換を行な
うメモリ管理装置であって、 現在プログラムを実行しているスレッドのスレッド番号
を記憶するスレッド番号記憶手段と、論理アドレスで特定される一論理ページに対応して、ス
レッド番号を含むアクセスの可否を示す情報を複数記憶
可能なエントリ記憶 手段と、前記スレッド番号記憶手段に記憶される スレッド番号を
持つスレッドが前記論理アドレスへアクセスしようとす
る場合に、前記スレッド番号記憶手段に記憶されるスレ
ッド番号と前記論理アドレスとによって特定される、前
記エントリ記憶手段に記憶される前記アクセスの可否
示す情報を用いて、このアクセスをしようとしているス
レッドのアクセスの正当性を検証する検証手段とを具備
し、 この検証手段によりアクセスの正当性が保証された場合
に前記論理アドレスから物理アドレスへの変換結果を出
力することを特徴とするメモリ管理装置。
1. A memory management device for converting a logical address to a physical address, the memory management device being provided in a computer for activating a plurality of threads to execute programs allocated to a virtual space in parallel. The thread number storage means for storing the thread number of the executing thread and the thread number storage means corresponding to one logical page specified by the logical address.
Stores multiple pieces of information, including red numbers, indicating whether access is possible
Possible entry storage means and a thread stored in the thread number storage means When a thread having a thread number attempts to access the logical address, a thread stored in the thread number storage means
Before, which is specified by the link number and the logical address.
The access information stored in the entry storage means is used to access this access information .
A memory management, comprising: a red means for verifying the legitimacy of the access, and outputting the conversion result from the logical address to the physical address when the legitimacy of the access is guaranteed by the verifier. apparatus.
【請求項2】 前記検証手段は、前記アクセスをしよう
としているスレッドの前記スレッド番号、または前記ア
クセス可能かを示す情報の中のスレッド番号の、全部ま
たは一部をマスクして、当該スレッド番号同士の一致を
調べる手段を含むことを特徴とする請求項1記載のメモ
リ管理装置。
2. The verification means masks all or a part of the thread number of the thread that is trying to access or the thread number in the information indicating whether the thread is accessible, and 2. The memory management device according to claim 1, further comprising means for checking a match between the two.
【請求項3】 前記検証手段は、前記アクセスをしよう
としているスレッドの前記スレッド番号と、前記アクセ
ス可能かを示す情報の中のスレッド番号とについて、所
定の論理演算を行い、この論理演算の結果に従って、当
該スレッド番号同士の一致を判断する手段を含むことを
特徴とする請求項1記載のメモリ管理装置。
3. The verification means performs a predetermined logical operation on the thread number of the thread trying to access and the thread number in the information indicating whether the access is possible, and the result of the logical operation. 2. The memory management device according to claim 1, further comprising means for determining whether the thread numbers match each other in accordance with the above.
【請求項4】 複数の領域に分割された仮想空間に割り
付けられたプログラムを実行する計算機に設けられ、論
理アドレスから物理アドレスへの変換を行なうメモリ管
理装置であって、 前記論理アドレスが前記仮想空間中のどの領域に置かれ
ているプログラムからアクセス可能であるかを示す情報
を記憶する手段と、 プログラム実行中に前記論理アドレスへのアクセス命令
が出現した場合に、このアクセス命令が置かれている領
域からのアクセスの正当性を、前記アクセス可能である
かを示す情報を用いて検証する検証手段とを具備し、 この検証手段によりアクセスの正当性が保証された場合
に前記論理アドレスから物理アドレスへの変換結果を出
力することを特徴とするメモリ管理装置。
4. A memory management device provided in a computer for executing a program allocated to a virtual space divided into a plurality of areas, for converting a logical address to a physical address, wherein the logical address is the virtual address. Means for storing information indicating which area in the space is accessible by the program, and this access instruction is placed when an access instruction to the logical address appears during execution of the program. the validity of the access from the area where there are possible the access
And a verification means for verifying using the information indicating whether or not the memory management is characterized by outputting the conversion result from the logical address to the physical address when the validity of the access is guaranteed by the verification means. apparatus.
【請求項5】 前記検証手段は、前記アクセスをしよう
としているプログラムの置かれている領域の領域番号、
または前記アクセス可能かを表す情報の中の領域番号
の、全部又は一部をマスクして、当該領域番号同士の一
致を調べる手段を含むことを特徴とする請求項4記載の
メモリ管理装置。
5. The verification means is an area number of an area where the program to be accessed is placed,
5. The memory management device according to claim 4, further comprising means for masking all or a part of the area number in the information indicating whether the area is accessible and checking for a match between the area numbers.
【請求項6】 前記検証手段は、前記アクセスをしよう
としているプログラムの置かれている領域の領域番号
と、前記アクセス可能かを表す情報の中の領域番号とに
ついて、所定の論理演算を行い、この論理演算の結果に
従って、当該領域番号の一致を判断する手段を含むこと
を特徴とする請求項4記載のメモリ管理装置。
6. The verification means performs a predetermined logical operation on an area number of an area in which the program to be accessed is placed and an area number in the information indicating whether the access is possible, 5. The memory management device according to claim 4, further comprising means for determining whether the area numbers match according to the result of the logical operation.
【請求項7】 仮想空間に割り付けられたプログラムを
実行する計算機に設けられ、アドレス変換テーブルに保
持されている複数の論理アドレスに対して指示された
アドレスとの一致を検出し、該一致が検出された際に
前記指示された論理アドレスと対になる物理アドレスを
出力する手段を有するメモリ管理装置であって、 前記アドレス変換テーブル中のアドレス対の各々に対し
て、該プログラムを実行中の実行主体の番号を含むアク
セスの可否を示す情報、または/および、前記論理アド
レスが前記仮想空間中のどの領域に置かれているプログ
ラムからアクセス可能であるかを示す情報であるアクセ
ス保護情報を複数個記憶する手段と、 前記複数個のアクセス保護情報に基づき、実行中のプロ
グラムの前記仮想空間内の位置からの前記指示された
アドレスへのアクセスが許可されるか否か、および/
または、該プログラムを実行中の実行主体による前記指
示された論理アドレスへのアクセスが許可されるか否か
を判定する手段と、 前記判定結果を出力する手段とを具備したことを特徴と
するメモリ管理装置。
7. A theory for instructing a plurality of logical addresses provided in a computer that executes a program assigned to a virtual space and held in an address translation table.
Detects a match between the physical address, a memory management unit having means for said match outputs the instructed physical address becomes the logic address and pairs when detected, the address pair in said address conversion table for each accession including the number of execution subject running the program
Information indicating whether the access is permitted or not and / or the logical address
Where the reply is located in the virtual space
Access, which is information indicating whether it is accessible from the RAM
Means for multiple stores scan protection information, based on said plurality of access protection information, the designated argument from the position of the virtual space of the running program
Whether or not access to the physical address is allowed, and /
Alternatively, the memory is provided with means for determining whether or not access to the designated logical address by the execution subject executing the program is permitted, and means for outputting the determination result. Management device.
【請求項8】 仮想空間に割り付けられたプログラムを
実行する計算機に設けられ、アドレス変換テーブルに保
持されている複数の論理アドレスに対して指示された
アドレスとの一致を検出し、該一致が検出された際に
前記指示された論理アドレスと対になる物理アドレスを
出力する手段と、前記アドレス変換テーブルの一部を置
くキャッシュメモリとを有するメモリ管理装置であっ
て、 前記アドレス変換テーブル中に設けられ、アドレス対の
各々に対して、該プログラムを実行中の実行主体の番号
を含むアクセスの可否を示す情報、または/および、前
記論理アドレスが前記仮想空間中のどの領域に置かれて
いるプログラムからアクセス可能であるかを示す情報で
あるアクセス保護情報を複数で可変個記憶する第1の記
憶手段と、 前記キャッシュメモリ中に設けられ、アドレス対の各々
に対して、論理アドレスで特定される一論理ページに対
応して、該プログラムを実行中の実行主体の番号を含む
アクセスの可否を示す情報、または/および、前記論理
アドレスが前記仮想空間中のどの領域に置かれているプ
ログラムからアクセス可能であるかを示す情報であるア
クセス保護情報を複数で固定個まで記憶可能な第2の記
憶手段と、 前記第2の記憶手段のアクセス保護情報に基づき、前記
指示されたアドレスへのアクセスが許可されるか否かを
判定する判定手段と、 前記判定手段で判定できなかった場合に、前記キャッシ
ュメモリ中の第2の記憶手段の内容を、前記アドレス変
換テーブル中の第1の記憶手段の内容の一部入れ換え
る手段とを具備したことを特徴とするメモリ管理装置。
8. A theory for instructing a plurality of logical addresses stored in an address conversion table, which is provided in a computer that executes a program allocated to a virtual space.
Memory having detected a match with the physical address, and means for said match outputs the instructed physical address becomes the logic address and pairs when detected, and a cache memory to put a portion of said address translation table A management device, which is provided in the address conversion table, and for each address pair, the number of the executing subject who is executing the program
Information indicating whether or not access is possible, and / or before
The logical address is located in which area of the virtual space
Information that indicates whether the
A first storage unit for storing a plurality of variable pieces of access protection information; and a pair of logical pages identified by logical addresses for each address pair provided in the cache memory .
Accordingly, the number of the executing subject who is executing the program is included.
Information indicating access permission and / or the logic
The address where the address is located in the virtual space.
The information that indicates whether it is accessible from the program
Second storage means capable of storing up to a fixed number of pieces of access protection information, and based on the access protection information of the second storage means, it is determined whether or not access to the designated address is permitted. If the determination means and the determination means cannot make a determination, the contents of the second storage means in the cache memory are replaced with a part of the contents of the first storage means in the address conversion table <br / And a memory management device.
【請求項9】 複数のスレッドを起動して仮想空間に割
り付けられたプログラムを並行して実行する計算機にお
いて第一のアドレスから第二のアドレスへの変換を行な
うメモリ管理方法であって、 前記第一のアドレスで特定される一論理ページに対応し
て、スレッド番号を含むアクセスの可否を示すアクセス
許否情報を複数記憶し、 現在プログラムを実行しているスレッドのスレッド番号
を記憶し、この記憶されたスレッド番号と前記第1アドレスとによ
って前記複数のアクセス許否情報から一つ特定し、特定
された 前記アクセス許否情報に基づいて、このアクセス
をしようとしているスレッドへのアクセスの許否を判断
し、 前記アクセスが許可されると判断した場合に前記第一の
アドレスから第二のアドレスへの変換結果を出力するこ
とを特徴とするメモリ管理方法。
9. A memory management method for performing conversion from a first address to a second address in a computer that activates a plurality of threads to execute programs allocated to a virtual space in parallel. Corresponds to one logical page specified by one address
A plurality of pieces of access permission / prohibition information indicating the permission / prohibition of access including the thread number, the thread number of the thread currently executing the program is stored, and the stored thread number and the first address are stored.
One of the access permission / denial information is specified and
Based on the access permission information, the access
Determining whether or not to permit access to the thread that is trying to do so, and outputting the conversion result from the first address to the second address when determining that the access is permitted. .
【請求項10】 複数の領域に分割された仮想空間に割
り付けられたプログラムを実行する計算機において第一
のアドレスから第二のアドレスへの変換を行なうメモリ
管理方法であって、 前記第一のアドレスが前記仮想空間中のどの領域に置か
れているプログラムからアクセス可能であるかを示す
クセス許否情報を記憶し、 前記第一のアドレスをアクセスするプログラムの置かれ
ている領域を検出し、 この検出された領域からの前記第一のアドレスへのアク
セスが許可されるか否かを、前記アクセス許否情報に基
づいて判断し、 前記アクセスが許可されると判断した場合に前記第一の
アドレスから第二のアドレスへの変換結果を出力するこ
とを特徴とするメモリ管理方法。
10. A memory management method for performing conversion from a first address to a second address in a computer that executes a program allocated to a virtual space divided into a plurality of areas, wherein the first address Stores access permission / prohibition information indicating which area in the virtual space is accessible from the program, and stores the area where the program accessing the first address is located. Detecting whether or not access to the first address from the detected area is permitted, based on the access permission / prohibition information, and if it is determined that the access is permitted, A memory management method comprising outputting a conversion result from one address to a second address.
【請求項11】 論理アドレスとこれに対応する物理ア
ドレスを含むエントリを複数記憶する手段と、 前記エントリのそれぞれに対応して、前記論理アドレス
へのアクセスが許可される複数のプログラムそれぞれの
アクセス制御情報を憶する手段と、 現在実行中のプログラムがある論理アドレスへアクセス
しようとした場合に、該ある論理アドレスに対応するあ
るエントリに対応する複数記憶された前記アクセス制御
情報の中に、該実行中のプログラムに関する情報に適合
するものがあるか否かを検出する手段と、 前記適合するものあると検出された場合にその旨の通知
を出力する手段と、 前記通知が出力された場合に前記ある論理アドレスに対
応して記憶された前記物理アドレスを出力する手段とを
具備したことを特徴とするメモリ管理装置。
11. A means for storing a plurality of entries including a logical address and a physical address corresponding to the logical address, and a plurality of programs for each of a plurality of programs permitted to access the logical address corresponding to each of the entries. /> means for memorize the access control information, when attempting to access the logical address to which the currently executing program, corresponding to the given virtual address Surua
Means for detecting whether or not there is a plurality of stored access control information corresponding to the entry that matches the information regarding the program being executed, and detecting that there is A memory for outputting a notification to that effect, and a means for outputting the physical address stored in correspondence with the certain logical address when the notification is output. Management device.
JP00393793A 1991-11-29 1993-01-13 Memory management device and method Expired - Fee Related JP3454854B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP00393793A JP3454854B2 (en) 1992-01-16 1993-01-13 Memory management device and method
US08/021,098 US5627987A (en) 1991-11-29 1993-02-23 Memory management and protection system for virtual memory in computer system
US08/753,944 US5890189A (en) 1991-11-29 1996-12-03 Memory management and protection system for virtual memory in computer system

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2604092 1992-01-16
JP4-26040 1992-09-04
JP00393793A JP3454854B2 (en) 1992-01-16 1993-01-13 Memory management device and method

Publications (2)

Publication Number Publication Date
JPH05257811A JPH05257811A (en) 1993-10-08
JP3454854B2 true JP3454854B2 (en) 2003-10-06

Family

ID=29272080

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00393793A Expired - Fee Related JP3454854B2 (en) 1991-11-29 1993-01-13 Memory management device and method

Country Status (1)

Country Link
JP (1) JP3454854B2 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001005726A (en) 1999-04-20 2001-01-12 Nec Corp Memory address space expanding device and storage medium stored with program
US7290112B2 (en) * 2004-09-30 2007-10-30 International Business Machines Corporation System and method for virtualization of processor resources
JP2007122305A (en) * 2005-10-27 2007-05-17 Hitachi Ltd Virtual machine system
US9390031B2 (en) * 2005-12-30 2016-07-12 Intel Corporation Page coloring to associate memory pages with programs
US7844781B2 (en) * 2006-02-23 2010-11-30 International Business Machines Corporation Method, apparatus, and computer program product for accessing process local storage of another process
US7882318B2 (en) 2006-09-29 2011-02-01 Intel Corporation Tamper protection of software agents operating in a vitual technology environment methods and apparatuses
JP2009104555A (en) * 2007-10-25 2009-05-14 Intel Corp Method and apparatus for preventing alteration of software agent operating in vt environment
JP5225003B2 (en) * 2008-10-01 2013-07-03 キヤノン株式会社 MEMORY PROTECTION METHOD, INFORMATION PROCESSING DEVICE, MEMORY PROTECTION PROGRAM, AND RECORDING MEDIUM CONTAINING MEMORY PROTECTION PROGRAM
JP5845902B2 (en) * 2012-01-04 2016-01-20 トヨタ自動車株式会社 Information processing apparatus and memory access management method
US8938602B2 (en) * 2012-08-02 2015-01-20 Qualcomm Incorporated Multiple sets of attribute fields within a single page table entry
US9330026B2 (en) * 2013-03-05 2016-05-03 Qualcomm Incorporated Method and apparatus for preventing unauthorized access to contents of a register under certain conditions when performing a hardware table walk (HWTW)
GB2539429B (en) 2015-06-16 2017-09-06 Advanced Risc Mach Ltd Address translation
GB2539435B8 (en) 2015-06-16 2018-02-21 Advanced Risc Mach Ltd Data processing memory access control, in which an owning process for a region of memory is specified independently of privilege level
GB2539433B8 (en) 2015-06-16 2018-02-21 Advanced Risc Mach Ltd Protected exception handling
US10114768B2 (en) * 2016-08-29 2018-10-30 Intel Corporation Enhance memory access permission based on per-page current privilege level
JP6838223B2 (en) * 2016-11-02 2021-03-03 日立Astemo株式会社 Vehicle control device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Lee R B.,Precision Architecture,IEEE COMPUTER,米国,IEEE,1989年 1月,Vol.22,No.1,p.78−91

Also Published As

Publication number Publication date
JPH05257811A (en) 1993-10-08

Similar Documents

Publication Publication Date Title
US5280614A (en) Apparatus and method for controlling access to data using domains
US7882318B2 (en) Tamper protection of software agents operating in a vitual technology environment methods and apparatuses
JP3454854B2 (en) Memory management device and method
EP0253824B1 (en) Paged memory management unit capable of selectively supporting multiple address spaces
JP4295111B2 (en) Memory management system and memory access security grant method based on linear address
CA1313424C (en) Nonhierarchical program authorization mechanism
US5845331A (en) Memory system including guarded pointers
US6823433B1 (en) Memory management system and method for providing physical address based memory access security
US4890223A (en) Paged memory management unit which evaluates access permissions when creating translator
US6430667B1 (en) Single-level store computer incorporating process-local address translation data structures
US8943288B2 (en) Method of controlling memory access
US4763250A (en) Paged memory management unit having variable number of translation table levels
US8955062B2 (en) Method and system for permitting access to resources based on instructions of a code tagged with an identifier assigned to a domain
JPS6022377B2 (en) Address control method
JPS6248258B2 (en)
KR100995146B1 (en) System and method for handling device accesses to a memory providing increased memory access security
TW202008169A (en) Memory protection unit using memory protection table stored in memory system
US4766537A (en) Paged memory management unit having stack change control register
US6598050B1 (en) Apparatus and method for limited data sharing in a multi-tasking system
JP2001056783A (en) Program unit memory attribute managing system
EP0425771A2 (en) An efficient mechanism for providing fine grain storage protection intervals
CA2029628A1 (en) Translation look aside buffer with parallel exception checking and update bypass
US6889308B1 (en) Method and apparatus for protecting page translations
JPS63240657A (en) Memory protecting device
JPH01125638A (en) Cache memory device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080725

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090725

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090725

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100725

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees