JPH0219938A - File control system - Google Patents

File control system

Info

Publication number
JPH0219938A
JPH0219938A JP63168981A JP16898188A JPH0219938A JP H0219938 A JPH0219938 A JP H0219938A JP 63168981 A JP63168981 A JP 63168981A JP 16898188 A JP16898188 A JP 16898188A JP H0219938 A JPH0219938 A JP H0219938A
Authority
JP
Japan
Prior art keywords
block
list
size
area
free
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
JP63168981A
Other languages
Japanese (ja)
Inventor
Kazuyoshi Mikami
三上 和敬
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP63168981A priority Critical patent/JPH0219938A/en
Publication of JPH0219938A publication Critical patent/JPH0219938A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To control files at a high speed by using a continuous block control table to control the block length prescribed at initialization of a file and the number of blocks or preparing each idle block header group. CONSTITUTION:A continuous block control table 10 stores the idle block list headers 1 for each of sizes BL, 2BL... m X BL arranged in order of larger ones. At initialization of a file, a user area 12 is divided every integer multiple of the minimum block size BL and continuously. Thus the list structures are initialized for each size m X BL. When a host machine requests a writing action of the data having its length (x), a file system returns the address of an idle block. In other words, the size of a desired idle block is calculated as (x/BL) + 1. Thus a single access suffices to the files allocated to blocks and therefore the access speed is increased.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、情報処理装置のファイル管理システムに関
するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a file management system for an information processing device.

〔従来の技術〕[Conventional technology]

第5図は例えば共立出版、石田晴久著rUNIXJ第7
章”UNIXファイルシステムの内部構成”に示された
従来の空きブロックのファイル管理システムの説明図で
あシ、図において、tは空きブロック群をリスト構造で
管理するための先頭リストを示す空きブロックリストヘ
ッダ、2は最大N(N=50)個の空きブロックのアド
レスを保持するためのリスト、3はリスト2中に保持さ
れているアドレスの個数Fを格納するエリア、4は次の
リストを示すポインタを格納するエリア(次のリストが
存在しないときは終端マークとしてφを格納)、5は空
きブロックのアドレスを格納するエリア、6は使用中の
ブロックが不要になったとき、すなわち、新しい空きブ
ロックができると、そのアドレスを記入できるN−F個
のエリア、Tはエリアによって示される空きブロックで
ある。
Figure 5 is, for example, Kyoritsu Shuppan, Haruhisa Ishida, rUNIXJ No. 7.
This is an explanatory diagram of the conventional free block file management system shown in the chapter "Internal structure of UNIX file system". In the figure, t indicates the free block that is the first list for managing free block groups in a list structure. List header, 2 is a list for holding addresses of up to N (N=50) free blocks, 3 is an area for storing the number F of addresses held in list 2, 4 is for storing the next list. 5 is an area to store the address of a free block. When a free block is created, there are N-F areas in which the address can be written, and T is the free block indicated by the area.

次に動作について説明する。UNIXシステムのファイ
ルの初期化、すなわち、フォーマツティング時において
、ファイルシステムは第6図に示すような管理用エリア
11(スーパブロック11a。
Next, the operation will be explained. At the time of file initialization, that is, formatting, in a UNIX system, the file system is stored in a management area 11 (super block 11a) as shown in FIG.

iノードの集まυであるiリスト11bからなる)を設
けて、ユーザエリア12を全て空きブロック(固定サイ
ズ512バイト)として、第5図に示すリスト構造を生
成して空きブロックを管理する。
An i-list 11b, which is a collection of i-nodes, is provided, and the user area 12 is all empty blocks (fixed size 512 bytes), and the list structure shown in FIG. 5 is generated to manage the empty blocks.

このスーパブロックIlaには、第5図の空きブロック
リストヘッダ1が格納され、ユーザエリア12の各ブロ
ックは空きブロック7に対応している。
The free block list header 1 shown in FIG. 5 is stored in this super block Ila, and each block in the user area 12 corresponds to a free block 7.

次にホストマシンがファイル書き込みに当たって、ブロ
ック割当てを要求した場合の動作について説明する。ホ
ストマシンがデータ長Xバイトのデータの書き込みを要
求すると、ファイルシステムは第7図の70−チャート
にしたがって、必要ブロック数Kに対応する空きブロッ
クアドレス(N個)を返すことで、そのブロック割当て
を行っている。
Next, we will explain the operation when the host machine requests block allocation when writing a file. When the host machine requests writing of data with a data length of It is carried out.

すなわち、ステップSTIで必要とする空きプロFは第
iリストにおいて、管理している空きブロック数)とし
て算出し、空きブロックリストヘッダ1の示すリスト2
を第iリストにセットする。
That is, the free program F required in step STI is calculated as the number of free blocks managed in the i-th list, and is calculated as the number of free blocks managed in the i-th list, and
is set in the i-th list.

次いで、ステップST2でホストマシンが第iリストに
アクセスして、ステップST3でF−K>0の判断を行
い、F−K>0のとき、ステップST4に移行する。
Next, the host machine accesses the i-th list in step ST2, determines whether F-K>0 in step ST3, and when F-K>0, moves to step ST4.

このステップST4において、リスト2中に保持されて
いるアドレスの個数Fを格納するエリア3の値の更新を
行い、FをF−にとし、ステップST5で空きブロック
のアドレスを格納するエリア5のボトム方向からに個の
空きブロックアドレスをホストマシンに通知する。
In step ST4, the value of area 3 that stores the number F of addresses held in list 2 is updated, F is changed to F-, and in step ST5, the bottom of area 5 that stores addresses of empty blocks is updated. Notify the host machine of the free block addresses from the direction.

また、ステップST3において、F−K>0でない場合
には、ステップST6に移行し、エリア5のボトム方向
からF個の空きブロックアドレスをホストマシンに通知
し、ステップST7で第iリストのエリア4のポインタ
を示すリストを次の第1リストとし、ステップST8で
必要ブロック数にの値を更新してKをに−Fとし、ステ
ップST2に戻る。
Further, in step ST3, if F-K>0 is not found, the process proceeds to step ST6, and the host machine is notified of F free block addresses from the bottom direction of area 5, and in step ST7, area 4 of the i-th list is The list indicating the pointer is set as the next first list, the value of the required number of blocks is updated in step ST8, K is set to -F, and the process returns to step ST2.

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

従来のファイル管理システムは以上のように構成されて
いるので、必要ブロック数に個は確保されるものの、そ
のブロックアドレスが連続アドレスになっていないため
、データの書き込み時にに回のアクセスを必要とし、逆
にこのファイル管理システムで書き込まれたデータを読
み込むためには、K回のアドレスを必要とするなど、高
速処理に向かない問題点があった。
Conventional file management systems are configured as described above, so although the required number of blocks is secured, the block addresses are not consecutive, so multiple accesses are required when writing data. However, in order to read data written by this file management system, K addresses are required, which is a problem that makes it unsuitable for high-speed processing.

この発明は上記のような問題点を解消するためになされ
たもので、1回のアクセスで書き込みまたは読み込みが
可能なように連続した空きブロックをホストマシンに返
すことができ、高速処理が可能なファイル管理システム
を得ることを目的とする。
This invention was made to solve the above-mentioned problems, and enables high-speed processing by returning consecutive free blocks to the host machine so that they can be written or read with a single access. The purpose is to obtain a file management system.

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

この発明によるファイル管理システムは、ファイルの初
期化時にファイルシステムで規定されたブロック長とそ
の個数を管理する連続ブロック管理表を付加するかある
いは個々の空きブロックヘッダ群を設けるようにしたも
のである。
The file management system according to the present invention adds a continuous block management table for managing the block length and number of blocks specified by the file system when initializing a file, or provides a group of individual free block headers. .

〔作用〕[Effect]

この発明における連続ブロック管理表または空きブロッ
クヘッダ群はファイルの初期化時にホストマシンによ)
アクセスされ、アドレスの連続性を保持しつつ空きブロ
ックをプリフォーマツティングし、その所定のブロック
長を満たすブロックアドレスをホストマシンに返すもの
である。
In this invention, the continuous block management table or free block header group is created by the host machine at the time of file initialization.
It preformats accessed empty blocks while maintaining address continuity, and returns block addresses that satisfy the predetermined block length to the host machine.

〔実施例〕〔Example〕

以下、この発明の一実施例を図について説明する。第1
図において、1はサイズ(mXBL)の空きブロック群
をリスト構造で管理するための先頭リストを示す空きブ
ロックリストヘッダ、2は最大N個の空きブロック(サ
イズmXBL)のアドレスを保持するためのリスト、3
はリスト2の中に保持されているアドレスの個数Fを格
納するエリア、4は次のリストを示すポインタを格納す
るエリア(次のリストが存在しないときは終端マークと
してφを格納)、5はサイズ(mXBL)の空きブロッ
クのアドレスを格納するエリア、6は使用中のブロック
が不要になったとき、すなわち、新しいサイズ(mXB
L)の空きブロックができるとそのアドレスを記入でき
るエリア、IはサイズBLの空きブロック、同様に8は
サイズ2BLの空きブロックである。
An embodiment of the present invention will be described below with reference to the drawings. 1st
In the figure, 1 is a free block list header indicating the first list for managing a group of free blocks of size (mXBL) in a list structure, and 2 is a list for holding the addresses of a maximum of N free blocks (size mXBL). ,3
is an area that stores the number F of addresses held in list 2, 4 is an area that stores a pointer indicating the next list (if the next list does not exist, φ is stored as an end mark), and 5 is an area that stores the pointer to the next list. Area 6 is used to store the address of a free block of size (mXBL).
L) is an area where the address can be written when a free block is created, I is a free block of size BL, and similarly 8 is a free block of size 2BL.

また、10はこの発明によって付加されたもので、最小
ブロック長をBLとすると、上から順にサイズBL、2
BL、3BL、−・−で第m番目ではm XB Lの各
サイズごとの空きブロックリストヘッダ1を格納する連
続プロンク管理表である。
Further, the number 10 is added by this invention, and if the minimum block length is BL, then the size BL, 2
The m-th table in BL, 3BL, -.

なお、第2図の11は管理用エリア、11aはス−/<
 ブロック、11bは1リスト、12はユーザエリアで
ある。
In addition, 11 in Fig. 2 is the management area, and 11a is the area for management.
Block 11b is one list, and 12 is a user area.

次に動作について説明する。ファイルの初期化動作では
、第2図に示すユーザエリア12を均一サイズでなく、
最小ブロックサイズBLの整数倍ごとでかつ連続エリア
に分割してサイズ(mXBL)ごとのリスト構造として
初期化するものである。
Next, the operation will be explained. In the file initialization operation, the user area 12 shown in FIG.
It is initialized as a list structure for each size (mXBL) by dividing it into continuous areas that are integral multiples of the minimum block size BL.

ここで、各サイズごとにどれだけの個数をプリフォーマ
ツティングするかの情報はプリフォーマツティングのパ
ラメータとして与え、第1図における空きブロックリス
トヘッダ1のリスト2上のエリア3の値の合計値に等し
くなる。
Here, information on how many blocks are to be preformatted for each size is given as a preformatting parameter, and the sum of the values of area 3 on list 2 of free block list header 1 in Fig. 1 is given as a preformatting parameter. equals the value.

次にホストマシンがファイル書き込みに当たってブロッ
ク割当てを要求した場合の動作について説明する。ホス
トマシンがデータ長Xバイトのデータの書き込みを要求
すると、ファイルシステムは第3図のフローチャートに
したがって1個の空きブロック(サイズmXBL)のア
ドレスを返すことで、そのブロック割当てを行う。
Next, the operation when the host machine requests block allocation when writing a file will be explained. When the host machine requests writing of data with a data length of X bytes, the file system allocates the block by returning the address of one free block (size mXBL) according to the flowchart in FIG.

すなわち、ステップ5TIIにおいて、必要とする空き
ブロックにのサイズの算出を(−i+x)として算出す
る。ここで、Xはデータ長、BLは最小ブロックサイズ
である。
That is, in step 5TII, the size of the required free block is calculated as (-i+x). Here, X is the data length and BL is the minimum block size.

次にステップ5T12で、連続ブロック管理表10の第
に番目のブロックサイズKXBLの空きブロックリスト
ヘッダ1の示すリスト2を第iリストにセットする。
Next, in step 5T12, list 2 indicated by free block list header 1 of the th block size KXBL in the continuous block management table 10 is set in the i-th list.

次いで、ステップ5T13でホストマシンが第iリスト
にアクセスして、ステップ5T14で第iリストにおい
て管理しているサイズmXBLの空きブロック数がF−
1>Oか否かを判断し、F−1>Oであれば、ステップ
5T15に移る。
Next, in step 5T13, the host machine accesses the i-th list, and in step 5T14, the number of free blocks of size mXBL managed in the i-th list is F-
It is determined whether 1>O or not, and if F-1>O, the process moves to step 5T15.

ステップ5T15において、エリア3に格納されている
空きブロック数Fの値を更新し、ステップ5T16でエ
リア5のボトム方向からサイズKXBLの1個の空きブ
ロックのアドレスをホストマシンに通知する。
In step 5T15, the value of the number of free blocks F stored in area 3 is updated, and in step 5T16, the host machine is notified of the address of one free block of size KXBL from the bottom of area 5.

また、ステップ5T14において、第iリストにおいて
管理しているサイズm X BLの空きブロック数がF
−1>Oでなければ、ステップ5T17に移り、第iリ
ストのエリア4に格納されているポインタの示すリスト
を次の第1リストとする。
Further, in step 5T14, the number of free blocks of size m x BL managed in the i-th list is F
If -1>O, the process moves to step 5T17, and the list indicated by the pointer stored in area 4 of the i-th list is set as the next first list.

このようなブロック割当てでは、ファイルの書き込みま
たは読み込みは第1図のアクセスで行える。
With such block allocation, files can be written or read using the access shown in FIG.

なお、上記実施例では、各サイズごとの空きブロックリ
ストヘッダ群とまとめて格納する連続ブロック管理表1
0を設けたものを示したが、このような連続ブロック管
理表10を設けず、リスト構造、すなわち、第4図に示
すように、第1ノード13にサイズ1の空きブロックリ
ストヘッダ群、第2ノード14にサイズ2の空きブロッ
クリストヘッダ群、第3ノード15にサイズ3の空きブ
ロックリストヘッダ群、・・・というようにデータ配置
を行い、各サイズごとの空きブロックリストヘッダ群を
管理しても上記実施例と同様の効果を奏する。
In the above embodiment, the continuous block management table 1 is stored together with the free block list header group for each size.
0 is shown, but such a continuous block management table 10 is not provided, and the list structure is changed to the first node 13 with a free block list header group of size 1, as shown in FIG. The data is arranged in such a way that the second node 14 has a free block list header group of size 2, the third node 15 has a free block list header group of size 3, etc., and the free block list header group for each size is managed. However, the same effects as in the above embodiment can be achieved.

〔発明の効果〕〔Effect of the invention〕

以上のように、この発明によれば、ファイルの初期化時
に最小ブロックサイズの整数倍サイズごとに空きブロッ
クリストヘッダを連続ブロック管理表で格納するか、あ
るいはノードごとに最小ブロックサイズの整数倍サイズ
ごとの空きブロックリスト群を管理するように構成した
ので、ブロック割当てされたファイルのアクセスは1回
で行えるため、リアルタイム処理などの高速アクセスを
実現できる効果がある。
As described above, according to the present invention, when a file is initialized, a free block list header is stored in a continuous block management table for each size that is an integer multiple of the minimum block size, or for each node that is an integer multiple of the minimum block size. Since the configuration is configured to manage a free block list group for each block, a file to which a block has been allocated can be accessed only once, which has the effect of realizing high-speed access such as real-time processing.

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

第1図はこの発明の一実施例によるファイル管環システ
ムの説明図、第2図は同上実施例におけるファイルの初
期化を説明するためのディスクの内部構成図、第3図は
同上実施例におけるファイル憂き込み時のブロック割当
ての動作の流れを示すフローチャート、第4図はこの発
明の他の実施例によるファイル管理システムにおけるリ
スト構造で各サイズごとの空きブロックリストヘッダ群
の説明図、第5図は従来のファイル管理システムの説明
図、第6図は従来のファイル管理システムにおけるファ
イルの初期化を説明するためのディスクの内部構成図、
第7図は従来のファイル管理システムにおけるファイル
書き込み時のブロック割当ての動作の流れを示すフロー
チャートである。 1は空きブロックリストヘッダ、2はリスト、3〜6は
エリア、T、8は空きブロック、10は連続ブロック管
理表、13は第1ノード、14は第2ノード、15は第
3ノード。 なお、図中、同一符号は同一 又は相当部分を示す。 512B 手 続 補 正 書 (自 発)
FIG. 1 is an explanatory diagram of a file management system according to an embodiment of the present invention, FIG. 2 is an internal configuration diagram of a disk for explaining file initialization in the embodiment, and FIG. 3 is an illustration of the file management system in the embodiment. Flowchart showing the flow of block allocation operations when reserving files; FIG. 4 is a list structure in a file management system according to another embodiment of the present invention; FIG. 5 is an explanatory diagram of free block list header groups for each size; is an explanatory diagram of a conventional file management system, and FIG. 6 is an internal configuration diagram of a disk for explaining file initialization in a conventional file management system.
FIG. 7 is a flowchart showing the flow of block allocation operations when writing a file in a conventional file management system. 1 is a free block list header, 2 is a list, 3 to 6 are areas, T, 8 is a free block, 10 is a continuous block management table, 13 is a first node, 14 is a second node, and 15 is a third node. In addition, the same symbols in the figures indicate the same or equivalent parts. 512B Procedural amendment (voluntary)

Claims (1)

【特許請求の範囲】[Claims] 連続ブロック管理表内に格納された最小ブロック長の整
数倍の各サイズごとの空きブロックリストヘッダ群ある
いは個々の空きブロックリストヘッダ群と、アドレスの
個数を格納するエリアと次のリストを示すポインタを格
納するエリアおよび最小ブロックサイズの整数倍ごとで
連続エリアで分割した複数の空きブロックのアドレスを
格納するエリアとを有し、ファイルの初期化動作時に上
記空きブロックのアドレスを格納するエリアに連続して
空きブロックを保持しかつホストマシンのアクセス時に
上記空きブロックリストヘッダ群の示す番号を上記アド
レスを格納するエリアにセットしてそのアドレスをホス
トマシンに通知するリストとを備えたファイル管理シス
テム。
Free block list header groups for each size that is an integral multiple of the minimum block length stored in the continuous block management table or individual free block list header groups, an area for storing the number of addresses, and a pointer indicating the next list. It has an area for storing and an area for storing addresses of multiple free blocks divided into continuous areas by integral multiples of the minimum block size, and is contiguous with the area for storing the addresses of the free blocks during file initialization. A file management system is provided with a list that holds free blocks and sets a number indicated by the free block list header group in an area for storing the addresses and notifies the host machine of the address when accessed by the host machine.
JP63168981A 1988-07-08 1988-07-08 File control system Pending JPH0219938A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63168981A JPH0219938A (en) 1988-07-08 1988-07-08 File control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63168981A JPH0219938A (en) 1988-07-08 1988-07-08 File control system

Publications (1)

Publication Number Publication Date
JPH0219938A true JPH0219938A (en) 1990-01-23

Family

ID=15878142

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63168981A Pending JPH0219938A (en) 1988-07-08 1988-07-08 File control system

Country Status (1)

Country Link
JP (1) JPH0219938A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04350738A (en) * 1991-05-28 1992-12-04 Nec Corp Disk space management system
JPH05204725A (en) * 1992-01-28 1993-08-13 Casio Comput Co Ltd File managing device
JPH0659946A (en) * 1992-08-11 1994-03-04 Nec Corp Storage area managing system having dynamic rearrangement function
JPH10283230A (en) * 1997-03-31 1998-10-23 Nec Corp File data storage device and machine-readable recording medium with program recorded
EP0875834A2 (en) * 1997-04-28 1998-11-04 Matsushita Electric Industrial Co., Ltd. File system and file management method
US7406491B1 (en) 1999-07-28 2008-07-29 Sharp Kabushiki Kaisha Disk medium managing method having recording areas predefined on the disk medium as directories
DE102011051642A1 (en) 2010-07-09 2012-03-29 Denso Corporation Rotating electrical machine with improved load-dump protection

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04350738A (en) * 1991-05-28 1992-12-04 Nec Corp Disk space management system
JPH05204725A (en) * 1992-01-28 1993-08-13 Casio Comput Co Ltd File managing device
JPH0659946A (en) * 1992-08-11 1994-03-04 Nec Corp Storage area managing system having dynamic rearrangement function
JPH10283230A (en) * 1997-03-31 1998-10-23 Nec Corp File data storage device and machine-readable recording medium with program recorded
EP0875834A2 (en) * 1997-04-28 1998-11-04 Matsushita Electric Industrial Co., Ltd. File system and file management method
EP0875834A3 (en) * 1997-04-28 1999-07-21 Matsushita Electric Industrial Co., Ltd. File system and file management method
US6182088B1 (en) 1997-04-28 2001-01-30 Matsushita Electric Industrial Co., Ltd. File system and file management method
US7406491B1 (en) 1999-07-28 2008-07-29 Sharp Kabushiki Kaisha Disk medium managing method having recording areas predefined on the disk medium as directories
DE102011051642A1 (en) 2010-07-09 2012-03-29 Denso Corporation Rotating electrical machine with improved load-dump protection

Similar Documents

Publication Publication Date Title
US5564037A (en) Real time data migration system and method employing sparse files
JP2571664B2 (en) Computer main storage management system and method
US5454103A (en) Method and apparatus for file storage allocation for secondary storage using large and small file blocks
EP0375188B1 (en) File system
EP0606461B1 (en) Computer method and system for allocating and freeing memory
CA2055295C (en) Logical mapping of data objects using data spaces
US5734861A (en) Log-structured disk array with garbage collection regrouping of tracks to preserve seek affinity
JP4374348B2 (en) How to store file data on disk
US5715452A (en) Process of transferring file, process of gaining access to data and process of writing data
GB2257273A (en) Data storage system with device independent file directories
WO2004102391A1 (en) Thin-provisioning with snapshot technology
EP0916131A2 (en) Freeing disk space in a file system
JPH04213129A (en) Memory control system and memory control method
US7177980B2 (en) Cache storage system and method
US5829005A (en) Circular size-bounded file technique for a computer operating system
JPH0219938A (en) File control system
US6910054B1 (en) Methods, systems and computer program products for storing data using a rolling window file
JP3020512B2 (en) File data management method
EP0117906B1 (en) Key-accessed file organization
CN109634874A (en) A kind of data processing method, device, electronic equipment and storage system
JPH0282332A (en) Input/output buffer system for indexing indexed file
JPH0869399A (en) File management device
JPH04225441A (en) Continuous allocation file device
JP3570050B2 (en) file server
CA2216723C (en) Real time data migration system and method employing sparse files