JPH0713824A - Data management method - Google Patents

Data management method

Info

Publication number
JPH0713824A
JPH0713824A JP5155576A JP15557693A JPH0713824A JP H0713824 A JPH0713824 A JP H0713824A JP 5155576 A JP5155576 A JP 5155576A JP 15557693 A JP15557693 A JP 15557693A JP H0713824 A JPH0713824 A JP H0713824A
Authority
JP
Japan
Prior art keywords
data
space
virtual storage
virtual
management method
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.)
Granted
Application number
JP5155576A
Other languages
Japanese (ja)
Other versions
JP3520527B2 (en
Inventor
Hirotoshi Maekawa
博俊 前川
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP15557693A priority Critical patent/JP3520527B2/en
Publication of JPH0713824A publication Critical patent/JPH0713824A/en
Application granted granted Critical
Publication of JP3520527B2 publication Critical patent/JP3520527B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve the processing efficiency of data having link structure by using a virtual storage system. CONSTITUTION:Data stored in a main memory 4 are represented in a virtual storage space 20a and data stored in an external memory 8 are represented in a virtual storage space 20b and a data file space 22. Data transfer between the main memory 4 and external memory 8 is performed in page units between the virtual storage space 20a and virtual storage space 20b. Data transfer between the virtual storage space 20a in the external memory 8 and the data file space 22 is performed in units of structure consisting of plural data having close link structure.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ページング方式などの
仮想記憶方式を用いて記憶管理を行うコンピュータシス
テムにおいて、CPU(Central Processing Unit)の処
理に応じて、リストデータなどのリンク構造を有するデ
ータを効率よくメモリシステム上で処理できるデータ管
理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to data having a link structure such as list data according to the processing of a CPU (Central Processing Unit) in a computer system which performs storage management using a virtual storage system such as a paging system. The present invention relates to a data management method capable of efficiently processing data on a memory system.

【0002】[0002]

【従来の技術】人工知能、数式処理、自然言語処理など
の分野においては、データとデータとのリンク関係をポ
インタを用いて表現したリンク構造のデータをメモリに
記憶し、CPUからの処理に応じて、これらのリンク構
造を動的に変化させる。通常、コンピュータシステムの
多くは、半導体メモリなどの高速アクセス可能なメイン
メモリと、ハードディスクなどの大容量化が可能な外部
メモリとが階層的に接続されたメモリシステムを有す
る。このコンピュータシステムでは、メモリのアドレス
空間においてそれぞれ近いアドレス間隔で記憶されたデ
ータ同士は短い時間間隔でCPUからアクセスされる場
合が多いという、CPUによるデータアクセスの局所性
を前提として、メモリのアドレス空間、すなわち仮想記
憶空間を複数のページで分割し、このページを単位とし
てメインメモリと外部メモリとの間でデータ転送させて
記憶管理を行うページング方式などの仮想記憶方式が用
いられる。
2. Description of the Related Art In the fields of artificial intelligence, mathematical expression processing, natural language processing, and the like, data having a link structure in which a link relationship between data is expressed using pointers is stored in a memory and is processed by a CPU. And dynamically change these link structures. Generally, many computer systems have a memory system in which a main memory such as a semiconductor memory that can be accessed at high speed and an external memory such as a hard disk that can be increased in capacity are hierarchically connected. In this computer system, data stored at address intervals close to each other in the memory address space are often accessed from the CPU at short time intervals, and the address space of the memory is assumed to be local to the data access by the CPU. That is, a virtual storage system such as a paging system is used in which a virtual storage space is divided into a plurality of pages, and data is transferred between a main memory and an external memory in units of this page for storage management.

【0003】しかしながら、CPUがリンク構造のデー
タを処理する場合、CPUによるデータアクセスには上
述したようなアドレス空間における局所性は一般的には
存在せず、直接的または間接的なリンク関係を有するデ
ータがCPUによって短い時間間隔でアクセスされる。
そのため、上述したようなページ単位で記憶管理を行う
コンピュータシステムを用いて、データのリンク構造を
考慮せずにリスト構造のデータを処理した場合、図10
に示すように、直接的または間接的にリンク関係を有す
るデータ同士が異なるページに記憶されるという事態が
頻繁に生じ、メインメモリと外部メモリとの間のページ
ング処理が高頻度に発生し、コンピュータシステムの処
理の効率が低下するという問題がある。これらの問題を
解決するために、たとえば、本出願人による特願平5−
83227号は、密なリンク関係を有する複数のデータ
の集合であるストラクチャを、メインメモリと外部メモ
リとの間を転送させる単位として取り扱うことで、密な
リンク関係を有する一連のデータを効率よくメインメモ
リに記憶させるデータ管理方法を開示する。このデータ
管理方法によれば、CPUの処理において短い時間間隔
でアクセスされる一連のデータをメインメモリに効率よ
く記憶させることができ、コンピュータの処理効率を向
上させることができる。
However, when the CPU processes link-structured data, the data access by the CPU generally does not have the locality in the address space as described above, and has a direct or indirect link relationship. Data is accessed by the CPU at short time intervals.
Therefore, when the data having the list structure is processed without considering the link structure of the data by using the computer system which performs the storage management in the unit of page as described above, FIG.
As shown in Fig. 2, data having direct or indirect link relations are frequently stored in different pages, and a paging process between the main memory and the external memory frequently occurs, and There is a problem that the processing efficiency of the system is reduced. In order to solve these problems, for example, Japanese Patent Application No.
The No. 83227 handles a structure, which is a set of a plurality of data having a dense link relationship, as a unit for transferring between a main memory and an external memory, and efficiently manages a series of data having a dense link relationship. A data management method for storing in a memory is disclosed. According to this data management method, a series of data accessed at short time intervals in the processing of the CPU can be efficiently stored in the main memory, and the processing efficiency of the computer can be improved.

【0004】[0004]

【発明が解決しようとする課題】上述したように特願平
5−83227号のデータ管理方法を用いればコンピュ
ータの処理効率を向上させることができるが、このデー
タ管理方法はページではなくストラクチャをメインメモ
リと外部メモリとの間を転送するデータの単位とするた
め、一般的なコンピュータシステムで使用されているペ
ージング方式などの仮想記憶方式をそのまま用いること
はできない。
As described above, if the data management method of Japanese Patent Application No. 5-83227 is used, the processing efficiency of the computer can be improved. However, this data management method is mainly structured not on pages. Since a unit of data is transferred between the memory and the external memory, the virtual storage method such as the paging method used in a general computer system cannot be used as it is.

【0005】本発明は上述した従来技術の問題に鑑みて
なされ、従来のコンピュータで用いられる仮想記憶方式
をそのまま用いて、リンク構造を有するデータの処理効
率を向上させることを目的とする。
The present invention has been made in view of the above-mentioned problems of the prior art, and an object of the present invention is to improve the processing efficiency of data having a link structure by directly using the virtual storage system used in the conventional computer.

【0006】[0006]

【課題を解決する手段】上述した従来技術の問題を解決
し、上述した目的を達成するために、本発明のデータ管
理方法は、仮想記憶空間を前記第1の記憶手段および前
記第2の記憶手段にわたって表現し、データファイル空
間を前記第2の記憶手段に表現する。そして、前記演算
制御手段の処理に応じて、前記第1の記憶手段と前記第
2の記憶手段との間のデータ転送を、前記仮想記憶空間
に表現されたデータについては、通常のコンピュータシ
ステムにおけるデータ記憶管理と同様に、該仮想記憶空
間内のアドレスに基づいて作成されたページを単位とし
て行う。また、前記データファイル空間に表現されたデ
ータについては、該データおよび該データと直接的また
は間接的にリンクされたデータで構成されるストラクチ
ャを単位として、データファイル空間と前記第1の記憶
手段に表現された仮想記憶空間との間で行う
In order to solve the above-mentioned problems of the prior art and to achieve the above-mentioned object, the data management method of the present invention provides a virtual storage space for the first storage means and the second storage. And the data file space is represented in the second storage means. Then, according to the processing of the arithmetic control means, the data transfer between the first storage means and the second storage means is performed in the normal computer system for the data expressed in the virtual storage space. Similar to the data storage management, the page created based on the address in the virtual storage space is used as a unit. Further, regarding the data expressed in the data file space, the data file space and the first storage means are set in units of a structure composed of the data and data directly or indirectly linked to the data. To and from the represented virtual memory space

【0007】また、本発明のデータ管理方法は、好適に
は、前記第1の記憶手段および前記第2の記憶手段に記
憶されたデータのうち、不使用となったデータを、前記
仮想記憶空間に存在するデータについては各データを単
位として回収し、前記データファイル空間に存在するデ
ータについては前記ストラクチャを単位として回収する
ガーベジコレクションを、前記データ転送処理と時分割
方式で行う。
Further, in the data management method of the present invention, preferably, of the data stored in the first storage means and the second storage means, unused data is stored in the virtual storage space. Garbage collection is performed for each of the data existing in 1) in units of data, and for the data existing in the data file space, in units of the structure, by the data transfer process and the time division method.

【0008】また、本発明のデータ管理方法は、さらに
好適には、前記ガーベジコレクションにおいて、参照カ
ウンタを用いてガーベジを回収するインクリメンタル・
ガーベジコレクションと、使用セルをマークトレースし
て不使用セルをスイープするマークアンドスイープ・ガ
ーベジコレクションとを行い、インクリメンタル・ガー
ベジコレクションをマークアンドスイープ・ガーベジコ
レクションに優先して行う。
In the data management method of the present invention, more preferably, in the garbage collection, an incremental data collecting method using a reference counter is used.
Garbage collection and mark-and-sweep garbage collection of mark-tracing used cells and sweeping unused cells are performed, and incremental garbage collection is performed prior to the mark-and-sweep garbage collection.

【0009】また、本発明のデータ管理方法は、さらに
好適には、上記仮想記憶空間を少なくとも2つの小仮想
記憶空間に分割し、一方の小仮想記憶空間に存在するデ
ータについて上記データ転送処理および前記演算制御手
段からのアクセスを行い、該小仮想記憶空間にフリーデ
ータがなくなった場合に、前記演算制御手段からのアク
セスが行われているデータおよび該データと直接的また
は間接的にリンクされているデータを、分割された他方
の小仮想記憶空間に複写し、該データが複写された小仮
想記憶空間に存在するデータについて上記データ転送処
理および前記演算制御手段からのアクセスを行う。
Further, the data management method of the present invention is more preferably such that the virtual storage space is divided into at least two small virtual storage spaces, and the data transfer processing and the data transfer processing for the data existing in one of the small virtual storage spaces are performed. When free access is made to the small virtual memory space after the access from the operation control means, the data being accessed from the operation control means and the data directly or indirectly linked to the data. Existing data is copied to the other divided small virtual memory space, and the data existing in the copied small virtual memory space is accessed from the data transfer process and the arithmetic control means.

【0010】[0010]

【作用】本発明のデータ管理方法では、第1の記憶手段
および第2の記憶手段にリンク構造を有するデータが記
憶され、演算制御手段の処理に応じて、第1の記憶手段
と第2の記憶手段との間でページ単位のデータ転送が行
われる。このデータ転送は、仮想記憶空間に表現された
データについては、該データを含むページを転送して行
う。また、データファイル空間に表現されたデータを転
送する場合、すなわち、第2の記憶手段に記憶されたデ
ータであってデータファイル空間に表現されたデータを
第1の記憶手段に転送する場合には、該データを含むス
トラクチャをデータファイル空間から第1の記憶手段に
表現された仮想記憶空間に転送する。
In the data management method of the present invention, the data having the link structure is stored in the first storage means and the second storage means, and the first storage means and the second storage means are processed according to the processing of the arithmetic control means. Data transfer in page units is performed with the storage means. This data transfer is performed by transferring a page including the data expressed in the virtual storage space. Further, in the case of transferring the data expressed in the data file space, that is, in the case of transferring the data stored in the second storage means and expressed in the data file space to the first storage means, , Transferring the structure containing the data from the data file space to the virtual storage space represented in the first storage means.

【0011】本発明のデータ管理方法では、仮想記憶空
間とデータファイル空間との間のデータ転送を、データ
のリンク構造を反映させて行うため、直接的または間接
的にリンクされた一連のデータをまとめて第1の記憶手
段と第2の記憶手段との間で転送するので、第1の記憶
手段と第2の記憶手段との間で行われるデータ転送の頻
度を低くすることができる。その結果、コンピュータシ
ステムの処理効率を向上させることができる。
In the data management method of the present invention, since data transfer between the virtual storage space and the data file space is performed while reflecting the link structure of the data, a series of directly or indirectly linked data is stored. Since the data is collectively transferred between the first storage means and the second storage means, it is possible to reduce the frequency of data transfer performed between the first storage means and the second storage means. As a result, the processing efficiency of the computer system can be improved.

【0012】[0012]

【実施例】第1実施例について説明する。図1は、本実
施例のデータ管理方法を用いた計算システムの構成図で
ある。図1に示すように、本実施例の計算機システムで
は、内部バス14を介して、演算制御手段としてのCP
U(Central Processing Unit )2および第1の記憶手
段としてのメインメモリ4が接続されている。また、C
PU2は、内部バス12、入出力回路6および外部バス
10を介して第2の記憶手段としての外部メモリ8と接
続されている。CPU2は、たとえば、予め組み込まれ
たプログラムに応じた演算処理を行う。メインメモリ4
は、高速アクセスが可能な、たとえば、バイポーラ型半
導体メモリであり、後述するようにCPU2における使
用頻度が比較的高いリンク構造のデータとしてのリスト
構造のデータを保持する。
EXAMPLE A first example will be described. FIG. 1 is a block diagram of a computing system using the data management method of this embodiment. As shown in FIG. 1, in the computer system of this embodiment, the CP as an arithmetic control means is connected via the internal bus 14.
A U (Central Processing Unit) 2 and a main memory 4 as a first storage means are connected. Also, C
The PU 2 is connected to the external memory 8 as the second storage means via the internal bus 12, the input / output circuit 6 and the external bus 10. The CPU 2 performs arithmetic processing according to a program incorporated in advance, for example. Main memory 4
Is a bipolar semiconductor memory that can be accessed at high speed, and holds list-structured data as link-structured data that is frequently used in the CPU 2, as will be described later.

【0013】外部メモリ8は、メインメモリ4に比べて
大きな記憶容量を有する、たとえば、ハードディスクド
ライブなどが用いられ、CPU2が処理するリスト構造
のデータのうち、たとえば、メインメモリ4に記憶され
ないデータを記憶する。CPU2は、演算処理を行う際
に、必要なデータを内部バス12を介してメインメモリ
4から入力する。このとき、必要なデータがメインメモ
リ4に存在しない場合には、外部メモリ8に記憶された
上記必要なデータを含むデータが後述するページまたは
ストラクチャを単位として、外部バス10、入出力回路
6および内部バス12を介して、メインメモリ4に転送
される。
The external memory 8 is, for example, a hard disk drive having a storage capacity larger than that of the main memory 4. For example, data of a list structure processed by the CPU 2 that is not stored in the main memory 4 is stored in the external memory 8. Remember. The CPU 2 inputs necessary data from the main memory 4 via the internal bus 12 when performing arithmetic processing. At this time, if the required data does not exist in the main memory 4, the data including the required data stored in the external memory 8 is used as a unit of a page or structure described later, and the external bus 10, the input / output circuit 6 and the It is transferred to the main memory 4 via the internal bus 12.

【0014】以下、メインメモリ4および外部メモリ8
における記憶管理について説明する。図2は、本実施例
の計算機システムにおける記憶管理を説明するための図
である。CPU2がアクセスするデータの仮想アドレス
は、仮想記憶空間20に表現される。この仮想記憶空間
20のうち、仮想記憶空間20aはメインメモリ4上に
割り付けられ、仮想記憶空間20bは外部メモリ8上に
割り付けられている。一方、CPU2からアクセスされ
るデータであって、仮想記憶空間20にアドレスが表現
されていないデータのアドレスは、データファイル空間
22に表現される。データファイル空間22は、外部メ
モリ8上に割り付けられている。
Hereinafter, the main memory 4 and the external memory 8
The memory management in will be described. FIG. 2 is a diagram for explaining storage management in the computer system of this embodiment. The virtual address of the data accessed by the CPU 2 is represented in the virtual storage space 20. Of the virtual memory space 20, the virtual memory space 20a is allocated on the main memory 4, and the virtual memory space 20b is allocated on the external memory 8. On the other hand, the address of data that is accessed from the CPU 2 and whose address is not expressed in the virtual storage space 20 is expressed in the data file space 22. The data file space 22 is allocated on the external memory 8.

【0015】本実施例の計算機システムにおける記憶管
理では、仮想記憶空間20においては、通常の計算機シ
ステムにおけるページング方式と同様に、仮想記憶空間
に表現されたアドレス空間を所定の大きさのページとし
て区切り、このページを単位として仮想記憶空間20a
と仮想記憶空間20bとの間のデータ転送を行う。
In the storage management in the computer system of this embodiment, in the virtual storage space 20, the address space expressed in the virtual storage space is divided into pages of a predetermined size, similarly to the paging method in a normal computer system. , The virtual storage space 20a with this page as a unit
And data transfer between the virtual storage space 20b and the virtual storage space 20b.

【0016】一方、仮想記憶空間20とデータファイル
空間22との間では、本出願人が特願平5−83227
号において開示するリンク構造のデータ管理方法を用い
て、データ管理を行う。
On the other hand, between the virtual storage space 20 and the data file space 22, the applicant of the present invention filed Japanese Patent Application No. 5-83227.
Data management using the data management method of the link structure disclosed in No.

【0017】先ず、本実施例の計算機システムにおける
仮想記憶空間の記憶管理方法について説明する。仮想記
憶空間は、図3に示すような、ページ番号30aとペー
ジ内アドレス30bとで構成される仮想アドレスを用い
て表現される。CPU2によるメインメモリ4に対して
のアクセスは、この仮想アドレスを用いて行われる。メ
インメモリ4がCPU2からアクセスされると、図3に
示すようなページ割付表32に基づいて、記憶管理が行
われる。
First, a storage management method of the virtual storage space in the computer system of this embodiment will be described. The virtual storage space is represented using a virtual address composed of a page number 30a and an in-page address 30b as shown in FIG. Access to the main memory 4 by the CPU 2 is performed using this virtual address. When the main memory 4 is accessed by the CPU 2, storage management is performed based on the page allocation table 32 as shown in FIG.

【0018】ページ割付表32は、上述したように仮想
記憶空間に作成された全てのページ対応した、識別フィ
ールド32aおよびページアドレスフィールド32bを
有する。識別フィールド32aは、対応するページがメ
インメモリ4に存在するか否かを示し、図3において
は、対応するページがメインメモリ4に存在する場合に
は「R」、存在しない場合には「P」を示している。
The page allocation table 32 has an identification field 32a and a page address field 32b corresponding to all the pages created in the virtual storage space as described above. The identification field 32a indicates whether or not the corresponding page exists in the main memory 4, and in FIG. 3, when the corresponding page exists in the main memory 4, it is “R”, and when it does not exist, “P”. Is shown.

【0019】ページアドレスフィールド32bは、対応
するページがメインメモリ4に存在する場合には、メイ
ンメモリ4上の対応するページの先頭アドレスPN1を
示す。一方、ページアドレスフィールド32bは、対応
するページがメインメモリ4に存在しない場合には、外
部メモリ8上の対応するページの先頭アドレスPN2を
示す。ページ割付表32は、たとえば、ハッシュ表など
を用いて表現される。
The page address field 32b indicates the head address PN1 of the corresponding page in the main memory 4 when the corresponding page exists in the main memory 4. On the other hand, the page address field 32b indicates the start address PN2 of the corresponding page in the external memory 8 when the corresponding page does not exist in the main memory 4. The page allocation table 32 is expressed using, for example, a hash table.

【0020】メインメモリ4がCPU2から図3に示す
仮想アドレス30を用いてアクセスされると、上述した
ページ割付表32が参照され、仮想アドレス30のペー
ジ番号30aで示されるページに対応した識別フィール
ド32aが識別される。この識別の結果、識別フィール
ド32aが「R」を示す場合、すなわちページ番号30
aで示されるページがメインメモリ4に存在する場合に
は、対応するページアドレスフィールド32bを上位ビ
ットとし、仮想アドレス30のページ内アドレス30b
を下位ビットとしてメインメモリアドレス34が作成さ
れる。そして、作成されたメインメモリアドレス34に
対してCPU2からのアクセスが実行される。
When the main memory 4 is accessed from the CPU 2 using the virtual address 30 shown in FIG. 3, the page allocation table 32 described above is referred to, and the identification field corresponding to the page indicated by the page number 30a of the virtual address 30. 32a is identified. As a result of this identification, when the identification field 32a indicates "R", that is, the page number 30
When the page indicated by a exists in the main memory 4, the corresponding page address field 32b is set to the upper bit and the in-page address 30b of the virtual address 30 is set.
The main memory address 34 is created by using as the lower bit. Then, the CPU 2 accesses the created main memory address 34.

【0021】一方、上記識別の結果、識別フィールド3
2bが「P」を示す場合、すなわちページ番号30aで
示されるページが外部メモリ8に存在する場合には、対
応するページアドレスフィールド32bで示されるペー
ジが外部メモリ8からメインメモリ4に転送され識別フ
ィールド32aが「R」となり、上述した場合と同様
に、メインメモリアドレス34が作成され、この作成さ
れたメインメモリアドレス34に対してCPU2からの
アクセスが実行される。
On the other hand, as a result of the above identification, the identification field 3
When 2b indicates "P", that is, when the page indicated by the page number 30a exists in the external memory 8, the page indicated by the corresponding page address field 32b is transferred from the external memory 8 to the main memory 4 and identified. The field 32a becomes "R", the main memory address 34 is created, and the created main memory address 34 is accessed from the CPU 2 as in the case described above.

【0022】上述したように、仮想記憶空間20に表現
されたデータは、通常の計算機システムと同様に、メイ
ンメモリ4と外部メモリ6との間でページング方式の記
憶管理が行われる。
As described above, the data expressed in the virtual storage space 20 is subjected to paging type storage management between the main memory 4 and the external memory 6 as in a normal computer system.

【0023】次に、本実施例の計算機システムにおける
仮想記憶空間20とデータファイル空間22との間の記
憶管理方法について説明する。CPU2が処理を実行中
のデータはメインメモリ4の仮想記憶空間20aに存在
するが、この処理中のデータからポインタをたどること
によって新たなデータを得ようとするとき、その新たな
データが外部メモリ8のデータファイル空間22に存在
する場合がある。このとき、本実施例の計算機システム
では、特願平5−83227号において開示するデータ
管理方法を用いて、上記新たなデータを含むストラクチ
ャをデータファイル空間22からメインメモリ4上に転
送、すなわちストラクチャインする。上記新たなデータ
を含むストラクチャは、外部メモリ8上に存在するた
め、上記ストラクチャインが終了したときには、ストラ
クチャインされたストラクチャはメインメモリ4上に存
在する。
Next, a storage management method between the virtual storage space 20 and the data file space 22 in the computer system of this embodiment will be described. The data being processed by the CPU 2 exists in the virtual memory space 20a of the main memory 4, but when trying to obtain new data by tracing a pointer from the data being processed, the new data is stored in the external memory. 8 in the data file space 22. At this time, in the computer system of this embodiment, the structure including the new data is transferred from the data file space 22 onto the main memory 4 by using the data management method disclosed in Japanese Patent Application No. 5-83227, that is, the structure. In. Since the structure including the new data exists in the external memory 8, the structure-structured structure exists in the main memory 4 when the structure-in ends.

【0024】このように、記憶管理を行えば、データフ
ァイル空間22から仮想記憶空間20bにデータをスト
ラクチャインする際に、密なリンク構造を有する一連の
データを束として転送するため、外部メモリ8とメイン
メモリ4との間で行われるデータ転送頻度を低くするこ
とができる。
When the storage management is performed in this way, when the data is structured into the virtual storage space 20b from the data file space 22, a series of data having a dense link structure is transferred as a bundle, so that the external memory 8 is used. The frequency of data transfer between the main memory 4 and the main memory 4 can be reduced.

【0025】以下、この仮想記憶空間とデータファイル
空間22との間の記憶管理方法を具体例を挙げて説明す
る。先ず、仮想記憶空間20a、20bおよびデータフ
ァイル空間22上に存在するリスト構造のデータについ
て説明する。図4は、仮想記憶空間20およびデータフ
ァイル空間22に記憶されたデータを説明するための図
である。仮想記憶空間20は、図2に示す仮想記憶空間
20aおよび20bで構成される。図4において、仮想
記憶空間20のmm1〜mm2、mm4〜mm8、mm
10、mm11と、データファイル空間22のストラク
チャ1のss1〜ss3およびストラクチャ2のss
1、ss2とは、それぞれ、リスト構造を構成している
個々のデータセルを示す。データセルは、記憶すべきデ
ータ部の他に、関連する別のデータセルをリンクする
(結び付ける)ためのポインタ部で構成される。このと
き、データセルには、複数のポインタが記憶されていて
もよい。図4では、各データセルのデータ部にも、ポイ
ンタが記憶されている。図4における矢印はデータセル
間のリンクを表し、破線矢印は図示しないデータセルに
対してのリンクを示す。
The storage management method between the virtual storage space and the data file space 22 will be described below with reference to specific examples. First, list-structured data existing in the virtual storage spaces 20a and 20b and the data file space 22 will be described. FIG. 4 is a diagram for explaining the data stored in the virtual storage space 20 and the data file space 22. The virtual storage space 20 is composed of the virtual storage spaces 20a and 20b shown in FIG. In FIG. 4, mm1 to mm2, mm4 to mm8, mm of the virtual storage space 20
10, mm11, ss1 to ss3 of structure 1 and ss of structure 2 of the data file space 22
Reference numerals 1 and ss2 respectively represent individual data cells forming the list structure. The data cell includes a pointer part for linking (associating) another related data cell in addition to the data part to be stored. At this time, a plurality of pointers may be stored in the data cell. In FIG. 4, the pointer is also stored in the data section of each data cell. Arrows in FIG. 4 represent links between data cells, and dashed arrows represent links to data cells not shown.

【0026】また、仮想記憶空間20のmm3およびm
m9は、間接ポインタを示す。この間接ポインタは、仮
想記憶空間20のデータセルをデータファイル空間22
のデータセルに対してリンクさせるためのポインタであ
る。また、データファイル空間22には、リスト構造の
データセルが、リンク構造が密な複数のデータセルで構
成されるストラクチャを単位として記憶されている。こ
のストラクチャは、後述するように、仮想記憶空間20
とデータファイル空間22との間で行うデータ転送、す
なわちストラクチャイン/ストラクチャアウトの単位と
なる。
Further, mm3 and m of the virtual storage space 20
m9 indicates an indirect pointer. This indirect pointer points the data cell of the virtual storage space 20 to the data file space 22.
Is a pointer for linking to the data cell of. Further, in the data file space 22, a list-structured data cell is stored in units of a structure composed of a plurality of data cells having a dense link structure. This structure has a virtual storage space 20 as described later.
The data transfer between the data file space 22 and the data file space 22, that is, a unit of structure in / structure out.

【0027】図4に示す、リスト構造のデータでは、仮
想記憶空間20上におけるデータセル間のリンク(たと
えば、mm1からmm2に対してのリンク)、および、
データファイル空間22上のデータセルから仮想記憶空
間20上のデータセルに対してのリンク(たとえば、ス
トラクチャ2のss2からmm4に対してのリンク)
は、仮想記憶空間20上のアドレスをポインタとして表
現される。また、仮想記憶空間20上のデータセルから
データファイル空間22上のデータセルに対してのリン
ク(たとえば、mm3からストラクチャ1のss1に対
してのリンク)は、上述した仮想記憶空間20上の間接
ポインタ(この場合は、mm3)を用いて表現される。
In the list-structured data shown in FIG. 4, links between data cells in the virtual storage space 20 (for example, links from mm1 to mm2), and
A link from a data cell in the data file space 22 to a data cell in the virtual storage space 20 (for example, a link from ss2 to mm4 in structure 2).
Is expressed by using an address in the virtual storage space 20 as a pointer. Further, the link from the data cell in the virtual storage space 20 to the data cell in the data file space 22 (for example, the link from mm3 to ss1 of the structure 1) is an indirect link in the virtual storage space 20 described above. It is expressed using a pointer (mm3 in this case).

【0028】また、データファイル空間22上における
データセル間のリンク(たとえば、ストラクチャ2のs
s1からss2に対してのリンク)は、ストラクチャ内
のアドレスをポインタとして表現される。その結果、ス
トラクチャ内でのアドレス表現のためのデータ長を短く
することができる。このように、仮想記憶空間20上と
データファイル空間22上とでは、ポインタの表現が異
なるため、後述するようにストラクチャを単位として仮
想記憶空間20とデータファイル空間22との間でデー
タ転送を行う場合に、ポインタの表現を変換するという
オーバヘッドが生じるが、後述するように外部メモリ6
とメインメモリ4との間のデータ転送頻度を十分に低下
させることで計算機システム全体としての処理効率を高
めることができる。
Further, links between data cells in the data file space 22 (for example, s
The link from s1 to ss2) is expressed by using an address in the structure as a pointer. As a result, the data length for address expression in the structure can be shortened. In this way, since the representation of the pointer is different between the virtual storage space 20 and the data file space 22, data transfer is performed between the virtual storage space 20 and the data file space 22 in units of structure, as will be described later. In this case, the overhead of converting the representation of the pointer occurs, but as described later, the external memory 6
By sufficiently reducing the frequency of data transfer between the main memory 4 and the main memory 4, the processing efficiency of the entire computer system can be improved.

【0029】上述した仮想記憶空間20上のデータセル
とデータファイル空間22上のデータセルとのリンク、
および、データファイル空間22の異なるストラクチャ
上のデータセル間のリンクは、以下に示す3種類の参照
表、すなわちストラクチャ参照表(SRT)、XRT
(外部参照表)および逆参照表(IRT)を用いて管理
されている。SRT、XRT、IRTは、たとえば、メ
インメモリ4上の所定の領域に記憶されている。
A link between the data cell in the virtual storage space 20 and the data cell in the data file space 22 described above,
And, the links between the data cells on different structures of the data file space 22 are the following three types of reference tables, that is, a structure reference table (SRT) and an XRT.
(External Lookup Table) and Reverse Lookup Table (IRT). The SRT, XRT, IRT are stored in a predetermined area on the main memory 4, for example.

【0030】図5は、SRTを説明するための図であ
る。図5に示すように、SRTは、データファイル空間
22のストラクチャ(str.id)ごとに、ストラク
チャへの参照カウント(refcounter)、スト
ラクチャへのポインタ(str.pointer)およ
び外部参照表へのポインタ(XRT.pointer)
を有するテーブル形式のデータであり、ハッシュ方式な
どを用いて参照される。参照カウンタ(refcoun
ter)は、ストラクチャ内に存在するデータセルが他
のストラクチャあるいは仮想記憶空間20上のデータセ
ルから参照されている回数を示し、後述するガーベジコ
レクション処理において利用される。たとえば、str
1(ストラクチャ1)上のデータへの参照がN個ある場
合には、SRTのstr1についての参照カウンタは
「N」である。ストラクチャへのポインタ(str.p
ointer)は、データファイル空間22におけるス
トラクチャのアドレスを示す。たとえば、str1への
ポインタは「STR1」である。外部参照表へのポイン
タは、たとえば、メインメモリ4上に記憶された外部参
照表へのアドレスを示す。たとえば、srt1の外部参
照表へのポインタは「XRT1」である。
FIG. 5 is a diagram for explaining the SRT. As shown in FIG. 5, the SRT, for each structure (str.id) of the data file space 22, has a reference count (refcounter) to the structure, a pointer to the structure (str.pointer), and a pointer to the external reference table ( XRT.pointer)
The data is in a table format and has a reference to a hash method or the like. Reference counter (refcount
ter) indicates the number of times a data cell existing in the structure is referenced by another structure or a data cell in the virtual storage space 20, and is used in the garbage collection process described later. For example, str
If there are N references to the data on 1 (Structure 1), the reference counter for str1 of the SRT is "N". Pointer to structure (str.p
(pointer) indicates the address of the structure in the data file space 22. For example, the pointer to str1 is "STR1". The pointer to the external reference table indicates, for example, an address to the external reference table stored in the main memory 4. For example, the pointer to the external reference table of srt1 is "XRT1".

【0031】外部参照表(XRT)は、データファイル
空間22の各ストラクチャ毎に作成され、ストラクチャ
上のデータセルが参照(リンク)するメインメモリ4上
のデータセルおよびデータファイル空間22上の他のス
トラクチャ上のデータセルについての情報を有する。こ
の情報は、たとえば、図5に示すように、リンク元のデ
ータセルのポインタ(Ptr.id)、リンク先のデー
タセルが記憶される領域(たとえば、メインメモリ4、
ストラクチャ1、2など)を特定する情報(dstar
ea)、および、リンク先のデータセルのポインタ(d
st.id)を有する。
An external reference table (XRT) is created for each structure of the data file space 22, and data cells on the main memory 4 to which data cells on the structure refer (link) and other data files on the data file space 22 are referenced. It has information about the data cells on the structure. This information is, for example, as shown in FIG. 5, a pointer (Ptr.id) of the data cell of the link source, an area in which the data cell of the link destination is stored (for example, the main memory 4,
Information (dstar) that identifies structures 1, 2, etc.
ea) and the pointer (d) of the data cell of the link destination
st. id).

【0032】たとえば、図4に示すデータファイル空間
22のストラクチャ1上のデータセルss3は、仮想記
憶空間20上のデータセルmm6に対してリンクしてい
る。このリンクに関する情報として、XRT1は、図5
に示すように、「ptr.id」として「ss3」、
「dstarea」として「main」(仮想記憶空間
20を示す)、および、「dst.id」として「mm
6」を有している。
For example, the data cell ss3 on the structure 1 of the data file space 22 shown in FIG. 4 is linked to the data cell mm6 on the virtual storage space 20. As information regarding this link, XRT1 is shown in FIG.
, "Ss3" as "ptr.id",
“Main” (indicating the virtual storage space 20) as “dstrea” and “mm” as “dst.id”
6 ”.

【0033】これと同様に、ストラクチャ2上のss2
から仮想記憶空間20上のmm4に対してのリンク、お
よび、ss2からストラクチャ1上のss2に対しての
リンクに関する情報が図5に示すようにXRT2に記載
されている。
Similarly, ss2 on structure 2
5 to X4 on the virtual memory space 20 and information on the link from ss2 to ss2 on the structure 1 in XRT2 as shown in FIG.

【0034】さらに外部参照表は、ストラクチャ上のデ
ータセルの他のストラクチャ上のデータセルからの逆参
照(被参照)をも管理する。たとえば、図4に示すよう
に、str1上のss2はstr2上のss2からリン
クされており、このリンクは図5に示すXR1におい
て、データファイル空間22上の他のストラクチャから
リンクされるデータセルのポインタ(dst.id)、
リンク元のデータセルが記憶されるストラクチャを特定
する情報(ptrarea)、および、リンク元のデー
タセルのポインタ(ptr.id)によって管理され
る。
Further, the external reference table also manages the dereference (referenced) of the data cell on the structure from the data cell on the other structure. For example, as shown in FIG. 4, ss2 on str1 is linked from ss2 on str2, and this link corresponds to the data cell linked from another structure on the data file space 22 in XR1 shown in FIG. Pointer (dst.id),
It is managed by information (ptrarea) that specifies the structure in which the data cell of the link source is stored, and a pointer (ptr.id) of the data cell of the link source.

【0035】逆参照表(IRT)は、系全体として一つ
用いられ、仮想記憶空間20に存在するデータセルのデ
ータファイル空間22に存在するストラクチャからの被
参照を管理する。IRTは、図5に示すようにデータフ
ァイル空間22に存在するストラクチャから参照される
仮想記憶空間20上のデータセルを特定するdst.i
dと、リンク先(参照先)であるストラクチャへのポイ
ンタを示すXRT.pointerとを有する。図4に
おいて仮想記憶空間20上のmm6はstr1およびs
tr2から参照されており、図5に示すようにstr1
およびstr2へのポインタを示すXRT1およびXR
T2を有する。
One reverse reference table (IRT) is used for the entire system, and manages the referencing from the structure existing in the data file space 22 of the data cell existing in the virtual memory space 20. As shown in FIG. 5, the IRT specifies the data cell in the virtual storage space 20 referred to by the structure existing in the data file space 22, dst. i
d and XRT.D indicating a pointer to the structure that is the link destination (reference destination). and a pointer. In FIG. 4, mm6 on the virtual storage space 20 is str1 and s.
It is referred from tr2, and as shown in FIG.
XRT1 and XR indicating pointers to and str2
Has T2.

【0036】このように、本実施例のデータ管理方法で
は、SRT、XRT、IRTなどの参照表を用いてデー
タセル間のリンクを管理するため、仮想記憶空間20と
データファイル空間22との間でストラクチャを単位と
したデータ転送が行われた場合に、参照表上でリンクに
関する情報を変更すれば、長いアクセス時間の必要なデ
ータファイル空間22上のデータセルに実際にアクセス
せずにリンクの変更を行うことができる。
As described above, in the data management method of the present embodiment, since the links between the data cells are managed by using the reference table such as SRT, XRT, IRT, etc., the virtual memory space 20 and the data file space 22 are linked. If the information about the link is changed in the reference table when the data is transferred in the unit of structure in, the link of the link is actually accessed without actually accessing the data cell in the data file space 22 requiring a long access time. You can make changes.

【0037】次に、データファイル空間22に記憶され
たリスト構造のデータを、仮想記憶空間20に転送する
際のデータ管理方法について説明する。CPU2の演算
処理において、必要なデータが仮想記憶空間20に記憶
されていない場合または仮想記憶空間20に空き領域が
十分にある場合には、必要なデータをストラクチャ単位
でデータファイル空間22から仮想記憶空間20に転送
する。
Next, a data management method for transferring the list-structured data stored in the data file space 22 to the virtual storage space 20 will be described. In the arithmetic processing of the CPU 2, when necessary data is not stored in the virtual storage space 20 or when the virtual storage space 20 has a sufficient free area, the necessary data is stored from the data file space 22 to the virtual storage in structure units. Transfer to space 20.

【0038】たとえば、リンク構造のデータが、図4に
示すように仮想記憶空間20およびデータファイル空間
22に記憶されている場合には、ストラクチャ1上に記
憶された全てのデータセルまたはストラクチャ2上に記
憶された全てのデータセルが仮想記憶空間20に転送さ
れる。たとえば、図4に示す、データファイル空間22
のストラクチャ1上に記憶された全てのデータセルを仮
想記憶空間20に転送すると、仮想記憶空間20および
データファイル空間22上のデータのリンク構造は、図
6のように変更される。図6では、図4に示すストラク
チャ2上のss1、ss2、ss3が、仮想記憶空間2
0上にそれぞれmm1’、mm2’mm3’として記憶
される。このとき、図4において、間接ポインタmm3
を介して実現されていたmm2からss1に対してのリ
ンクは、図6に示すように、mm2からmm1’に対し
ての直接的なリンクに変更されている。転送処理が終了
すると、ストラクチャ1のデータセルは、仮想記憶空間
20のうち、メインメモリ4に表現された仮想記憶空間
20aに存在する。
For example, when the data of the link structure is stored in the virtual storage space 20 and the data file space 22 as shown in FIG. 4, all the data cells stored in the structure 1 or the structure 2 are stored. All data cells stored in the virtual memory space 20 are transferred to the virtual memory space 20. For example, the data file space 22 shown in FIG.
When all the data cells stored in the structure 1 of the above are transferred to the virtual storage space 20, the data link structure in the virtual storage space 20 and the data file space 22 is changed as shown in FIG. In FIG. 6, ss1, ss2, and ss3 on the structure 2 shown in FIG.
0 are stored as mm1 'and mm2'mm3', respectively. At this time, in FIG. 4, indirect pointer mm3
The link from mm2 to ss1 that has been realized through is changed to a direct link from mm2 to mm1 ′ as shown in FIG. When the transfer process ends, the data cell of the structure 1 exists in the virtual memory space 20a represented in the main memory 4 of the virtual memory space 20.

【0039】図7は、転送後の、SRT、XRT、IR
Tを説明するための図である。転送後において、データ
ファイル空間22にはストラクチャ1は、存在しないた
め、SRTにはストラクチャ1に対応する情報は記載さ
れずXRT1、IRT1も存在しない。また、図7に示
すXRT2では、転送前におけるストラクチャ1上のs
s2が転送後において仮想記憶空間20上のmm2’と
なったことにともない、dst.idとしてmm2’が
記載されている。
FIG. 7 shows SRT, XRT, IR after transfer.
It is a figure for demonstrating T. After the transfer, since the structure 1 does not exist in the data file space 22, the information corresponding to the structure 1 is not described in the SRT, and neither XRT1 nor IRT1 exists. Further, in the XRT 2 shown in FIG. 7, s on the structure 1 before transfer
Since s2 becomes mm2 ′ in the virtual storage space 20 after the transfer, dst. mm2 'is described as id.

【0040】また、仮想記憶空間20に所定の空き領域
を作成する必要が生じた場合には、リンク的に関連性の
ある一連のデータを単位として仮想記憶空間20からデ
ータファイル空間22に転送、すなわちストラクチャア
ウトする。したがって、仮想記憶空間20からデータフ
ァイル空間22にデータ転送が行われると、仮想記憶空
間20のうちデータが存在しないアドレスが虫食い的に
発生する。データファイル空間22から仮想記憶空間2
0にデータ転送を行う場合には、仮想記憶空間20の上
記虫食い状態を埋めるように転送されたデータを記憶さ
せる。また、このような、仮想記憶空間20に存在する
データの虫食い状態を改善するために後述するように仮
想記憶空間20を2分割して使用する処理が行われる。
Further, when it becomes necessary to create a predetermined free area in the virtual storage space 20, a series of data having a link relationship is transferred from the virtual storage space 20 to the data file space 22, That is, structure out. Therefore, when data is transferred from the virtual storage space 20 to the data file space 22, an address in the virtual storage space 20 in which no data exists is worm-eating. Data file space 22 to virtual storage space 2
When data is transferred to 0, the transferred data is stored so as to fill the above-mentioned worm eating state of the virtual storage space 20. Further, in order to improve the worm-eating state of the data existing in the virtual storage space 20, a process of dividing the virtual storage space 20 into two and using it is performed as described later.

【0041】上述したように、本実施例のデータ管理方
法によれば、CPU2の処理において必要とされるリン
ク構造のデータを、効率よくメインメモリ4に記憶させ
ることができ、計算機システムの処理効率を向上させる
ことができる。また、本実施例のデータ管理方式は、通
常の計算機システムで使用されるページング方式の記憶
管理を用いて実現することができ、汎用性に優れてい
る。
As described above, according to the data management method of this embodiment, the data having the link structure required for the processing of the CPU 2 can be efficiently stored in the main memory 4, and the processing efficiency of the computer system can be improved. Can be improved. Further, the data management system of this embodiment can be realized by using the storage management of the paging system used in a normal computer system and is excellent in versatility.

【0042】第2実施例について説明する。本実施例の
計算機システムにおけるデータ管理方法は、上述した第
1実施例のデータ管理方法の処理と、不使用になったポ
インタ、すなわちガーベジの回収作業であるガーベジコ
レクションの処理とを時分割方式を用いて実時間で実行
する。すなわち、本実施例のデータ管理方法では、所定
の周期で割り込みが発生し、第1実施例で説明したデー
タ管理方法の処理と、ガーベジコレクションの処理とが
交互に行われる。割り込みが発生し、実行中の処理が中
断されると、割り込み発生時の処理状態が記憶され、次
に割り込みが発生したときに、前回、記憶された処理状
態から再度、処理が開始される。さらに、ガーベジコレ
クションの処理は、即時性に富むインクリメンタル・ガ
ーベジコレクションの処理と、環状結合のガーベジおよ
び参照カウンタのオーバーフローに伴うガーベジを回収
することができるマークアンドスイープ・ガーベジコレ
クションの処理とを行い、インクリメンタル・ガーベジ
コレクションの処理をマークアンドスイープ・ガーベジ
コレクションの処理に優先させて行う。
The second embodiment will be described. The data management method in the computer system of the present embodiment is a time-division method in which the processing of the above-described data management method of the first embodiment and the processing of garbage collection, which is a work of collecting unused pointers, that is, garbage collection, are performed. Use and run in real time. That is, in the data management method of this embodiment, an interrupt occurs at a predetermined cycle, and the processing of the data management method described in the first embodiment and the processing of garbage collection are alternately performed. When an interrupt occurs and the process being executed is interrupted, the process state at the time of the interrupt occurrence is stored, and when the interrupt occurs next time, the process is restarted from the previously stored process state. Further, the garbage collection process includes a process of incremental garbage collection that is rich in immediacy, and a mark-and-sweep garbage collection process that can collect the garbage associated with the circular join and the overflow of the reference counter. The process of incremental garbage collection is prioritized over the process of mark and sweep garbage collection.

【0043】以下、ガーベジコレクションの処理につい
て詳細に説明する。ガーベジコレクションは、仮想記憶
空間20上ではデータセル単位に、データファイル空間
22上では参照表を使ってストラクチャ単位に処理す
る。データファイル空間22上のストラクチャの参照の
カウントやマーキングは、SRT(ストラクチャ管理
表)で行なう。データファイル空間22上のストラクチ
ャからの参照は、そのXRT(外部参照表)を用いてた
どる。そのため、外部メモリ8に記憶された実際のデー
タセルをアクセスする必要がなく、高速処理が可能であ
る。ガーベジコレクションによって回収した仮想記憶空
間20上のデータセルはフリーセルとして使用する。フ
リーセルは仮想記憶空間20上にのみ存在する。データ
ファイル空間22上のストラクチャがガーベジとなった
ときは、そのデータファイル空間22を解放する。本実
施例のデータ管理方式におけるガーベジコレクションで
は、データファイル空間22上のストラクチャはひとつ
のオブジェクトとして扱うことができる。以下の記述に
おいて、仮想記憶空間20上のデータセルとデータファ
イル空間22上のストラクチャは合わせて「オブジェク
ト」として表現する。
The garbage collection process will be described in detail below. The garbage collection is processed in the virtual memory space 20 in units of data cells, and in the data file space 22 in units of structures using a reference table. SRT (structure management table) is used to count and mark the reference of the structure in the data file space 22. The reference from the structure on the data file space 22 is traced using the XRT (external reference table). Therefore, it is not necessary to access the actual data cell stored in the external memory 8, and high-speed processing is possible. The data cell in the virtual storage space 20 collected by the garbage collection is used as a free cell. Free cells exist only in the virtual storage space 20. When the structure on the data file space 22 becomes garbage, the data file space 22 is released. In the garbage collection in the data management method of this embodiment, the structure on the data file space 22 can be treated as one object. In the following description, the data cell in the virtual storage space 20 and the structure in the data file space 22 are collectively expressed as an “object”.

【0044】ガーベジコレクションとしては、図8に示
すように、インクリメンタル・ガーベジコレクション
(GC)とマークアンドスィープ・ガーベジコレクショ
ン(GC)とがある。本実施例のデータ管理方式おける
ガーベジコレクションとしては、参照カウントまたは多
重参照マークに基づくインクリメンタクルGCを基本と
する。インクリメンタルGCはガーベジの生成から回収
に至る即時性が良く、通常1回の実行量も多くないので
実時間ガーベジコレクションに適している。しかしなが
ら、インクリメンタルGCでは、環状構造のデータや、
参照カウンタがオーバーフローしたオブジェクト、多重
参照となったオブジェクトは回収できない。そのため、
少ない頻度であるがマークおよびスィープGCを実行さ
せる。
As shown in FIG. 8, the garbage collection includes an incremental garbage collection (GC) and a mark and sweep garbage collection (GC). As the garbage collection in the data management system of this embodiment, an incremental GC based on a reference count or multiple reference marks is basically used. Incremental GC is suitable for real-time garbage collection because it has good immediacy from generation to collection of garbage and usually does not have a large amount of execution once. However, in the incremental GC, the data of the ring structure,
Objects whose reference counter overflows and objects that have multiple references cannot be collected. for that reason,
Execute Mark and Sweep GC less frequently.

【0045】リストデータ記憶構成方式では、リスト処
理の制御スタックなどからの参照をオブジェクト上にカ
ウントする方式も、カウントしない遅延形も可能であ
る。図1において、遅延形インクリメンタルGCを行う
場合、被参照のなくなったオブジェクトを示すゼロ参照
表を用い、その管理を行い、ガーベジコレクション時に
スタックなどからの参照をカウントして、ガーベジコレ
クションを実行する。
In the list data storage configuration method, a method of counting the reference from the control stack of the list processing on the object or a delay type of not counting is possible. In FIG. 1, when the delayed incremental GC is performed, a zero reference table indicating an object that is no longer referred to is used, the zero reference table is managed, the reference from the stack or the like is counted at the time of garbage collection, and the garbage collection is executed.

【0046】実時間性を得るため、1回に続けて回収し
たりマーキングをする時間を制御する。また、ガーベジ
コレクションの実行が全体の処理過程において一時的に
集中しないように、ガーベジコレクションの実行の間隔
または監視時間内におけるガーベジコレクション実行時
間の割合を制御する。すなわち、実時間時分割でインク
リメンタルGCを実行させる。マークおよびスィープG
Cは頻繁に実行しなくてよいので、その実行間隔をさら
に長くとって制御する。時分割で動作するガーベジコレ
クションを中断する際、次に処理を再開するため、その
途中状態を保持する。本実施例においては、インクリメ
ンタルGCとマークおよびスィープGCの2方式のガー
ベジコレクションが並行して動作するので、オブジェク
トの回収に関して両者が競合することがあるが、ガーベ
ジコレクションを再開するとき、保持していた途中状態
の変化を確かめることによってこの競合を解消する。
In order to obtain real-time property, the time for collecting or marking one time after another is controlled. Further, the interval of the garbage collection execution or the ratio of the garbage collection execution time within the monitoring time is controlled so that the execution of the garbage collection is not temporarily concentrated in the whole process. That is, the incremental GC is executed in real time time division. Mark and sweep G
Since C does not have to be executed frequently, its execution interval is controlled to be longer. When the garbage collection that operates in a time-sharing manner is interrupted, the processing is restarted next, and therefore the intermediate state is retained. In this embodiment, since the two types of garbage collection, that is, the incremental GC and the mark and sweep GC, operate in parallel, the two may conflict with each other regarding the collection of objects, but they are held when the garbage collection is restarted. This conflict is resolved by checking the changes in the state during the process.

【0047】ページング方式のような記憶管理上では、
リスト処理中にフリーセルがなくなると飢餓状態とな
る。しかしながら、本実施例のリクトデータ記憶構成方
式を用いたデータ管理方式では二次記憶の許すかぎりデ
ータのストラクチャ・アウトによって新たなフリーセル
が得られるので、そのような形での飢餓状態は起こらな
い。リストデータ記憶構成方式では、回収されないガー
ベジが仮想記憶空間20を専有したとき飢餓状態とな
る。従って、未回収オブジェクトが定常的に増加した
り、回収できない環状構造データや参照カウントのオー
バフローしたオブジェクトが増加しないように、各ガー
ベジコレクションの実行頻度と時間を設定すればよい。
In storage management such as the paging method,
If there are no free cells during list processing, starvation occurs. However, in the data management method using the exact data storage configuration method of the present embodiment, a new free cell can be obtained by the structure out of the data as long as the secondary storage permits, so a starvation state in such a form does not occur. . In the list data storage configuration method, when the garbage that is not collected occupies the virtual storage space 20, it becomes starved. Therefore, the execution frequency and time of each garbage collection may be set so that the number of uncollected objects does not increase constantly, and the number of objects that cannot be collected and has an overflow of reference structure count or reference count.

【0048】インクリメンタルGCにおいて、被参照の
なくなったオブジェクトのうち回収途中のものは「オブ
ジェクト回収スタック」で管理する。ガーベジコレクシ
ョンを中断後再開するとき、そのスタック上のオブジェ
クトから回収を始めればよい。ガーベジコレクションの
再開は、例えば、被参照のなくなった新たなオブジェク
トの出現や、未回収オブジェクトの増加、遅延形の場合
のゼロ参照オブジェクトの増加、フリーセルを消費する
関数、たとえば、consの呼び出しによる。ガーベジ
コレクションを再開したとき、スタック上の未回収のオ
ブジェクトは、マークおよびスィープGCによりすでに
回収されていたり、さらにリスト処理により新たなオブ
ジェクトとして使用されている可能性がある。この場
合、そのオブジェクトからの回収を行なってはいけな
い。これは、参照カウント方式の場合その値の変更、多
重参照の場合、未回収オブジェクトに対する特別のマー
ク付けをスタックに積む前に行なっておくことにより判
断できる。しかしリストデータ記憶構成方式を用いた本
実施例のデータ管理方式では、即時性の良いインクリメ
ンタルGCを、実行頻度が少なくてよいマークおよびス
ィープGCに優先させる。従って、マークおよびスィー
プGCによるオブジェクト回収スタック上の副作用は考
えなくてよい。
In the incremental GC, among the objects that are no longer referred to, those that are in the process of collection are managed by the "object collection stack". When you restart garbage collection after it has been suspended, you can start collecting it from the objects on that stack. Garbage collection can be restarted by, for example, the appearance of new objects that are no longer referenced, the increase of uncollected objects, the increase of zero reference objects in the case of delay type, or the function that consumes free cells, for example, calling cons. . When the garbage collection is restarted, the uncollected objects on the stack may have already been collected by the mark and sweep GC, or may be used as new objects by the list processing. In this case, do not retrieve from that object. This can be judged by changing the value in the case of the reference counting method, or by specially marking uncollected objects before stacking them in the case of multiple references. However, in the data management method of this embodiment using the list data storage configuration method, the incremental GC with good immediacy is prioritized over the mark and sweep GC that may be executed less frequently. Therefore, the side effects on the object collection stack due to Mark and Sweep GC need not be considered.

【0049】マークおよびスィープGCにおいて、マー
キング途中のオブジェクトは「マーキングスタック」に
そのオブジェクトへのポインタを載せて管理する。マー
クおよびスィープGCの処理中、リスト処理によって、
例えば関数rplacdによって、データは参照カウン
トや多重参照マークによりその必要性を判断できる。そ
のデータが不要のときはインクリメンタルGCで回収す
る。切り離したオブジェクトがスタックから参照されて
いて後に使用される可能性がある場合、それをマーキン
グスタックに載せ、後にマーキングの処理をする。関数
consやストラクチャ・インによって生成された仮想
記憶空間20上のデータセルと、ストラクチャ・アウト
によって作られたデータファイル空間22上のストラク
チャには生成時にマークを付ける。マークは2種類用意
し、マークフェーズの最初に切り替えて、ひとまとまり
のマークおよびスィープGC毎に交互に使用する。フリ
ーセルには回収を避けるためフリーセルマークを付け
る。マークおよびスィープGCの中断中、マーキングス
タック上で管理している仮想記憶空間20上のデータセ
ルがインクリメンタルGCやストラクチャ・アウトによ
ってフリーセルになったり、関数consやストラクチ
ャ・インによって再使用される可能性がある。また、デ
ータファイル空間22上のストラクチャがインクリメン
タルGCによってガーベジとなり回収される可能性があ
る。このためマーキングスタックに載せるオブジェクト
には副作用を認識するためのマークを付け、その処理の
継続を判断する。
In the mark and sweep GC, an object in the middle of marking is managed by placing a pointer to the object in the "marking stack". During the processing of mark and sweep GC, the list processing
For example, the function rplacd allows the data to determine its necessity by reference count or multiple reference marks. When the data is unnecessary, it is collected by incremental GC. If the detached object is referenced from the stack and may be used later, put it on the marking stack for later marking. A data cell in the virtual storage space 20 created by the function cons or structure-in and a structure in the data file space 22 created by structure-out are marked at the time of creation. Two types of marks are prepared, switched at the beginning of the mark phase, and used alternately for each set of marks and sweep GC. The free cell is marked with the free cell to avoid collection. During the suspension of the mark and sweep GC, the data cell in the virtual memory space 20 managed on the marking stack can be made a free cell by the incremental GC or the structure out, or can be reused by the function cons or the structure in. There is a nature. Further, there is a possibility that the structure on the data file space 22 becomes garbage due to the incremental GC and is collected. For this reason, the object to be placed on the marking stack is marked to recognize the side effect, and the continuation of the processing is determined.

【0050】ガーベジコレクションの実時間での実行時
間の管理は、タイマなどを持ったアーキテクチャ上では
その割り込み機能を用いて、リスト処理とガーベジコレ
クションの実行には負担をかけずに行なえる。ガーベジ
コレクションの実行時間を回収するオブジェクトの個数
などで制御する場合も、プロセッサ内で高速に処理でき
るので、大きなオーバヘッドとはならない。マーキング
スタックに同一のオブジェクトへのポインタを複数個載
せるのを避けるため、オブジェクトへのマーキングはス
タックへ載せる前に行なう。従って、ガーベジコレクシ
ョン中断中の副作用を認識するためのマーク付け作業
は、その処理を同時に実行できる。
Management of the execution time of garbage collection in real time can be performed without burdening the list processing and the execution of garbage collection by using the interrupt function on the architecture having a timer or the like. Even if the execution time of garbage collection is controlled by the number of objects to be collected, it can be processed at high speed in the processor, so it does not cause a large overhead. To avoid placing multiple pointers to the same object on the marking stack, mark the object before placing it on the stack. Therefore, the marking operation for recognizing the side effect during the garbage collection interruption can be executed at the same time.

【0051】リスト処理によって構造が書き変わったと
き、切り離されたデータは大抵インクリメンタルGCで
回収できるので、データ構造の変化に伴うマーキングの
オーバヘッドは、マークおよびスィープGCを単独で動
作させる場合に比べて小さくて済む。また、マークおよ
びスィープGCの実行頻度が少ないので、全体の処理に
おいてこのオーバヘッドは小さい。生成オブジェクトと
フリーセルに対するマーク付けも、そのオブジェクトデ
ータを構成する際、プロセッサ内で同時に処理できる。
リストデータ記憶構成方式を適用した本実施例のデータ
管理方式においては、フリーセル不足による飢餓状態は
発生しないが、ストラクチャ・インへの対応をよくする
ため、本実施例のデータ管理方式においても一定量のフ
リーセルを確保するようにする。フリーセルの確保は仮
想記憶空間20における使用可能量の減少をもたらすの
で、実時間にともなうオーバーヘッドとなる。
When the structure is rewritten by the list processing, the separated data can usually be recovered by the incremental GC. Therefore, the overhead of the marking accompanying the change of the data structure is larger than that when the mark and sweep GC are operated independently. It can be small. Further, since the mark and sweep GC are executed less frequently, this overhead is small in the entire processing. Marking of created objects and free cells can also be processed simultaneously in the processor when constructing its object data.
In the data management method of the present embodiment to which the list data storage configuration method is applied, the starvation state due to the shortage of free cells does not occur, but in order to improve the structure-in correspondence, the data management method of the present embodiment is also constant. Try to secure a quantity of free cells. Securing a free cell causes a decrease in the usable amount in the virtual storage space 20, and thus becomes an overhead in real time.

【0052】本実施例のデータ管理方式は、ストラクチ
ャの管理のため仮想記憶空間20上のデータセルとデー
タファイル空間22上のストラクチャとに参照カウント
または多重参照マークを必要とする。リストデータ記憶
構成方式を用いたデータ管理方式における実時間ガーベ
ジコレクションの効率の良い実現は、インスリメンタル
GCに負うことこら大きいが、インクリメンタルGCは
この被参照情報を用いて実現できる。本実施例のデータ
管理方式における実時間ガーベジコレクションは、仮想
記憶空間20の使用効率を低くするが、実時間化自体の
オーバヘッドはほとんどない。本実施例のデータ管理方
法によれば、上述した第1実施例のデータ管理方法で述
べた効果に加え、ガーベジコレクションを実時間で実行
させることで、ガーベジを効率よく除法することでき
る。その結果、CPU2の処理に必要とされるデータを
効率よくメインメモリ4に記憶させることができ、計算
機システムの処理効率を向上させることができる。
The data management system of this embodiment requires reference counts or multiple reference marks for the data cells in the virtual storage space 20 and the structure in the data file space 22 for structure management. The efficient realization of real-time garbage collection in the data management method using the list data storage configuration method depends largely on the incremental GC, but the incremental GC can be realized by using this referenced information. The real-time garbage collection in the data management method of this embodiment reduces the use efficiency of the virtual storage space 20, but there is almost no overhead of real-time realization. According to the data management method of the present embodiment, in addition to the effect described in the data management method of the first embodiment described above, by performing the garbage collection in real time, it is possible to efficiently remove the garbage. As a result, the data required for the processing of the CPU 2 can be efficiently stored in the main memory 4, and the processing efficiency of the computer system can be improved.

【0053】第3実施例について説明する。本実施例の
データ管理方法では、上述した第1実施例のデータ管理
方法に加えて、図4に示す仮想記憶空間20を2分割し
て、それら分割された空間を交互に使用してリスト構造
のデータを管理する。図9は、本実施例のデータ管理方
法を説明するための図である。図9(A)に示すよう
に、仮想記憶空間20は仮想記憶空間24および仮想記
憶空間26に分割され、CPU2における現在実行中の
処理において、たとえば、仮想記憶空間24が使用さ
れ、仮想記憶空間26は使用されていない。すなわち、
図4に示す仮想記憶空間20として図9(A)に示す仮
想記憶空間24が用いられ、仮想記憶空間24とデータ
ファイル空間22との間で第1実施例で説明した記憶管
理が行われる。
The third embodiment will be described. In the data management method of this embodiment, in addition to the data management method of the first embodiment described above, the virtual storage space 20 shown in FIG. 4 is divided into two, and the divided spaces are alternately used to create a list structure. Manage the data of. FIG. 9 is a diagram for explaining the data management method of this embodiment. As shown in FIG. 9A, the virtual memory space 20 is divided into a virtual memory space 24 and a virtual memory space 26. For example, the virtual memory space 24 is used in the process currently being executed by the CPU 2, and the virtual memory space 24 is used. 26 is not used. That is,
The virtual storage space 24 shown in FIG. 9A is used as the virtual storage space 20 shown in FIG. 4, and the storage management described in the first embodiment is performed between the virtual storage space 24 and the data file space 22.

【0054】CPU2は、仮想記憶空間24に存在する
データを使用して処理を実行しているときに、仮想記憶
空間24にフリーセルがなくなると、使用中のデータセ
ルを、使用中のデータセルと関連のある単数または複数
のデータセルと共に、仮想記憶空間26に複写する。こ
の複写は、たとえば、CPU2が処理を実行中のデータ
セルから、直接的または間接的に参照されているデータ
セルが全て仮想記憶空間26に複写されたときに終了す
る。たとえば、図9(B)に示すように、CPU2にお
ける現在実行中の処理において図9(A)に示す仮想記
憶空間24に存在するデータセル40が使用されている
ときに、仮想記憶空間24にフリーセルがなくなると、
データセル40とデータセル40から直接的およひ間接
的にリンクされているデータセル42、44とが仮想記
憶空間26に複写され、仮想記憶空間26に存在するデ
ータセル40a、42a、44aとなる。仮想記憶空間
24に存在するデータセルは、仮想記憶空間26に対し
て、仮想記憶空間26におけるアドレス上の局所性を高
めるように複写される。すなわち、データセル40a、
42a、44aは、仮想記憶空間26において近接した
仮想アドレスに存在する。
When the CPU 2 is executing a process using the data existing in the virtual memory space 24 and there are no free cells in the virtual memory space 24, the CPU 2 changes the data cell in use to the data cell in use. Copies into virtual memory space 26 with one or more data cells associated with This copying ends, for example, when all the data cells that are directly or indirectly referenced from the data cell in which the CPU 2 is executing the processing are copied to the virtual storage space 26. For example, as shown in FIG. 9B, when the data cell 40 existing in the virtual storage space 24 shown in FIG. When the free cell runs out,
The data cell 40 and the data cells 42 and 44 directly and indirectly linked from the data cell 40 are copied to the virtual storage space 26, and the data cells 40a, 42a and 44a existing in the virtual storage space 26 Become. The data cells existing in the virtual memory space 24 are copied to the virtual memory space 26 so as to enhance the locality of addresses in the virtual memory space 26. That is, the data cell 40a,
42a and 44a exist at virtual addresses adjacent to each other in the virtual storage space 26.

【0055】そして、上記複写が終了すると、CPU2
は仮想記憶空間26に存在するデータを使用して処理を
実行し、仮想記憶空間26に存在する未使用のデータセ
ルがフリーセルとして使用される。上述したように、C
PU2が実行中の処理において使用されているデータセ
ルを、そのデータセルと直接的または間接的にリンクさ
れているデータセルと共に、仮想記憶空間24から仮想
記憶空間26に対してアドレス上の局所性を得るように
複写することで、メインメモリ4と外部メモリ8との間
のページングの頻度を低くすることができる。
When the copying is completed, the CPU 2
Performs processing using data existing in the virtual memory space 26, and unused data cells existing in the virtual memory space 26 are used as free cells. As mentioned above, C
Address locality of the data cell used in the process being executed by the PU2, from the virtual memory space 24 to the virtual memory space 26, together with the data cell directly or indirectly linked to the data cell. By performing the copying so as to obtain p.p.m., the frequency of paging between the main memory 4 and the external memory 8 can be reduced.

【0056】上述した複写の処理において、CPU2が
実行中の処理において使用されるデータセルから直接的
または間接的にリンクされたデータセルが、図4に示す
データファイル空間22に存在する場合、すなわち、C
PU2が実行中の処理において使用されるデータセルか
ら、データファイル空間22のデータセルに対して直接
的または間接的に参照がある場合、第2実施例で説明し
たマーキング処理をデータファイル空間22のストラク
チャに対して行うようにしてもよい。このように、マー
キング処理を行うことで、上述した仮想記憶空間24か
ら仮想記憶空間26に対しての複写の処理が終了したと
きに、データファイル空間22において第2実施例で説
明したスイープ処理をストラクチャ単位で実行すること
できる。CPU2における本来のデータ処理は、上記複
写とスイープ処理との終了後、継続して行われる。
In the above-mentioned copying process, when the data cell directly or indirectly linked from the data cell used in the process being executed by the CPU 2 exists in the data file space 22 shown in FIG. 4, that is, , C
When there is a direct or indirect reference to a data cell in the data file space 22 from a data cell used in the process being executed by the PU 2, the marking process described in the second embodiment is performed in the data file space 22. It may be performed for the structure. By performing the marking process in this way, when the above-described copying process from the virtual storage space 24 to the virtual storage space 26 is completed, the sweep process described in the second embodiment is performed in the data file space 22. It can be executed in units of structures. The original data processing in the CPU 2 is continuously performed after the copying and sweep processing are completed.

【0057】このように、本実施例のデータ管理方法で
は、仮想記憶空間20において上述した複写処理を行い
ページングの頻度を低くすると共に、第2実施例で説明
したガーベジコレクションも実行することができる。
As described above, according to the data management method of the present embodiment, the above-mentioned copy processing is performed in the virtual storage space 20 to reduce the frequency of paging, and the garbage collection described in the second embodiment can also be executed. .

【0058】次に、CPU2における本来の処理と、上
述した複写処理とを時分割方式を用いて実時間で動作さ
せる方法について説明する。本実施例のデータ管理方法
では、CPU2における本来の処理と、上述した仮想記
憶空間20における複写の処理と、データファイル空間
22におけるマークアンド・ガーベジコレクションの処
理とを時分割方式を用いて実時間で動作させる。このと
き、本実施例では、記憶空間における複写処理とCPU
における本来の処理とを時分割方式を用いて実時間で動
作させること開示する、たとえば、Henry G.Baker,Jr:L
ist Processing in Real Time on a Computer,Communic
ations of the ACM,vol.21,no.4,pp.280-294,1978 のデ
ータ管理方法を応用して、仮想記憶空間20における複
写処理とCPU2における本来の処理とを時分割方式で
実時間で動作させる。
Next, a method of operating the original processing in the CPU 2 and the above-mentioned copying processing in real time using the time division method will be described. In the data management method of the present embodiment, the original processing in the CPU 2, the copying processing in the virtual storage space 20 described above, and the mark and garbage collection processing in the data file space 22 are performed in real time using a time division method. To work with. At this time, in this embodiment, the copying process and the CPU in the storage space are performed.
It is disclosed to operate in real time using the time division method with the original processing in, for example, Henry G. Baker, Jr: L
ist Processing in Real Time on a Computer, Communic
By applying the data management method of ations of the ACM, vol.21, no.4, pp.280-294, 1978, the copy processing in the virtual memory space 20 and the original processing in the CPU 2 are performed in real time in a time-division manner. To work with.

【0059】たとえば、図9(A)において、CPU2
が仮想記憶空間24に存在するデーアを用いて処理を実
行中に、仮想記憶空間24にフリーセルがなくなると、
上述した複写処理を時分割方式で動作させる。このよう
に時分割方式で複写処理を行った場合、複写処理が終了
していない状態で、複写処理が中断される場合がある
が、仮想記憶空間26に複写されるデータセルは仮想記
憶空間26上のアドレスの順番にそって配置されるた
め、次に複写処理が開始されるとき、複写処理の再開の
状態は、前回に複写処理を中断したときの仮想記憶空間
26の複写の位置によって判断される。
For example, referring to FIG.
Is running a process using the data existing in the virtual memory space 24, if there are no free cells in the virtual memory space 24,
The copying process described above is operated in a time-division manner. When the copy process is performed by the time division method as described above, the copy process may be interrupted before the copy process is completed. However, the data cells copied to the virtual memory space 26 are the virtual memory space 26. Since the addresses are arranged in the order of the addresses above, when the copy process is started next time, the restart state of the copy process is determined by the copy position of the virtual storage space 26 when the copy process was interrupted last time. To be done.

【0060】複写処理が開始された後に、CPU2にお
いて処理されるデータセルが仮想記憶空間24に存在し
たときには、そのデータセルを仮想記憶空間24から仮
想記憶空間26に移動させ、この移動されたデータセル
を使用してCPU2は処理を継続する。このとき、上記
複写処理の中断と、複写処理の再開を認識するための仮
想記憶空間24、26上のアドレスは、データセルの移
動に応じて変換する。仮想記憶空間26において、フリ
ーセルは、仮想記憶空間24から仮想記憶空間26に複
写したフリーセルが配置された方向とは、逆の方向から
得られる。すなわち、仮想記憶空間24に存在するデー
タセルを仮想記憶空間26におけるアドレス番号の大き
な位置から、小さな位置に向かって複写する場合には、
仮想記憶空間26のアドレス番号の小さな位置にフリー
セルが存在する。
When a data cell to be processed by the CPU 2 exists in the virtual memory space 24 after the copying process is started, the data cell is moved from the virtual memory space 24 to the virtual memory space 26, and the moved data is moved. The CPU 2 continues the process by using the cell. At this time, the addresses in the virtual storage spaces 24 and 26 for recognizing the interruption of the copying process and the restart of the copying process are converted according to the movement of the data cell. In the virtual memory space 26, the free cells are obtained from the direction opposite to the direction in which the free cells copied from the virtual memory space 24 to the virtual memory space 26 are arranged. That is, when copying a data cell existing in the virtual memory space 24 from a position with a large address number in the virtual memory space 26 to a position with a small address number,
A free cell exists in a position of the virtual memory space 26 having a small address number.

【0061】本実施例のデータ管理方法では、CPU2
における本来の処理と、上記複写処理とを時分割方式を
用いて行うのに加えて、さらにデータファイル空間22
におけるマークアンドスイープ・ガーベジコレクション
の処理を時分割方式を用いて実時間で動作させる。
In the data management method of this embodiment, the CPU 2
In addition to performing the original processing in step 2 and the copy processing using the time division method, the data file space 22
The mark-and-sweep-garbage-collection process in is operated in real time using the time-sharing method.

【0062】上述したように本実施例のデータ管理方法
によれば、仮想記憶空間20内のアドレスにおけるデー
タの局所性を高めることができ、メインメモリ4と外部
メモリ8との間で行われるページングの頻度が減少し、
コンピュータシステムの処理効率が向上する。
As described above, according to the data management method of this embodiment, the locality of data at the address in the virtual memory space 20 can be enhanced, and paging performed between the main memory 4 and the external memory 8. The frequency of
The processing efficiency of the computer system is improved.

【0063】上述した第1〜3実施例では、データファ
イル空間22はハードウェア資源が許す限りデータ量の
増加に応じて拡張することができる。また、本実施例の
データ管理方法で用いられるデータが全仮想記憶空間を
専有してしまうと、他のアプリケーションソフトなどが
動作できなくなるため、一般的には全仮想記憶空間のう
ち所定の数ページを本実施例のデータ管理方法で用いら
れる仮想記憶空間として利用する。したがって、CPU
における処理の内容および負荷状態に応じて、全仮想記
憶空間のうち、本実施例のデータ管理方法で用いられる
仮想記憶空間として割り付けるページ数を増減させるよ
うにしてもよい。たとえば、本実施例のデータ管理方法
で用いられる仮想記憶空間のページ数を増加させたいと
きには、増加したページの領域をフリーセルとして使用
することができる。また、本実施例のデータ管理方法で
用いられる仮想記憶空間のページ数を減少させたいとき
には、削除の対象となるページに記憶されたデータを上
述したリンク構造データ管理方法を用いてストラクチャ
単位で仮想記憶空間からデータファイル空間に移動し、
上記削除の対象となるページを仮想記憶空間から削除す
る。
In the first to third embodiments described above, the data file space 22 can be expanded according to the increase in the data amount as long as the hardware resources allow. Further, if the data used in the data management method of the present embodiment occupies the entire virtual storage space, other application software and the like cannot operate. Therefore, generally, a predetermined number of pages in the entire virtual storage space are used. Is used as a virtual storage space used in the data management method of this embodiment. Therefore, the CPU
The number of pages to be allocated as a virtual storage space used in the data management method of the present embodiment may be increased or decreased among all the virtual storage spaces depending on the content of the processing in step 1 and the load state. For example, when it is desired to increase the number of pages of the virtual storage space used in the data management method of this embodiment, the area of the increased page can be used as a free cell. Further, when it is desired to reduce the number of pages in the virtual storage space used in the data management method of the present embodiment, the data stored in the page to be deleted is virtualized in units of structure using the link structure data management method described above. Move from storage space to data file space,
The page to be deleted is deleted from the virtual storage space.

【0064】[0064]

【発明の効果】上述したように、本発明のデータ管理方
法によれば、一般的に広く使用されている仮想記憶方法
を拡張した形でリンク構造のデータ管理方法を行いてコ
ンピュータシステムの処理効率を向上させることができ
る。すなわち、本発明のデータ管理方法の仮想記憶空間
およびデータファイル空間は、一般的なコンピュータシ
ステム上に既に実現されている仮想記憶空間およびデー
タファイル空間をそのまま用いて容易に実現することが
できる。その結果、人工知能情報処理、自然言語処理、
数式処理などの処理を、本発明のデータ管理方法を適用
したコンピュータシステムを用いることで、従来のコン
ピュータシステムを用いた場合に比べて効率よく行うこ
とができる。また、本発明のデータ管理方法によれば、
リンク構造のデータ処理に不可欠なガーベジコレクショ
ンの処理を、ペーング方式などの仮想記憶方式を単独で
用いる場合よりも、第2の記憶手段に対しての低いアク
セス頻度で効率よく行うことができる。また、本発明の
データ管理方法によれば、動的信号解析および製造工程
での診断、あるいはヒューマンインタフェースなど実時
間性が要求される処理を行う場合に、リンク構造のデー
タの処理とそのガーベジコレクションの処理とを、それ
らの処理の中断と再開の簡単な処理を付加して行う時分
割方式を用いて実時間で動作させることができる。ま
た、本発明のデータ管理方法によれば、仮想記憶空間を
2分割して使用することで、仮想記憶空間におけるデー
タの局所性を高めることができ、ページング処理の発生
頻度を低下させることができ、その結果、コンピュータ
の処理効率を向上させることができる。さらに、本発明
のデータ管理方法によれば、全仮想記憶空間のうち、本
発明のデータ管理方法を用いて管理を行う対象とする仮
想記憶空間の大きさを動的に変化させることで、コンピ
ュータシステムの処理効率を向上させることができる。
As described above, according to the data management method of the present invention, the data management method of the link structure is performed by expanding the generally widely used virtual storage method to improve the processing efficiency of the computer system. Can be improved. That is, the virtual storage space and the data file space of the data management method of the present invention can be easily realized by using the virtual storage space and the data file space already realized on a general computer system as they are. As a result, artificial intelligence information processing, natural language processing,
By using a computer system to which the data management method of the present invention is applied, processing such as mathematical expression processing can be performed more efficiently than when a conventional computer system is used. Further, according to the data management method of the present invention,
The garbage collection process, which is indispensable for link structure data processing, can be efficiently performed with a lower access frequency to the second storage means than when a virtual storage system such as a paging system is used alone. Further, according to the data management method of the present invention, when the dynamic signal analysis and the diagnosis in the manufacturing process, or the processing requiring the real time such as the human interface is performed, the processing of the data of the link structure and the garbage collection thereof are performed. Can be operated in real time by using a time division method in which a simple process of suspending and resuming these processes is added. Further, according to the data management method of the present invention, the locality of data in the virtual storage space can be increased by dividing the virtual storage space into two parts, and the frequency of paging processing can be reduced. As a result, the processing efficiency of the computer can be improved. Further, according to the data management method of the present invention, by dynamically changing the size of the virtual storage space to be managed using the data management method of the present invention among all virtual storage spaces, The processing efficiency of the system can be improved.

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

【図1】第1実施例のデータ管理方法を用いた計算機シ
ステムの構成図である。
FIG. 1 is a configuration diagram of a computer system using a data management method according to a first embodiment.

【図2】第1実施例のメインメモリおよび外部メモリに
記憶されたデータを表現した仮想記憶空間およびデータ
ファイル空間を説明するための図である。
FIG. 2 is a diagram for explaining a virtual storage space and a data file space that represent data stored in a main memory and an external memory according to the first embodiment.

【図3】第1実施例の仮想記憶空間の仮想アドレスを説
明するための図である。
FIG. 3 is a diagram for explaining a virtual address of a virtual storage space according to the first embodiment.

【図4】第1実施例の仮想記憶空間およびデータファイ
ル空間に表現されたデータを説明するための図である。
FIG. 4 is a diagram for explaining data expressed in a virtual storage space and a data file space according to the first embodiment.

【図5】図4の状態におけるSRT,XRT、IRTを
説明するための図である。
5 is a diagram for explaining SRT, XRT, and IRT in the state of FIG.

【図6】データファイル空間のデータを仮想記憶空間に
転送した後の仮想記憶空間およびデータファイル空間に
表現されたデータを説明するための図である。
FIG. 6 is a diagram for explaining the data represented in the virtual storage space and the data file space after the data in the data file space is transferred to the virtual storage space.

【図7】図6の状態におけるSRT、XRT、IRTを
説明するための図である。
FIG. 7 is a diagram for explaining SRT, XRT, and IRT in the state of FIG.

【図8】第2実施例のデータ管理方法で行われるガーベ
ジコレクションを説明するための図である。
FIG. 8 is a diagram for explaining garbage collection performed by the data management method according to the second embodiment.

【図9】第3実施例のデータ管理方法で行われる仮想記
憶空間におけるデータ複写処理を説明するための図であ
る。
FIG. 9 is a diagram for explaining a data copy process in a virtual storage space performed by the data management method according to the third embodiment.

【図10】従来のコンピュータシステムにおけるページ
ング方式を説明するための図である。
FIG. 10 is a diagram for explaining a paging method in a conventional computer system.

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

2・・・CPU 4・・・メインメモリ 6・・・入出力回路 8・・・外部メモリ 10・・・外部バス 12・・・内部バス 20、20a、20b・・・仮想記憶空間 22・・・データファイル空間 24、26・・・小仮想記憶空間 30・・・仮想アドレス 32・・・ページ割付表 32a・・・識別フィールド 32b・・・ページアドレスフィールド 34・・・メインメモリアドレス 40、42、42a、44、44a・・・データセル 2 ... CPU 4 ... Main memory 6 ... Input / output circuit 8 ... External memory 10 ... External bus 12 ... Internal bus 20, 20a, 20b ... Virtual storage space 22 ... Data file space 24, 26 ... Small virtual memory space 30 ... Virtual address 32 ... Page allocation table 32a ... Identification field 32b ... Page address field 34 ... Main memory address 40, 42 , 42a, 44, 44a ... Data cells

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】演算制御手段が高速にアクセスすることが
できる第1の記憶手段と、該第1の記憶手段に記憶され
たデータを退避可能であり大規模な記憶容量を有する第
2の記憶手段と、演算制御手段とを有するコンピュータ
システムにおいて、演算制御手段で処理されてリンク構
造が変化するデータを管理するデータ管理方法であっ
て、 仮想記憶空間を前記第1の記憶手段および前記第2の記
憶手段にわたって表現し、データファイル空間を前記第
2の記憶手段に表現し、 前記演算制御手段の処理に応じて、前記第1の記憶手段
と前記第2の記憶手段との間のデータ転送を、 前記仮想記憶空間に表現されたデータについては、該仮
想記憶空間内のアドレスに基づいて作成されたページを
単位として行い、 前記データファイル空間に表現されたデータについて
は、該データおよび該データと直接的または間接的にリ
ンクされたデータで構成されるストラクチャを単位とし
て、データファイル空間と前記第1の記憶手段に表現さ
れた仮想記憶空間との間で行うことを特徴とするデータ
管理方法。
1. A first storage means that can be accessed at high speed by an arithmetic control means, and a second storage having a large storage capacity capable of saving data stored in the first storage means. A data management method for managing data processed by the arithmetic and control unit and having a changed link structure in a computer system having a means and an arithmetic and control unit, the virtual storage space comprising the first storage unit and the second storage unit. And a data file space is expressed in the second storage means, and data transfer between the first storage means and the second storage means is performed according to the processing of the arithmetic control means. For the data expressed in the virtual memory space, the page created based on the address in the virtual memory space is used as a unit, and is expressed in the data file space. Data, between the data file space and the virtual storage space represented in the first storage unit, with the structure composed of the data and the data directly or indirectly linked to the data as a unit. A data management method characterized in that
【請求項2】前記第1の記憶手段および前記第2の記憶
手段に記憶されたデータのうち、不使用となったデータ
を、前記仮想記憶空間に存在するデータについては各デ
ータを単位として回収し、前記データファイル空間に存
在するデータについては前記ストラクチャを単位として
回収するガーベジコレクションを行うことを特徴とする
請求項1記載のデータ管理方法。
2. Out of data stored in the first storage means and the second storage means, unused data is recovered in units of data for data existing in the virtual storage space. The data management method according to claim 1, wherein the data existing in the data file space is collected by the structure as a unit.
【請求項3】前記データ転送と前記ガーベジコレクショ
ンとの処理を時分割方式で行うことを特徴とする請求項
2記載のデータ管理方法。
3. The data management method according to claim 2, wherein the processing of the data transfer and the garbage collection is performed in a time division manner.
【請求項4】前記ガーベジコレクションは、参照カウン
タを用いてガーベジを回収するインクリメンタル・ガー
ベジコレクションと、使用セルをマークトレースして不
使用セルをスイープするマークアンドスイープ・ガーベ
ジコレクションとを行い、インクリメンタル・ガーベジ
コレクションをマークアンドスイープ・ガーベジコレク
ションに優先して行うことを特徴とする請求項2または
請求項3記載のデータ管理方法。
4. The garbage collection includes an incremental garbage collection that collects garbage using a reference counter and a mark-and-sweep garbage collection that marks traces used cells and sweeps unused cells. The data management method according to claim 2, wherein the garbage collection is performed prior to the mark-and-sweep garbage collection.
【請求項5】上記仮想記憶空間を少なくとも2つの小仮
想記憶空間に分割し、 一方の小仮想記憶空間に存在するデータについて上記デ
ータ転送処理および前記演算制御手段からのアクセスを
行い、 該小仮想記憶空間にフリーデータがなくなった場合に、
前記演算制御手段からのアクセスが行われているデータ
および該データと直接的または間接的にリンクされてい
るデータを、分割された他方の小仮想記憶空間に複写
し、 該データが複写された小仮想記憶空間に存在するデータ
について上記データ転送処理および前記演算制御手段か
らのアクセスを行うことを特徴とする請求項1〜4いず
れか記載のデータ管理方法。
5. The virtual storage space is divided into at least two small virtual storage spaces, and the data existing in one of the small virtual storage spaces is accessed by the data transfer processing and the arithmetic control means, and the small virtual storage space is accessed. When there is no free data in the storage space,
The data being accessed from the arithmetic control unit and the data directly or indirectly linked to the data are copied to the other divided small virtual memory space, and the copied small data is copied. 5. The data management method according to claim 1, wherein the data transfer processing and the access from the arithmetic control means are performed with respect to the data existing in the virtual storage space.
【請求項6】データファイル空間において、マークアン
ドスイープ・ガーベジコレクションを行うことを特徴と
する請求項5記載のデータ管理方法。
6. The data management method according to claim 5, wherein mark-and-sweep garbage collection is performed in the data file space.
【請求項7】前記データ転送処理と、前記仮想記憶空間
における複写処理と、前記ガーベジコレクションの処理
とを時分割方式で行うことを特徴とする請求項5または
請求項6記載のデータ管理方法。
7. The data management method according to claim 5, wherein the data transfer process, the copy process in the virtual storage space, and the garbage collection process are performed in a time division manner.
【請求項8】前記仮想記憶空間内に作成されたページの
数を、前記データを処理する頻度に応じて変化させるこ
とを特徴とする請求項1〜7いずれか記載のデータ管理
方法。
8. The data management method according to claim 1, wherein the number of pages created in the virtual storage space is changed according to the frequency of processing the data.
JP15557693A 1993-06-25 1993-06-25 Data management method Expired - Fee Related JP3520527B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15557693A JP3520527B2 (en) 1993-06-25 1993-06-25 Data management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15557693A JP3520527B2 (en) 1993-06-25 1993-06-25 Data management method

Publications (2)

Publication Number Publication Date
JPH0713824A true JPH0713824A (en) 1995-01-17
JP3520527B2 JP3520527B2 (en) 2004-04-19

Family

ID=15609074

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15557693A Expired - Fee Related JP3520527B2 (en) 1993-06-25 1993-06-25 Data management method

Country Status (1)

Country Link
JP (1) JP3520527B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000322315A (en) * 1999-04-23 2000-11-24 Internatl Business Mach Corp <Ibm> Method and device for managing data
JP2009026081A (en) * 2007-07-19 2009-02-05 Hitachi Ltd Memory management method, information processor, and memory management program
JP2013522718A (en) * 2010-03-11 2013-06-13 シマンテック コーポレーション System and method for garbage collection in a deduplication data system
WO2014136172A1 (en) * 2013-03-04 2014-09-12 株式会社東芝 Database device, program, and data processing method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000322315A (en) * 1999-04-23 2000-11-24 Internatl Business Mach Corp <Ibm> Method and device for managing data
JP2009026081A (en) * 2007-07-19 2009-02-05 Hitachi Ltd Memory management method, information processor, and memory management program
JP2013522718A (en) * 2010-03-11 2013-06-13 シマンテック コーポレーション System and method for garbage collection in a deduplication data system
WO2014136172A1 (en) * 2013-03-04 2014-09-12 株式会社東芝 Database device, program, and data processing method
JP5719083B2 (en) * 2013-03-04 2015-05-13 株式会社東芝 Database apparatus, program, and data processing method
JPWO2014136172A1 (en) * 2013-03-04 2017-02-09 株式会社東芝 Database apparatus, program, and data processing method
US10969970B2 (en) 2013-03-04 2021-04-06 Kabushiki Kaisha Toshiba Storage optimization of database in volatile and non-volatile storing unit

Also Published As

Publication number Publication date
JP3520527B2 (en) 2004-04-19

Similar Documents

Publication Publication Date Title
US5218695A (en) File server system having high-speed write execution
JP2858795B2 (en) Real memory allocation method
JP3520527B2 (en) Data management method
US6067607A (en) Data control system for a computer&#39;s main memory for efficiently realizing virtualization of list structure data lying across a real memory space and a virtual memory space
CN111125070A (en) Data exchange method and platform
Adam A new dynamic voting algorithm for distributed database systems
US7130857B2 (en) Method for accessing a memory unit in which sequences of notes are stored, corresponding memory unit and corresponding program
JPH04364549A (en) File storing system and access system
JPH0324644A (en) Automatic expansion system for file in multivolume
JPH04281539A (en) Data management system
JPH11232162A (en) Garbage collection method
JPH0237444A (en) List processing device
Lins Efficient cyclic weighted reference counting
JPH04124749A (en) Page-out subject page selection system
JPH03189747A (en) Memory control processing system
JPH02115958A (en) Data transfer control system
JPS6382532A (en) Converting system from logical address to real address
JPH08106415A (en) Garbage collector device
JPH07134673A (en) Memory managing method
JPH076045A (en) Memory managing method of multi-processing system
JPS62241047A (en) Shared control method for input/output buffer by data base control system
JPS58175188A (en) Memory managing system
JPS62224845A (en) Virtual storage system
JPS63142416A (en) Input/output control system
Khosla et al. Scheduling of jobs in a hypercube processing system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040113

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040126

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

Free format text: PAYMENT UNTIL: 20080213

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090213

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100213

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees