JP2630103B2 - File space reservation method - Google Patents
File space reservation methodInfo
- Publication number
- JP2630103B2 JP2630103B2 JP3084923A JP8492391A JP2630103B2 JP 2630103 B2 JP2630103 B2 JP 2630103B2 JP 3084923 A JP3084923 A JP 3084923A JP 8492391 A JP8492391 A JP 8492391A JP 2630103 B2 JP2630103 B2 JP 2630103B2
- Authority
- JP
- Japan
- Prior art keywords
- file
- space
- descriptor
- securing
- relocation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 33
- 230000001174 ascending effect Effects 0.000 claims description 4
- 230000004913 activation Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明はファイルスペース確保方
式に関し、特にファイルスペースの拡張要求時における
拡張スペースの確保および再配置に特徴のあるファイル
スペース確保方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a file space securing system, and more particularly to a file space securing system characterized by securing and relocating an extended space when a request for expanding a file space is made.
【0002】[0002]
【従来の技術】従来のファイルスペース確保方式は、フ
ァイルスペースの拡張要求があると、要求サイズより大
きい連続した空き領域を探して拡張スペースとすること
を基本とし、要求サイズを満たす空き領域がまとめて確
保できないとき、分割して必要なスペースを確保してい
る。2. Description of the Related Art The conventional file space securing method is based on the principle that, when a file space expansion request is made, a continuous space area larger than the requested size is searched for and used as an expansion space. When it cannot be secured, the necessary space is secured by dividing.
【0003】[0003]
【発明が解決しようとする課題】上述したように、従来
のファイルスペース確保方式は、拡張要求のあったファ
イルが現在確保されている領域とは無関係に、要求サイ
ズをまとめて確保することを原則としているため、たと
え現在のファイルに隣接している領域に未使用スペース
があっても、要求サイズを満たさない場合は拡張スペー
スとしない。従って、拡張を繰り返すとファイルスペー
スが細分化される確率が高く、データ入出力の遅延が発
生しやすいという問題点がある。As described above, the conventional file space securing method is based on the principle that the requested size is secured collectively irrespective of the area where the file requested to be extended is currently secured. Therefore, even if there is an unused space in the area adjacent to the current file, if the requested size is not satisfied, the area is not set as the expansion space. Therefore, there is a problem that if expansion is repeated, the file space is likely to be fragmented, and data input / output delay is likely to occur.
【0004】これを解決するためにはファイルスペース
の再配置を行うが、このファイル再配置処理の起動は、
利用者あるいは運用管理者の判断に委ねられており、フ
ァイル装置が細分化されたままの状態が長時間継続して
しまう恐れがある。To solve this, the file space is relocated. This file relocation process is started by
It is left to the discretion of the user or the operation manager, and there is a possibility that the state in which the file device is fragmented may continue for a long time.
【0005】本発明の目的は、ファイルスペース拡張時
にファイルの細分化を避け、再配置処理を行わなくても
データ入出力の遅延を少なくできるファイルスペース確
保方式を提供することにある。SUMMARY OF THE INVENTION An object of the present invention is to provide a file space securing method capable of avoiding fragmentation of a file when a file space is expanded and reducing the delay of data input / output without performing relocation processing.
【0006】[0006]
【課題を解決するための手段】本発明のファイルスペー
ス確保方式は、各ファイルに割り当てられたファイルス
ペースの位置およびサイズ情報を保持するファイル記述
子がファイルと共に格納されているファイル装置と、拡
張要求のあったファイルのファイルスペースの位置およ
びサイズ情報と拡張要求サイズとを格納する記述子テー
ブルと、ファイル装置内のスペースが使用中か未使用か
の情報を格納するスペース管理テーブルと、ファイルス
ペース内のデータ再配置を行うファイルの情報を格納す
る再配置起動テーブルと、拡張要求のあったファイルの
ファイル記述子を前記ファイル装置から読み込み前記記
述子テーブルに必要な情報を設定しファイルスペースの
確保を指示するファイル拡張手段と、このファイル拡張
手段により起動され前記記述子テーブルと前記スペース
管理テーブルを参照して現在ファイルが確保されている
領域に隣接するところから優先してファイルスペースを
確保し隣接してファイルスペースを確保したとき前記再
配置起動テーブルにファイル情報を登録するスペース確
保手段と、前記再配置起動テーブルを一定時間間隔で参
照し登録されているファイルが使用中でなく且つファイ
ルスペースの位置と大きさを示すスペース記述子の配列
がアドレス昇順でないときファイルスペース内のデータ
再配置を行うファイル再配置手段と、ファイルスペース
内のデータ再配置時にファイルを一時退避させるワーク
ファイル装置とを備えて構成されている。According to the present invention, there is provided a file space securing system, comprising: a file device in which a file descriptor holding position and size information of a file space allocated to each file is stored together with the file; A descriptor table that stores the file space position and size information of the file that has been damaged, the expansion request size, a space management table that stores information on whether the space in the file device is in use or unused, and a file space. A relocation start table for storing information of a file for which data is to be relocated, and a file descriptor of a file requested to be expanded are read from the file device and necessary information is set in the descriptor table to secure a file space. The file extension means to be instructed and the file extension means Referring to the descriptor table and the space management table, when a file space is secured from a place adjacent to an area where a file is currently secured, and a file space is secured adjacently, a file is stored in the relocation start table. A space securing unit for registering information, and referring to the relocation start table at regular time intervals, the registered file is not in use, and the array of space descriptors indicating the position and size of the file space is not in ascending address order. A file relocation means for relocating data in the file space, and a work file device for temporarily saving a file when relocating data in the file space.
【0007】[0007]
【実施例】次に、本発明の実施例について図面を参照し
て説明する。Next, embodiments of the present invention will be described with reference to the drawings.
【0008】図1は本発明の一実施例の構成を示すブロ
ック図である。FIG. 1 is a block diagram showing the configuration of one embodiment of the present invention.
【0009】本実施例のファイルスペース確保方式は、
図1に示すように、ファイルの管理情報であるファイル
記述子11とファイル12とが格納されているファイル
装置1と、拡張要求のあったファイルの情報を保持する
記述子テーブル4と、拡張要求のあったファイルのファ
イル記述子11をファイル装置1から読み込み記述子テ
ーブル4に必要な情報を設定してスペース確保手段3を
起動するファイル拡張手段2と、ファイル拡張手段2に
より起動され現在ファイルが確保されている領域に隣接
している領域からファイルスペースを優先して確保する
スペース確保手段3と、ファイル装置1の使用/未使用
スペースの情報を管理するスペース管理テーブル5と、
スペース確保手段3によりファイルスペース内のデータ
再配置が有効と判断されたファイル情報が格納される再
配置起動テーブル6と、再配置起動テーブル6を一定時
間間隔で参照し登録されているファイルのデータ再配置
処理を行うファイル再配置手段7と、ファイル再配置処
理の際に関連するファイルのデータを一時的に退避させ
るワークファイル装置8とで構成されている。The file space securing method of this embodiment is as follows.
As shown in FIG. 1, a file device 1 in which file descriptors 11 and 12 which are file management information are stored, a descriptor table 4 holding information of a file for which an extension request has been made, A file extension unit 2 that reads the file descriptor 11 of the file having the error from the file device 1 and sets necessary information in the descriptor table 4 to activate the space securing unit 3; A space securing means 3 for preferentially securing a file space from an area adjacent to the secured area, a space management table 5 for managing information on used / unused space of the file device 1,
A relocation activation table 6 in which file information for which data relocation in the file space is determined to be valid by the space securing means 3 is stored, and data of a file registered with reference to the relocation activation table 6 at regular time intervals. The system comprises a file relocation unit 7 for performing a relocation process, and a work file device 8 for temporarily saving data of a file related to the file relocation process.
【0010】図2は、ファイル装置1に格納されるファ
イル記述子11の構成およびファイルスペースとの関係
を示した説明図である。ファイル記述子11は、ファイ
ル名21,ファイルサイズ22,ファイル使用状態を示
すファイル使用フラグ23,ファイルの編成等を示すフ
ァイル属性情報24及びファイルを構成する各ファイル
スペースの位置とサイズとを示すスペース記述子(fs
1,fs2,fs3……)を列記したスペース記述子列
25から構成されている。FIG. 2 is an explanatory diagram showing the structure of the file descriptor 11 stored in the file device 1 and the relationship with the file space. The file descriptor 11 includes a file name 21, a file size 22, a file use flag 23 indicating a file use state, file attribute information 24 indicating file organization and the like, and a space indicating the position and size of each file space constituting the file. Descriptor (fs
1, fs2, fs3,...).
【0011】例えば、図2において、ファイル名が“F
1”のファイルは、スペース記述子fs1,fs2,f
s3……によりそれぞれ示される開始アドレスとスペー
スサイズを有するファイル装置1上のスペースFS1,
FS2,FS3……に確保されていることを示す。For example, in FIG. 2, the file name is "F
1 "file is a space descriptor fs1, fs2, f
Spaces FS1, on the file device 1 having a start address and a space size respectively indicated by s3.
FS2, FS3....
【0012】図3(a)〜(c)は、それぞれ記述子テ
ーブル4,スペース管理テーブル5及び再配置起動テー
ブル6の構成を示すフォーマット図である。FIGS. 3A to 3C are format diagrams showing the structures of the descriptor table 4, the space management table 5, and the relocation activation table 6, respectively.
【0013】記述子テーブル4は、図3(a)に示すよ
うに、ファイルスペースの拡張要求があったファイルご
とにファイルエントリ30が確保され、各ファイルエン
トリ30は、ファイル装置1上のファイル記述子11の
位置を示すファイル記述子ポインタ31,ファイル名3
2,拡張要求サイズ33及びスペース記述子列34から
構成されている。In the descriptor table 4, as shown in FIG. 3A, a file entry 30 is reserved for each file for which a file space expansion request has been made, and each file entry 30 has a file description on the file device 1. File descriptor pointer 31 indicating the position of child 11, file name 3
2, an extended request size 33 and a space descriptor sequence 34.
【0014】スペース管理テーブル5は、図3(b)に
示すように、ファイル装置1ごとに装置エントリ35が
確保され、未使用領域を示す未使用スペース記述子列3
6及び使用中領域を示す使用中スペース記述子列37
に、それぞれの領域の位置とサイズを示す複数のスペー
ス記述子が、ファイル装置1上の開始アドレスで昇順に
ソートされて格納されている。In the space management table 5, as shown in FIG. 3B, a device entry 35 is secured for each file device 1, and an unused space descriptor string 3 indicating an unused area is provided.
6 and a used space descriptor string 37 indicating a used area
A plurality of space descriptors indicating the position and size of each area are sorted in ascending order by the start address on the file device 1 and stored.
【0015】再配置起動テーブル6は、図3(c)に示
すように、ファイルスペースの再配置が有効と判断され
たファイルに対して起動エントリ38が設けられ、ファ
イル名39とファイル記述子11の格納位置を示すファ
イル記述子ポインタ40とで構成されている。In the relocation start table 6, as shown in FIG. 3C, a start entry 38 is provided for a file for which file space relocation is determined to be valid, and a file name 39 and a file descriptor 11 are provided. And a file descriptor pointer 40 indicating the storage location of the file.
【0016】次に、本実施例の動作について図4〜図6
のフローチャートを参照して説明する。Next, the operation of this embodiment will be described with reference to FIGS.
This will be described with reference to the flowchart of FIG.
【0017】まず、図4によりファイル拡張手段2によ
るファイル拡張処理について説明する。First, the file extension processing by the file extension means 2 will be described with reference to FIG.
【0018】ファイル拡張手段2は、ファイル装置1か
らファイル拡張要求のあったファイルに関するファイル
記述子11を読み込み(ステップ41)、記述子テーブ
ル4にファイルエントリ30を確保し、読み込んだファ
イル記述子11の情報と拡張要求の入力情報とから、フ
ァイル記述子ポインタ31,ファイル名32,拡張要求
サイズ33及びスペース記述子列34をセットする(ス
テップ42)。The file expansion means 2 reads the file descriptor 11 relating to the file requested to be expanded from the file device 1 (step 41), secures the file entry 30 in the descriptor table 4, and reads the file descriptor 11 A file descriptor pointer 31, a file name 32, an extension request size 33, and a space descriptor sequence 34 are set from the information of the extension request and the input information of the extension request (step 42).
【0019】次に、スペース確保手段3を起動して拡張
要求サイズ分のスペース確保要求を行う(ステップ4
3)。スペース確保手段3によるスペース確保が失敗し
たときは、その旨をファイル拡張要求者に通知し処理を
終了する(ステップ46)。スペース確保に成功した場
合は、ファイルエントリ30内のスペース記述子列34
に拡張要求サイズ分のスペース記述子がスペース確保手
段3により追加されるので、この新スペース記述子列3
4aにより先に読み込んだファイル記述子11のスペー
ス記述子列25を置き換え(ステップ44)、ファイル
記述子11をファイル装置1に書き戻す(ステップ4
5)。以上により、ファイルスペースの拡張処理は終了
する。Next, the space securing means 3 is activated to make a space securing request for the expansion request size (step 4).
3). When the space securing by the space securing means 3 fails, the file extension requester is notified of the fact and the process is terminated (step 46). If the space is successfully reserved, the space descriptor column 34 in the file entry 30
Is added by the space securing means 3 to the new space descriptor string 3
4a replaces the space descriptor string 25 of the previously read file descriptor 11 (step 44), and writes the file descriptor 11 back to the file device 1 (step 4).
5). Thus, the process of expanding the file space ends.
【0020】次に、スペース確保手段3による拡張要求
サイズ分のスペース確保処理について、図5を参照して
説明する。Next, a description will be given, with reference to FIG. 5, of a process for securing a space for an extended request size by the space securing means 3.
【0021】スペース確保手段3は、記述子テーブル4
内のスペース確保要求のあったファイルエントリ30を
取得し、スペース記述子列34の最終エントリのスペー
ス記述子を対象記述子として設定する(ステップ5
1)。そして、この対象記述子のファイルスペースが確
保されている領域と結合可能な領域、すなわち隣接して
いる領域のスペース記述子を未使用スペース記述子列3
6から検索する(ステップ52)。The space securing means 3 includes a descriptor table 4
The file entry 30 for which the space reservation request has been made is acquired, and the space descriptor of the last entry of the space descriptor column 34 is set as the target descriptor (step 5)
1). Then, an area that can be combined with the area where the file space of the target descriptor is secured, that is, the space descriptor of the adjacent area is stored in the unused space descriptor string 3
6 is retrieved (step 52).
【0022】結合可能な未使用のスペース記述子が存在
すれば、そのスペース記述子を未使用スペース記述子列
36から削除して使用中スペース記述子列37に挿入し
(ステップ53)、その未使用スペース記述子を記述子
テーブル4のファイルエントリ30内のスペース記述子
列34に追加する(ステップ54)。なお、ステップ5
3,54の処理は未使用スペース記述子を拡張要求のあ
ったファイルのスペース記述子列に追加するという一連
の共通な処理であり、以降処理Aとする。If there is an unused space descriptor which can be combined, the space descriptor is deleted from the unused space descriptor column 36 and inserted into the used space descriptor column 37 (step 53). The used space descriptor is added to the space descriptor column 34 in the file entry 30 of the descriptor table 4 (step 54). Step 5
Processes 3 and 54 are a series of common processes of adding an unused space descriptor to the space descriptor sequence of a file for which an expansion request has been made.
【0023】又、結合可能なスペース記述子が確保でき
た場合は、ファイルスペースの再配置が有効であるた
め、ファイルスペースの再配置を行わせるため再配置起
動テーブル6に起動エントリ38を確保し、ファイル名
39とファイル記述子ポインタ40を記述子テーブル4
から転記し登録する(ステップ55)。When a space descriptor that can be combined is secured, the relocation of the file space is effective. Therefore, the activation entry 38 is secured in the relocation activation table 6 to perform the relocation of the file space. , File name 39 and file descriptor pointer 40 in descriptor table 4
And register it (step 55).
【0024】更に、確保したファイルスペースが拡張要
求サイズを満たしているか否かの判断を、「拡張要求サ
イズ33−検索した未使用スペース記述子のサイズ」で
行い(ステップ56)、拡張要求サイズ分のファイルス
ペースが確保できればスペース確保処理は終了する。な
お、このとき余分なスペースがあれば、スペース記述子
を分割し、分割した余分なスペース分のスペース記述子
は未使用スペース記述子列36に戻す。一方、拡張要求
サイズ分が確保できず、更に追加スペースが必要であれ
ばステップ52の処理に戻り、対象記述子の反対側に結
合可能な未使用スペース記述子の検索を繰り返し行う。Further, it is determined whether or not the secured file space satisfies the expansion request size by using "expansion request size 33-size of searched unused space descriptor" (step 56). If the file space can be secured, the space securing process ends. At this time, if there is an extra space, the space descriptor is divided, and the space descriptor corresponding to the divided extra space is returned to the unused space descriptor column 36. On the other hand, if the expansion request size cannot be secured and additional space is required, the process returns to step 52 to repeatedly search for an unused space descriptor that can be connected to the opposite side of the target descriptor.
【0025】ステップ52の検索で対象記述子に結合可
能な未使用スペース記述子が存在しなければ、対象記述
子をスペース記述子列34中の現在対象記述子に設定さ
れているスペース記述子の一つ前に設定してステップ5
2からの処理を繰り返し行う(ステップ57)。If there is no unused space descriptor that can be combined with the target descriptor in the search in step 52, the target descriptor is set to the space descriptor set as the current target descriptor in the space descriptor column 34. Set to the previous step 5
The processing from step 2 is repeated (step 57).
【0026】なお、ステップ57で対象記述子が存在し
なくなった場合、つまりスペース記述子列34中のスペ
ース記述子と結合可能な未使用スペース記述子が一つも
ない場合、次の処理に進む。まず、内部テーブル上にス
ペース記述子列34をファイル装置1上の開始アドレス
で昇順にソートし(ステップ58)、先頭のスペース記
述子が指す位置から最終のスペース記述子が指す位置ま
での範囲内で、拡張要求サイズ33に等しい記述子サイ
ズを持つ未使用スペース記述子を未使用スペース記述子
列36から検索する(ステップ59)。If the target descriptor no longer exists in step 57, that is, if there is no unused space descriptor that can be combined with the space descriptor in the space descriptor string 34, the process proceeds to the next process. First, the space descriptor string 34 is sorted on the internal table in ascending order by the start address on the file device 1 (step 58), and the space descriptor string 34 is located in the range from the position indicated by the first space descriptor to the position indicated by the last space descriptor. Then, an unused space descriptor having a descriptor size equal to the extended request size 33 is searched from the unused space descriptor column 36 (step 59).
【0027】該当する未使用スペース記述子が存在すれ
ば、その未使用スペース記述子を拡張分のスペース記述
子とする処理Aを行いスペース確保処理を終了する(ス
テップ60)。If there is a corresponding unused space descriptor, the process A is performed using the unused space descriptor as a space descriptor for expansion, and the space securing process is completed (step 60).
【0028】要求サイズに等しいものが存在しなけれ
ば、次に同じ範囲内で記述子サイズの大きいものから順
次未使用スペース記述子を検索していく(ステップ6
1)。そして、未使用スペース記述子が存在すれば、そ
の未使用スペース記述子を拡張分のスペース記述子とす
る処理Aを行い(ステップ62)、ステップ56と同様
に拡張サイズ分のスペースを確保したかの判断を行い
(ステップ63)、拡張要求サイズ分のファイルスペー
スが確保できればスペース確保処理は終了する。拡張要
求サイズ分が確保できないときは、上記の範囲内に未使
用スペース記述子が存在する間ステップ61からの処理
を繰り返す。If there is no one having a size equal to the requested size, the unused space descriptors are sequentially searched from the one having the largest descriptor size within the same range (step 6).
1). If there is an unused space descriptor, a process A is performed in which the unused space descriptor is used as an extended space descriptor (step 62). Is determined (step 63), and if the file space for the expansion request size can be secured, the space securing process ends. If the extended request size cannot be secured, the processing from step 61 is repeated while an unused space descriptor exists within the above range.
【0029】それでも拡張要求サイズを満たさない場合
は、未使用スペース記述子の検索範囲を装置エントリ3
5全体に拡げ、先頭のスペース記述子および最終のスペ
ース記述子に最も近い領域から順に未使用スペース記述
子を検索して拡張要求サイズ分を確保し(ステップ6
4)、確保した未使用スペース記述子を拡張分のスペー
ス記述子とする処理Aを行い処理を終了する(ステップ
65)。一方、拡張要求サイズ分の未使用スペース記述
子が確保できなければ、スペース確保失敗を通知して処
理を終了する。If the expansion request size is still not satisfied, the search range of the unused space descriptor is changed to the device entry 3.
5 and search for unused space descriptors in order from the area closest to the first space descriptor and the last space descriptor to secure an extended request size (step 6).
4) The process A is performed using the reserved unused space descriptor as the space descriptor for the extension, and the process ends (step 65). On the other hand, if an unused space descriptor for the extension request size cannot be secured, a space securing failure is notified and the processing ends.
【0030】以上により、スペース確保手段3による拡
張要求サイズ分のスペースの確保処理は、現在ファイル
が確保されている領域に隣接した領域から優先して行わ
れ、拡張によるファイルスペースの細分化が避けられ
る。As described above, the process for securing the space for the requested expansion size by the space securing means 3 is performed preferentially from the area adjacent to the area where the file is currently secured, so that the file space is not subdivided due to the expansion. Can be
【0031】次に、ファイル再配置手段7によるファイ
ル利用終了後のファイルの再配置処理について、図6を
参照して説明する。Next, a description will be given, with reference to FIG. 6, of a file relocation process performed by the file relocation means 7 after use of a file is completed.
【0032】ファイル再配置手段7は、一定時間間隔で
再配置起動テーブル6を参照し、起動エントリ38が存
在するか否かを監視している(ステップ71,72)。
起動エントリ38が存在するときには、ファイル記述子
ポインタ40からファイル記述子11を読み込み(ステ
ップ73)、ファイル使用フラグ23を参照してそのフ
ァイルが現在使用されているか否かを確認する(ステッ
プ74)。その結果、ファイルが使用中であればファイ
ル再配置処理を行わず、次の起動エントリに対する処理
を行う(ステップ82)。The file relocation means 7 refers to the relocation activation table 6 at regular time intervals and monitors whether or not the activation entry 38 exists (steps 71 and 72).
When the start entry 38 exists, the file descriptor 11 is read from the file descriptor pointer 40 (step 73), and it is confirmed whether or not the file is currently used by referring to the file use flag 23 (step 74). . As a result, if the file is in use, the file relocation process is not performed, and the process for the next start entry is performed (step 82).
【0033】ファイルが使用中でなければファイル再配
置処理を開始し、スペース記述子列25をファイル装置
1上における開始アドレスでソートし、新スペース記述
子列25aを生成する(ステップ75)。そして、新ス
ペース記述子列25aと以前のスペース記述子列25と
を比較し、両者のスペース記述子が並び方を含めて同じ
であれば再配置の必要がないため、先頭から比較して両
者が異なっている最初のスペース記述子を選択し、それ
以降のスペース記述子列に対して下記の再配置処理を行
う(ステップ76)。If the file is not in use, the file relocation process is started, the space descriptor string 25 is sorted by the start address on the file device 1, and a new space descriptor string 25a is generated (step 75). Then, the new space descriptor string 25a is compared with the previous space descriptor string 25, and if the space descriptors of both are the same including the arrangement, there is no need for rearrangement. A different first space descriptor is selected, and the following relocation processing is performed on the subsequent space descriptor strings (step 76).
【0034】まず、異なるスペース記述子以降のスペー
ス記述子列が表すファイルスペースのサイズを求め、ワ
ークファイル装置8にそのサイズのワークファイルを確
保する(ステップ77)。次に、異なるスペース記述子
が指す領域から旧スペース記述子列25を用いてデータ
を読み込み、ワークファイルに書き写してデータの移送
を行う(ステップ78)。すべてのデータの移送が終了
したら、今度はワークファイルから新スペース記述子列
25aを用いてデータをファイル装置1のファイルへ再
移送する(ステップ79)。First, the size of a file space represented by a space descriptor sequence after a different space descriptor is obtained, and a work file of that size is secured in the work file device 8 (step 77). Next, data is read from the area indicated by the different space descriptor using the old space descriptor sequence 25, copied to a work file, and transferred (step 78). When the transfer of all data is completed, the data is transferred again from the work file to the file of the file device 1 using the new space descriptor string 25a (step 79).
【0035】ファイルの再移送が終了したら、ファイル
記述子11のスペース記述子列25を新スペース記述子
列25aで更新して書き戻し(ステップ80)、ワーク
ファイル装置8からワークファイルを削除してこのファ
イルに対する再配置処理は終了する(ステップ81)。
その後、再配置起動テーブル6を次の起動エントリに位
置付け(ステップ82)、ステップ71から同様の処理
を行い、すべての起動エントリに対する処理が終了する
といったん実行を停止し、一定時間経過すると再びステ
ップ71から再開する(ステップ83)。When the retransfer of the file is completed, the space descriptor column 25 of the file descriptor 11 is updated with the new space descriptor column 25a and written back (step 80), and the work file is deleted from the work file device 8 The relocation processing for this file ends (step 81).
After that, the relocation activation table 6 is positioned as the next activation entry (step 82), the same processing is performed from step 71, the execution is stopped as soon as the processing for all the activation entries is completed, and after a predetermined time elapses, step 71 is performed again. (Step 83).
【0036】以上により、拡張されたファイルのデータ
は、ファイル拡張時に既存のファイルスペースに結合さ
れるように確保された領域内で、連続して格納されるよ
うに再配置される。なお、このファイル再配置処理は、
ファイルスペースを取り直すのではなく、確保されてい
るファイルスペース内で、スペース記述子をテーブル上
で並べ変えたり結合したりしてデータの連続性を確保す
るもので、必要なファイルに対してのみ行い、高速に処
理することができる。As described above, the data of the expanded file is rearranged so as to be continuously stored in the area secured so as to be combined with the existing file space when the file is expanded. Note that this file relocation processing
Instead of reallocating the file space, within the allocated file space, the space descriptors are rearranged and joined on the table to ensure data continuity, and only for the necessary files. , Can be processed at high speed.
【0037】[0037]
【発明の効果】以上説明したように、本発明のファイル
スペース確保方式は、ファイルの拡張時に、現在ファイ
ルが存在する領域に隣接する領域を優先的に拡張スペー
スとして確保するようにし、更に、隣接して拡大した領
域内のデータの再配置をファイルの利用終了後に自動的
に実施するようにしたので、ファイル拡張による細分化
が起こりにくく、且つファイル内のデータの連続性が容
易に保たれるので、ファイルスペースの再配置を人為的
に行う必要はほとんどなく、しかもデータの入出力の遅
延もほとんど発生しないという効果がある。As described above, according to the file space securing method of the present invention, when a file is extended, an area adjacent to the area where the file currently exists is preferentially secured as an extended space. The data in the enlarged area is automatically rearranged after the use of the file is completed, so that segmentation due to file expansion is unlikely to occur, and the continuity of data in the file is easily maintained. Therefore, there is almost no need to artificially relocate the file space, and there is an effect that there is almost no delay in data input / output.
【図1】本発明の一実施例の構成を示すブロック図であ
る。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.
【図2】本実施例のファイル記述子の構成とファイル装
置上のファイルスペースの関係を示す説明図である。FIG. 2 is an explanatory diagram showing a relationship between a configuration of a file descriptor and a file space on a file device according to the embodiment.
【図3】本実施例の記述子テーブル,スペース管理テー
ブル,再配置起動テーブルの構成を示すフォーマット図
である。FIG. 3 is a format diagram showing a configuration of a descriptor table, a space management table, and a relocation start table according to the embodiment.
【図4】本実施例のファイル拡張手段の処理手順を示す
フローチャートである。FIG. 4 is a flowchart illustrating a processing procedure of a file extension unit according to the present embodiment.
【図5】本実施例スペース確保手段の処理手順を示すフ
ローチャートである。FIG. 5 is a flowchart illustrating a processing procedure of a space securing unit according to the embodiment.
【図6】本実施例のファイル再配置手段の処理手順を示
すフローチャートである。FIG. 6 is a flowchart illustrating a processing procedure of a file relocation unit according to the embodiment;
【符号の説明】 1 ファイル装置 2 ファイル拡張手段 3 スペース確保手段 4 記述子テーブル 5 スペース管理テーブル 6 再配置起動テーブル 7 ファイル再配置手段 8 ワークファイル装置 11 ファイル記述子 12 ファイル[Description of Signs] 1 File device 2 File expansion means 3 Space securing means 4 Descriptor table 5 Space management table 6 Relocation start table 7 File relocation means 8 Work file device 11 File descriptor 12 File
Claims (1)
ペースの位置およびサイズ情報を保持するファイル記述
子がファイルと共に格納されているファイル装置と、拡
張要求のあったファイルのファイルスペースの位置およ
びサイズ情報と拡張要求サイズとを格納する記述子テー
ブルと、ファイル装置内のスペースが使用中か未使用か
の情報を格納するスペース管理テーブルと、ファイルス
ペース内のデータ再配置を行うファイルの情報を格納す
る再配置起動テーブルと、拡張要求のあったファイルの
ファイル記述子を前記ファイル装置から読み込み前記記
述子テーブルに必要な情報を設定しファイルスペースの
確保を指示するファイル拡張手段と、このファイル拡張
手段により起動され前記記述子テーブルと前記スペース
管理テーブルを参照して現在ファイルが確保されている
領域に隣接するところから優先してファイルスペースを
確保し隣接してファイルスペースを確保したとき前記再
配置起動テーブルにファイル情報を登録するスペース確
保手段と、前記再配置起動テーブルを一定時間間隔で参
照し登録されているファイルが使用中でなく且つファイ
ルスペースの位置と大きさを示すスペース記述子の配列
がアドレス昇順でないときファイルスペース内のデータ
再配置を行うファイル再配置手段と、ファイルスペース
内のデータ再配置時にファイルを一時退避させるワーク
ファイル装置とを備えたことを特徴とするファイルスペ
ース確保方式。1. A file device in which a file descriptor holding the position and size information of a file space allocated to each file is stored together with the file, the position and size information of the file space of the file requested to be expanded, and A descriptor table for storing the extended request size, a space management table for storing information on whether the space in the file device is in use or unused, and a space table for storing information on a file to be relocated in the file space. An arrangement start-up table, file extension means for reading a file descriptor of a file requested to be extended from the file device, setting necessary information in the descriptor table, and instructing to secure a file space; And refer to the descriptor table and the space management table Space securing means for securing the file space preferentially from the area adjacent to the area where the file is currently secured and registering the file information in the relocation start table when securing the adjacent file space; A file for relocating data in the file space when the registered file is not in use and the array of space descriptors indicating the position and size of the file space is not in ascending address order by referring to the allocation start table at regular intervals. A file space securing method, comprising a relocation means and a work file device for temporarily saving a file when relocating data in the file space.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3084923A JP2630103B2 (en) | 1991-04-17 | 1991-04-17 | File space reservation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3084923A JP2630103B2 (en) | 1991-04-17 | 1991-04-17 | File space reservation method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH04317144A JPH04317144A (en) | 1992-11-09 |
| JP2630103B2 true JP2630103B2 (en) | 1997-07-16 |
Family
ID=13844225
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3084923A Expired - Fee Related JP2630103B2 (en) | 1991-04-17 | 1991-04-17 | File space reservation method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2630103B2 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS62221048A (en) * | 1986-03-20 | 1987-09-29 | Fujitsu Ltd | Method for extending area of continuous file |
| JPH0225946A (en) * | 1988-07-15 | 1990-01-29 | Casio Comput Co Ltd | File controller |
-
1991
- 1991-04-17 JP JP3084923A patent/JP2630103B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH04317144A (en) | 1992-11-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6957362B2 (en) | Instantaneous restoration of a production copy from a snapshot copy in a data storage system | |
| US6792518B2 (en) | Data storage system having mata bit maps for indicating whether data blocks are invalid in snapshot copies | |
| JP4214712B2 (en) | Database page allocation processing method | |
| JP2004178289A (en) | Snapshot acquisition method, disk device, and storage system | |
| US20030028723A1 (en) | Efficient data backup using a single side file | |
| JPH1063555A (en) | File management method | |
| CN115168317B (en) | LSM tree storage engine construction method and system | |
| US20250165152A1 (en) | File System-Based Metadata Management Method and Related Device Thereof | |
| JP4480479B2 (en) | Storage system | |
| JP2006277737A (en) | Nonvolatile memory device with address prediction function | |
| JP2630103B2 (en) | File space reservation method | |
| JP2704028B2 (en) | File area management method | |
| JPH0728836A (en) | Database search method and database system using this method | |
| JP2743857B2 (en) | Data area management system for area shared files | |
| JP2953882B2 (en) | Free label address acquisition method for file label area | |
| JPH0793192A (en) | File management method | |
| JPH0869403A (en) | File management device | |
| JPH0744426A (en) | File system file management method | |
| JPH11175376A (en) | Updating method and updating device for data base and recording medium in which updating method is written | |
| JP3398672B2 (en) | Intermediate data storage device | |
| JPH0869399A (en) | File management device | |
| JP2740451B2 (en) | Catalog management file optimization method | |
| JPH1198448A (en) | Video server device and access processing method therefor | |
| JP3298935B2 (en) | File management device | |
| JP3275857B2 (en) | Computer 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: 19970304 |
|
| LAPS | Cancellation because of no payment of annual fees |