JPH01200451A - Internal data control method - Google Patents

Internal data control method

Info

Publication number
JPH01200451A
JPH01200451A JP63025356A JP2535688A JPH01200451A JP H01200451 A JPH01200451 A JP H01200451A JP 63025356 A JP63025356 A JP 63025356A JP 2535688 A JP2535688 A JP 2535688A JP H01200451 A JPH01200451 A JP H01200451A
Authority
JP
Japan
Prior art keywords
cluster
page
internal
external memory
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP63025356A
Other languages
Japanese (ja)
Inventor
Maki Seki
関 真樹
Takashi Takegahara
竹ケ原 隆史
Kazuhiko Morizaki
和彦 森嵜
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.)
Fanuc Corp
Original Assignee
Fanuc 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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP63025356A priority Critical patent/JPH01200451A/en
Publication of JPH01200451A publication Critical patent/JPH01200451A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To set the inhibition/release of send-out for each class by providing a protection flag that can be turned on and off at the application side. CONSTITUTION:At the application side, when a file to which the inhibition is desired for its send-out is designated at the inlet part of a certain process, the relevant information is stored into a file control table for the corresponding file via a file control module. Hereafter, when an access is given to the cluster of a page Pi belonging to said file, and therefore a protection flag Fp contained in the page map control information PCi to which said cluster corresponds is turned ON and the inhibition of send-out is set. While the send-out is permitted by turning off the flags Fp of all clusters belonging to the relevant file in an outlet process after the primary process is through.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 本発明は仮想記憶方式によるメモリ管理が可能なシステ
ムたとえば自動プログラミング装置における内部データ
管理方法に関する。
DETAILED DESCRIPTION OF THE INVENTION <Field of Industrial Application> The present invention relates to an internal data management method in a system capable of memory management using a virtual memory method, such as an automatic programming device.

〈従来技術〉 NCプログラムを自動作成する自動プログラミング装置
のアプリケーションプログラム(単にアプリケーション
という)においては、内部メモリ(実メモリ)の容量を
越えるような大量データを扱う必要がある。このため、
ランダムアクセス可能な外部メモリ (例えばハードデ
ィスク)を有する自動プログラミング装置において;よ
、仮想記憶方式により該外部メモリの一部領域を内部メ
モリの延長(仮想メモリ領域)として使用し、内部メモ
リ上のデータを一時的に該仮想メモリ領域に追い出した
り、仮想メモリ領域上のデータを必要に応じて内部メモ
リ上に回復することが行われている。
<Prior Art> In an application program (simply referred to as an application) of an automatic programming device that automatically creates an NC program, it is necessary to handle a large amount of data that exceeds the capacity of an internal memory (real memory). For this reason,
In an automatic programming device that has a randomly accessible external memory (for example, a hard disk); a virtual memory method uses a part of the external memory as an extension of the internal memory (virtual memory area) to store data on the internal memory. Data is temporarily ejected to the virtual memory area, and data on the virtual memory area is restored onto the internal memory as necessary.

そして、内部メモリと外部メモリとの間ではファイル単
位でデータの追い出しや回復が行われる。
Then, data is purged and recovered in file units between the internal memory and external memory.

たとえば、内部メモリ中のファイルにデータを追加して
いる時に空き領域がなくなった場合、以下の手順により
ファイルの追い出しが行われる。すなわち、 (i)、先頭ファイルから順にクローズ中のファイルを
追い出し、1フアイルを追い出す毎にサイズがOKかチ
エツクする。このとき、自分自身のファイルは除く。
For example, if you run out of free space while adding data to a file in internal memory, the file will be removed using the following procedure. That is, (i) Closed files are ejected in order from the first file, and each time a file is evicted, it is checked whether the size is OK. At this time, your own files are excluded.

(iil−以上で十分のサイズが取れなければ、先頭フ
ァイルから順にオープン中のファイルを追い出し、1フ
ァイル追い出す毎にサイズOKかチエツクする。このと
き、自分自身のファイルは除く。
(If a sufficient size cannot be obtained with iil- or more, open files are evicted in order from the first file, and each time a file is evicted, it is checked whether the size is OK. At this time, the own file is excluded.

(2)、(i)及び(ii)でもサイズが取れなければ
自分自身のファイルを追い出す。そして、 Gψ、(i)〜圃でもサイズが取れなければオーバフロ
ーのエラーとする。
(2), (i) and (ii) if the file size is not large enough, the file itself is ejected. If the size is not obtained even in Gψ, (i) ~ field, it is assumed to be an overflow error.

しかし、ファイル単位で追い出す従来方法で(:、ファ
イルを追い出す順番がもともと定義されている順番に従
うので追い出し実行時に優先度を指定できず、しかも、
ファイル単位の追い出ししかできないので、よく使われ
るデータも追い出されてしまうことが多くなり、外部メ
モリアクセスが増大し、処理効率を低下させる。又、同
時に複数のファイルを使用する場合でも、ある瞬間に注
目すると実際に必要なデータはファイル中の僅かなデー
タのみであり、−度使用されたデータは近いうちに再び
使用される可能性が高いが、従来の方法ではファイルの
一部分を内部メモリに残しておくことができず、結果的
に外部メモリアクセスが増大する。
However, with the conventional method of evicting files (:, the order in which files are evicted follows the originally defined order, it is not possible to specify the priority when executing the evicting, and
Since it is only possible to evict files in units of files, frequently used data is often also evicted, which increases external memory access and reduces processing efficiency. Also, even when using multiple files at the same time, if you pay attention to a particular moment, only a small amount of data in the file is actually needed, and the data that has been used once is likely to be used again in the near future. Although expensive, traditional methods do not allow portions of files to remain in internal memory, resulting in increased external memory access.

このため、本願出願人はクラスタという概念を導入し、
ファイル単位でなくクラスタ単位でデータの追い出し、
回復を行わせろと共に、内部メモリ上の各クラスタを管
理する情報内に、外部メモリへの各クラスタの追い出さ
れにくさを表わすマツピング優先度と、マツピング優先
度毎にクラスタの外部メモリへの追い出されにくさを示
す行列を持たせ、内部メモリ上−に空きクラスタが無い
ときは、マツピンク−優先度の低い行列の先頭クラスタ
から順番に外部メモリに追い出す内部データ管理方法を
提案している。
For this reason, the applicant introduced the concept of cluster,
Evicting data in cluster units instead of file units,
In addition to performing recovery, the information that manages each cluster on internal memory includes a mapping priority that indicates how difficult each cluster is to be evicted to external memory, and a mapping priority that indicates the difficulty of evicting clusters to external memory for each mapping priority. We have proposed an internal data management method in which a matrix is provided to indicate the difficulty of processing data, and when there are no free clusters in the internal memory, the first clusters in the pine pink matrix are flushed out to the external memory in order from the lowest priority cluster.

〈発明が解決しようとしている課題〉 ところで、アプリケーションによっては、「あるファイ
ルは非常に高速なアクセスを目的としているので、絶対
に追い出されたくない」という場合がある。しかし、提
案されているマツピング優先度だけでは単に追い出され
にくさを表現できるだけで、追い出されないという保証
にはならず、追い出される可能性がある。
<Problems to be Solved by the Invention> By the way, depending on the application, there are cases where ``a certain file is intended for very high-speed access, so it is never wanted to be evicted.'' However, the proposed mapping priority can only express the difficulty of being kicked out, but it does not guarantee that it will not be kicked out, and there is a possibility that it will be kicked out.

又、内部メモリと外部メモリ間でのデータの追い出し/
回復を制御する内部処理側では、「2つのクラスタを交
互にアクセスしたい」という場合があるが、あるクラス
タを内部メモリ上に読み込んだ後で、他のクラスタも同
様に内部メモリに読み込んだとすると、最初のクラスタ
が追い出されてしまう可能性がある。その為、毎回それ
らのチエツクとクラスタ番号−物理アドレスの変換をす
る必要があり、処理のオーバヘッドが大きい。
Also, data removal between internal memory and external memory/
On the internal processing side that controls recovery, there are cases where you want to access two clusters alternately, but if you read one cluster into internal memory and then read another cluster into internal memory in the same way, the first clusters may be evicted. Therefore, it is necessary to check these and convert the cluster number and physical address every time, resulting in a large processing overhead.

以上から、本発明の目的はマツピング優先度の低い行列
の先頭から追い出すようにすると共に、アプリケーショ
ン側及び内部処理側でクラスタ毎に追い出しの禁止/解
除を設定できるようにし、禁止クラスタは追い出されな
いようにした内部デ−夕管理方法を提供することである
From the above, the purpose of the present invention is to enable mapping to be evicted from the head of a matrix with a low mapping priority, and also to allow the application side and internal processing side to set prohibition/cancellation of evicting for each cluster, so that prohibited clusters are not evicted. An object of the present invention is to provide an internal data management method as described above.

く課題を解決するための手段〉 第1図は本発明にかかる内部データ管理方法の説明図で
ある。
Means for Solving the Problems> FIG. 1 is an explanatory diagram of an internal data management method according to the present invention.

ETMは外部メモリ、INMは内部メモリ、PGAは内
部メモリ内のページ領域、VCTは管理情報領域、VM
Aは仮想メモリ領域、p、(o=。
ETM is external memory, INM is internal memory, PGA is page area in internal memory, VCT is management information area, VM
A is the virtual memory area, p, (o=.

〜M)はページ、pc、はぺ〜シマツブ管理情報、Fp
はプロテクトフラグ、Fuはワーキングフラグ。
~M) is a page, PC, Happy Shimatsubu management information, Fp
is a protect flag, and Fu is a working flag.

MPRはマツピング優先度である。MPR is mapping priority.

く作用〉 固定長のクラスタ単位で内部メモリINMと外部メモリ
ETMとの間でデータの入出力を行うと共に、ページ領
域PGAの各ページP1(ページ長=クラスタ長)を管
理す゛るd−シマツブ管理情報pc、を用意し、該管理
情報p、cに (1)ページP6についてマツピングされたクラスタの
外部メモ!J ETMへの追い出されにくさを表わす0
〜15のマツピング優先度MPRと、(1))マツピン
グ優先度の鎖鋸にクラスタの外部メモリETMへの追い
出されにくさを示すポインタNXPと、 (2)各クラスタ毎に追い出し対象とする/しないを示
すプロテクトフラグFpとワーキングフラグF、を持た
せ、ページ領域PGAに空きページが無いときは、マツ
ピング優先度の低い行列の、先頭ページから順番にプロ
テクトフラグFpとワーキングフラグF1.lが共にオ
フのクラスタを求め、該クラスタを外部メモリ(ETM
)に追い出す。
Function> d-shimatsubu management information that inputs and outputs data between the internal memory INM and external memory ETM in fixed-length cluster units, and manages each page P1 (page length = cluster length) of the page area PGA. pc, and in the management information p and c (1) External memo of the cluster mapped for page P6! 0 represents the difficulty of being kicked out by J ETM
A mapping priority MPR of ~15, (1) a pointer NXP that indicates how difficult it is for a cluster to be evicted to the external memory ETM by a mapping priority chain saw, and (2) whether or not each cluster is to be evicted. When there is no free page in the page area PGA, the protect flag Fp and working flag F1 . Clusters where both l are off are found, and the clusters are stored in external memory (ETM
) to drive out.

〈実施例〉 第1図は本発明にかかる内部データ管理方法の説明図で
ある。
<Embodiment> FIG. 1 is an explanatory diagram of an internal data management method according to the present invention.

ETMはハードディスクあるいはフロッピーディスク等
の外部メモリであり、その一部領域が仮想メモリ領域V
MAとなっている。仮想メモリ領域VMAはクラスタ単
位に内部メモリINMとデータの授受が可能であり、ク
ラスタ長の複数の記憶域C0〜CN(クラスタ領域O〜
クラスタ領域N)を有している。
ETM is an external memory such as a hard disk or floppy disk, and a part of it is the virtual memory area V.
It is MA. The virtual memory area VMA can exchange data with the internal memory INM in cluster units, and has multiple storage areas C0 to CN (cluster areas O to CN) of the cluster length.
It has a cluster area N).

INMばシステム本体内部に設けられた実メモリ (内
部メモリ)であり、PGAはページ領域、VCTは管理
情報領域である。ページ領域PGAば多数のページP0
〜p+、(ページ0〜ページM)から成っており、各ペ
ージにクラスタ単位のデータが記憶されるようになって
いる。尚、ページ長=クラスタ長になっている。
INM is a real memory (internal memory) provided inside the system body, PGA is a page area, and VCT is a management information area. If the page area PGA is a large number of pages P0
~p+, (page 0 to page M), and each page stores data in units of clusters. Note that the page length=cluster length.

管理情報領域VCTには、 (i)ページ領域PGAの各ページP1〜P、、の空き
状態を示すピットマツプFATと、 (1))仮想メモリ領域VMAのクラスタ単位の記憶域
(クラスタ領域)C0〜CNの空き状態を示すビットマ
ツプCATと、 (jilベージ領域PGAの各ページP0〜P□に対応
させて管理情報PC,(i=0〜M)を有するページマ
ツプPMAPと、 Gvl仮想メモリ領域VMAの各クラスタ領域C8〜、
CNに対応させて管理情報CC,〜CCNを有するクラ
スタマツプCMAPと、 M各ページにおけるクラスタの追い出されにくさを表わ
すマツピング優先度(0〜15)を設定する時、マツピ
ング優先度の各値(0〜15)毎にクラスタの追い出さ
れにくさを示す行列が形成されるが、各行列の先頭ペー
ジポインタPHDK(k=1〜15)と末尾のページポ
インタPTLKを示すマツピング優先度キューMPQが
設けられている。
The management information area VCT includes (i) a pit map FAT indicating the free status of each page P1 to P of the page area PGA, and (1)) storage area in cluster units (cluster area) C0 to C0 of the virtual memory area VMA. A bit map CAT indicating the free status of CN, a page map PMAP having management information PC, (i=0 to M) corresponding to each page P0 to P□ of the jil page area PGA, and a page map PMAP of the Gvl virtual memory area VMA. Each cluster area C8~,
When setting a cluster map CMAP having management information CC, ~CCN corresponding to CN, and a mapping priority (0 to 15) representing the difficulty of expelling clusters in each M page, each value of the mapping priority ( A matrix indicating the difficulty of eviction of a cluster is formed for each matrix (0 to 15), and a mapping priority queue MPQ is provided to indicate the first page pointer PHDK (k = 1 to 15) and the last page pointer PTLK of each matrix. It is being

ページマツプPMAPの各ページP、(i=o〜M)に
対応して設けられた管理情報PC1には、(a)ページ
P、におけるクラスタの追い出しを禁止するためのフラ
グであって、アプリケーション側でオン/オフできるプ
ロテクトフラグFpと、(bllベージ、におけるクラ
スタの追い出しを禁止するためのフラグであって、内部
処理側でオン/オフできるワーキングフラグF、と、 (ClページP1におけるり゛ラスタの追い出されにく
さを示すマツピング優先度MPRと、 (d1ベージP、におけるクラスタを仮想メモリ領域V
MAに追い出す時、どのクラスタ領域に追い出すかを指
示するクラスタ番号CLNと、telページP1と同一
のマツピング優先度を有する行列において、該ページP
1に接続される次のページを示す順方向リンクNXPと
、 (fllベージ、と同一のマツピング優先度を有する行
列において、該ページP1が接続する前のページを示す
逆方向リンクPRPとが含まれている。
The management information PC1 provided corresponding to each page P, (i=o to M) of the page map PMAP includes (a) a flag for prohibiting the expulsion of clusters on page P; A protection flag Fp that can be turned on/off on the Mapping priority MPR indicating the difficulty of eviction of clusters in (d1 page P), and virtual memory area V
When the page is evicted to the MA, in the matrix that has the cluster number CLN that instructs which cluster area to eject and the same mapping priority as the tel page P1, the page P
a forward link NXP indicating the next page to be connected to page P1, and a reverse link PRP indicating the previous page to which this page P1 is connected in the matrix having the same mapping priority as (fll page). ing.

又、クラスタマツプCMAPの、各クラスタ領域C4に
対応して設けられた管理情報CCJには、該クラスタ領
域C4に記憶されているクラスタ単位のデータをページ
領域PGAのどのページに回復させるかを指示するペー
ジ番号PGNが含まれている。
In addition, the management information CCJ provided corresponding to each cluster area C4 in the cluster map CMAP includes an instruction to which page in the page area PGA the data in units of clusters stored in the cluster area C4 is to be recovered. The page number PGN is included.

尚、各管理情報CC1におけるページ番号PGNは、ク
ラスタが回復されるページP、に対応して設けられたペ
ージマツプ管理情報PC1の位置を示す。
Note that the page number PGN in each management information CC1 indicates the position of the page map management information PC1 provided corresponding to the page P whose cluster is to be recovered.

同様に、マツピング優先−度キューMPQにおける先頭
ページポインタPHDK(K=1〜15)、末尾ページ
ポインタPTLKは共に、優先度にの行列の先頭ページ
及び末尾ページに対応するページマツプ管理情報の位置
を示し、更に各ページマツプ管理情報PC,におげろ順
方向リンクポインタNXPと逆方向リンクポインタPR
Pも行列の前後ページのページマツプ管理情報の位置を
示す。
Similarly, the first page pointer PHDK (K=1 to 15) and the last page pointer PTLK in the mapping priority queue MPQ both indicate the positions of page map management information corresponding to the first page and the last page of the priority matrix. In addition, each page map management information PC, forward link pointer NXP and reverse link pointer PR are shown.
P also indicates the position of the page map management information of the previous and next pages of the matrix.

従って、第2図に示すようにマツピング優先度キューM
PQにおけるマツピング優先度にの先頭ページポインタ
PHD−よ、優先度にの行列の先頭ページPPに対応す
るページマツプ管理情報PC0を指示し、ページマツプ
管理情報PCpの順方向リンクポインタNXPは優先度
にの行列の次のページマツプ管理情報PC,を指示し、
ページマツプ管理情報PC0の順方向リンクポインタN
XPは優先度にの行列の次のページマツプ管理情報PC
1を指示する。
Therefore, as shown in FIG.
The first page pointer PHD- of the mapping priority in PQ indicates the page map management information PC0 corresponding to the first page PP of the priority matrix, and the forward link pointer NXP of the page map management information PCp is assigned to the priority. Instructs the next page map management information PC in the matrix,
Forward link pointer N of page map management information PC0
XP is the next page map management information PC in the priority matrix
Instruct 1.

又、MPQにおけるマツピング優先度にの末尾ページポ
インタPTL、は、優先度にの行列の末尾ページP、に
対応するベニシマツブ管理情報PC1を指示し、ページ
マツプ管理情報PC,の逆方向リンクポインタPRPは
優先度にの行列における1つ前のページマツプ管理情報
PC,を指示し、ページマツプ管理情報PC,の逆方向
リンクポインタPRPは同様に優先度kにおける行列の
1つ前のページマツプ管理情報PC,を指示する。
Further, the last page pointer PTL of the mapping priority in MPQ indicates the red map management information PC1 corresponding to the last page P of the priority matrix, and the reverse link pointer PRP of the page map management information PC is Similarly, the reverse link pointer PRP of the page map management information PC, points to the previous page map management information PC in the matrix with priority k. , instructs.

各ページP、のマツピング優先度の値(0〜15)はク
ラスタ毎にアプリケーションプログラムから指定され、
空き領域がなくなった場合にどのページからクラスタ単
位でデータを追い出すか決定するために用いられる。又
、使用中のページP、は、ページマツプ管理情報PC,
内の順方向リンクポインタNXPと逆方向リンクポイン
タPRPにより必ずどれかのマツピング優先度行列にリ
ンクされる。
The mapping priority value (0 to 15) of each page P is specified by the application program for each cluster,
It is used to determine from which page data is to be evicted in clusters when free space is exhausted. Also, the page P in use is the page map management information PC,
It is always linked to some mapping priority matrix by the forward link pointer NXP and reverse link pointer PRP within.

尚、同一行列内では先頭ページから追い出されるものと
し、空きページがなくなった時には、優先度が最も低い
行列の先頭ページポインタP HDKが示す先頭ページ
のプロテクトフラグFPとワーキングフラグF、が共に
オヅしているかチエツクし、オフであれば該先頭ページ
をその行列から削除して、該先頭ページのクラスタを仮
想メモリ領域VNAに追い出す。しかし、いずれかのフ
ラグがオンしていれば該先頭ページのクラスタを追い出
さず、次のページについてプロテクトフラグFPとワー
キングフラグF1.lのオン/オフをチエツクし、以下
同様に両フラグがオフしているページがみつかる迄次々
とリンクをたどって行き、行列の最後に到達したら次に
優先度が低い行列について先頭ページから両フラグがオ
フのページを求め、該ページのクラスタを追い出す。
Note that the first page in the same matrix is evicted, and when there are no more free pages, both the protect flag FP and working flag F of the first page indicated by the first page pointer P HDK of the lowest priority matrix are cleared. If it is off, the first page is deleted from the matrix and the cluster of the first page is ejected to the virtual memory area VNA. However, if any flag is on, the cluster on the first page is not evicted, and the protect flag FP and working flag F1 . Check whether l is on or off, and follow the same steps one after another until you find a page with both flags turned off. When you reach the end of the queue, set both flags from the first page for the next lowest priority matrix. Find the page where is off and kick out the cluster of that page.

一方、アプリケージ9ンにより所定のページにおけるク
ラスタのマツピング優先度が指定されろと該ページを指
定されたマツピング優先度の行列の末尾にリンクさせろ
。又、所定ページのクラスタがアクセスされると、ある
いはマツピング優先度の変更が指示されろと該ページの
リンクを対応する行列から削除すると共に、所定の行列
(アクセスされた場合には同一の行列)の末尾にリンク
させる。従って、行列内−では、昔アクセスしたページ
はど行列の前方にリンクされ、最近アクセスしたページ
はど行列の後方にリンクされる。
On the other hand, if the mapping priority of the cluster in a predetermined page is specified by the application page 9, the page is linked to the end of the matrix of the specified mapping priority. Also, when a cluster of a predetermined page is accessed, or when a change in mapping priority is instructed, the link of the page is deleted from the corresponding matrix, and the link of the page is deleted from the corresponding matrix, and the link of the page is deleted from the corresponding matrix (if accessed, the same matrix). Link to the end of. Therefore, within a matrix, previously accessed pages are linked to the front of the matrix, and recently accessed pages are linked to the back of the matrix.

次に、フラグの設定、追い出しにおける動作の概略を説
明する。
Next, an outline of operations for flag setting and expulsion will be explained.

アプリケーション側は、ある処理の入り口部分で追い出
しを禁止したいファイルを指定すると、その情報がファ
イル管理モジュールにより対応ファイルのファイル管理
テーブル(図示せず)に保存される。そして、以後その
ファイルに属するページP、のクラスタをアクセスする
と、そのクラスタ (ページ)が対応するページマツプ
管理情報PC1内のプロテクトフラグFpがオンされて
追い出し禁止が設定される。
When the application side specifies a file to be prohibited from being evicted at the entry point of a certain process, the file management module stores that information in a file management table (not shown) for the corresponding file. Thereafter, when a cluster of pages P belonging to that file is accessed, the protect flag Fp in the page map management information PC1 corresponding to that cluster (page) is turned on and eviction is prohibited.

一方、処理終了後の出口処理でそのファイルに属する全
てのクラスタのプロテクトフラグをオフすることにより
追い出しを可能とする。
On the other hand, eviction is made possible by turning off the protect flags of all clusters belonging to the file in the exit process after the process is completed.

bワーキングフラグの 内部処理側は、ある処理の途中で追い出しを禁止したい
クラスタを内部へメモリに読み込んだ後、該クラスタ 
(ページ)に対応するページマツプ管理情報内のワーキ
ングフラグF1.lをオンする。これにより、そのクラ
スタは常に内部メモリ上に存在することになるので、ク
ラスタ番号でなく物理アドレスを使用しても良くなる。
b The internal processing side of the working flag loads the cluster that you want to prohibit eviction into internal memory during a certain process, and then
Working flag F1 in the page map management information corresponding to (page). Turn on l. As a result, the cluster always exists on the internal memory, so it is possible to use the physical address instead of the cluster number.

そして、処理終了後は、そのクラスタのワーキングフラ
グF、をオフすることにより、追い出し可能状態にする
。ただし、プロテクトフラグFpがオンのものもあるが
、この場合には未だ追い出し禁止状態である。
After the processing is completed, the working flag F of the cluster is turned off to enable eviction. However, there are cases where the protect flag Fp is on, but in this case, the ejection is still prohibited.

師)追い出し 第3図は追い出し処理の流れ図である。teacher) kicked out FIG. 3 is a flowchart of the eviction process.

ページ領域PGAに空きページが無くなった時には、マ
ツピング優先度mの最も低い行列(m=0)の先頭ペー
ジ(先頭ページがなければ次に低い行列(m=1)の先
頭ページ、以下同様)に注目する(ステップ101)。
When there are no free pages in the page area PGA, the first page of the matrix with the lowest mapping priority m (m=0) (if there is no first page, the first page of the next lowest matrix (m=1), and so on) pay attention (step 101).

しかる後、注目ページに対応するページマツプ管理情報
内のプロテクトフラグFpがオンかチエツクする(ステ
ップ102)。
Thereafter, it is checked whether the protect flag Fp in the page map management information corresponding to the page of interest is on (step 102).

プロテクトフラグFPがオフしていれば、次にワーキン
グフラグF、がオンしているかチエツクしくステップ1
03)、オフしていれば該注目ページのクラスタは追い
出し可能であるから、ページマツプ管理情報内のクラス
タ番号CLNが指示する仮想メモリ領域VMAの所定ク
ラスタ領域に追い出す(ステップ104)。
If the protect flag FP is off, then check if the working flag F is on.Step 1
03) If it is off, the cluster of the page of interest can be evicted, so it is evicted to a predetermined cluster area of the virtual memory area VMA indicated by the cluster number CLN in the page map management information (step 104).

一方、プロテクトフラグFpあるいはワーキングフラグ
F、の一方がオンしていれば、注目ページのクラスタは
追い出し禁止であるから、該ページが行列の最後かチエ
ツクしくステップ105)、最後でなければ次の追い出
し順位のページを求め(ステップ106)、以後ステッ
プ102以降の処理を繰り返す。
On the other hand, if either the protect flag Fp or the working flag F is on, the cluster of the page of interest is prohibited from being evicted, so check whether the page is the last in the matrix (step 105), and if it is not the last, the next evicted The ranking page is determined (step 106), and the processes from step 102 onwards are repeated.

ステップ105において、注目ページが行列最後のペー
ジであれば、該行列は最も優先度が高い行列(最後の行
列)かチエツクしくステップ107)、最後の行列であ
ればエラーとして処理を終了し、最後でなければ次の行
列の先頭ページに注目しくステップ108)、以後ステ
ップ102以降の処理を繰り返す。
In step 105, if the page of interest is the last page in the matrix, it is checked whether the matrix has the highest priority (the last matrix) (step 107); if it is the last page, the process is terminated as an error, and the If not, focus on the first page of the next matrix (step 108), and repeat the processes from step 102 onwards.

以上の本発明にかかる内部データ管理方法は、具体的に
は、たとえば以下の態様で使用される。
Specifically, the internal data management method according to the present invention described above is used, for example, in the following manner.

態様A 2つのアプリケーション1.2が交互に実行され、アプ
リケーションlではファイル1を、アプリケーション2
ではファイル2を頻繁にアクセスするとした時、 (ilアプリケーション1の入り口処理でファイル1の
プロテクトフラグをオンにし、出口処理でオフする、 (1))アプリケーション2の入り口処理でファイル2
のプロテクトフラグをオンにし、出口処理でオフする。
Aspect A: Two applications 1.2 are executed alternately, application 1 executes file 1 and application 2 executes file 1.
Now, suppose that file 2 is frequently accessed. (1) The protect flag for file 1 is turned on in the entrance processing of application 1 and turned off in the exit processing.
The protect flag is turned on and turned off in exit processing.

これによって、一方のアプリケーションが動いている時
は、それが使用するファイルを常にメモリに置くことが
でき、各種処理の高速化が図れる。
As a result, when one application is running, the files it uses can always be stored in memory, speeding up various processes.

態様B あるアプリケーションの内部で巨大なファイルの一部分
を頻繁にサーチするとした時、ファイルそのものは巨大
なので他のファイルへの影響も考えてマツピング優先度
は低くしておき、一連のサーチの最初でプロテクトフラ
グをオンにし、最後でオフする。これによって、−度サ
ーチされたクラスタは内部メモリに残るため、全体とし
て外部メモリのアクセスが減少する。
Aspect B: When a part of a huge file is frequently searched within an application, the file itself is huge, so the mapping priority is set low in consideration of the impact on other files, and protection is performed at the beginning of a series of searches. Turn on the flag and turn it off at the end. As a result, clusters that have been searched twice remain in the internal memory, thereby reducing external memory accesses as a whole.

態様C アプリケーションが新規レコードを作成する時、内部処
理ではレコード管理情報RCT用の領域を確保して物理
アドレスを求めた後、そのクラスタのワーキングフラグ
をオンにする。その後、実データ用領域を確保してデー
タを書き込み、書き込み後レコード管理領域に情報を設
定する時、そのクラスタが内部メモリ上にあることが保
証されているので、物理アドレスを求め直す必要がなく
高速に情報を設定できる。
Aspect C When an application creates a new record, internal processing secures an area for record management information RCT, obtains a physical address, and then turns on the working flag of the cluster. After that, when you secure an area for actual data, write data, and set information in the record management area after writing, the cluster is guaranteed to be in the internal memory, so there is no need to recalculate the physical address. Information can be set quickly.

尚、アプリケーションからレコードIDとルコード分の
実データより成る内部データが入力されると (新規レ
コードの作成)、内部データ管理用のモジュールは該内
部シータを可変長の実データと固定長のレコード管理情
報RCTに分け、レコード管理情報RCTに実データの
(1)レコードIDと、 (iilその長さと、−実デ
ータを記憶するページのクラスタ (クラスタ番号)と
、60クラスタにおける実データの位置情報を持たせ、
実データとレコード管理情報を別々のページ(クラスタ
)に記憶する。
When internal data consisting of a record ID and real data for a record code is input from an application (creating a new record), the internal data management module converts the internal theta into variable-length actual data and fixed-length record management. The record management information RCT contains (1) the record ID of the actual data, its length, - the cluster (cluster number) of the page that stores the actual data, and the position information of the actual data in the 60 clusters. Let me have it,
Store actual data and record management information in separate pages (clusters).

〈発明の効果〉 以上本発明によれば、マツピング優先度とアクセス順の
行列のほかに、プロテクトフラグとワーキングフラグを
設けたから、追い出されにくさだけでなく、絶対に追い
出されない状態を設定できる。これにより、アプリケー
ション側では一時的、あ・るいは恒久的に頻繁にアクセ
スされるファイルのプロテクトフラグをオンすることで
外部メモリのアクセスをなくし、内部処理側では再使用
することがわかっているクラスタのワーキングフラグを
オンにし、その物理アドレスを記憶して利用することで
処理を高速化することができる。
<Effects of the Invention> According to the present invention, in addition to the mapping priority and access order matrix, a protect flag and a working flag are provided, so it is possible to set not only the difficulty of being evicted, but also the state in which the data will never be evicted. . As a result, the application side turns on the protect flag for files that are frequently accessed temporarily, or permanently, eliminating access to external memory, while the internal processing side uses clusters that are known to be reused. Processing can be sped up by turning on the working flag of the computer and storing and using its physical address.

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

第1図は本発明にかかる内部データ管理方法の説明図、 第2図はマツピング優先度にの行列説明図、第3図は本
発明にかかる追い出し処理の流れ図である。 ETM・・外部メモリ、 INM・・内部メモリ、 P;・・ページ、 VMA・・仮想メモリ領域、 MPQ・・マツピング優先度キュー、 PCl・・ページマツプ管理情報、 Fp・・プロテクトフラグ、 F、・・ワーキングフラグ 特許出願人        ファナック株式会社代理人
          弁理士  齋藤千幹第2図 \、           / −〜−一一一一一
FIG. 1 is an explanatory diagram of an internal data management method according to the present invention, FIG. 2 is an explanatory diagram of a mapping priority matrix, and FIG. 3 is a flowchart of an expulsion process according to the present invention. ETM...external memory, INM...internal memory, P;...page, VMA...virtual memory area, MPQ...mapping priority queue, PCl...page map management information, Fp...protect flag, F...・Working Flag Patent Applicant Fanuc Co., Ltd. Agent Patent Attorney Chiki Saito Figure 2\, / -~-11111

Claims (4)

【特許請求の範囲】[Claims] (1)ランダムアクセス可能な外部メモリを有し、該外
部メモリを内部メモリの拡張として使用するシステムに
おける内部データ管理方法において、固定長のクラスタ
単位で内部メモリと外部メモリとの間でデータの入出力
を行うと共に、内部メモリ上の各クラスタを管理する情
報内に、外部メモリへの各クラスタの追い出されにくさ
を表わすマッピング優先度と、マッピング優先度毎にク
ラスタの外部メモリへの追い出されにくさを示す行列と
、各クラスタ毎に追い出し対象とする/しないを示すフ
ラグを持たせ、 内部メモリ上に空きクラスタが無いときは、マッピング
優先度の低い行列の、先頭クラスタから順番にフラグが
オフのクラスタを求め、該クラスタを外部メモリに追い
出すことを特徴とする内部データ管理方法。
(1) In an internal data management method in a system that has a randomly accessible external memory and uses the external memory as an extension of the internal memory, data is input between the internal memory and the external memory in fixed-length cluster units. In addition to outputting data, the information that manages each cluster on the internal memory includes a mapping priority that represents the difficulty of each cluster being evicted to external memory, and a mapping priority that represents the difficulty of evicting each cluster to external memory for each mapping priority. Each cluster has a matrix indicating its density and a flag indicating whether it is to be evicted or not, and if there are no free clusters in the internal memory, the flags are turned off in order from the first cluster in the matrix with the lowest mapping priority. 1. An internal data management method characterized by determining clusters of and expelling the clusters to an external memory.
(2)アプリケーション側でオン/オフできるフラグと
、内部処理側でオン/オフできるフラグの2種類を設け
、両フラグがオフのクラスタを外部メモリへ追い出すこ
とを特徴とする特許請求の範囲第1項記載の内部データ
管理方法。
(2) There are two types of flags: a flag that can be turned on/off on the application side and a flag that can be turned on/off on the internal processing side, and clusters with both flags turned off are expelled to external memory. Internal data management method described in section.
(3)内部メモリ上の各クラスタに対応させて管理情報
を用意し、各管理情報に対応するクラスタのマッピング
優先度と、該優先度の行列を形成するためのリンクデー
タと、前記2つのフラグを含ませることを特徴とする特
許請求の範囲第2項記載の内部データ管理方法。
(3) Prepare management information corresponding to each cluster on the internal memory, and provide the mapping priority of the cluster corresponding to each management information, link data for forming a matrix of the priority, and the above two flags. An internal data management method according to claim 2, characterized in that the internal data management method includes:
(4)前記管理情報にクラスタを外部メモリのどこに追
い出すかを示すデータを含ませ、該データを参照して外
部メモリにクラスタを追い出すことを特徴とする特許請
求の範囲第3項記載の内部データ管理方法。
(4) Internal data according to claim 3, characterized in that the management information includes data indicating where in the external memory the cluster is to be ejected, and the data is referred to to eject the cluster to the external memory. Management method.
JP63025356A 1988-02-05 1988-02-05 Internal data control method Pending JPH01200451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63025356A JPH01200451A (en) 1988-02-05 1988-02-05 Internal data control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63025356A JPH01200451A (en) 1988-02-05 1988-02-05 Internal data control method

Publications (1)

Publication Number Publication Date
JPH01200451A true JPH01200451A (en) 1989-08-11

Family

ID=12163567

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63025356A Pending JPH01200451A (en) 1988-02-05 1988-02-05 Internal data control method

Country Status (1)

Country Link
JP (1) JPH01200451A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200407A (en) * 1993-12-29 1995-08-04 Nec Corp Virtual storage system
JP2008251036A (en) * 1997-09-24 2008-10-16 Microsoft Corp Application programming interface for controlling assignment of physical memory in virtual storage system by application program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200407A (en) * 1993-12-29 1995-08-04 Nec Corp Virtual storage system
JP2008251036A (en) * 1997-09-24 2008-10-16 Microsoft Corp Application programming interface for controlling assignment of physical memory in virtual storage system by application program

Similar Documents

Publication Publication Date Title
US6397311B1 (en) System and method for defragmenting a file system
KR940005775B1 (en) Method of opening disk file
US6581142B1 (en) Computer program product and method for partial paging and eviction of microprocessor instructions in an embedded computer
EP0221358B1 (en) Sort string generation in a staged storage system
JPH06348595A (en) Cache device
CN106445405A (en) Flash storage-oriented data access method and apparatus
JPH0452741A (en) Cache memory device
CN107203330B (en) Read-write data stream oriented flash memory data distribution method
JPH01200451A (en) Internal data control method
EP0114944B1 (en) Method and apparatus for controlling a single physical cache memory to provide multiple virtual caches
JPS59220853A (en) Disc cache system
DE102005051265A1 (en) Method and system for accessing audiovisual data in a computer
JPS60214060A (en) Control system of external storage cache
Sisson et al. Addressing patterns and memory handling algorithms
EP0285309A2 (en) Memory protection apparatus for use in an electronic calculator
Jalics et al. Caching and other disk access avoidance techniques on personal computers
JPS61245253A (en) Input and output control system for virtual computer
JPS6032220B2 (en) information processing equipment
Lohmann et al. Hard Real-Time Memory-Management in a Single Clock Cycle (on FPGAs)
JP3061385B2 (en) Data management device and data management method
US20040047357A1 (en) Method for accessing a memory unit in which sequences of notes are stored, corresponding memory unit and corresponding program
JPH04148225A (en) System and device for controlling filing access
JP3190661B2 (en) Information processing system
JP2605476B2 (en) Dump collection processing method
JPH02224040A (en) Method and device for loading data