JPH083800B2 - File area management information restoration device - Google Patents

File area management information restoration device

Info

Publication number
JPH083800B2
JPH083800B2 JP63099393A JP9939388A JPH083800B2 JP H083800 B2 JPH083800 B2 JP H083800B2 JP 63099393 A JP63099393 A JP 63099393A JP 9939388 A JP9939388 A JP 9939388A JP H083800 B2 JPH083800 B2 JP H083800B2
Authority
JP
Japan
Prior art keywords
management information
area
file
area management
data file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP63099393A
Other languages
Japanese (ja)
Other versions
JPH01270156A (en
Inventor
善雄 刈谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP63099393A priority Critical patent/JPH083800B2/en
Publication of JPH01270156A publication Critical patent/JPH01270156A/en
Publication of JPH083800B2 publication Critical patent/JPH083800B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はファイル内領域管理情報修復装置に関し、特
にファイル内にファイル内の領域の使用および未使用状
態を管理する領域管理情報とファイル内の領域の使用情
報を含む使用者情報とを持つ場合においてシステム障害
等により領域管理情報に誰も使用していない領域が使用
中となるファイル領域の無駄が発生しているときに複数
のプログラムからのファイルの同時アクセス中に領域管
理情報の修復を行うファイル内領域管理情報修復装置に
関する。
Description: TECHNICAL FIELD The present invention relates to a file area management information restoration device, and more particularly to area management information for managing the usage and unused status of a file area in a file. When there is user information including area usage information, an area that is not used by anyone in the area management information is in use due to a system failure, etc. The present invention relates to an in-file area management information restoration device that restores area management information during simultaneous file access.

〔従来の技術〕[Conventional technology]

従来、ファイル内の領域管理情報が管理するファイル
領域に無駄が発生した場合には、無駄をなすくために、
ファイルを占有してファイルの作り直しを行ったり、フ
ァイル内の使用者情報に含まれる領域の使用情報に基づ
いて領域管理情報だけを作り直したりする必要があっ
た。
Conventionally, when waste occurs in the file area managed by the area management information in the file, in order to save waste,
It has been necessary to occupy the file and recreate the file, or to recreate only the area management information based on the usage information of the area included in the user information in the file.

例えば、ファイル内にファイル内の領域の使用および
未使用状態を管理する領域管理情報とファイル内の領域
の使用情報を含む複数の使用者情報とを持つ場合におい
て、領域を確保した時点で、通常データファイル内の領
域管理情報と使用者情報との両方が更新されるが、シス
テム障害等により領域管理情報のみが更新され、使用者
情報が更新されなかった場合には、誰も使用していない
が使用中である領域が生じる。このようにして、システ
ム障害等により領域管理情報に誰も使用していない領域
が使用中となるファイル領域の無駄が発生しているとき
には、ファイルの再作成ジョブを実行させたり、無駄な
ファイル領域の解放処理のためのジョブを実行させたり
する必要があった。
For example, in the case where a file has area management information that manages the used and unused states of the area in the file and a plurality of user information including the usage information of the area in the file, when the area is secured, the Both the area management information and the user information in the data file are updated, but if the area management information is updated due to a system failure and the user information is not updated, no one is using it. Area is in use. In this way, when a file area that is not used by anyone in the area management information is in use due to a system failure or the like, and a file area is wasted, a file re-creation job is executed or a file area is wasted. It was necessary to execute a job for the release processing.

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

上述した従来のファイル内領域管理装置では、ファイ
ルの同時アクセス制御が行われていなかったので、ファ
イルを共有する他の同時アクセスジョブの実行の終了を
待たないと、ファイルの再作成ジョブを実行させたり、
無駄なファイル領域の解放処理のためのジョブを実行さ
せたりすることができないという欠点がある。
In the above-mentioned conventional internal file area management device, since the simultaneous access control of the file is not performed, it is necessary to wait for the completion of the execution of other simultaneous access jobs sharing the file before the file re-creation job is executed. Or
There is a drawback that it is not possible to execute a job for useless file area release processing.

本発明の目的は、上述の点に鑑み、ファイルを共有す
る他の同時アクセスジョブ(入出力プログラム)が実行
中であっても無駄なファイル領域の解放処理のためのジ
ョブ(修復プログラム)が実行可能となるようにしたフ
ァイル内領域管理情報修復装置を提供することにある。
In view of the above points, an object of the present invention is to execute a job (repair program) for releasing useless file area even when another simultaneous access job (input / output program) sharing a file is being executed. An object is to provide an in-file area management information restoration device that is made possible.

〔課題を解決するための手段〕 本発明のファイル内領域管理情報修復装置は、ファイ
ル内にファイル内の領域の使用および未使用状態を管理
する領域管理情報とファイル内の領域の使用情報を含む
使用者情報とを持つデータファイルと、このデータファ
イルの領域管理情報だけを格納できる領域を持つ領域管
理情報ファイルと、前記データファイルに対する入出力
を要求する入出力プログラムを含む入出力処理手段と、
前記データファイルの領域管理情報の修復を要求する修
復プログラムを含む修復処理手段と、前記データファイ
ルの領域管理情報の排他制御を行う同時アクセス制御手
段と、前記入出力処理手段からの入出力要求時に前記デ
ータファイル内の領域が必要または不要になったときに
前記同時アクセス制御手段を通じて前記データファイル
の領域管理情報を排他制御しながら前記データファイル
の領域を確保または解放し前記同時アクセス制御手段を
参照して前記修復プログラムが実行中であれば前記領域
管理情報ファイルを前記入出力プログラムに割り当てて
前記領域管理情報ファイルの該当領域の領域管理情報を
使用中または未使用状態に設定する領域制御手段を含む
ファイルアクセス手段と、前記修復処理手段からの修復
要求時に前記領域管理情報ファイルを作成し、前記同時
アクセス制御手段に前記修復プログラムが実行中である
旨を通知し、前記同時アクセス制御手段を通じて前記デ
ータファイルの領域管理情報を排他制御しながら前記デ
ータファイル内の使用者情報中の領域の使用情報を前記
領域管理情報ファイルの領域管理情報に反映した後に、
前記領域管理情報ファイルの領域管理情報を前記データ
ファイルの領域管理情報に複写し、前記同時アクセス制
御手段に前記修復プログラムが実行を終了した旨を通知
し、前記領域管理情報ファイルを削除する領域管理情報
修復手段とを有する。
[Means for Solving the Problems] An in-file area management information restoration device of the present invention includes area management information for managing the usage and unused states of areas in a file and usage information of areas in the file. A data file having user information, an area management information file having an area capable of storing only area management information of the data file, and an input / output processing means including an input / output program for requesting input / output to the data file,
Repair processing means including a repair program for requesting repair of area management information of the data file, simultaneous access control means for exclusive control of the area management information of the data file, and input / output request from the input / output processing means When the area in the data file becomes necessary or unnecessary, the area management information of the data file is exclusively controlled through the simultaneous access control means to secure or release the area of the data file and refer to the simultaneous access control means. Then, if the restoration program is running, the area control information file is assigned to the input / output program to set the area management information of the corresponding area of the area management information file to the used or unused state. File access means including the area, and the area when the repair request is issued from the repair processing means. A logical information file, notifies the simultaneous access control means that the restoration program is being executed, and uses the data file while controlling the area management information of the data file exclusively through the simultaneous access control means. After reflecting the usage information of the area in the user information to the area management information of the area management information file,
Area management that copies the area management information of the area management information file to the area management information of the data file, notifies the simultaneous access control unit that the restoration program has finished executing, and deletes the area management information file And information recovery means.

〔作用〕[Action]

本発明のファイル内領域管理情報修復装置では、デー
タファイルがファイル内にファイル内の領域の使用およ
び未使用状態を管理する領域管理情報とファイル内の領
域の使用情報を含む使用者情報とを持ち、領域管理情報
ファイルがデータファイルの領域管理情報だけを格納で
きる領域を持つ。入出力プログラムを含む入出力処理手
段がデータファイルに対する入出力を要求し、修復プロ
グラムを含む修復処理手段がデータファイルの領域管理
情報の修復を要求し、同時アクセス制御手段がデータフ
ァイルの領域管理情報の排他制御を行う。ファイルアク
セス手段内の領域制御手段が入出力処理手段からの入出
力要求時にデータファイル内の領域が必要または不要に
なったときに同時アクセス制御手段を通じてデータファ
イルの領域管理情報を排他制御しながらデータファイル
の領域を確保または解放し同時アクセス制御手段を参照
して修復プログラムが実行中であれば領域管理情報ファ
イルを入出力プログラムに割り当てて領域管理情報ファ
イルの該当領域の領域管理情報を使用中なたは未使用状
態に設定し、領域管理情報修復手段が修復処理手段から
の修復要求時に領域管理情報ファイルを作成し、同時ア
クセス制御手段に修復プログラムが実行中である旨を通
知し、同時アクセス制御手段を通じてデータファイルの
領域管理情報を排他制御しながらデータファイル内の使
用者情報中の領域の使用情報を領域管理情報ファイルの
領域管理情報に反映した後に、領域管理情報ファイルの
領域管理情報をデータファイルの領域管理情報に複写
し、同時アクセス制御手段に修復プログラムが実行を終
了した旨を通知し、領域管理情報ファイルを削除する。
In the in-file area management information restoration device of the present invention, the data file has in the file area management information for managing the usage and unused state of the area in the file and user information including the usage information of the area in the file. The area management information file has an area that can store only the area management information of the data file. The input / output processing means including the input / output program requests input / output to / from the data file, the repair processing means including the repair program requests repair of the area management information of the data file, and the simultaneous access control means includes the area management information of the data file. Exclusive control of. When the area control means in the file access means makes an area in the data file necessary or unnecessary at the time of an input / output request from the input / output processing means, the area control information of the data file is exclusively controlled through the simultaneous access control means to perform data control. If the recovery program is executing by securing or releasing the file area and referring to the simultaneous access control means, allocate the area management information file to the input / output program and use the area management information of the corresponding area of the area management information file. Or the unused state, the area management information restoration means creates the area management information file at the time of a restoration request from the restoration processing means, notifies the simultaneous access control means that the restoration program is being executed, and simultaneously accesses Users in the data file while exclusively controlling the area management information of the data file through the control means After the usage information of the area in the report is reflected in the area management information of the area management information file, the area management information of the area management information file is copied to the area management information of the data file, and the recovery program is executed by the simultaneous access control means. Notify that the process is complete and delete the area management information file.

〔実施例〕〔Example〕

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

第1図は、本発明の一実施例のファイル内領域管理情
報修復装置を示すブロック図である。本実施例のファイ
ル内領域管理情報修復装置は、データファイル8に対す
る入出力を要求する入出力プログラム1と、入出力プロ
グラム1の要求に従い入出力処理を行うファイルアクセ
ス手段2と、ファイルアクセス手段2内に存在しデータ
ファイル8内の領域の確保および解放を制御する領域制
御手段3と、同じくファイルアクセス手段2内に存在し
データファイル8のファイルクローズ処理を行うファイ
ルクローズ手段4と、データファイル8内の領域管理情
報10の修復を要求する修復プログラム5と、修復プログ
ラム5の要求に従いデータファイル8内の領域管理情報
10の修復処理を行う領域管理情報修復手段6と、データ
ファイル8内の領域管理情報10の同時アクセスを制御す
る同時アクセス制御手段7と、ファイル内にファイル内
の領域の使用および未使用状態を管理する領域管理情報
10とファイル内の領域の使用情報を含む使用者情報11と
を持つデータファイル8と、データファイル8内の使用
者情報11から復元された領域管理情報を格納するための
領域管理情報ファイル9とから構成されている。
FIG. 1 is a block diagram showing an internal file area management information restoration device according to an embodiment of the present invention. The in-file area management information restoration device of the present embodiment has an input / output program 1 for requesting input / output to / from a data file 8, a file access means 2 for performing input / output processing according to the request of the input / output program 1, and a file access means 2. Area control means 3 existing in the file access means 2 for controlling securing and releasing of the area in the data file 8, file close means 4 also existing in the file access means 2 for performing file close processing of the data file 8, and data file 8 Repair program 5 requesting repair of the area management information 10 in the area, and area management information in the data file 8 according to the request of the repair program 5.
The area management information restoration means 6 for performing the restoration processing of 10, the simultaneous access control means 7 for controlling the simultaneous access of the area management information 10 in the data file 8, and the used and unused states of the areas in the file Area management information to manage
A data file 8 having 10 and user information 11 including usage information of areas in the file, and an area management information file 9 for storing area management information restored from the user information 11 in the data file 8. It consists of

第2図を参照すると、領域制御手段3のデータファイ
ル8内の未使用領域を確保する場合の処理は、領域管理
情報排他制御ステップ21と、データファイル未使用領域
検索ステップ22と、空き有無判定ステップ23と、データ
ファイル拡張および初期化ステップ24と、データファイ
ル領域確保ステップ25と、データファイル領域確保ステ
ップ26と、修復プログラム実行中判定ステップ27と、領
域管理情報ファイル割当て済み判定ステップ28と、領域
管理情報ファイル割当てステップ29と、領域管理情報修
復済み判定ステップ30と、領域管理情報使用中設定ステ
ップ31と、領域管理情報排他制御解除ステップ32とから
なる。
Referring to FIG. 2, the processing for securing an unused area in the data file 8 of the area control means 3 is the area management information exclusive control step 21, the data file unused area search step 22, and the availability judgment. Step 23, data file expansion and initialization step 24, data file area securing step 25, data file area securing step 26, repair program running determination step 27, area management information file allocated determination step 28, It includes an area management information file allocation step 29, an area management information repaired determination step 30, an area management information in-use setting step 31, and an area management information exclusive control release step 32.

第3図を参照すると、ファイルクローズ手段4の処理
は、データファイルクローズ処理ステップ41と、領域管
理情報ファイル割当て済み判定ステップ42と、領域管理
情報ファイル割当て解除ステップ43とからなる。
Referring to FIG. 3, the processing of the file closing means 4 includes a data file closing processing step 41, an area management information file allocation completion determination step 42, and an area management information file deallocating step 43.

第4図を参照すると、領域管理情報修復手段6の処理
は、領域管理情報ファイル作成および初期化ステップ61
と、修復プログラム実行中通知ステップ62と、使用者情
報検索ステップ63と、使用者情報全て検索済み判定ステ
ップ64と、領域使用情報取出しステップ65と、領域管理
情報排他制御ステップ66と、領域管理情報使用中設定ス
テップ67と、領域管理情報排他制御解除ステップ68と、
領域管理情報排他制御ステップ69と、領域管理情報複写
ステップ70と、領域管理情報修復済み設定ステップ71
と、領域管理情報排他制御解除ステップ72と、領域管理
情報全て複写済み判定ステップ73と、修復プログラム実
行終了通知ステップ74と、領域管理情報ファイル割当て
解除および削除ステップ75とからなる。
Referring to FIG. 4, the process of the area management information restoration means 6 is performed by the area management information file creation and initialization step 61.
A repair program execution notification step 62, a user information search step 63, a user information all search completion determination step 64, an area usage information extraction step 65, an area management information exclusive control step 66, and area management information In-use setting step 67, area management information exclusive control release step 68,
Area management information exclusive control step 69, area management information copying step 70, area management information restored setting step 71
The area management information exclusive control releasing step 72, the area management information all copying determination step 73, the repair program execution end notifying step 74, and the area management information file allocation releasing and deleting step 75.

次に、このように構成された本実施例のファイル内領
域管理情報修復装置の動作について説明する。
Next, the operation of the in-file area management information restoration device of this embodiment configured as described above will be described.

(1)領域確保処理 入出力プログラム1からの入出力要求があると、ファ
イルアクセス手段2は、データファイル8に対して入出
力処理を行う。この際、データファイル8内の未使用領
域が必要になった場合には、ファイルアクセス手段2
は、領域制御手段3にデータファイル8内の未使用領域
の確保を要求する。
(1) Area Reserving Process When an input / output request is issued from the input / output program 1, the file access means 2 performs an input / output process on the data file 8. At this time, if an unused area in the data file 8 becomes necessary, the file access means 2
Requests the area control means 3 to secure an unused area in the data file 8.

ファイルアクセス手段2からの未使用領域の確保要求
を受けると、領域制御手段3は、同時アクセス制御手段
7を通じてデータファイル8内の領域管理情報10を排他
制御し(ステップ21)、領域管理情報10を検索すること
によりデータファイル8内に未使用領域があるか否かを
調べる(ステップ22)。
Upon receiving the unused area securing request from the file access means 2, the area control means 3 exclusively controls the area management information 10 in the data file 8 through the simultaneous access control means 7 (step 21), and the area management information 10 Is checked to see if there is an unused area in the data file 8 (step 22).

データファイル8内に未使用領域がない場合には(ス
テップ23)、領域制御手段3は、データファイル8のフ
ァイル領域を拡張して拡張した未使用領域の領域管理情
報を領域管理情報10に追加し(ステップ24)、追加され
た領域管理情報10に基づいて未使用領域を確保して該当
領域(データファイル8内の確保された領域)の領域管
理情報10を使用中に設定し(ステップ25)、同時アクセ
ス制御手段7を通じて領域管理情報10の排他制御を解除
して(ステップ32)、ファイルアクセス手段2に制御を
戻す。
When there is no unused area in the data file 8 (step 23), the area control means 3 extends the file area of the data file 8 and adds the area management information of the unused area, which has been expanded, to the area management information 10. Then, the unused area is secured based on the added area management information 10 and the area management information 10 of the relevant area (area secured in the data file 8) is set to be in use (step 25). ), The exclusive control of the area management information 10 is released through the simultaneous access control means 7 (step 32), and the control is returned to the file access means 2.

データファイル8内に未使用領域があった場合には
(ステップ23)、領域制御手段3は、領域管理情報10に
基づいて未使用領域を確保して該当領域の領域管理情報
10を使用中に設定し(ステップ26)、同時アクセス制御
手段7に修復プログラム5の実行中が通知されている
(ステップ62参照)が実行終了が通知されている(ステ
ップ74参照)かを調べることにより修復プログラム5が
実行中であるか否かを判定する(ステップ27)。
When there is an unused area in the data file 8 (step 23), the area control means 3 secures the unused area based on the area management information 10 and the area management information of the corresponding area.
10 is set to be in use (step 26), and it is checked whether the simultaneous access control means 7 has been notified that the restoration program 5 is being executed (see step 62) but has been notified of the end of execution (see step 74). Thus, it is determined whether the repair program 5 is being executed (step 27).

修復プログラム5が実行中でなければ(ステップ2
7)、領域制御手段3は、同時アクセス制御手段7を通
じて領域管理情報10の排他制御を解除して(ステップ3
2)、ファイルアクセス手段2に制御を戻す。
If the restoration program 5 is not running (Step 2
7) The area control means 3 releases the exclusive control of the area management information 10 through the simultaneous access control means 7 (step 3
2) Return control to the file access means 2.

修復プログラム5が実行中であれば(ステップ27)、
領域制御手段3は、入出力プログラム1に領域管理情報
修復手段6により作成された領域管理情報ファイル9が
割り当てられているか否かを判定し(ステップ28)、割
り当てられていない場合には入出力プログラム1に領域
管理情報ファイル9を割り当てる(ステップ29)。ステ
ップ28および29は、領域管理情報修復手段6により作成
されている領域管理情報ファイル9を初回に1回だけ入
出力プログラム1に割り当てて入出力を可能にするため
の処理である。
If the restoration program 5 is running (step 27),
The area control means 3 determines whether or not the area management information file 9 created by the area management information restoration means 6 is assigned to the input / output program 1 (step 28). The area management information file 9 is assigned to the program 1 (step 29). Steps 28 and 29 are processing for allocating the area management information file 9 created by the area management information restoration means 6 to the input / output program 1 only once at the first time to enable input / output.

次に、領域制御手段3は、領域管理情報ファイル9の
該当領域の領域管理情報が修復済みを示すか否か(領域
管理情報ファイル9の該当領域の領域管理情報がデータ
ファイル8の領域管理情報10に複写済みか否か)を判定
する(ステップ30)。
Next, the area control unit 3 determines whether the area management information of the corresponding area of the area management information file 9 indicates that the area management information has been restored (the area management information of the corresponding area of the area management information file 9 is the area management information of the data file 8). It is determined whether or not it has been copied to 10) (step 30).

領域管理情報ファイル9の該当領域の領域管理情報が
修復済みを示している場合には(ステップ30)、領域制
御手段3は、領域を確保したことを領域管理情報ファイ
ル9の領域管理情報に反映させる必要がないので、同時
アクセス制御手段7を通じて領域管理情報10の排他制御
を解除して(ステップ32)、ファイルアクセス手段2に
制御を戻す。
When the area management information of the corresponding area of the area management information file 9 indicates that the area has been repaired (step 30), the area control means 3 reflects the fact that the area has been secured in the area management information of the area management information file 9. Since it is not necessary to do so, the exclusive control of the area management information 10 is released through the simultaneous access control means 7 (step 32), and the control is returned to the file access means 2.

領域管理情報ファイル9の該当領域の領域管理情報が
修復済みを示していなければ(ステップ30)、領域制御
手段3は、領域管理情報ファイル9の該当領域の領域管
理情報を使用中に設定して(ステップ31)、同時アクセ
ス制御手段7を通じて領域管理情報10の排他制御を解除
して(ステップ32)、ファイルアクセス手段2に制御を
戻す。なお、ステップ31で領域管理情報ファイル9への
書込み中に領域管理情報修復手段6からの書込み(ステ
ップ67または71)が競合するおそれがあるようにも思わ
れるが、ステップ31の前のステップ21でかならず領域管
理情報10の排他制御が行われ、かつステップ61または71
の前のステップ66または69でも領域管理情報10の排他制
御が行われているので、領域制御手段3がステップ31の
処理中に領域管理情報修復手段6がステップ67または71
を処理することはなく(すくなくとも領域管理情報修復
手段6はステップ66または69で待たされ)、領域管理情
報ファイル9への書込みが競合することはない。
If the area management information of the corresponding area of the area management information file 9 does not indicate that the area has been repaired (step 30), the area control means 3 sets the area management information of the corresponding area of the area management information file 9 to "in use". (Step 31), the exclusive control of the area management information 10 is released through the simultaneous access control means 7 (step 32), and the control is returned to the file access means 2. Although it seems that writing from the area management information restoration means 6 (step 67 or 71) may conflict during writing to the area management information file 9 in step 31, step 21 before step 31 The area control information 10 is always exclusively controlled, and the step 61 or 71 is performed.
Since the exclusive control of the area management information 10 is also performed in the step 66 or 69 before the step, the area management information restoration means 6 causes the area management information restoration step 6 to execute the step 67 or 71 during the processing of the step 31.
Is not processed (at least the area management information restoration means 6 is kept waiting in step 66 or 69), and there is no conflict in writing to the area management information file 9.

(2)領域解放処理 なお、特に詳述しないが、ファイルアクセス手段2が
データファイル8に対して入出力処理を行う際に、デー
タファイル8内の使用中の領域の解放が必要になった場
合でも、同様に領域制御手段3が呼び出されてデータフ
ァイル8内の使用中の領域の解放処理を行う。このとき
にも、領域管理情報ファイル9の該当領域(データファ
イル8内の解放された領域)の領域管理情報が修復済み
を示しているか否かが判定され、修復済みを示していな
ければ領域管理情報ファイル9の該当領域の領域管理情
報が未使用状態に設定される。
(2) Area release processing Although not described in detail, when the file access means 2 needs to release the used area in the data file 8 when performing input / output processing with respect to the data file 8. However, in the same manner, the area control means 3 is called to release the used area in the data file 8. Also at this time, it is judged whether or not the area management information of the corresponding area (the released area in the data file 8) of the area management information file 9 indicates that the area has been repaired. The area management information of the corresponding area of the information file 9 is set to the unused state.

(3)ファイルクローズ処理 入出力プログラム1からのデータファイル8のファイ
ルクローズ要求があると、ファイルアクセス手段2は、
ファイルクローズ手段4にデータファイル8のファイル
クローズ処理を要求する。
(3) File close processing When there is a file close request for the data file 8 from the input / output program 1, the file access means 2
A file close process for the data file 8 is requested of the file close means 4.

ファイルアクセス手段2からのファイルクローズ処理
の要求を受けたファイルクローズ手段4は、データファ
イル8のファイルクローズ処理を行い(ステップ41)、
領域管理情報ファイル9が入出力プログラム1に割り当
てられている場合には(ステップ42)、領域管理情報フ
ァイル9の入出力プログラム1への割当てを解除する
(ステップ43)。
Upon receiving the file close processing request from the file access means 2, the file close means 4 performs the file close processing of the data file 8 (step 41),
When the area management information file 9 is allocated to the input / output program 1 (step 42), the allocation of the area management information file 9 to the input / output program 1 is released (step 43).

(4)領域管理情報修復処理 データファイル8内に無駄な領域が発生しそうな事象
が生じたときにあるいは定期的に修復プログラム5が起
動される。そして、修復プログラム5から領域管理情報
10の修復要求があると、領域管理情報修復手段6は、デ
ータファイル8の領域管理情報10を格納できる領域を持
つ領域管理情報ファイル9を作成し修復プログラム5に
割り当てて領域管理情報ファイル9をデータファイル8
の領域が全て未使用状態であることを示すように初期化
し(ステップ61)、修復プログラム5が実行中であるこ
とを同時アクセス制御手段7に通知する(ステップ6
2)。
(4) Area Management Information Restoration Processing The restoration program 5 is activated when an event in which a useless area is likely to occur in the data file 8 occurs or periodically. Then, the area management information from the restoration program 5
When there is a request for restoration of 10, the area management information restoration means 6 creates an area management information file 9 having an area in which the area management information 10 of the data file 8 can be stored, and allocates it to the restoration program 5 to create the area management information file 9. Data file 8
Area is initialized so as to indicate that all areas are unused (step 61), and the simultaneous access control means 7 is notified that the restoration program 5 is being executed (step 6).
2).

次に、領域管理情報修復手段6は、データファイル8
内の使用者情報11を検索して(ステップ63)、全ての使
用者情報11の検索が終了したか否かを判定し(ステップ
64)、全ての使用者情報11が検索済みでなければ使用者
情報11が持つ領域の使用情報をデータファイル8から取
り出す(ステップ65)。続いて、領域管理情報修復手段
6は、同時アクセス制御手段7を通じて領域管理情報10
を排他制御し(ステップ66)、使用者情報11が持つ領域
の使用情報に基づいて領域管理情報ファイル9の該当領
域の領域管理情報を使用中に設定する(ステップ67)。
なお、ステップ67で領域管理情報ファイル9への書込み
中に領域制御手段3からの書込み(ステップ31)が競合
するおそれがあるようにも思われるが、ステップ67の前
のステップ66でかならず領域管理情報10の排他制御が行
われ、かつステップ31の前のステップ21でも領域管理情
報10の排他制御が行われているので、領域管理情報修復
手段6がステップ67の処理中に領域制御手段3がステッ
プ31を処理することはなく(すくなくとも領域制御手段
3はステップ21で待たされ)、領域管理情報ファイル9
への書込みが競合することはない。次に、領域管理情報
修復手段6は、同時アクセス制御手段7を通じて領域管
理情報10の排他制御を解除し(ステップ68)、ステップ
63に戻る。
Next, the area management information restoration means 6 uses the data file 8
The user information 11 in the user information 11 is searched (step 63), and it is determined whether the search of all the user information 11 is completed (step 63).
64), if all the user information 11 has not been searched, the use information of the area of the user information 11 is taken out from the data file 8 (step 65). Subsequently, the area management information restoration means 6 causes the area management information 10 through the simultaneous access control means 7.
Is exclusively controlled (step 66), and the area management information of the corresponding area of the area management information file 9 is set to "in use" based on the area usage information held by the user information 11 (step 67).
Although it seems that writing from the area control means 3 (step 31) may conflict during writing to the area management information file 9 in step 67, the area management must always be performed in step 66 before step 67. Since the exclusive control of the information 10 is performed, and the exclusive control of the area management information 10 is also performed in step 21 before step 31, the area control information restoration means 6 causes the area control means 3 to execute during the processing of step 67. The step 31 is not processed (at least the area control means 3 is kept waiting in the step 21), and the area management information file 9
There is no conflict in writing to. Next, the area management information restoration means 6 releases the exclusive control of the area management information 10 through the simultaneous access control means 7 (step 68), and the step
Return to 63.

全ての使用者情報11の検索が終了すると(ステップ6
4)、領域管理情報修復手段6は、同時アクセス制御手
段7を通じて領域管理情報10を排他制御し(ステップ6
9)、領域管理情報ファイル9の領域管理情報をデータ
ファイル8の領域管理情報10に順次複写し(ステップ7
0)、領域管理情報ファイル9の該当領域の領域管理情
報に修復済みを設定する(ステップ71)。なお、ステッ
プ71で領域管理情報ファイル9への書込み中に領域制御
手段3からの書込み(ステップ31)が競合するおしれが
あるようにも思われるが、ステップ71の前のステップ69
でかならず領域管理情報10の排他制御が行われ、かつス
テップ31の前のステップ21でも領域管理情報10の排他制
御が行われているので、領域管理情報修復手段6がステ
ップ71の処理中に領域制御手段3がステップ31を処理す
ることはなく(すくなくとも領域制御手段3はステップ
21で待たされ)、領域管理情報ファイル9への書込みが
競合することはない。次に、領域管理情報修復手段6
は、同時アクセス制御手段7を通じて領域管理情報10の
排他制御を解除し(ステップ68)、ステップ63に戻る。
次に、領域管理情報修復手段6は、同時アクセス制御手
段7を通じて領域管理情報10の排他制御を解除し(ステ
ップ72)、領域管理情報ファイル9の全ての領域管理情
報のデータファイル8の領域管理情報10への複写が終了
したか否かを判定して(ステップ73)、複写が未終了で
あればステップ69に戻る。
When all user information 11 has been searched (Step 6
4), the area management information restoration means 6 exclusively controls the area management information 10 through the simultaneous access control means 7 (step 6
9), the area management information of the area management information file 9 is sequentially copied to the area management information 10 of the data file 8 (step 7
0), repaired is set in the area management information of the corresponding area of the area management information file 9 (step 71). Although it seems that writing from the area control means 3 (step 31) may conflict during writing to the area management information file 9 in step 71, step 69 before step 71.
Since the area management information 10 is always exclusively controlled, and the area management information 10 is also exclusively controlled at step 21 before step 31, the area management information restoration means 6 performs the area control during the processing of step 71. The control means 3 does not process step 31 (at least the area control means 3
There is no conflict in writing to the area management information file 9). Next, the area management information restoration means 6
Releases the exclusive control of the area management information 10 through the simultaneous access control means 7 (step 68) and returns to step 63.
Next, the area management information restoration means 6 releases the exclusive control of the area management information 10 through the simultaneous access control means 7 (step 72), and manages the area of the data file 8 of all the area management information of the area management information file 9. It is judged whether or not the copying to the information 10 is completed (step 73), and if the copying is not completed, the procedure returns to step 69.

領域管理情報ファイル9の全ての領域管理情報のデー
タファイル8の領域管理情報10への複写が終了すると
(ステップ73)、領域管理情報修復手段6は、修復プロ
グラム5の実行終了を同時アクセス制御手段7に通知し
(ステップ74)、領域管理情報ファイル9の修復プログ
ラム5への割当てを解除するとともに領域管理情報ファ
イル9自体を削除する(ステップ75)。
When the copying of all the area management information of the area management information file 9 to the area management information 10 of the data file 8 is completed (step 73), the area management information restoration means 6 indicates the end of execution of the restoration program 5 by the simultaneous access control means. 7 is notified (step 74), the allocation of the area management information file 9 to the repair program 5 is released, and the area management information file 9 itself is deleted (step 75).

なお、上記実施例では、入出力プログラム1が単数の
場合を例にとって説明したが、入出力プログラム1が複
数の場合にもファイルアクセス手段2内部で入出力プロ
グラム1からの入出力要求の競合制御を行うことによ
り、本発明が同様に適用できることはいうまでもない。
In the above embodiment, the case where the number of the input / output programs 1 is 1 has been described as an example. However, even when the number of the input / output programs 1 is plural, the contention control of the input / output requests from the input / output programs 1 is performed inside the file access means 2. It goes without saying that the present invention can be similarly applied by carrying out the above.

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

以上説明したように本発明は、ファイル内にファイル
内の領域の使用および未使用状態を管理する領域管理情
報とファイル内の領域の使用情報を含む使用者情報とを
持つ場合において、ファイルアクセス手段内に領域制御
手段を設けて同時アクセス制御手段によりデータファイ
ルの領域管理情報の排他制御を行いながらデータファイ
ルの領域確保,領域管理情報ファイルの割当ておよび領
域管理情報ファイルへの書込みを行うとともに、領域管
理情報修復手段を設けて領域管理情報ファイルの作成お
よび削除ならびに同時アクセス制御手段によりデータフ
ァイルの領域管理情報の排他制御を行いながら領域管理
情報ファイルへの書込みを行うようにしたことにより、
システム障害等により領域管理情報に誰も使用していな
い領域が使用中となるファイル領域の無駄が発生してい
るときに、データファイルを共有する単数または複数の
他の同時アクセスジョブ(入出力プログラム)が実行中
であっても無駄なファイル領域の解放処理にためのジョ
ブ(修復プログラム)が実行可能となる効果がある。
As described above, according to the present invention, in the case where the file has the area management information for managing the used and unused states of the area in the file and the user information including the usage information of the area in the file, the file access means An area control means is provided in the area, and while simultaneously controlling the area management information of the data file by the simultaneous access control means, the area of the data file is secured, the area management information file is allocated, and the area management information file is written. By providing the management information restoration means to create and delete the area management information file and to perform the exclusive control of the area management information of the data file by the simultaneous access control means while writing to the area management information file,
When a file area that is not used by anyone in the area management information is being used due to a system failure or the like, and the file area is wasted, one or more other simultaneous access jobs (I / O program) that share the data file Even when (1) is being executed, there is an effect that a job (restoration program) for useless file area release processing can be executed.

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

第1図は本発明の一実施例のファイル内領域管理情報修
復装置を示すブロック図、 第2図は第1図中の領域制御手段におけるデータファイ
ルからの領域確保処理を示す流れ図、 第3図は第1図中のファイルクローズ手段におけるデー
タファイルのクローズ処理を示す流れ図、 第4図は第1図中の領域管理情報修復手段におけるデー
タファイルの領域管理情報の修復処理を示す流れ図であ
る。 図において、 1……入出力プログラム、2……ファイルアクセス手
段、3……領域制御手段、4……ファイルクローズ手
段、5……修復プログラム、6……領域管理情報修復手
段、7……同時アクセス制御手段、8……データファイ
ル、9……領域管理情報ファイル、10……領域管理情
報、11……使用者情報である。
FIG. 1 is a block diagram showing an in-file area management information restoration device of an embodiment of the present invention, FIG. 2 is a flow chart showing an area securing process from a data file in an area control means in FIG. 1, FIG. FIG. 4 is a flow chart showing a data file closing process by the file closing means in FIG. 1, and FIG. 4 is a flow chart showing a region file management information restoration process of the data file by the region management information restoration means in FIG. In the figure, 1 ... I / O program, 2 ... File access means, 3 ... Area control means, 4 ... File closing means, 5 ... Restoration program, 6 ... Area management information restoration means, 7 ... Simultaneous Access control means, 8 ... Data file, 9 ... Area management information file, 10 ... Area management information, 11 ... User information.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】ファイル内にファイル内の領域の使用およ
び未使用状態を管理する領域管理情報とファイル内の領
域の使用情報を含む使用者情報とを持つデータファイル
と、 このデータファイルの領域管理情報だけを格納できる領
域を持つ領域管理情報ファイルと、 前記データファイルに対する入出力を要求する入出力プ
ログラムを含む入出力処理手段と、 前記データファイルの領域管理情報の修復を要求する修
復プログラムを含む修復処理手段と、 前記データファイルの領域管理情報の排他制御を行う同
時アクセス制御手段と、 前記入出力処理手段からの入出力要求時に前記データフ
ァイル内の領域が必要または不要になったときに前記同
時アクセス制御手段を通じて前記データファイルの領域
管理情報を排他制御しながら前記データファイルの領域
を確保または解放し前記同時アクセス制御手段を参照し
て前記修復プログラムが実行中であれば前記領域管理情
報ファイルを前記入出力プログラムに割り当てて前記領
域管理情報ファイルの該当領域の領域管理情報を使用中
または未使用状態に設定する領域制御手段を含むファイ
ルアクセス手段と、 前記修復処理手段からの修復要求時に前記領域管理情報
ファイルを作成し、前記同時アクセス制御手段に前記修
復プログラムが実行中である旨を通知し、前記同時アク
セス制御手段を通じて前記データファイルの領域管理情
報を排他制御しながら前記データファイル内の使用者情
報中の領域の使用情報を前記領域管理情報ファイルの領
域管理情報に反映した後に、前記領域管理情報ファイル
の領域管理情報を前記データファイルの領域管理情報に
複写し、前記同時アクセス制御手段に前記修復プログラ
ムが実行を終了した旨を通知し、前記領域管理情報ファ
イルを削除する領域管理情報修復手段と、 を有することを特徴とするファイル内領域管理情報修復
装置。
1. A data file having area management information for managing the use and unused states of areas in the file and user information including usage information of areas in the file, and area management of the data file. An area management information file having an area capable of storing only information, an input / output processing unit including an input / output program requesting input / output to the data file, and a repair program requesting repair of area management information of the data file Repair processing means, simultaneous access control means for performing exclusive control of the area management information of the data file, and when the area in the data file becomes necessary or unnecessary at the time of an input / output request from the input / output processing means, The data file area is controlled while the area management information of the data file is exclusively controlled through the simultaneous access control means. Area of the area management information file is allocated to the input / output program by allocating or releasing a file area and referring to the simultaneous access control means and the restoration program is being executed. File access means including area control means for setting information to a used or unused state, and the area management information file is created at the time of a repair request from the repair processing means, and the repair program is executed by the simultaneous access control means. That the area management information of the area management information file is used while the area management information of the area of the user information in the data file is exclusively controlled by the simultaneous access control means. Area management information of the area management information file, Area management information restoration means for copying the area management information, notifying the simultaneous access control means that the restoration program has finished executing, and deleting the area management information file; Area management information restoration device.
JP63099393A 1988-04-22 1988-04-22 File area management information restoration device Expired - Lifetime JPH083800B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63099393A JPH083800B2 (en) 1988-04-22 1988-04-22 File area management information restoration device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63099393A JPH083800B2 (en) 1988-04-22 1988-04-22 File area management information restoration device

Publications (2)

Publication Number Publication Date
JPH01270156A JPH01270156A (en) 1989-10-27
JPH083800B2 true JPH083800B2 (en) 1996-01-17

Family

ID=14246254

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63099393A Expired - Lifetime JPH083800B2 (en) 1988-04-22 1988-04-22 File area management information restoration device

Country Status (1)

Country Link
JP (1) JPH083800B2 (en)

Also Published As

Publication number Publication date
JPH01270156A (en) 1989-10-27

Similar Documents

Publication Publication Date Title
US8560524B2 (en) Allocating priorities to prevent deadlocks in a storage system
US6366928B1 (en) Method for moving an open file being accessed by at least one user
JPH10301834A (en) Management method for shared memory
Shoshani et al. Storage resource managers: Essential components for the grid
US6848021B2 (en) Efficient data backup using a single side file
JPH05210637A (en) Method of simultaneously controlling access
JPH0713813B2 (en) Data access method and data processing system
JPH07319715A (en) Hierarchical resource management method
JP3610266B2 (en) Method for writing data to log structured target storage
JPH08129457A (en) Method and apparatus for expansion,reduction and redistribution of external storage structure
JPH0628053B2 (en) Resource allocation control method for multiprocessor system
US9274819B2 (en) Performing garbage collection using a virtual thread in operating system without kernel thread support
JPH083800B2 (en) File area management information restoration device
JP4506292B2 (en) Cache control method, data processing system, and processing program therefor
JP2001290713A (en) Storage device system and method for acquiring its backup
JP3107094B2 (en) Method and apparatus for shortening shared buffer lock period
JPH07182225A (en) On-line increasing/decreasing system for os resource
JPH01112444A (en) Data access system
JP6860722B2 (en) Memory system control method
JP2574537B2 (en) Process management equipment
JP3342597B2 (en) Exclusive control method for disk subsystem and shared resources
JP6675466B2 (en) Memory system
JP2915612B2 (en) Shared area management method
JP2968756B2 (en) Internal resource matching method and apparatus in multiprocessor system
JP3123498B2 (en) Program restart device and its program recording medium