Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0568788B2 - - Google Patents
[go: Go Back, main page]

JPH0568788B2 - - Google Patents

Info

Publication number
JPH0568788B2
JPH0568788B2 JP19082186A JP19082186A JPH0568788B2 JP H0568788 B2 JPH0568788 B2 JP H0568788B2 JP 19082186 A JP19082186 A JP 19082186A JP 19082186 A JP19082186 A JP 19082186A JP H0568788 B2 JPH0568788 B2 JP H0568788B2
Authority
JP
Japan
Prior art keywords
file
input
individual
information
stored
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
JP19082186A
Other languages
Japanese (ja)
Other versions
JPS6346677A (en
Inventor
Tadao Inamoto
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
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP19082186A priority Critical patent/JPS6346677A/en
Publication of JPS6346677A publication Critical patent/JPS6346677A/en
Publication of JPH0568788B2 publication Critical patent/JPH0568788B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Moving Of Head For Track Selection And Changing (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は磁気デイスクフアイルアクセス方式に
関し、特に磁気デイスクに格納されているデイレ
クトリフアイルを読出し、この情報により入出力
要求のある個別フアイルにアクセスする磁気デイ
スクフアイルアクセス方式に関する。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a magnetic disk file access method, and in particular, a method for reading a directory file stored on a magnetic disk and accessing an individual file with an input/output request based on this information. Related to magnetic disk file access method.

〔従来の技術〕[Conventional technology]

従来、この種の磁気デイスクフアイルアクセス
方式は、第4図に示すように、入出力要求を受信
するごとに対象の個別フアイルをデイレクトリフ
アイルと呼ばれる全個別フアイルの一覧情報を含
んだフアイルから探索し、その情報から対象の個
別フアイルの磁気デイスク上での目的レコードの
位置を獲得して読出し、書込み等の入出力処理を
行う構成となつていた。
Conventionally, this type of magnetic disk file access method searches for the target individual file from a file containing list information of all individual files called a directory file each time an input/output request is received, as shown in FIG. From this information, the position of the target record on the magnetic disk of the target individual file is acquired, read, and input/output processing such as writing is performed.

即ち、一つの要求に対する処理が終了してか
ら、次の要求の受信に移るという、要求順の入出
力処理が行なわれていた。
That is, input/output processing is performed in the order of requests, in which the processing for one request is completed and then the next request is received.

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

上述した従来の磁気デイスクフアイルアクセス
方式は、入出力要求を受取るたびに磁気デイスク
上のデイレクトリフアイルを読込み、対象の個別
フアイルの入出力処理を行なう構成となつている
ので、磁気デイスクへのアクセス回数が増加し、
またデイレクトリフアイルから遠い位置の目的レ
コードをアクセスする場合には、デイスクヘツド
の移動距離が長くなるため処理時間が増加すると
いう欠点がある。
The conventional magnetic disk file access method described above is configured to read the directory file on the magnetic disk every time an input/output request is received and perform input/output processing on the target individual file, so the number of accesses to the magnetic disk is reduced. increases,
Furthermore, when accessing a target record located far from the directory file, there is a disadvantage that the processing time increases because the disk head has to travel a long distance.

本発明の目的は、磁気デイスク上のフアイルへ
のアクセス回数及びデイスクヘツドの移動距離を
最小限におさえることのできる磁気デイスクフア
イルアクセス方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a magnetic disk file access method that can minimize the number of accesses to files on a magnetic disk and the distance traveled by the disk head.

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

本発明の磁気デイスクフアイルアクセス方式
は、磁気デイスクからデイレクトリフアイルを読
込み記憶部のデイレクトリフアイル領域に格納
し、前記デイレクトリフアイル読込み後のデイス
クヘツドの位置を前記記憶部のデイスクヘツド位
置エリアに格納し、前記デイレクトリフアイルに
登録されている各個別フアイルに対応して前記記
憶部の所定の位置にそれぞれフアイルデイレクト
リ情報格納エリアと入出力要求情報退避エリアと
ワークエリアとフアイル構成情報格納エリアとを
含むフアイル管理ブロツクを確保して前記フアイ
ル構成情報格納エリアに所定のフアイル構成情報
を格納し、前記デイレクトリフアイルのもつ各個
別フアイルのフアイルデイレクトリ情報を対応す
る前記フアイルデイレクトリ情報格納エリアにそ
れぞれ格納し、所定の期間ごとに前記各個別フア
イルに対する入出力要求を受信し、前記各入出力
要求の情報を対応する前記入出力要求情報格納エ
リアにそれぞれ格納し、前記各入出力要求の情報
に含まれる各個別フアイルの目的レコードの物理
ブロツク番号をそれぞれ前記各フアイル管理ブロ
ツクに格納されている情報から計算して各ワーク
エリアにそれぞれ格納し、前記入出力要求の有る
個別フアイルの数が複数のときこれら各個別フア
イルの目的レコードの前記磁気デイスク上の位置
と前記デイスクヘツドの位置との距離をそれぞれ
前記フアイル管理ブロツク及び前記デイスクヘツ
ド位置エリアに格納されている情報から計算して
最短距離にある目的レコードの個別フアイルを決
定し、この最短距離にある目的レコードの個別フ
アイル、または前記入出力要求の有る個別フアイ
ルの数が1のときにはこの個別フアイルの入出力
処理をこれら個別フアイルの入出力要求情報退避
エリアに格納されている情報により行い、前記デ
イスクヘツド位置エリアに格納されているデイス
クヘツドの位置を前記各入出力処理終了の都度、
その入出力処理終了後のデイスクヘツドの位置に
更新する構成を有している。
The magnetic disk file access method of the present invention reads a directory file from a magnetic disk and stores it in a directory file area of a storage unit, stores the position of the disk head after reading the directory file in a disk head position area of the storage unit, File management including a file directory information storage area, an input/output request information save area, a work area, and a file configuration information storage area at predetermined positions of the storage unit corresponding to each individual file registered in the directory file. A block is secured and predetermined file configuration information is stored in the file configuration information storage area, and file directory information of each individual file of the directory file is stored in the corresponding file directory information storage area for a predetermined period of time. receives an input/output request for each individual file, stores information on each input/output request in the corresponding input/output request information storage area, and stores information on each individual file included in the information on each input/output request. The physical block number of the target record is calculated from the information stored in each of the file management blocks and stored in each work area, and when the number of individual files for which the input/output request is requested is plural, the number of each of these individual files is calculated. The distance between the position of the target record on the magnetic disk and the position of the disk head is calculated from the information stored in the file management block and the disk head position area, respectively, and the individual file of the target record located at the shortest distance is selected. When the number of individual files of the target record located at the shortest distance or the number of individual files with the input/output request is 1, the input/output processing of this individual file is stored in the input/output request information save area of these individual files. The disk head position stored in the disk head position area is checked each time each input/output process is completed.
It has a configuration that updates the position of the disk head after the input/output processing is completed.

〔実施例〕〔Example〕

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

第1図は本発明の一実施例で使用されるプログ
ラムの流れ図である。
FIG. 1 is a flowchart of a program used in one embodiment of the present invention.

磁気デイスクへのアクセスのサービスが開始さ
れると、まず、ステツプS1において、磁気デイス
クからデイレクトリフアイルを読込み、記憶部の
デイレクトリフアイル領域に格納する。
When the magnetic disk access service is started, first, in step S1 , a directory file is read from the magnetic disk and stored in the directory file area of the storage section.

次に、ステツプS2において、デイレクトリフア
イルを読込んだ後のデイスクヘツドの位置を記憶
部のデイスクヘツド位置エリアに格納する。
Next, in step S2 , the disk head position after reading the directory file is stored in the disk head position area of the storage section.

次にステツプS3において、すでに格納されてい
るデイレクトリフアイルの情報から、このデイレ
クトリフアイルに登録されている特定のフアイル
認識番号によつて認識、区別される各個別フアイ
ルごとにフアイル管理ブロツクを記憶部に確保す
る。このフアイル管理ブロツクは、第2図に示す
ように、ワークエリア11、入出力情報退避エリ
ア12、フアイルデイレクトリ情報格納エリア1
3及びフアイル構成情報格納エリア14から構成
され、フアイル構成情報格納エリア14に所定の
フアイル構成情報を格納する。
Next, in step S3 , from the information of the already stored directory file, a file management block is stored in the storage unit for each individual file that is recognized and distinguished by a specific file identification number registered in this directory file. to be secured. As shown in FIG. 2, this file management block includes a work area 11, an input/output information save area 12, and a file directory information storage area 1.
3 and a file configuration information storage area 14, and predetermined file configuration information is stored in the file configuration information storage area 14.

次に、ステツプS4において、格納されているデ
イレクトリフアイルからそれぞれの個別フアイル
に対応するフアイルデイレクトリ情報を各個別フ
アイルのフアイル管理ブロツク1内のフアイルデ
イレクトリ情報格納エリア13に格納する。これ
らの情報はサービス終了時まで維持される。
Next, in step S4 , file directory information corresponding to each individual file from the stored directory files is stored in the file directory information storage area 13 in the file management block 1 of each individual file. This information will be maintained until the end of the service.

次に、ステツプS5において、所定の期間、各個
別フアイルに対する入出力要求を入出力要求受信
用キユーにより受信し、入出力要求を受信する
と、ステツプS6において、その入出力要求の情報
を対応する個別フアイル(個別フアイルAとす
る)のフアイル管理ブロツク1内の入出力要求情
報退避エリア12へ格納する。
Next, in step S5 , the input/output request for each individual file is received by the input/output request receiving queue for a predetermined period of time, and when the input/output request is received, the information of the input/output request is processed in step S6 . The input/output request information is stored in the input/output request information save area 12 in the file management block 1 of the individual file (referred to as individual file A).

次に、ステツプS7において、入出力要求受信用
キユーに他の個別フアイルの入出力要求が存在す
るかどうかを確認し、存在しなければステツプS8
に移るが、存在すればステツプS6に戻る。ここで
は仮に個別フアイルBに対する入出力要求も存在
した場合を考える。この場合、個別フアイルAの
ときと同様に、入出力要求情報を個別フアイルB
のフアイル管理ブロツク1内の入出力要求情報退
避エリア12へ格納する。
Next, in step S7 , it is checked whether or not there are input/output requests for other individual files in the input/output request receiving queue, and if there are no input/output requests, the process proceeds to step S8 .
However, if it exists, return to step S6 . Here, let us consider the case where there is also an input/output request for individual file B. In this case, similar to the case of individual file A, input/output request information is transferred to individual file B.
The input/output request information is stored in the input/output request information save area 12 in the file management block 1.

所定期間の入出力要求の処理が済むと、ステツ
プS8において、入出力要求されている個別フアイ
ルAの目的レコードの物理ブロツク番号を、フア
イル管理ブロツク1内の入出力要求の情報、フア
イルデイレクトリ情報、及びフアイル構成情報を
もとに計算し、個別フアイルAのワークエリア1
1に格納する。同様に個別フアイルBの目的レコ
ードの物理ブロツク番号を計算し、個別フアイル
Bのフアイル管理ブロツク1内のワークエリア1
1に格納する。
After the input/output request has been processed for a predetermined period, in step S8 , the physical block number of the target record of the individual file A for which the input/output is requested is stored as the input/output request information in the file management block 1 and the file directory information. , and the file configuration information, and work area 1 of individual file A.
Store in 1. Similarly, the physical block number of the target record of individual file B is calculated, and work area 1 in file management block 1 of individual file B is calculated.
Store in 1.

次に、ステツプS9において、入出力要求の有る
個別フアイルの数が複数か1つかを調べ、上記の
例のように複数の場合はステツプS10に進み、1
つのときにはステツプS11に進む。
Next, in step S9 , it is checked whether the number of individual files with input/output requests is multiple or one. If there are multiple files as in the above example, the process advances to step S10 , and
When this happens, proceed to step S11 .

ステツプS10においては、磁気デイスク上の各
目的レコードの位置と磁気デイスクの位置との距
離を、それぞれのフアイル管理ブロツク1とデイ
スクヘツド位置エリアとに格納されている情報を
もとにして計算し、最短距離にある目的レコード
の個別フアイルを決定する。例えば、上記の例の
個別フアイルA,Bの場合、第3図に示すよう
に、磁気デイスク2上の個別フアイルA,Bの目
的レコード21a,21bと、デイスクヘツド3と
の距離L1,L2を計算し、この場合はL2の方が短
かいので、個別フアイルBが選ばれる。
In step S10 , the distance between the position of each target record on the magnetic disk and the position of the magnetic disk is calculated based on the information stored in each file management block 1 and disk head position area. , determine the individual file of the target record that is the shortest distance away. For example, in the case of the individual files A and B in the above example, as shown in FIG . , L 2 is calculated, and in this case, since L 2 is shorter, the individual file B is selected.

次に、ステツプS11において、ステツプ10で決
定された個別フアイル、または入出力要求が1つ
のみのときの個別フアイルに対し各個別フアイル
の入出力要求情報退避エリア12の情報により入
出力処理が行なわれる。
Next, in step S11 , input/output processing is performed for the individual file determined in step 10 , or for the individual file when there is only one input/output request, based on the information in the input/output request information save area 12 of each individual file. It is done.

この入出力処理が済んだ後、ステツプS12にお
いて、デイスクヘツド位置エリアに格納されてい
るデイスクヘツドの位置を、この時点におけるデ
イスクヘツドの位置に更新する。
After this input/output processing is completed, in step S12 , the disk head position stored in the disk head position area is updated to the disk head position at this point in time.

そして、ステツプS13において、この所定期間
において入出力要求された個別フアイルの入出力
処理が全部済んだかどうか確認し、済んでいなけ
ればステツプS9に戻り、済んでいればステツプ
S14において、次の所定期間における入出力要求
を受信するかどうかを判別し、受信する場合はス
テツプS5に戻り、受信しない場合にはこのジヨブ
は終了する。
Then, in step S13 , it is checked whether all the input/output processing for the individual files requested for input/output has been completed during this predetermined period. If not, the process returns to step S9 ; if it has been completed, the process returns to step S9.
In S14 , it is determined whether or not to receive an input/output request for the next predetermined period. If it is received, the process returns to step S5 , and if not, the job ends.

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

以上説明したように本発明は、磁気デイスクア
クセスのサービス開始時に読込んだフアイルデイ
レクトリ情報を保存し、各個別フアイルの諸情報
をフアイル管理ブロツクに格納しておき、またデ
イスクヘツドの現在位置を個別フアイルの入出力
処理を行つた都度更新し、これらの情報をもとに
最短距離の目的レコードにアクセスする構成にす
ることにより、磁気デイスク上のフアイルへのア
クセス回数及びデイスクヘツドの移動距離を最小
限におさえることができ、処理時間の短縮及びア
クセス効率の向上をはかることができる効果があ
る。
As explained above, the present invention saves the file directory information read at the start of the magnetic disk access service, stores various information about each individual file in the file management block, and stores the current location of each disk head individually. By updating the file each time file input/output processing is performed, and accessing the shortest target record based on this information, the number of accesses to the file on the magnetic disk and the distance traveled by the disk head can be minimized. This has the effect of reducing processing time and improving access efficiency.

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

第1図は本発明の一実施例に使用されるプログ
ラムの流れ図、第2図は本発明に使用されるフア
イル管理ブロツクの記憶領域の構成の一例を示す
記憶領域構成図、第3図は第1図に示されたステ
ツプS10の処理内容を説明するための模式図、第
4図は従来の磁気デイスクアクセス方式に使用さ
れるプログラムの一例を示す流れ図である。 1……フアイル管理ブロツク、2……磁気デイ
スク、3……デイスクヘツド、11……ワークエ
リア、12……入出力要求情報退避エリア、13
……フアイルデイレクトリ情報格納エリア、14
……フアイル構成情報格納エリア、21a,21b
……目的レコード、S1〜S14,S21〜S25……ステ
ツプ。
FIG. 1 is a flow chart of a program used in an embodiment of the present invention, FIG. 2 is a storage area configuration diagram showing an example of the storage area configuration of a file management block used in the present invention, and FIG. FIG. 4 is a schematic diagram for explaining the processing contents of step S10 shown in FIG. 1, and FIG. 4 is a flowchart showing an example of a program used in the conventional magnetic disk access method. 1...File management block, 2...Magnetic disk, 3...Disk head, 11...Work area, 12...I/O request information save area, 13
...File directory information storage area, 14
...File configuration information storage area, 21 a , 21 b
...Objective record, S1 to S14 , S21 to S25 ...Step.

Claims (1)

【特許請求の範囲】[Claims] 1 磁気デイスクからデイレクトリフアイルを読
込み記憶部のデイレクトリフアイル領域に格納
し、前記デイレクトリフアイル読込み後のデイス
クヘツドの位置を前記記憶部のデイスクヘツド位
置エリアに格納し、前記デイレクトリフアイルに
登録されている各個別フアイルに対応して前記記
憶部の所定の位置にそれぞれフアイルデイレクト
リ情報格納エリアと入出力要求情報退避エリアと
ワークエリアとフアイル構成情報格納エリアとを
含むフアイル管理ブロツクを確保して前記フアイ
ル構成情報格納エリアに所定のフアイル構成情報
を格納し、前記デイレクトリフアイルのもつ各個
別フアイルのフアイルデイレクトリ情報を対応す
る前記各フアイルデイレクトリ情報格納エリアに
それぞれ格納し、所定の期間ごとに前記各個別フ
アイルに対する入出力要求を受信し、前記各入出
力要求の情報を対応する前記入出力要求情報格納
エリアにそれぞれ格納し、前記各入出力要求の情
報に含まれる各個別フアイルの目的レコードの物
理ブロツク番号をそれぞれ前記各フアイル管理ブ
ロツクに格納されている情報から計算して各ワー
クエリアにそれぞれ格納し、前記入出力要求の有
る個別フアイルの数が複数のときこれら各個別フ
アイルの目的レコードの前記磁気デイスク上の位
置と前記デイスクヘツドの位置との距離をそれぞ
れ前記フアイル管理ブロツク及び前記デイスクヘ
ツド位置エリアに格納されている情報から計算し
て最短距離にある目的レコードの個別フアイルを
決定し、この最短距離にある目的レコードの個別
フアイル、または前記入出力要求の有る個別フア
イルの数が1のときにはこの個別フアイルの入出
力処理をこれら個別フアイルの入出力要求情報退
避エリアに格納されている情報により行い、前記
デイスクヘツド位置エリアに格納されているデイ
スクヘツドの位置を前記各入出力処理終了の都
度、その入出力処理終了後のデイスクヘツドの位
置に更新することを特徴とする磁気デイスクフア
イルアクセス方式。
1 Read the directory file from the magnetic disk and store it in the directory file area of the storage unit, store the disk head position after reading the directory file in the disk head position area of the storage unit, and store each directory file registered in the directory file. A file management block including a file directory information storage area, an input/output request information save area, a work area, and a file configuration information storage area is secured at a predetermined position of the storage unit corresponding to each individual file, and the file configuration information is stored in the storage unit. Predetermined file configuration information is stored in a storage area, file directory information of each individual file of the directory file is stored in the corresponding file directory information storage area, and input to each individual file is stored at a predetermined period. Receives an output request, stores the information of each input/output request in the corresponding input/output request information storage area, and sets the physical block number of the target record of each individual file included in the information of each input/output request. It is calculated from the information stored in each of the file management blocks and stored in each work area, and when the number of individual files for which the input/output request is made is plural, the purpose record of each of these individual files is stored on the magnetic disk. The distance between the position and the disk head position is calculated from the information stored in the file management block and the disk head position area, respectively, to determine the individual file of the target record located at the shortest distance, and the individual file located at the shortest distance is determined. When the number of individual files in the target record or the number of individual files with the input/output request is 1, the input/output processing of this individual file is performed using the information stored in the input/output request information save area of these individual files, and A magnetic disk file access method characterized in that the position of the disk head stored in the head position area is updated to the position of the disk head after each input/output process is completed each time the input/output process is completed.
JP19082186A 1986-08-13 1986-08-13 Magnetic disk file accessing system Granted JPS6346677A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19082186A JPS6346677A (en) 1986-08-13 1986-08-13 Magnetic disk file accessing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19082186A JPS6346677A (en) 1986-08-13 1986-08-13 Magnetic disk file accessing system

Publications (2)

Publication Number Publication Date
JPS6346677A JPS6346677A (en) 1988-02-27
JPH0568788B2 true JPH0568788B2 (en) 1993-09-29

Family

ID=16264319

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19082186A Granted JPS6346677A (en) 1986-08-13 1986-08-13 Magnetic disk file accessing system

Country Status (1)

Country Link
JP (1) JPS6346677A (en)

Also Published As

Publication number Publication date
JPS6346677A (en) 1988-02-27

Similar Documents

Publication Publication Date Title
JPH04186447A (en) information processing equipment
JPH0568788B2 (en)
US5170479A (en) File block managing system using next record header position data and delete history data from block header and record headers to locate requested record block
JP3185954B2 (en) How to archive and recall files
JP2962335B2 (en) Free space search method
JP2817911B2 (en) Access control method for keyed files
JP2722660B2 (en) How to manage indexed sequential files
JP2624146B2 (en) Related record batch reading method
JP3398672B2 (en) Intermediate data storage device
JPH0198020A (en) Index management system
JPH04355262A (en) Retrieval information saving system
JP2861548B2 (en) Multiple host method
JPH04190454A (en) History data managing method
JPH03225412A (en) File data read system
JPH03280136A (en) Record positioning system for sequentially programmed file
JP3298935B2 (en) File management device
JPH04156626A (en) File entry generating system for vtoc
JPH103412A (en) Magnetic disk file relocation system
JPH03100839A (en) Record adding process system for file of indexed sequential organization
JPH04350741A (en) Access speed increasing method for indexed sequential file
JPS6055854B2 (en) Data base storage area management control method
JPH10198525A (en) External storage device data output method
JPH0652019A (en) File management device
JPH04127335A (en) file management system
JPH01119839A (en) File constitution control system