JPH0895835A - Method for reserving file space - Google Patents
Method for reserving file spaceInfo
- Publication number
- JPH0895835A JPH0895835A JP6229115A JP22911594A JPH0895835A JP H0895835 A JPH0895835 A JP H0895835A JP 6229115 A JP6229115 A JP 6229115A JP 22911594 A JP22911594 A JP 22911594A JP H0895835 A JPH0895835 A JP H0895835A
- Authority
- JP
- Japan
- Prior art keywords
- file
- data
- reservation
- application program
- dummy data
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 15
- 238000010586 diagram Methods 0.000 description 4
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、磁気ディスクなどの外
部記憶装置にファイルを作成する際のファイルスペース
の予約方法に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for reserving a file space when a file is created in an external storage device such as a magnetic disk.
【0002】[0002]
【従来の技術】コンピュータシステムにおいて外部記憶
装置に作成するファイルの管理は、オペレーティングシ
ステムの重要な機能の1つであるが、アプリケーション
プログラムから外部記憶装置にファイルを作成する場合
は、必要とするファイルのスペースをアプリケーション
プログラムから予約させていた。2. Description of the Related Art Management of files created in an external storage device in a computer system is one of the important functions of an operating system. However, when a file is created in an external storage device from an application program, necessary files are created. Was reserved from the application program.
【0003】しかし、そのための操作が面倒であるう
え、ファイルスペースの大きさを事前に決められない場
合には運用が難しいという問題がある。However, there is a problem that the operation for that purpose is troublesome and the operation is difficult when the size of the file space cannot be determined in advance.
【0004】そこで、UNIX(米国AT&Tベル研究
所によって開発されたTSS用オペレーティングシステ
ム)などのOS(オペレーティングシステム)のよう
に、ファイルスペースの予約手続きを廃止し、ファイル
スペースを自由に拡張可能にしたものが開発されてい
る。Therefore, like the OS (operating system) such as UNIX (operating system for TSS developed by AT & T Bell Laboratories in the United States), the file space reservation procedure is abolished and the file space can be expanded freely. Things are being developed.
【0005】[0005]
【発明が解決しようとする課題】しかしながら、ファイ
ルの運用は簡単になったが、反面、1つのファイルで外
部記憶装置の媒体を使い尽くすこともあり得るため、こ
のような事態になった場合は1つのファイルの溢れが外
部記憶媒体全体での溢れにつながるという問題が生じて
いる。However, although the operation of the file has become simpler, on the other hand, one file may exhaust the medium of the external storage device. There is a problem that overflow of one file leads to overflow of the entire external storage medium.
【0006】本発明の目的は、ファイルスペースの予約
手続きを持たないOSの便利さを損なわずに、ファイル
毎のスペースを予約可能にするファイルスペースの予約
方法を提供することにある。[0006] An object of the present invention is to provide a file space reservation method capable of reserving a space for each file without impairing the convenience of an OS having no file space reservation procedure.
【0007】[0007]
【課題を解決するための手段】上記目的を達成するため
に、本発明は、オペレーティングシステムを介してデー
タ処理を行うアプリケーションプログラムが外部記憶装
置を使用するに際し、当該アプリケーションプログラム
が必要とするファイルスペース相当分のダミーデータを
前記オペレーティングシステムを介して外部記憶装置に
予め書き込み、アプリケーションプログラムが出力する
実データは前記ダミーデータに重ね書きすることを特徴
とする。In order to achieve the above object, the present invention provides a file space required by an application program that performs data processing via an operating system when the application program uses the external storage device. It is characterized in that a considerable amount of dummy data is written in advance in the external storage device via the operating system, and the actual data output by the application program is overwritten on the dummy data.
【0008】[0008]
【作用】本発明によれば、必要とするファイルスペース
相当分のダミーデータをオペレーティングシステムを介
して外部記憶装置に予め書き込ませることにより、アプ
リケーションプログラムが必要とするファイルスペース
が確保される。実データはダミーデータに重ね書き(上
書き)される。According to the present invention, the dummy data corresponding to the required file space is written in the external storage device in advance via the operating system, whereby the file space required by the application program is secured. The actual data is overwritten (overwritten) on the dummy data.
【0009】ダミーデータとは、値に意味を持たないデ
ータを指し、通常は「ゼロ」や「空白」を用いる。しか
し、本来の実データと区別可能なものであれば、「ゼ
ロ」や「空白」以外のデータを用いることもできる。The dummy data refers to data whose value has no meaning, and is usually "zero" or "blank". However, data other than "zero" or "blank" can be used as long as it is distinguishable from the actual data.
【0010】したがって、ファイルスペースの予約手続
きを持たないOSの便利さを損なわずに、ファイル毎の
スペースが予約可能になる。Therefore, the space for each file can be reserved without impairing the convenience of the OS having no file space reservation procedure.
【0011】[0011]
【実施例】以下、本発明を実施例に基づき詳細に説明す
る。EXAMPLES The present invention will now be described in detail based on examples.
【0012】図1は、本発明を適用したコンピュータシ
ステムのファイルスペース予約機構の一実施例を示す機
能ブロック図であり、外部記憶装置である磁気ディスク
装置1には、OS2によってアプリケーションプログラ
ム3から要求されたファイルが作成される。なお、磁気
ディスク装置1内には、容量予約型ファイル10と容量
非予約型ファイル11が作成可能になっている。FIG. 1 is a functional block diagram showing an embodiment of a file space reservation mechanism of a computer system to which the present invention is applied. A request from an application program 3 by an OS 2 is issued to a magnetic disk device 1 which is an external storage device. File is created. A capacity reservation type file 10 and a capacity non-reservation type file 11 can be created in the magnetic disk device 1.
【0013】次にアプリケーションプログラム3からの
実データを出力すると、この実データはファイル10の
ダミーデータ上に上書きされる。Next, when the actual data from the application program 3 is output, the actual data is overwritten on the dummy data of the file 10.
【0014】図4(b)の例に示すように、1000バ
イトの実データ102を出力したとすると、出力位置で
示される出力位置から1000バイト分のダミーデータ
上に実データが上書きされる。As shown in the example of FIG. 4B, if the 1000-byte actual data 102 is output, the actual data is overwritten on the dummy data of 1000 bytes from the output position indicated by the output position.
【0015】この上書きの後は、出力位置100の値は
管理情報長+1000に更新される。After this overwriting, the value of the output position 100 is updated to the management information length + 1000.
【0016】OS2は、ファイルスペースの予約手続き
を持たないUNIX等のOSである。The OS 2 is an OS such as UNIX which has no file space reservation procedure.
【0017】本実施例では、ファイルスペースを予約す
るために、アプリケーションプログラム3とOS2との
間に予約ルーチン4が設けられている。In this embodiment, a reservation routine 4 is provided between the application program 3 and the OS 2 in order to reserve the file space.
【0018】この予約ルーチン4は、ファイルスペース
を予約するためのファイル予約処理部41とデータ出力
処理部42とから構成され、ファイルスペース予約型の
ファイル割当て要求31がアプリケーションプログラム
3から入力されると、ファイル予約処理部41からOS
2に対し、ファイルの生成を行うOS2の関数「cre
ate」43と、管理情報とダミーデータの出力を行う
OS2の関数「write」44が渡され、OS2によ
って磁気ディスク装置1内に管理情報とダミーデータの
出力バイト数分のスペースを持つファイル10が作成さ
れる。The reservation routine 4 is composed of a file reservation processing section 41 for reserving a file space and a data output processing section 42. When a file space reservation type file allocation request 31 is input from the application program 3. , OS from file reservation processor 41
2, the function "cre" of OS2 that creates a file
"ate" 43 and a function "write" 44 of OS2 for outputting management information and dummy data are passed, and the file 10 having a space for the number of output bytes of the management information and dummy data is stored in the magnetic disk device 1 by the OS2. Created.
【0019】このファイル10に対して、アプリケーシ
ョンプログラム3から実データのデータ出力要求32が
予約ルーチン4に入力されると、予約ルーチン4のデー
タ出力処理部42は実データの出力を行うOS2の関数
「write」45をOS2に渡し、実データをファイ
ル10のダミーデータに上書きする。When a data output request 32 for real data is input to the reservation routine 4 from the application program 3 for the file 10, the data output processing unit 42 of the reservation routine 4 outputs a function of the OS 2 for outputting the real data. The “write” 45 is passed to the OS 2, and the actual data is overwritten on the dummy data of the file 10.
【0020】一方、容量非予約型ファイル11を作成す
る場合、アプリケーションプログラム3は、ファイル1
1の生成を行うOS2の関数「create」33と、
実データの出力を行うOS2の関数「write」34
をOS2に入力する。OS2は、関数「create」
33に基づきファイル11を作成し、このファイル11
に実データを順次書き込む。On the other hand, when creating the capacity unreserved file 11, the application program 3 uses the file 1
A function "create" 33 of OS2 for generating 1.
OS2 function "write" 34 for outputting actual data
Is input to OS2. OS2 is the function "create"
File 11 is created based on 33, and this file 11
The actual data is sequentially written to.
【0021】図2は、ファイル予約処理部41の処理手
順を示すフローチャートである。FIG. 2 is a flow chart showing the processing procedure of the file reservation processing section 41.
【0022】ファイルスペース予約型のファイル割当て
要求31がアプリケーションプログラム3から入力され
ると、ファイルの生成を行うOS2の関数「creat
e」43をOS2に対して発行する(ステップ21
0)。次に、出力位置100に管理情報長および予約容
量値101にアプリケーションプログラム3から要求さ
れた予約容量値を設定し(ステップ220)、データ書
き込みを行うOS2の関数「write」44をOS2
に対して発行して管理情報の書き込みを行わせる(ステ
ップ230)。次に、予約容量値分のダミーデータを生
成し(ステップ240)、データの書き込みを行うOS
2の関数「write」44をOS2に対して発行して
ダミーデータの書き込みを行わせて(ステップ250)
終了する。When a file space reservation type file allocation request 31 is input from the application program 3, a function "create" of the OS2 for generating a file is generated.
e ”43 is issued to the OS 2 (step 21
0). Next, the management information length is set to the output position 100, and the reserved capacity value requested by the application program 3 is set to the reserved capacity value 101 (step 220), and the function "write" 44 of OS2 for writing data is set to OS2.
To write the management information (step 230). Next, the OS that generates dummy data for the reserved capacity value (step 240) and writes the data
Issue the second function "write" 44 to the OS2 to write dummy data (step 250).
finish.
【0023】図3は、データ出力処理部42の処理手順
を示すフローチャートである。FIG. 3 is a flow chart showing the processing procedure of the data output processing unit 42.
【0024】ファイル10に対するアプリケーションプ
ログラム3から実データの出力要求32が入力される
と、データ出力処理部42は、出力位置100に記録さ
れている出力位置にアプリケーションプログラム3から
渡された書き込みデータ長をプラスした値が予約容量値
110に記録されている予約容量値以内かを判断し(ス
テップ310)、越えている場合はアプリケーションプ
ログラム3にエラー通知を返信する(ステップ35
0)。予約容量値以内である場合は、実データの書き込
み位置を出力位置100に記録されている出力位置とし
てデータの書き込みを行うOS2の関数「write」
44をOS2に対して発行して実データの書き込みを行
わせる(ステップ320)。次に、管理情報内の出力位
置100に記録されている出力位置を更新する。具体的
には、今書き込んだ実データのデータ長を出力位置にプ
ラスする(ステップ330)。そして、書き込みを行う
OS2の関数「write」44をOS2に対して発行
して管理情報の書き込みを行わせて(ステップ340)
終了する。なお、必要なら、更新された出力位置をアプ
リケーションプログラム3に渡してもよい。When the actual data output request 32 for the file 10 is input from the application program 3, the data output processing unit 42 causes the data output processing unit 42 to write data length passed from the application program 3 to the output position recorded in the output position 100. It is determined whether or not the value obtained by adding is within the reserved capacity value recorded in the reserved capacity value 110 (step 310), and if it is exceeded, an error notification is returned to the application program 3 (step 35).
0). If it is within the reserved capacity value, the function "write" of the OS2 that writes data with the actual data write position as the output position recorded in the output position 100
44 is issued to OS2 to write actual data (step 320). Next, the output position recorded in the output position 100 in the management information is updated. Specifically, the data length of the actual data just written is added to the output position (step 330). Then, the function "write" 44 of the OS2 for writing is issued to the OS2 to write the management information (step 340).
finish. If necessary, the updated output position may be passed to the application program 3.
【0025】なお、ファイル10に対するアプリケーシ
ョンプログラム3からのデータ入力要求があった場合
は、「読み出し位置+読み出し長」が出力位置100に
記録されている「出力位置」以内かを判断して、出力位
置以内であればOS2に対して読み出し(read)要
求をする。「出力位置」を越えている場合はアプリケー
ションプログラム3にエラー通知を返信する。When there is a data input request for the file 10 from the application program 3, it is judged whether the "read position + read length" is within the "output position" recorded in the output position 100, and the output is made. If it is within the position, a read request is issued to the OS2. If it exceeds the “output position”, an error notification is returned to the application program 3.
【0026】また、本実施例ではアプリケーションプロ
グラム3のデータ入出力要求の妥当性確認のためにファ
イル10から管理情報を読み込んでくる処理を省略して
いる。Further, in the present embodiment, the process of reading the management information from the file 10 in order to confirm the validity of the data input / output request of the application program 3 is omitted.
【0027】図4(a)は、容量予約型ファイル10作
成直後の例を示す説明図である。FIG. 4A is an explanatory diagram showing an example immediately after the capacity reservation type file 10 is created.
【0028】容量予約型ファイル10には、容量非予約
型ファイル11には存在しない出力位置100と予約容
量値101とからなる管理情報が存在する。管理情報
は、アプリケーションプログラム3からの入出力要求の
妥当性を確認するために使用される。The capacity reservation type file 10 has management information consisting of an output position 100 and a reservation capacity value 101 which are not present in the capacity non-reservation type file 11. The management information is used to confirm the validity of the input / output request from the application program 3.
【0029】管理情報の後には、ダミーデータがアプリ
ケーションプログラム3から要求された容量分書き込ま
れている。After the management information, dummy data is written by the capacity requested by the application program 3.
【0030】管理情報を構成する出力位置100には、
追加される実データの書き込み位置を示す出力位置が記
録されている。ファイル10作成直後は、出力位置10
0には管理情報長が記録されている。また、管理情報を
構成する予約容量値101には、アプリケーションプロ
グラム3から要求された容量値である予約容量値が記録
されている。図4では、10000バイトの容量を予約
した例を示しているので、予約容量101には「100
00」が記録され、この後に10000バイトのダミー
データが書き込まれていて、結果として10000バイ
トの容量のスペースが確保される。At the output position 100 which constitutes the management information,
The output position indicating the write position of the added actual data is recorded. Immediately after creating file 10, output position 10
The management information length is recorded in 0. Further, the reserved capacity value 101 constituting the management information records a reserved capacity value which is a capacity value requested by the application program 3. FIG. 4 shows an example in which a capacity of 10000 bytes is reserved, so the reserved capacity 101 is "100.
00 ”is recorded, and after this, 10000 bytes of dummy data are written, and as a result, a space having a capacity of 10000 bytes is secured.
【0031】[0031]
【発明の効果】以上のように本発明によれば、オペレー
ティングシステムを介してデータ処理を行うアプリケー
ションプログラムが外部記憶装置を使用するに際し、当
該アプリケーションプログラムが必要とするファイルス
ペース相当分のダミーデータを前記オペレーティングシ
ステムを介して外部記憶装置に予め書き込ませることに
より、アプリケーションプログラムが必要とするファイ
ルスペースを確保し、アプリケーションプログラムが出
力する実データは前記ダミーデータに重ね書きして使用
させるようにしたので、ファイルスペースの予約手続き
を持たないOSの便利さを損なわずに、ファイル毎のス
ペースを必要分だけ予約することができ、1つのファイ
ルの溢れが外部記憶媒体全体での溢れにつながるような
事態を回避することができる。As described above, according to the present invention, when an application program that performs data processing via the operating system uses an external storage device, dummy data corresponding to the file space required by the application program is generated. Since the file space required by the application program is secured by prewriting in the external storage device via the operating system, the actual data output by the application program is used by being overwritten on the dummy data. A situation in which the space for each file can be reserved as much as necessary without impairing the convenience of an OS that does not have a file space reservation procedure, and overflow of one file leads to overflow of the entire external storage medium. Can avoid Can.
【図1】本発明を適用したコンピュータシステムのファ
イルスペース予約機構の一実施例を示す機能ブロック図
である。FIG. 1 is a functional block diagram showing an embodiment of a file space reservation mechanism of a computer system to which the present invention is applied.
【図2】ファイル予約処理部の処理手順を示すフローチ
ャートである。FIG. 2 is a flowchart showing a processing procedure of a file reservation processing unit.
【図3】データ出力処理部の処理手順を示すフローチャ
ートである。FIG. 3 is a flowchart showing a processing procedure of a data output processing unit.
【図4】容量予約型ファイルの作成例を示す説明図であ
る。FIG. 4 is an explanatory diagram showing an example of creating a capacity reservation type file.
1…磁気ディスク装置、2…OS、3…アプリケーショ
ンプログラム、4…予約ルーチン、10…容量予約型フ
ァイル、11…容量非予約型ファイル、41…ファイル
予約処理部、42…データ出力処理部、100…出力位
置、101…予約容量値。DESCRIPTION OF SYMBOLS 1 ... Magnetic disk device, 2 ... OS, 3 ... Application program, 4 ... Reservation routine, 10 ... Capacity reservation type file, 11 ... Capacity non-reservation type file, 41 ... File reservation processing part, 42 ... Data output processing part, 100 ... output position, 101 ... reserved capacity value.
Claims (1)
外部記憶装置内にファイルスペースを確保するオペレー
ティングシステムを使用したコンピュータシステムにお
いて、 前記オペレーティングシステムを介してデータ処理を行
うアプリケーションプログラムが外部記憶装置を使用す
るに際し、当該アプリケーションプログラムが必要とす
るファイルスペース相当分のダミーデータを前記オペレ
ーティングシステムを介して外部記憶装置に予め書き込
み、アプリケーションプログラムが出力する実データは
前記ダミーデータに重ね書きすることを特徴とするファ
イルスペースの予約方法。1. In a computer system using an operating system that secures a file space in an external storage device without going through a file space reservation procedure, an application program that performs data processing via the operating system stores the external storage device. When using, dummy data corresponding to a file space required by the application program is written in advance in an external storage device via the operating system, and actual data output by the application program is overwritten on the dummy data. How to reserve a file space.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6229115A JPH0895835A (en) | 1994-09-26 | 1994-09-26 | Method for reserving file space |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6229115A JPH0895835A (en) | 1994-09-26 | 1994-09-26 | Method for reserving file space |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0895835A true JPH0895835A (en) | 1996-04-12 |
Family
ID=16886987
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP6229115A Pending JPH0895835A (en) | 1994-09-26 | 1994-09-26 | Method for reserving file space |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0895835A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0922374A (en) * | 1995-07-05 | 1997-01-21 | Hitachi Ltd | Information processing system capable of accessing heterogeneous files and control method thereof |
WO2001063419A1 (en) * | 2000-02-28 | 2001-08-30 | Sharp Kabushiki Kaisha | File control method |
WO2001065374A1 (en) * | 2000-03-01 | 2001-09-07 | Matsushita Electric Industrial Co., Ltd. | File managing method and data recorder using the same, data reproducing apparatus, data recording/reproducing apparatus, and disk recorded by the file managing method |
EP1283506A2 (en) * | 2001-08-09 | 2003-02-12 | Matsuhita Electric Industrial Co., Ltd. | File management method, and memory card and terminal apparatus that make use of the method |
JP2004139615A (en) * | 2003-12-01 | 2004-05-13 | Sharp Corp | File management method and device |
JP2008077392A (en) * | 2006-09-21 | 2008-04-03 | Namco Bandai Games Inc | Data structure, file data-processing program, and information storage medium |
-
1994
- 1994-09-26 JP JP6229115A patent/JPH0895835A/en active Pending
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0922374A (en) * | 1995-07-05 | 1997-01-21 | Hitachi Ltd | Information processing system capable of accessing heterogeneous files and control method thereof |
WO2001063419A1 (en) * | 2000-02-28 | 2001-08-30 | Sharp Kabushiki Kaisha | File control method |
CN100426255C (en) * | 2000-02-28 | 2008-10-15 | 夏普公司 | File control method |
JP2001243096A (en) * | 2000-02-28 | 2001-09-07 | Sharp Corp | File managing method |
EP1267266A1 (en) * | 2000-02-28 | 2002-12-18 | Sharp Kabushiki Kaisha | File control method |
EP1267266A4 (en) * | 2000-02-28 | 2008-03-26 | Sharp Kk | File control method |
US7136884B2 (en) | 2000-03-01 | 2006-11-14 | Matsushita Electric Industrial Co., Ltd. | File managing method and data recorder using the same, data reproducing apparatus, data recording/reproducing apparatus, and disk recorded by the file managing method |
WO2001065374A1 (en) * | 2000-03-01 | 2001-09-07 | Matsushita Electric Industrial Co., Ltd. | File managing method and data recorder using the same, data reproducing apparatus, data recording/reproducing apparatus, and disk recorded by the file managing method |
US7024532B2 (en) | 2001-08-09 | 2006-04-04 | Matsushita Electric Industrial Co., Ltd. | File management method, and memory card and terminal apparatus that make use of the method |
EP1283506A3 (en) * | 2001-08-09 | 2004-04-14 | Matsuhita Electric Industrial Co., Ltd. | File management method, and memory card and terminal apparatus that make use of the method |
EP1283506A2 (en) * | 2001-08-09 | 2003-02-12 | Matsuhita Electric Industrial Co., Ltd. | File management method, and memory card and terminal apparatus that make use of the method |
JP2004139615A (en) * | 2003-12-01 | 2004-05-13 | Sharp Corp | File management method and device |
JP2008077392A (en) * | 2006-09-21 | 2008-04-03 | Namco Bandai Games Inc | Data structure, file data-processing program, and information storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2005115948A (en) | Method, system and program for archiving file | |
JPH0895835A (en) | Method for reserving file space | |
JPH06124239A (en) | Resident data controller for cache memory | |
JPS6359618A (en) | How to copy | |
JPH03222158A (en) | How to write additional data | |
JPH01255028A (en) | Method for making access to external storage device | |
JPH08202595A (en) | File system | |
JP3471838B2 (en) | How to manage circular sequential files | |
JPH06124218A (en) | Disk content destruction factor estimation supporting method and information processing system with disk content destruction factor estimation supporting function | |
JPH03218545A (en) | Pre-loading system for main storage | |
JP2735400B2 (en) | Asynchronous I / O control method | |
JP2507399B2 (en) | Database equipment | |
JPS619721A (en) | Sector control system of magnetic disk device | |
JPH05233402A (en) | Memory mapped file access system | |
JPH05216596A (en) | Virtual disk device | |
JPH0962545A (en) | Information processor | |
JPH06337808A (en) | Memory management system | |
JPH05197596A (en) | Tracer | |
JPH025188A (en) | Impp program starting system | |
JPS6130299B2 (en) | ||
JPH03129514A (en) | File control system | |
JPH0621995B2 (en) | File simultaneous access control system | |
JPS593571A (en) | Additional space allocation method | |
JPH0764832A (en) | Multi-extent file system | |
JPH0756695A (en) | Method for processing real time staging and device therefor |