JPS6278638A - File recording and control system - Google Patents

File recording and control system

Info

Publication number
JPS6278638A
JPS6278638A JP60219688A JP21968885A JPS6278638A JP S6278638 A JPS6278638 A JP S6278638A JP 60219688 A JP60219688 A JP 60219688A JP 21968885 A JP21968885 A JP 21968885A JP S6278638 A JPS6278638 A JP S6278638A
Authority
JP
Japan
Prior art keywords
recording unit
index
free
length
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.)
Pending
Application number
JP60219688A
Other languages
Japanese (ja)
Inventor
Makoto Fukuyama
誠 福山
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.)
Alps Alpine Co Ltd
Original Assignee
Alps 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 Alps Electric Co Ltd filed Critical Alps Electric Co Ltd
Priority to JP60219688A priority Critical patent/JPS6278638A/en
Publication of JPS6278638A publication Critical patent/JPS6278638A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To ensure a quick access to a variable length recording unit by writing the recording unit registered to an index memory to a file after registering it to an idle index memory. CONSTITUTION:When the recording unit is written to a file 3, an index if registered to an index memory 1 is read out. Then the length of the recording unit, the head address, etc., included in said index are stored temporarily in an index memory 2. The memory 2 is searched again by an idle element searching means 5 to detect an idle area suited to the length of the recording unit. Then the recording unit is written to an idle area detected by a writing means 6 and at the same time the information on the length and the head address of said written area are written to the memory 1 as the index information.

Description

【発明の詳細な説明】 〔概要〕 読み/書き可能なファイルに対して、可変長の一連のデ
ータを記録単位としてアクセスするファイル記録制御方
式において、記録単位に対応するインデックスを格納す
るインデックスメモリと、ファイルの空き領域に関する
情報を格納する空きインデックスメモリと、ファイルか
ら所定の記録単位を読み出して出力するよう制御する記
録単位読み出し手段と、書き込むべき所望のインデック
スがインデックスメモリから検索された場合に、当該イ
ンデックスに含まれる記録単位の長さ、および記録単位
の先頭アドレスを空きインチ、ワ、り又メモリに登録し
所定の空き要素を探索する、あるいは所望のインデック
スが探索されない場合に所定の空き要素を探索する空き
要素探索手段と、所定のインデックスをインデヅ、クス
メモリに格納する書き込み手段と、空きインデックスメ
モリ更新手段とを備え、記録単位読み出し手段および書
き込み手段を用いて可変長の記録単位を単位としてファ
イルにアクセスするようにしている。
[Detailed Description of the Invention] [Summary] In a file recording control method that accesses a readable/writable file using a series of variable-length data as a recording unit, an index memory that stores an index corresponding to a recording unit is used. , a free index memory for storing information regarding the free space of the file, a recording unit reading means for controlling to read and output a predetermined recording unit from the file, and when a desired index to be written is retrieved from the index memory, Register the length of the recording unit included in the index and the start address of the recording unit in the free inch, width, or length memory and search for a predetermined free element, or search for a predetermined free element if the desired index is not searched. A free element searching means for searching for a free element, a writing means for storing a predetermined index in an index memory, and a free index memory updating means, and a recording unit of variable length is used as a unit by using a recording unit reading means and a writing means. I'm trying to access the file.

〔産業上の利用分野) 本発明は、読み/書き可能なファイルに対して、可変長
の一連のデータ(記録単位)をアクセス制御するファイ
ル記録制御方式に関するものである。
[Industrial Application Field] The present invention relates to a file recording control method for controlling access to a variable-length series of data (recording unit) for a readable/writable file.

〔従来の技術〕[Conventional technology]

従来、一般に磁気ディスク装置などの記録単位は、固定
長からなり、夫々にアドレスが付されている。しかし、
コンピュータによって扱われるデータは、夫々可変長で
あるのが一般的である。特に、ワードプロセッサにおい
ては、頁ごとに文字数が異なるため、頁ごとにデータの
最大値を例えば4にバイトに固定して磁気ディスク装置
、フロッピィディスク装置などに第6図に示すように割
り付けていた。
Conventionally, recording units in magnetic disk drives and the like generally have a fixed length, and each unit is assigned an address. but,
Data handled by a computer generally has a variable length. In particular, in word processors, since the number of characters varies from page to page, the maximum value of data for each page is fixed to 4 bytes, for example, and allocated to a magnetic disk device, floppy disk device, etc. as shown in FIG.

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

このため、第6図に示すように、頁と頁との間に空き領
域が発生してしまい、メモリを有効に利用し得ないとい
う問題点があった。また、第6図に示す空き領域をなく
すために、有効データ域を詰めて記録すると、頁の途中
に文字を挿入した場合に、この有効データ域に続く全て
のデータを書き直す必要が生じてしまい、処理時間が遅
くなりでしまうという問題点があった。
For this reason, as shown in FIG. 6, there is a problem that empty areas are generated between pages, and the memory cannot be used effectively. Furthermore, if the effective data area is compressed and recorded in order to eliminate the free space shown in Figure 6, if characters are inserted in the middle of a page, all data following this effective data area will need to be rewritten. However, there was a problem in that the processing time was slow.

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

本発明は、前記問題点を解決するために、インデックス
メモリおよび空きインデックスメモリを設け、可変長の
記録単位毎に対応して、当該記録単位を識別する識別キ
ー、記録単位の長さ、記録単位を格納する先頭アドレス
などをインデックスとしてインデックスメモリに格納す
ると共に、空き領域の長さ、先頭アドレスなどを空きイ
ンデックスメモリに登録しておき、所望の記録単位を読
み出す場合には、インデックスメモリを検索して所定の
記録単位をファイルから読み出し、一方、所定の記録単
位を書き込む場合には、既にインデックスメモリに登録
されている記録単位についてはこの記録単位を格納した
領域を空きインデックスメモリに登録し、再度所定の領
域を確保してファイルに書き込む構成を採用することに
より、書き込みに対応して未使用の空き領域をまとめて
大きな空き領域に再構成してメモリ領域を有効に利用す
るようにしている。
In order to solve the above problems, the present invention provides an index memory and a free index memory, and for each variable-length recording unit, an identification key for identifying the recording unit, the length of the recording unit, and the recording unit are provided. In addition to storing the start address of the data as an index in the index memory, the length of the free area and the start address are also registered in the free index memory. When reading the desired recording unit, search the index memory. to read a predetermined recording unit from a file, and on the other hand, when writing a predetermined recording unit, for recording units already registered in the index memory, register the area in which this recording unit is stored in the free index memory, and then write the recording unit again. By adopting a configuration in which a predetermined area is secured and written to a file, unused free areas are collectively reconfigured into a large free area in response to writing, thereby making effective use of the memory area.

第1図は本発明の原理的構成を示す。図中、1はインデ
ックスメモリ、2は空きインデックスメモリ、3はファ
イル、4は読み出し手段、5は空き要素探索手段、6は
書き込み手段、7は空きインデックスメモリ更新手段を
表す。
FIG. 1 shows the basic configuration of the present invention. In the figure, 1 is an index memory, 2 is a free index memory, 3 is a file, 4 is a reading means, 5 is a free element searching means, 6 is a writing means, and 7 is a free index memory updating means.

第1図において、インデックスメモリ1は、インデック
スを格納するものである。このインデックスは、ファイ
ル3に記録すべき可変長の記録単位を識別する識別キー
、記録単位の長さ、および記録単位をファイルに格納す
る先頭アドレスなどから構成されている。
In FIG. 1, an index memory 1 stores an index. This index is composed of an identification key for identifying a variable length recording unit to be recorded in the file 3, the length of the recording unit, and a start address for storing the recording unit in the file.

空きインデックスメモリ2は、ファイルの空き領域の長
さ、および先頭アトI/スなどを格納するものである。
The free index memory 2 stores the length of the free area of the file, the starting address, etc.

ファイル3は、磁気ディスク装置、フロッピィディスク
装置などを用いて構成される読み書き可能なファイルで
ある。
The file 3 is a readable and writable file configured using a magnetic disk device, a floppy disk device, or the like.

読み出し手段4は、インデックスメモリ1を探索して読
み出した所望のインデックスに基づいて、ファイル3か
ら所定の記録単位を読み出してホストに送出するもので
ある。
The reading means 4 reads a predetermined recording unit from the file 3 based on a desired index read out by searching the index memory 1, and sends it to the host.

空き要素探索手段5は、書き込むべきファイル3中の所
定の空き領域を探索するものである。
The free element search means 5 searches for a predetermined free area in the file 3 to be written.

書き込み手段6は、空き要素探索手段5によって探索さ
れたファイル3中の空き領域に所望の記録単位を書き込
むと共に、この書き込んだ記録単位の長さ、および先頭
アドレスなどをインデックスメモリ1に登録するもので
ある。
The writing means 6 writes a desired recording unit into the free area in the file 3 searched by the free element searching means 5, and also registers the length of the written recording unit, the start address, etc. in the index memory 1. It is.

空きインデックスメモリ更新手段7は、書き込み手段6
によってファイル3中の所定の領域に書き込んだ当該領
域の長さ、および先頭アドレスなどを空きインデックス
メモリ2中から削除するものである。
Free index memory updating means 7 includes writing means 6
The length and start address of a predetermined area in the file 3 written in this area are deleted from the empty index memory 2.

〔作用〕[Effect]

第1図に示す構成を採用し、所望の記録単位をファイル
3から読み出す場合には、読み出j7手段4がインデッ
クスメモリーを探索して該当するインデックスを読み出
す。次いで、この読み出したインデックスに含まれる所
の記録単位を格納した先頭アドレス、記録単位の長さな
どの情報に基づいて、ファイル3中から所望の記録蛤位
を読み出してホストに送出する。
When the configuration shown in FIG. 1 is adopted and a desired recording unit is read from the file 3, the reading j7 means 4 searches the index memory and reads the corresponding index. Next, a desired recording position is read out from the file 3 and sent to the host based on information such as the start address where the recording unit included in the read index is stored and the length of the recording unit.

一方、記録単位をファイル3に書き込む場合には、既に
記録単位を識別するインデックスがインデックスメモリ
ーに登録されているか否かに、F、って処理が異なる。
On the other hand, when writing a recording unit to file 3, the processing differs depending on whether an index identifying the recording unit has already been registered in the index memory.

即ら、既に記録中位を識別するインデックスがインデッ
クスメモリーに登録されている場合には、第1に、この
登録されている・インデックスを読み出してこのインデ
ックスに含まれる所の記録単位の長さ、および記録単位
を格納した先頭アドレスなどを空きインデックスメモリ
2に一旦登録する。第2に、空きインデックスメモリ2
をあらためて探索して書き込みを行おうとする記録単位
の長さに適した長さをもつ空き領域(空き要素)を見つ
ける。この第1および第2の処理は、空き要素探索手段
5が行う。そして、第3に、書き込み手段6が第2で見
つけた空き領域中に記録単位を書き込むと共に、この書
き込んだ領域の長さ、および先頭アドレスなどの情報を
インデックスメモリ1にインデックス情報として書き込
む。
That is, if an index for identifying the middle recording position has already been registered in the index memory, first, this registered index is read out and the length of the recording unit included in this index is determined. and the start address where the recording unit is stored are temporarily registered in the free index memory 2. Second, free index memory 2
is searched again to find an empty area (empty element) with a length suitable for the length of the recording unit to be written. The first and second processes are performed by the vacant element search means 5. Thirdly, the writing means 6 writes the recording unit into the empty area found in the second step, and also writes information such as the length of the written area and the start address to the index memory 1 as index information.

一方、記録単位を識別するインデックスがインデックス
メモリ1に登録されていない場合には、前記第2以降を
実行する。そして、空きインデックスメモリ更新手段7
が、第3においてファイル3に書き込んだ領域を、空き
インデックスメモリ2から削除する。
On the other hand, if the index identifying the recording unit is not registered in the index memory 1, the second and subsequent steps are executed. Then, free index memory updating means 7
However, the area written to the file 3 in the third step is deleted from the free index memory 2.

〔実施例〕〔Example〕

第2図は本発明の1実施例構成、第3図は読み出しフロ
ーチャー1・、第4図は書き込みフ1ニーチャ・−ト、
第5図は削除フロルチャ・−トを示ず。図中、8は識別
キーレジスタ、9はデータ長レジスタ、10は制御装置
、11はI10ハソファメモリ、12は入出力制御装置
を表す。尚、図中1ないし3は、第1図図示のものと等
効である。また、第2図図中点線は制御を表し、実線は
ポインI・先を表す。以下順次詳細に説明する。
FIG. 2 shows the configuration of one embodiment of the present invention, FIG. 3 shows the read flowchart 1, and FIG. 4 shows the write function 1.
FIG. 5 does not show the deleted flowchart. In the figure, 8 represents an identification key register, 9 represents a data length register, 10 represents a control device, 11 represents an I10 sofa memory, and 12 represents an input/output control device. Note that numerals 1 to 3 in the figure have the same effect as those shown in FIG. Further, the dotted line in FIG. 2 represents control, and the solid line represents point I/destination. A detailed explanation will be given below.

第2図において、インデックスメモリ1に格納するイン
デックスは、識別1キー(K1)、読み出しフラグ(f
i)、記録単位(データ)の長さくX、)およびファイ
ル3中の記録単位の先頭アドレス(a□)などから構成
されている。
In FIG. 2, the indexes stored in the index memory 1 are the identification 1 key (K1), the read flag (f
i), the length of the recording unit (data) (X,), and the start address (a□) of the recording unit in the file 3.

空きインデックスメモリ2に登録する空き要素(空き領
域)は、空き領域の長さく L+、)およびファイル3
中の空き領域の先頭アドレス(A、)などから構成され
ている。
Free elements (free space) to be registered in free index memory 2 are free space lengths L+, ) and file 3.
It consists of the start address (A,) of the free area inside.

ファイル3は、磁気ディスク装置、フロッピィディスク
装置などから構成された読み書き可能なファイルである
。このファイル3に書き込まれた可変長の記録単位は、
インデックスメモリ1中に登録したインデックスを構成
グるa、(先頭アドレス)および!L (長さ)などに
よって管理されている。また、空き領域は、空きインデ
ックスメモリ2中に格納された空き要素であるAk  
(先頭アドレス)およびLl、  (長さ)などによっ
て管理されている。
The file 3 is a readable and writable file composed of a magnetic disk device, a floppy disk device, and the like. The variable length recording unit written to this file 3 is
Configure the index registered in index memory 1 a, (starting address) and! It is managed by L (length) etc. Furthermore, the free area is the free element Ak stored in the free index memory 2.
It is managed by (starting address), Ll, (length), etc.

識別キーレジスタ8は、入出力データ(入出力する記録
単位)の識別キー(インデックス)を保持するものであ
る。
The identification key register 8 holds an identification key (index) of input/output data (recording unit to be input/output).

データ長レジスタ9は、入出力データ(入出力する記録
単位)の長さを保持するものである。
The data length register 9 holds the length of input/output data (recording unit to be input/output).

制御装置10は、後述するフローチャートを用いて示す
各種制御を行うものである。なお、第1図に示す構成要
素4.5.6.7は当該制御装置10内の機能として存
在するものと考えてよい。
The control device 10 performs various controls shown using flowcharts to be described later. Note that the components 4.5.6.7 shown in FIG. 1 may be considered to exist as functions within the control device 10.

I10パンファメモリ11は、ファイル3とホストとの
間のデータの転送を行う場合に、一時的にデータを保持
するものである。
The I10 expansion memory 11 temporarily holds data when transferring data between the file 3 and the host.

入出力制御装置12は、制御装置lOによって起動され
るものであって、I10バッファメモリ11とファイル
3との間のデータ転送を制御するものである。
The input/output control device 12 is activated by the control device IO and controls data transfer between the I10 buffer memory 11 and the file 3.

次に、第3図ないし第5図を用いて第2図図示構成の動
作を詳細に説明する。
Next, the operation of the configuration shown in FIG. 2 will be explained in detail using FIGS. 3 to 5.

第3図は読み出しフローチャートを示し、ファイル3か
ら所定の記録単位を読み出してホストに転送する手順を
示す。
FIG. 3 shows a read flowchart showing a procedure for reading a predetermined recording unit from the file 3 and transferring it to the host.

第3図において、図中■は、識別キーに、を識別キーレ
ジスタ8にセントする状態を示す。これは、読み出そう
とする記録単位(データ)を表す識別キーに□を識別キ
ーレジスタ8にセットすることを意味している。
In FIG. 3, the symbol (■) in the figure indicates the state in which the identification key is placed in the identification key register 8. This means that □ is set in the identification key register 8 as the identification key representing the recording unit (data) to be read.

図中■は、インデックスメモリ1を検索して識別キーに
、を見つける状態を示す。
In the figure, ■ indicates a state in which the index memory 1 is searched to find the identification key.

図中■は、読み出しフラグf8を図示外のレジスタにセ
ントする状態を示す。
In the figure, ■ indicates a state in which the read flag f8 is sent to a register not shown.

図中■は、図中■で見つけたインデックス中に含まれる
ファイル3の先頭アドレスaiから長さ18に格納され
ているデータを読み出し、I10バッファメモリ11に
転送する状態を示す。この転送されたデータは、ホスト
に送出される。
■ in the figure indicates a state in which data stored in length 18 is read from the starting address ai of the file 3 included in the index found in the index found in the figure, and is transferred to the I10 buffer memory 11. This transferred data is sent to the host.

以上説明したように、インデックスメモリ1から検索し
たインデックスに基づいて、所望の記録単位を読み出し
てホストに転送することができる。
As described above, a desired recording unit can be read out and transferred to the host based on the index retrieved from the index memory 1.

第4図は書き込みフローチャートを示し、記録単位をフ
ァイル3に書き込む手順を示す。
FIG. 4 shows a write flowchart, showing the procedure for writing the recording unit into the file 3.

第4図において、図中■は、識別キーに、を識別キーレ
ジスタ8にセットする状態を示す。
In FIG. 4, the symbol (■) in the figure indicates the state in which the identification key is set in the identification key register 8.

図中■は、インデックスメモリ1を検索する状態を示す
In the figure, ■ indicates a state in which the index memory 1 is searched.

図中■は、識別キーKiがインデックスメモリl中に有
ったか否かを判別する状態を示す。YESの場合には、
図中■でインデックスに含まれる読み出しフラグf、を
図示外のレジスタにリセットシ、次いで図中■でファイ
ル3の先頭アドレスa□からに五バイトの領域を空きイ
ンテ・ノクスメモリ2に空き要素(空き領域)として登
録する。
In the figure, ■ indicates a state in which it is determined whether or not the identification key Ki exists in the index memory l. If YES,
At ■ in the figure, the read flag f included in the index is reset to a register not shown in the figure, and then at ■ in the figure, a 5-byte area is made available from the start address a of file 3. ).

これにより、識別キーKiによって指定されるファイル
3中に格納されている記録単位の領域が、一旦空きイン
デックスメモリ2に登録される。一方、NOの場合には
、図中[相]で識別キーをインデックスメモリ1に挿入
(登録)する。これは、新たに設けた識別キーをインデ
ックスメモリ1に登録することを意味している。
As a result, the recording unit area stored in the file 3 specified by the identification key Ki is temporarily registered in the free index memory 2. On the other hand, in the case of NO, the identification key is inserted (registered) in the index memory 1 at [phase] in the figure. This means that a newly provided identification key is registered in the index memory 1.

図中■は、書き込みデータ(記録単位)の長さlをデー
タ長レジスタ9にセットする状態を示す。
In the figure, ■ indicates a state in which the length l of write data (recording unit) is set in the data length register 9.

図中@は、空きインデックスメモリ2を探索し、Ilk
≧E・・・・・・・・・・・・・・・・(1)なる関係
の空き領域(空き要素)を見つける状態を示す。ここで
fkは空きインデックスメモリ2に登録されている空き
領域の長さ、lは書き込もうとする記録単位の長さを表
す。
In the figure, @ searches for free index memory 2, and Ilk
≧E Indicates a state in which a free area (empty element) with the relationship (1) is found. Here, fk represents the length of the free space registered in the free index memory 2, and l represents the length of the recording unit to be written.

図中0は、要素kが有ったか否かを判別する状態を示す
。これは、式(1)なる条件を満たす空き要素kが有っ
たか否かを判別することを意味している。YESの場合
には、図中■で空きインデックスメモリ2から見つけた
先頭アドレスAkを書き込むべき先頭アドレスai と
して登録し、図中■で空きインデックスメモリ2から見
つけたデータの長さβを書き込むべきデータの長さIl
、として登録する。そして、図中[相]でこの書き込む
べき先頭アドレスおよび長さを下式の如くして空きイン
デックスメモリ2中から削除しておく。
0 in the figure indicates a state in which it is determined whether or not element k exists. This means that it is determined whether there is an empty element k that satisfies the condition expressed by equation (1). If YES, register the start address Ak found from the free index memory 2 at ■ in the figure as the start address ai to be written, and register the length β of the data found from the free index memory 2 at ■ in the figure as the data to be written. length Il
, register as . Then, in [phase] in the figure, the start address and length to be written are deleted from the free index memory 2 as shown in the following formula.

Aう+l→A3 ・・・・・・・・・・・・・(2)L
k−l−4Lk ・・・・・・・・・・・・・(3)ま
た、NOの場合には、図中Oでファイル3の空き領域を
1個所にまとめる。これは、空きインデックスメモリ2
を検索した結果、式(1)を満たす要素kが見つからな
かったので、ファイル3中の空き領域を1個所にまとめ
るようデータ(記録単位)の格納場所を詰めることを意
味している。
A+l→A3 ・・・・・・・・・・・・(2)L
k-l-4Lk (3) If the answer is NO, the empty areas of the file 3 are consolidated into one location at O in the figure. This is free index memory 2
As a result of the search, element k that satisfies formula (1) was not found, so this means that the storage locations for data (recording units) are reduced so that the free areas in file 3 are consolidated into one location.

図中[相]は、空きインデックスメモリ2に格納されて
いる内容を更新する状態を示す。これは、図中Oで空き
領域を1個所にまとめたので、これに対応して空きイン
デックスメモリ2に登録されている空き領域の先頭アド
レスおよび長さを書き替えることを意味している。
In the figure, [phase] indicates a state in which the contents stored in the free index memory 2 are updated. This means that since the free areas are grouped into one place at O in the figure, the start address and length of the free areas registered in the free index memory 2 are rewritten accordingly.

図中[相]は、弐(11を満足する空き領域が空きイン
デックスメモリ2中から見つかったか否かを判別する状
態を示す。YESの場合には、図中■以下を実行する。
[Phase] in the figure indicates a state in which it is determined whether or not a free space satisfying 2 (11) has been found in the free index memory 2. If YES, the following steps are executed.

NOの場合には、図中[相]でファイル3の大きさを+
1して先頭アドレスa、をこの値にし、次いで図中■で
ファイル3の末尾に、I10バッファメモリ11から書
き込むデータを追加する態様で書き込む。そして、図中
■以下を実行する。
If NO, increase the size of file 3 in [Phase] in the diagram.
1 to set the start address a to this value, and then write the data to be written from the I10 buffer memory 11 to the end of the file 3 at ▪ in the figure in such a manner as to add the data to be written. Then, execute the steps below (■) in the figure.

以上説明したように、書き込みを行う場合に、インデッ
クスメモリ1中に既に記録単位を識別する識別キーが登
録されている場合には、この識別キーによって表される
記録単位の先頭アドレスa。
As explained above, when writing, if an identification key for identifying a recording unit is already registered in the index memory 1, the start address a of the recording unit represented by this identification key.

および長さr、を空きインデックスメモリ2に一旦登録
した後、この空きインデックスメモリ2から式(1)を
満足する空き領域(空き要素)を見つけ、この見つけた
空き頭載中に記録単位を書き込むよう制御を行っている
ため、書き込みを行う毎に空き領域がまとめられ、ファ
イル3が有効に利用されることとなる。
and the length r, are once registered in the free index memory 2, and then a free area (free element) that satisfies formula (1) is found from this free index memory 2, and a recording unit is written in the found free header. Since this control is performed, free areas are consolidated each time a write is performed, and the file 3 is effectively used.

第5図は削除フローチャートを示し、記録単位を削除す
る手順を示す。
FIG. 5 shows a deletion flowchart showing the procedure for deleting a recording unit.

第5図において、図中[相]は、識別キーに8を識別キ
ーレジスタ8にセットする状態を示す。
In FIG. 5, [phase] indicates a state in which the identification key 8 is set in the identification key register 8. In FIG.

図中0は、インデックスメモリ1を探索して識別キーK
、をもつインデックスを見つける状態を示す。
In the figure, 0 indicates the identification key K after searching the index memory 1.
, shows the condition of finding an index with .

図中@は、識別キーが有ったか否かを判別する状態を示
す。YESの場合には、図中[相]でファイルの先頭ア
ドレスaiから長さ1.バイトを空きインデックスメモ
リ2に登録し、次いで図中■でインデックスメモリ1中
からこの登録した要素i(識別キーKiをもつインデッ
クス)を削除する。
In the figure, @ indicates a state in which it is determined whether or not an identification key is present. If YES, the length 1. The byte is registered in the free index memory 2, and then the registered element i (index having the identification key Ki) is deleted from the index memory 1 at 3 in the figure.

Noの場合には、終了する。If no, the process ends.

以上説明した手順を用いて、削除した記録単位が空き領
域として空きインデックスメモリ2に登録されることと
なる。
Using the procedure described above, the deleted recording unit will be registered in the free index memory 2 as a free area.

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

以上説明したように、本発明によれば、インデックスメ
モリおよび空きインデックスメモリを設け、記録単位を
書き込む場合に、既にインデックスメモリに登録されて
いる記録単位については一旦この記録単位を格納した領
域を空きインデックスメモリに登録した後に、再度所定
の領域を確保してファイルに書き込む構成を採用してい
るため、書き込み毎に未使用の空き領域をまとめて大き
な空き領域に再構成し、メモリ領域を有効に利用するこ
とができると共に、可変長の記録単位を迅速にアクセス
することができる。
As explained above, according to the present invention, when an index memory and a free index memory are provided and a recording unit is written, for a recording unit already registered in the index memory, the area in which this recording unit is stored is temporarily made available. After registering in the index memory, a specified area is secured again and written to a file. Therefore, each time a write is made, unused free space is collected and reorganized into a large free space, making the memory area effective. variable length recording units can be accessed quickly.

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

第1図は本発明の原理的構成図、第2図は本発明の1実
施例構成図、第3図は読み出しフローチャート、第4図
は書き込みフローチャート、第5図は削除フローチャー
ト、第6図は従来のファイル記録制御方式の動作説明図
を示す。 図中、1はインデックスメモリ、2は空きインデックス
メモリ、3はファイル、4は読み出し手段、5は空き要
素探索手段、6は書き込み手段、7は空きインデックス
メモリ更新手段を表す。 特許出願人  アルプス電気株式会社 代理人弁理士 森1)寛(外3名) 負11咋フ0−ケマート 方 5 閃 りし」ヒ9ファイ1しatも■1)者7オ9C4′ψカ
4乍4鴎ζp月凪猶6m
FIG. 1 is a basic configuration diagram of the present invention, FIG. 2 is a configuration diagram of one embodiment of the present invention, FIG. 3 is a read flowchart, FIG. 4 is a write flowchart, FIG. 5 is a deletion flowchart, and FIG. 6 is a deletion flowchart. A diagram illustrating the operation of a conventional file recording control method is shown. In the figure, 1 is an index memory, 2 is a free index memory, 3 is a file, 4 is a reading means, 5 is a free element searching means, 6 is a writing means, and 7 is a free index memory updating means. Patent Applicant Alps Electric Co., Ltd. Patent Attorney Representative Mori 1) Hiroshi (3 others) 4 乍 4 紩ζp 月纪 6m

Claims (1)

【特許請求の範囲】 読み/書き可能なファイルに対して、可変長の一連のデ
ータを記録単位としてアクセスするファイル記録制御方
式において、 可変長の記録単位を識別する識別キー、記録単位の長さ
、および記録単位の先頭アドレスからなるインデックス
を格納するインデックスメモリと、ファイルの空き領域
の長さ、および先頭アドレスによって構成される空き要
素を格納する空きインデックスメモリと、 インデックスメモリを検索して読み出した所望のインデ
ックスに基づいて、ファイルから該当する記録単位を読
み出して出力するよう制御する記録単位読み出し手段と
、 書き込むべき所望のインデックスがインデックスメモリ
から検索された場合に、当該インデックスに含まれる記
録単位の長さ、および記録単位の先頭アドレスを空きイ
ンデックスメモリに登録し所定の空き要素を探索する、
あるいは所望のインデックスが探索されない場合に所定
の空き要素を探索する空き要素探索手段と、 書き込むべき記録単位を、この空き要素探索手段を用い
て探索した空き要素によって指定された領域中に書き込
むと共に、この書き込んだ記録単位の長さ、および先頭
アドレスを所定のインデックスとしてインデックスメモ
リに格納する書き込み手段と、 この書き込み手段によって書き込まれた領域について、
空きインデックスメモリから削除する空きインデックス
メモリ更新手段とを備え、 記録単位読み出し手段および書き込み手段を用いて可変
長の記録単位を単位としてファイルにアクセスするよう
制御を行うことを特徴とするファイル記録制御方式。
[Claims] In a file recording control method in which a readable/writable file is accessed using a series of variable-length data as a recording unit, an identification key for identifying a variable-length recording unit, and a length of the recording unit are provided. , an index memory that stores an index consisting of the start address of the recording unit, a free index memory that stores the free element consisting of the length of the free area of the file, and the start address, and an index memory that stores an index consisting of the start address and the length of the free area of the file. A recording unit reading means for controlling the reading and outputting of a corresponding recording unit from a file based on a desired index; Register the length and the start address of the recording unit in the free index memory and search for a predetermined free element,
Alternatively, a free element search means for searching for a predetermined free element when a desired index is not searched, and a recording unit to be written is written into an area specified by the free element searched using the free element search means, Regarding the writing means that stores the length of the written recording unit and the start address as a predetermined index in the index memory, and the area written by this writing means,
A file recording control method comprising a free index memory updating means for deleting data from a free index memory, and controlling access to a file in units of variable length recording units using a recording unit reading means and a writing means. .
JP60219688A 1985-10-02 1985-10-02 File recording and control system Pending JPS6278638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60219688A JPS6278638A (en) 1985-10-02 1985-10-02 File recording and control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60219688A JPS6278638A (en) 1985-10-02 1985-10-02 File recording and control system

Publications (1)

Publication Number Publication Date
JPS6278638A true JPS6278638A (en) 1987-04-10

Family

ID=16739406

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60219688A Pending JPS6278638A (en) 1985-10-02 1985-10-02 File recording and control system

Country Status (1)

Country Link
JP (1) JPS6278638A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007204112A (en) * 2006-02-01 2007-08-16 Fuji Seal International Inc Heat-shrinkable cylindrical label

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007204112A (en) * 2006-02-01 2007-08-16 Fuji Seal International Inc Heat-shrinkable cylindrical label

Similar Documents

Publication Publication Date Title
JPS6278638A (en) File recording and control system
JPH01303547A (en) Control system for information memory
JPH0525359B2 (en)
JPS58114149A (en) Electronic filing system
JP2000057013A (en) Trace information sampling device and mechanically readable recording medium recording program
JPH02151944A (en) data processing equipment
JPS6057849U (en) information retrieval device
JP2912657B2 (en) File access processor
JPH04165543A (en) electronic filing device
JPH0383147A (en) Semiconductor recorder
JPH02213962A (en) Cache memory control system for disk cache
JPS61213920A (en) Disk file control method
JPH01263714A (en) Information recording control system
JPS63100590A (en) Ic card
JPH01163848A (en) Disk file double update prevention method
JPS61227268A (en) Magnetic disk access system
JPH04344953A (en) File management method for storage medium
JPH09185565A (en) Network system with program transferring function
JPS63184960A (en) Data control system
JPH05250243A (en) Data processing system for extended storage device
JPH04172541A (en) Record storage unit
JPS6234231A (en) file. data processing equipment
JPH01188966A (en) Magnetic disk controller containing cache
JPH04299749A (en) Magneto-optical disk system
JPS62134718A (en) Data access control system