JPH071485B2 - Virtual memory method - Google Patents
Virtual memory methodInfo
- Publication number
- JPH071485B2 JPH071485B2 JP61022411A JP2241186A JPH071485B2 JP H071485 B2 JPH071485 B2 JP H071485B2 JP 61022411 A JP61022411 A JP 61022411A JP 2241186 A JP2241186 A JP 2241186A JP H071485 B2 JPH071485 B2 JP H071485B2
- Authority
- JP
- Japan
- Prior art keywords
- page
- data
- area
- main memory
- 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 - Lifetime
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【発明の詳細な説明】 産業上の利用分野 本発明は、複数プログラムを並列的に処理する処理シス
テムにおいて好適に用いられる仮想記憶方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a virtual memory system preferably used in a processing system that processes a plurality of programs in parallel.
従来技術 複数プログラムを、たとえば時分割して並列的に処理す
る処理システムにおいて、従来用いられていた仮想記憶
制御方式では、複数種類のプログラムを格納するたとえ
ば磁気ディスク装置などからなる外部記憶装置から、所
望されるプログラムを中央処理装置のメインメモリに読
出し、格納されたプログラムに対して処理を行なってい
た。このプログラムの処理の進行に従って、中央処理装
置のメインメモリに格納されていないプログラムのペー
ジへの処理要求が発生すると、メインメモリに格納され
ているプログラムのあるページを仮想記憶領域に転送
し、要求されたプログラムを外部記憶装置からメインメ
モリに読出して格納し、処理するようにしていた。2. Description of the Related Art In a processing system that processes a plurality of programs in parallel in a time-division manner, for example, in a virtual storage control method that has been conventionally used, an external storage device such as a magnetic disk device that stores a plurality of types of programs The desired program is read out to the main memory of the central processing unit and the stored program is processed. When a processing request for a page of a program that is not stored in the main memory of the central processing unit occurs as the processing of this program progresses, the page with the program stored in the main memory is transferred to the virtual storage area and the request is made. The executed program is read from the external storage device to the main memory, stored, and processed.
発明が解決しようとする問題点 上述したような従来技術の仮想記憶方式では、仮想記憶
領域は予めページ単位に割り付けられて構成されてお
り、また全体として連続した領域となっていた。このた
め上述したような仮想記憶領域に転送すべきプログラム
のページ以外のページに関しても割り付けられており、
したがってむやみに大きな仮想記憶領域を準備しなけれ
ばならないという問題点があった。Problems to be Solved by the Invention In the conventional virtual storage system as described above, the virtual storage area is pre-allocated in page units and is a continuous area as a whole. Therefore, pages other than the pages of the program to be transferred to the virtual storage area as described above are also allocated,
Therefore, there is a problem that a large virtual storage area must be prepared unnecessarily.
本発明の目的は、上述の問題点を解決し、仮想記憶領域
の容量を可及的に低減し、本発明が用いられる処理シス
テムの作業効率を向上することができる仮想記憶方式を
提供することである。An object of the present invention is to solve the above problems, to provide a virtual storage system capable of reducing the capacity of the virtual storage area as much as possible and improving the work efficiency of the processing system in which the present invention is used. Is.
問題点を解決するための手段 本発明は、(a)処理が行われるプログラムおよびデー
タがページごとに区分され、 (b)外部記憶装置1は、 (b1)複数のプログラムおよびデータを格納する格納領
域3と、 (b2)仮想記憶領域4とを有し、 (c)外部記憶装置1に接続される中央処理装置2は、 (c1)プログラムおよびデータをページごとに記憶する
メインメモリ5と、 (c2)プログラムおよびデータのページごとに、メイン
メモリ5および仮想記憶領域4に割り付けられているか
どうかを示すテーブル13を有し、メインメモリ5からの
プログラムおよびデータを記憶して処理を行う制御ブロ
ック7a〜7mと、 (c3)メインメモリ5の各ページの領域S1〜Skの使用状
態をストアする第1管理テーブル8と、 (c4)外部記憶装置1の仮想記憶領域4における各ペー
ジの領域41〜4kの使用状態をストアする第2管理テーブ
ル9とを有し、 (d)制御ブロック7a〜7mによるプログラムおよびデー
タの処理の進行に伴ってメインメモリ52に記憶されてい
ないプログラムおよびデータへの処理要求が発生した場
合、 (d1)第1管理テーブル8のストア内容に基づき、メイ
ンメモリ5の未使用の領域S1〜Skを選択し(第2図のス
テップn1)、 前記テーブル13の内容に基づき、仮想記憶領域4に格納
されているプログラムまたはデータがあるとき、そのプ
ログラムまたはデータをページごとにメインメモリ5に
転送して処理する動作を行い(ステップn5)、 仮想記憶領域4に格納されているプログラムまたはデー
タがないとき、格納領域3からページ毎にメインメモリ
5に転送して処理する動作を行い(ステップn6)、 (d2)第1管理テーブル8のストア内容に基づき、メイ
ンメモリ5に未使用の領域S1〜Skがないことが判定され
ると、メインメモリ5において最も古く使用されたペー
ジSkを選択し(ステップn7)、 その選択されたページSkの内容がプログラムであるかデ
ータであるかを判定し(ステップn8)、 (d2−1)プログラムであれば、最も古く使用された前
記選択されたページSkに、処理要求されたプログラムを
格納領域3または仮想記憶領域4から転送して処理する
動作を行うとともに、テーブル13のストア内容を消去お
よび変更する動作を行い(ステップn9,n3〜n6)、 (d2−2)データであれば、 (d2−2−1)テーブル13の内容に基づき、仮想記憶領
域4に記憶されていることが判定されると(ステップn1
0)、第1管理テーブル8のストア内容に基づきデータ
変更が行われたかを判定し(ステップn11)、 データ変更が行われているとき、その変更が行われたデ
ータをメインメモリ5から仮想記憶領域4に転送し、処
理要求されたデータを、転送後のメインメモリ5に転送
して処理する動作を行うとともに、テーブル13のストア
内容を消去および変更する動作を行い(ステップn1
2)、その後、および データ変更が行われていないとき、最も古く使用された
前記選択されたページSkに、処理要求されたデータを格
納領域3または仮想領域4から転送して処理する動作を
行うとともに、テーブル13のストア内容を消去および変
更する動作を行い(ステップn9,n3〜n6)、 (d2−2−2)データが仮想記憶領域4に記憶されてい
ないことが判定されると、第2管理テーブル9の内容に
基づき、仮想記憶領域4に使用されていないページ領域
があれば、そのページ領域に、またその使用されていな
いページ領域がなければ、仮想記憶領域4における読出
し処理のみの対象となるデータ内容がストアされている
ページ領域を検索し、その検索して得られたページ領域
に、メインメモリ5において転送すべきデータを転送す
るとともに、テーブル13のストア内容を消去および変更
する動作を行う(ステップn13〜n17)ことを特徴とする
仮想記憶方式である。Means for Solving Problems According to the present invention, (a) a program and data to be processed are divided for each page, (b) the external storage device 1 is (b1) a storage for storing a plurality of programs and data. The central processing unit 2 having an area 3 and (b2) a virtual storage area 4 and (c) connected to the external storage device 1 includes (c1) a main memory 5 for storing programs and data page by page; (C2) A control block that has a table 13 indicating whether or not it is allocated to the main memory 5 and the virtual storage area 4 for each page of the program and data, and that stores the program and data from the main memory 5 to perform processing. 7a to 7m, (c3) a first management table 8 that stores the usage states of the areas S1 to Sk of each page of the main memory 5, and (c4) the virtual storage area 4 of the external storage device 1. And a second management table 9 for storing the usage states of the areas 41 to 4k of each page in (4) and (d) stored in the main memory 52 as the processing of programs and data by the control blocks 7a to 7m progresses. When a processing request for a non-existent program and data is generated, (d1) unused areas S1 to Sk of the main memory 5 are selected based on the stored contents of the first management table 8 (step n1 in FIG. 2), Based on the contents of the table 13, when there is a program or data stored in the virtual storage area 4, the program or data is transferred page by page to the main memory 5 for processing (step n5). When there is no program or data stored in the storage area 4, the operation of transferring from the storage area 3 to the main memory 5 for each page and performing the processing is performed. N6), (d2) If it is determined that there is no unused area S1 to Sk in the main memory 5 based on the stored contents of the first management table 8, then the oldest used page Sk in the main memory 5 is determined. Is selected (step n7), it is determined whether the content of the selected page Sk is a program or data (step n8), and (d2-1) if it is a program, the oldest used selection The program requested to be processed is transferred from the storage area 3 or the virtual storage area 4 to the processed page Sk and processed, and the stored contents of the table 13 are deleted and changed (steps n9, n3 ... n6) and (d2-2) data, it is determined that the data is stored in the virtual storage area 4 based on the contents of (d2-2-1) table 13 (step n1
0), it is determined whether or not the data is changed based on the contents stored in the first management table 8 (step n11), and when the data is changed, the changed data is virtually stored from the main memory 5. Transfer the data to the area 4, transfer the requested data to the main memory 5 after the transfer, and perform the operation, and perform the operation to erase and change the stored contents of the table 13 (step n1
2) After that, and when the data is not changed, the operation of transferring the requested data from the storage area 3 or the virtual area 4 to the selected page Sk that has been used most old is performed. At the same time, the operation of deleting and changing the stored contents of the table 13 is performed (steps n9, n3 to n6), and (d2-2-2) When it is determined that the data is not stored in the virtual storage area 4, 2 Based on the content of the management table 9, if there is an unused page area in the virtual storage area 4, and if there is no unused page area in the virtual storage area 4, only the read processing in the virtual storage area 4 is performed. A page area in which the target data content is stored is searched, and the data to be transferred in the main memory 5 is transferred to the page area obtained by the search. This is a virtual memory system characterized by performing an operation of erasing and changing the stored contents of the table 13 (steps n13 to n17).
作 用 本発明に従えば、外部記憶装置1と中央処理装置2とが
設けられ、外部記憶装置1には、プログラムおよびデー
タのための格納領域3と仮想記憶領域4とを設け、中央
処理装置2にはメインメモリ5と第1および第2管理テ
ーブル8,9などを設け、これらの第1および第2管理テ
ーブル8,9の内容に基づき、プログラムの処理要求ごと
にメインメモリ5の対応のプログラムページが存在しな
ければ、外部記憶装置1の格納領域3または仮想記憶領
域4からプログラムおよびデータを転送させ、またメイ
ンメモリ5中に空ページが存在しないときには、最も古
いページを消去して新たなプログラムページを転送す
る。しかも本発明に従えば、ページ領域Skの内容が、プ
ログラムであるか、読出し動作のみの対象のデータであ
るかを判定し、データであれば、データ変更が行われた
か否かを判定し、データ変更が行われていれば、その変
更が行われたデータをメインメモリ5から仮想記憶領域
4に転送し、データ変更が行われていないならば、消去
動作と転送処理動作とを行う。これによって仮想記憶領
域4の容量をむやみに大きく設定しておく必要がなく、
仮想記憶領域を含む外部記憶装置1を効率的に使用する
ことができるようになる。Operation According to the present invention, an external storage device 1 and a central processing unit 2 are provided, and the external storage device 1 is provided with a storage area 3 for programs and data and a virtual storage area 4, 2 is provided with a main memory 5 and first and second management tables 8 and 9, etc., and the correspondence of the main memory 5 for each processing request of the program is based on the contents of these first and second management tables 8 and 9. If there is no program page, the program and data are transferred from the storage area 3 or the virtual storage area 4 of the external storage device 1, and when there is no empty page in the main memory 5, the oldest page is erased and a new page is created. Transferring a program page. Moreover, according to the present invention, the content of the page area Sk is a program, it is determined whether the target data of the read operation only, if the data, it is determined whether the data change, If the data has been changed, the changed data is transferred from the main memory 5 to the virtual storage area 4, and if the data has not been changed, the erase operation and the transfer processing operation are performed. This eliminates the need to unnecessarily set the capacity of the virtual storage area 4 to be large,
The external storage device 1 including the virtual storage area can be used efficiently.
実施例 第1図は本発明の一実施例を実現する構成を示すブロッ
ク図である。本実施例の構成は基本的に、たとえば磁気
ディスク装置などからなる外部記憶装置1と中央処理装
置2とを含む。外部記憶装置1において情報が記憶され
る部分は、処理すべきたとえば複数種類のプログラムお
よびデータが格納されるプログラム格納領域3と仮想記
憶領域4とを含む。プログラム格納領域3は、たとえば
複数のプログラム・データPa,Pb,…,Pmからなる。また
各プログラム・データPa〜Pmは、それぞれ当該プログラ
ムのスタートアドレスおよびプログラムのサイズなどの
情報からなるヘッダ情報部Ha〜Hmと、プログラム情報部
Ca〜Cmと、当該プログラム処理において要求されるデー
タ部Da〜Dmとからなる。Embodiment FIG. 1 is a block diagram showing a configuration for realizing an embodiment of the present invention. The configuration of this embodiment basically includes an external storage device 1 and a central processing unit 2, which are magnetic disk devices, for example. The portion of the external storage device 1 in which information is stored includes a program storage area 3 in which, for example, a plurality of types of programs and data to be processed are stored, and a virtual storage area 4. The program storage area 3 is composed of, for example, a plurality of program data Pa, Pb, ..., Pm. Further, each program data Pa to Pm is composed of a header information section Ha to Hm and a program information section, each of which includes information such as the start address of the program and the size of the program.
It consists of Ca to Cm and data parts Da to Dm required in the program processing.
また中央処理装置2には、処理されるプログラムをこの
プログラムが区分されているページごとに記憶するペー
ジ領域S1〜Skからなるメインメモリ5を含む。また中央
処理装置2には制御部6が備えられる。制御部6には平
行処理されるプログラム・データPa〜Pmに対応する制御
ブロック7a,7b,…,7mと、メインメモリ5の各ページ領
域S1〜Skの使用状態、たとえば各ページ領域S1〜Skの格
納情報の有無などを管理する第1管理テーブル8と、該
記憶装置1に対応する第2管理テーブル9とを含む。The central processing unit 2 also includes a main memory 5 including page areas S1 to Sk for storing a program to be processed for each page into which the program is divided. Further, the central processing unit 2 is provided with a control unit 6. , 7m corresponding to the program data Pa to Pm to be processed in parallel and the usage state of each page area S 1 to Sk of the main memory 5, for example, each page area S 1 Includes a first management table 8 for managing the presence / absence of storage information of .about.Sk, and a second management table 9 corresponding to the storage device 1.
前記制御ブロック7a〜7m、それぞれ対応する各プログラ
ムの制御情報を記憶するコントロール情報領域10a,10b,
…,10mと、前記ヘッダ情報部Ha〜Hmに基づくプログラム
コードのスタートアドレスおよびプログラムのサイズな
どを記憶するコードアクセス情報領域11a〜11mと、デー
タ情報領域Da〜Dmのデータのアクセス情報を記憶するデ
ータアクセス情報領域12a〜12mと、各プログラムPa〜Pm
のページごとのメインメモリ5への割り当て状態を記憶
するテーブル13とを含む。The control blocks 7a to 7m, control information areas 10a, 10b for storing control information of each corresponding program,
, 10m, code access information areas 11a to 11m for storing the start address and program size of the program code based on the header information sections Ha to Hm, and data access information for the data information areas Da to Dm. Data access information area 12a-12m and each program Pa-Pm
And a table 13 for storing the allocation state of each page to the main memory 5.
テーブル13は、各プログラムPa〜Pmが、それぞれのペー
ジごとにメインメモリ5および仮想記憶領域4に割り付
けられているかどうかを示す。すなわち領域Ma1〜Mak
は、プログラムPaの各ページが、メインメモリ5のペー
ジ領域S1〜Skに割り付けられているかどうかを示し、割
り付けられているページ領域に対応する領域にはメイン
メモリ5の当該ページ領域のアドレスが記憶される。ま
た領域Va1〜Vakは、プログラムPaが仮想記憶領域4に割
り付けられているかどうかを示し、割り付けられていれ
ば当該ページが割り付けられている仮想記憶領域4のア
ドレス、すなわち外部記憶装置1が磁気ディスク装置で
あれば、ディスクアドレスが記憶される。The table 13 shows whether or not each program Pa to Pm is allocated to the main memory 5 and the virtual storage area 4 for each page. That is, the area Ma1 to Mak
Indicates whether each page of the program Pa is allocated to the page areas S1 to Sk of the main memory 5, and the address of the page area of the main memory 5 is stored in the area corresponding to the allocated page area. To be done. Areas Va1 to Vak indicate whether or not the program Pa is allocated to the virtual storage area 4, and if allocated, the address of the virtual storage area 4 to which the page is allocated, that is, the external storage device 1 is the magnetic disk. If it is a device, the disk address is stored.
これらの領域Ma1〜Mak;Va1〜Vakにおいて、割り付けが
なされていない箇所には所定のコード情報が記憶され
る。以下、制御ブロック7b,…,7mは制御ブロック7aと同
様な構成を有し、必要な場合には制御ブロック7aの構成
について用いた参照符10〜13およびM1〜Mk;V1〜Vkに、
それぞれ添字b〜mを付して示す。外部記憶装置1のプ
ログラムPa〜Pmのいずれかのプログラムがメインメモリ
5に読出されたとき、当該プログラムに対応して、所定
の制御ブロック7a〜7mのいずれかが選択され、当該制御
ブロック7におけるコントロール制御領域11、コードア
クセス情報領域12およびデータアクセス情報領域13の内
容がそれぞれ設定される。In these areas Ma1 to Mak; Va1 to Vak, predetermined code information is stored in unassigned locations. Hereinafter, the control blocks 7b, ..., 7m have the same configuration as the control block 7a, and if necessary, reference numerals 10 to 13 and M1 to Mk; V1 to Vk used for the configuration of the control block 7a,
They are shown with subscripts b to m, respectively. When one of the programs Pa to Pm of the external storage device 1 is read to the main memory 5, one of the predetermined control blocks 7a to 7m is selected corresponding to the program, and the control block 7 Control The contents of the control area 11, the code access information area 12 and the data access information area 13 are set respectively.
第2図は本発明の一実施例の仮想記憶方式を説明するフ
ローチャートである。第1図および第2図を参照して、
本実施例の方式について説明する。中央処理装置2にプ
ログラム処理の要求が入力されると、外部記憶装置1の
プログラム格納領域3における所望のプログラムが選択
される。ここでプログラムPaが選択された場合について
説明する。プログラムPaの内容は、中央処理装置2に読
込まれ、制御部6において制御ブロック7a〜7mのうち使
用されていない制御ブロックが選択され、プログラムPa
のヘッダ情報領域Haの内容などから、前記コントロール
情報領域10、コードアクセス情報領域11およびデータア
クセス情報領域12にそれぞれ所定の情報が格納される。FIG. 2 is a flow chart for explaining the virtual memory system according to the embodiment of the present invention. Referring to FIG. 1 and FIG.
The method of this embodiment will be described. When a program processing request is input to the central processing unit 2, a desired program in the program storage area 3 of the external storage device 1 is selected. Here, the case where the program Pa is selected will be described. The contents of the program Pa are read by the central processing unit 2, and the control block 6 selects an unused control block from the control blocks 7a to 7m.
Predetermined information is stored in the control information area 10, the code access information area 11 and the data access information area 12 based on the contents of the header information area Ha.
またプログラムPaのプログラムコード情報領域aの内容
は、所定のページ数に区分され、メインメモリ5に転送
され、各ページごとにメインメモリ5の各ページ領域S1
〜Skに格納される。このメインメモリ5への転送動作
は、第1管理テーブル8のページごとに区分された領域
81〜8kを参照して、メインメモリ5の使用されていない
ページ領域Sが選択される。ここでページ領域S1が選択
された場合について説明する。このとき制御ブロック7a
の領域Ma1に、ページ領域S1のアドレスが格納される。
以下同様にして、プログラムPaのページごとにメインメ
モリ5のページ領域Sへの転送が行なわれ、転送された
ページ領域に対応する領域Maに、当該ページ領域Sのア
ドレスが格納される。The content of the program code information area a of the program Pa is divided into a predetermined number of pages and transferred to the main memory 5, and for each page, each page area S1 of the main memory 5 is divided.
Stored in ~ Sk. The transfer operation to the main memory 5 is performed by the area divided into pages of the first management table 8.
Referring to 8 1 to 8 k, the unused page area S of the main memory 5 is selected. Here, a case where the page area S1 is selected will be described. At this time, control block 7a
The address of the page area S1 is stored in the area Ma1 of.
Similarly, the page Pa of the program Pa is transferred to the page area S of the main memory 5, and the address of the page area S is stored in the area Ma corresponding to the transferred page area.
このようにメインメモリ5に格納されたプログラムに従
った処理の進行に伴なって、メインメモリ5に格納され
ていないプログラムの残余のページ内容の処理要求が発
生すると、第2図のステップn1において、メインメモリ
5の各ページ領域S1〜Skの使用状態を示す領域Ma1〜Mak
を参照して、メインメモリ5で使用されていないページ
領域Sがあるかどうかが判断される。使用されていない
ページ領域Sがある場合、ステップn2において第1管理
テーブル8を参照して、未使用のページ領域81を選択
し、この領域81にメインメモリ5のページ領域S1のアド
レスを記憶する。この処理はステップn3で行なわれる。When a processing request for the remaining page contents of the program not stored in the main memory 5 is generated as the processing according to the program stored in the main memory 5 progresses in this way, at step n1 in FIG. , Ma1 to Mak indicating the usage status of each page area S1 to Sk of the main memory 5
With reference to, it is determined whether there is a page area S that is not used in the main memory 5. If there is an unused page area S, the first management table 8 is referred to in step n2 to select an unused page area 8 1, and the address of the page area S 1 of the main memory 5 is assigned to this area 8 1. Remember. This process is performed in step n3.
続いてステップn4では、前記領域Ma1に対応する領域Va1
を参照して、メインメモリ5に転送すべき前記プログラ
ムPaの所定のページが、仮想記憶領域4に記憶されてい
るかどうかを判定する。仮想記憶領域4に所定のページ
内容が記憶されていると、処理はステップn5で領域Va1
に記憶されているディスクアドレスに従って、仮想記憶
領域4から所定のページ内容をメインメモリ5のページ
領域S1に転送する。一方、前記ステップn4において所望
されているページ内容が仮想記憶領域4に記憶されてい
ない場合、ステップn6においてプログラム格納領域3か
らメインメモリ5に所望のページ内容の転送を行なう。Then, in step n4, the area Va1 corresponding to the area Ma1 is
With reference to, it is determined whether a predetermined page of the program Pa to be transferred to the main memory 5 is stored in the virtual storage area 4. If the predetermined page content is stored in the virtual storage area 4, the process proceeds to the area Va1 in step n5.
The predetermined page contents are transferred from the virtual storage area 4 to the page area S1 of the main memory 5 in accordance with the disk address stored in. On the other hand, if the desired page content is not stored in the virtual storage area 4 in step n4, the desired page content is transferred from the program storage area 3 to the main memory 5 in step n6.
一方、前記ステップn1においてメインメモリ5に使用さ
れていない空ページ領域Sがないことが判定されると、
処理はステップn7に移り、一般にLRU(Least Resently
Used)方式と称せられる処理方式に基づいて、メインメ
モリ5において最も古く使用されたページ(以下、ペー
ジ領域Sk内のページが、この最も古く使用されたページ
であると想定して説明する)Skを選択する。On the other hand, if it is determined in step n1 that there is no unused page area S in the main memory 5,
The process moves to step n7, and generally LRU (Least Resently
The oldest used page in the main memory 5 (hereinafter, the page in the page area Sk is assumed to be the oldest used page) Sk based on a processing method called a Used method Sk. Select.
次にステップn8において、このページ領域Skに記憶され
ている内容がプログラムであるか、または読出し動作の
みの対象であるデータ情報であるかを判定する。この判
定がプログラムであれば、処理はステップn9に移り、制
御ブロック7aの対応する領域Makの記憶内容を消去し、
したがってその記憶内容はメインメモリ5の対応するペ
ージ領域Skから消去される。この処理に引き続いて、前
記ステップn3以降の処理が行なわれる。Next, in step n8, it is determined whether the content stored in the page area Sk is a program or data information which is a target of the read operation only. If this determination is a program, the process proceeds to step n9 to erase the stored contents of the corresponding area Mak of the control block 7a,
Therefore, the stored contents are erased from the corresponding page area Sk of the main memory 5. Subsequent to this processing, the processing from step n3 onward is performed.
前記ステップn3において、判定結果がデータ情報であれ
ば、処理はステップn10に移り、テーブル13の領域Vakを
参照し、仮想記憶領域4に前記ページ領域Skに格納され
ている内容が格納されているかどうかを判定する。この
判断が肯定であれば、処理はステップn11に移り、第1
管理テーブル8を参照して、データ変更が行なわれたか
を判定する。この判定が肯定ならばステップn12に移
り、領域Vakに記憶されている外部記憶装置1のディス
クアドレスに基づいて、メインメモリ5のページ領域Sk
の記憶内容を仮想記憶領域4に転送する。以下ステップ
n9,n3,n4およびこれに引き続づく上述した処理が行なわ
れる。In step n3, if the determination result is data information, the process proceeds to step n10, refers to the area Vak of the table 13, and is the content stored in the page area Sk stored in the virtual storage area 4? Determine whether If this judgment is affirmative, the processing moves to step n11, where the first
By referring to the management table 8, it is determined whether or not the data has been changed. If this determination is affirmative, the process proceeds to step n12, where the page area Sk of the main memory 5 is determined based on the disk address of the external storage device 1 stored in the area Vak.
The storage content of is transferred to the virtual storage area 4. Following steps
n9, n3, n4 and the above-described processing subsequent thereto are performed.
前記ステップn11において、データ変更がなされていな
いならば、処理はステップn9に移る。前記ステップn10
においてメインメモリ5のページ領域Sに記憶すべき内
容が仮想記憶領域4に記憶されていないならば、処理は
ステップn13に移り、外部記憶装置1を管理する第2管
理テーブル9を参照して、仮想記憶領域4のページ領域
41,42,…,4kに、使用されていないページ領域があるか
どうかを判断する。未使用のページがなければ処理はス
テップn14に移り、仮想記憶領域4において前述したよ
うな読出し処理のみの対象となるデータ内容であるペー
ジ領域を検索する。In step n11, if the data has not been changed, the process proceeds to step n9. Step n10
If the content to be stored in the page area S of the main memory 5 is not stored in the virtual storage area 4 at step n13, the process proceeds to step n13 to refer to the second management table 9 for managing the external storage device 1, Page area of virtual storage area 4
It is determined whether there is an unused page area in 4 1 , 4 2 , ..., 4k. If there is no unused page, the process proceeds to step n14, and the virtual memory area 4 is searched for a page area whose data contents are the target of only the read processing as described above.
次にステップn15では、検索して得られた仮想記憶領域
4のページ領域(以下ページ領域42を当該ページ領域と
想定して説明する)42に対応する制御ブロック7aの領域
Va2の記憶内容を消去し、したがって仮想記憶領域4の
ページ領域42の内容を消去する。一方、前記ステップn1
3において判断が肯定である場合、および前記ステップn
15に引き続づく場合には、処理はステップn16に移り、
制御ブロック7aの領域Va2に仮想記憶領域4のページ領
域42のディスクアドレスを記憶させる。In step n15, page area of the virtual storage area 4 obtained by searching (the following page area 4 2 will be described on the assumption that the page area) 4 2 region of the control block 7a which corresponds to the
Clear the storage contents of va2, thus erasing the page area 4 2 of the contents of the virtual storage area 4. On the other hand, the step n1
If the determination is affirmative in step 3, and step n above
If it continues to 15, the process moves to step n16,
Control to block 7a region Va2 and stores the disk address of the page area 4 2 of the virtual storage area 4.
次に処理はステップn17に移り、メインメモリ5におい
て転送すべきページ領域Skの内容を、仮想記憶領域4の
ページ領域42に転送する。以下前記ステップn9以降の処
理が行なわれる。Processing then proceeds to step n17, the contents of the page area Sk to be transferred in main memory 5, and transfers the page area 4 2 of the virtual storage area 4. Thereafter, the processing from step n9 onward is performed.
このような処理を行なうことによって、仮想記憶領域4
の容量をむやみに大きくする必要がなく、外部記憶装置
1の使用効率を格段に改善することができる。By performing such processing, the virtual storage area 4
It is not necessary to unnecessarily increase the capacity of the external storage device 1 and the use efficiency of the external storage device 1 can be significantly improved.
効 果 以上のように本発明によれば、外部記憶装置1はプログ
ラムおよびデータのための格納領域3と仮想記憶領域4
とを有し、中央処理装置2はメインメモリ5と第1およ
び第2管理テーブル8,9などとを有し、これらの第1お
よび第2管理テーブル8,9の内容に基づいて、プログラ
ムの処理要求ごとにメインメモリ5の対応のプログラム
ページが存在しなければ、外部記憶装置1の格納領域3
または仮想記憶領域4からプログラムデータを転送さ
せ、メインメモリ5中に空ページが存在しないときには
最も古いページを消去して新たなプログラムページを転
送するように構成しており、さらに、メインメモリ5の
ページ領域Skの内容がプログラムであるか、読出し動作
のみの対象のデータであるかを判定し、データであると
きには、そのデータ変更が行われたかどうかを判定し、
データがメインメモリ5に記憶されていないことが判定
されると、仮想記憶領域4に使用されていないページ領
域があるかどうか、もしも空ページ領域がなければ、読
出し処理のみの対象となるデータ内容がストアされてい
るページ領域を検索してメインメモリ5の内容を転送す
るようにしたので、仮想記憶領域4の容量をむやみに大
きく設定しておく必要がなくなり、しかも仮想記憶領域
4を含む外部記憶装置1を効率的に使用することができ
るようになる。As described above, according to the present invention, the external storage device 1 has a storage area 3 for programs and data and a virtual storage area 4.
And the central processing unit 2 has a main memory 5 and first and second management tables 8 and 9 and the like. Based on the contents of these first and second management tables 8 and 9, If there is no corresponding program page in the main memory 5 for each processing request, the storage area 3 of the external storage device 1
Alternatively, the program data is transferred from the virtual memory area 4, and when there is no empty page in the main memory 5, the oldest page is erased and a new program page is transferred. It is determined whether the content of the page area Sk is a program or data that is a target only for a read operation, and when it is data, it is determined whether or not the data has been changed,
When it is determined that the data is not stored in the main memory 5, whether or not there is an unused page area in the virtual memory area 4, and if there is no empty page area, the data content that is the target of the read processing only. Since the stored page area is searched and the contents of the main memory 5 are transferred, it is not necessary to unnecessarily increase the capacity of the virtual memory area 4 and the external area including the virtual memory area 4 is not required. The storage device 1 can be used efficiently.
第1図は本発明の一実施例を実現する構成のブロック
図、第2図は本実施例の処理過程を説明するフローチャ
ートである。 1……外部記憶装置、2……中央処理装置、3……プロ
グラム格納領域、4……仮想記憶領域、5……メインメ
モリ、8……第1管理テーブル、9……第2管理テーブ
ル、C……プログラムコード情報部、D……データ情報
部、H……ヘッダ情報部、S……ページ領域FIG. 1 is a block diagram of a configuration for implementing an embodiment of the present invention, and FIG. 2 is a flow chart for explaining the processing steps of this embodiment. 1 ... External storage device, 2 ... Central processing unit, 3 ... Program storage area, 4 ... Virtual storage area, 5 ... Main memory, 8 ... First management table, 9 ... Second management table, C ... Program code information section, D ... Data information section, H ... Header information section, S ... Page area
Claims (1)
ータがページごとに区分され、 (b)外部記憶装置1は、 (b1)複数のプログラムおよびデータを格納する格納領
域3と、 (b2)仮想記憶領域4とを有し、 (c)外部記憶装置1に接続される中央処理装置2は、 (c1)プログラムおよびデータをページごとに記憶する
メインメモリ5と、 (c2)プログラムおよびデータのページごとに、メイン
メモリ5および仮想記憶領域4に割り付けられているか
どうかを示すテーブル13を有し、メインメモリ5からの
プログラムおよびデータを記憶して処理を行う制御ブロ
ック7a〜7mと、 (c3)メインメモリ5の各ページの領域S1〜Skの使用状
態をストアする第1管理テーブル8と、 (c4)外部記憶装置1の仮想記憶領域4における各ペー
ジの領域41〜4kの使用状態をストアする第2管理テーブ
ル9とを有し、 (d)制御ブロック7a〜7mによるプログラムおよびデー
タの処理の進行に伴ってメインメモリ5に記憶されてい
ないプログラムおよびデータへの処理要求が発生した場
合、 (d1)第1管理テーブル8のストア内容に基づき、メイ
ンメモリ5の未使用の領域S1〜Skを選択し、 前記テーブル13の内容に基づき、仮想記憶領域4に格納
されているプログラムまたはデータがあるとき、そのプ
ログラムまたはデータをページごとにメインメモリ5に
転送して処理する動作を行い、 仮想記憶領域4に格納されているプログラムまたはデー
タがないとき、格納領域3からページ毎にメインメモリ
5に転送して処理する動作を行い、 (d2)第1管理テーブル8のストア内容に基づき、メイ
ンメモリ5に未使用の領域S1〜Skがないことが判定され
ると、メインメモリ5において最も古く使用されたペー
ジSkを選択し、 その選択されたページSkの内容がプログラムであるかデ
ータであるかを判定し、 (d2−1)プログラムであれば、最も古く使用された前
記選択されたページSkに、処理要求されたプログラムを
格納領域3または仮想記憶領域4から転送して処理する
動作を行うとともに、テーブル13のストア内容を消去お
よび変更する動作を行い、 (d2−2)データであれば、 (d2−2−1)テーブル13の内容に基づき、仮想記憶領
域4に記憶されていることが判定されると、第1管理テ
ーブル8のストア内容に基づきデータ変更が行われたか
を判定し、 データ変更が行われているとき、その変更が行われたデ
ータをメインメモリ5から仮想記憶領域4に転送し、処
理要求されたデータを、転送後のメインメモリ5に転送
して処理する動作を行うとともに、テーブル13のストア
内容を消去および変更する動作を行い、その後、および データ変更が行われていないとき、最も古く使用された
前記選択されたページSkに、処理要求されたデータを格
納領域3または仮想領域4から転送して処理する動作を
行うとともに、テーブル13のストア内容を消去および変
更する動作を行い、 (d2−2−2)データが仮想記憶領域4に記憶されてい
ないことが判定されると、第2管理テーブル9の内容に
基づき、仮想記憶領域4に使用されていないページ領域
があれば、そのページ領域に、またその使用されていな
いページ領域がなければ、仮想記憶領域4における読出
し処理のみの対象となるデータ内容がストアされている
ページ領域を検索し、その検索して得られたページ領域
に、メインメモリ5において転送すべきデータを転送す
るとともに、テーブル13のストア内容を消去および変更
する動作を行うことを特徴とする仮想記憶方式。1. A program and data to be processed are divided into pages. (B) The external storage device 1 comprises (b1) a storage area 3 for storing a plurality of programs and data, and (b2). The central processing unit 2 having a virtual storage area 4 and (c) connected to the external storage device 1 includes (c1) a main memory 5 for storing programs and data page by page, and (c2) a program and data A control block 7a to 7m for storing a program and data from the main memory 5 for processing, having a table 13 indicating whether or not the page is allocated to the main memory 5 and the virtual storage area 4 for each page, and (c3 ) A first management table 8 for storing the usage states of the areas S1 to Sk of each page of the main memory 5, and (c4) an area 41 of each page in the virtual storage area 4 of the external storage device 1. A second management table 9 for storing a 4k usage state, and (d) processing to programs and data not stored in the main memory 5 as the processing of the programs and data by the control blocks 7a to 7m progresses. When a request is generated, (d1) unused areas S1 to Sk of the main memory 5 are selected based on the stored contents of the first management table 8 and stored in the virtual storage area 4 based on the contents of the table 13. When there is a program or data stored in the virtual memory area 4, the program or data is transferred page by page to the main memory 5 for processing. When there is no program or data stored in the virtual memory area 4, the storage area 3 The operation of transferring to the main memory 5 for each page and processing is performed. (D2) Based on the stored contents of the first management table 8, When it is determined that there are no unused areas S1 to Sk, the oldest used page Sk in the main memory 5 is selected, and it is determined whether the content of the selected page Sk is a program or data. If the program is (d2-1), the program requested to be processed is transferred from the storage area 3 or the virtual storage area 4 to the selected page Sk that was used most oldly, and the processing is performed. The stored contents of the table 13 are erased and changed, and if the data is (d2-2), it is determined that it is stored in the virtual storage area 4 based on the contents of the (d2-2-1) table 13. Then, it is determined whether the data is changed based on the stored contents of the first management table 8. When the data is changed, the changed data is transferred from the main memory 5 to the virtual storage area. 4, the data requested to be processed is transferred to the main memory 5 after the transfer and processed, and the stored contents of the table 13 are erased and changed, and then the data is changed. If not, the operation of transferring the requested data from the storage area 3 or the virtual area 4 to the selected page Sk that has been used for the oldest and performing the processing is performed, and the stored contents of the table 13 are erased. When the change operation is performed and it is determined that (d2-2-2) data is not stored in the virtual storage area 4, it is not used in the virtual storage area 4 based on the content of the second management table 9. If there is a page area, and if there is no unused page area, the contents of data to be read-only in the virtual storage area 4 are skipped. It is characterized in that it searches for a torn page area, transfers the data to be transferred in the main memory 5 to the page area obtained by the search, and erases and changes the contents stored in the table 13. And virtual memory method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61022411A JPH071485B2 (en) | 1986-02-04 | 1986-02-04 | Virtual memory method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61022411A JPH071485B2 (en) | 1986-02-04 | 1986-02-04 | Virtual memory method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS62180439A JPS62180439A (en) | 1987-08-07 |
| JPH071485B2 true JPH071485B2 (en) | 1995-01-11 |
Family
ID=12081922
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61022411A Expired - Lifetime JPH071485B2 (en) | 1986-02-04 | 1986-02-04 | Virtual memory method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH071485B2 (en) |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5616984A (en) * | 1979-07-20 | 1981-02-18 | Fujitsu Ltd | Paging processing system |
| JPS5730174A (en) * | 1980-07-30 | 1982-02-18 | Fujitsu Ltd | Paging processing system |
| JPS6054058A (en) * | 1983-09-02 | 1985-03-28 | Fujitsu Ltd | Swapping control method |
| JPS6079448A (en) * | 1983-10-07 | 1985-05-07 | Fujitsu Ltd | Control system for external page allocation |
-
1986
- 1986-02-04 JP JP61022411A patent/JPH071485B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS62180439A (en) | 1987-08-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100862584B1 (en) | Storage device | |
| JP3563541B2 (en) | Data storage device and data storage method | |
| US7475185B2 (en) | Nonvolatile memory system, nonvolatile memory device, memory controller, access device, and method for controlling nonvolatile memory device | |
| US4835734A (en) | Address translation apparatus | |
| KR950010944B1 (en) | Method and device for managing partitionable buffer memory | |
| US20080098086A1 (en) | File Distribution System in Which Partial Files Are Arranged According to Various Allocation Rules Associated with a Plurality of File Types | |
| US5537571A (en) | Control device for a buffer memory with reconfigurable partitioning | |
| EP0019358B1 (en) | Hierarchical data storage system | |
| JPH11512857A (en) | Address translation in a cluster computer system | |
| JPH0330897B2 (en) | ||
| WO1983001323A1 (en) | Cache memory using a lowest priority replacement circuit | |
| JPWO2004055675A1 (en) | File management apparatus, file management program, file management method, and file system | |
| US6182088B1 (en) | File system and file management method | |
| KR910000366B1 (en) | Memory access control device and method for information processing device | |
| WO2024239835A1 (en) | Method and apparatus for recording memory state, and computer device and storage medium | |
| US5157784A (en) | Memory control system responsive to determination, allocating adjacent test space for editing space, relocating adjacent text and editing selected text | |
| JPH08137754A (en) | Disk cache device | |
| JPH071485B2 (en) | Virtual memory method | |
| JP2005209058A (en) | Control method for read/write of flash memory | |
| CA1284390C (en) | Apparatus and method for a page frame replacement in a data processing system having virtual memory addressing | |
| JPS6148745B2 (en) | ||
| JPH0329041A (en) | Decentralized paging control system | |
| DeMartinis et al. | A self managing secondary memory system | |
| JPH0991195A (en) | Block memory management device | |
| JPH096541A (en) | Hierarchical storage |