JPH04350738A - Disk space management system - Google Patents

Disk space management system

Info

Publication number
JPH04350738A
JPH04350738A JP3152609A JP15260991A JPH04350738A JP H04350738 A JPH04350738 A JP H04350738A JP 3152609 A JP3152609 A JP 3152609A JP 15260991 A JP15260991 A JP 15260991A JP H04350738 A JPH04350738 A JP H04350738A
Authority
JP
Japan
Prior art keywords
area
unit
data
size
physical
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
JP3152609A
Other languages
Japanese (ja)
Inventor
Takahiro Asano
浅野 高弘
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 JP3152609A priority Critical patent/JPH04350738A/en
Publication of JPH04350738A publication Critical patent/JPH04350738A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve the use efficiency of the space on a magnetic disk device in a file system where a unit of input/output and area reservation is extended to plual blocks. CONSTITUTION:The reservation size of an area required to write data in unit logical areas L0 to L5 of the 32-block size, which constitute a logical area L of a file recognized by a user program, into a physical area P on the magnetic disk device is selected from three kinds of block number 1, 8, and 32 in accordance with the data volume to be written. That is, when new write of data having 22-block, 7-block, One-block, 3-block, one-block, and 29-block sizes on unit logical areas L0 to L5 is requested, 32 blocks of a unit physical area P0, 8 first blocks of a unit physical area P1, one first block of a unit physical area P2, 9th to 16th blocks of the unit physical area P1, the second block of the unit physical area P2, and 32 blocks of a unit physical area P3 are reserved in order, and data in unit logical areas L0 to L5 are written in these reserved blocks, and correspondence relations between logical areas and physical areas are independently managed.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、磁気ディスク装置上の
大容量ファイルの高速な入出力を行う目的で或る程度の
大きさを持つ連続領域を入出力の単位としてファイル領
域の確保を行っている電子計算機におけるファイルシス
テムに関し、特に磁気ディスク装置上の物理領域の使用
効率を改善することができるディスクスペース管理方式
に関する。
[Industrial Application Field] The present invention secures a file area using a continuous area of a certain size as a unit of input/output for the purpose of high-speed input/output of large-capacity files on a magnetic disk device. The present invention relates to file systems in electronic computers, and particularly to a disk space management method that can improve the efficiency of using physical areas on magnetic disk devices.

【0002】0002

【従来の技術】電子計算機におけるファイルシステムの
一種に、ユーザプログラムが認識するファイルの論理領
域を一般のファイルシステムの入出力の単位である1ブ
ロックの整数倍(例えば32倍)のサイズを持つ単位論
理領域に分割すると共に磁気ディスク装置上の物理領域
を同サイズの連続する単位物理領域に分割し、それらの
単位論理領域と単位物理領域とを1対1に対応させ、1
単位物理領域を入出力の単位とすることで、磁気ディス
ク装置上の大容量ファイルの高速な入出力を可能にした
ファイルシステムが報告されている。
[Background Art] A type of file system in electronic computers is used to define the logical area of a file recognized by a user program in units having a size that is an integral multiple (for example, 32 times) of one block, which is the input/output unit of a general file system. In addition to dividing the physical area into logical areas, the physical area on the magnetic disk device is divided into continuous unit physical areas of the same size, and the unit logical areas and unit physical areas are made to correspond one-to-one.
A file system has been reported that enables high-speed input/output of large-capacity files on a magnetic disk device by using a unit physical area as a unit of input/output.

【0003】0003

【発明が解決しようとする課題】上述したファイルシス
テムでは、単位論理領域と単位物理領域とが1対1に対
応しているため、或る単位論理領域のデータを磁気ディ
スク装置へ書き込む際には、書き込みデータのサイズが
単位物理領域のサイズに比べてかなり小さい場合でも1
つの単位物理領域が確保されることになる。
[Problems to be Solved by the Invention] In the above-mentioned file system, since the unit logical area and the unit physical area have a one-to-one correspondence, when writing data in a certain unit logical area to a magnetic disk device, , even if the size of the write data is much smaller than the size of the unit physical area.
One unit physical area will be secured.

【0004】このため、磁気ディスク装置上のスペース
効率が劣化してしまうという問題点があった。
For this reason, there has been a problem in that the space efficiency on the magnetic disk device is degraded.

【0005】本発明はこのような従来の問題点を解決し
たもので、その目的は、入出力の単位を複数ブロック単
位に拡張することにより大容量のファイルデータを高速
に入出力できるようにした電子計算機におけるファイル
システムにおいて、磁気ディスク装置上の物理領域の使
用効率を高めることにある。
The present invention solves these conventional problems, and its purpose is to expand the input/output unit to multiple blocks so that large amounts of file data can be input/output at high speed. The purpose of this invention is to improve the efficiency of using physical areas on magnetic disk devices in file systems for electronic computers.

【0006】[0006]

【課題を解決するための手段】本発明は上記の目的を達
成するために、ユーザプログラムの認識するファイルの
論理領域を複数ブロックサイズの単位論理領域に分割す
ると共に磁気ディスク装置上の物理領域を前記単位論理
領域と同じサイズの連続する単位物理領域に分割し、入
出力の単位を複数ブロック単位に拡張することにより大
容量のファイルデータの入出力を高速化した電子計算機
におけるファイルシステムにおいて、前記論理領域と前
記物理領域との対応関係を保持する論理・物理間マッピ
ング管理テーブルと、前記磁気ディスク装置上の未使用
の物理領域を管理するためのフリー領域管理テーブルと
、前記論理・物理間マッピング管理テーブルを使用して
前記論理領域と前記物理領域との対応関係を管理すると
共に前記フリー領域管理テーブルを使用して前記物理領
域の使用状態を管理し、前記ユーザプログラムからの論
理領域番号を指定したデータの新規書き込み要求時、前
記単位物理領域と同じサイズ,それより小さな幾つかの
サイズに設定された複数種類の確保領域サイズのうちか
ら前記要求されたデータのサイズに適する確保領域サイ
ズを決定し、この決定した確保領域サイズの物理領域を
未使用の単位物理領域あるいは同じ確保領域サイズで一
部使用されている単位物理領域から確保するリアロケー
ション処理手段と、このリアロケーション処理手段で確
保された物理領域に、前記指定された論理領域番号に対
応する単位論理領域のデータを磁気ディスク装置制御手
段を通じて書き込む入出力制御手段とを備えている。
[Means for Solving the Problems] In order to achieve the above object, the present invention divides the logical area of a file recognized by a user program into unit logical areas of multiple block sizes, and also divides the physical area on a magnetic disk device. In the file system for an electronic computer, which speeds up the input and output of large-capacity file data by dividing the unit into continuous unit physical areas of the same size as the unit logical area and expanding the input/output unit into multiple blocks. a logical-physical mapping management table that maintains the correspondence between logical areas and the physical areas; a free area management table for managing unused physical areas on the magnetic disk device; and the logical-physical mapping. Managing the correspondence between the logical area and the physical area using a management table, managing the usage status of the physical area using the free area management table, and specifying a logical area number from the user program. When a new write request is made for the requested data, a secured area size suitable for the requested data size is determined from among multiple types of secured area sizes set to the same size as the unit physical area and several smaller sizes. Then, a reallocation processing means that secures a physical area of this determined secured area size from an unused unit physical area or a partially used unit physical area with the same secured area size, and and input/output control means for writing data of a unit logical area corresponding to the designated logical area number into the physical area through a magnetic disk device control means.

【0007】また、前記ユーザプログラムからの論理領
域番号を指定したデータの上書き又は追加書き込み要求
時、前記リアロケーション処理手段は、上書き又は追加
書き込み後のデータサイズが上書き又は追加書き込みさ
れる以前のデータの為に既に確保された物理領域のサイ
ズを越えるか否かを調べ、越えない場合には既に確保さ
れた物理領域を前記入出力制御手段に通知し、越える場
合には上書き又は追加書き込み後のデータサイズに適し
たサイズの物理領域を未使用の単位物理領域あるいは同
じ確保領域サイズで一部使用されている単位物理領域か
ら確保すると共に追加書き込み時には元のデータを前記
新たに確保した物理領域に転送して前記新たに確保した
物理領域を前記入出力制御手段に通知し且つ前記元の確
保領域を解放し、前記入出力制御手段は、通知された物
理領域に、前記上書き又は追加書き込みの要求されたデ
ータを前記磁気ディスク装置制御手段を通じて書き込む
ようにしている。
[0007]Furthermore, when the user program requests overwriting or additional writing of data specifying a logical area number, the reallocation processing means changes the data size after overwriting or additional writing to the data before being overwritten or additionally written. Check whether the size of the physical area that has already been reserved for A physical area of a size suitable for the data size is secured from an unused unit physical area or a partially used unit physical area with the same secured area size, and when additional writing is performed, the original data is transferred to the newly allocated physical area. The input/output control means is notified of the newly secured physical area by transfer, and the original secured area is released, and the input/output control means requests the overwriting or additional writing in the notified physical area. The data is written through the magnetic disk device control means.

【0008】[0008]

【作用】本発明のディスクスペース管理方式においては
、ユーザプログラムからの論理領域番号を指定したデー
タの新規書き込み要求時、リアロケーション処理手段が
、単位物理領域と同じサイズ,それより小さな幾つかの
サイズに設定された複数種類の確保領域サイズのうちか
ら前記要求されたデータのサイズに適する確保領域サイ
ズを決定し、この決定した確保領域サイズの物理領域を
未使用の単位物理領域あるいは同確保領域サイズで一部
使用されている単位物理領域から確保し、この確保され
た物理領域に、入出力制御手段が前記指定された論理領
域番号に対応する単位論理領域のデータを磁気ディスク
装置制御手段を通じて書き込む。
[Operation] In the disk space management method of the present invention, when a new write request for data specifying a logical area number is made from a user program, the reallocation processing means selects a unit physical area of the same size or several smaller sizes. The secured area size suitable for the requested data size is determined from among the multiple types of secured area sizes set in , and the physical area of the determined secured area size is used as an unused unit physical area or the same secured area size. The input/output control means writes the data of the unit logical area corresponding to the specified logical area number into the secured physical area through the magnetic disk device control means. .

【0009】また、ユーザプログラムからの論理領域番
号を指定したデータの上書き又は追加書き込み要求時、
リアロケーション処理手段が、上書き又は追加書き込み
後のデータサイズが上書き又は追加書き込みされる以前
のデータの為に既に確保された物理領域のサイズを越え
るか否かを調べ、越えない場合には既に確保された物理
領域を入出力制御手段に通知し、入出力制御手段がその
通知された物理領域に前記上書き又は追加書き込みの要
求されたデータを磁気ディスク装置制御手段を通じて書
き込む。反対に、越える場合は、リアロケーション処理
手段が、上書き又は追加書き込み後のデータサイズに適
したサイズの物理領域を未使用の単位物理領域あるいは
同じ確保領域サイズで一部使用されている単位物理領域
から確保すると共に追加書き込み時には元のデータを前
記新たに確保した物理領域に転送して前記新たに確保し
た物理領域を前記入出力制御手段に通知し、入出力制御
手段がその通知された物理領域に前記上書き又は追加書
き込みの要求されたデータを磁気ディスク装置制御手段
を通じて書き込む。なお、この場合、上書き又は追加書
き込みされる前のデータを記録していた元の確保領域は
、リアロケーション処理手段によって解放される。
[0009] Furthermore, when a user program requests overwriting or additional writing of data specifying a logical area number,
The reallocation processing means checks whether the data size after overwriting or additional writing exceeds the size of the physical area already reserved for the data before being overwritten or additionally written, and if it does not exceed the size, the data size is already reserved. The input/output control means writes the data requested to be overwritten or additionally written to the notified physical area through the magnetic disk device control means. On the other hand, if the data size is exceeded, the reallocation processing means transfers a physical area of a size suitable for the data size after overwriting or additional writing to an unused unit physical area or a partially used unit physical area with the same secured area size. At the time of additional writing, the original data is transferred to the newly secured physical area, the newly secured physical area is notified to the input/output control means, and the input/output control means transfers the data to the newly secured physical area. The data requested to be overwritten or additionally written is written through the magnetic disk device control means. In this case, the original reserved area in which data was recorded before being overwritten or additionally written is released by the reallocation processing means.

【0010】0010

【実施例】次に、本発明の実施例について図面を参照し
て詳細に説明する。
Embodiments Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0011】図1を参照すると、本発明の一実施例は、
ファイルのデータ領域の割り当て単位を拡大することで
大容量のファイルデータの入出力を高速化するために使
用される高速ファイル管理手段1と、ユーザプログラム
9の認識する論理領域と磁気ディスク装置8上の物理領
域との対応を取って入出力の管理を行う入出力制御手段
2と、磁気ディスク装置8からの読み出しまたは磁気デ
ィスク装置8への書き込みを制御する磁気ディスク装置
制御手段7と、磁気ディスク装置8上の使われていない
領域を管理するためのフリー領域管理テーブル3と、論
理領域と物理領域との間の対応関係を保持する論理・物
理間マッピング管理テーブル4と、磁気ディスク装置8
上でデータの置かれる領域を変更する転送処理手段5と
、上記のフリー領域管理テーブル3,論理・物理間マッ
ピング管理テーブル4および転送処理手段5を用いてデ
ィスクスペースの効率化を図るリアロケーション処理手
段6とから構成されている。
Referring to FIG. 1, one embodiment of the present invention includes:
A high-speed file management means 1 used to speed up the input/output of large-capacity file data by expanding the allocation unit of the file data area, a logical area recognized by the user program 9, and a magnetic disk device 8. an input/output control means 2 that manages input/output in correspondence with the physical area of the magnetic disk device 8; a magnetic disk device control means 7 that controls reading from or writing to the magnetic disk device 8; A free area management table 3 for managing unused areas on the device 8, a logical-physical mapping management table 4 for maintaining the correspondence between logical areas and physical areas, and a magnetic disk device 8.
Transfer processing means 5 for changing the area where data is placed, and reallocation processing for improving the efficiency of disk space by using the above free area management table 3, logical/physical mapping management table 4 and transfer processing means 5. means 6.

【0012】図2はユーザプログラム9が認識するファ
イルの論理領域Lと磁気ディスク装置8上の物理領域P
との構成例および両者の関係を示す図である。同図に示
すように、ユーザプログラム9の認識する論理領域Lは
32ブロックサイズの単位論理領域L0〜L5に分割さ
れ、磁気ディスク装置8上の物理領域Pも同じ32ブロ
ックサイズの連続する単位物理領域P0〜P5に分割さ
れている。
FIG. 2 shows a logical area L of a file recognized by the user program 9 and a physical area P on the magnetic disk device 8.
It is a figure which shows the example of a structure with and the relationship between both. As shown in the figure, the logical area L recognized by the user program 9 is divided into unit logical areas L0 to L5 of 32 block size, and the physical area P on the magnetic disk device 8 is also a continuous unit physical area of the same 32 block size. It is divided into regions P0 to P5.

【0013】そして、本実施例では、論理領域Lを構成
する32ブロックサイズの単位論理領域L0〜L5上の
データを物理領域Pに新規に書き込むのに必要な領域の
確保サイズとして、ブロック1個分のサイズ,ブロック
8個分のサイズ,ブロック32個分のサイズの合計3種
類のサイズを設定し、書き込むデータ量に応じてそれら
の中から適切な確保領域サイズを決定するようにしてい
る。
[0013] In this embodiment, one block is set as the reserved size of the area necessary for newly writing data on the unit logical areas L0 to L5 of 32 block size constituting the logical area L to the physical area P. A total of three types of sizes are set: a size for 1 minute, a size for 8 blocks, and a size for 32 blocks, and an appropriate secured area size is determined from among them according to the amount of data to be written.

【0014】即ち、書き込みの要求された論理領域上の
データのサイズが、1ブロックであれば1ブロックのサ
イズの物理領域を確保し、2〜8ブロックであれば8ブ
ロックのサイズの物理領域を確保し、9〜32ブロック
であれば32ブロックのサイズの物理領域を確保する。
That is, if the size of the data on the logical area for which writing is requested is 1 block, a physical area of 1 block size is secured, and if it is 2 to 8 blocks, a physical area of 8 blocks size is secured. If it is 9 to 32 blocks, a physical area of 32 blocks in size is secured.

【0015】図3はユーザプログラム9からの書き込み
要求時にリアロケーション処理手段6で実施される処理
の一例を示す流れ図であり、以下、上述のように構成さ
れた本実施例の書き込み時の動作を説明する。
FIG. 3 is a flowchart showing an example of the processing executed by the reallocation processing means 6 when a write request is received from the user program 9. The write operation of this embodiment configured as described above will be explained below. explain.

【0016】今、ユーザプログラム9が図2に示すよう
な入出力対象ファイルの論理領域Lのうちの単位論理領
域L0上の22ブロックサイズのデータ(ドットを付し
た部分)の新規書き込みを求める入出力要求を出したと
すると、この入出力要求は高速ファイル管理手段1を通
じて入出力制御手段2に伝えられ、入出力制御手段2は
必要な情報と共に制御をリアロケーション処理手段6に
渡す。
Now, the user program 9 is executing an input request to newly write 22 block size data (dotted area) in the unit logical area L0 of the logical area L of the input/output file as shown in FIG. When an output request is issued, this input/output request is transmitted to the input/output control means 2 through the high-speed file management means 1, and the input/output control means 2 passes control along with necessary information to the reallocation processing means 6.

【0017】リアロケーション処理手段6は、新規デー
タの書き込みなので、図2の処理S1を経て処理S2に
進み、今回のデータサイズ(22ブロック)に応じた確
保領域サイズとして、32ブロックサイズを決定する。
Since the reallocation processing means 6 is writing new data, it proceeds to processing S2 via processing S1 in FIG. 2, and determines a size of 32 blocks as the secured area size corresponding to the current data size (22 blocks). .

【0018】次にリアロケーション処理手段6は、上記
決定された32ブロックサイズの物理領域を、今回のデ
ータの書き込みに使用する領域として磁気ディスク装置
8から確保する(S3)。
Next, the reallocation processing means 6 reserves the above-determined physical area of 32 block size from the magnetic disk device 8 as an area to be used for writing the current data (S3).

【0019】今、磁気ディスク装置8上の物理領域の全
ての単位物理領域P0〜P5がフリー領域としてフリー
領域管理テーブル3で管理されているとすると、リアロ
ケーション処理手段6は、例えば単位論理領域P0の3
2ブロックを今回のデータの書き込みに使用する領域と
して確保する。
Now, assuming that all unit physical areas P0 to P5 of the physical areas on the magnetic disk device 8 are managed as free areas in the free area management table 3, the reallocation processing means 6, for example, P0 no 3
Secure two blocks as the area to be used for writing the current data.

【0020】このときリアロケーション処理手段6は、
単位物理領域P0の確保に応じ、論理・物理間マッピン
グ管理テーブル4に単位論理領域L0の番号(論理領域
番号とも言う)と単位物理領域P0の番号(物理領域番
号とも言う)およびそのブロック位置(0〜31)との
対応関係を記録し、また、単位物理領域P0の32ブロ
ックを割り当てに使用したので、それに合わせてフリー
領域管理テーブル3の内容を更新する。これらの処理は
処理S4で行われる。
At this time, the reallocation processing means 6
In response to securing the unit physical area P0, the number of the unit logical area L0 (also referred to as the logical area number), the number of the unit physical area P0 (also referred to as the physical area number), and its block position ( 0 to 31), and since 32 blocks of the unit physical area P0 were used for allocation, the contents of the free area management table 3 are updated accordingly. These processes are performed in process S4.

【0021】以上の処理を終えると、リアロケーション
処理手段6は、処理S3で確保した単位物理領域P0の
番号とそのブロック位置(0〜31)とを含む物理領域
情報を入出力制御手段2に返却する(S5)。
[0021] When the above processing is completed, the reallocation processing means 6 sends the physical area information including the number of the unit physical area P0 secured in step S3 and its block position (0 to 31) to the input/output control means 2. Return it (S5).

【0022】物理領域情報の通知を受けた入出力制御手
段2は、磁気ディスク装置制御手段7に対し単位物理領
域P0のブロック位置(0〜31)への入出力要求を発
行する。これに応答して磁気ディスク装置制御手段7は
、ユーザプログラム9から新規書き込みの要求された2
2ブロックサイズのデータを磁気ディスク装置8の物理
領域Pにおける単位物理領域P0に書き込む。
The input/output control means 2, which has been notified of the physical area information, issues an input/output request to the block positions (0 to 31) of the unit physical area P0 to the magnetic disk device control means 7. In response, the magnetic disk device control means 7 receives the new write request from the user program 9.
Two block size data is written to the unit physical area P0 in the physical area P of the magnetic disk device 8.

【0023】このようにして、図2に示すように、単位
論理領域L0の22ブロックサイズのデータは、単位物
理領域P0の32ブロックの確保領域にその先頭より書
き込まれることになる。
In this way, as shown in FIG. 2, the 22 block size data of the unit logical area L0 is written into the 32 block secured area of the unit physical area P0 from the beginning thereof.

【0024】次に、ユーザプログラム9が図2の単位論
理領域L1上の7ブロックサイズのデータの新規書き込
みを求める入出力要求を出したとすると、前述と同様に
して必要な情報と共に制御がリアロケーション処理手段
6に渡され、リアロケーション処理手段6は、新規デー
タの書き込みなので、図2の処理S1〜S5を実行する
Next, if the user program 9 issues an input/output request requesting new writing of 7 block size data on the unit logical area L1 in FIG. The data is passed to the location processing means 6, and the reallocation processing means 6 executes processes S1 to S5 in FIG. 2 because new data is to be written.

【0025】そして、処理S2では、今回のデータサイ
ズが7ブロックなので、確保領域サイズを8ブロックサ
イズに決定し、次の処理S3では、フリー領域である単
位物理領域P1の先頭から8ブロック(0〜7)を今回
のデータの書き込みに使用する8ブロックサイズの物理
領域として確保する。なお、このときリアロケーション
処理手段6は、処理S4において、上記確保した単位物
理領域P1のブロック位置(0〜7)に基づき、論理・
物理間マッピング管理テーブル4に、単位論理領域L1
の番号と単位物理領域P1の番号およびブロック位置(
0〜7)との対応関係を記録し、また、単位物理領域P
1の先頭の8ブロックを確保したので、それに合わせて
フリー領域管理テーブル3の内容を更新する。
Then, in process S2, since the current data size is 7 blocks, the reserved area size is determined to be 8 blocks, and in the next process S3, 8 blocks (0 ~7) is secured as a physical area of 8 block size to be used for writing the current data. At this time, the reallocation processing means 6 performs logical and
In the physical mapping management table 4, the unit logical area L1
number, unit physical area P1 number, and block position (
0 to 7), and also record the correspondence relationship with the unit physical area P.
Since the first 8 blocks of 1 have been secured, the contents of the free area management table 3 are updated accordingly.

【0026】以上の処理を終えると、リアロケーション
処理手段6は、処理S3で確保した単位物理領域P1の
番号とブロック位置(0〜7)とを含む物理領域情報を
入出力制御手段2に返却し(S5)、入出力制御手段2
は、磁気ディスク装置制御手段7に対し単位物理領域P
1のブロック(0〜7)への入出力要求を発行する。こ
れに応答して磁気ディスク装置制御手段7は、ユーザプ
ログラム9から新規書き込みの要求された7ブロックサ
イズのデータを磁気ディスク装置8の単位物理領域P1
に書き込む。
After completing the above processing, the reallocation processing means 6 returns the physical area information including the number and block position (0 to 7) of the unit physical area P1 secured in step S3 to the input/output control means 2. (S5), input/output control means 2
is a unit physical area P for the magnetic disk device control means 7.
Issues an input/output request to block 1 (0 to 7). In response, the magnetic disk device control means 7 transfers the 7 block size data requested for new writing from the user program 9 to the unit physical area P1 of the magnetic disk device 8.
write to.

【0027】このようにして、図2に示すように、単位
論理領域L1の7ブロックサイズのデータは、単位物理
領域P1の0〜7ブロックの確保領域にその先頭より書
き込まれることになる。
In this way, as shown in FIG. 2, the data of the 7 block size in the unit logical area L1 is written from the beginning to the reserved area of blocks 0 to 7 of the unit physical area P1.

【0028】次に、ユーザプログラム9が図2の単位論
理領域L2の1ブロックサイズのデータの新規書き込み
を求める入出力要求を出すと、前述と同様にして必要な
情報と共に制御がリアロケーション処理手段6に渡され
、リアロケーション処理手段6は、新規データの書き込
みなので、図2の処理S1〜S5を実行する。
Next, when the user program 9 issues an input/output request requesting new writing of data of one block size in the unit logical area L2 of FIG. 6, and the reallocation processing means 6 executes processes S1 to S5 in FIG. 2 because new data is to be written.

【0029】そして、処理S2では、今回のデータサイ
ズが1ブロックなので、確保領域サイズは1ブロックに
決定される。そして、次の処理S3で、フリー領域であ
る単位物理領域P2の先頭の1ブロックが今回のデータ
の書き込みに使用する物理領域として確保される。なお
、このとき単位物理領域P1は8ブロック単位が1つ確
保されただけで残りの24ブロックはフリー領域であり
、そこから1ブロック確保することも可能であるが、本
実施例では、1物理領域番号に対応する32ブロックサ
イズの単位物理領域内では同じサイズで領域を確保する
ようにしているので、上述の如く単位物理領域P2の先
頭の1ブロックを確保するものである。
In step S2, since the current data size is one block, the secured area size is determined to be one block. Then, in the next process S3, the first block of the unit physical area P2, which is a free area, is secured as a physical area to be used for writing the current data. At this time, in the unit physical area P1, only one 8-block unit is secured, and the remaining 24 blocks are free areas, and it is also possible to secure one block from there, but in this embodiment, one physical Since areas of the same size are secured within the unit physical area of 32 block size corresponding to the area number, the first block of the unit physical area P2 is secured as described above.

【0030】また、このときリアロケーション処理手段
6は、処理S4において、上記確保した単位物理領域P
2に基づき、論理・物理間マッピング管理テーブル4に
、単位論理領域L2の番号と単位物理領域P2の番号お
よびブロック位置(0)との対応関係を記録し、更に、
単位物理領域P2の先頭の1ブロックを確保したので、
それに合わせてフリー領域管理テーブル3の内容を更新
する。
[0030] Also, at this time, the reallocation processing means 6, in process S4, uses the secured unit physical area P.
2, record the correspondence between the number of the unit logical area L2, the number of the unit physical area P2, and the block position (0) in the logical-physical mapping management table 4, and further,
Since we have secured the first block of unit physical area P2,
The contents of the free area management table 3 are updated accordingly.

【0031】以上の処理を終えると、リアロケーション
処理手段6は、処理S3で決定した単位物理領域P2の
番号とそのブロック位置(0)とを含む物理領域情報を
入出力制御手段2に返却し(S5)、入出力制御手段2
は、磁気ディスク装置制御手段7に対し単位物理領域P
2の第0ブロックへの入出力要求を発行する。これに応
答して磁気ディスク装置制御手段7は、ユーザプログラ
ム9から新規書き込みの要求された1ブロックサイズの
データを磁気ディスク装置8の単位物理領域P2に書き
込む。
[0031] Upon completion of the above processing, the reallocation processing means 6 returns physical area information including the number of the unit physical area P2 determined in processing S3 and its block position (0) to the input/output control means 2. (S5), input/output control means 2
is a unit physical area P for the magnetic disk device control means 7.
Issue an input/output request to the 0th block of 2. In response to this, the magnetic disk device control means 7 writes the data of one block size requested for new writing from the user program 9 into the unit physical area P2 of the magnetic disk device 8.

【0032】このようにして、図2に示すように、単位
論理領域L2の1ブロックサイズのデータは、単位物理
領域P2の第0ブロックの確保領域に書き込まれること
になる。
In this way, as shown in FIG. 2, data of one block size in the unit logical area L2 is written to the reserved area of the 0th block of the unit physical area P2.

【0033】ここまでの物理領域Pの使用方法は従来と
同様であるが、以下の場合が従来と異なる。
The method of using the physical area P up to this point is the same as the conventional method, but the following cases differ from the conventional method.

【0034】ユーザプログラム9が図2の単位論理領域
L3の3ブロックサイズのデータの新規書き込みを求め
る入出力要求を出すと、前述と同様にして必要な情報と
共に制御がリアロケーション処理手段6に渡され、リア
ロケーション処理手段6は、新規データの書き込みなの
で、図2の処理S1〜S5を実行する。
When the user program 9 issues an input/output request requesting new writing of 3 block size data in the unit logical area L3 in FIG. Since this is writing new data, the reallocation processing means 6 executes processes S1 to S5 in FIG.

【0035】そして、処理S2では、今回のデータサイ
ズが3ブロックなので、確保領域サイズは8ブロックに
決定される。そして、次の処理S3で、1つの8ブロッ
ク単位が既に確保されているがフリー領域管理テーブル
3によってその第8番目から31番目までのブロックが
フリー領域として管理されている単位物理領域P1の第
8番目から15番目までの8ブロックが今回のデータの
書き込みに使用する1つの8ブロック単位として確保さ
れる。なお、このときリアロケーション処理手段6は、
処理S4において、上記確保した単位物理領域P1のブ
ロックに基づき、論理・物理間マッピング管理テーブル
4に、単位論理領域L3の番号と単位物理領域P1の番
号およびブロック位置(8〜15)との対応関係を記録
し、また、単位物理領域P1の第8番目から15番目ま
での8ブロックを確保したので、それに合わせてフリー
領域管理テーブル3の内容を更新する。
In process S2, since the current data size is 3 blocks, the secured area size is determined to be 8 blocks. Then, in the next process S3, one 8-block unit is already secured, but the free area management table 3 manages the 8th to 31st blocks as free areas in the unit physical area P1. The 8 blocks from the 8th to the 15th are secured as one 8 block unit to be used for writing the current data. Note that at this time, the reallocation processing means 6
In process S4, based on the blocks of the unit physical area P1 secured above, the correspondence between the number of the unit logical area L3, the number of the unit physical area P1, and the block position (8 to 15) is added to the logical-physical mapping management table 4. Since the relationship has been recorded and eight blocks from the 8th to the 15th block of the unit physical area P1 have been secured, the contents of the free area management table 3 are updated accordingly.

【0036】以上の処理を終えると、リアロケーション
処理手段6は、処理S3で確保した単位物理領域P1の
番号とそのブロック位置(8〜15)とを含む物理領域
情報を入出力制御手段2に返却し(S5)、入出力制御
手段2は、磁気ディスク装置制御手段7に対し単位物理
領域P1の8〜15ブロックへの入出力要求を発行する
。これに応答して磁気ディスク装置制御手段7は、ユー
ザプログラム9から新規書き込みの要求された3ブロッ
クサイズのデータを磁気ディスク装置8の単位物理領域
P1に書き込む。
When the above processing is completed, the reallocation processing means 6 sends the physical area information including the number of the unit physical area P1 secured in step S3 and its block position (8 to 15) to the input/output control means 2. The input/output control means 2 then issues an input/output request to the 8th to 15th blocks of the unit physical area P1 to the magnetic disk device control means 7 (S5). In response, the magnetic disk device control means 7 writes the 3-block size data requested for new writing by the user program 9 into the unit physical area P1 of the magnetic disk device 8.

【0037】このようにして、図2に示すように、論理
領域番号L3の3ブロックサイズのデータは、単位物理
領域P1の第8番目のブロックから第15番のブロック
までの確保領域にその先頭より書き込まれることになる
In this way, as shown in FIG. 2, the 3-block size data of the logical area number L3 is stored in the reserved area from the 8th block to the 15th block of the unit physical area P1. More will be written.

【0038】次に、ユーザプログラム9が図2の単位論
理領域L4の1ブロックサイズのデータの新規書き込み
を求める入出力要求を出すと、前述と同様にして必要な
情報と共に制御がリアロケーション処理手段6に渡され
、新規データの書き込みなので、図2の処理S1〜S5
が実行される。
Next, when the user program 9 issues an input/output request requesting new writing of data of one block size in the unit logical area L4 in FIG. 6, and new data is written, so processes S1 to S5 in FIG.
is executed.

【0039】そして、処理S2では、今回のデータサイ
ズが1ブロックなので、確保領域サイズがは1ブロック
に決定され、次の処理S3で、1つの1ブロック単位が
既に確保されているが第1ブロック以降がフリー領域と
してフリー領域管理テーブル3で管理されている単位物
理領域P2から第1ブロックが今回のデータの書き込み
に使用する1つの1ブロック単位として確保される。こ
のときリアロケーション処理手段6は、処理S4におい
て、上記確保した単位物理領域P2のブロックに基づき
、論理・物理間マッピング管理テーブル4に、単位論理
領域L4の番号と単位物理領域P2の番号およびそのブ
ロック位置(1)との対応関係を記録し、また、その確
保に応じてフリー領域管理テーブル3の内容を更新する
Then, in process S2, since the current data size is 1 block, the secured area size is determined to be 1 block, and in the next process S3, one block unit has already been secured, but the first block The first block from the unit physical area P2, which is managed in the free area management table 3 as a free area thereafter, is secured as one block unit to be used for writing the current data. At this time, in process S4, the reallocation processing means 6 adds the number of the unit logical area L4, the number of the unit physical area P2, and its The correspondence with block position (1) is recorded, and the contents of the free area management table 3 are updated in accordance with the reservation.

【0040】以上の処理を終えると、リアロケーション
処理手段6は、処理S3で確保した単位物理領域P2の
番号とそのブロック位置(1)とを含む物理領域情報を
入出力制御手段2に返却し(S5)、入出力制御手段2
は、磁気ディスク装置制御手段7に対し単位物理領域P
2の第1ブロックへの入出力要求を発行する。これに応
じて磁気ディスク装置制御手段7は、ユーザプログラム
9から新規書き込みの要求された1ブロックサイズのデ
ータを磁気ディスク装置8の単位物理領域P2へ書き込
む。
[0040] When the above processing is completed, the reallocation processing means 6 returns the physical area information including the number of the unit physical area P2 secured in processing S3 and its block position (1) to the input/output control means 2. (S5), input/output control means 2
is a unit physical area P for the magnetic disk device control means 7.
2 issues an input/output request to the first block. In response to this, the magnetic disk device control means 7 writes the 1 block size data requested for new writing by the user program 9 to the unit physical area P2 of the magnetic disk device 8.

【0041】このようにして、図2に示すように、単位
論理領域L4の1ブロックサイズのデータは、単位物理
領域P2の第1ブロックに書き込まれることになる。
In this way, as shown in FIG. 2, data of one block size in the unit logical area L4 is written to the first block of the unit physical area P2.

【0042】その後、ユーザプログラム9が図2の論理
領域番号L5の29ブロックサイズのデータの新規書き
込みを求める入出力要求を出したとすると、リアロケー
ション処理手段6では新規データの書き込みなので、図
2の処理S1〜S5を実行し、処理S2において今回の
データサイズが29ブロックなので、確保領域サイズを
32ブロックサイズに決定する。そして、次の処理S3
で、単位物理領域P3の32ブロックを今回のデータの
書き込みに使用する32ブロック単位として確保し、処
理S4において、上記決定した単位物理領域P3に基づ
き、論理・物理間マッピング管理テーブル4に、単位論
理領域L5の番号と単位物理領域P3の番号およびその
ブロック位置(0〜31)との対応関係を記録し、その
確保に応じてフリー領域管理テーブル3の内容を更新す
る。
After that, if the user program 9 issues an input/output request requesting new writing of 29 block size data in logical area number L5 in FIG. 2, the reallocation processing means 6 writes new data, so Processes S1 to S5 are executed, and in process S2, since the current data size is 29 blocks, the secured area size is determined to be 32 blocks. Then, the next process S3
Then, the 32 blocks of the unit physical area P3 are secured as a 32 block unit to be used for writing the current data, and in step S4, based on the unit physical area P3 determined above, the unit is set in the logical-physical mapping management table 4. The correspondence between the number of the logical area L5, the number of the unit physical area P3, and its block position (0 to 31) is recorded, and the contents of the free area management table 3 are updated according to the reservation.

【0043】以上の処理を終えると、リアロケーション
処理手段6は、処理S3で確保した単位物理領域P3の
番号とブロック位置(0〜31)とを含む物理領域情報
を入出力制御手段2に返却し(S5)、入出力制御手段
2は、磁気ディスク装置制御手段7に対し単位物理領域
P3の0〜31ブロックへの入出力要求を発行する。こ
れに応答して磁気ディスク装置制御手段7は、ユーザプ
ログラム9から新規書き込みの要求された29ブロック
サイズのデータを磁気ディスク装置8の単位物理領域P
3に書き込む。
[0043] When the above processing is completed, the reallocation processing means 6 returns the physical area information including the number and block position (0 to 31) of the unit physical area P3 secured in process S3 to the input/output control means 2. Then (S5), the input/output control means 2 issues an input/output request to blocks 0 to 31 of the unit physical area P3 to the magnetic disk device control means 7. In response, the magnetic disk device control means 7 transfers the 29 block size data requested for new writing from the user program 9 to the unit physical area of the magnetic disk device 8.
Write in 3.

【0044】このようにして、図2に示すように、単位
論理領域L5の29ブロックサイズのデータは、単位物
理領域P3の先頭より書き込まれることになる。
In this way, as shown in FIG. 2, data of 29 block size in the unit logical area L5 is written from the beginning of the unit physical area P3.

【0045】図2を参照すると、単位論理領域L0から
L5までの合計6個の単位論理領域にかかるデータ書き
込みについて、本実施例では単位物理領域P0からP3
までの合計4個の単位物理領域で済むことになる。これ
に対し、従来の技術では、合計6個の単位物理領域が必
要となり、それだけ使用効率が悪化する。
Referring to FIG. 2, regarding data writing to a total of six unit logical areas from unit logical areas L0 to L5, in this embodiment, unit physical areas P0 to P3 are written.
A total of four unit physical areas are required. In contrast, in the conventional technology, a total of six unit physical areas are required, which deteriorates the usage efficiency accordingly.

【0046】次に、磁気ディスク装置8に既に記録され
たデータに対し、新たなデータを上書きしたり、新たな
データを追加する場合の動作を説明する。
Next, the operation when overwriting new data or adding new data to data already recorded on the magnetic disk device 8 will be explained.

【0047】例えば、ユーザプログラム9が図2の単位
論理領域L3の3ブロックサイズの既存データに例えば
4ブロックサイズの新規データの上書き又は追加を求め
る入出力要求を出したとすると、前述と同様にして必要
な情報と共に制御がリアロケーション処理手段6に渡さ
れる。
For example, if the user program 9 issues an input/output request to overwrite or add new data of 4 block size to existing data of 3 block size in unit logical area L3 in FIG. The control is then passed to the reallocation processing means 6 along with the necessary information.

【0048】リアロケーション処理手段6は、既存デー
タへの書き込みなので、図2の処理S1から処理S6へ
進み、論理・物理間マッピング管理テーブル4を参照し
て、入出力要求中に含まれる単位論理領域L3の番号を
それに対応する単位物理領域P1の番号およびそのブロ
ック位置(8〜15)に変換することにより、物理領域
を決定する。
Since the reallocation processing means 6 is writing to existing data, it proceeds from processing S1 to processing S6 in FIG. The physical area is determined by converting the number of the area L3 into the number of the corresponding unit physical area P1 and its block position (8 to 15).

【0049】次にリアロケーション処理手段6は、デー
タ拡張により既存の確保領域サイズを越えるか否かを判
断する(S7)。今の場合、既存データの3ブロックサ
イズのデータは8ブロック単位に格納されており、上書
き又は追加データは4ブロックサイズであるので、元の
確保領域に格納することができる。よって、リアロケー
ション処理手段6は処理S7において既存確保領域サイ
ズを越えないと判断して処理S5へ進み、単位物理領域
P1の番号とブロック位置(8〜15)とを含む物理領
域情報を入出力制御手段2に返却する。
Next, the reallocation processing means 6 determines whether or not the existing reserved area size will be exceeded by data expansion (S7). In this case, the existing data with a size of 3 blocks is stored in units of 8 blocks, and the overwritten or additional data has a size of 4 blocks, so it can be stored in the original reserved area. Therefore, the reallocation processing means 6 determines in step S7 that the existing secured area size will not be exceeded, proceeds to step S5, and inputs and outputs the physical area information including the number of the unit physical area P1 and the block position (8 to 15). It is returned to the control means 2.

【0050】入出力制御手段2は、磁気ディスク装置制
御手段7に対し単位物理領域P1の8〜15ブロックへ
の入出力要求(データの上書き又は追加)を出す。これ
に応答して磁気ディスク装置制御手段7は、ユーザプロ
グラム9から上書き又は追加を要求された4ブロックサ
イズのデータを磁気ディスク装置8の単位物理領域P1
の物理領域に書き込む。
The input/output control means 2 issues an input/output request (overwriting or addition of data) to blocks 8 to 15 of the unit physical area P1 to the magnetic disk device control means 7. In response, the magnetic disk device control means 7 transfers the 4-block size data requested to be overwritten or added from the user program 9 to the unit physical area P1 of the magnetic disk device 8.
write to the physical area of

【0051】以上の既存データへの新規データの書き込
みでは既存の確保領域のサイズで足りたが、例えば、ユ
ーザプログラム9が図2の単位論理領域L3の3ブロッ
クサイズの既存データに例えば10ブロックサイズの新
規データの上書き又は追加を求める入出力要求を出すと
、既存の確保領域のサイズでは足りず、以下のような動
作が行われる。
Although the size of the existing secured area was sufficient for writing new data into the existing data as described above, for example, the user program 9 writes, for example, a 10 block size to the 3 block size existing data in the unit logical area L3 in FIG. When an input/output request is issued to overwrite or add new data, the size of the existing reserved area is insufficient, and the following operations occur.

【0052】リアロケーション処理手段6は、既存デー
タへの書き込みなので、図2の処理S1から処理S6へ
進み、論理・物理間マッピング管理テーブル4を参照し
て、単位論理領域L3の番号をそれに対応する単位物理
領域P1の番号およびブロック位置(8〜15)に変換
した後、データ拡張により既存の確保領域を越えるか否
かを判断する(S7)。今の場合、既存の3ブロックサ
イズのデータは8ブロック単位に格納されており、上書
き又は追加データが10ブロック容量であるので、何れ
も元の8ブロック単位に格納することはできない。
Since the reallocation processing means 6 is writing to existing data, it proceeds from processing S1 to processing S6 in FIG. After converting the data into the number and block position (8 to 15) of the unit physical area P1, it is determined whether or not the data will extend beyond the existing secured area (S7). In this case, the existing 3-block size data is stored in 8-block units, and the overwritten or additional data has a capacity of 10 blocks, so none of it can be stored in the original 8-block units.

【0053】そこで、リアロケーション処理手段6は、
拡張後のデータサイズに応じた新たな確保領域単位を決
定する(S8)。今の場合、既存データが3ブロックサ
イズ,上書き又は追加データは10ブロックサイズなの
で、合計サイズは10ブロックサイズまたは13ブロッ
クサイズとなる。従って、確保領域サイズとして32ブ
ロックを決定する。
[0053] Therefore, the reallocation processing means 6
A new secured area unit is determined according to the expanded data size (S8). In this case, the existing data has a size of 3 blocks and the overwritten or additional data has a size of 10 blocks, so the total size is 10 blocks or 13 blocks. Therefore, 32 blocks is determined as the secured area size.

【0054】この決定後、リアロケーション処理手段6
は、フリー領域管理テーブル3を参照して、拡張後のデ
ータを書き込むための32ブロックサイズの物理領域を
確保する(S9)。例えば、物理領域の使用状態が図2
に示すものであった場合、例えば単位物理領域P4の3
2ブロックを確保する。そして、この確保した単位物理
領域P4に応じ、論理・物理間マッピング管理テーブル
4に、単位論理領域L3の番号と単位物理領域P4の番
号およびブロック位置(0〜31)との対応関係を記録
し、単位物理領域P3の32ブロックを確保したので、
それに合わせてフリー領域管理テーブル3の内容を更新
する(S10)。
After this determination, the reallocation processing means 6
refers to the free area management table 3 and secures a physical area of 32 block size for writing the expanded data (S9). For example, the usage status of the physical area is shown in Figure 2.
For example, if the unit physical area P4 is 3
Secure 2 blocks. Then, according to the secured unit physical area P4, the correspondence between the number of the unit logical area L3, the number of the unit physical area P4, and the block position (0 to 31) is recorded in the logical-physical mapping management table 4. , since 32 blocks of unit physical area P3 have been secured,
The contents of the free area management table 3 are updated accordingly (S10).

【0055】次に、リアロケーション処理手段6は、今
回の既存データの書き込みが上書きか、追加かを判別す
る(S11)。以下、上書きの場合と追加の場合とに分
けて説明する。
Next, the reallocation processing means 6 determines whether the current writing of existing data is overwriting or addition (S11). In the following, the case of overwriting and the case of addition will be explained separately.

【0056】(1)上書きの場合 例えば、図4に示すように、磁気ディスク装置8上の既
存の3ブロックサイズのデータに10ブロックサイズの
上書きにかかる書き込み要求があり、図3の処理S7の
チェックにより既存の確保領域サイズを越えることが判
定され、更に処理S8により単位物理領域P4の32ブ
ロックが新たな領域として確保された場合、リアロケー
ション処理手段6は処理S13を経て処理S5へ進み、
単位物理領域P4の番号とブロック位置(0〜31)と
を含む物理領域情報を入出力制御手段2に返却する。こ
の返却を受けた入出力制御手段2は、磁気ディスク装置
制御手段7に対し単位物理領域P4への入出力要求(上
書き)を発行する。これに応答して磁気ディスク装置制
御手段7は、図4に示すようにユーザプログラム9から
上書きの要求された10ブロックサイズのデータを単位
物理領域P4へ書き込む。このとき、上書きされる前の
データが記録していた単位物理領域P1の3ブロックサ
イズの領域は不要になるため、リアロケーション処理手
段6によって解放される。この解放は処理S13におい
て、論理・物理間マッピング管理テーブル4中から単位
論理領域L3の番号と単位物理領域P1の番号およびブ
ロック位置(8〜15)との対応関係が削除され、また
フリー領域管理テーブル3の更新によって元の確保領域
がフリー領域に戻されることで行われる。
(1) In the case of overwriting For example, as shown in FIG. 4, there is a write request for overwriting 10 block size data on existing 3 block size data on the magnetic disk device 8, and step S7 in FIG. If it is determined by the check that the size exceeds the existing secured area size, and if 32 blocks of the unit physical area P4 are secured as a new area in step S8, the reallocation processing means 6 proceeds to step S5 via step S13,
Physical area information including the number of the unit physical area P4 and the block position (0 to 31) is returned to the input/output control means 2. Upon receiving this return, the input/output control means 2 issues an input/output request (overwriting) to the unit physical area P4 to the magnetic disk device control means 7. In response, the magnetic disk device control means 7 writes the 10 block size data requested to be overwritten by the user program 9 into the unit physical area P4, as shown in FIG. At this time, the 3-block size area of the unit physical area P1 in which the data before being overwritten is recorded is no longer needed, so it is released by the reallocation processing means 6. This release is performed by deleting the correspondence between the unit logical area L3 number, unit physical area P1 number, and block position (8 to 15) from the logical-physical mapping management table 4, and free area management. This is done by returning the original secured area to a free area by updating table 3.

【0057】(2)追加の場合 例えば、図5に示すように、磁気ディスク装置上の既存
の3ブロックサイズのデータに10ブロックサイズの追
加にかかる書き込み要求があり、図3の処理S7のチェ
ックにより既存の確保領域サイズを越えることが判定さ
れ、更に処理S8により単位物理領域P4の32ブロッ
クが新たな領域として確保された場合、リアロケーショ
ン処理手段6は、先ず、処理S12において必要な指示
を転送処理手段5に与えて転送処理を行わせる。
(2) In the case of addition For example, as shown in FIG. 5, there is a write request for adding 10 block sizes to the existing 3 block size data on the magnetic disk device, and the check in step S7 of FIG. When it is determined that the size of the reserved area exceeds the existing secured area size, and 32 blocks of the unit physical area P4 are secured as a new area in step S8, the reallocation processing means 6 first issues necessary instructions in step S12. The data is given to the transfer processing means 5 to perform the transfer process.

【0058】この指示に応じて転送処理手段5は、先ず
磁気ディスク装置制御手段7を通じて単位物理領域P1
の第8〜第10ブロックに存在する既存の3ブロックサ
イズのデータを読み込み、次いで、この読み込んだ3ブ
ロックのデータを磁気ディスク装置制御手段7を通じて
処理S9で確保した単位物理領域P4の第0〜第2ブロ
ックに書き込ませる。これによって、図5に示すように
追加される元のデータが新たに確保された領域に移動し
たことになる。
In response to this instruction, the transfer processing means 5 first transfers the unit physical area P1 through the magnetic disk device control means 7.
Read existing 3 block size data existing in the 8th to 10th blocks of Write to the second block. As a result, the original data to be added has been moved to the newly secured area as shown in FIG.

【0059】その後、リアロケーション処理手段6は、
処理S13を経て処理S5へ進み、単位物理領域P4の
番号とブロック位置(3〜31)とを含む物理領域情報
を入出力制御手段2に返却する。この返却を受けた入出
力制御手段2は、磁気ディスク装置制御手段7に対し単
位物理領域P4への入出力要求(上書き)を発行する。 これに応答して磁気ディスク装置制御手段7は、図5に
示すようにユーザプログラム9から追加書き込みの要求
された10ブロックサイズのデータを単位物理領域P4
の第3ブロック以降に書き込む。そして、追加書き込み
前のデータを記録していた単位物理領域P1の3ブロッ
クサイズの領域は、処理S13において、論理・物理間
マッピング管理テーブル4中から単位論理領域L3の番
号と単位物理領域P1の番号およびブロック位置との対
応関係が削除され、またフリー領域管理テーブル3の更
新によって元の確保領域がフリー領域とされることで、
解放される。
After that, the reallocation processing means 6
The process advances to process S5 via process S13, and physical area information including the number of unit physical area P4 and the block position (3 to 31) is returned to the input/output control means 2. Upon receiving this return, the input/output control means 2 issues an input/output request (overwriting) to the unit physical area P4 to the magnetic disk device control means 7. In response, the magnetic disk device control means 7 transfers the 10 block size data requested for additional writing from the user program 9 to the unit physical area P4, as shown in FIG.
Write from the third block onwards. Then, in step S13, the 3-block size area of the unit physical area P1 in which the data before additional writing was recorded is determined by the number of the unit logical area L3 and the unit physical area P1 from the logical-physical mapping management table 4. The correspondence between the number and the block position is deleted, and the free area management table 3 is updated to make the original secured area a free area.
To be released.

【0060】次に、図2のようにして磁気ディスク装置
8の物理領域Pに書き込まれたデータを読み込む際の動
作を説明する。
Next, the operation of reading data written in the physical area P of the magnetic disk device 8 as shown in FIG. 2 will be explained.

【0061】例えば、図6に示すようにユーザプログラ
ム9が単位論理領域L3の番号を指定してデータの読み
込みにかかる入出力要求を出したとすると、この入出力
要求は高速ファイル管理手段1を通じて入出力制御手段
2に伝達され、必要な情報と共にリアロケーション処理
手段6に制御が渡される。
For example, if the user program 9 specifies the number of the unit logical area L3 and issues an input/output request for reading data as shown in FIG. The information is transmitted to the input/output control means 2, and control is passed to the reallocation processing means 6 along with necessary information.

【0062】リアロケーション処理手段6では、データ
の読み込みなので、論理・物理間マッピング管理テーブ
ル4を参照して、入出力制御手段2から渡された単位論
理領域L3の番号をそれに対応する単位物理領域P1の
番号およびブロック位置(8〜15)に変換し、それを
入出力制御手段2に通知する。
Since the reallocation processing means 6 is reading data, it refers to the logical-physical mapping management table 4 and assigns the number of the unit logical area L3 passed from the input/output control means 2 to the corresponding unit physical area. It converts it into the number of P1 and the block position (8 to 15), and notifies the input/output control means 2 of it.

【0063】入出力制御手段2は、磁気ディスク装置制
御手段7に対し単位物理領域P1の第8番目から第15
番目までのブロックへの入出力要求(読み込み)を発行
する。これに応答して磁気ディスク装置制御手段7は、
磁気ディスク装置8の単位物理領域P1の8〜15ブロ
ックのデータを読み込んで例えばユーザプログラム9が
参照可能なバッファに格納する。
The input/output control means 2 provides the magnetic disk device control means 7 with the 8th to 15th areas of the unit physical area P1.
Issue an input/output request (read) to the block up to the block. In response to this, the magnetic disk device control means 7
Data in 8 to 15 blocks of the unit physical area P1 of the magnetic disk device 8 is read and stored in a buffer that can be referenced by the user program 9, for example.

【0064】以上のような処理が行われることにより、
ユーザプログラム9は単位論理領域L3上のデータを従
来と同様の方法で参照することができる。
[0064] By performing the above processing,
The user program 9 can refer to the data on the unit logical area L3 in the same manner as in the past.

【0065】[0065]

【発明の効果】以上説明したように、本発明は、単位物
理領域と同じサイズ,それより小さな幾つかのサイズに
設定された複数種類の確保領域サイズを設定し、そのう
ちから書き込みの要求されたデータのサイズに適した確
保領域サイズを決定してそのサイズで磁気ディスク装置
上の領域を確保するようにしたので、データサイズによ
らない一律的な領域確保のために生じていた無駄なスペ
ースが減り、磁気ディスク装置上のスペース効率の向上
を図ることができる。
[Effects of the Invention] As explained above, the present invention sets multiple types of reserved area sizes set to the same size as the unit physical area and several smaller sizes, and selects a write request from among them. By determining the secured area size that is appropriate for the data size and securing the area on the magnetic disk device using that size, wasted space that was generated due to uniform area securing regardless of the data size is eliminated. Therefore, it is possible to improve the space efficiency on the magnetic disk device.

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

【図1】本発明の一実施例の構成図である。FIG. 1 is a configuration diagram of an embodiment of the present invention.

【図2】ユーザプログラム9が認識するファイルの論理
領域Lと磁気ディスク装置8上の物理領域Pとの構成例
および両者の関係を示す図である。
FIG. 2 is a diagram showing a configuration example of a logical area L of a file recognized by a user program 9 and a physical area P on a magnetic disk device 8, and a relationship between the two.

【図3】ユーザプログラム9からの書き込み要求時にリ
アロケーション処理手段6で実施される処理の一例を示
す流れ図である。
FIG. 3 is a flowchart showing an example of processing performed by reallocation processing means 6 when a write request is received from user program 9;

【図4】既存データへの上書きを行うときの動作説明図
である。
FIG. 4 is an explanatory diagram of operations when overwriting existing data.

【図5】既存データへの追加書き込みを行うときの動作
説明図である。
FIG. 5 is an explanatory diagram of operations when additionally writing to existing data.

【図6】データの読み込みを行うときの動作説明図であ
る。
FIG. 6 is an explanatory diagram of operations when reading data.

【符号の説明】[Explanation of symbols]

1…高速ファイル管理手段 2…入出力制御手段 3…フリー領域管理テーブル 4…論理・物理間マッピング管理テーブル5…転送処理
手段 6…リアロケーション処理手段 7…磁気ディスク装置制御手段 8…磁気ディスク装置 9…ユーザプログラム
1...High-speed file management means 2...I/O control means 3...Free area management table 4...Logical/physical mapping management table 5...Transfer processing means 6...Reallocation processing means 7...Magnetic disk device control means 8...Magnetic disk device 9...User program

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  ユーザプログラムの認識するファイル
の論理領域を複数ブロックサイズの単位論理領域に分割
すると共に磁気ディスク装置上の物理領域を前記単位論
理領域と同じサイズの連続する単位物理領域に分割し、
入出力の単位を複数ブロック単位に拡張することにより
大容量のファイルデータの入出力を高速化した電子計算
機におけるファイルシステムにおいて、前記論理領域と
前記物理領域との対応関係を保持する論理・物理間マッ
ピング管理テーブルと、前記磁気ディスク装置上の未使
用の物理領域を管理するためのフリー領域管理テーブル
と、前記論理・物理間マッピング管理テーブルを使用し
て前記論理領域と前記物理領域との対応関係を管理する
と共に前記フリー領域管理テーブルを使用して前記物理
領域の使用状態を管理し、前記ユーザプログラムからの
論理領域番号を指定したデータの新規書き込み要求時、
前記単位物理領域と同じサイズ,それより小さな幾つか
のサイズに設定された複数種類の確保領域サイズのうち
から前記要求されたデータのサイズに適する確保領域サ
イズを決定し、該決定した確保領域サイズの物理領域を
未使用の単位物理領域あるいは同じ確保領域サイズで一
部使用されている単位物理領域から確保するリアロケー
ション処理手段と、該リアロケーション処理手段で確保
された物理領域に、前記指定された論理領域番号に対応
する単位論理領域のデータを磁気ディスク装置制御手段
を通じて書き込む入出力制御手段とを備えたことを特徴
とするディスクスペース管理方式。
1. A logical area of a file recognized by a user program is divided into unit logical areas of a plurality of block sizes, and a physical area on a magnetic disk device is divided into continuous unit physical areas of the same size as the unit logical area. ,
In a file system for an electronic computer that speeds up the input/output of large-capacity file data by expanding the unit of input/output into multiple blocks, a logical/physical interface that maintains the correspondence between the logical area and the physical area. A mapping management table, a free area management table for managing unused physical areas on the magnetic disk device, and a correspondence relationship between the logical area and the physical area using the logical-physical mapping management table. and managing the use state of the physical area using the free area management table, and upon a new write request for data specifying a logical area number from the user program,
Determine a secured area size suitable for the requested data size from among multiple types of secured area sizes set to the same size as the unit physical area and several smaller sizes, and determine the determined secured area size. A reallocation processing means that secures a physical area from an unused unit physical area or a partially used unit physical area with the same secured area size, and a physical area secured by the reallocation processing means that 1. A disk space management method comprising: input/output control means for writing data in a unit logical area corresponding to a given logical area number through a magnetic disk device control means.
【請求項2】  前記ユーザプログラムからの論理領域
番号を指定したデータの上書き又は追加書き込み要求時
、前記リアロケーション処理手段は、上書き又は追加書
き込み後のデータサイズが上書き又は追加書き込みされ
る以前のデータの為に既に確保された物理領域のサイズ
を越えるか否かを調べ、越えない場合には既に確保され
た物理領域を前記入出力制御手段に通知し、越える場合
には上書き又は追加書き込み後のデータサイズに適した
サイズの物理領域を未使用の単位物理領域あるいは同じ
確保領域サイズで一部使用されている単位物理領域から
確保すると共に追加書き込み時には元のデータを前記新
たに確保した物理領域に転送して前記新たに確保した物
理領域を前記入出力制御手段に通知し且つ前記元の確保
領域を解放し、前記入出力制御手段は、通知された物理
領域に、前記上書き又は追加書き込みの要求されたデー
タを前記磁気ディスク装置制御手段を通じて書き込むこ
とを特徴とする請求項1記載のディスクスペース管理方
式。
2. When the user program requests overwriting or additional writing of data specifying a logical area number, the reallocation processing means changes the data size after overwriting or additional writing to the data before being overwritten or additionally written. Check whether the size of the physical area that has already been reserved for A physical area of a size suitable for the data size is secured from an unused unit physical area or a partially used unit physical area with the same secured area size, and when additional writing is performed, the original data is transferred to the newly allocated physical area. The input/output control means is notified of the newly secured physical area by transfer, and the original secured area is released, and the input/output control means requests the overwriting or additional writing to the notified physical area. 2. The disk space management system according to claim 1, wherein the data is written through said magnetic disk device control means.
JP3152609A 1991-05-28 1991-05-28 Disk space management system Pending JPH04350738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3152609A JPH04350738A (en) 1991-05-28 1991-05-28 Disk space management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3152609A JPH04350738A (en) 1991-05-28 1991-05-28 Disk space management system

Publications (1)

Publication Number Publication Date
JPH04350738A true JPH04350738A (en) 1992-12-04

Family

ID=15544143

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3152609A Pending JPH04350738A (en) 1991-05-28 1991-05-28 Disk space management system

Country Status (1)

Country Link
JP (1) JPH04350738A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0916445A (en) * 1995-07-04 1997-01-17 Nec Corp Ledger file access method and banking system applied with the same
JP2008269338A (en) * 2007-04-20 2008-11-06 Hitachi Ltd Storage device, and management unit setting method
JP2015194922A (en) * 2014-03-31 2015-11-05 富士通株式会社 Information processing system, information processing system control method, and information processing apparatus control program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0219938A (en) * 1988-07-08 1990-01-23 Mitsubishi Electric Corp File control system
JPH02194472A (en) * 1989-01-23 1990-08-01 Matsushita Electric Ind Co Ltd Information retrieval device
JPH0392944A (en) * 1989-09-06 1991-04-18 Nec Corp Data updating system for sequential file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0219938A (en) * 1988-07-08 1990-01-23 Mitsubishi Electric Corp File control system
JPH02194472A (en) * 1989-01-23 1990-08-01 Matsushita Electric Ind Co Ltd Information retrieval device
JPH0392944A (en) * 1989-09-06 1991-04-18 Nec Corp Data updating system for sequential file

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0916445A (en) * 1995-07-04 1997-01-17 Nec Corp Ledger file access method and banking system applied with the same
JP2008269338A (en) * 2007-04-20 2008-11-06 Hitachi Ltd Storage device, and management unit setting method
JP2015194922A (en) * 2014-03-31 2015-11-05 富士通株式会社 Information processing system, information processing system control method, and information processing apparatus control program

Similar Documents

Publication Publication Date Title
US6915403B2 (en) Apparatus and method for logical volume reallocation
US20050283564A1 (en) Method and apparatus for data set migration
US8037276B2 (en) Computer system, storage area allocation method, and management computer
JPH04213129A (en) Memory control system and memory control method
JPH0340868B2 (en)
EP0694831A2 (en) Computer system having storage unit provided with data compression function andmethod of management of storage area thereof
JPH04350738A (en) Disk space management system
JP3384258B2 (en) Computer system
JPH06110766A (en) Directory constitution method and computer system for sharing stored file system
JPH09223049A (en) Disk array system
JPH06110759A (en) File system
JP2609705B2 (en) File control method
JP2994917B2 (en) Storage system
JPH0324644A (en) Automatic expansion system for file in multivolume
JPH0337748A (en) External storage accessing system utilizing main storage
JPH05197599A (en) File space management system
JP3022829B2 (en) Automatic storage device allocation device
JPH01255028A (en) Method for making access to external storage device
JPH01181121A (en) Memory area allocating system
JPH0581091A (en) Data processor
JPH0430056B2 (en)
JPH06259292A (en) On-line garbage collection method for external storage device
JPH03105534A (en) File control method
JPS62202242A (en) Mapping system for virtual disk device
JPH05108424A (en) Data base management system