Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3060481B2 - Segment roll-in / roll-out method - Google Patents
[go: Go Back, main page]

JP3060481B2 - Segment roll-in / roll-out method - Google Patents

Segment roll-in / roll-out method

Info

Publication number
JP3060481B2
JP3060481B2 JP2084149A JP8414990A JP3060481B2 JP 3060481 B2 JP3060481 B2 JP 3060481B2 JP 2084149 A JP2084149 A JP 2084149A JP 8414990 A JP8414990 A JP 8414990A JP 3060481 B2 JP3060481 B2 JP 3060481B2
Authority
JP
Japan
Prior art keywords
file system
block
roll
segment
storage device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2084149A
Other languages
Japanese (ja)
Other versions
JPH04242847A (en
Inventor
義之 矢津
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2084149A priority Critical patent/JP3060481B2/en
Publication of JPH04242847A publication Critical patent/JPH04242847A/en
Application granted granted Critical
Publication of JP3060481B2 publication Critical patent/JP3060481B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、仮想記憶機構を持ったオペレーティングシ
ステムにおいて、主記憶装置と補助記憶装置の間でのセ
グメントのロールアウト/ロールイン方式に関する。
Description: BACKGROUND OF THE INVENTION The present invention relates to a segment roll-out / roll-in method between a main storage device and an auxiliary storage device in an operating system having a virtual storage mechanism.

〔従来の技術〕[Conventional technology]

従来、オペレーティングシステムで仮想記憶機構を実
現するにあたって、セグメントのロールアウト/ロール
インする先の補助記憶装置のある領域を、それ専用の目
的に確保しておかねばならず、この領域はロールアウト
/ロールイン以外の目的には使用できなかった。
Conventionally, when realizing a virtual storage mechanism in an operating system, an area of an auxiliary storage device to which a segment is rolled out / rolled in must be reserved for a dedicated purpose. It could not be used for purposes other than roll-in.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

システムの補助記憶装置には、ロールアウトする領域
としても使用する以外に、ファイルシステムとしての用
途もあり、上述したような従来の方法では、互いにその
大きさを制限していた。特に、補助記憶装置と主記憶装
置の大きさに比して、広いアドレッシング機能を持つプ
ロセッサのもとでは、スワップ領域の大きさが、実効す
るプログラムの大きさの限界要因となった。
The auxiliary storage device of the system is used not only as an area to be rolled out, but also as a file system. In the above-described conventional method, the size of each is limited. In particular, under a processor having a wide addressing function compared to the sizes of the auxiliary storage device and the main storage device, the size of the swap area has become a limiting factor of the size of the program to be executed.

〔課題を解決するための手段〕[Means for solving the problem]

本発明の構成は、補助記憶装置中のファイルシステム
が、ファイルやスワップ領域に供するためのブロックの
集まりとか、かかるブロックへのポインタを有し、加え
て相互のポインタをも有するファイルシステム管理ブロ
ックの集まりから成り、前記ファイルシステムのブロッ
クの内で、前記ファイルや前記スワップ領域として使用
していない空きブロックを、かかる空きブロック自身の
中に、別の空きブロックへのポインタを持つことによっ
て形成されるキューによって管理し、指定されたブロッ
クを前記空きブロックキューと接続,切断する機能を持
ち、さらに前記ファイルシステム管理ブロックの内で、
前記ファイルや前記スワップ領域へのポインタを有しな
い空きファイルシステム管理ブロックを、かかる空きフ
ァイルシステム管理ブロック自身の中に、別の空きファ
イルシステム管理ブロックへのポインタを持つことによ
って形成されるキューによって管理し、指定されたファ
イルシステム管理ブロックを前記空きファイルシステム
管理ブロックキューに接続,切断する機能を持つファイ
ル管理機構と、補助記憶装置内の位置情報を以て、かか
る補助記憶装置に入出力を行う入出力機構と、前記補助
記憶装置中のロールアウト/ロールインのみの目的に供
する固定スワップ領域に十分な空き領域があれば、前記
入出力機構を用い、ロールアウトを行うと共に、前記ロ
ールアウト先の前記位置情報をプロセス毎に存在するセ
グメント管理テーブルに設定し、固定スワップ領域管理
テーブルに、かかる領域のが使用中であることを示す情
報を設定し、これに十分な領域がなかったとき、ファイ
ルシステムロールアウト機構を呼び出すロールアウト機
構と、前記ファイル管理機構を用い、前記ファイルシス
テムから、ロールアウトするのに必要な数のブロック
を、前記空きブロックキューから取り出し、さらにこれ
らのブロックをポイントするのに必要な数のファイルシ
ステム管理ブロックを、前記空きファイルシステム管理
ブロックキューから取り出し、かかるブロックにロール
アウトを行うと共に、前記ロールアウト先の位置情報と
して、補助記憶装置の区別、ファイルシステム管理ブロ
ックの補助記憶装置内の位置、前記ファイルシステム管
理ブロック内でのブロックへのポインタの位置を前記セ
グメント管理テーブルに設定するファイルシステムロー
ルアウト機構と、該セグメントのロールアウト先が前記
固定スワップ領域であった場合は、前記セグメント管理
テーブルより、補助記憶装置のロールアウト先の位置情
報を得て、これを以て、前記入出力機構を用いて、かか
るセグメントを主記憶装置にロールインし、セグメント
管理テーブルのかかる位置情報を書き換え、前記主記憶
装置のロールインしたアドレスとし、固定スワップ領域
管理テーブルのかかる領域が、使用中でないことを示す
情報を設定し、ロールアウト先がファイルシステムであ
った場合、ファイルシステムロールイン機構を呼び出す
ロールイン機構と、前記セグメント管理テーブルから、
ロールアウト先の位置情報を得て、これを以て、前記入
出力管理機構を用いて、前記主記憶装置にロールインす
ると共に、ファイルシステム管理ブロックのロールイン
し終わった全てのブロックへのポインタを消去し、かか
るブロックを前記空きブロックキューに繋ぎ、もし、こ
の処理によって、かかるファイルシステム管理ブロック
のブロックへのポインタが全て消去されたら、これを空
きファイルシステム管理ブロックキューに繋ぎ、セグメ
ント管理テーブルの位置情報を書き換え、前記主記憶装
置のロールインしたアドレスとするファイルシステムロ
ールイン機構と、プログラムの実行時に、必要なセグメ
ントを前記主記憶上に置き、新しくセグメントが必要に
なり次第、前記ロールイン機構を用い、補助記憶装置か
ら前記主記憶装置にロールインし、その主記憶が不足す
るときには、前記ロールアウト機構を用い、実行に不必
要であるセグメントを補助記憶装置にロールアウトする
仮想記憶機構を持つことを特徴とする。
According to the configuration of the present invention, the file system in the auxiliary storage device is a file system management block having a group of blocks to be used for a file or a swap area or a pointer to such a block, and additionally having a mutual pointer. A collection of free blocks not used as the file or the swap area among the blocks of the file system are formed by having a pointer to another free block in the free block itself. It has a function of managing by a queue, connecting and disconnecting a designated block to and from the free block queue, and further includes, within the file system management block,
A free file system management block having no pointer to the file or the swap area is managed by a queue formed by having a pointer to another free file system management block in the free file system management block itself. And a file management mechanism having a function of connecting and disconnecting a designated file system management block to and from the free file system management block queue, and an input / output for inputting / outputting data to / from the auxiliary storage device using position information in the auxiliary storage device. If there is sufficient free space in the fixed swap area for the purpose of roll-out / roll-in only in the auxiliary storage device, a roll-out is performed using the input / output mechanism, and the roll-out destination Segment information is stored for each process. A rollout mechanism that sets information indicating that such area is in use in the fixed swap area management table, and calls a file system rollout mechanism when there is not enough space for this area. Using the file management mechanism, from the file system, fetch the required number of blocks to roll out from the free block queue, and further divide the required number of file system management blocks to point to these blocks. The block is taken out from the free file system management block queue, and the block is rolled out. As the position information of the rollout destination, the identification of the auxiliary storage device, the position of the file system management block in the auxiliary storage device, the file system management Point to a block within a block A file system rollout mechanism for setting the position of the segment in the segment management table, and when the rollout destination of the segment is the fixed swap area, the position information of the rollout destination of the auxiliary storage device from the segment management table. Then, using the input / output mechanism, the segment is rolled into the main storage device, the position information in the segment management table is rewritten, and the rolled-in address of the main storage device is set as the fixed swap area. If the area of the management table sets information indicating that it is not in use and the rollout destination is a file system, a roll-in mechanism that calls a file system roll-in mechanism, and from the segment management table,
The location information of the rollout destination is obtained, and by using the information, the input / output management mechanism is used to roll in the main storage device and erase the pointers to all the rolled-in file system management blocks. Then, the block is connected to the empty block queue, and if all pointers to the blocks of the file system management block are deleted by this processing, this is connected to the empty file system management block queue, and the position of the segment management table is A file system roll-in mechanism that rewrites information and uses the roll-in address of the main storage device, and a necessary segment is placed on the main storage when a program is executed, and the roll-in mechanism is used as soon as a new segment is needed. Using the auxiliary storage device and the main storage device And rolls in, when the main memory is insufficient, the use of a roll-out mechanism, characterized by having a virtual memory mechanism for a segment is unnecessary to perform roll out to auxiliary storage.

〔実施例〕〔Example〕

次に、本発明について図面を用いて説明する。 Next, the present invention will be described with reference to the drawings.

第1図は本発明の一実施例を示す構成図、第2図は第
1図のファイルシステム9の詳細図、第3図は第1図の
セグメント管理テーブル11の詳細と主記憶上のプログラ
ム12との関連を示す図、第4図は固定スワップ領域管理
テーブル10の詳細と固定スワップ領域8との関連を示す
図である。
FIG. 1 is a block diagram showing one embodiment of the present invention, FIG. 2 is a detailed view of the file system 9 in FIG. 1, and FIG. 3 is a detailed view of the segment management table 11 in FIG. FIG. 4 is a diagram showing the relationship between the fixed swap area management table 10 and the fixed swap area 8 in detail.

第2図において、ファイルシステム9にはスワップフ
ァイルシステムと非スワップファイルシステムがある。
スワップファイルシステムとは、ファイルシステム管理
ブロック領域107と、ブロック領域108によって成ってい
る。ファイルシステム管理ブロック領域107はファイル
システム管理ブロック101,102,103,104,105,106の集ま
りから成っている。かかるファイルシステム管理ブロッ
クには、空きファイルシステム管理ブロック102,105,10
6とファイル管理ブロック101と、スワップ管理ブロック
103,104があるが、この3者は何れも使用目的によって
名称を替えたもので、その内容を書き変えることによ
り、これらは相互に変遷する。
In FIG. 2, the file system 9 includes a swap file system and a non-swap file system.
The swap file system includes a file system management block area 107 and a block area 108. The file system management block area 107 is composed of a group of file system management blocks 101, 102, 103, 104, 105 and 106. Such file system management blocks include free file system management blocks 102, 105, 10
6, File management block 101, Swap management block
There are 103 and 104, all three of which have different names depending on the purpose of use, and by changing the contents, they change each other.

また、ブロック領域108は、ブロック201,202,203,20
4,205,206,207,208,209,210,211,212の集まりから成っ
ている。ブロックには、管理ブロック205,210,211,204,
208と、ファイルブロック201,209と、スワップブロック
202,207があるが、この3者は何れも使用目的によって
名称を替えたもので、これらはポインタを変えることに
より相互に変遷する。ファイル管理ブロック101はブロ
ック201,206,209へのポインタを保持しており、これに
よりファイルを構成している。スワップ管理ブロック10
3は、別のスワップ管理ブロック104へのポインタを保持
しており、ポインタによって繋がっている。
Also, the block area 108 includes blocks 201, 202, 203, 20
It consists of a collection of 4,205,206,207,208,209,210,211,212. The blocks include management blocks 205, 210, 211, 204,
208, file blocks 201 and 209, and swap block
Although there are 202 and 207, all three have names changed according to the purpose of use, and these change mutually by changing the pointer. The file management block 101 holds pointers to the blocks 201, 206, and 209, and constitutes a file by this. Swap management block 10
3 holds a pointer to another swap management block 104 and is connected by the pointer.

さらにこれらはブロック202,207,203,212へのポイン
タを保持しており、これによってポイントされるブロッ
クにロールアウトされた内容が格納されている。空きフ
ァイルシステム管理ブロック102,105,106は、この両者
以外の残りのファイルシステム管理ブロックで、これ
は、別の空きファイルシステム管理ブロックへのポイン
タを保持しており、ポインタによって繋がってキューに
なっている。空きブロック205,210,211,204,208は、別
の空きブロックへのポインタを保持しており、ポインタ
によって繋がっている。
Further, they hold pointers to the blocks 202, 207, 203, 212, and the content pointed out by the blocks 202, 207, 203, 212 stores the rolled out contents. The free file system management blocks 102, 105, and 106 are the remaining file system management blocks other than the two, and hold pointers to other free file system management blocks, and are linked by the pointers to form a queue. The empty blocks 205, 210, 211, 204, and 208 hold pointers to other empty blocks, and are linked by the pointers.

ファイルシステム管理ブロックから、ブロックへのポ
インタは補助記憶装置上の位置を識別できるものであれ
ばなんでもよい。但し、この位置情報を以て入出力機構
7が入出力が行えるものでなければならない。
The pointer to the block from the file system management block may be any pointer that can identify the position on the auxiliary storage device. However, the input / output mechanism 7 must be capable of performing input / output using this position information.

非スワップファイルシステムでは逆に、ファイルシス
テムロールアウト機構5において、ロールアウトの対象
にはならないものであり、スワップブロック,スワップ
管理ブロックは作成されない。他はスワップファイルシ
ステムと全く同じである。
Conversely, in a non-swap file system, the file system rollout mechanism 5 does not become a rollout target, and no swap block or swap management block is created. Others are exactly the same as the swap file system.

スワップファイルシステムにおいて、スワップが発生
しなければ、またスワップが発生しても、それらすべて
がロールインされた後では、スワップブロック及びスワ
ップ管理ブロックはファイルシステム中に存在しなくな
る。この状態になるとスワップファイルシステムは非ス
ワップファイルシステムと全く変わらなくなる。スワッ
プファイルシステムは、ファイルシステムの空きブロッ
クを必要に応じて、ロールアウトのために使うというも
のである。
In a swap file system, if no swap occurs, and if so, after all of them have been rolled in, the swap block and the swap management block no longer exist in the file system. In this state, the swap file system is no different from a non-swap file system. The swap file system uses the free blocks of the file system for rollout as needed.

ファイル管理機構6では、ファイルシステムの空きブ
ロックを空きブロックキュー205,210,211,204,208から
取り出す機能、逆にブロックを空きブロックキューに接
続する機能、ファイルシステム管理ブロックを空きファ
イルシステム管理ブロックキュー102,105,106から取り
出す機能、逆にファイルシステム管理ブロックを空きフ
ァイルシステム管理ブロックキューに接続する機能を持
つ。
The file management mechanism 6 has a function of extracting a free block of a file system from the free block queues 205, 210, 211, 204, and 208, a function of connecting a block to the free block queue, a function of extracting a file system management block from the free file system management block queues 102, 105, and 106. It has a function to connect the file system management block to the free file system management block queue.

第4図において、固定スワップ領域8は、補助記憶装
置のある領域をある大きさに区切て401,402,403,404,40
5,406,407,408、ロールアウト/ロールインの目的のみ
に使用するもので、固定スワップ領域管理情報10によっ
て、この中のどの部分が、使用されているかが管理され
る。固定スワップ領域管理情報10は、固定スワップ領域
毎に存在する。
In FIG. 4, the fixed swap area 8 divides an area of the auxiliary storage device into a certain size, and is divided into 401, 402, 403, 404, and 40.
5,406,407,408, which are used only for the purpose of roll-out / roll-in. The fixed swap area management information 10 manages which part is used. The fixed swap area management information 10 exists for each fixed swap area.

入出力手段7は、主記憶装置と補助記憶装置の位置情
報を以て、補助記憶装置から主記憶へまたは主記憶から
補助記憶装置へデータを転送する。
The input / output means 7 transfers data from the auxiliary storage device to the main storage or from the main storage to the auxiliary storage device based on the position information of the main storage device and the auxiliary storage device.

次に、各機構の処理の詳細を、ロールアウトとロール
インの処理の流れに添って説明する。
Next, details of the processing of each mechanism will be described along with the flow of the roll-out and roll-in processing.

仮想記憶機構1では、プログラム領域を拡大する場合
や、新たにプロセスを作成する時に要する領域が存在し
ないとき、どのプロセスのどのセグメントをロールアウ
トするかを決定し、プロセスの識別子とセグメントの識
別子を以て、ロールアウト手段3を呼び出す。
In the case of expanding the program area or when there is no area required for creating a new process, the virtual storage mechanism 1 determines which segment of which process is to be rolled out, and uses the process identifier and the segment identifier based on the process identifier and the segment identifier. , The rollout means 3 is called.

ロールアウト手段3は、ロールアウトが必要になった
ときに仮想記憶機構1から呼ばれ、まず、固定スワップ
領域管理情報10を調べ、固定スワップ領域8に空きがあ
るかを判定する。空きがあれば、優先的にかかる固定ス
ワップ領域8にロールアウトしようとする。このとき、
かかる固定スワップ領域のどの領域を使用したのかを、
固定スワップ領域管理情報10に記述する。このとき、固
定スワップ領域8は一般に複数存在するため、補助記憶
装置の識別するための識別子をも記述する。こうする
と、かかる補助記憶装置を、後述するファイルシステム
に使用しているか固定スワップ領域に使用しているかの
区別にも使用でき、都合がよい。こうして、補助記憶装
置の識別と内部の位置情報を以て、入出力処理機構7を
呼び出して、ロールアウトする。
The rollout means 3 is called from the virtual storage mechanism 1 when a rollout is required, and first checks the fixed swap area management information 10 to determine whether or not the fixed swap area 8 has a free space. If there is a vacancy, an attempt is made to roll out to the fixed swap area 8 with priority. At this time,
Which area of the fixed swap area was used,
Described in the fixed swap area management information 10. At this time, since there are generally a plurality of fixed swap areas 8, an identifier for identifying the auxiliary storage device is also described. By doing so, the auxiliary storage device can be used for discriminating whether it is used for a file system described later or for a fixed swap area, which is convenient. In this manner, the input / output processing mechanism 7 is called up based on the identification of the auxiliary storage device and the internal position information, and rolls out.

もし、固定スワップ領域に空きスペースがなかった場
合には、ファイルシステムロールアウト手段5を呼び出
す。ファイルシステムロールアウト手段5は、ブロック
をファイル管理機構6を使用し、空きブロックキューか
ら取り出す。この処理を必要なだけ繰り返す。途中で、
ファイルシステムに空きブロックがなくなってしまった
ら、この処理は中止して、今までに取ったブロックは全
て、ファイル管理機構6を使用し、空きブロックキュー
に戻してやり、呼び出し元にエラーを通知し、処理を終
わる。
If there is no free space in the fixed swap area, the file system rollout means 5 is called. The file system rollout means 5 takes out the block from the free block queue using the file management mechanism 6. This process is repeated as necessary. In the middle,
If there are no more free blocks in the file system, this process is aborted, all blocks taken so far are returned to the free block queue using the file management mechanism 6, and an error is notified to the caller. Finish the process.

もし、空きファイルブロックが望み通り確保できたな
らば、次にファイル管理機構6を使用して、空きファイ
ルシステム管理ブロックキューから、空きファイルシス
テム管理ブロックをとる。もし、ここでファイルシステ
ム管理ブロックが確保できなかった場合は、空きファイ
ルブロックが足りなかった時と同様に、スワップ失敗と
して呼び出し元にエラーを通知し、処理を終わる。
If a free file block can be secured as desired, the free file system management block is then taken from the free file system management block queue using the file management mechanism 6. If the file system management block cannot be secured here, as in the case where the free file block is insufficient, an error is notified to the caller as a swap failure, and the processing is terminated.

こうして新たにとったファイルブロックとファイルシ
ステム管理ブロックはロールアウト/ロールインのため
に使用するので、それぞれ、スワップブロック,スワッ
プ管理ブロックと呼び、スワップ管理ブロックにはロー
ルアウト先となったファイルブロックへのポインタを保
持する。スワップ管理ブロックが複数に及ぶ場合はポイ
ンタで繋ぐ。これの先頭はファイル管理機構6が所持し
ておく。
The newly taken file block and file system management block are used for roll-out / roll-in, so they are called a swap block and a swap management block, respectively. Holds a pointer to When there are a plurality of swap management blocks, they are connected by a pointer. The head of this is held by the file management mechanism 6.

もし、直前のロールアウト処理において、スワップ管
理ブロックのポインタの領域に余りができたのであれ
ば、次にロールアウトしたときのスワップブロックは先
ず、かかるスワップ管理ブロックからポイントするよう
にする。またこの領域はスワップインされると、ポイン
タの抜けを生じることになるが、次にロールアウトする
プロセスは、優先的にポインタの抜けのあるファイル管
理ブロックに接続する。
If there is room in the pointer area of the swap management block in the immediately preceding rollout processing, the swap block when the next rollout is performed is first pointed from the swap management block. Also, if this area is swapped in, the pointer will be missed, but the next rollout process will preferentially connect to the file management block with the missing pointer.

ロールアウトが頻々と発生し、それによりファイルシ
ステムが圧迫されることを避けたい場合は、ロールアウ
トの上限と、ファイルシステムの空きブロックとの関係
をシステム構成時に規定しておく。例えば、空きファイ
ルブロックの残存数などで決めてもよい。またロールア
ウト先となるファイルシステムもシステム構成時に規定
しておく。例えば、システムの走行に支障をきたす可能
性のないものにスワップを行うようにする。
If it is desired to prevent the file system from being squeezed due to frequent rollouts, the relationship between the upper limit of the rollout and the free blocks of the file system is defined at the time of system configuration. For example, it may be determined based on the remaining number of empty file blocks. The file system to be rolled out is also specified at the time of system configuration. For example, a swap is performed for one that does not hinder the running of the system.

もちろん、ロールアウト先となるファイルシステム
は、複数であっても構わない。このときは、あるファイ
ルシステムに対してロールアウトに失敗した場合は、別
のファイルシステムに対して試みる。
Of course, there may be a plurality of rollout destination file systems. At this time, if the rollout fails for a certain file system, an attempt is made to another file system.

そして、確保した空きファイル管理ブロックをスワッ
プ管理ブロックに接続し、これにロールアウトした順
に、スワップブロックを接続する。
Then, the secured free file management block is connected to the swap management block, and the swap block is connected to the swap management block in the order in which the blocks are rolled out.

仮想記憶機構1ではプログラム実行中に、主記憶中に
存在しないセグメントを参照したときに、そのプログラ
ムのプログラムカウンタより、どのセグメントへのアク
セスが発生したかを知り、プログラム識別子と、セグメ
ント識別子を以て、ロールイン手段を呼び出す。通常は
プロセッサの機能として、“論理アドレスに矛盾はない
が実際メモリが存在しない。”という内部割り込みが用
意されていて、これが契機となる。
When the virtual storage mechanism 1 refers to a segment that does not exist in the main storage during execution of a program, the program counter of the program knows which segment has been accessed, and uses the program identifier and the segment identifier to determine Call roll-in means. Usually, as a function of the processor, an internal interrupt such as "there is no inconsistency in the logical address but no actual memory exists" is prepared, and this triggers.

ロールイン手段2は、セグメントのロールインが必要
になったとき、仮想記憶機構1から呼ばれ、まず、該当
するプロセスのセグメント管理情報11を得て、ロールア
ウト先がどこであるかを調べ、固定スワップ領域8であ
った場合には、さらにプロセス管理情報11から、補助記
憶装置内部の位置を得て、これを以て入出力機構7を呼
び出し、ロールインする。ファイルシステム9にロール
アウトされていた場合には、ファイルシステムロールイ
ン手段4を呼び出す。
The roll-in means 2 is called from the virtual storage mechanism 1 when the segment needs to be rolled in, first obtains the segment management information 11 of the corresponding process, checks where the rollout destination is, and fixes In the case of the swap area 8, the position inside the auxiliary storage device is further obtained from the process management information 11, and the input / output mechanism 7 is called by this to roll in. If the file system has been rolled out to the file system 9, the file system roll-in means 4 is called.

ファイルシステムロールイン機構4では、セグメント
管理情報11から、ファイルシステムの別、即ちどの補助
記憶装置かの識別と、ファイルシステム内のファイルシ
ステム管理ブロックの位置、及び、ファイルシステム管
理ブロック内に複数あるブロックへのポインタの内、ど
のポインタであるかの情報を得る。これによって、かか
るセグメントのロールアウトされている先の補助記憶装
置上の位置を知ることができ、これを以て、入出力制御
機構を用い、主記憶上にロールインする。
In the file system roll-in mechanism 4, from the segment management information 11, identification of the file system, that is, identification of an auxiliary storage device, the position of the file system management block in the file system, and a plurality of files in the file system management block Information on which pointer is among the pointers to the block is obtained. As a result, the position of the segment on the auxiliary storage device to which the segment has been rolled out can be known, and based on this, the segment is rolled into the main storage using the input / output control mechanism.

ロールインしたことによって不用となったスワップブ
ロックは、ファイル管理機構6を用い、空きブロックキ
ューに繋ぐと同時に、スワップ管理ブロックのポインタ
を外す。この処理を要求のあったセグメントについて、
繰り返す。そして、かかる処理によって、スワップファ
イル管理ブロックの中に、ファイルブロックへのポイン
タを全くもたなくなったものがあれば、このスワップ管
理ブロックを、ファイル管理機構6を用い、空きファイ
ル管理ブロックキューに繋ぐ。
The swap block that has become unnecessary due to the roll-in is connected to the free block queue using the file management mechanism 6 and, at the same time, the pointer of the swap management block is removed. For the segment that requested this processing,
repeat. If any of the swap file management blocks has no pointer to the file block as a result of this processing, the swap management block is linked to the free file management block queue using the file management mechanism 6. .

仮想記憶機構1のもとでは、ユーザプログラムは必ず
しも全てが、主記憶上には存在せず、実行に関与する部
分12だけが優先的に主記憶中に存在し、残りのセグメン
トは、必要なときに主記憶上にロールインされる。この
様子を図3において説明する。図3において、ユーザプ
ログラムは5つのセグメント302,303,304,305,306から
成り、そのうちの2つのセグメント302,304,305は主記
憶装置上313,315,314に存在するが、残りのセグメント
の内の1つ303は、固定スワップ領域8の4つのブロッ
ク403,404,405,406にロールアウトされていて、残りの
1つのセグメント306はファイルシステム9のブロック2
03,207にロールアウトされている。
Under the virtual storage mechanism 1, not all user programs exist in the main memory, only the part 12 involved in execution exists in the main memory preferentially, and the remaining segments Sometimes rolled into main memory. This situation will be described with reference to FIG. In FIG. 3, the user program is composed of five segments 302, 303, 304, 305, and 306. Two of the segments 302, 304, and 305 exist in the main storage device 313, 315, and 314, but one of the remaining segments 303 has four blocks of the fixed swap area 8. Rolled out to 403,404,405,406, one remaining segment 306 is block 2 of file system 9
Rolled out to 03,207.

セグメント管理情報11にはプログラムの各セグメント
のサイズとそのセグメントがどこにあるか即ち、主記憶
装置13か、固定スワップ領域8か、ファイルシステム9
か及び、主記憶装置の場合はそのアドレス補助記憶装置
の場合はどの補助記憶装置にあるかの情報と、ファイル
システム内にあるスワップブロックへのポインタとなる
ファイルシステム管理ブロックの補助記憶装置内の位置
情報、及び、ファイルシステム管理ブロック内に複数あ
るブロックへのポインタの内、どのポインタであるかの
情報を、主記憶装置の場合は、実メモリ上の何処に存在
しているかの情報を持っている。
In the segment management information 11, the size of each segment of the program and the location of the segment, that is, the main storage device 13, the fixed swap area 8, the file system 9
In the case of the main storage device, information on the address of the auxiliary storage device in the case of the main storage device, and information on which auxiliary storage device is located in the auxiliary storage device of the file system management block serving as a pointer to the swap block in the file system. In the case of the main storage device, information on the position of the pointer in the real memory is stored. ing.

〔発明の効果〕〔The invention's effect〕

以上、説明したように、本発明により、スワップアウ
トされる領域は、動的に確保できるようになり、スワッ
プアウトが不必要な場合は、これらの空きブロックはフ
ァイルに供することが出来るようになる。
As described above, according to the present invention, the area to be swapped out can be dynamically secured, and when the swapout is unnecessary, these empty blocks can be provided to a file. .

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

第1図は本発明の一実施例を示す構成図、第2図は第1
図におけるファイルシステム9の詳細図、第3図は第1
図におけるセグメント管理テーブル11と、主記憶上のプ
ログラム12の関連を示す図、第4図は第1図の固定スワ
ップ領域管理テーブル10の詳細と固定スワップ領域8と
の関連を示す図である。 1……仮想記憶機構、2……ロールイン機構、3……ロ
ールアウト機構、4……システムファイルロールイン機
構、5……システムファイルロールアウト機構、6……
ファイル管理機構、7……入出力機構、8……固定スワ
ップ領域、9……ファイルシステム、10……固定スワッ
プ領域管理テーブル、11……セグメント管理テーブル、
12……主記憶上のプログラム、13……主記憶装置、14…
…補助記憶装置、101……ファイル管理ブロック、102…
…空きファイル管理ブロック(キュー先頭)、103……
スワップ管理ブロック(キュー先頭)、104……スワッ
プ管理ブロック、105,106……空きファイル管理ブロッ
ク、107……ファイルシステム管理ブロック領域、108…
…ブロック領域、201,206,209……ブロック(ファイル
ブロック)、202,203,207,212,401〜408……ブロック
(スワップブロック)、204,208,210,211……ブロック
(空きブロック)、205……ブロック(空きブロックキ
ュー先頭)、301……実行プログラム、302,303,304,30
5,306……実行プログラムのセグメント、307……セグメ
ント管理テーブル、308……セグメント302の位置情報、
309……セグメント303の位置情報、310……セグメント3
04の位置情報、311……セグメント305の位置情報、312
……セグメント306の位置情報、313……セグメント302
の実体(主記憶内)、314……セグメント304の実体(主
記憶内)、315……セグメント305の実体(主記憶内)、
403,404,405,406……セグメント303の実体(固定スワッ
プ領域内)、207,203……セグメント306の実体(ファイ
ルシステム内)。
FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG.
FIG. 3 is a detailed view of the file system 9 in FIG.
FIG. 4 shows the relationship between the segment management table 11 and the program 12 on the main memory. FIG. 4 shows the relationship between the details of the fixed swap area management table 10 in FIG. 1 virtual memory mechanism 2 roll-in mechanism 3 roll-out mechanism 4 system file roll-in mechanism 5 system file roll-out mechanism 6
File management mechanism 7, Input / output mechanism 8, Fixed swap area 9, File system 10, Fixed swap area management table 11, Segment management table
12: Program in main memory, 13: Main memory, 14 ...
... Auxiliary storage device, 101 ... File management block, 102 ...
… Free file management block (queue top), 103 ……
Swap management block (head of queue), 104: Swap management block, 105, 106: Free file management block, 107: File system management block area, 108:
… Block area, 201, 206, 209… Block (file block), 202, 203, 207, 212, 401 to 408… Block (swap block), 204, 208, 210, 211… Block (empty block), 205… Block (empty block queue top), 301… Execution program, 302,303,304,30
5,306: segment of execution program, 307: segment management table, 308: position information of segment 302,
309: Position information of segment 303, 310: Segment 3
04 location information, 311 …… Segment 305 location information, 312
…… Segment 306 position information, 313 …… Segment 302
(In main memory), 314... Entity of segment 304 (in main memory), 315... Entity of segment 305 (in main memory),
403, 404, 405, 406... Entity of segment 303 (within fixed swap area), 207, 203... Entity of segment 306 (within file system).

フロントページの続き (56)参考文献 江村潤郎”オペレーティングシステム への構造的アプローチ(下)”(日本コ ンピュータ協会、昭52年)P871−889 Leffler et al”The Desing and Implim entation of the 4. 3BSD UNIX opetrati ng system”(Addison −Wesley,1989)p134−136,p 155−161 (58)調査した分野(Int.Cl.7,DB名) G06F 12/08 - 12/12 G06F 9/46 G06F 12/00 Continuation of the front page (56) References Junro Emura, "Structural Approach to Operating Systems (2)" (Japan Computer Association, 1977) P871-889 Leffler et al, "The Desing and Implementment of the 4.3 BSD" UNIX opportuning system "(Addison-Wesley, 1989) p134-136, p155-161 (58) Fields investigated (Int. Cl. 7 , DB name) G06F 12/08-12/12 G06F 9/46 G06F 12 / 00

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】補助記憶装置中のファイルシステムが、フ
ァイルやスワップ領域に供するためのブロックの集まり
とか、かかるブロックへのポインタを有し、加えて相互
のポインタをも有するファイルシステム管理ブロックの
集まりから成り、前記ファイルシステムのブロックの内
で、前記ファイルや前記スワップ領域として使用してい
ない空きブロックを、かかる空きブロック自身の中に、
別の空きブロックへのポインタを持つことによって形成
されるキューによって管理し、指定されたブロックを前
記空きブロックキューと接続,切断する機能を持ち、さ
らに前記ファイルシステム管理ブロックの内で、前記フ
ァイルや前記スワップ領域へのポインタを有しない空き
ファイルシステム管理ブロックを、かかる空きファイル
システム管理ブロック自身の中に、別の空きファイルシ
ステム管理ブロックへのポインタを持つことによって形
成されるキューによって管理し、指定されたファイルシ
ステム管理ブロックを前記空きファイルシステム管理ブ
ロックキューに接続,切断する機能を持つファイル管理
機構と、補助記憶装置内の位置情報を以て、かかる補助
記憶装置に入出力を行う入出力機構と、前記補助記憶装
置中のロールアウト/ロールインのみの目的に供する固
定スワップ領域に十分な空き領域があれば、前記入出力
機構を用い、ロールアウトを行うと共に、前記ロールア
ウト先の前記位置情報をプロセス毎に存在するセグメン
ト管理テーブルに設定し、固定スワップ領域管理テーブ
ルに、かかる領域のが使用中であることを示す情報を設
定し、これに十分な領域がなかったとき、ファイルシス
テムロールアウト機構を呼び出すロールアウト機構と、
前記ファイル管理機構を用い、前記ファイルシステムか
ら、ロールアウトするのに必要な数のブロックを、前記
空きブロックキューから取り出し、さらにこれらのブロ
ックをポイントするのに必要な数のファイルシステム管
理ブロックを、前記空きファイルシステム管理ブロック
キューから取り出し、かかるブロックにロールアウトを
行うと共に、前記ロールアウト先の位置情報として、補
助記憶装置の区別、ファイルシステム管理ブロックの補
助記憶装置内の位置、前記ファイルシステム管理ブロッ
ク内でのブロックへのポインタの位置を前記セグメント
管理テーブルに設定するファイルシステムロールアウト
機構と、該セグメントのロールアウト先が前記固定スワ
ップ領域であった場合は、前記セグメント管理テーブル
より、補助記憶装置のロールアウト先の位置情報を得
て、これを以て、前記入出力機構を用いて、かかるセグ
メントを主記憶装置にロールインし、セグメント管理テ
ーブルのかかる位置情報を書き換え、前記主記憶装置の
ロールインしたアドレスとし、固定スワップ領域管理テ
ーブルのかかる領域が、使用中でないことを示す情報を
設定し、ロールアウト先がファイルシステムであった場
合、ファイルシステムロールイン機構を呼び出すロール
イン機構と、前記セグメント管理テーブルから、ロール
アウト先の位置情報を得て、これを以て、前記入出力管
理機構を用いて、前記主記憶装置にロールインすると共
に、ファイルシステム管理ブロックのロールインし終わ
った全てのブロックへのポインタを消去し、かかるブロ
ックを前記空きブロックキューに繋ぎ、もし、この処理
によって、かかるファイルシステム管理ブロックのブロ
ックへのポインタが全て消去されたら、これを空きファ
イルシステム管理ブロックキューに繋ぎ、セグメント管
理テーブルの位置情報を書き換え、前記主記憶装置のロ
ールインしたアドレスとするファイルシステムロールイ
ン機構と、プログラムの実行時に、必要なセグメントを
前記主記憶上に置き、新しくセグメントが必要になり次
第、前記ロールイン機構を用い、補助記憶装置から前記
主記憶装置にロールインし、その主記憶が不足するとき
には、前記ロールアウト機構を用い、実行に不必要であ
るセグメントを補助記憶装置にロールアウトする仮想記
憶機構を持つことを特徴とするセグメントのロールイン
/ロールアウト方式。
A file system in an auxiliary storage device is a group of blocks for providing a file or a swap area, or a group of file system management blocks having pointers to such blocks and also having mutual pointers. In the blocks of the file system, empty blocks not used as the file or the swap area are stored in the empty blocks themselves.
It has a function of managing a queue formed by having a pointer to another free block, connecting and disconnecting a specified block to and from the free block queue, and further includes, within the file system management block, The empty file system management block having no pointer to the swap area is managed and designated by a queue formed by having a pointer to another empty file system management block in the empty file system management block itself. A file management mechanism having a function of connecting and disconnecting the obtained file system management block to and from the free file system management block queue, an input / output mechanism for performing input / output to / from the auxiliary storage device using position information in the auxiliary storage device, Roll-out in the auxiliary storage device If there is a sufficient free space in the fixed swap area provided only for the purpose of roll-in, a roll-out is performed using the input / output mechanism, and the position information of the roll-out destination is stored in the segment management table for each process. A fixed swap area management table to set information indicating that such area is in use, and a rollout mechanism that calls a file system rollout mechanism when there is not enough space for this,
Using the file management mechanism, from the file system, fetch the required number of blocks to roll out from the free block queue, and further divide the required number of file system management blocks to point to these blocks. The block is taken out from the free file system management block queue, and the block is rolled out. As the position information of the rollout destination, the identification of the auxiliary storage device, the position of the file system management block in the auxiliary storage device, the file system management A file system rollout mechanism for setting the position of a pointer to a block within a block in the segment management table, and an auxiliary storage from the segment management table when the rollout destination of the segment is the fixed swap area. Dress Then, using the input / output mechanism, the segment is rolled into the main storage device, the position information in the segment management table is rewritten, and the roll-in destination of the main storage device is rewritten. Information indicating that the area of the fixed swap area management table is not in use, a roll-in mechanism for calling a file system roll-in mechanism when the roll-out destination is a file system, and the segment From the management table, the location information of the rollout destination is obtained, and by using this, the input / output management mechanism is used to roll in to the main storage device and to all the blocks in the file system management block that have been rolled in. Pointer, and connect such a block to the empty block queue. If all the pointers to the blocks of the file system management block are erased by this process, this is linked to the empty file system management block queue, the position information of the segment management table is rewritten, and the main storage device is rolled in. A file system roll-in mechanism to be used as an address, and a necessary segment is placed on the main storage at the time of execution of a program, and as soon as a new segment is needed, the roll-in mechanism is used to transfer data from the auxiliary storage device to the main storage device. Roll-in / roll-in of a segment characterized by having a virtual storage mechanism for rolling-in and, when the main memory is insufficient, using the roll-out mechanism to roll out a segment unnecessary for execution to an auxiliary storage device. Out method.
JP2084149A 1990-03-30 1990-03-30 Segment roll-in / roll-out method Expired - Lifetime JP3060481B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2084149A JP3060481B2 (en) 1990-03-30 1990-03-30 Segment roll-in / roll-out method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2084149A JP3060481B2 (en) 1990-03-30 1990-03-30 Segment roll-in / roll-out method

Publications (2)

Publication Number Publication Date
JPH04242847A JPH04242847A (en) 1992-08-31
JP3060481B2 true JP3060481B2 (en) 2000-07-10

Family

ID=13822449

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2084149A Expired - Lifetime JP3060481B2 (en) 1990-03-30 1990-03-30 Segment roll-in / roll-out method

Country Status (1)

Country Link
JP (1) JP3060481B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5691246B2 (en) 2010-05-27 2015-04-01 富士通株式会社 Database duplex system, information processing apparatus, and database duplex method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Leffler et al"The Desing and Implimentation of the 4.3BSD UNIX opetrating system"(Addison−Wesley,1989)p134−136,p155−161
江村潤郎"オペレーティングシステムへの構造的アプローチ(下)"(日本コンピュータ協会、昭52年)P871−889

Also Published As

Publication number Publication date
JPH04242847A (en) 1992-08-31

Similar Documents

Publication Publication Date Title
US5781908A (en) File data synchronizer in a distributed data computer network
US5175849A (en) Capturing data of a database system
EP0351969A2 (en) Exactly-once semantics in a TP queuing system
JPH061447B2 (en) How to back up the database
JPS607299B2 (en) data processing system
JP3060481B2 (en) Segment roll-in / roll-out method
EP0294499B1 (en) Control scheme for segmented buffers based on a shared reference count
JP2864979B2 (en) Software debugger
JPH06309209A (en) File backup system
JPH04199339A (en) Distributed transaction file control method for distributed processing system
JP2990609B2 (en) Computer system
JP3328283B2 (en) Free memory of a computing device, dynamic management of free memory subdivided into at least two logic memory areas with different access characteristics
JP2621651B2 (en) Virtual storage usage measurement processor
JPH0337748A (en) External storage accessing system utilizing main storage
JPS5816546B2 (en) Page control data processing system control method
JPH03231337A (en) Collection processing system for system execution history
JP2885631B2 (en) Operating system management device and operating system management method
JPS61123953A (en) Virtual object control method
JP2735400B2 (en) Asynchronous I/O control method
JPH04308940A (en) Automatic resource allocation management method in virtual computer system
JP3013993B2 (en) Vector processing method
JPH01232392A (en) Image processing method
JPH03255547A (en) Memory dump output system
JPH04250540A (en) Image processing method and device
JPH03154130A (en) Task switching system