JPH0667947A - File data management system - Google Patents

File data management system

Info

Publication number
JPH0667947A
JPH0667947A JP4221545A JP22154592A JPH0667947A JP H0667947 A JPH0667947 A JP H0667947A JP 4221545 A JP4221545 A JP 4221545A JP 22154592 A JP22154592 A JP 22154592A JP H0667947 A JPH0667947 A JP H0667947A
Authority
JP
Japan
Prior art keywords
file
write
sector
data
last
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.)
Withdrawn
Application number
JP4221545A
Other languages
Japanese (ja)
Inventor
Shinji Minazu
真治 水津
Jiro Okamoto
二朗 岡本
Shoichi Imai
昭一 今井
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4221545A priority Critical patent/JPH0667947A/en
Publication of JPH0667947A publication Critical patent/JPH0667947A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To provide a file data management system which manages a file in the unit of bytes by individual user programs and simplifies an operation on a user-side. CONSTITUTION:In file data management system managing the file 2 by an operating system 1 in a sector unit, a file management information table 5 storing the number of write final sector effective bytes in a write sector 4i into which data is written as file management information into a byte area 15 is provided, and a control means 12 which writes the number of the write final sector effective bytes into the byte area 15 at the time of writing data into the file 2 and reads the number of the write final sector effective bytes in the byte area 15 at the time of reading data from the file 2 based on a system call for writing or reading the number of the write final sector effective bytes which a user issues is provided.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、オペレーティングシス
テムによりファイルの管理を複数バイトのブロックから
なるセクタ単位で行うファイルデータ管理方式に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a file data management system in which a file is managed by an operating system in units of sectors composed of blocks of a plurality of bytes.

【0002】[0002]

【従来の技術】オペレーティングシステムのファイル管
理において、ファイルの管理(読み書き)をセクタ(複
数バイトのブロック)単位で行う方式がある。このセク
タ単位のファイル管理方式の一例を図6に示す。図6に
示すようにオペレーティングシステム(以下、OSと略
称する。)によりファイル20が管理されるようになっ
ている。
2. Description of the Related Art In file management of an operating system, there is a method of managing (reading / writing) files in units of sectors (blocks of a plurality of bytes). FIG. 6 shows an example of this sector unit file management system. As shown in FIG. 6, the file 20 is managed by an operating system (hereinafter abbreviated as OS).

【0003】ファイル20にはファイルの実体としてそ
れぞれが複数バイトのブロックからなる複数のセクタ4
a〜4nが設けられている。また、ファイル20のファ
イル管理情報テーブル30に、ファイル名、ファイルサ
イズの管理情報としてファイルの総セクタ数が格納され
ている。
The file 20 has a plurality of sectors 4 each of which is composed of a block of a plurality of bytes as a substance of the file.
a to 4n are provided. Further, the file management information table 30 of the file 20 stores the total number of sectors of the file as management information of the file name and file size.

【0004】このセクタ4a〜4n毎に複数バイトのブ
ロックが書き込みまたは読み出されていくから、管理が
簡単で処理速度も一般に速いというメリットがある。
Since a block of a plurality of bytes is written or read in each of the sectors 4a to 4n, there are advantages that the management is simple and the processing speed is generally high.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、図7に
示すようにセクタ4aにデータ22aを書き込み、さら
にセクタ4bの途中までデータ22aを書き込み、後に
その続きからデータの追記書き処理を行なうと、図8に
示すように追記書きデータ22bはセクタ4cの先頭か
ら書き込むことになる。このため、セクタ4bにファイ
ルデータの隙間23(データ空)が発生してしまう。
However, as shown in FIG. 7, when the data 22a is written in the sector 4a, the data 22a is further written in the middle of the sector 4b, and the data write-once process is performed from the continuation of the data 22a. As shown in 8, write-once write data 22b is written from the beginning of sector 4c. Therefore, a gap 23 (empty data) of file data is generated in the sector 4b.

【0006】そこで、従来ではユーザ側で、次に書き込
むべき位置をバイト単位で管理するようにし、図9に示
すようにその管理情報をファイル20に送出してセクタ
4bの位置aにポイントさせる。そして、その位置aか
ら追記書きデータ22bを書き込むようにして前述した
セクタ2bの隙間23をなくすようにしていた。
Therefore, conventionally, the user side manages the position to be written next in byte units, and sends the management information to the file 20 to point to the position a of the sector 4b as shown in FIG. Then, the write-once data 22b is written from the position a so as to eliminate the above-mentioned gap 23 of the sector 2b.

【0007】しかし、ユーザ側でバイト単位により管理
する場合にあっては、追記書きのためのデータをユーザ
側が媒体(ファイル)から読み込んだり、それを媒体に
反映するといった作業が必要であり、ユーザの操作が大
変であった。
However, when the user side manages the data in byte units, it is necessary for the user side to read the data for additional writing from the medium (file) and reflect it on the medium. Was difficult to operate.

【0008】また、ユーザプログラム毎にファイル20
が設けられており、ファイル20をマルチオープンし
て、ユーザプログラム別にバイト単位でファイル管理す
ることになるため、管理が煩わしかった。
A file 20 is stored for each user program.
Is provided, and the file 20 is multi-opened and file management is performed in byte units for each user program, so management is troublesome.

【0009】本発明は、このような点に鑑みてなされた
もので、その目的とするところは、ユーザプログラム別
のバイト単位でのファイル管理を行い、しかもユーザ側
の操作を簡単化できるファイルデータ管理方式を提供す
ることにある。
The present invention has been made in view of the above circumstances. An object of the present invention is to perform file management in byte units for each user program and to simplify file operation by the user. To provide a management method.

【0010】[0010]

【課題を解決するための手段】本発明は、上記課題を解
決し目的を達成するために下記の構成とした。図1は本
発明の原理図である。図1を参照して本発明を説明す
る。
In order to solve the above problems and achieve the object, the present invention has the following constitution. FIG. 1 shows the principle of the present invention. The present invention will be described with reference to FIG.

【0011】オペレーティングシステム1によりファイ
ル2の管理を複数バイトのブロックからなるセクタ単位
で行うファイルデータ管理方式において、ファイル2毎
にファイル内にファイル管理情報を格納するものであっ
て全セクタ4a〜4nのうちのデータが書き込まれた書
込最終セクタ4iにおける書込最終セクタ有効バイト数
をバイト領域15に格納するファイル管理情報テーブル
5を設けている。
In the file data management system in which the operating system 1 manages the file 2 in units of sectors each consisting of a block of a plurality of bytes, file management information is stored in the file for each file 2, and all sectors 4a to 4n are stored. There is provided a file management information table 5 for storing in the byte area 15 the number of effective bytes in the last write sector in the last write sector 4i in which the data of the above is written.

【0012】ファイル管理情報テーブル5のバイト領域
15に対する書込最終セクタ有効バイト数の書き込み又
は読み出しを行なう制御手段12を備え、前記制御手段
12は、利用者が発行した前記書込最終セクタ有効バイ
ト数の書き込み又は読み出しのためのシステムコールに
基づき、ファイル2にデータを書き込む際に前記バイト
領域15に書込最終セクタ有効バイト数を書き込みファ
イル2からデータを読み出す際にバイト領域15の書込
最終セクタ有効バイト数を読み出すよう構成する。
There is provided a control means 12 for writing or reading the number of valid bytes of the last write sector for writing to the byte area 15 of the file management information table 5, and the control means 12 has the valid byte of the last write sector issued by the user. Based on a system call for writing or reading a number, write the last sector effective byte number to the byte area 15 when writing data to the file 2 and write the last byte area 15 when reading data from the file 2. It is configured to read the number of valid bytes in the sector.

【0013】ファイル2としては、例えば、磁気ディス
ク、磁気テープ、光ディスク、半導体ファイルなどであ
る。オペレーティングシステム1としては、例えばFM
S、OS/360、OS/370、CP/M、アメリカ
のマイクロソフト社が開発したマイクロコンピュータ向
きMS−DOSなどがある。
The file 2 is, for example, a magnetic disk, a magnetic tape, an optical disk, a semiconductor file, or the like. As the operating system 1, for example, FM
There are S, OS / 360, OS / 370, CP / M, MS-DOS for microcomputers developed by Microsoft Corporation in the United States, and the like.

【0014】利用者が発行するシステムコールは、例え
ばキーボード、マウスなどの入力手段から入力するとよ
い。ファイル管理情報テーブル5は、例えばファイル名
前、セクタ数、書込最終セクタ有効バイト数などを格納
している。
The system call issued by the user may be input from an input means such as a keyboard or a mouse. The file management information table 5 stores, for example, a file name, the number of sectors, the number of valid bytes in the last write sector, and the like.

【0015】前記複数バイトのブロックは、1回の入出
力動作で読み書きされ、1個以上のレコードからなる。
このレコード形式には、ファイル中の全てのレコードが
同一の長さからなり1ブロック1レコードの非ブロック
化レコード及び1ブロック複数レコードからなる固定長
レコード、各レコードの長さが可変である可変長レコー
ド、1ブロック1レコードで構成される不定長レコード
などがある。
The block of a plurality of bytes is read and written by one input / output operation and is composed of one or more records.
In this record format, all records in the file have the same length, a fixed-length record consisting of one block of one record, an unblocked record, and one block of multiple records, and a variable length in which each record has a variable length. There is an indefinite length record composed of one record and one block.

【0016】より好ましくは以下のようにするのが望ま
しい。すなわち、前記制御手段12は、ファイルにデー
タを書き込み、書込最終セクタ有効バイト数をバイト領
域に書き込み、利用者が発行した前記書込最終セクタ有
効バイト数の書き込み又は読み出しのためのシステムコ
ールによりバイト領域からファイルのセクタ数及び書込
最終セクタ有効バイト数を得て、セクタ数に基づき書込
最終セクタにシークしてデータを読み出し、読み出した
データの先頭から書込最終セクタ有効バイト数だけポイ
ントを移動して追記データを書き込むよう構成する。
More preferably, the following is desirable. That is, the control means 12 writes data to a file, writes the write last sector effective byte number in the byte area, and executes a system call for writing or reading the write last sector effective byte number issued by the user. Obtain the number of sectors in the file and the number of valid bytes for the last write sector from the byte area, seek to the last sector for writing based on the number of sectors, read the data, and then point the number of valid bytes for the last write sector from the beginning of the read data. Is moved to write additional data.

【0017】また、前記オペレーティングシステム1
は、ファイル2を管理するデータ管理部11と、前記制
御手段12としてタスクを管理するためのタスク管理部
とを備えている。
Further, the operating system 1
Is provided with a data management section 11 for managing the file 2 and a task management section for managing tasks as the control means 12.

【0018】前記データ管理部11は、ファイル2のフ
ァイル管理情報テーブル5の管理情報を主記憶装置7に
対して書き込み又は読み出しを行い、前記タスク管理部
は、前記システムコールに基づき前記主記憶装置7上に
書込最終セクタ有効バイト数の書き込み又は読み出しを
行なうよう構成する。
The data management unit 11 writes or reads the management information of the file management information table 5 of the file 2 to or from the main storage device 7, and the task management unit, based on the system call. 7 is configured to write or read the number of valid bytes of the last write sector.

【0019】前記タスクは、マルチプログラミングを実
現するためにCPU(中央処理装置)を割り当てる単位
であり、タスク管理部はタスクの生成、消滅、タスク間
の同期、相互通信を行なう。
The task is a unit to which a CPU (central processing unit) is allocated to realize multi-programming, and the task management section performs task generation / deletion, task synchronization, and mutual communication.

【0020】CPUを要求する観点からタスクは、実行
可能状態、実行状態、待機状態の3つの状態をとる。実
行可能状態は、CPUの使用が可能な状態であり、実行
状態は、CPUを使用中の状態であり、待機状態は、入
出力動作などの終了を待っている状態でCPUを使用で
きない状態である。
From the viewpoint of requesting a CPU, a task has three states: an executable state, an execution state, and a standby state. The ready state is a state in which the CPU can be used, the run state is a state in which the CPU is in use, and the standby state is a state in which the CPU cannot be used while waiting for the end of input / output operation. is there.

【0021】[0021]

【作用】本発明によれば、全セクタ4a〜4nのうちの
データが書き込まれた書込最終セクタ4iにおける書込
最終セクタ有効バイト数をバイト領域15に格納するフ
ァイル管理情報テーブル5を設け、制御手段12が、利
用者が発行したシステムコールに基づきファイル2にデ
ータを書き込む際にバイト領域15に書込最終セクタ有
効バイト数を書き込み、ファイル2からデータを読み出
す際にバイト領域15の書込最終セクタ有効バイト数を
読み出すことで、次にデータを書き始めるべきセクタ内
位置を得ることができる。
According to the present invention, the file management information table 5 for storing in the byte area 15 the number of valid bytes of the last write sector in the last write sector 4i in which data of all the sectors 4a to 4n has been written, is provided. When the control means 12 writes the data to the file 2 based on the system call issued by the user, it writes the byte count of the last sector effective byte in the byte area 15, and when the data is read from the file 2, the byte area 15 is written. By reading the last sector effective byte number, it is possible to obtain the position within the sector at which data should be written next.

【0022】よって、システムがセクタ単位でファイル
を管理する場合でも、ユーザはバイト単位でのファイル
のアクセスが可能となるため、ユーザ側の操作が簡単に
なり、データの書き込み又は読み出しと同時に書込最終
セクタ有効バイト数が設定されるから、処理が迅速とな
る。
Therefore, even when the system manages files in sector units, the user can access the files in byte units, so that the operation on the user side is simplified, and data writing or reading is performed at the same time. Since the last sector effective byte number is set, the processing becomes quick.

【0023】また、制御手段12が、ファイルにデータ
を書き込み、書込最終セクタ有効バイト数をバイト領域
に書き込み、利用者が発行したシステムコールによりバ
イト領域からファイルのセクタ数及び書込最終セクタ有
効バイト数を得て、セクタ数に基づき書込最終セクタに
シークしてデータを読み出し、読み出したデータの先頭
から書込最終セクタ有効バイト数だけポイントを移動し
て追記データを書き込むので、従来方式のように書込最
終セクタに隙間がなくなる。
Further, the control means 12 writes the data to the file, writes the number of valid bytes of the last sector to be written into the byte area, and the system call issued by the user causes the number of sectors of the file and the last sector of the file to be valid from the byte area. The number of bytes is obtained, the data is read by seeking to the write last sector based on the number of sectors, and the write-once data is written by moving the point from the beginning of the read data by the write last sector effective byte number. Thus, there is no gap in the final write sector.

【0024】[0024]

【実施例】以下、本発明の具体的な実施例を説明する。 <実施例1>図2は本発明に係るファイルデータ管理方
式を実現するための装置の実施例1の構成ブロック図で
ある。装置は、ユーザ側とオペレーティングシステム側
とからなり、ユーザ側には後に詳細に説明するように、
利用者が書込最終セクタ有効バイト数の書き込み又は読
み出しのためのシステムコールを発行するシステムコー
ル発行部7が設けられている。
EXAMPLES Specific examples of the present invention will be described below. <Embodiment 1> FIG. 2 is a configuration block diagram of an embodiment 1 of an apparatus for realizing a file data management system according to the present invention. The device consists of a user side and an operating system side, and as will be described later in detail to the user side,
A system call issuing unit 7 is provided by which a user issues a system call for writing or reading the effective byte number of the last write sector.

【0025】オペレーティングシステム側は、次のよう
に構成される。オペレーティングシステム1は、データ
処理の生産性を向上させるために各種プログラムを体系
的に統合化したもので、制御プログラムと処理プログラ
ムからなる。制御プログラムは、データ管理機能、タス
ク管理機能などであり、処理プログラムとしては、ユー
ザプログラムなどがある。
The operating system side is constructed as follows. The operating system 1 systematically integrates various programs in order to improve the productivity of data processing, and includes a control program and a processing program. The control program has a data management function, a task management function, and the like, and the processing program includes a user program and the like.

【0026】従って、オペレーティングシステム1は、
ファイル2を管理するデータ管理部11と、制御手段と
してタスクを管理するためのタスク管理部12aとを備
えている。
Therefore, the operating system 1
A data management unit 11 that manages the file 2 and a task management unit 12a that manages tasks as control means are provided.

【0027】前記データ管理部11は、ファイル2のフ
ァイル管理情報テーブル5の管理情報を主記憶装置7に
対して書き込み又は読み出しを行うものである。すなわ
ち、ファイル2媒体上のファイル管理情報の一部は、高
速化のため、書き込みモードでファイル2がオープンさ
れた時に主記憶装置7上に読み出され、ファイル2がク
ローズされた時に媒体に書き込まれるようになってい
る。
The data management unit 11 writes or reads the management information of the file management information table 5 of the file 2 into or from the main storage device 7. That is, a part of the file management information on the file 2 medium is read onto the main storage device 7 when the file 2 is opened in the write mode and written on the medium when the file 2 is closed for speeding up. It is supposed to be.

【0028】前記タスク管理部12aは、タスクの生
成、消滅、タスク間の同期、相互通信を行なうものであ
り、利用者からのシステムコールに基づき主記憶装置7
上に書込最終セクタ有効バイト数の書き込み又は読み出
しを行なう。
The task management section 12a is for performing task generation, task deletion, task synchronization, and mutual communication, and the main storage device 7 is based on a system call from the user.
Write or read the last sector valid byte number.

【0029】前記タスクは、マルチプログラミングを実
現するためにCPU(中央処理装置)を割り当てる単位
である。ファイル2は、内部に複数のバイトのブロック
からなる複数のセクタ4a〜4nを設けていて、これら
のセクタにそれぞれ対応するデータ22a,22b・・
・が格納されるようになっている。前記複数バイトのブ
ロックは、1回の入出力動作で読み書きされ、1個以上
のレコードからなる。
The task is a unit for allocating a CPU (central processing unit) to realize multi-programming. The file 2 is internally provided with a plurality of sectors 4a to 4n composed of blocks of a plurality of bytes, and data 22a, 22b, ... Corresponding to these sectors, respectively.
・ Is stored. The block of a plurality of bytes is read and written by one input / output operation and is composed of one or more records.

【0030】ファイル2の媒体上には、ファイル管理情
報としてファイル名、ファイルセクタ数を格納したファ
イル管理情報テーブル5が設けられ、このファイル管理
情報テーブル5は、さらに全セクタ4a〜4nのうちの
データが書き込まれた書込最終セクタ4iにおける書込
最終セクタ有効バイト数をバイト領域15に格納してい
る。
A file management information table 5 storing a file name and the number of file sectors as file management information is provided on the medium of the file 2, and this file management information table 5 further includes all the sectors 4a to 4n. The number of valid bytes in the last write sector in the last write sector 4i in which the data is written is stored in the byte area 15.

【0031】前記タスク管理部12aは、ファイル管理
情報テーブル5のバイト領域15に対する書込最終セク
タ有効バイト数の書き込み又は読み出しを行なうもの
で、ファイル2にデータを書き込み、書込最終セクタ有
効バイト数Biをバイト領域15に書き込み、利用者が
発行した前記システムコールによりバイト領域15から
ファイル2のセクタ数i及び書込最終セクタ有効バイト
数Biを得て、セクタ数iに基づき書込最終セクタ4i
にシークしてデータを読み出し、読み出したデータの先
頭から書込最終セクタ有効バイト数Biだけポイントを
移動して追記データを書き込むようになっている。
The task management section 12a writes or reads the number of valid bytes of the last write sector into the byte area 15 of the file management information table 5, and writes the data to the file 2 to write the last number of valid byte of the write sector. Bi is written in the byte area 15, the sector number i of the file 2 and the write last sector effective byte number Bi are obtained from the byte area 15 by the system call issued by the user, and the write last sector 4i is obtained based on the sector number i.
The data is read by seeking to, and the write-once data is written by moving the point from the beginning of the read data by the write last sector effective byte number Bi.

【0032】図3はタスク管理部の処理を示すフローチ
ャートである。図面を参照して実施例におけるファイル
データ管理方式を説明する。まず、タスク1において、
セクタ4a〜4n単位でデータ22a〜22nをファイ
ル2に書き込み、データの最終書込セクタ4iにおける
書き込み有効バイト数Biを、ファイル管理情報テーブ
ル5のバイト数領域15に設定する。
FIG. 3 is a flowchart showing the processing of the task management unit. A file data management system in the embodiment will be described with reference to the drawings. First, in task 1,
The data 22a to 22n are written to the file 2 in units of sectors 4a to 4n, and the write effective byte count Bi in the final write sector 4i of data is set in the byte count area 15 of the file management information table 5.

【0033】その後、データの追記書きを行なう場合に
は、タスク2において、ファイル2のセクタ数及び最終
書込セクタ4iにおける書込有効バイト数Biを得るた
めのシステムコールをユーザ側のシステムコール発行部
8で発行する。
After that, when additional writing of data is performed, in task 2, a system call is issued on the user side to obtain the number of sectors of the file 2 and the number of write valid bytes Bi in the last write sector 4i. Issued in part 8.

【0034】この後に、ファイル2のセクタ数iに基づ
いて書込最終セクタ4iにシークし、書込最終セクタ4
iのデータを読み込む。そして、読み込んだデータの先
頭から書込最終セクタ有効バイト数Bi分だけポインタ
を移動すると、書き込み開始位置aに位置する。その後
に追記書きデータを書き込む。さらに追記書きデータを
反映したものを媒体に書き込む。
After this, based on the number of sectors i of the file 2, seek to the write last sector 4i and write last sector 4i
Read the data of i. Then, when the pointer is moved from the beginning of the read data by the write end sector effective byte number Bi, the write start position a is reached. After that, write-once data is written. Furthermore, the data reflecting the write-once data is written on the medium.

【0035】このように実施例1によれば、全セクタ4
a〜4nのうちのデータが書き込まれた書込最終セクタ
4iにおける書込最終セクタ有効バイト数をバイト領域
15に格納するファイル管理情報テーブル5を設け、か
つ利用者からのシステムコールに基づきタスク管理部1
2aでバイト管理するので、次にデータを書き始めるべ
きセクタ内位置aを得ることができ、その位置aから追
記書きデータを書き込むことで従来のような隙間23を
生ずることがなくなる。
As described above, according to the first embodiment, all sectors 4
The file management information table 5 for storing the effective number of write last sector bytes in the write last sector 4i in which the data of a to 4n is written is provided in the byte area 15, and the task management is performed based on the system call from the user. Part 1
Since the bytes are managed by 2a, it is possible to obtain the position a in the sector where the data writing should start next, and by writing the write-once write data from the position a, the gap 23 as in the conventional case does not occur.

【0036】よって、オペレーティングシステム1がセ
クタ単位でファイルを管理する場合でも、ユーザはバイ
ト単位でのファイルのアクセスが可能となる。このよう
にオペレーティングシステム側で、最終セクタ有効バイ
ト数を一元管理する方式は、ユーザ側が追記書きのため
のデータを保持しておく方式に比べて、複数のファイル
2がマルチプログラムによりマルチオープンされている
場合にファイル管理情報に矛盾が生じにくくなる。
Therefore, even when the operating system 1 manages files in sector units, the user can access files in byte units. In this way, the method of centrally managing the last sector effective byte number on the operating system side is such that a plurality of files 2 are multi-opened by a multi-program, as compared with a method in which the user side holds data for additional writing. If the file management information is present, inconsistency hardly occurs in the file management information.

【0037】また、追記書きのためのデータをユーザ側
がファイル媒体から読み込んだり、それを媒体に反映す
るといった作業が不必要となるので、ユーザ側の操作が
簡単になるという効果がある。さらに、ファイル管理情
報テーブル5の上記領域15は、ユーザが自由に情報を
設定することができるので、上記目的以外での使用も可
能である。
Further, since it is unnecessary for the user to read the data for additional writing from the file medium and to reflect the data on the medium, the operation on the user side is simplified. Further, since the user can freely set information in the area 15 of the file management information table 5, it can be used for purposes other than the above.

【0038】<実施例2>次に本発明の実施例2を説明
する。図4は実施例2の構成ブロック図である。実施例
2は、実施例1に対してタスク管理部12aに代えて、
タスク管理部12bを設けた点にある。
<Second Embodiment> Next, a second embodiment of the present invention will be described. FIG. 4 is a configuration block diagram of the second embodiment. The second embodiment is different from the first embodiment in that the task management unit 12a is replaced by
The task management unit 12b is provided.

【0039】タスク管理部12bは、利用者が発行した
システムコールに基づきファイル2にデータを書き込む
際にバイト領域15に書込最終セクタ有効バイト数を書
き込み、ファイル2からデータを読み出す際にバイト領
域15の書込最終セクタ有効バイト数を読み出すように
なっている。
The task management unit 12b writes the write last sector effective byte number to the byte area 15 when writing the data to the file 2 based on the system call issued by the user, and the byte area when reading the data from the file 2. The number of valid bytes in the last write sector of 15 is read out.

【0040】なお、その他の構成は実施例1の構成と同
一であり、同一部分は同一符号を付して説明する。図5
はタスク管理部12bの処理を示すフローチャートであ
る。図面を参照して実施例2の処理を説明する。
The rest of the configuration is the same as that of the first embodiment, and the same parts will be described with the same reference numerals. Figure 5
Is a flowchart showing the processing of the task management unit 12b. The process of the second embodiment will be described with reference to the drawings.

【0041】タスク3において、システムコール発行部
8から発行されたシステムコールに基づき、ファイル2
にデータを書き込む際に、同時に最終セクタ有効バイト
数を主記憶装置7上に書き込むことで、ファイル管理情
報テーブル5のバイト数領域15に書き込む。
In task 3, the file 2 is generated based on the system call issued from the system call issuing unit 8.
At the same time when writing the data to, the last sector effective byte number is written in the main storage device 7 to write it in the byte number area 15 of the file management information table 5.

【0042】そして、タスク4において、ファイル2の
データを読み込み処理中に、ファイル2の書込最終セク
タを読み込んだ際に、データを読み込むためのシステム
コールの復帰値により、このファイル2に最終セクタ有
効バイト数Biが設定されていることがわかる。
Then, in the task 4, when the write last sector of the file 2 is read during the process of reading the data of the file 2, the last sector of the file 2 is read by the return value of the system call for reading the data. It can be seen that the number of effective bytes Bi is set.

【0043】このように実施例2によれば、全セクタ4
a〜4nのうちのデータが書き込まれた書込最終セクタ
4iにおける書込最終セクタ有効バイト数をバイト領域
15に格納するファイル管理情報テーブル5を設け、タ
スク管理部12aが、利用者が発行したシステムコール
に基づきファイル2にデータを書き込む際にバイト領域
15に書込最終セクタ有効バイト数を書き込み、ファイ
ル2からデータを読み出す際にバイト領域15の書込最
終セクタ有効バイト数を読み出す。
As described above, according to the second embodiment, all sectors 4
The file management information table 5 for storing the effective byte count of the last write sector in the last write sector 4i in which the data of a to 4n is written is provided in the byte area 15, and the task management unit 12a issues the file issued by the user. When writing data to the file 2 based on the system call, the write last sector effective byte number is written to the byte area 15, and when reading data from the file 2, the write last sector effective byte number of the byte area 15 is read.

【0044】よって、次にデータを書き始めるべきセク
タ内位置を得ることができ、その位置から追記書きデー
タを書き込むことで隙間23を生ずることがなくなる。
その結果、実施例1と同様の効果を奏するとともに、さ
らにデータの書き込み又は読み出しと同時に書込最終セ
クタ有効バイト数が設定されるから、実施例1よりも処
理が迅速となる。
Therefore, it is possible to obtain the position in the sector where the data writing should be started next, and by writing the write-once write data from that position, the gap 23 is not generated.
As a result, the same effect as that of the first embodiment is achieved, and since the number of valid bytes of the last write sector is set at the same time when the data is written or read, the processing becomes faster than that of the first embodiment.

【0045】なお、実施例1及び実施例2では、1つの
ファイル管理しか示さなかったが、複数のファイル管理
にも本発明は適用できる。
Although only one file management is shown in the first and second embodiments, the present invention can be applied to a plurality of file managements.

【0046】[0046]

【発明の効果】本発明によれば、ファイル管理情報テー
ブルに書込最終セクタ有効バイト数を格納するバイト領
域を設け、制御手段が利用者が発行したシステムコール
に基づきファイルにデータを書き込む際にバイト領域に
書込最終セクタ有効バイト数を書き込み、ファイルから
データを読み出す際にバイト領域の書込最終セクタ有効
バイト数を読み出すことで、次にデータを書き始めるべ
きセクタ内位置を得ることができる。
According to the present invention, the file management information table is provided with a byte area for storing the number of effective bytes in the last write sector, and when the control means writes data in the file based on the system call issued by the user. By writing the valid last sector write byte count to the byte area and reading the write last sector valid byte count of the byte area when reading the data from the file, it is possible to obtain the position within the sector where the next data write should start. .

【0047】よって、システムがセクタ単位でファイル
を管理する場合でも、ユーザはバイト単位でのファイル
のアクセスが可能となり、ファイルがマルチオープンさ
れている場合にファイル管理情報に矛盾が生じにくくな
る。また、追記書きのためのデータをユーザ側が媒体か
ら読み込んだり、それを媒体に反映するといった作業が
不必要となる。
Therefore, even when the system manages the file in sector units, the user can access the file in byte units, and when the files are multi-opened, the file management information is less likely to be inconsistent. Further, it is unnecessary for the user side to read the data for additional writing from the medium and to reflect the data on the medium.

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

【図1】本発明の原理図である。FIG. 1 is a principle diagram of the present invention.

【図2】本発明の実施例1の構成ブロック図である。FIG. 2 is a configuration block diagram of a first embodiment of the present invention.

【図3】実施例1のタスク管理部の処理を示すフローチ
ャートである。
FIG. 3 is a flowchart illustrating processing of a task management unit according to the first exemplary embodiment.

【図4】実施例2の構成ブロック図である。FIG. 4 is a configuration block diagram of a second embodiment.

【図5】実施例2のタスク管理部の処理を示すフローチ
ャートである。
FIG. 5 is a flowchart showing processing of a task management unit according to the second embodiment.

【図6】従来のセクタ単位のファイル管理方式の一例を
示す図である。
FIG. 6 is a diagram showing an example of a conventional file management system in sector units.

【図7】従来方式によるデータのセクタへの書き込みを
説明するための図である。
FIG. 7 is a diagram for explaining writing of data to a sector according to a conventional method.

【図8】従来方式による追記書きデータのセクタ先頭か
らの書き込みを説明するための図である。
FIG. 8 is a diagram for explaining writing of the write-once write data from the sector head according to the conventional method.

【図9】従来方式によるユーザ側でのバイト管理により
追記書きデータのセクタへの書き込みを説明するための
図である。
FIG. 9 is a diagram for explaining writing of write-once write data to a sector by byte management on the user side according to a conventional method.

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

1・・オペレーティングシステム 2・・ファイル 4a〜4n・・セクタ 5・・ファイル管理情報テーブル 7・・主記憶装置 8・・システムコール発行部 11・・データ管理部 12a,12b・・タスク管理部 15・・バイト領域 22a,22b・・データ 23・・隙間 Bi・・書込最終セクタ有効バイト数 a・・追記データ書込開始位置 1-Operating system 2--Files 4a-4n-Sectors 5--File management information table 7-Main memory 8-System call issuing unit 11-Data management unit 12a, 12b-Task management unit 15 ..Byte area 22a, 22b..Data 23..Gap Bi ... Number of effective bytes in last sector of writing a ... Additional data writing start position

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 オペレーティングシステム(1)により
ファイル(2)の管理を複数バイトのブロックからなる
セクタ単位で行うファイルデータ管理方式において、 ファイル(2)毎にファイル内にファイル管理情報を格
納するものであって全セクタ(4a〜4n)のうちのデ
ータが書き込まれた書込最終セクタ(4i)における書
込最終セクタ有効バイト数をバイト領域(15)に格納
するファイル管理情報テーブル(5)と、 ファイル管理情報テーブル(5)のバイト領域(15)
に対する書込最終セクタ有効バイト数の書き込み又は読
み出しを行なう制御手段(12)とを備え、 前記制御手段(12)は、利用者が発行した前記書込最
終セクタ有効バイト数の書き込み又は読み出しのための
システムコールに基づき、ファイル(2)にデータを書
き込む際に前記バイト領域(15)に書込最終セクタ有
効バイト数を書き込みファイル(2)からデータを読み
出す際にバイト領域(15)の書込最終セクタ有効バイ
ト数を読み出すことを特徴とするファイルデータ管理方
式。
1. A file data management method in which a file (2) is managed by a sector unit consisting of a block of a plurality of bytes by an operating system (1), and file management information is stored in each file (2). And a file management information table (5) for storing, in the byte area (15), the number of valid bytes of the last write sector in the last write sector (4i) in which data of all the sectors (4a to 4n) is written. , Byte area (15) of file management information table (5)
And a control unit (12) for writing or reading the number of valid bytes of the last write sector to write to or reading the number of valid bytes of the last write sector issued by the user. Based on the system call, write the byte area (15) when writing data to the file (2), write the last sector effective byte number, and write the byte area (15) when reading data from the file (2). A file data management method characterized by reading the number of valid bytes in the last sector.
【請求項2】 前記制御手段(12)は、ファイルにデ
ータを書き込み、書込最終セクタ有効バイト数をバイト
領域に書き込み、利用者が発行した前記システムコール
によりバイト領域からファイルのセクタ数及び書込最終
セクタ有効バイト数を得て、セクタ数に基づき書込最終
セクタにシークしてデータを読み出し、読み出したデー
タの先頭から書込最終セクタ有効バイト数だけポイント
を移動して追記データを書き込むことを特徴とする請求
項1記載のファイルデータ管理方式。
2. The control means (12) writes data to a file, writes a write last sector effective byte number in a byte area, and writes the sector number and write of the file from the byte area by the system call issued by the user. Get the number of valid bytes in the last sector, seek to the last sector to write based on the number of sectors, read the data, and move the point from the beginning of the read data by the number of valid bytes in the last write sector to write additional data. The file data management system according to claim 1, wherein
【請求項3】 前記オペレーティングシステム(1)
は、ファイル(2)を管理するデータ管理部(11)
と、前記制御手段(12)としてタスクを管理するため
のタスク管理部とを備え、 前記データ管理部(11)は、ファイル(2)のファイ
ル管理情報テーブル(5)の管理情報を主記憶装置
(7)に対して書き込み又は読み出しを行い、 前記タスク管理部は、前記システムコールに基づき前記
主記憶装置(7)上に書込最終セクタ有効バイト数の書
き込み又は読み出しを行なうことを特徴とする請求項1
または請求項2記載のファイルデータ管理方式。
3. The operating system (1)
Is a data management unit (11) for managing the file (2)
And a task management unit for managing tasks as the control unit (12), wherein the data management unit (11) stores the management information of the file management information table (5) of the file (2) in the main storage device. (7) performs writing or reading, and the task management unit writes or reads the valid last sector write byte number in the main memory (7) based on the system call. Claim 1
Alternatively, the file data management method according to claim 2.
JP4221545A 1992-08-20 1992-08-20 File data management system Withdrawn JPH0667947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4221545A JPH0667947A (en) 1992-08-20 1992-08-20 File data management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4221545A JPH0667947A (en) 1992-08-20 1992-08-20 File data management system

Publications (1)

Publication Number Publication Date
JPH0667947A true JPH0667947A (en) 1994-03-11

Family

ID=16768405

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4221545A Withdrawn JPH0667947A (en) 1992-08-20 1992-08-20 File data management system

Country Status (1)

Country Link
JP (1) JPH0667947A (en)

Similar Documents

Publication Publication Date Title
JP4390846B2 (en) Computer file system with a looped file structure for post-synchronous data collection of asynchronous events
JP2005501317A (en) External data storage management system and method
US20030037019A1 (en) Data storage and retrieval apparatus and method of the same
US5113509A (en) Method of changing data on disk
JP3609841B2 (en) File management device
JPH0330034A (en) Optical disk file managing method
JPH06124239A (en) Resident data controller for cache memory
JPH0667947A (en) File data management system
JPH06110766A (en) Directory constitution method and computer system for sharing stored file system
JPH08202595A (en) File system
JP2785451B2 (en) Storage control method and device
JPH02151944A (en) Data processor
JPS61245253A (en) Input and output control system for virtual computer
JP2912657B2 (en) File access processor
JPH054697B2 (en)
JP2735400B2 (en) Asynchronous I / O control method
JPH0337748A (en) External storage accessing system utilizing main storage
JPH08115171A (en) Computer system
JPH01255028A (en) Method for making access to external storage device
JPH0451861B2 (en)
JPH05113922A (en) Data storage device
JP2003323262A (en) Computer system
JPH01296382A (en) Picture processor with picture accumulating device
JPH01191240A (en) Cyclic organization file processing system
JPH03105534A (en) File control method

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19991102