JPS62293448A - Space managing system for file - Google Patents

Space managing system for file

Info

Publication number
JPS62293448A
JPS62293448A JP61135987A JP13598786A JPS62293448A JP S62293448 A JPS62293448 A JP S62293448A JP 61135987 A JP61135987 A JP 61135987A JP 13598786 A JP13598786 A JP 13598786A JP S62293448 A JPS62293448 A JP S62293448A
Authority
JP
Japan
Prior art keywords
block
file
matrix
block number
fbm
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
JP61135987A
Other languages
Japanese (ja)
Inventor
Chieko Oota
太田 智恵子
Michihiro Hanada
花田 道弘
Junichi Kazama
風間 順一
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.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi Ltd
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 Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP61135987A priority Critical patent/JPS62293448A/en
Publication of JPS62293448A publication Critical patent/JPS62293448A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To improve the use efficiency of a file space and the performance at the time of a file access, by providing a matrix showing a dead block by a block number train, and a matrix showing a logical coupling of a busy block. CONSTITUTION:The allocation of a file using a block number matrix is executed by defining a data set name, and moving the block number of a necessary portion to a user block number matrix UBM from a free block number matrix FBM. At the time of using a dead block from the head of the FBM, in case of saving the contents of the used block, its block number is put in the end of the FBM. Write of a data is executed by a block unit in order from the head block of the UBM corresponding to the data set name. At the time of allocation, whenever write to the block is generated, the block number is moved newly into the UBM from the FBM, and write is continued by securing the block to which write is executed in the next time.

Description

【発明の詳細な説明】 3、発明の詳細な説明 〔産業上の利用分野〕 本発明はコンピュータ等でデータファイルの読出、書込
、検索、追加、削除等を行う場合に係り、ファイルスペ
ースの使用効率及び、ファイルアクセス時の性能を向上
させるに好適なファイルのスペース管理方式に関する。
[Detailed Description of the Invention] 3. Detailed Description of the Invention [Field of Industrial Application] The present invention relates to reading, writing, searching, adding, deleting, etc. of data files on a computer, etc. The present invention relates to a file space management method suitable for improving usage efficiency and performance during file access.

〔従来の技術〕[Conventional technology]

従来のファイルのスペース管理方式は、特開57−15
3334号公報に記載のように、事前領域設定方式とビ
ットマツプ方式がある。
The conventional file space management method is JP-A-57-15.
As described in Japanese Patent No. 3334, there are a pre-region setting method and a bitmap method.

ビットマツプ方式では、磁気ディスク等のボリュームを
データ域とビットマツプ域とに分け、さらにデータ域を
最少のアクセス単位であるブロックで区切っている。こ
の1つのブロックに1ビツトの制御ビットを対応させ、
ビットマツプ域が作成される。ビットは通常It I 
11がブロックの使用中状態を1(011が空きの状態
を示している。データ域に存在する多数のブロックは、
後続ブロックポインタNPおよび先行ブロックポインタ
BPによって、論理的なデータの連続性が保障されてい
る。
In the bitmap method, a volume such as a magnetic disk is divided into a data area and a bitmap area, and the data area is further divided into blocks, which are the smallest access units. This one block corresponds to one control bit,
A bitmap area is created. The bit is usually It I
11 indicates that the block is in use (1 indicates that the block is in use) (011 indicates that the block is free).
Logical data continuity is guaranteed by the succeeding block pointer NP and the preceding block pointer BP.

ビットマツプ方式のファイルのアロケートは。Bitmap file allocation.

データセット名を定義して、ビットマツプ上で゛0′″
を捜し、それに対応するブロックを確保して第1ブロツ
クとすることで行う。この時、ビットマツプ上の該当ビ
ットをtt l 71にする。第2ブロツク以降の確保
も同様に行い、第1ブロツクのNP。
Define the dataset name and write ``0'''' on the bitmap.
This is done by searching for the block corresponding to it and setting it as the first block. At this time, the corresponding bit on the bitmap is set to tt l 71. The second and subsequent blocks are secured in the same way, and the NP of the first block is secured.

第2ブロツクのBPを書き換えて接続する。Rewrite the BP of the second block and connect.

データの読み出しは、ポインタNPにより、次々にブロ
ックを取り出すことで行われる。
Data reading is performed by taking out blocks one after another using pointer NP.

このようにビットマツプ方式を用いると、発生するデー
タ量に応じて、ボリューム内に空きがある限り、データ
の書き込み追加ができ、1つのボリュームを複数のファ
イルで共用する場合、使用効率を上げることができる。
Using the bitmap method in this way allows data to be written and added as long as there is free space in the volume, depending on the amount of data generated, which can improve usage efficiency when a single volume is shared by multiple files. can.

また、データの挿入。Also, inserting data.

削除はポインタの書き換えにより容易に行なえる。Deletion can be easily performed by rewriting the pointer.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記従来技術では、特開57−153334号を用いて
、ブロックの空状態が付加メモリ上のビットマツプで迅
速にわかっても、ブロック間の論理的連続性は、ブロッ
クを読み出して、ポインタNPを取り出してみなければ
わからなかった。
In the above-mentioned conventional technology, using JP-A-57-153334, even if the empty state of a block is quickly known from the bitmap on the additional memory, the logical continuity between blocks can be determined by reading out the block and taking out the pointer NP. I didn't know until I tried it.

例えば、第100ブロツクの内容を知るためには、第1
ブロツクから順に読み出して100回ブロックをメモリ
上に読み上げねばならない。
For example, to know the contents of the 100th block,
The block must be read out into memory 100 times, starting with the block.

このように、従来技術では、ブロック内に論理的な結合
関係を示すNPやBPのようなポインタを持っているた
め、ポインタをたどるためにブロックを読み出す分、フ
ァイルへのアクセス回数が多くなり性能が悪くなるとい
う問題があった。
In this way, in the conventional technology, since a block has pointers such as NP and BP that indicate a logical connection relationship, the number of accesses to the file increases as the block is read to follow the pointer, resulting in performance problems. The problem was that it got worse.

また、ビットマツプは、二者択一の情報、例えば、空い
ているのか、または否か、しか表現できない。そのため
、空いている状態でも、さらに区別して、過去に使われ
たことがあるのかとか、以前はどのように使用されてい
たのか、などの複雑な情報を表示しなければならないよ
うな場合は、データ構造が複雑になるという問題もあっ
た。
Also, bitmaps can only represent binary information, such as vacancy or not. Therefore, even if the property is vacant, it may be necessary to further distinguish it and display complex information such as whether it has been used in the past or how it was used in the past. Another problem was that the data structure became complicated.

本発明の目的は、ブロック間の論理的結合状況をブロッ
クと切り離して独立に管理することで、ファイルへのア
クセス回数を減らして、ファイルの読出書込等の性能を
向上させるとともに、ブロック間の結合状態を簡明な表
現で管理することで。
The purpose of the present invention is to reduce the number of accesses to a file and improve file read/write performance by managing the logical connection status between blocks separately from the blocks. By managing the bond state in a concise representation.

使用ずみのブロックを効果的に再利用する方法を提供す
ることにある。
The objective is to provide a method for effectively reusing used blocks.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的は、第1図に示すように、ビットマツプBMを
フリーブロック番号マトリクスFBMに置き換え、ブロ
ック内のポインタNP、BPをブロックと分離して、ユ
ーザブロック番号マトリクスU B Mに置き換えれば
達成される。
The above objective can be achieved by replacing the bitmap BM with a free block number matrix FBM, separating the pointers NP and BP within the block from the block, and replacing them with the user block number matrix UBM, as shown in FIG. .

本発明の特徴は、ブロックに付けた番号を並べた順番に
よって、ブロック間の論理的な連続性を表わしている点
にある。
A feature of the present invention is that logical continuity between blocks is expressed by the order in which the numbers assigned to the blocks are arranged.

まず、ファイル内をすべて均一の大きさでブロッキング
し、すべてのブロックに番号を付ける。
First, all blocks in the file are uniformly sized, and all blocks are numbered.

ビットマツプは、空いているブロックのブロック番号列
FBMに置き換わる。FBMの先頭にあるブロック番号
のブロックから順に使用していくことにすると、列のど
の位置にブロック番号が存在するかによって、空きにも
優先度が付けられる。
The bitmap is replaced by the block number sequence FBM of the vacant block. If blocks are used in order from the block number at the beginning of the FBM, priority is given to empty spaces depending on the position of the block number in the column.

使用中のブロック間の論理的な結合状態はUBMを読み
出せば、一目瞭然となる。UBMも単にブロック番号の
列なので、番号を移動さるたけて、データエリアの確保
、追加、削除、解放等が、実際のブロックにアクセスす
ることなく行える。
The logical connection state between blocks in use can be seen at a glance by reading the UBM. Since the UBM is also simply a sequence of block numbers, by moving the numbers, data areas can be secured, added, deleted, released, etc. without accessing the actual blocks.

〔作 用〕[For production]

ブロック番号マトリクス方式を用いたファイルのアロケ
ートは、データセット名を定義して、FBMから、必要
な分のブロック番号をUBMに移動することで行われる
File allocation using the block number matrix method is performed by defining a data set name and moving the necessary block numbers from the FBM to the UBM.

空きブロックを、FBMの先頭から使用することしこす
ると、使用済みのブロックの内容をなるべく保存したい
場合は、そのブロック番号をFBMの最後に置けばよい
Empty blocks are used from the beginning of the FBM, but if you want to preserve the contents of used blocks as much as possible, you can put the block number at the end of the FBM.

また、FBMのブロックマトリクスの中に特殊なインジ
ケータを設定しておけば、インジケータの後に続くブロ
ック番号マトリクスについては、別な意味をもたせるこ
ともできる。つまりマトリクス内をインジケータで区切
って、複数の意味をもたせて使用することも可能である
Further, by setting a special indicator in the FBM block matrix, the block number matrix following the indicator can have a different meaning. In other words, it is possible to divide the matrix with indicators and use them with multiple meanings.

データの書き込みは、データセット名に対応したtJ 
B Mの先頭のブロックから順にブロック単位で行われ
る。ファイルのアロケート時、第1ブロツクだけを確保
している場合は、ブロックへの書き込みが発生する毎に
、新たにFBMからブロック番号をU B M内に移動
して、次に書き込むブロックを確保しながら書き進む。
To write data, write tJ corresponding to the dataset name.
This is performed block by block sequentially starting from the first block of BM. When allocating a file, if only the first block is reserved, each time a write to a block occurs, the block number is moved from the FBM to the UBM to secure the next block to be written. As I continue writing.

また、ファイルのアロケート時にあらかじめ決まったブ
ロック数を準備している場合は、UBM内に並んだブロ
ック番号の順に書き進める。
Furthermore, if a predetermined number of blocks are prepared at the time of file allocation, writing proceeds in the order of block numbers arranged in the UBM.

データは、UBM内のどのブロックでも1度の入出力で
読み出せる。レコード内にシーケンシャルなデータが含
まれれば、ブロック番号の単位でバイナリサーチ法を用
いて、指定のデータを捜すことができるので、ファイル
へのアクセス回数を大幅に減らすことができる。
Data can be read from any block within the UBM with a single input/output. If sequential data is included in a record, the specified data can be searched for using the binary search method in units of block numbers, thereby greatly reducing the number of accesses to the file.

〔実施例〕〔Example〕

以下1本発明をメツセージ記録ファイルの読出書込制御
方式に適用した例を、第1図と第2図を組み合わせて説
明する。
An example in which the present invention is applied to a read/write control system for a message recording file will be described below by combining FIGS. 1 and 2.

メツセージ記録情報はユーザごとに別々に収集しなけれ
ばならない。そのため、さらに、ユーザがとのUBMを
持っているのかを示すプロファイルマトリクスPMが必
要となる。
Message recording information must be collected separately for each user. Therefore, a profile matrix PM is also required that indicates whether the user has a UBM.

システムの構築時に、メツセージ記録ファイルを均一の
大きさですべてブロック化し、ブロックに番号を付ける
。ブロック番号1〜4番まではFB M用として、5〜
6番はPM用として使用し、7番以降〜は随時UBM又
はメツセージ情報を実際に格納するためのメツセージブ
ロックMBとして使用される。
When building the system, all message recording files are divided into blocks of uniform size and the blocks are numbered. Block numbers 1 to 4 are for FB M, and 5 to 4 are for FB M.
No. 6 is used for PM, and No. 7 onwards are used as UBM or message block MB for actually storing message information at any time.

例えば、ユーザAがログオンすると、まずUBM用に1
ブロック単位Mの先頭位置からブロック番号を抜く。さ
らに、ユーザAが、指定したメツセージ記録用データペ
ージに相当するブロック番号列をFBMからUBMに移
動する。この時PMにはユーザAのユーザ名とUBMの
番号を覚える。
For example, when user A logs on, he first configures 1 for UBM.
Extract the block number from the first position of block unit M. Further, user A moves the block number string corresponding to the specified message recording data page from the FBM to the UBM. At this time, the PM memorizes the user A's user name and UBM number.

ユーザAのメツセージデータが、1ブロック分溜まると
、UBMの先頭にあるブロックに書き込む。PMでは、
ユーザデータのうち最も古いデータの入っているブロッ
ク番号FωBNと最も新しいデータの入っているブロッ
ク番号しωBNを挿えている。
When one block of user A's message data is accumulated, it is written to the block at the beginning of the UBM. In PM,
Among the user data, a block number FωBN containing the oldest data and a block number FωBN containing the newest data are inserted.

データはVDT端末に出力される1行分のメツセージと
、そのメツセージの出力された時刻、端末上のページを
付けてルーコードとしている6特定の時刻またはページ
数を指定して、メツセージ記録データを再表示する時に
、ブロック番号の並んだ順に指定の時刻またはページの
データを捜すと、最悪の場合、全ブロック数N回ディス
クにアクセスして捜さなければならない、しかし、この
場合はブロック番号列にあわせて時刻または、ページ番
号がシーケンシャルに増加してゆくので、ブロック番号
列をバイナリサーチしてブロックを読み上げ、指定デー
タを捜せばファイルへのアクセス回数はJZyzN回で
すみ、データ量が多くなっても、ファイルへのアクセス
回数はあまり増えず。
The data consists of one line of message output to the VDT terminal, the time the message was output, and the page on the terminal as a code. 6 Specify a specific time or number of pages to record the message record data. When redisplaying, if you search for data at a specified time or page in the order in which the block numbers are arranged, in the worst case, you will have to access the disk N times for all blocks. At the same time, the time or page number increases sequentially, so if you perform a binary search on the block number string, read out the block, and search for the specified data, the number of accesses to the file will be JZyzN times, and the amount of data will increase. However, the number of accesses to the file did not increase much.

捜索時間を一定に保障できる。A constant search time can be guaranteed.

また、ユーザAがログオフすると、ユーザAが使用して
いたUBM上のブロックは、再びFBMに移動されて空
きブロックとして再利用される。
Furthermore, when user A logs off, the block on the UBM that user A was using is moved to the FBM again and reused as a free block.

第3図に示すように、FBMは、oooo。As shown in FIG. 3, the FBM is oooo.

0001、FFFFの3種類の特殊インジケータで区切
られている。ログオフ後のブロック番号は、データの古
い順に並べ変えられて0001とFFFFの間に移動す
る。
It is separated by three special indicators: 0001 and FFFF. After logoff, the block number is rearranged in order of oldest data and moves between 0001 and FFFF.

IPLが行われると第4図に示すように0001とFF
FFの間のブロック番号列はそのままooooと000
1の間に移動される。
When IPL is performed, 0001 and FF are displayed as shown in Figure 4.
The block number string between FF is oooo and 000 as is.
1.

これらの特殊インジケータ内のブロックのデータは、ブ
ロックが再利用されなければ、コマンドによって、印刷
することもできる。
The data of the blocks in these special indicators can also be printed by command if the blocks are not reused.

また、インジケータooooの前のブロックが全くなく
なった時は、新たなユーザのブロックとして再び使用さ
れる。
Furthermore, when the block before the indicator oooo is completely exhausted, it is used again as a block for a new user.

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

本発明によ九ば、ブロック間の接合管理が、ブロックか
ら分離されたため、UBMを読み出せばファイルの読出
書込みとも1度で行えるため、読出書込み等の性能が向
上する。
According to the present invention, since the joint management between blocks is separated from the blocks, reading and writing of a file can be performed at one time by reading the UBM, thereby improving the performance of reading and writing.

ブロックの追加または、削除等も、ブロックマトリクス
間の番号を移動するだけで行えるため、特に大幅な追加
および削除の際は従来より大幅に性能が良くなる。
Addition or deletion of blocks can be performed simply by moving numbers between block matrices, so performance is much better than before, especially when making large additions or deletions.

また、データが、シーケンシャルな要素を含むものであ
れば、データの検索の際、ブロック単位でバイナリサー
チによる検索が行える。順番にサーチする場合と比べて
、ファイルへのアクセス回数は、ブロック数をNとする
と、 (N−%zN)回短縮できる。この差はNの値が
多いほど大きく、検索の性能も高められる。
Furthermore, if the data includes sequential elements, binary search can be performed on a block-by-block basis when searching for data. Compared to the case of searching in order, the number of accesses to a file can be reduced by (N-%zN) times, where N is the number of blocks. This difference increases as the value of N increases, and the search performance also improves.

さらに、マトリクス上の位置によって、優先度を付けた
り、特殊なインジケータを入れてマトリクス内を区切っ
たりして、多彩な使用方法が簡単に行える。
Furthermore, you can easily use it in a variety of ways by assigning priorities or dividing the matrix by inserting special indicators depending on its position on the matrix.

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

第1図は従来のファイルアクセス制御方式の】。 つであるビットマツプ方式と本発明のブロック番号マト
リクス方式を対応させた一実施例の説明図、第2図はユ
ーザ毎に使用マトリクス番号を登録しであるプロファイ
ルマトリクステーブル、第3図はユーザがログオフ後に
ブロック番号がFBM内に戻された例を示す説明図、第
4図はさらにIPL後にFBM内のブロック番号を移動
した例を示す説明図である。 BM・・・ブロックマツプ、B・・・使用中、■・・・
空。 FBM・・・フリーブロック番号マトリクス、BN・・
・ブロック番号、IND・・・特殊インジケータ。 DB・・・データブロック、BP・・・先行ブロックポ
インタ、NP・・・後続ブロックポインタ、UBM・・
・ユーザブロック番号マトリクス、BN・・・ブロック
番号r D R1〜DR4・・・レコード、PM・・・
プロファイルマトリクス、USNAME・・・ユーザ名
称。 UBMNO・・・UBMのブロック番号。
Figure 1 shows a conventional file access control system. An explanatory diagram of an embodiment in which the bitmap method of the present invention corresponds to the block number matrix method of the present invention, FIG. 2 shows a profile matrix table in which matrix numbers used by each user are registered, and FIG. 3 shows a profile matrix table in which a user logs off. FIG. 4 is an explanatory diagram showing an example in which the block number is later returned to the FBM, and FIG. 4 is an explanatory diagram showing an example in which the block number in the FBM is further moved after IPL. BM...Block map, B...In use, ■...
Sky. FBM...Free block number matrix, BN...
・Block number, IND...Special indicator. DB...Data block, BP...Preceding block pointer, NP...Subsequent block pointer, UBM...
・User block number matrix, BN...Block number r DR1~DR4...Record, PM...
Profile matrix, USNAME...User name. UBMNO: UBM block number.

Claims (1)

【特許請求の範囲】[Claims] 1、複数のブロックから成るデータ域とそのブロックの
制御域とから成るファイル読出書込制御方式において、
全てのブロックに個別の番号を付け、制御域に、空きブ
ロックをそのブロック番号列で表わしたマトリクスと、
使用中のブロックの論理的な結合をそのブロック番号列
で示したマトリクスを設けたことを特徴とするファイル
のスペース管理方式。
1. In a file read/write control method consisting of a data area consisting of a plurality of blocks and a control area of the block,
Each block is assigned an individual number, and a control area is provided with a matrix in which free blocks are represented by their block number sequences.
A file space management method characterized by providing a matrix that shows logical combinations of blocks in use by block number sequences.
JP61135987A 1986-06-13 1986-06-13 Space managing system for file Pending JPS62293448A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61135987A JPS62293448A (en) 1986-06-13 1986-06-13 Space managing system for file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61135987A JPS62293448A (en) 1986-06-13 1986-06-13 Space managing system for file

Publications (1)

Publication Number Publication Date
JPS62293448A true JPS62293448A (en) 1987-12-21

Family

ID=15164544

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61135987A Pending JPS62293448A (en) 1986-06-13 1986-06-13 Space managing system for file

Country Status (1)

Country Link
JP (1) JPS62293448A (en)

Similar Documents

Publication Publication Date Title
EP0375188B1 (en) File system
CN113568582A (en) Data management method and device and storage equipment
EP0389999B1 (en) Apparatus and method for digital data management
US5634123A (en) Data management using nested records and code points
CN116431080A (en) Data disc-dropping method, system, equipment and computer readable storage medium
EP4134802A1 (en) Method and apparatus for data access of nand flash file, and storage medium
JPS62293448A (en) Space managing system for file
JPH0277949A (en) File producing method
CN114328018A (en) Snapshot creating method, computing device and storage medium
CN112181973B (en) Time sequence data storage method
GB2400927A (en) Method of managing memory by checking that none of the sectors in a block is needed before erasing the block.
JPH04289931A (en) Variable length file managing system
JP3925461B2 (en) Computer system
JPH0258653B2 (en)
JPH04350738A (en) Disk space management system
JP2615046B2 (en) Record addition processing method
JPS5853010A (en) Serial recording data file constituting method
JPH02138645A (en) Processing system for input order file
JPH01255028A (en) Method for making access to external storage device
JPS63286926A (en) Split storage system for variable length record
JPS62154149A (en) Control system for data area allocation of area shared file
JP3925246B2 (en) Computer system
JPH0320841A (en) File access system
JPS6074054A (en) Conversion processing system for data set
JPH06348572A (en) Multi-mechanism disk system