JPH11249968A - File recording method and file system - Google Patents

File recording method and file system

Info

Publication number
JPH11249968A
JPH11249968A JP5388298A JP5388298A JPH11249968A JP H11249968 A JPH11249968 A JP H11249968A JP 5388298 A JP5388298 A JP 5388298A JP 5388298 A JP5388298 A JP 5388298A JP H11249968 A JPH11249968 A JP H11249968A
Authority
JP
Japan
Prior art keywords
file
area
fat
allocation table
recording medium
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
JP5388298A
Other languages
Japanese (ja)
Inventor
Takaaki Tsurukame
崇昭 鶴亀
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP5388298A priority Critical patent/JPH11249968A/en
Publication of JPH11249968A publication Critical patent/JPH11249968A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain a recording method which extends the life of a storage medium whose frequency in write is limited. SOLUTION: A flash memory is provided with a boot sector 10, a FAT area 12, and a data area 16, and the FAT area 12 is divided into plural FATs 1, 2, and 3. A CPU of a file system selects one of FATs 1, 2, and 3 in the system activation and writes cluster information of a file in the selected FAT when writing this file. A difference FAT is selected at each time of system activation to level the frequency in write of the FAT area 12, thus extending the life.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はファイル記録方法及
びファイルシステム、特にファイル割り当てテーブル
(FAT)の作成に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a file recording method and a file system, and more particularly to creation of a file allocation table (FAT).

【0002】[0002]

【従来の技術】従来より、フラッシュメモリ等の書き込
み回数に制限のある記録媒体にファイルを記録する際
に、記録媒体の一部の領域に書き込みが集中して、結果
的に記録媒体を長期間使用することができなくなる問題
があった。
2. Description of the Related Art Conventionally, when a file is recorded on a recording medium such as a flash memory which has a limited number of times of writing, writing is concentrated on a partial area of the recording medium, and as a result, the recording medium is stored for a long time. There was a problem that it could not be used.

【0003】図3には、フラッシュメモリのセクタマッ
プの一例(マイクロソフト社のMS−DOS及びWin
dowsの場合)が示されている。メモリ領域は、ブー
トセクタ10、FAT領域12、FATのコピー領域1
4、データ領域16に分割されている。FAT領域12
には、ファイル関連情報としてデータ領域16に書き込
まれるファイルの割り当てデータが記憶されており、こ
のFATを参照することで、ファイルの位置を認識する
ことができる。ファイルデータの基本単位はクラスタで
あり、クラスタは1つ以上のセクタから構成される。F
AT領域12には、ファイルによるクラスタの使用状況
とクラスタの連鎖状況が記録される。なお、FATのコ
ピー領域14は、本体のFAT領域12が破壊されたと
きのバックアップ用であり、FAT領域12のデータと
同一のデータが記録される。このFATのコピー領域1
4は省略可能な領域である。データ領域16の先頭に
は、ルートディレクトリの情報を持つルートディレクト
リ領域が含まれる。
FIG. 3 shows an example of a sector map of a flash memory (MS-DOS and Win of Microsoft Corporation).
dows) is shown. The memory area includes a boot sector 10, a FAT area 12, and a FAT copy area 1.
4, divided into data areas 16; FAT area 12
Stores file allocation data to be written in the data area 16 as file-related information. By referring to this FAT, the position of the file can be recognized. The basic unit of file data is a cluster, and a cluster is composed of one or more sectors. F
The AT area 12 records the status of cluster use by files and the status of cluster chaining. The FAT copy area 14 is for backup when the FAT area 12 of the main body is destroyed, and the same data as the data in the FAT area 12 is recorded. Copy area 1 of this FAT
4 is an area that can be omitted. The head of the data area 16 includes a root directory area having information on the root directory.

【0004】図4には、FAT領域12に記録されるあ
るファイルのクラスタ情報が示されている。図中上部は
クラスタ番号、下部は次のクラスタ番号である。クラス
タ2の次のクラスタは「003」、つまりクラスタ3で
あり、クラスタ3の次のクラスタは「004」、つまり
クラスタ4であり、クラスタ4の次のクラスタは「00
5」、つまりクラスタ5であり、クラスタ5の次のクラ
スタは「FFF」、つまり次のクラスタは存在せず最後
のクラスタであることを示している。従って、このFA
Tから、このファイルはクラスタ2→クラスタ3→クラ
スタ4→クラスタ5の順番で記録されていることが分か
る。
FIG. 4 shows cluster information of a certain file recorded in the FAT area 12. In the figure, the upper part is the cluster number, and the lower part is the next cluster number. The next cluster after cluster 2 is “003”, that is, cluster 3, the next cluster after cluster 3 is “004”, that is, cluster 4, and the next cluster after cluster 4 is “00”
5 ", that is, cluster 5, and the next cluster after cluster 5 is" FFF ", that is, the next cluster does not exist and is the last cluster. Therefore, this FA
From T, it can be seen that this file is recorded in the order of cluster 2 → cluster 3 → cluster 4 → cluster 5.

【0005】このように、FAT領域12にはファイル
のクラスタ状況が記録されるため、ファイルを書き換え
る毎にFAT領域12も書き換える必要が生じる。書き
換えはセクタ単位で行われるので、クラスタについて変
更が生じるとFAT領域12はセクタ単位の書き換えを
行うため、FAT領域12の書き換え回数は他の領域に
比べて著しく増大することになる。そして、このような
FAT領域12の書き換え回数の顕著な増大は、記録媒
体自体の寿命を短くすることになる。
As described above, since the cluster status of a file is recorded in the FAT area 12, it is necessary to rewrite the FAT area 12 every time the file is rewritten. Since rewriting is performed in sector units, if a change occurs in a cluster, the FAT area 12 is rewritten in sector units, so that the number of rewriting times in the FAT area 12 is significantly increased as compared with other areas. Such a remarkable increase in the number of times of rewriting of the FAT area 12 shortens the life of the recording medium itself.

【0006】そこで、従来より、記録媒体の寿命を延ば
すために、種々の方策が講じられている。
Therefore, conventionally, various measures have been taken to extend the life of the recording medium.

【0007】例えば、特開平6−124596号公報に
は、フラッシュメモリの各セクタに書き込んだファイル
に番号を付し、これを管理するテーブルや消去回数管理
テーブルを設け、既に書いたファイルの書き換え時にも
新たなデータとして別のセクタに書き込むとともに、古
いデータは消去して新たな書き込み可能領域として管理
する技術が記載されている。これによれば、ファイル管
理テーブル等のファイルが特定のセクタに割り当てられ
ることを防ぎ、フラッシュメモリの消去箇所が一部に集
中せずに寿命を延ばすことができる。
For example, Japanese Patent Laid-Open Publication No. Hei 6-124596 assigns a number to a file written in each sector of a flash memory, and provides a table for managing the number and an erase count management table. Describes a technique for writing new data into another sector and erasing old data and managing it as a new writable area. According to this, it is possible to prevent a file such as the file management table from being allocated to a specific sector, and to extend the life of the flash memory without erasing portions of the flash memory.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上記従
来技術では、論理セクタテーブルや物理セクタテーブ
ル、消去回数管理テーブルなどのハードウェアを別途追
加する必要があり、構成が複雑化する問題がある。
However, in the above-mentioned prior art, it is necessary to separately add hardware such as a logical sector table, a physical sector table, and an erasure count management table, and there is a problem that the configuration is complicated.

【0009】また、データを書き込むべきセクタは、消
去回数の少ないセクタを選択して行っているため、各セ
クタ毎に消去回数をカウントしなければならず、処理も
複雑化する問題がある。
In addition, since a sector to which data is to be written is selected from sectors having a small number of erasures, the number of erasures must be counted for each sector.

【0010】本発明は、上記従来技術の有する課題に鑑
みなされたものであり、その目的は、徒に装置構成を複
雑化することなく、簡易に記録媒体の使用効率を上げ、
寿命を延ばすことができるファイル記録方法及びファイ
ルシステムを提供することにある。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems of the related art, and has as its object to easily increase the use efficiency of a recording medium without complicating the apparatus configuration.
An object of the present invention is to provide a file recording method and a file system that can extend the life.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に、第1の発明は、書き込み回数に制限がある記録媒体
にファイルを記録する方法であって、前記記録媒体内に
複数のファイル割り当てテーブル領域を形成し、ファイ
ル記録時には所定の規則に従って選択してなる前記複数
のファイル割り当てテーブル領域のいずれかにファイル
関連情報を作成し、前記所定の規則は、前記複数のファ
イル割り当てテーブル領域の各々の領域の使用回数を平
準化するように定められていることを特徴とする。な
お、ファイル割り当てテーブル領域の作成時は、具体的
には例えば磁気記録媒体のフォーマット時である。
According to a first aspect of the present invention, there is provided a method of recording a file on a recording medium having a limited number of writings, wherein a plurality of files are allocated in the recording medium. Forming a table area, creating file-related information in one of the plurality of file allocation table areas selected according to a predetermined rule at the time of file recording, and the predetermined rule specifies each of the plurality of file allocation table areas. Is characterized in that the number of uses of the area is set to be equalized. The creation of the file allocation table area is, for example, the formatting of a magnetic recording medium.

【0012】また、第2の発明は、第1の発明におい
て、前記所定の規則は、前記複数のファイル割り当てテ
ーブル領域のローテーションであることを特徴とする。
In a second aspect based on the first aspect, the predetermined rule is a rotation of the plurality of file allocation table areas.

【0013】また、第3の発明は、第1の発明におい
て、前記所定の規則は、前記複数のファイル割り当てテ
ーブル領域の往復であることを特徴とする。
In a third aspect based on the first aspect, the predetermined rule is a round trip of the plurality of file allocation table areas.

【0014】また、第4の発明は、第1の発明におい
て、前記所定の規則は、乱数であることを特徴とする。
In a fourth aspect based on the first aspect, the predetermined rule is a random number.

【0015】また、第5の発明は、第1〜第4の発明に
おいて、前記選択は、前記記録媒体を用いるシステムの
起動時に実行されることを特徴とする。
According to a fifth aspect of the present invention, in the first to fourth aspects, the selection is performed when a system using the recording medium is started.

【0016】また、第6の発明は、書き込み回数に制限
がある記録媒体にファイルを記録するファイルシステム
であって、前記記録媒体内に複数のファイル割り当てテ
ーブル領域を作成する手段と、ファイル記録時に所定の
プログラムに従って選択してなる前記複数のファイル割
り当てテーブル領域のいずれかにファイル関連情報を作
成する手段とを有することを特徴とする。なお、ファイ
ル割り当てテーブル領域の作成時は、具体的には例えば
記録媒体のフォーマット時である。
According to a sixth aspect of the present invention, there is provided a file system for recording a file on a recording medium having a limited number of times of writing, wherein a means for creating a plurality of file allocation table areas in the recording medium, Means for creating file-related information in any of the plurality of file allocation table areas selected according to a predetermined program. Note that the creation of the file allocation table area is, for example, at the time of formatting a recording medium.

【0017】また、第7の発明は、第6の発明におい
て、前記所定のプログラムは、前記複数のファイル割り
当てテーブル領域のローテーションプログラムであるこ
とを特徴とする。
In a seventh aspect based on the sixth aspect, the predetermined program is a rotation program for rotating the plurality of file allocation table areas.

【0018】また、第8の発明は、第6の発明におい
て、前記所定のプログラムは、前記複数のファイル割り
当てテーブル領域の往復プログラムであることを特徴と
する。
In an eighth aspect based on the sixth aspect, the predetermined program is a reciprocating program for the plurality of file allocation table areas.

【0019】また、第9の発明は、第6の発明におい
て、前記所定のプログラムは、乱数発生プログラムであ
ることを特徴とする。
According to a ninth aspect, in the sixth aspect, the predetermined program is a random number generation program.

【0020】また、第10の発明は、第6〜第9の発明
において、前記ファイル関連情報を作成する手段は、シ
ステム起動時に前記ファイル割り当てテーブル領域を選
択することを特徴とする。
[0020] In a tenth aspect based on the sixth to ninth aspects, the means for creating the file-related information selects the file allocation table area at system startup.

【0021】また、第11の発明は、第1〜第4の発明
において、前記選択は、前記記録媒体を用いるシステム
の終了時に実行されることを特徴とする。
An eleventh invention is characterized in that, in the first to fourth inventions, the selection is performed when the system using the recording medium ends.

【0022】また、第12の発明は、第6〜第9の発明
において、前記ファイル関連情報を作成する手段は、シ
ステム終了時に前記ファイル割り当てテーブル領域を選
択することを特徴とする。
According to a twelfth aspect, in the sixth to ninth aspects, the means for creating the file-related information selects the file allocation table area when the system is terminated.

【0023】[0023]

【発明の実施形態】以下、図面に基づき本発明の実施形
態について、記録媒体としてフラッシュメモリを例にと
り説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described with reference to the drawings, taking a flash memory as an example of a recording medium.

【0024】フラッシュメモリの書き込み回数(寿命)
は約106回に設定されており、書き換えがフラッシュ
メモリの一部の領域に集中してしまうと、その領域だけ
がこの106回という寿命に達してしまい、使用不能と
なる。本実施形態では、フラッシュメモリの一部の領
域、具体的にはFAT領域に書き換えが集中することを
簡易に防ぎ、フラッシュメモリを効率的に使用する方法
について説明する。
Number of times of writing (lifetime) of flash memory
Is set to about 10 6 times, and if rewriting concentrates on a partial area of the flash memory, only that area reaches the life of 10 6 times and becomes unusable. In the present embodiment, a method will be described in which rewriting is easily prevented from being concentrated on a partial area of the flash memory, specifically, the FAT area, and the flash memory is used efficiently.

【0025】図1には、本実施形態におけるフラッシュ
メモリのセクタ構造が示されている。従来と同様に、ブ
ートセクタ10、FAT領域(ファイル割り当てテーブ
ル領域)12、データ領域(先頭にルートディレクトリ
の情報を持つルートディレクトリ領域も含む)16が設
けられているが、従来との相違は、FAT領域12がさ
らに複数のFAT領域に分割されている点である。具体
的には、FAT領域12がさらにFAT1、FAT2、
FAT3の3領域に分割されている点である。FAT
1、2、3はそれぞれ同一容量を有しており、それぞれ
クラスタの使用状況とクラスタの連鎖状況を記録する。
FAT1、2、3は同時に使用されることはなく、いず
れか一つが選択されてファイル記録時にそのクラスタ情
報が記録される。選択は所定の規則に従ってファイルシ
ステムのCPUがシステム起動時に行い、具体的にはF
AT1、2、3それぞれの書き込み回数が平準化するよ
うに選択する。
FIG. 1 shows a sector structure of a flash memory according to this embodiment. As in the prior art, a boot sector 10, a FAT area (file allocation table area) 12, and a data area (including a root directory area having root directory information at the beginning) 16 are provided. The point is that the FAT area 12 is further divided into a plurality of FAT areas. Specifically, the FAT region 12 further includes FAT1, FAT2,
This is a point divided into three regions of FAT3. FAT
Each of 1, 2, and 3 has the same capacity, and records the use status of the cluster and the chain status of the cluster.
FATs 1, 2, and 3 are not used at the same time, and one of them is selected and its cluster information is recorded at the time of file recording. The selection is made by the CPU of the file system at system startup according to a predetermined rule.
The ATs 1, 2, and 3 are selected such that the number of times of writing is equalized.

【0026】また、フラッシュメモリを用いてファイル
を記録するファイルシステム側の構成は、フラッシュメ
モリとのデータ送受を行うインターフェース、システム
CPU及びメモリを有しており、システムCPUがフラ
ッシュメモリのセクタを図1に示すような複数の領域に
フォーマットするとともに、プログラムに従ってFAT
領域を選択し、データ領域16にファイルデータを書き
込んでFAT領域12にクラスタ情報を記録する。本実
施形態では、システムCPUが記録媒体であるフラッシ
ュメモリ内に複数のFAT領域を作成する手段として機
能するとともに、ファイル記録時に複数のFAT領域の
いずれかを所定のプログラムに従って選択してファイル
関連情報を作成する手段として機能する。
The configuration on the file system side for recording a file using the flash memory includes an interface for transmitting and receiving data to and from the flash memory, a system CPU, and a memory. Formatting into a plurality of areas as shown in FIG.
An area is selected, file data is written in the data area 16, and cluster information is recorded in the FAT area 12. In the present embodiment, the system CPU functions as a means for creating a plurality of FAT areas in the flash memory as a recording medium, and selects one of the plurality of FAT areas at the time of file recording according to a predetermined program to store file related information. Functions as a means for creating

【0027】図2には、システムCPUがクラスタ情報
(ファイル関連情報)を記録するFAT領域を選択する
規則(プログラムのアルゴリズム)の一例が示されてい
る。図2(A)は、あるシステム起動時に選択されるF
AT領域が示されており、FAT1が選択されてクラス
タ情報が記録される。ファイルの書き換え要求がなされ
た場合には、このFAT1内のクラスタ情報を更新す
る。システム終了時には、システムCPUはFAT1に
最後に使用した時間情報を記録しておく。この時間情報
は、次回のシステム起動時にFAT領域を選択する際の
基準として用いられるものである。
FIG. 2 shows an example of a rule (program algorithm) for the system CPU to select a FAT area for recording cluster information (file-related information). FIG. 2A shows an F selected at the time of starting a certain system.
An AT area is shown, and FAT1 is selected and cluster information is recorded. When a file rewrite request is made, the cluster information in FAT1 is updated. At the time of system termination, the system CPU records the last used time information in FAT1. This time information is used as a reference when selecting the FAT area at the next system startup.

【0028】図2(B)は次のシステム起動時に選択さ
れるFAT領域が示されており、FAT2が選択され
る。すなわち、システムCPUは、システム起動時にま
ずFAT領域内に記録されている時間情報を読み出し、
この時間情報に基づいて前回の起動時に使用したFAT
領域を特定する。そして、前回の起動時にFAT1を選
択していると判定すると、今回はFAT1の次のFAT
であるFAT2を選択し、クラスタ情報を記録する。フ
ァイルの書き換え要求がなされた場合には、このFAT
2内のクラスタ情報が更新され、FAT1への書き込み
や更新は行わない。システム終了時には、再び最後に使
用した時間情報をFAT2に記録しておく。
FIG. 2B shows the FAT area selected at the time of the next system startup, and FAT2 is selected. That is, the system CPU first reads the time information recorded in the FAT area at the time of starting the system,
The FAT used at the time of the previous startup based on this time information
Identify the area. If it is determined that FAT1 has been selected at the time of the previous startup, this time, the next FAT1
Is selected, and the cluster information is recorded. If a file rewrite request is made, this FAT
2 is updated, and writing or updating to FAT1 is not performed. At the end of the system, the last used time information is recorded again in the FAT2.

【0029】図2(C)は、さらに次のシステム起動時
に選択されるFAT領域が示されており、FAT3が選
択される。すなわち、システムCPUは、システム起動
時にまずFAT領域に記録されている時間情報を読み出
し、この時間情報に基づいて前回の起動時に使用したF
AT領域を特定する。本実施形態の場合、FAT1に記
録された時間情報よりもFAT2に記録された時間情報
の方が後であるので、前回の起動時にFAT2を選択し
ていると特定できる。すると、システムCPUは、今回
はFAT2の次のFATであるFAT3を選択し、クラ
スタ情報を記録する。ファイルの書き換え要求がなされ
た場合には、このFAT3内のクラスタ情報が更新さ
れ、FAT1やFAT2への書き込みや更新は行わな
い。システム終了時には、再び最後に使用した時間情報
をFAT3に記録しておく。
FIG. 2C shows a FAT area to be selected at the next system startup, and FAT3 is selected. That is, the system CPU first reads the time information recorded in the FAT area at the time of starting the system, and based on this time information, the F
Specify the AT region. In the case of the present embodiment, since the time information recorded in FAT2 is later than the time information recorded in FAT1, it can be specified that FAT2 was selected at the time of the previous startup. Then, the system CPU selects FAT3, which is the next FAT after FAT2, and records the cluster information. When a file rewrite request is made, the cluster information in FAT3 is updated, and writing or updating to FAT1 or FAT2 is not performed. At the end of the system, the last used time information is recorded again in the FAT3.

【0030】このように、システム起動毎に使用するF
AT領域を順次変化させることで、いずれかの領域に書
き込みが集中することを簡易に防止できる。
As described above, the F used every time the system is activated
By sequentially changing the AT area, it is possible to easily prevent concentration of writing in any of the areas.

【0031】なお、(C)の状態でシステムを終了し、
さらにシステムを起動した場合には、再び(A)のよう
にFAT1にクラスタ情報を記録すればよい。すなわ
ち、 FAT1→FAT2→FAT3→FAT1→FAT2→
FAT3 のように、使用するFAT領域をローテーション(巡
回)させることで、書き込み回数の平準化を図ることが
できる。
The system is terminated in the state of (C),
Further, when the system is started, the cluster information may be recorded in the FAT1 again as shown in FIG. That is, FAT1 → FAT2 → FAT3 → FAT1 → FAT2 →
By rotating (circulating) the FAT area to be used like FAT3, the number of times of writing can be equalized.

【0032】本実施形態では、予めFAT領域を複数の
領域に分割し、これら複数のFAT領域を所定の規則
(すなわちプログラムのアルゴリズム)に従って選択し
ていくので、特別なハードウェア構成は必要でなく、ソ
フト的に処理することができる。
In this embodiment, the FAT area is divided into a plurality of areas in advance, and the plurality of FAT areas are selected in accordance with a predetermined rule (ie, a program algorithm). Therefore, a special hardware configuration is not required. , Can be processed by software.

【0033】なお、本実施形態では、システム起動時に
FAT1、2、3のいずれかを選択しているが、これは
処理の容易化を考慮したものであり、システム終了時に
次回の起動時のFATを予め選択しておくことも可能で
ある。この場合、例えば次回の起動時に選択すべきFA
T領域に特定のフラグ情報を記録しておくことが考えら
れる。
In this embodiment, one of the FATs 1, 2, and 3 is selected at the time of starting the system. However, this is for the purpose of facilitating the processing. May be selected in advance. In this case, for example, the FA to be selected at the next startup
It is conceivable that specific flag information is recorded in the T area.

【0034】さらに、本実施形態では、複数のFAT領
域をローテーションさせているが、他の規則(アルゴリ
ズム)に基づいて書き込み回数を平準化させることもで
きる。 例えば、FAT1からFAT2、FAT2から
FAT3と選択した後、FAT3から再びFAT2を選
択し、さらにFAT2からFAT1と往復させることも
可能である。すなわち、 FAT1→FAT2→FAT3→FAT2→FAT1 である。この場合も、システム終了時に時間情報をFA
T領域に記録しておき、次回の起動時にこの時間情報を
読み出してFAT領域を選択すればよい。
Furthermore, in the present embodiment, a plurality of FAT areas are rotated, but the number of times of writing can be equalized based on another rule (algorithm). For example, after selecting FAT2 from FAT1 and selecting FAT2 from FAT2, it is also possible to select FAT2 again from FAT3 and reciprocate from FAT2 to FAT1. That is, FAT1 → FAT2 → FAT3 → FAT2 → FAT1. In this case, the time information is
The time information may be recorded in the T area, and the time information may be read out at the next startup to select the FAT area.

【0035】また、ローテーションや往復ではなく、シ
ステムCPUがシステム起動時に乱数を発生させ、この
乱数に基づいて使用するFAT領域を選択することも可
能である。すなわち、システム起動毎に発生させた乱数
が、1、3、1、2、2、・・・である場合には、 FAT1→FAT3→FAT1→FAT2→FAT2 等である。なお、このような乱数を用いてFAT領域を
選択する利点の一つは、上述したローテーションや往復
と異なり、最後に使用した時間情報をFAT領域に記録
する必要がないことである。乱数により選択する以上、
前回の起動時にどのFAT領域を選択したかを知る必要
がないからである。
Instead of the rotation and the round trip, the system CPU can generate a random number when the system is started, and select a FAT area to be used based on the random number. That is, when the random numbers generated every time the system is activated are 1, 3, 1, 2, 2,..., The order is FAT1, FAT3, FAT1, FAT2, FAT2, and so on. One of the advantages of selecting the FAT area using such random numbers is that unlike the above-described rotation and round trip, it is not necessary to record the last used time information in the FAT area. As long as you select by random numbers,
This is because it is not necessary to know which FAT area was selected at the time of the previous activation.

【0036】もちろん、これ以外の規則を採用すること
も可能であり、また、システム起動時に常に前回選択し
たFAT領域以外の領域を選択する必要もない。すなわ
ち、システム起動毎に例えば FAT1→FAT1→FAT2→FAT2→FAT3→
FAT3 等も可能である。
Of course, other rules can be adopted, and it is not necessary to always select an area other than the FAT area selected last time when the system is started. That is, every time the system is started, for example, FAT1 → FAT1 → FAT2 → FAT2 → FAT3 →
FAT3 and the like are also possible.

【0037】このように、当業者であれば、ローテーシ
ョン、往復、乱数以外の規則を見いだすことが可能であ
ろう。規則(アルゴリズム)の本質は、複数のFAT領
域のいずれかに書き込みが集中しないように平準化させ
ることであり、この思想に基づくいかなる変形例も本願
の技術思想に包含される。
Thus, those skilled in the art will be able to find rules other than rotation, round trip, and random numbers. The essence of the rule (algorithm) is to level the writing so that it does not concentrate on any of the plurality of FAT areas, and any modifications based on this idea are included in the technical idea of the present application.

【0038】なお、前記MS−DOS及びWindow
s(マイクロソフト社)の場合には、図1におけるブー
トセクタ10にFAT領域の位置(セクタ単位)とFA
T領域の大きさ(セクタ単位)が記録されており、シス
テム初期化時にはこのブートセクタ10の情報を読み出
してからFAT領域にアクセスしている。FAT領域の
位置及び大きさについては特に制限はないので、本願発
明のように複数のFAT領域を設けることは当然可能で
あるが、上述した実施形態のようにいずれかのFAT領
域をシステム起動毎に選択した場合、FAT領域を変え
る毎にブートセクタ10の内容を更新しなければならな
い。すなわち、ブートセクタ10はシステム起動毎に更
新されることになるが、FAT領域がファイルの書き込
みの度に更新される回数に比べるとはるかに少なく、し
たがってこの場合もフラッシュメモリの寿命を増大させ
ることができる。
The above-mentioned MS-DOS and Windows
In the case of s (Microsoft), the boot sector 10 in FIG.
The size of the T area (in units of sectors) is recorded, and the FAT area is accessed after reading the information of the boot sector 10 at the time of system initialization. There is no particular limitation on the position and size of the FAT area, and it is naturally possible to provide a plurality of FAT areas as in the present invention. , The contents of the boot sector 10 must be updated every time the FAT area is changed. In other words, the boot sector 10 is updated every time the system is started up, but it is far less than the number of times that the FAT area is updated every time a file is written. Can be.

【0039】また、本実施形態では書き込み回数に制限
のある記録媒体としてフラッシュメモリを例にとり説明
したが、本発明はフラッシュメモリに限定されるもので
はなく、任意の記録媒体に適用できるものである。
In this embodiment, a flash memory has been described as an example of a recording medium having a limited number of times of writing. However, the present invention is not limited to a flash memory but can be applied to any recording medium. .

【0040】[0040]

【発明の効果】以上説明したように、本発明によれば、
特別なハードウェアを追加することなく、特定のファイ
ル割り当てテーブル(FAT)領域に書き込みが集中す
ることを防止し、簡易に記録媒体の使用効率を上げて寿
命を延ばすことができる。
As described above, according to the present invention,
Without adding special hardware, it is possible to prevent writing from being concentrated on a specific file allocation table (FAT) area, and to easily increase the use efficiency of a recording medium and extend the life.

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

【図1】 本発明の実施形態のフラッシュメモリのセク
タ構成図である。
FIG. 1 is a sector configuration diagram of a flash memory according to an embodiment of the present invention.

【図2】 実施形態のFAT領域の選択説明図である。FIG. 2 is an explanatory diagram illustrating selection of a FAT area according to the embodiment.

【図3】 従来のフラッシュメモリのセクタ説明図であ
る。
FIG. 3 is an explanatory diagram of a sector of a conventional flash memory.

【図4】 FATの構成説明図である。FIG. 4 is a diagram illustrating the configuration of an FAT.

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

10 ブートセクタ、12 FAT領域、14 FAT
のコピー領域、16データ領域。
10 boot sector, 12 FAT area, 14 FAT
Copy area, 16 data areas.

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】 書き込み回数に制限がある記録媒体にフ
ァイルを記録する方法であって、 前記記録媒体内に複数のファイル割り当てテーブル領域
を形成し、 ファイル記録時には所定の規則に従って選択してなる前
記複数のファイル割り当てテーブル領域のいずれかにフ
ァイル関連情報を作成し、 前記所定の規則は、前記複数のファイル割り当てテーブ
ル領域の各々の領域の使用回数を平準化するように定め
られていることを特徴とするファイル記録方法。
1. A method of recording a file on a recording medium having a limited number of times of writing, wherein a plurality of file allocation table areas are formed in the recording medium, and the file allocation table area is selected according to a predetermined rule when recording the file. File related information is created in any of the plurality of file allocation table areas, and the predetermined rule is set so as to equalize the number of times of use of each area of the plurality of file allocation table areas. File recording method.
【請求項2】 前記所定の規則は、前記複数のファイル
割り当てテーブル領域のローテーションであることを特
徴とする請求項1記載のファイル記録方法。
2. The file recording method according to claim 1, wherein the predetermined rule is a rotation of the plurality of file allocation table areas.
【請求項3】 前記所定の規則は、前記複数のファイル
割り当てテーブル領域の往復であることを特徴とする請
求項1記載のファイル記録方法。
3. The file recording method according to claim 1, wherein the predetermined rule is a round trip of the plurality of file allocation table areas.
【請求項4】 前記所定の規則は、乱数であることを特
徴とする請求項1記載のファイル記録方法。
4. The file recording method according to claim 1, wherein the predetermined rule is a random number.
【請求項5】 前記選択は、前記記録媒体を用いるシス
テムの起動時に実行されることを特徴とする請求項1〜
4のいずれかに記載のファイル記録方法。
5. The method according to claim 1, wherein the selection is performed when a system using the recording medium is started.
5. The file recording method according to any one of 4.
【請求項6】 書き込み回数に制限がある記録媒体にフ
ァイルを記録するファイルシステムであって、 前記記録媒体内に複数のファイル割り当てテーブル領域
を作成する手段と、 ファイル記録時に所定のプログラムに従って選択してな
る前記複数のファイル割り当てテーブル領域のいずれか
にファイル関連情報を作成する手段と、 を有することを特徴とするファイルシステム。
6. A file system for recording a file on a recording medium having a limited number of times of writing, comprising: means for creating a plurality of file allocation table areas in the recording medium; Means for creating file-related information in any of the plurality of file allocation table areas.
【請求項7】 前記所定のプログラムは、前記複数のフ
ァイル割り当てテーブル領域のローテーションプログラ
ムであることを特徴とする請求項6記載のファイルシス
テム。
7. The file system according to claim 6, wherein the predetermined program is a rotation program for rotating the plurality of file allocation table areas.
【請求項8】 前記所定のプログラムは、前記複数のフ
ァイル割り当てテーブル領域の往復プログラムであるこ
とを特徴とする請求項6記載のファイルシステム。
8. The file system according to claim 6, wherein said predetermined program is a reciprocating program for said plurality of file allocation table areas.
【請求項9】 前記所定のプログラムは、乱数発生プロ
グラムであることを特徴とする請求項6記載のファイル
システム。
9. The file system according to claim 6, wherein the predetermined program is a random number generation program.
【請求項10】 前記ファイル関連情報を作成する手段
は、システム起動時に前記ファイル割り当てテーブル領
域を選択することを特徴とする請求項6〜9のいずれか
に記載のファイルシステム。
10. The file system according to claim 6, wherein the means for creating the file-related information selects the file allocation table area at system startup.
【請求項11】 前記選択は、前記記録媒体を用いるシ
ステムの終了時に実行されることを特徴とする請求項1
〜4のいずれかに記載のファイル記録方法。
11. The method according to claim 1, wherein the selection is performed at the end of a system using the recording medium.
5. The file recording method according to any one of Items 1-4.
【請求項12】 前記ファイル関連情報を作成する手段
は、システム終了時に前記ファイル割り当てテーブル領
域を選択することを特徴とする請求項6〜9のいずれか
に記載のファイルシステム。
12. The file system according to claim 6, wherein the means for creating the file-related information selects the file allocation table area at the time of system termination.
JP5388298A 1998-03-05 1998-03-05 File recording method and file system Pending JPH11249968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5388298A JPH11249968A (en) 1998-03-05 1998-03-05 File recording method and file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5388298A JPH11249968A (en) 1998-03-05 1998-03-05 File recording method and file system

Publications (1)

Publication Number Publication Date
JPH11249968A true JPH11249968A (en) 1999-09-17

Family

ID=12955122

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5388298A Pending JPH11249968A (en) 1998-03-05 1998-03-05 File recording method and file system

Country Status (1)

Country Link
JP (1) JPH11249968A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002054247A1 (en) * 2000-12-28 2002-07-11 Sony Corporation Data recorder and method for recording data in flash memory
JP2003050747A (en) * 2001-08-03 2003-02-21 Sony Corp Method for rewriting data of non-volatile memory
KR100445134B1 (en) * 2002-01-31 2004-08-21 삼성전자주식회사 Host equipped with stabilizing function for flash memory and the method thereof
KR100755702B1 (en) 2005-12-27 2007-09-05 삼성전자주식회사 Storage apparatus using non volatile memory as cache and method for operating the same
JP2007310637A (en) * 2006-05-18 2007-11-29 Buffalo Inc Data storage device and data storage method
US7366066B2 (en) 2001-11-30 2008-04-29 Sony Corporation Information recording method and apparatus, information reproducing method and apparatus, information recording medium, and program storage medium with overwrite protection features limiting the possible number of rewrites
JP2008108420A (en) * 2007-11-15 2008-05-08 Sony Corp Information recording apparatus and method, information reproducing apparatus and method, information recording medium, program storage medium, and program
US7383431B2 (en) 2002-06-11 2008-06-03 Seiko Epson Corporation Control system and method for rewriting data in a flash memory and a data storage medium in which a program is stored for rewriting data in a flash memory
US7398352B2 (en) 2002-10-30 2008-07-08 Matsushita Electric Industrial Co., Ltd. Recording method and recording apparatus that limits number of rewrites to the same storage area
EP2031515A1 (en) * 2006-05-16 2009-03-04 Buffalo Inc. Data memory device and method for initializing same
JP2010122898A (en) * 2008-11-19 2010-06-03 Toshiba Corp Recordable memory device
JP4678966B2 (en) * 2001-03-06 2011-04-27 三菱電機株式会社 Data processing method at power failure and power recovery
US8489850B2 (en) 2005-12-01 2013-07-16 Sony Corporation Memory apparatus and memory control method

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002054247A1 (en) * 2000-12-28 2002-07-11 Sony Corporation Data recorder and method for recording data in flash memory
US7065608B2 (en) 2000-12-28 2006-06-20 Sony Corporation Apparatus for recording data and method for writing data to flash memory
CN1307554C (en) * 2000-12-28 2007-03-28 索尼公司 Data recorder and method for recording data in flash memory
KR100871027B1 (en) * 2000-12-28 2008-11-27 소니 가부시끼 가이샤 Data recorder and method for recording data in flash memory
JP4678966B2 (en) * 2001-03-06 2011-04-27 三菱電機株式会社 Data processing method at power failure and power recovery
JP2003050747A (en) * 2001-08-03 2003-02-21 Sony Corp Method for rewriting data of non-volatile memory
US7738330B2 (en) 2001-11-30 2010-06-15 Sony Corporation Information recording method and apparatus, information reproducing method and apparatus, information recording medium, program storage medium and program
US7366066B2 (en) 2001-11-30 2008-04-29 Sony Corporation Information recording method and apparatus, information reproducing method and apparatus, information recording medium, and program storage medium with overwrite protection features limiting the possible number of rewrites
KR100445134B1 (en) * 2002-01-31 2004-08-21 삼성전자주식회사 Host equipped with stabilizing function for flash memory and the method thereof
US7383431B2 (en) 2002-06-11 2008-06-03 Seiko Epson Corporation Control system and method for rewriting data in a flash memory and a data storage medium in which a program is stored for rewriting data in a flash memory
US7398352B2 (en) 2002-10-30 2008-07-08 Matsushita Electric Industrial Co., Ltd. Recording method and recording apparatus that limits number of rewrites to the same storage area
US8489850B2 (en) 2005-12-01 2013-07-16 Sony Corporation Memory apparatus and memory control method
US7716422B2 (en) 2005-12-27 2010-05-11 Samsung Electronics Co., Ltd. Storage apparatus and method for using a non-volatile cache memory organized into stationary and non-stationary circular regions
KR100755702B1 (en) 2005-12-27 2007-09-05 삼성전자주식회사 Storage apparatus using non volatile memory as cache and method for operating the same
EP2031515A1 (en) * 2006-05-16 2009-03-04 Buffalo Inc. Data memory device and method for initializing same
EP2031515A4 (en) * 2006-05-16 2010-11-10 Buffalo Inc Data memory device and method for initializing same
JP2007310637A (en) * 2006-05-18 2007-11-29 Buffalo Inc Data storage device and data storage method
JP4676378B2 (en) * 2006-05-18 2011-04-27 株式会社バッファロー Data storage device and data storage method
US8364730B2 (en) 2006-05-18 2013-01-29 Buffalo Inc. Data storage apparatus and data storage method
JP2008108420A (en) * 2007-11-15 2008-05-08 Sony Corp Information recording apparatus and method, information reproducing apparatus and method, information recording medium, program storage medium, and program
JP2010122898A (en) * 2008-11-19 2010-06-03 Toshiba Corp Recordable memory device

Similar Documents

Publication Publication Date Title
US7610434B2 (en) File recording apparatus
KR100951107B1 (en) Method for managing files for optimal performance
EP1960887B1 (en) Method for flash-memory management
US8069306B2 (en) Data area managing method in information recording medium and information processor employing data area managing method
JP3215237B2 (en) Storage device and method for writing / erasing storage device
CN1307555C (en) Data storage device
EP1782211B1 (en) Fat analysis for optimized sequential cluster management
JP4859837B2 (en) Information recording medium access device and data recording method
US7752412B2 (en) Methods of managing file allocation table information
US7681008B2 (en) Systems for managing file allocation table information
US20060224818A1 (en) Method for fast access to flash-memory media
JP2000515284A (en) IC card containing files classified in a tree structure
WO2003056433A1 (en) Memory device and recording/reproducing apparatus using the same
WO2005124530A2 (en) Method for controlling memory card and method for controlling nonvolatile semiconductor memory
JP2006040264A (en) Control method of memory card, and control method of nonvolatile semiconductor memory
JP2008033788A (en) Nonvolatile storage device, data storage system, and data storage method
JPH11249968A (en) File recording method and file system
KR100703680B1 (en) Flash file system
JP4130808B2 (en) Formatting method
US20050149493A1 (en) Data recording apparatus and data recording method
US20030200232A1 (en) Information processor and program
CN111949212B (en) File system and file management method based on self-defined open channel SSD
JP3988417B2 (en) Computer system, storage device, file arrangement method, and file arrangement program
JPH05258585A (en) Filing device
JP4443705B2 (en) Data filing system and data filing method