JP2005332481A - Recording device and method, recording medium, and program - Google Patents
Recording device and method, recording medium, and program Download PDFInfo
- Publication number
- JP2005332481A JP2005332481A JP2004149656A JP2004149656A JP2005332481A JP 2005332481 A JP2005332481 A JP 2005332481A JP 2004149656 A JP2004149656 A JP 2004149656A JP 2004149656 A JP2004149656 A JP 2004149656A JP 2005332481 A JP2005332481 A JP 2005332481A
- Authority
- JP
- Japan
- Prior art keywords
- file
- recording
- area
- cluster
- address information
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Abstract
Description
本発明は、記録装置および方法、記録媒体、並びにプログラムに関し、特に、より迅速に記録媒体に記録させることができるようにした記録装置および方法、記録媒体、並びにプログラムに関する。 The present invention relates to a recording apparatus and method, a recording medium, and a program, and more particularly to a recording apparatus and method, a recording medium, and a program that can be recorded on a recording medium more quickly.
従来、例えば、デジタルビデオカメラやデジタルスチルカメラ、PC(Personal Computer)や携帯電話機、および据え置き型ビデオレコーダなどにおいては、ハードディスクなどのランダムアクセス可能な記録媒体に、静止画像、動画像、または音声(または音楽)といった各種データが、FAT(File Allocation Tables)などのファイルシステムによって、ファイルとして記録されていた。 Conventionally, for example, in a digital video camera, a digital still camera, a PC (Personal Computer), a mobile phone, and a stationary video recorder, a still image, a moving image, or audio ( Various data such as music) are recorded as files by a file system such as FAT (File Allocation Tables).
FAT32などのファイルシステムにおいては、1つのクラスタに、ファイルの名前やファイルに格納される実際のデータ(以下、適宜、実データと称する)へのエントリポイントなどを示すディレクトリエントリが記録され、論理フォーマット上のアドレスにおいて、ディレクトリエントリが記録されたクラスタの後のクラスタに、ディレクトリエントリに対応するファイルの実データが記録される。 In a file system such as FAT32, a directory entry indicating a file name and an entry point to actual data stored in the file (hereinafter referred to as actual data as appropriate) is recorded in one cluster, and is in a logical format. At the upper address, the actual data of the file corresponding to the directory entry is recorded in the cluster after the cluster in which the directory entry is recorded.
ファイルにアクセスする場合、各ファイルが記録されるときに生成されたディレクトリエントリ内に保持されている先頭クラスタの番号を基に、FATが参照され、FATから、そのファイルの実データが記録されているクラスタのクラスタ番号(以下、適宜、クラスタの番号とも称する)が順次読み出され、クラスタ番号で示されるクラスタから実データが読み出されることにより、ファイルがアクセスされる。 When accessing a file, the FAT is referenced based on the number of the first cluster held in the directory entry generated when each file is recorded, and the actual data of that file is recorded from the FAT. A cluster number (hereinafter also referred to as a cluster number as appropriate) is sequentially read, and the actual data is read from the cluster indicated by the cluster number, thereby accessing the file.
図1は、FATファイルシステム(FAT32)によりフォーマットされているハードディスク1の種々の領域の配置を示す図である。
FIG. 1 is a diagram showing an arrangement of various areas of the
図1で示されるように、ハードディスク1には、ハードディスク1を構成するパーティションの位置やサイズなどが記録されているパーティションテーブルやアクティブなパーティションから起動用のプログラムを読み込むためのマスタブートコード(Master Boot Code)などが記録されているMBR(Master Boot Record)11、空き領域12、およびパーティション13が配置されている。
As shown in FIG. 1, the
パーティション13には、1クラスタあたりのセクタ数など、ハードディスク1の物理的な属性が記録されているBPB(BIOS(Basic Input Output System) Parameter Block)21、ファイルのクラスタ(データの記録単位)の配列が記録されているFAT領域22,FAT領域22のバックアップなどのために利用される予備の領域であるFAT領域23が設けられている。
The
また、パーティション13には、ディレクトリエントリおよびそのディレクトリエントリに対応する実データが記録されるデータ領域24が設けられている。ディレクトリエントリには、ファイル名、拡張子、属性、作成された日付と時刻、先頭クラスタ番号、およびファイルのサイズなどが格納される。
Further, the
ハードディスクなどの記録媒体においては、ファイルが記録される場合、メモリに読み出されたFATから、クラスタのクラスタ番号が格納されていない空き領域が検索されることにより、ファイルを記録させるクラスタが検出される。そして、検出されたクラスタにファイルを書き込むと、ファイルが記録されたクラスタのクラスタ番号がFATに格納される。このとき、FATをRAM(Random Access Memory)などのメモリに保持することで、空いているクラスタのクラスタ番号を迅速に検索することができる。 When a file is recorded on a recording medium such as a hard disk, a cluster that records the file is detected by searching a free area in which the cluster number of the cluster is not stored from the FAT read to the memory. The When a file is written into the detected cluster, the cluster number of the cluster in which the file is recorded is stored in the FAT. At this time, by holding the FAT in a memory such as a RAM (Random Access Memory), it is possible to quickly search for a cluster number of an empty cluster.
しかしながら、FATのサイズによっては、FAT全体をメモリに保持できない場合がある。FAT全体をRAMなどのメモリに保持できない場合には、ページングが行われる。すなわち、FATが所定のページ単位に分割され、分割されたページ毎に、メモリに読み出され、メモリに読み出されたページから、空いているクラスタのクラスタ番号が検索される。メモリに読み出されている(保持されている)ページに、ファイルの記録に必要な記録容量の空き領域が無い場合には、そのページが破棄され、新たなページがメモリに読み出される。必要な記録容量の空き領域が検出されるまで、以上の処理が繰り返し実行される。 However, depending on the size of the FAT, the entire FAT may not be held in the memory. If the entire FAT cannot be held in memory such as RAM, paging is performed. That is, the FAT is divided into predetermined page units, and each divided page is read into the memory, and the cluster number of the free cluster is searched from the page read into the memory. If a page read (held) in the memory does not have a free area with a recording capacity necessary for file recording, the page is discarded and a new page is read into the memory. The above processing is repeatedly executed until a free space having a necessary recording capacity is detected.
具体的には、例えば、図1で示されるように、ハードディスク1のパーティション13が18.6ギガバイト(=39,053,952セクタ)であり、クラスタのサイズが32キロバイト(=64セクタ)である場合、FAT領域22に記録される「FAT」22aの記録容量は、約2.3メガバイト(=4,767セクタ)となる。なお、ここで1セクタは512バイトである。
Specifically, for example, as shown in FIG. 1, the
なお、「FAT」22aの個々の四角は、1つのエントリ31を示す。例えば、図1中のエントリ31に付された「00000003」や「00000004」などの番号は、そのエントリ31に格納されている値を示す。すなわち、「00000003」や「00000004」などの番号を格納しているエントリ31に対応するクラスタには、既にファイルが記録されている。
Each square of “FAT” 22 a indicates one
これに対して、「00000000」の番号を格納しているエントリ31に対応するクラスタには、ファイルが記録されていない。すなわち、「00000000」の番号を格納しているエントリ31に対応するクラスタは、空き領域を表す。
On the other hand, no file is recorded in the cluster corresponding to the
このとき、図1で示される1つのセクタが512バイトであり、1つのエントリ31が4バイトである場合、1つのセクタには、128個のエントリ31が配置されることになる。したがって、装置の仕様によっては、メモリにFAT全体(「FAT」22a全体)を1度に読み出す(保持する)ことができないため、FATに対して、所定のサイズ、すなわち、所定のページ単位でアクセスすることになる。例えば、約2.3メガバイトのFATがページングされる場合、1つのページのサイズが32キロバイト(=64セクタ)とされる。
At this time, when one sector shown in FIG. 1 is 512 bytes and one
ここで、図2のフローチャートを参照して、FATを用いた従来のファイルの記録の処理を説明する。 Here, a conventional file recording process using FAT will be described with reference to the flowchart of FIG.
ステップS1において、「FAT」22aの1ページ目(最初のページ)がメモリに読み込まれる。例えば、図3で示されるように、「FAT」22aの1ページ目であるページP1-1がRAMなどのメモリに読み込まれる。ステップS2において、メモリに読み込まれているページから空き領域が検索される。ステップS3において、ページに空き領域があるか否かが判定される。 In step S1, the first page (first page) of “FAT” 22a is read into the memory. For example, as shown in Figure 3, page P 1-1 is the first page of the "FAT" 22a is loaded into memory, such as RAM. In step S2, an empty area is searched from pages read into the memory. In step S3, it is determined whether or not there is an empty area on the page.
なお、図3において、1つの四角は、1つのエントリ31を示す。図3において、白い四角は、対応するクラスタが空きであることを示すエントリ31を表す。斜線が付されている四角は、対応するクラスタにファイルが記録されていることを示すエントリ31を表す。
In FIG. 3, one square indicates one
ステップS3において、ページに空き領域がないと判定された場合、ステップS4に進み、メモリに読み込まれているページが「FAT」22aにおける、最終のページであるか否かが判定される。ステップS4において、最終のページではないと判定された場合、ステップS5に進み、メモリに読み込まれているページが破棄(削除)される。 If it is determined in step S3 that there is no free space in the page, the process proceeds to step S4, and it is determined whether or not the page read into the memory is the last page in the “FAT” 22a. If it is determined in step S4 that the page is not the last page, the process proceeds to step S5, and the page read into the memory is discarded (deleted).
ステップS6において、次のページがメモリに読み込まれる。例えば、図3で示されるページP1-2がメモリに読み込まれる。その後、手続きは、ステップS2に戻り、上述した処理が実行される。 In step S6, the next page is read into the memory. For example, a page P 1-2 shown in Figure 3 is read into memory. Thereafter, the procedure returns to step S2, and the above-described processing is executed.
一方、ステップS3において、ページに空き領域があると判定された場合、ステップS7に進み、検索された空き領域の記録容量は、記録しようとするファイルのデータ量以上であるか否かが判定される。すなわち、記録しようとするファイルの総てを格納することができる空き領域がメモリに読み出されているページで示されるクラスタに存在するか否かが判定される。 On the other hand, if it is determined in step S3 that there is a free area in the page, the process proceeds to step S7, and it is determined whether or not the recording capacity of the searched free area is equal to or larger than the data amount of the file to be recorded. The That is, it is determined whether or not a free area that can store all of the files to be recorded exists in the cluster indicated by the page read into the memory.
例えば、ファイルが記録されるのに、28のクラスタが必要とされる場合、メモリに読み出されているページ、例えば、ページP1-2に、対応するクラスタが空きであることを示すエントリ31が28あるか否かが判定される。
For example, if 28 clusters are required to record a file, an
ステップS7において、検索された空き領域の記録容量は、記録しようとするファイルのデータ量以上ではない(データ量未満である)と判定された場合、ステップS4に戻り、上述した処理が実行される。 In step S7, when it is determined that the recording capacity of the searched free area is not equal to or larger than the data amount of the file to be recorded (less than the data amount), the process returns to step S4 and the above-described processing is executed. .
ステップS7において、検索された空き領域の記録容量は、記録されるファイルのデータ量以上であると判定された場合、ステップS8に進み、ファイルが記録される。例えば、図3で示されるページP1-nの28個の白い四角で示されるエントリ31に、クラスタ番号が格納され、図1で示されるデータ領域24にディレクトリエントリを含むファイル(実データ)が記録される。
If it is determined in step S7 that the recording capacity of the searched free area is equal to or larger than the data amount of the file to be recorded, the process proceeds to step S8, and the file is recorded. For example, a cluster number is stored in an
ステップS4において、メモリに読み込まれているページが、最終のページであると判定された場合、ファイルの記録の処理は終了する。すなわち、「FAT」22aには、ファイル(実データ)が記録されるクラスタのクラスタ番号を全て格納することが可能な記録容量の空き領域が存在しないため、ファイルは記録されない。 If it is determined in step S4 that the page read into the memory is the last page, the file recording process ends. That is, the “FAT” 22a does not have a recording capacity free area that can store all the cluster numbers of the clusters in which the file (actual data) is recorded, so the file is not recorded.
このように、RAMなどのメモリにFAT全体を一度に読み込むことができない場合、FATがページ単位で、メモリに読み込まれる(ページングされる)。したがって、ファイルを記録するのに28の空いているクラスタが必要である場合、図2のステップS7の処理において、メモリに読み込まれているページがページP1-2であるとき、ページP1-2のみを対象にして、充分な記録容量を有する空き領域が検索され、また、同様に、メモリに読み込まれているページがページP1-3である場合、ページP1-3のみを対象にして、充分な記録容量を有する空き領域が検索される。 As described above, when the entire FAT cannot be read into a memory such as a RAM at a time, the FAT is read (paged) into the memory in units of pages. Therefore, when 28 free clusters are required to record the file, when the page read into the memory is page P 1-2 in the process of step S7 in FIG. 2, page P 1− 2 is searched for an empty area having a sufficient recording capacity. Similarly, when the page read into the memory is page P 1-3 , only page P 1-3 is targeted. Thus, a free area having a sufficient recording capacity is searched.
このため、図3で示されるように、対応するクラスタが空きであることを示す14のエントリ31がページP1-2に含まれ、対応するクラスタが空きであることを示す14のエントリ31がページP1-3に含まれていたとしても、すなわち、ページP1-2およびページP1-3に跨って、空いているクラスタであって、充分な記録容量の空いているクラスタを示す28のエントリ31があったとしても、FATがページ単位で、メモリに読み込まれ、空き領域の有無が判断されるため、ページP1-2とページP1-3とにまたがる28のエントリ31に対応する空き領域は、ファイルを全て格納可能な、充分な記録容量を有する空き領域として認識されない。
Therefore, as shown in FIG. 3, 14
したがって、1つのページで、充分な記録容量を有する空き領域を示すページP1-nがメモリに読み込まれた場合、ファイルが記録され、これにより、ページP1-nに、ファイルが記録されたクラスタのクラスタ番号が格納される。 Therefore, when a page P 1-n indicating a free area having a sufficient recording capacity is read into the memory in one page, a file is recorded, and thus the file is recorded on the page P 1-n . Stores the cluster number of the cluster.
すなわち、この場合、n回のページング(ハードディスク1に対するアクセス)が必要とされる。 That is, in this case, n times of paging (access to the hard disk 1) are required.
上述したように、ハードディスクなどの記録媒体においては、FATが先頭からページ単位でメモリに保持される。すでにページ内の全ての領域にクラスタ番号が格納され、空き領域が存在しないページであっても、メモリに順に読み込まれていた。例えば、図2のステップS1の処理のように、ページの先頭からメモリに保持され、また、図3で示されるページP1-1のように、空き領域の存在しないページであってもメモリに読み込まれていた。 As described above, in a recording medium such as a hard disk, the FAT is held in the memory in units of pages from the top. The cluster number has already been stored in all the areas in the page, and even pages that have no free area have been sequentially read into the memory. For example, as the processing in step S1 in FIG. 2, is held at the top of the page in memory and, as in the page P 1-1 shown in Figure 3, memory even existent pages of free space It was loaded.
また、FATをメモリに保持する方法などに関する技術が種々提案されている。 Various techniques relating to a method for retaining the FAT in the memory have been proposed.
例えば、特許文献1には、ハードディスクにおいて、データを記録または再生する場合に、データが記録される(または記録されている)領域にアクセスするためのアドレス情報(システムエントリーエリアに記録されている情報)を、不揮発性メモリであるシステムエントリーメモリに記録することが開示されている。
For example,
特許文献2には、ホスト装置により発行される1回の読み出し、または1回の書き込みコマンドを基に、ハードディスク装置が、ハードディスクの空き領域を検出し、その空き領域に順次ファイル(ビデオデータなど)を記録することが開示されている。
In
特許文献3には、ファイルが記録される領域の先頭クラスタのクラスタ番号を、そのファイルを特定するためのファイル識別子として、また、固定長の値として用いることが開示されている。
しかしながら、特許文献1乃至特許文献3に記載の技術においては、FATのサイズが、管理の対象となる記録媒体(パーティション)の記録容量に比例するものであるため、上述したようにFATのサイズによっては、FAT全体をRAMなどのメモリに読み込むことは困難な場合があった。また、FATのページングを行う場合には、上述したようにFATが所定のサイズ毎(ページ毎)にメモリに読み込まれていたため、ファイルを記録するクラスタのクラスタ番号を格納するのに充分なサイズの空き領域であったとしても、前後のページにまたがって存在する空き領域を、充分なサイズの空き領域であると判断することができなかった。
However, in the techniques described in
このため、ページングの回数、すなわち、ハードディスクなどの記録媒体へのアクセスの回数が増加してしまい、記録媒体に対するアクセスタイムが遅延してしまうという課題があった。 For this reason, the number of times of paging, that is, the number of times of access to a recording medium such as a hard disk increases, resulting in a problem that the access time to the recording medium is delayed.
また、上述したようにハードディスクなどの記録媒体においては、ページングが行われる場合、FATのページが先頭からメモリに読み込まれ、また、すでにクラスタ番号が格納され、クラスタ番号を格納することが可能な空き領域が存在しないページまでも、メモリに読み込まれていた。これにより、記録媒体に対するページングの回数(アクセスの回数)がさらに増加してしまい、アクセスタイムが、より遅延してしまうという課題があった。 In addition, as described above, in a recording medium such as a hard disk, when paging is performed, a FAT page is read into the memory from the top, and a cluster number is already stored, and a free space in which the cluster number can be stored. Even pages with no area were read into memory. As a result, the number of times of paging (number of accesses) for the recording medium is further increased, and the access time is further delayed.
本発明は、このような状況に鑑みてなされたものであり、例えば、ハードディスクなどの記録媒体において、より簡単に、アクセスタイムをより短縮することができるようにするものである。 The present invention has been made in view of such a situation. For example, in a recording medium such as a hard disk, the access time can be more easily reduced.
本発明の記録装置は、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報との記憶を制御する記憶制御手段と、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しを制御する読み出し制御手段と、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録を制御する記録制御手段とを含むことを特徴とする。 The recording apparatus of the present invention includes first address information indicating the position of the first second recording area of one or a plurality of second recording areas forming one vacant area, and first address information. Storage control means for controlling storage of the second address information indicating the position of the first recording area for storing the file arrangement information for the second recording area indicating the position, and the stored second address Based on the information, the read control means for controlling the reading of the file arrangement information from the file recording medium, and the recording of the file on the file recording medium is controlled based on the first address information and the read file arrangement information. And a recording control means.
記録装置は、記憶制御手段が、第1のアドレス情報および第2のアドレス情報をリストとして記憶するように記憶を制御するようにすることができる。 The recording apparatus may control the storage so that the storage control unit stores the first address information and the second address information as a list.
記録装置は、リストには、第1のアドレス情報および第2のアドレス情報に対応して、空き領域の記録容量を示す情報がさらに格納されているようにすることができる。 The recording apparatus can further store information indicating the recording capacity of the free area corresponding to the first address information and the second address information in the list.
記録装置は、記録制御手段が、FAT(File Allocation Tables)ファイルシステムが適用されているファイル記録媒体にファイルが記録されている場合、ファイル記録媒体における、BPB(BIOS(Basic Input/Output System) Parameter Block)と、FATが格納される領域との間に設けられる領域にリストを記録するように、さらに記録を制御するようにすることができる。 When a file is recorded on a file recording medium to which the FAT (File Allocation Tables) file system is applied, the recording control means uses a BPB (Basic Input / Output System) parameter on the file recording medium. The recording can be further controlled so that the list is recorded in an area provided between the block) and the area in which the FAT is stored.
本発明の記録方法は、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報との記憶を制御する記憶制御ステップと、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しを制御する読み出し制御ステップと、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録を制御する記録制御ステップとを含むことを特徴とする。 The recording method of the present invention includes first address information indicating the position of the first second recording area of one or a plurality of second recording areas forming one vacant area, and first address information. A storage control step for controlling storage of the second address information indicating the position of the first recording area for storing the file arrangement information for the second recording area for which the position is indicated; and the stored second address Based on the information, the read control step for controlling the reading of the file arrangement information from the file recording medium, and the recording of the file on the file recording medium is controlled based on the first address information and the read file arrangement information. And a recording control step.
本発明の記録媒体のプログラムは、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報との記憶を制御する記憶制御ステップと、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しを制御する読み出し制御ステップと、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録を制御する記録制御ステップとを含むことを特徴とする。 The recording medium program of the present invention includes first address information indicating the position of the first second recording area of one or more second recording areas forming one empty area, and a first address. A storage control step for controlling storage of second address information indicating the position of the first recording area for storing the file arrangement information for the second recording area whose position is indicated by the information; A read control step for controlling the reading of the file arrangement information from the file recording medium based on the address information of the file, and the recording of the file on the file recording medium based on the first address information and the read file arrangement information And a recording control step for controlling the recording.
本発明のプログラムは、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報との記憶を制御する記憶制御ステップと、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しを制御する読み出し制御ステップと、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録を制御する記録制御ステップとを実行させることを特徴とする。 The program of the present invention is based on the first address information indicating the position of the first second recording area in one or a plurality of second recording areas forming one free area, and the first address information. A storage control step for controlling storage with the second address information indicating the position of the first recording area for storing the file arrangement information for the second recording area indicated by, and the stored second address information Based on the above, based on the read control step for controlling the reading of the file arrangement information from the file recording medium and the first address information and the read file arrangement information, the recording of the file on the file recording medium is controlled. And a recording control step.
本発明においては、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報との記憶が制御され、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しが制御され、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録が制御される。 In the present invention, the position of the first address information indicating the position of the first second recording area of one or a plurality of second recording areas forming one vacant area and the first address information is the position. Storage with the second address information indicating the position of the first recording area for storing the file arrangement information for the indicated second recording area is controlled, and the file is based on the stored second address information. Reading of the file arrangement information from the recording medium is controlled, and recording of the file to the file recording medium is controlled based on the first address information and the read file arrangement information.
本発明によれば、データを記録することができる。また、本発明によれば、より簡単にアクセスタイムをより短縮することができる。 According to the present invention, data can be recorded. Further, according to the present invention, the access time can be shortened more easily.
以下に本発明の最良の形態を説明するが、開示される発明と実施の形態との対応関係を例示すると、次のようになる。本明細書中には記載されているが、発明に対応するものとして、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その発明に対応するものではないことを意味するものではない。逆に、実施の形態が発明に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その発明以外の発明には対応しないものであることを意味するものでもない。 BEST MODE FOR CARRYING OUT THE INVENTION The best mode of the present invention will be described below. The correspondence relationship between the disclosed invention and the embodiments is exemplified as follows. Although there are embodiments which are described in this specification but are not described here as corresponding to the invention, the embodiments correspond to the invention. It does not mean that it is not a thing. Conversely, even if an embodiment is described herein as corresponding to an invention, that means that the embodiment does not correspond to an invention other than the invention. Absent.
さらに、この記載は、明細書に記載されている発明の全てを意味するものではない。換言すれば、この記載は、明細書に記載されている発明であって、この出願では請求されていない発明の存在、すなわち、将来、分割出願されたり、補正により出現し、追加される発明の存在を否定するものではない。 Further, this description does not mean all the inventions described in the specification. In other words, this description is for the invention described in the specification and not claimed in this application, i.e., for the invention that will be applied for in the future or that will appear as a result of amendment and added. It does not deny existence.
本発明によれば、記録装置が提供される。この記録装置(例えば、図4のデジタルビデオカメラ100)は、ファイル記録媒体(例えば、図5のハードディスク173)の記録単位である第1の記録領域からなる第2の記録領域のそれぞれへのファイルの配置を示すファイル配置情報(例えば、図22の「FAT」302a)と共に、ファイル記録媒体にファイルを記録する記録装置であって、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報(例えば、図14の削除したファイルの先頭クラスタ番号A1)と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報(例えば、図14の先頭クラスタ番号A1のクラスタについてのエントリが記録されているセクタのアドレス)との記憶を制御する記憶制御手段(例えば、図6のページリスト生成更新部201)と、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しを制御する読み出し制御手段(例えば、図6のFAT読み出し部202)と、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録を制御する記録制御手段(例えば、図6の記録制御部205)とを含む。
According to the present invention, a recording apparatus is provided. This recording apparatus (for example, the
この記録装置は、記憶制御手段が、第1のアドレス情報および第2のアドレス情報をリスト(例えば、図6および図14のページリスト211)として記憶するように記憶を制御するようにすることができる。
In this recording apparatus, the storage control unit may control the storage so that the first address information and the second address information are stored as a list (for example, the
この記録装置は、リストには、第1のアドレス情報および第2のアドレス情報に対応して、空き領域の記録容量を示す情報(例えば、図14の“種別”)がさらに格納されているようにすることができる。 In this recording apparatus, the list further stores information indicating the recording capacity of the free area (for example, “type” in FIG. 14) corresponding to the first address information and the second address information. Can be.
この記録装置は、記録制御手段が、FAT(File Allocation Tables)ファイルシステムが適用されているファイル記録媒体にファイルが記録されている場合、ファイル記録媒体における、BPB(BIOS(Basic Input/Output System) Parameter Block)(例えば、図10のBPB301)と、FATが格納される領域(例えば、図10のFAT領域302)との間に設けられる領域にリストを記録するように、さらに記録を制御することができる。
In this recording apparatus, when a file is recorded on a file recording medium to which a FAT (File Allocation Tables) file system is applied, the recording control means uses a BPB (BIOS (Basic Input / Output System)) in the file recording medium. Parameter control (for example,
本発明によれば、記録方法が提供される。この記録方法は、ファイル記録媒体(例えば、図5のハードディスク173)の記録単位である第1の記録領域からなる第2の記録領域のそれぞれへのファイルの配置を示すファイル配置情報(例えば、図22の「FAT」302a)と共に、ファイル記録媒体にファイルを記録する記録装置(例えば、図4のデジタルビデオカメラ100)の記録方法であって、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報(例えば、図14の削除したファイルの先頭クラスタ番号A1)と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報(例えば、図14の先頭クラスタ番号A1のクラスタについてのエントリが記録されているセクタのアドレス)との記憶を制御する記憶制御ステップ(例えば、図16のステップS61)と、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しを制御する読み出し制御ステップ(例えば、図20のステップS144)と、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録を制御する記録制御ステップ(例えば、図20のステップS148)とを含む。
According to the present invention, a recording method is provided. In this recording method, file arrangement information (for example, FIG. 5) indicating the arrangement of files in each of the second recording areas consisting of the first recording area which is a recording unit of a file recording medium (for example, the
本発明によればプログラムが提供される。このプログラムは、ファイル記録媒体(例えば、図5のハードディスク173)の記録単位である第1の記録領域からなる第2の記録領域のそれぞれへのファイルの配置を示すファイル配置情報(例えば、図22の「FAT」302a)と共に、ファイル記録媒体にファイルを記録する記録処理をコンピュータに行わせるプログラムであって、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報(例えば、図14の削除したファイルの先頭クラスタ番号A1)と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報(例えば、図14の先頭クラスタ番号A1のクラスタについてのエントリが記録されているセクタのアドレス)との記憶を制御する記憶制御ステップ(例えば、図16のステップS61)と、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しを制御する読み出し制御ステップ(例えば、図20のステップS144)と、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録を制御する記録制御ステップ(例えば、図20のステップS148)とが実行される。
According to the present invention, a program is provided. This program stores file arrangement information (for example, FIG. 22) indicating the arrangement of files in each of the second recording areas including the first recording area which is a recording unit of a file recording medium (for example, the
このプログラムは、記録媒体(例えば、図4の磁気ディスク141)に記録することができる。
This program can be recorded on a recording medium (for example, the
以下に、本発明の実施の形態について図面を参照して説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図4は、本発明が適用したデジタルビデオカメラ100の構成例を示すブロック図である。
FIG. 4 is a block diagram showing a configuration example of the
CPU(Central Processing Unit)111は、例えば、組込型の汎用マイクロプロセッサなどからなり、デジタルビデオカメラ100の全体を制御する。CPU111には、ROM(Read Only Memory)112およびRAM(Random Access Memory)113が接続されている。例えば、CPU111は、ROM112に記憶されているプログラム、または、ハードディスクドライブ(以下、HDDと称する)114および後述するドライブ125に装着された磁気ディスク141、光ディスク142、光磁気ディスク143、および半導体メモリ144などからRAM113にロードしたプログラムを実行して、デジタルビデオカメラ100の全体の動作を制御する。RAM113にはまた、CPU111が各種の処理を実行する上において必要なデータなどが適宜記憶される。
A CPU (Central Processing Unit) 111 includes, for example, a built-in general-purpose microprocessor, and controls the entire
CPU111にはまた、カメラ機能部115および画像信号処理部116が接続されている。カメラ機能部115は、専用のIC(Integrated Circuit)などからなり、CPU111の制御を基に、光学レンズ部117を制御し、駆動する。例えば、カメラ機能部115は、CPU111の制御を基に、光学レンズ部117による被写体151の撮影動作を開始させたり、終了させたりする他、光学レンズ部117のズーム率、取り込む光量などを適宜制御する。
A
光学レンズ部117は、光学レンズおよび絞りなどからなり、被写体151の画像を光電変換部118(の受光部)に結像させる。
The
CCD(Charge Coupled Device)またはC-MOS(Complementary Metal-Oxide Semiconductor)センサなどの撮像素子により構成される光電変換部118は、光学レンズ部117によって結像された画像を電気信号に変換して、変換により生成したアナログの電気信号(被写体151の画像に対応する電気信号)を画像信号処理部116に供給する。画像信号処理部116は、CPU111の制御を基に、光電変換部118より供給された被写体151の画像に対応する電気信号に、所定の画像処理を適用する。
A
以下、電気信号を単に信号と称する。 Hereinafter, the electric signal is simply referred to as a signal.
具体的には、例えば、デジタルビデオカメラ100の画像信号処理部116は、被写体151の画像に対応するアナログの信号を、A/D(Analog to Digital)変換して、デジタルの画像データとし、その画像データに対して、例えば、ホワイトバランスの調整、欠陥画素の補間などの画像処理を適用した後、必要に応じてMPEG(Moving Picture Experts Group)方式等で圧縮符号化する。
Specifically, for example, the image
画像信号処理部116は、圧縮符号化した画像データをCPU111に供給する。
The image
すなわち、画像信号処理部116は、光電変換部118より供給された被写体151の画像に対応する信号を、所定のフォーマットの画像データに変換させて、CPU111に供給する。
That is, the image
CPU111は、画像信号処理部116より供給された画像データを、HDD114またはドライブ125に装着されている磁気ディスク141、光ディスク142、光磁気ディスク143、および半導体メモリ144などに記録させる。
The
また、画像信号処理部116は、ホワイトバランスを調整し、または欠陥画素を補間した画像データを液晶ディスプレイ119および画像入出部120に供給する。より具体的には、画像信号処理部116は、画像データを、液晶ディスプレイ119の入力方式である、例えば、RGB(Red,Green,Blue)信号に変換して、RGB信号を液晶ディスプレイ119に供給する。液晶ディスプレイ119は、画像信号処理部116より供給された信号に対応する画像(例えば、被写体151の撮像により取得された画像)を表示させる。
Further, the image
同様に、例えば、画像信号処理部116は、RGB信号を画像入出部120に供給する。
Similarly, for example, the image
さらに、画像信号処理部116は、CPU111を介して、HDD114および磁気ディスク141、光ディスク142、光磁気ディスク143、および半導体メモリ144に記録されている画像データを読み出して、読み出した画像データに対応する信号を液晶ディスプレイ119または画像入出力部120に供給する。
Further, the image
画像入出力部120は、例えばテレビジョン受像器などの外部の画像表示装置または画像記録再生装置などの機器に画像信号である信号を入力または出力するためのインタフェースである。
The image input /
CPU111にはまた、音声処理部121が接続されている。音声処理部121は、CPU111から供給された、HDD114および磁気ディスク141、光ディスク142、光磁気ディスク143、および半導体メモリ144に記録され、読み出された音声データに対して、所定の音声処理を適用する。また、音声処理部121は、音声入出力部122から供給された音声信号または音声データに音声処理を適用する。
An
音声処理部121は、音声処理を適用した結果得られた音声データまたは音声信号をCPU111または音声入出力部122に供給する。
The
音声入出力部122は、マイクロフォン、スピーカ、および外部の機器とのインタフェースである。例えば、音声入出力部122は、音声処理部121より供給された電気信号を図示せぬテレビジョン受像器などの外部の機器に供給する。また、音声入出力部122は、図示せぬ機器から供給される音声信号を取得して、取得した音声信号を音声処理部121に供給する。
The voice input /
また、音声入出力部122は、例えば、光学レンズ部117や光電変換部118が被写体151を撮影している場合、その被写体151自身またはその周辺で発生された音声を取得し、音声信号に変換して音声処理部121に供給する。
In addition, for example, when the
音声信号処理部121は、音声入出力部122から供給された音声信号に、所定の音声処理を行い、所定の音声処理を行った音声データをCPU111の制御の基、HDD114および磁気ディスク141、光ディスク142、光磁気ディスク143、および半導体メモリ144に供給し、記録させる。
The audio
CPU111にはさらにまた、操作入力部123、および通信部124が接続されている。
Further, an
操作入力部123は、ボタン、スイッチ、もしくはリモートコントローラなどにより構成され、ユーザにより、所定の指令に対応する操作入力が行われた場合、その操作入力に対応する信号をCPU111に供給する。CPU111は、操作入力部123より供給された信号に対応する処理を実行する。
The
通信部124は、CPU111の制御を基に、図示せぬ他の情報処理装置との通信処理を実行する。すなわち、通信部124は、画像信号処理部116より出力された画像データ等の様々な情報を他の情報処理装置に送信するとともに、他の情報処理装置より送信された画像データ、またはプログラム等の様々な情報を受信する。例えば、通信部124が画像データを受信した場合、CPU111は、それをRAM113やドライブ125に装着された磁気ディスク141、光ディスク142、光磁気ディスク143、および半導体メモリ144に記憶させる。また、例えば、通信部124がプログラムを受信した場合、CPU111は、それをRAM113にロードする。
The
なお、通信部124は、無線または有線による通信を行うものでもよいし、無線と有線の両方の通信が可能なものでもよい。さらに、その通信方式も特に限定されず、例えば、無線の場合、IEEE(The Institute of Electrical and Electronic Engineers)802.11a,802.11b、および802.11gなどの無線LAN(Local Area Network)、またはBluetooth等様々な無線通信方式が利用可能である。同様に、有線の場合も、Ethernet(登録商標)やUSB(Universal Serial Bus)等様々な有線通信方式が利用可能である。
Note that the
ドライブ125は、CPU111の制御を基に、装着されている磁気ディスク141、光ディスク142、光磁気ディスク143、および半導体メモリ144に記録されているプログラムまたはデータを読み出し、読み出したプログラムまたはデータをCPU111に供給する。また、CPU111より供給されたデータを、ドライブ125に装着される磁気ディスク141、光ディスク142、光磁気ディスク143、および半導体メモリ144に記録させる。
The
電源126は、デジタルビデオカメラ100の各部に必要な電力を供給する。
The
図5は、CPU111により実行されるアプリケーションプログラム171、オペレーティングシステム(以下、OSと称する)172、およびハードディスク173の関係を示す図である。OS172には、ファイルシステム181およびデバイスドライバ182を含む。
FIG. 5 is a diagram showing a relationship among an
アプリケーションプログラム171は、各種の処理を実行して、ファイルの記録およびファイルの読み出しをオペレーティングシステム172に要求する。オペレーティングシステム172は、いわゆる基本プログラムであり、例えば、デジタルビデオカメラ100のハードウェアなどのリソースの取り扱いを制御する。
The
ハードディスク173は、HDD114に内蔵されている磁気ディスクである記録媒体である。
The
ファイルシステム181は、例えば、FATファイルシステム(FAT32)であり、クラスタの連鎖情報を保持し、ハードディスク173に記録されているデータを管理する。デバイスドライバ182は、HDD114の動作に必要な情報をOS172に供給し、ハードディスク173へのデータの記録またはハードディスク173に記録されているデータの読み出しなど、HDD114の動作を制御する。
The
アプリケーションプログラム171は、OS172のファイルシステム181に対して、ファイル単位(レベル)でのアクセス(読み出しまたは書き込み)を要求(指示)する。ファイルシステム181は、アプリケーションプログラム171からファイルへのアクセスが要求された場合、デバイスドライバ182に対して、ファイルの実データが記録されているクラスタ単位のアクセスを要求する。デバイスドライバ182は、ファイルシステム181からクラスタ単位のアクセスが要求された場合、HDD114に対して、セクタ(ハードディスク173の記録単位)単位のアクセスを要求する。このとき、ハードディスク173において、クラスタは、ファイルシステム181(FAT32)におけるデータを管理可能な最小単位であり、セクタのサイズ=512バイトをn(n=1,2,4,・・・,64,128)個集めた構成となる。
The
HDD114は、デバイスドライバ182からセクタ単位のアクセスが要求された場合、デバイスドライバ182に対し、セクタ単位でのアクセスの要求に対する応答を行う。例えば、HDD114は、デバイスドライバ182からセクタ単位の読み出しが要求された場合、セクタ毎に記録されているデータをデバイスドライバ182に供給する。
When an access in units of sectors is requested from the
デバイスドライバ182は、ファイルシステム181に対し、クラスタ単位でのアクセスの要求に対する応答を行う。例えば、デバイスドライバ182は、ファイルシステム181に対し、クラスタ毎に記録されている実データをファイルシステム181に供給する。ファイルシステム181は、アプリケーションプログラム171に対して、ファイル単位でのアクセスの要求に対する応答を行う。例えば、ファイルシステム181は、ファイルをアプリケーションプログラム171に供給する。
The
図6は、ファイルシステム181のより詳細な構成を説明するブロック図である。ファイルシステム181には、ページ管理プログラム191が含まれている。
FIG. 6 is a block diagram illustrating a more detailed configuration of the
ページ管理プログラム191は、さらに、ページリスト生成更新部201、FAT読み出し部202、記録容量算出部203、判定部204、記録制御部205、およびページリスト211を含む。ページリスト211には、空いている領域の先頭に配置されているクラスタのアドレスと、このアドレスに対応する、図11を参照して後述するエントリ321が格納されているセクタのアドレスとが対応して格納されている。なお、ページリスト211の詳細は、図14を参照して後述する。
The
ページリスト生成更新部201は、ページリスト211に格納されているFATの空き領域情報および記録制御部205より供給された格納状況の情報を基に、ページリストを生成するか、または更新する。ページリスト生成更新部201は、生成または更新したページリスト211を出力(格納)する。
The page list generation / updating
FAT読み出し部202は、記録容量算出部203より供給された記録容量およびページリスト211の空き領域情報を基に、空き領域を有するFATをページ単位で読み出す。FAT読み出し部202は、ページの空き領域を示す情報を記録容量算出部203に出力する。
The
記録容量算出部203は、FAT読み出し部202より供給された空き領域を示す情報を基に、空き領域の記録容量を算出する処理を実行し、算出した記録容量を判定部204に出力する。
The recording
判定部204は、記録容量算出部203より供給された記録容量が、記録されるファイルのデータ量より大きいか否かを判定する処理を実行し、判定結果をFAT読み出し部202および記録制御部205に出力する。
The
記録制御部205は、判定部204より供給された判定結果を基に、ファイルの記録を制御する。記録制御部205は、FATにおけるクラスタ番号の格納状況をページリスト生成更新部201に出力する。
The
次に、図7乃至図12を参照して、FAT方式によりフォーマットされているハードディスク173について説明する。
Next, the
図7は、MBR(Master Boot Record)およびパーティションを説明する図である。ハードディスク173の先頭のセクタ221(LBA(Logical Block Addressing)=0のセクタ)は、デジタルビデオカメラ100を起動させる場合、ハードディスク173に記録されているオペレーティングシステム172を実行させるためのMBR231とされる。
FIG. 7 is a diagram for explaining MBR (Master Boot Record) and partitions. The first sector 221 (LBA (Logical Block Addressing) = 0 sector) of the
MBR231には、いわゆる、アクティブであるパーティションを示すコードなどを含む起動コード領域251、並びに各パーティションの先頭のLBA(図中の矢印で示す位置)および各パーティションのサイズなどを示すパーティションテーブル252が配置される。
The
先頭セクタ221に続いて、所定の数のセクタからなる空き領域222が配置される。
Following the
さらに、空き領域222に続いて、ファイルなどが記録されるデータ領域223が配置される。データ領域223は、最大で4個のパーティション(パーティション241乃至パーティション244)に区分可能とされている。
Further, a
なお、以下、パーティションテーブル252に、1つのパーティション(パーティション241のみ)が登録されたハードディスク173、すなわち、データ領域223が、1つのパーティション(パーティション241)のみから構成されるハードディスク173を例に説明する。
Hereinafter, the
図8に示されるように、MBR231である512バイトからなる先頭クラスタには、446バイトの起動コード領域251、64バイトのパーティションテーブル252、および2バイトの情報261が配置される。起動コード領域251は、クラスタの先頭の0バイト目から始まる445バイト目までの領域であり、アクティブなパーティションから起動用のプログラムを読み込むためのマスタブートコード(Master Boot Code(Initial Program Loaderとも呼ばれる))が記録されている。446バイト目から始まる64バイト分の領域からなるパーティションテーブル252、および最後の2バイトの情報261から構成されている。
As shown in FIG. 8, a 446-byte
パーティションテーブル252は、クラスタの先頭から446バイト目から始まり、個々のパーティションに対応するパーティション情報(パーティションの開始アドレスとサイズ)を記録する。すなわち、例えば、1個のパーティションが登録されている場合、図9に示されるように、16バイトのパーティション情報(パーティションテーブル252のエントリ)271が、パーティションテーブル252に保存される。具体的には、パーティション情報271には、先頭から順に、1バイトのフラグ281,3バイトの開始セクタ(CHS(Cylinder/Head/Sector))282,1バイトのタイプ283,3バイトの終了セクタ(CHS)284,4バイトの開始セクタ(LBA)285、および4バイトのパーティションサイズ286が格納されている。
The partition table 252 records partition information (partition start address and size) corresponding to each partition, starting from the 446th byte from the top of the cluster. That is, for example, when one partition is registered, 16-byte partition information (partition table 252 entry) 271 is stored in the partition table 252 as shown in FIG. Specifically, in the
フラグ281は、パーティションがアクティブであるか否かを示す、いわゆる起動フラグである。例えば、“00h”であるフラグ281は、そのパーティションがノンアクティブである(いわゆる起動パーティションでない)ことを示し、“80h”であるフラグ281は、そのパーティションがアクティブである(いわゆる起動パーティションである)ことを示す。なお、“00h”や“80h”の「h(hexadecimal number)」は、“00”や“80”が16進数で表現されていることを示している。以下、同様に、「h」が付加されている値は、16進数で表現されていることを示す。
The
開始セクタ282は、シリンダ/ヘッド/セクタという3つのパラメータで、パーティションの先頭のセクタのアドレスを示す。タイプ283は、そのパーティションがフォーマットされているファイルシステムの方式を示す。例えば、“80h”であるタイプ283は、FAT32であることを示す。
The
終了セクタ284は、シリンダ/ヘッド/セクタという3つのパラメータで、パーティションの最後のセクタのアドレスを示す。開始セクタ285は、LBAによる、パーティションの先頭のセクタのアドレスを示す。パーティションサイズ286は、パーティションに含まれるセクタの総数を示す。
The
MBR231の最後の2バイトの情報261、すなわち「55h」、および「AAh」は、パーティションテーブル252の終端を示す情報である。
The last two bytes of
次に、図10を参照して、データ領域223のパーティション241の詳細な構成例について説明する。図10に示されるように、パーティション241は、BPB(BIOS(Basic Input Output System) Parameter Block)301,FAT領域302,FAT領域303、およびデータ領域304から構成されている。
Next, a detailed configuration example of the
BPB301には、パーティション241における1クラスタあたりのセクタ数など、パーティション241の論理的な属性が記録されている。
In the
FAT領域302は、ハードディスク173に記録される実データのクラスタの配列が記録される領域であり、FAT領域303は、FAT領域302のバックアップなどのために利用されるFAT領域302の予備の領域である。
The
データ領域304は、各ファイルのそれぞれのデータ(ディレクトリエントリや実データ)が実際に記録される領域である。
The
図11は、FAT領域302に格納されている、FAT32であるFATの例を示す図である。なお、FAT32の詳細は、「Microsoft Extensible Firmware Initiative FAT32 File System Specification」に開示されている。図11において、上から2行目乃至5行目における、左から2列目乃至17列目の個々の四角は、1つのエントリ321を示す。FAT32のエントリ321の中の数字は、次のFATエントリの番号を表している。なお、図11において、「00000000h」または「00000001h」のアドレスのエントリ321に格納されている「RSV」は、「00000000h」または「00000001h」のクラスタ番号のクラスタがWindows(登録商標)において使用される領域であることを示す。EOF(End Of File)は、ファイルの終点を表し、「−」は、「00000000h」を意味し、「未使用」を表している。
FIG. 11 is a diagram illustrating an example of a FAT that is FAT32 stored in the
図11で示されるFATの例において、4つのファイルが格納される実データが記録されているクラスタのアドレスが示されている。詳細は後述するが、ディレクトリエントリにおいて、先頭クラスタ番号として、「00000007h」が示されている場合、「00000007h」のアドレスのエントリ321には「00000008h」が格納され、「00000008h」のアドレスのエントリ321には「00000009h」が格納され、「00000009h」のアドレスのエントリ321には「EOF」が格納されているので、「00000007h」のクラスタ番号のクラスタ、「00000008h」のクラスタ番号のクラスタ、および「00000009h」のクラスタ番号のクラスタに、先頭クラスタ番号として、「00000007h」が示されているディレクトリエントリに関係するファイルの実データが順に記録されている。
In the example of FAT shown in FIG. 11, the addresses of clusters in which actual data storing four files are recorded are shown. Although details will be described later, when “00000007h” is indicated as the first cluster number in the directory entry, “00000008h” is stored in the
ディレクトリエントリにおいて、先頭クラスタ番号として、「0000000Ah」が示されている場合、「0000000Ah」のアドレスのエントリ321には「0000001Fh」が格納され、「0000001Fh」のアドレスのエントリ321には「00000025h」が格納され、「00000025h」のアドレスのエントリ321には「00000031h」が格納され、「00000031h」のアドレスのエントリ321には「00000030h」が格納され、「00000030h」のアドレスのエントリ321には「EOF」が格納されているので、「0000000Ah」のクラスタ番号のクラスタ、「0000001Fh」のクラスタ番号のクラスタ、「00000025h」のクラスタ番号のクラスタ、「00000031h」のクラスタ番号のクラスタ、および「00000030h」のクラスタ番号のクラスタに、先頭クラスタ番号として、「0000000Ah」が示されているディレクトリエントリに関係するファイルの実データが順に記録されている。
When “0000000Ah” is indicated as the first cluster number in the directory entry, “0000001Fh” is stored in the
ディレクトリエントリにおいて、先頭クラスタ番号として、「0000001Bh」が示されている場合、「0000001Bh」のアドレスのエントリ321には「00000011h」が格納され、「00000011h」のアドレスのエントリ321には「00000012h」が格納され、「00000012h」のアドレスのエントリ321には「00000013h」が格納され、「00000013h」のアドレスのエントリ321には「00000014h」が格納され、「00000014h」のアドレスのエントリ321には「00000003h」が格納され、「00000003h」のアドレスのエントリ321には、「EOF」が格納されているので、「0000001Bh」のクラスタ番号のクラスタ、「00000011h」のクラスタ番号のクラスタ、「00000012h」のクラスタ番号のクラスタ、「00000013h」のクラスタ番号のクラスタ、「00000014h」のクラスタ番号のクラスタ、および「00000003h」のクラスタ番号のクラスタに、先頭クラスタ番号として、「0000001Bh」が示されているディレクトリエントリに関係するファイルの実データが順に記録されている。
When “0000001Bh” is indicated as the first cluster number in the directory entry, “00000011h” is stored in the
さらに、また、ディレクトリエントリにおいて、先頭クラスタ番号として、「0000002Ch」が示されている場合、「0000002Ch」のアドレスのエントリ321には「0000002Dh」が格納され、「0000002Dh」のアドレスのエントリ321には「0000002Eh」が格納され、「0000002Eh」のアドレスのエントリ321には「0000002Fh」が格納され、「0000002Fh」のアドレスのエントリ321には「00000038h」が格納され、「00000038h」のアドレスのエントリ321には「00000039h」が格納され、「00000039h」のアドレスのエントリ321には、「0000003Ah」が格納され、「0000003Ah」のアドレスのエントリ321には「0000003Bh」が格納され、「0000003Bh」のアドレスのエントリ321には「EOF」が格納されているので、「0000002Ch」のクラスタ番号のクラスタ、「0000002Dh」のクラスタ番号のクラスタ、「0000002Eh」のクラスタ番号のクラスタ、「0000002Fh」のクラスタ番号のクラスタ、「00000038h」のクラスタ番号のクラスタ、「00000039h」のクラスタ番号のクラスタ、「0000003Ah」のクラスタ番号のクラスタ、および「0000003Bh」のクラスタ番号のクラスタに、先頭クラスタ番号として、「0000002Ch」が示されているディレクトリエントリに関係するファイルの実データが順に記録されている。
Furthermore, if “0000002Ch” is indicated as the first cluster number in the directory entry, “0000002Dh” is stored in the
図12は、FAT32におけるファイルに関係するディレクトリエントリの構造の例を示す図である。なお、図中の0乃至1Fは、0を始点としてディレクトリエントリにおけるバイト数を表わす16進数である。なお、ディレクトリエントリにおけるバイト数を、1を始点とする10進数で表わした場合、0乃至1Fは、それぞれ、1乃至32で表わされる。 FIG. 12 is a diagram illustrating an example of the structure of a directory entry related to a file in FAT32. In the figure, 0 to 1F are hexadecimal numbers representing the number of bytes in the directory entry starting from 0. When the number of bytes in the directory entry is represented by a decimal number starting from 1, 0 to 1F are represented by 1 to 32, respectively.
ディレクトリエントリの先頭に配置される、7バイトの名前331は、ファイル名を示す。名前331に続く、3バイトの拡張名332は、いわゆる、ファイルの拡張子(例えば、MPEG2(Moving Picture Experts Group phase 2)フォーマットの場合は「mpg」、MP3(MPEG Audio Layer-3)フォーマットの場合は「mp3」)を示す。また、拡張名332に続く、1バイトの属性333は、ファイルの属性を示す。ファイルの属性は、例えば、読み取り専用ファイルまたは隠しファイルなどを示す。属性333に続く、1バイトの予約領域334は、未使用の領域である。
A 7-
予約領域334に続く、3バイトの作成時刻335は、ファイルが作成された時刻を示す。作成時刻335に続く、2バイトの作成日付336は、ファイルが作成された日付を示す。作成日付336に続く、2バイトの最終アクセス日付337は、ファイルにアクセスされた最終の日付を示す。
A 3-
先頭クラスタの番号(位置)は、先頭クラスタの番号の上位を示す2バイトの先頭クラスタ番号(High)338と、先頭クラスタの番号の下位を示す2バイトの先頭クラスタ番号(Low)341とに、分けて配置される。すなわち、先頭クラスタの番号(位置)は、32ビットで示される。そのファイルのサイズは、4バイトのファイルサイズ342に記憶される。
The number (position) of the first cluster is divided into a 2-byte first cluster number (High) 338 indicating the higher order of the first cluster number and a 2-byte first cluster number (Low) 341 indicating the lower order of the first cluster number. It is arranged separately. That is, the number (position) of the leading cluster is indicated by 32 bits. The size of the file is stored in a
2バイトの記録時刻339は、ファイルが記録された時刻、すなわち、ファイルが最後に更新された時刻(最後に書き込まれた時刻)を示す。2バイトの記録日付340は、ファイルが記録された日付、すなわち、ファイルが最後に更新された日付(最後に書き込まれた日付)を示す。
The 2-
ディレクトリエントリにおいて、最終アクセス日付337に続いて、先頭クラスタ番号(High)338、記録時刻339、記録日付340、先頭クラスタ番号(Low)341、およびファイルサイズ342が順に配置される。
In the directory entry, following the
次に、図13のフローチャートを参照して、オペレーティングシステム172を実行するデジタルビデオカメラ100による、ページリスト211の作成の処理を説明する。なお、このページリスト211の作成の処理は、デジタルビデオカメラ100が初めて起動される場合、またはハードディスク173のフォーマットがユーザによって指示された場合に開始される。
Next, the process of creating the
ステップS31において、OS172は、デジタルビデオカメラ100のデータ記録方式を基に、ハードディスク173に対してフォーマットを実行する。
In step S <b> 31, the
ステップS32において、ページリスト生成更新部201は、最終クラスタのクラスタ番号(以下、最終クラスタ番号とも称する)を読み出す。すなわち、BPB301内の「FSInfo」が格納されているセクタから、データ領域304における最終クラスタ番号が読み出される。なお、最終クラスタとは、ファイルに対応する実データが記録されたデータ領域304におけるクラスタの中で、最後に実データが記録されたクラスタをいう。なお、この場合、ハードディスク173にはファイル(実データ)がまだ記録されていないので、読み出される最終クラスタのクラスタ番号は、データ領域304の先頭のクラスタの1つ前のクラスタの番号である。
In step S32, the page list generation / updating
さらに、ページリスト生成更新部201は、読み出した最終クラスタ番号に1を加算して、データ領域304の先頭のクラスタを示す先頭クラスタ番号を算出する。
Further, the page list generation / updating
ステップS33において、ページリスト生成更新部201は、最終クラスタ番号に1を足したクラスタ番号(最終クラスタ番号+1)、すなわち先頭クラスタ番号のクラスタについてのエントリ321が記録されている、FAT領域302におけるセクタのアドレスを検出する。例えば、先頭クラスタ番号で示されるクラスタについてのエントリ321が記録されているセクタのアドレスは、LBAを基に検出される。
In step S33, the page list generating / updating
ステップS34において、ページリスト生成更新部201は、種別に「3」を設定する。詳細は後述するが、種別は、空き領域の記録容量の大きさを示す情報である。なお、ステップS34において、デフォルト値としての「3」が種別に設定される。
In step S34, the page list generation / updating
ステップS35において、ページリスト生成更新部201は、ステップS32の処理で読み出した最終クラスタ番号に1を加算して求めた空き領域の先頭クラスタ番号、ステップS33の処理で検出したセクタのアドレス、およびステップS34の処理で設定した種別を基に、ページリスト211を作成し、処理は終了する。作成されたページリスト211は、RAM113に保持される。
In step S35, the page list generating / updating
ステップS35の処理により、データ領域304の先頭のクラスタを示す先頭クラスタ番号、先頭クラスタ番号で示されるクラスタについてのエントリ321が格納されているセクタのアドレス、および先頭クラスタ番号で示されるクラスタを先頭クラスタとする空き領域(データ領域304)の記録容量の大きさを示す種別を1組として含むページリスト211が作成される。
As a result of the processing in step S35, the leading cluster number indicating the leading cluster of the
後述するページリスト211の更新の処理によって、ページリスト211が更新される。
The
図14は、図13のフローチャートで示される処理によって作成され、さらに更新されたページリスト211の例を示す図である。図14で示されるページリスト211の例において、1つの空き領域に対して、先頭クラスタ番号とセクタのアドレスと種別とが1行に(図中の横方向に)、先頭クラスタ番号順に配置されている。以下、1つの空き領域に対する、先頭クラスタ番号とセクタのアドレスと種別とからなる情報の組を空き領域情報とも称する。
FIG. 14 is a diagram showing an example of the
図14のページリスト211の例において、左側の列には、空き領域の先頭のクラスタ(のアドレス)を示す先頭クラスタ番号が配置され、左から2番目の列には、セクタのアドレス(LBA)が配置され、左から3番目の列には、種別が配置されている。
In the example of the
例えば、種別には、0乃至3のうちのいずれか1つの値が設定される。より大きい種別の値は、空き領域の記録容量がより大きいことを示す。すなわち、“0”である種別で示される空き領域の記録容量は、“1”である種別で示される空き領域の記録容量より小さく、“1”である種別で示される空き領域の記録容量は、“2”である種別で示される空き領域の記録容量より小さく、“2”である種別で示される空き領域の記録容量は、“3”である種別で示される空き領域の記録容量より小さい。 For example, any one value of 0 to 3 is set as the type. A larger type value indicates that the recording capacity of the free area is larger. That is, the recording capacity of the free area indicated by the type “0” is smaller than the recording capacity of the free area indicated by the type “1”, and the recording capacity of the free area indicated by the type “1” is The recording capacity of the free area indicated by the type “2” is smaller than the recording capacity of the free area indicated by the type “2”. .
図14で示されるページリスト211における、先頭クラスタ番号は、空き領域の先頭のクラスタの位置を示す。図14で示されるページリスト211における、セクタのアドレスは、先頭クラスタ番号で示されるクラスタについてのエントリ321が格納されているセクタのアドレスを示す。また、図14で示されるページリスト211における、種別は、先頭クラスタ番号で示されるクラスタを先頭クラスタとする空き領域の記録容量の大きさを示す。
The head cluster number in the
図14のページリスト211の最も下の行には、データ領域304の後側に配置されている、まだファイルの記録に利用されていない空き領域についての、先頭クラスタ番号とセクタのアドレスと種別とが1行に(図中の横方向に)、先頭クラスタ番号順に配置されている。すなわち、図14のページリスト211の最も下の行には、「使用済みクラスタ番号+1」である先頭クラスタ番号、「使用済みクラスタ番号+1」である先頭クラスタ番号で示されるクラスタについてのエントリ321が格納されているセクタのアドレス、および「使用済みクラスタ番号+1」以降のクラスタ番号のクラスタの空き領域の記録容量の大きさを示す「3」である種別が配置される。使用済みクラスタ番号は、データ領域304において、ファイルの実データが格納されたクラスタのアドレスのうち、最大のアドレスを示す。
The bottom line of the
図14のページリスト211の上から1行目乃至上からn行目には、先頭クラスタ番号順に、1つの空き領域毎に、その空き領域についての、先頭クラスタ番号とセクタのアドレスと種別とが1行に配置されている。例えば、図14のページリスト211の上から1行目には、先頭クラスタ番号A1乃至Anの中で最も小さい値である先頭クラスタ番号A1、先頭クラスタ番号A1で示されるクラスタについてのエントリ321が格納されているセクタのアドレス、および先頭クラスタ番号A1以降のクラスタの空き領域の記録容量の大きさを示す「2」である種別が配置される。図14のページリスト211の上から2行目には、先頭クラスタ番号A1の次に大きい値である先頭クラスタ番号A2、先頭クラスタ番号A2で示されるクラスタについてのエントリ321が格納されているセクタのアドレス、および先頭クラスタ番号A2以降のクラスタの空き領域の記録容量の大きさを示す「1」である種別が配置される。
In the first to top lines from the top to the n-th line of the
同様に、空き領域の先頭のクラスタのアドレスが先頭クラスタ番号A3乃至A(n-1)である空き領域について、1つの空き領域毎に、その空き領域についての、先頭クラスタ番号とセクタのアドレスと種別とが1行に配置される。 Similarly, for the empty area whose first cluster address in the empty area is the first cluster number A 3 to A (n-1) , for each empty area, the first cluster number and the sector address for that empty area And type are arranged in one line.
そして、図14のページリスト211の下から2行目には、先頭クラスタ番号A1乃至Anの中で最も大きい値である先頭クラスタ番号An、先頭クラスタ番号Anで示されるクラスタについてのエントリ321が格納されているセクタのアドレス、および先頭クラスタ番号An以降のクラスタの空き領域の記録容量の大きさを示す「1」である種別が配置される。
Then, in the second row from the bottom of the
次に、図15のフローチャートを参照してページリスト211の記録の処理を説明する。
Next, the process of recording the
ステップS51において、OS172は、操作入力部123からのユーザの操作に対応した信号を基に、デジタルビデオカメラ100の停止(電源のオフ)が指示されたか否かを判定する。ステップS51において、デジタルビデオカメラ100の停止が指示されていないと判定された場合、ステップS51に戻り、停止が指示されるまで判定の処理が繰り返される。
In step S <b> 51, the
ステップS51において、デジタルビデオカメラ100の停止が指示されたと判定された場合(電源がオフにされた場合)、ステップS52に進み、記録制御部205は、図13のステップS35の処理により作成され、RAM113に保持されているページリスト211をハードディスク173に記録し、ページリスト211の記録の処理は終了する。
If it is determined in step S51 that the stop of the
なお、ハードディスク173における、ページリスト211の記録場所としては、例えば、図10で示されるBPB301とFAT領域302との間に、数セクタまたは数十セクタの領域を設けることが可能であるため、その領域(BPB301が記録されているセクタの次のセクタ以降のセクタ)にページリスト211が記録される。
As the recording location of the
図16のフローチャートを参照して、ハードディスク173に記録されているページリスト211の読み出しの処理を説明する。このページリスト211の読み出しの処理は、デジタルビデオカメラ100が起動された場合、実行される。
A process of reading the
FAT読み出し部202は、ステップS61において、ハードディスク173に記録されているページリスト211を読み出して、メモリであるRAM113に記憶させる。例えば、FAT読み出し部202は、ページリスト211が記録されている、予め決められている記録先のセクタにおける先頭のセクタへアクセスし、記録されているページリスト211を読み出す。
In step S61, the
すなわち、例えば、図10で示されるハードディスク173のパーティション241において、上述したように、BPB301とFAT領域302との間にページリスト211が記録されている場合、ステップS61において、BPB301が記録されているセクタの次のセクタにアクセスされ、ページリスト211が読み出され、読み出されたページリスト211がRAM113に供給される。
That is, for example, in the
ステップS63において、FAT読み出し部202は、ページリスト211に格納されている空き領域情報の数を求めて、処理は終了する。
In step S63, the
ここで、図17のフローチャートを参照して、ページリスト211の更新の処理を説明する。この処理は、ユーザによって、ファイルの削除または記録が指示された場合に開始される。
Here, the process of updating the
ステップS81において、OS172は、ユーザの操作に対応した操作入力部123からの信号を基に、ファイルの削除が指示されたか否かを判定する。ステップS81において、ファイルの削除が指示されたと判定された場合、ステップS82に進み、ページリスト生成更新部201は、削除されるファイルのディレクトリエントリから先頭のクラスタの番号を読み出す。すなわち、図12で示されるディレクトリエントリの先頭クラスタ番号(High)338および先頭クラスタ番号(Low)341が読み出される。
In step S <b> 81, the
ステップS83において、ページリスト生成更新部201は、FAT領域302において、ステップS82の処理により読み出されたファイルの先頭のクラスタの番号で示されるクラスタについてのエントリ321が記録されている、セクタのアドレス(例えば、LBAに基づく、セクタのアドレス(番号))を検出する。
In step S83, the page list generating / updating
ステップS84において、ページリスト生成更新部201は、データ領域304において、ファイルを削除することによりできる(空く)、空き領域のクラスタの数を算出する。図10で示されるデータ領域304において、削除の対象とされているファイルの実データが記録されているクラスタの数が算出される。
In step S <b> 84, the page list generation / updating
ステップS85において、空き領域の記録容量に対する、種別の設定の処理が実行される。この種別の設定の処理は、図18のフローチャートを参照して後述するが、この処理により、種別が設定される。例えば、削除されるファイルの実データが記録されているクラスタの数を基に、そのクラスタの数の大きさ、すなわち、ファイルを削除することによって生じる空き領域の記録容量の大きさを識別するための種別(を示す符号)が設定される。 In step S85, a type setting process is executed for the recording capacity of the free area. The type setting process will be described later with reference to the flowchart of FIG. 18, and the type is set by this process. For example, based on the number of clusters in which the actual data of the file to be deleted is recorded, to identify the size of the number of clusters, that is, the size of the recording capacity of the free space generated by deleting the file Is set.
ステップS86において、ページリスト生成更新部201は、ページリスト211に、ステップS82の処理により読み出された先頭クラスタ番号、ステップS83の処理により検出されたセクタのアドレス(番号)、およびステップS85の処理により設定された種別(空き領域情報)を記録する。
In step S86, the page list generating / updating
なお、種別は、削除されたファイル(データ)の種類に応じて、例えば、動画像ファイル、静止画像ファイル、および音声ファイルなどのファイルの種類に応じて設定されるようにしてもよい。 The type may be set according to the type of file (data) deleted, for example, according to the type of file such as a moving image file, a still image file, and an audio file.
ステップS87において、記録制御部205は、ファイルを削除し、ページリスト211の更新の処理は終了する。すなわち、削除が指示されたファイルのディレクトリエントリが削除され、処理は終了する。
In step S87, the
一方、ステップS81において、ファイルの削除が指示されていないと判定された場合、すなわち、ファイルの記録が指示された場合、手続きは、ステップS88に進み、ファイルのデータ量に対する閾値の設定の処理が実行される。その詳細は、図19のフローチャートを参照して後述するが、この処理により、記録されるファイルのデータ量に応じた閾値が設定される。 On the other hand, if it is determined in step S81 that deletion of the file is not instructed, that is, if recording of the file is instructed, the procedure proceeds to step S88, and processing for setting a threshold for the data amount of the file is performed. Executed. Although details will be described later with reference to the flowchart of FIG. 19, a threshold corresponding to the data amount of the file to be recorded is set by this processing.
ステップS88の処理の後、手続きは、ステップS89に進み、ステップS88の処理で設定された閾値を使用した、ファイルの記録の処理が実行され、処理は終了する。このファイルの記録の処理は、図20および図21のフローチャートを参照して後述するが、この処理により、ファイルがハードディスク173に記録される。
After the process of step S88, the procedure proceeds to step S89, a file recording process is executed using the threshold set in the process of step S88, and the process ends. The file recording process will be described later with reference to the flowcharts of FIGS. 20 and 21, and the file is recorded on the
なお、ファイルの移動は、移動されるファイルのコピーであるファイルが記録されてから、元のファイルが削除されるので、ファイルを移動した場合、ステップS82乃至ステップS86の処理が実行され、移動されるファイルに対応した空き領域情報がページリスト211に格納される。
In addition, since the original file is deleted after the file that is a copy of the file to be moved is recorded, when the file is moved, the process of steps S82 to S86 is executed and moved. The free space information corresponding to the file to be stored is stored in the
図18のフローチャートを参照して、図17のステップS85に対応する、空き領域の記録容量に対する種別の設定の処理を説明する。なお、ステップS101、ステップS103、およびステップS105のそれぞれの処理で使用される閾値THa、閾値THb、および閾値THcは、閾値THa>閾値THb>閾値THcの関係を満たす。 With reference to the flowchart of FIG. 18, the processing for setting the type for the recording capacity of the free area corresponding to step S85 of FIG. 17 will be described. Note that the threshold value THa, the threshold value THb, and the threshold value THc used in the processes of step S101, step S103, and step S105 satisfy the relationship of threshold value THa> threshold value THb> threshold value THc.
ステップS101において、ページリスト生成更新部201は、図17のステップS84の処理で算出したクラスタの数が、予め定められた閾値THa以上であるか否かを判定する。ステップS101において、クラスタの数が、閾値THa以上であると判定された場合、ステップS102に進み、ページリスト生成更新部201は、種別に「3」を設定し、処理は終了する。
In step S101, the page list generation / updating
ステップS101において、クラスタの数が、閾値THa以上ではない(閾値THa未満である)と判定された場合、ステップS103に進み、ページリスト生成更新部201は、クラスタの数が、予め定められた閾値THb以上であるか否かを判定する。ステップS103において、クラスタの数が、閾値THb以上であると判定された場合、ステップS104に進み、ページリスト生成更新部201は、種別に「2」を設定し、処理は終了する。
If it is determined in step S101 that the number of clusters is not equal to or greater than the threshold value THa (is less than the threshold value THa), the process proceeds to step S103, and the page list generation /
ステップS103において、クラスタの数が、閾値THb以上ではない(閾値THb未満である)と判定された場合、ステップS105に進み、ページリスト生成更新部201は、クラスタの数が、予め定められた閾値THc以上であるか否かを判定する。ステップS105において、クラスタの数が、閾値THc以上であると判定された場合、ステップS106に進み、ページリスト生成更新部201は、種別に「1」を設定し、処理は終了する。
If it is determined in step S103 that the number of clusters is not equal to or greater than the threshold value THb (is less than the threshold value THb), the process proceeds to step S105, and the page list generation / updating
ステップS105において、クラスタの数が、予め定められた閾値THc以上ではない(閾値THc未満である)と判定された場合、ステップS107に進み、ページリスト生成更新部201は、種別に「0」を設定し、処理は終了する。
If it is determined in step S105 that the number of clusters is not equal to or greater than a predetermined threshold THc (less than the threshold THc), the process proceeds to step S107, and the page list generation / updating
以上の処理により、削除されるファイルに対し、ファイルの実データが記録されているクラスタの数が大きい順(ファイルが削除されることによって生成される空き領域の記録容量が大きい順)に、種別に「3」,「2」,「1」、または「0」が設定される。 As a result of the above processing, the type of the file to be deleted is sorted in descending order of the number of clusters in which the actual data of the file is recorded (in order of increasing recording capacity of the free area generated by deleting the file). Is set to “3”, “2”, “1”, or “0”.
次に、図19のフローチャートを参照して、図17のステップS88に対応する、閾値の設定の処理を説明する。なお、ステップS121、ステップS123、およびステップS125のそれぞれの処理で使用される閾値THd、閾値THe、および閾値THfは、閾値THd>閾値THe>閾値THfの関係を満たす。また、閾値THd、閾値THe、および閾値THfのそれぞれは、閾値THa、閾値THb、および閾値THcのそれぞれに対応する値である。例えば、閾値THdは、閾値THaに、1つのクラスタの記録容量を掛け算した値とすることができる。同様に、閾値THeは、閾値THbに、1つのクラスタの記録容量を掛け算した値とすることができ、閾値THfは、閾値THcに、1つのクラスタの記録容量を掛け算した値とすることができる。 Next, threshold value setting processing corresponding to step S88 in FIG. 17 will be described with reference to the flowchart in FIG. The threshold value THd, threshold value THe, and threshold value THf used in the processes of step S121, step S123, and step S125 satisfy the relationship of threshold value THd> threshold value THe> threshold value THf. Each of the threshold value THd, the threshold value THe, and the threshold value THf is a value corresponding to each of the threshold value THa, the threshold value THb, and the threshold value THc. For example, the threshold value THd can be a value obtained by multiplying the threshold value THa by the recording capacity of one cluster. Similarly, the threshold value THe can be a value obtained by multiplying the threshold value THb by the recording capacity of one cluster, and the threshold value THf can be a value obtained by multiplying the threshold value THc by the recording capacity of one cluster. .
ステップS121において、ページリスト生成更新部201は、記録されるファイルのデータ量が、予め定められた閾値THd以上であるか否かを判定する。ステップS121において、データ量が、閾値THd以上であると判定された場合、ステップS122に進み、ページリスト生成更新部201は、閾値に「3」を設定して、処理は終了する。
In step S121, the page list generation / updating
ステップS121において、データ量が、予め定められた閾値THd以上ではない(閾値THd未満である)と判定された場合、ステップS123に進み、ページリスト生成更新部201は、データ量が、閾値THe以上であるか否かを判定する。ステップS123において、データ量が、閾値THe以上であると判定された場合、ステップS124に進み、ページリスト生成更新部201は、閾値に「2」を設定して、処理は終了する。
If it is determined in step S121 that the data amount is not equal to or greater than the predetermined threshold THd (less than the threshold THd), the process proceeds to step S123, and the page list generation / updating
ステップS123において、データ量が、閾値THe以上ではない(閾値THe未満である)と判定された場合、ステップS125に進み、ページリスト生成更新部201は、データ量が、予め定められた閾値THf以上であるか否かを判定する。ステップS125において、データ量が、閾値THf以上であると判定された場合、ステップS126に進み、ページリスト生成更新部201は、閾値に「1」を設定して、処理は終了する。
If it is determined in step S123 that the data amount is not equal to or greater than the threshold value THe (less than the threshold value THe), the process proceeds to step S125, and the page list generation / updating
ステップS125において、データ量が、予め定められた閾値THf以上ではない(閾値THf未満である)と判定された場合、ステップS127に進み、ページリスト生成更新部201は、閾値に「0」を設定して、処理は終了する。
If it is determined in step S125 that the data amount is not equal to or greater than the predetermined threshold value THf (less than the threshold value THf), the process proceeds to step S127, and the page list generation / updating
以上の処理により、記録しようとするファイルに対し、ファイルのデータ量が大きい順に、閾値に「3」,「2」,「1」、または「0」が設定される。 As a result of the above processing, “3”, “2”, “1”, or “0” is set as the threshold value in descending order of the data amount of the file to be recorded.
次に、図20および図21のフローチャートを参照して、図17のステップS89に対応する、ファイルの記録の処理を説明する。ステップS141において、FAT読み出し部202は、ページリスト211から、最初の空き領域情報を読み出す。例えば、図14で示される、先頭クラスタ番号A1、先頭クラスタ番号A1で示されるクラスタについてのエントリ321が格納されているセクタのアドレス、および先頭クラスタ番号A1以降のクラスタの空き領域の記録容量の大きさ示す「2」である種別からなる空き領域情報が読み出される。
Next, a file recording process corresponding to step S89 in FIG. 17 will be described with reference to the flowcharts in FIGS. In step S <b> 141, the
ステップS142において、FAT読み出し部202は、ステップS141の処理において読み出された空き領域情報の種別が、図17のステップS88の処理において設定された閾値以上であるか否かが判定される。ステップS141の処理で読み出された“種別”が「2」である場合、ステップS88の処理により設定された閾値が「2」以上であるか否かが判定される。
In step S142, the
ステップS142において、空き領域の種別は、設定された閾値以上であると判定された場合、空き領域情報で示される空き領域にファイルを記録できる可能性があるので、ステップS143に進み、FAT読み出し部202は、空き領域情報のセクタのアドレスを基に、読み出そうとするFATのページの先頭のセクタのアドレスを決定する。例えば、FAT読み出し部202は、読み出そうとするFATのページの先頭のセクタのアドレスを、先頭クラスタ番号A1で示されるクラスタについてのエントリ321が格納されているセクタのアドレスに決定する。
If it is determined in step S142 that the type of the free area is equal to or more than the set threshold, the file may be recorded in the free area indicated by the free area information, so the process proceeds to step S143, and the
ステップS144において、FAT読み出し部202は、ステップS143の処理において決定したセクタのアドレスを基に、FAT領域302から1ページ分のFATを読み出して、メモリに記憶させる。例えば、図22で示されるように、図10のFAT領域302に配置される「FAT」302aのページP2-1がRAM113に読み出される。
In step S144, the
図22は、「FAT」302aにおける、ページングを説明する図である。図22において、1つの四角は、1つのエントリ321を示す。図22において、白い四角は、対応するクラスタが空きであることを示すエントリ321を表す。斜線が付されている四角は、対応するクラスタにファイルが記録されていることを示すエントリ321を表す。
FIG. 22 is a diagram for explaining paging in “FAT” 302a. In FIG. 22, one square indicates one
また、「FAT」302aに対するページングにおいては、例えば、図10で示される、ハードディスク173のパーティション241が18.6ギガバイト(=39,053,952セクタ)であり、クラスタのサイズが32キロバイト(=64セクタ)である場合、FAT領域302に配置される「FAT」302aのサイズは、約2.3メガバイト(=4,767セクタ)とされる。なお、ここで1セクタは512バイトである。
In paging for “FAT” 302a, for example, the
このとき、約2.3メガバイトの「FAT」302aがページングされる場合、1つのページのサイズ(ページP2-1乃至P2-mのそれぞれのサイズ)が32キロバイト(=64セクタ)とされる。ページP2-1乃至P2-mには、図14に示される種別に対応した空き領域に対応するエントリ321が配置される。例えば、図14の上から1行目の空き領域情報における、先頭クラスタ番号A1で示されるクラスタについてのエントリ321が格納されているセクタのアドレスで示されるセクタには、図22で示されるように、閾値THb以上の数の連続しているエントリ321であって、空きであることを示すエントリ321が配置される。
At this time, if the "FAT" 302a of about 2.3 megabytes being paged, the size of one page (page P 2-1 to each of the sizes of P 2-m) is 32 kilobytes (= 64 sectors) The In pages P 2-1 to P 2-m ,
例えば、ステップS144において、図22で示されるように、閾値THb以上の数の連続している、空きを示すエントリ321を含むページP2-1がFAT領域302から1ページ分のFATが読み出される。
For example, in step S144, as shown in Figure 22, are continuous in the number of more than the threshold value THb, the page P 2-1 with
同様に、図14の上から2行目の空き領域情報における、先頭クラスタ番号A2で示されるクラスタについてのエントリ321が格納されているセクタのアドレスで示されるセクタには、図22で示されるように、閾値THc以上の数の連続しているエントリ321であって、空きであることを示すエントリ321が配置される。また、図14の上からm行目の空き領域情報における、先頭クラスタ番号Amで示されるクラスタについてのエントリ321が格納されているセクタのアドレスで示されるセクタには、図22で示されるように、閾値THa以上の数の連続しているエントリ321であって、空きであることを示すエントリ321が配置される。
Similarly, the sector indicated by the address of the sector in which the
ステップS145において、記録容量算出部203は、ステップS144の処理で読み出されたページを基に、データ領域304における空き領域の記録容量を求める。例えば、図22で示されるページP2-1の連続している、空きを示すエントリ321の数に、クラスタあたりの記録容量を掛け算することにより、空き領域の記録容量が求められる(算出される)。
In step S145, the recording
ステップS146において、判定部204は、ステップS145の処理により求められた空き領域の記録容量が、記録しようとするファイルのデータ量以上であるか否かを判定する。例えば、判定部204は、バイト数で表される、記録しようとするファイルのデータ量と、バイト数で表される空き領域の記録容量を比較することにより、空き領域の記録容量が、記録しようとするファイルのデータ量以上であるか否かを判定する。なお、判定部204は、記録しようとするファイルのデータ量をクラスタの数に換算して、ファイルの記録に必要なクラスタの数と、空き領域のクラスタの数とを比較することにより、空き領域の記録容量が、記録しようとするファイルのデータ量以上であるか否かを判定するようにしてもよい。
In step S146, the
ステップS146において、空き領域の記録容量が、記録されるファイルのデータ量以上であると判定された場合、ステップS147に進み、記録制御部205は、空き領域情報に含まれる先頭クラスタ番号を基に、データ領域304における、ファイルの実データを記録するクラスタを決定する。例えば、図14で示される先頭クラスタ番号A1が先頭のクラスタとされ、これに続くクラスタが実データを記録するクラスタとされる。
If it is determined in step S146 that the recording capacity of the free area is equal to or larger than the data amount of the file to be recorded, the process proceeds to step S147, and the
ステップS148において、記録制御部205は、ステップS147の処理で決定されたクラスタに、ファイルを記録する。ファイルが記録されると、FATが更新されるので、FAT読み出し部202は、更新されたFATから、ステップS144で読み出されたページと同じページを読み出す。
In step S148, the
ファイルを記録した後、ステップS149乃至ステップS160において、ファイルの記録に対応したページリスト211を更新する処理が実行される。
After the file is recorded, processing for updating the
すなわち、図21のステップS149において、ページリスト生成更新部201は、ステップS148において、ファイルを記録する前の時点において、ファイルの実データが格納されたクラスタのアドレスのうち、最大のアドレスを示す使用済みクラスタ番号より、ファイルを記録した最終(最後)のクラスタである最終クラスタのクラスタ番号が大きいか否かを判定する。
That is, in step S149 of FIG. 21, the page list generation / updating
ステップS149において、使用済みクラスタ番号より、ファイルを記録した最終クラスタのクラスタ番号が大きくはないと判定された場合、ファイルが削除されることによって生じた空き領域にファイルが記録されたので、ステップS150に進み、ページリスト生成更新部201は、ファイルの記録に利用した、空き領域情報(ファイルが記録された空き領域に関係する空き領域情報)をページリスト211から削除する。例えば、図14で示される、先頭クラスタ番号A1、先頭クラスタ番号A1で示されるクラスタについてのエントリ321が格納されているセクタのアドレス、および先頭クラスタ番号A1以降のクラスタの空き領域の記録容量の大きさを示す「2」である種別からなる空き領域情報をページリスト211から削除する。
If it is determined in step S149 that the cluster number of the last cluster that recorded the file is not larger than the used cluster number, the file has been recorded in the free space generated by deleting the file. The page list generation / updating
ステップS151において、ページリスト生成更新部201は、ステップS148の処理において更新されたFATからFAT読み出し部202により読み出されたページを基に、ファイルを書き込んだ空き領域にまだ空き領域がある(空き領域が残っている)か否かを判定する。
In step S151, the page list generation / updating
ステップS151において、まだ空き領域があると判定された場合、ステップS152に進み、ページリスト生成更新部201は、更新されたFATからFAT読み出し部202により読み出されたページから、ステップS145の処理で記録容量が求められた空き領域と重複する空き領域の先頭のクラスタのアドレスを示す先頭クラスタ番号を読み出す。
If it is determined in step S151 that there is still an empty area, the process advances to step S152, and the page list generation /
ステップS153において、ページリスト生成更新部201は、FAT領域302において、ステップS152の処理により読み出された先頭クラスタ番号で示されるクラスタについてのエントリ321が記録されている、セクタのアドレス(LBAに基づいたセクタのアドレス(番号))を検出する。
In step S153, the page list generating / updating
ステップS154において、空き領域の記録容量に対する、種別の設定の処理が実行される。ステップS154における、空き領域の記録容量に対する、種別の設定の処理は、図18のフローチャートを参照して説明した処理と同様なので、その説明は省略する。 In step S154, a type setting process is executed for the recording capacity of the free area. The type setting process for the recording capacity of the free area in step S154 is the same as the process described with reference to the flowchart of FIG.
ステップS155において、ページリスト生成更新部201は、ページリスト211に、ステップS152の処理により読み出された先頭クラスタ番号、ステップS153の処理により検出されたセクタのアドレス(番号)、およびステップS154の処理により設定された種別(空き領域情報)を記録して、処理は終了する。
In step S155, the page list generating / updating
また、ステップS144の処理で読み出されたページの次のページに空き領域がある場合、ステップS155の処理の後、ページにまたがった空き領域を検出し、その空き領域を1つの空き領域としてページリスト211の空き領域情報を更新するようにしてもよい。
If there is an empty area in the next page after the page read in the process of step S144, after the process of step S155, an empty area extending over the page is detected, and the empty area is set as one empty area. The free space information in the
ステップS151において、もう空き領域がないと判定された場合、空き領域情報をページリスト211に加える必要はないので、ステップS152乃至ステップS155の処理はスキップされ、処理は終了する。
If it is determined in step S151 that there is no more free space, it is not necessary to add free space information to the
ステップS149において、使用済みクラスタ番号より、ファイルを記録した最終クラスタのクラスタ番号が大きいと判定された場合、ステップS156に進み、ページリスト生成更新部201は、最終クラスタのクラスタ番号である最終クラスタ番号を読み出す。例えば、ページリスト生成更新部201は、BPB301内の「FSInfo」が格納されているセクタから、データ領域304における最終クラスタ番号を読み出す。
If it is determined in step S149 that the cluster number of the last cluster in which the file is recorded is larger than the used cluster number, the process proceeds to step S156, and the page list generation / updating
ステップS157において、ページリスト生成更新部201は、FAT領域302において、最終クラスタ番号で示されるクラスタの次のクラスタについてのエントリ321が記録されている、セクタのアドレス(LBAに基づいたセクタのアドレス(番号))を検出する。
In step S157, the page list generating / updating
ステップS158において、ページリスト生成更新部201は、最終クラスタ番号で示されるクラスタの次のクラスタからの空き領域についての、ページリスト211に格納されている空き領域情報を更新して、処理は終了する。
In step S158, the page list generation / updating
一方、図20のステップS142において、空き領域情報の種別は、設定した閾値以上ではないと判定された場合、またはステップS146において、空き領域の記録容量は、ファイルのデータ量以上ではない(データ量未満である)と判定された場合、ステップS159に進み、FAT読み出し部202は、ページリスト211から読み出された空き領域情報が最後の空き領域情報であるか否かを判定する。すなわち、ページリスト211から読み出された空き領域情報が、「使用済みクラスタ番号+1」である先頭クラスタ番号、「使用済みクラスタ番号+1」である先頭クラスタ番号で示されるクラスタについてのエントリ321が格納されているセクタのアドレス、および種別を含む空き領域情報であるか否かが判定される。
On the other hand, if it is determined in step S142 in FIG. 20 that the type of the free space information is not equal to or greater than the set threshold value, or the free space recording capacity is not equal to or greater than the data amount of the file (data amount) in step S146. If it is determined that the free area information read from the
ステップS159において、最後の空き領域情報ではないと判定された場合、ステップS160に進み、FAT読み出し部202は、ページリスト211から次の空き領域情報を読み出して、ステップS142に戻り、上述した処理が繰り返される。
If it is determined in step S159 that it is not the last free area information, the process proceeds to step S160, where the
ステップS159において、最後の空き領域情報であると判定された場合、ファイルを記録することができる空き領域がなかったので、ファイルを記録しないので、処理は終了する。 If it is determined in step S159 that the information is the last free area information, the file is not recorded because there is no free area in which the file can be recorded, and the process ends.
以上のように、FAT内の空き領域の情報をテーブル(ページリスト211)として、保持し、ページリスト内の情報を基に、FATのページングが行われるため、ページングの回数、すなわち、ハードディスクなどの記録媒体へのアクセスの回数を低減することができる。また、フラグメントを低減させることができる。さらに、ページリスト211は、FAT内の空き領域の情報を基に作成および更新されるため、空き領域が既に存在しないFATをページとして、メモリに読み出されることはない。これにより、ページングの回数が最小1回で済むことが可能となる。従って、ファイルシステムの処理までを含めた、データをハードディスクなどの記録媒体へ書き込む際の実質的な転送速度(またはアクセスタイム)を向上させることができる。
As described above, the information on the free area in the FAT is stored as a table (page list 211), and FAT paging is performed based on the information in the page list. The number of accesses to the recording medium can be reduced. In addition, fragments can be reduced. Furthermore, since the
さらに、記録媒体へのアクセスの回数を低減できることにより、消費電力を低く抑えることができる。 Furthermore, since the number of accesses to the recording medium can be reduced, power consumption can be kept low.
なお、本発明によるファイルシステムは、従来のFAT32方式の規格に適合するものであり、従来のFAT32方式のファイルシステムとの、いわゆる互換性を有するものである。 The file system according to the present invention conforms to the conventional FAT32 standard, and has so-called compatibility with the conventional FAT32 file system.
また、本発明は、FAT32のファイルシステムを用いたハードディスク173(またはHDD114のようなビルトインタイプの記録媒体に限らず、FAT32のファイルシステムを用いたリムーバブルタイプの記録媒体、例えば、磁気ディスク、光ディスク、光磁気ディスクなどにおいても適用することが可能である。
The present invention is not limited to the
以上のように、ファイルシステムとして、FAT32を用いて説明したが、本発明は、他のファイルシステムにおいても適用することができる。図23は、例えば、UDF(Universal Disk Format)を利用する、ファイルシステム361の構成を説明するブロック図である。ファイルシステム361は、デジタルビデオカメラ100のOS172に含まれる。
As described above, the FAT32 is used as the file system. However, the present invention can be applied to other file systems. FIG. 23 is a block diagram illustrating the configuration of a
ファイルシステム361には、ページ管理プログラム362が含まれている。なお、図6で示される、ページ管理プログラム191の場合と同様の部分には、同じ符号が付してあり、その説明は省略する。
The
ページ管理プログラム362は、さらに、ページリスト生成更新部201、ファイル配置情報読み出し部363、記録容量算出部203、判定部204、記録制御部205、およびページリスト211を含む。ページリスト211には、図24を参照して後述する光ディスク370の空いている領域の先頭に配置されているクラスタのアドレスと、このアドレスに対応する、セクタのアドレスとが対応して格納されている。
The
ファイル配置情報読み出し部363は、記録容量算出部203より供給された記録容量およびページリスト211の空き領域情報を基に、空き領域を有し、図24を参照して後述するSBD(Space Bitmap Descriptor)392をページ単位で読み出す。ファイル配置情報読み出し部363は、ページの空き領域を示す情報を記録容量算出部203に出力する。
The file arrangement
図24を参照して、UDFを利用した、例えば、DVD-Rなどである光ディスク370に本発明を適用した場合について説明する。UDFの詳細は、例えば、「Universal Disk Format Specification(Revision2.01)」や「ECMA(European Computer Manufacturer Association)(Standard ECMA-167)」などに開示されている。
With reference to FIG. 24, a case where the present invention is applied to an
なお、図中の0乃至Nは、0を始点とし、Nを最大のセクタ番号とした論理セクタ番号(LSN(Logic Sector Number))を表している。また、以下に記載するボリュームとは、光ディスク360などのリムーバブルタイプの記録媒体における物理単位である。 In the figure, 0 to N represent logical sector numbers (LSN (Logic Sector Number)), where 0 is the starting point and N is the maximum sector number. The volume described below is a physical unit in a removable recording medium such as the optical disk 360.
論理セクタ番号16乃至18の領域には、ECMA167の第2部および第3部の記述に従って記録されるボリューム認識列(VRS(Volume Recognition Sequence))371が配置されている。また、ボリューム認識列371には、ISO(International Organization for Standardization)13346で規定されている、光ディスク370への書き込み方式のひとつであるNSR(Non-Sequential Recording)のディスクリプタ(descriptor)(記述子)が格納される。
In the area of
なお、ディスクリプタとは、プログラムなどにおける、内容、構造、または属性などが記述されたものである。 The descriptor is a description of contents, structure, attributes, etc. in a program or the like.
論理セクタ番号32乃至63の領域には、主ボリューム記述列(Main VDS(Volume Descriptor Sequence))372が配置されている。主ボリューム記述列372には、ボリュームおよびそのボリュームの属性を識別する“Primary Volume Descriptor”、特定の論理ボリュームに属するボリューム集合中のボリュームの識別を支援する“Implementation Use Volume Descriptor”、パーティション375のサイズおよびその位置が明記される“Partition Descriptor”、ボリューム記述列の番号や論理ブロックのサイズ(バイト)などが記録される“Logical Volume Descriptor”、配分されていない大きさが明記される“Unallocated Space Descriptor”、および主ボリューム記述列372を終わらすために記録される“Terminating Descriptor”が格納され、それぞれのディスクリプタが512バイトで格納されている。
A main volume description string (Main VDS (Volume Descriptor Sequence)) 372 is arranged in the
論理セクタ番号64乃至95の領域には、論理ボリューム保全記述列(LVIS(Logical Volume Integrity Sequence))373が配置されている。論理ボリューム保全記述列373には、関連する論理ボリュームの内容が更新された場合に書き込まれ、その論理ボリュームの状態が明記される“Logical Volume Integrity Descriptor”、および論理ボリューム保全記述列373を終わらすために記録される“Terminating Descriptor”が格納され、それぞれのディスクリプタが512バイトで格納されている。
A logical volume integrity description sequence (LVIS (Logical Volume Integrity Sequence)) 373 is arranged in the area of the
論理セクタ番号96乃至287の領域には、第1の開始点(First AP(Anchor Point))374が配置されている。第1の開始点374は、主ボリューム記述列372および予約ボリューム記述列377の大きさが明記される“Anchor Volume Descriptor Pointer”により構成される。
A first start point (First AP (Anchor Point)) 374 is arranged in the areas of
論理セクタ番号288乃至N−288の領域には、パーティション(Partition)375が配置されている。
A partition (Partition) 375 is arranged in the areas of
論理セクタ番号N−287乃至N−224の領域には、第1の開始点374および第2の開始点378が読み込めなかった場合に、読み出される、予備の開始点AP(Anchor Point)としての、第3の開始点(Third AP)376が配置されている。
In the areas of the logical sector numbers N-287 to N-224, when the
論理セクタ番号N−223乃至N−192の領域には、主ボリューム記述列372が読み込めなかった場合の予備の領域である、予約ボリューム記述列(Reserve VDS)377が配置されている。
In the areas of logical sector numbers N-223 to N-192, a reserved volume description string (Reserve VDS) 377, which is a spare area when the main
論理セクタ番号N−191乃至Nの領域には、第1の開始点374が読み込めなかった場合に、読み出される第2の開始点(Second AP)378が配置されている。
In the areas of logical sector numbers N-191 to N, a second start point (Second AP) 378 to be read when the
また、パーティション375には、ファイル集合記述子(FSD(File Set Descriptor))391が配置されている。ファイル集合記述子391は、ファイルおよびディレクトリの集合を識別する。
In the
空間ビットマップ記述子(SBD(Space Bitmap Descriptor))392は、パーティション375における、全ての論理ブロックに対するビットを識別する。空間ビットマップ記述子392においては、パーティション375の使用状況(論理ブロックに対するデータの記録状況)に応じて、データを割り当て済みの領域(論理ブロック)に対しては“0”が保持され、データが未割り当ての領域(論理ブロック)に対しては“1”が保持される。1ビットで管理される単位は、例えば、nセクタ(n=1,2…)とされる。
A space bitmap descriptor (SBD (Space Bitmap Descriptor)) 392 identifies bits for all logical blocks in the
これにより、データの未割り当ての領域(空き領域)に対して保持される“1”を基に、ページリスト211が作成および更新される。
As a result, the
ルートICB(Root ICB(Information Control Block))393は、1個の直接エントリおよび1個の間接エントリを含む。 A root ICB (Information Control Block) 393 includes one direct entry and one indirect entry.
ルートファイル識別記述子(Root FID(File Identifier Descriptor))394は、ファイル識別記述子(FID)395の親ディレクトリである。 A root file identifier descriptor (Root FID (File Identifier Descriptor)) 394 is a parent directory of the file identifier descriptor (FID) 395.
ファイル識別記述子(FID)395には、ファイルの特性やファイルの識別子の長さなどが格納されている。 The file identification descriptor (FID) 395 stores file characteristics, the length of the file identifier, and the like.
ファイルエントリ(File Entry)396は、ICBにおける、1個の直接エントリである。
A
ファイル実体(File実体)397には、ファイルの実データが格納されている。
A
光ディスク370においては、ページリスト211は、パーティション375の終端に記録される。
In the
図25のフローチャートを参照して、光ディスク370に記録されているページリスト211の読み出しの処理を説明する。このページリスト211の読み出しの処理は、デジタルビデオカメラ100の起動と共に開始される。
A process of reading the
ステップS211において、OS172は、光ディスク370が挿入されたか否かを判定する。ステップS211において、光ディスク370が挿入されていないと判定された場合、手続きは、ステップS211に戻り、光ディスクが挿入されるまで、判定の処理が繰り返される。
In step S211, the
ステップS211において、光ディスク370が挿入されたと判定された場合、ステップS212に進み、ファイル配置情報読み出し部363は、ページリスト211が記録されている、記録先のセクタにおける先頭のセクタへアクセスし、ステップS213おいて、光ディスク370に記録されているページリスト211を、メモリであるRAM113に読み出す。
If it is determined in step S211 that the
ステップS214において、ファイル配置情報読み出し部363は、ページリスト211に格納されている空き領域情報の数を求め、処理は終了する。
In step S214, the file arrangement
次に、図26のフローチャートを参照してページリスト211の記録の処理を説明する。この処理は、デジタルビデオカメラ100の起動と共に開始される。
Next, the process of recording the
ステップS221において、OS172は、操作入力部123からのユーザの操作に対応した信号を基に、光ディスク370の取り出しが指示されたか否かを判定する。ステップS221において、光ディスク370の取り出しが指示されていないと判定された場合、手続きは、ステップS221に戻り、光ディスク370の取り出しが指示されるまで判定の処理が繰り返される。
In step S <b> 221, the
ステップS221において、光ディスク370の取り出しが指示されたと判定された場合、ステップS222に進み、記録制御部205は、RAM113に保持されているページリスト211を光ディスク370に記録する。
If it is determined in step S221 that removal of the
ステップS223において、OS172は、デジタルビデオカメラ100より光ディスクを排出し、処理は終了する。
In step S223, the
図27は、本発明を適用したパーソナルコンピュータ601の構成例を示すブロック図である。CPU611は、ROM612に記憶されているプログラム、またはHDD619からRAM613にロードされたプログラムに従って各種の処理を実行する。RAM613にはまた、CPU611が各種の処理を実行する上において必要なデータなども適宜記憶される。
FIG. 27 is a block diagram illustrating a configuration example of a
CPU611,ROM612、およびRAM613は、バス614を介して相互に接続されている。このバス614にはまた、入出力インタフェース615も接続されている。
The
入出力インタフェース615には、ユーザが操作して、テキストを入力するキーボード631、ポインティングデバイスの一例であるマウス632、画像を入力するスキャナ633、音声を入力するマイクロフォン634等の入力デバイスで構成される入力部616、ディスプレイなどの表示部641、音声を出力するスピーカ642、紙に文字または画像を印刷して、いわゆるハードコピーを出力するプリンタ643、紙に文字または画像を描画するプロッタ644等の出力デバイスで構成される出力部617が接続されている。さらに、入出力インタフェース615には、プログラムや各種データを記録するHDD619、およびLAN(Local Area Network)またはインターネットを含むネットワークを介してデータを通信する、USB(Universal Serial Bus)インタフェース651,IEEE(Institute of Electrical and Electronic Engineers)1394インタフェース652、ブルートゥースインタフェース653,IEEE802.11インタフェース654などの通信部618が接続される。
The input /
USBインタフェース651は、USBの規格に基づき、ケーブルを介して(有線通信で)、他の機器と通信する。IEEE1394インタフェース652は、IEEE1394の規格に基づき、ケーブルを介して、他の機器と通信する。同様に、ブルートゥースインタフェース653は、ブルートゥースの規格に基づき、他の機器と無線通信する。IEEE802.11インタフェース654は、IEEE802.11a,IEEE802.11b、またはIEEE802.11gなどの規格に基づき、他の機器と無線通信する。
The
入出力インタフェース615にはまた、必要に応じてドライブ620が接続され、磁気ディスク661、光ディスク662、光磁気ディスク663、或いは半導体メモリ664などが適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じてHDD619にインストールされる。
A
ドライブ620は、CPU611の制御に基づいて、装着されている磁気ディスク661、光ディスク662、光磁気ディスク663、或いは半導体メモリ664などの記録媒体に記録されているデータを読み出し、読み出したデータをCPU611に供給する。また、CPU611より供給されたデータを、ドライブ620に装着される磁気ディスク661、光ディスク662、光磁気ディスク663、或いは半導体メモリ664などに記憶させる。
The
なお、本明細書ではハードディスクを例に挙げて説明したが、本発明はこれに限定されることなく、MO(Magneto Optical disk)、PD(Phase change rewritable Disk),Zip,SuperDiskといったZCAV(Zone Constant Angular Velocity)方式を採用し、ランダムアクセス可能な他の記録媒体にも適用可能である。また、ファイルシステムに関しても、UDF(Universal Disk Format)などであってもよく、FAT32に限定されるものではない。 In the present specification, a hard disk has been described as an example. However, the present invention is not limited to this, and ZCAV (Zone Constant) such as MO (Magneto Optical disk), PD (Phase change rewritable Disk), Zip, and SuperDisk. (Angular Velocity) method is adopted, and it can be applied to other recording media that can be accessed randomly. Also, the file system may be UDF (Universal Disk Format) or the like, and is not limited to FAT32.
また、本発明が適用される情報処理装置の実施の形態は、図4に示されるデジタルビデオカメラ100および図27に示されるパーソナルコンピュータ601に限定されず、所定のファイルシステムを利用して、記録媒体の記録および読み出しの制御が可能な情報処理装置であれば構わない。具体的には、例えば、PDA(Personal Digital Assistants)、携帯電話機、または、デジタル電化製品(例えば、テレビジョン受像機やハードディスク録画装置)等様々な実施の形態が可能である。
Further, the embodiment of the information processing apparatus to which the present invention is applied is not limited to the
このように、FAT32などのファイルシステムを用いて、ページングを行うようにした場合、FAT全体をメモリに保持することなく、FATにおける空き領域を検出することができる。記憶制御手段が、1つの空き領域をなす1または複数の第2の記録領域のうちの、先頭の第2の記録領域の位置を示す第1のアドレス情報と、第1のアドレス情報で位置が示される第2の記録領域についてのファイル配置情報を格納する第1の記録領域の位置を示す第2のアドレス情報との記憶を制御し、読み出し制御手段が、記憶されている第2のアドレス情報を基に、ファイル記録媒体からのファイル配置情報の読み出しを制御し、記録制御手段が、第1のアドレス情報および読み出されたファイル配置情報を基に、ファイル記録媒体へのファイルの記録を制御するようにした場合には、記録媒体とのアクセスタイムをより短縮することができる。 In this way, when paging is performed using a file system such as FAT32, it is possible to detect an empty area in the FAT without holding the entire FAT in the memory. The storage control means has the first address information indicating the position of the first second recording area of one or a plurality of second recording areas forming one vacant area, and the position of the first address information. The second address information stored is controlled by controlling the storage with the second address information indicating the position of the first recording area for storing the file arrangement information for the indicated second recording area. Based on the above, the reading of the file arrangement information from the file recording medium is controlled, and the recording control unit controls the recording of the file to the file recording medium based on the first address information and the read file arrangement information. In this case, the access time with the recording medium can be further shortened.
この記録媒体は、図4または図27に示すように、コンピュータとは別に、ユーザにプログラムを提供するために配布される、プログラムが記録されている磁気ディスク141および661(フレキシブルディスクを含む)、光ディスク142および662(CD-ROM(Compact Disk Read-Only Memory),DVD(Digital Versatile Disc)を含む)、光磁気ディスク143および663(MD(Mini Disc)(商標)を含む)、若しくは半導体メモリ144および664などよりなるパッケージメディアにより構成されるだけでなく、コンピュータに予め組み込まれた状態でユーザに提供される、プログラムが記録されているROM112および612、もしくはハードディスク173およびHDD619などで構成される。
As shown in FIG. 4 or FIG. 27, this recording medium is distributed to provide a program to the user separately from the computer, and
なお、上述した一連の処理を実行させるプログラムは、必要に応じてルータ、モデムなどのインタフェースを介して、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の通信媒体を介してコンピュータにインストールされるようにしてもよい。 The program for executing the series of processes described above is installed in a computer via a wired or wireless communication medium such as a local area network, the Internet, or digital satellite broadcasting via an interface such as a router or a modem as necessary. You may be made to do.
また、本明細書において、記録媒体に格納されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくても、並列的あるいは個別に実行される処理を含むものである。 In addition, in this specification, the step of describing the program stored in the recording medium is not limited to the processing performed in time series according to the described order, but is not necessarily performed in time series. Or the process performed separately is included.
100 デジタルビデオカメラ, 111 CPU, 114 ハードディスクドライブ, 141 磁気ディスク, 142 光ディスク, 143 光磁気ディスク, 144 半導体メモリ, 173 ハードディスク, 181 ファイルシステム, 182 デバイスドライバ, 191 ページ管理プログラム, 201 ページリスト生成更新部, 202 FAT読み出し部, 203 記録容量算出部, 204 判定部, 205 記録制御部, 211 ページリスト, 302 FAT領域, 302a FAT, 361 ファイルシステム, 362 ページ管理プログラム, 363 ファイル配置情報読み出し部, 611 CPU, 619 ハードディスクドライブ, 661 磁気ディスク, 662 光ディスク, 663 光磁気ディスク, 664 半導体メモリ 100 digital video camera, 111 CPU, 114 hard disk drive, 141 magnetic disk, 142 optical disk, 143 magneto-optical disk, 144 semiconductor memory, 173 hard disk, 181 file system, 182 device driver, 191 page management program, 201 page list generation and update unit , 202 FAT reading unit, 203 recording capacity calculation unit, 204 determination unit, 205 recording control unit, 211 page list, 302 FAT area, 302a FAT, 361 file system, 362 page management program, 363 file arrangement information reading unit, 611 CPU , 619 hard disk drive, 661 magnetic disk, 662 optical disk, 663 magneto-optical disk, 664 semiconductor Memory
Claims (7)
1つの空き領域をなす1または複数の前記第2の記録領域のうちの、先頭の前記第2の記録領域の位置を示す第1のアドレス情報と、前記第1のアドレス情報で位置が示される前記第2の記録領域についての前記ファイル配置情報を格納する前記第1の記録領域の位置を示す第2のアドレス情報との記憶を制御する記憶制御手段と、
記憶されている前記第2のアドレス情報を基に、前記ファイル記録媒体からの前記ファイル配置情報の読み出しを制御する読み出し制御手段と、
前記第1のアドレス情報および読み出された前記ファイル配置情報を基に、前記ファイル記録媒体へのファイルの記録を制御する記録制御手段と
を含むことを特徴とする記録装置。 In a recording apparatus for recording the file on the file recording medium together with file arrangement information indicating the arrangement of the file in each of the second recording areas consisting of the first recording area which is a recording unit of the file recording medium,
The position is indicated by the first address information indicating the position of the second recording area at the head of the one or more second recording areas forming one free area and the first address information. Storage control means for controlling storage with second address information indicating the position of the first recording area for storing the file arrangement information for the second recording area;
A read control means for controlling reading of the file arrangement information from the file recording medium based on the stored second address information;
And a recording control unit configured to control recording of a file on the file recording medium based on the first address information and the read file arrangement information.
ことを特徴とする請求項1に記載の記録装置。 The recording apparatus according to claim 1, wherein the storage control unit controls storage so that the first address information and the second address information are stored as a list.
ことを特徴とする請求項2に記載の記録装置。 3. The recording according to claim 2, wherein the list further stores information indicating a recording capacity of the free area corresponding to the first address information and the second address information. apparatus.
ことを特徴とする請求項3に記載の記録装置。 When the file is recorded on the file recording medium to which a FAT (File Allocation Tables) file system is applied, the recording control means includes a BPB (Basic Input / Output System) parameter in the file recording medium. 4. The recording apparatus according to claim 3, wherein the recording is further controlled so that the list is recorded in an area provided between Block) and an area in which the FAT is stored.
1つの空き領域をなす1または複数の前記第2の記録領域のうちの、先頭の前記第2の記録領域の位置を示す第1のアドレス情報と、前記第1のアドレス情報で位置が示される前記第2の記録領域についての前記ファイル配置情報を格納する前記第1の記録領域の位置を示す第2のアドレス情報との記憶を制御する記憶制御ステップと、
記憶されている前記第2のアドレス情報を基に、前記ファイル記録媒体からの前記ファイル配置情報の読み出しを制御する読み出し制御ステップと、
前記第1のアドレス情報および読み出された前記ファイル配置情報を基に、前記ファイル記録媒体へのファイルの記録を制御する記録制御ステップと
を含むことを特徴とする記録方法。 In a recording method of a recording apparatus for recording the file on the file recording medium together with file arrangement information indicating the arrangement of the file in each of the second recording areas consisting of the first recording area which is a recording unit of the file recording medium ,
The position is indicated by the first address information indicating the position of the second recording area at the head of the one or more second recording areas forming one free area and the first address information. A storage control step for controlling storage with the second address information indicating the position of the first recording area for storing the file arrangement information for the second recording area;
A read control step for controlling reading of the file arrangement information from the file recording medium based on the stored second address information;
A recording control step of controlling recording of a file on the file recording medium based on the first address information and the read file arrangement information.
1つの空き領域をなす1または複数の前記第2の記録領域のうちの、先頭の前記第2の記録領域の位置を示す第1のアドレス情報と、前記第1のアドレス情報で位置が示される前記第2の記録領域についての前記ファイル配置情報を格納する前記第1の記録領域の位置を示す第2のアドレス情報との記憶を制御する記憶制御ステップと、
記憶されている前記第2のアドレス情報を基に、前記ファイル記録媒体からの前記ファイル配置情報の読み出しを制御する読み出し制御ステップと、
前記第1のアドレス情報および読み出された前記ファイル配置情報を基に、前記ファイル記録媒体へのファイルの記録を制御する記録制御ステップと
を含むことを特徴とするコンピュータが読み取り可能なプログラムが記録されている記録媒体。 For recording processing for recording the file on the file recording medium, together with file arrangement information indicating the arrangement of the file in each of the second recording areas comprising the first recording area which is a recording unit of the file recording medium A program,
The position is indicated by the first address information indicating the position of the second recording area at the head of the one or more second recording areas forming one free area and the first address information. A storage control step for controlling storage with the second address information indicating the position of the first recording area for storing the file arrangement information for the second recording area;
A read control step for controlling reading of the file arrangement information from the file recording medium based on the stored second address information;
A computer-readable program comprising: a recording control step for controlling recording of a file on the file recording medium based on the first address information and the read file arrangement information. Recording media.
1つの空き領域をなす1または複数の前記第2の記録領域のうちの、先頭の前記第2の記録領域の位置を示す第1のアドレス情報と、前記第1のアドレス情報で位置が示される前記第2の記録領域についての前記ファイル配置情報を格納する前記第1の記録領域の位置を示す第2のアドレス情報との記憶を制御する記憶制御ステップと、
記憶されている前記第2のアドレス情報を基に、前記ファイル記録媒体からの前記ファイル配置情報の読み出しを制御する読み出し制御ステップと、
前記第1のアドレス情報および読み出された前記ファイル配置情報を基に、前記ファイル記録媒体へのファイルの記録を制御する記録制御ステップと
を含むことを特徴とするプログラム。 A recording process for recording the file on the file recording medium is performed on the computer together with file arrangement information indicating the arrangement of the file in each of the second recording areas including the first recording area which is a recording unit of the file recording medium. Program
The position is indicated by the first address information indicating the position of the second recording area at the head of the one or more second recording areas forming one free area and the first address information. A storage control step for controlling storage with the second address information indicating the position of the first recording area for storing the file arrangement information for the second recording area;
A read control step for controlling reading of the file arrangement information from the file recording medium based on the stored second address information;
And a recording control step for controlling recording of a file on the file recording medium based on the first address information and the read file arrangement information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004149656A JP2005332481A (en) | 2004-05-19 | 2004-05-19 | Recording device and method, recording medium, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004149656A JP2005332481A (en) | 2004-05-19 | 2004-05-19 | Recording device and method, recording medium, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005332481A true JP2005332481A (en) | 2005-12-02 |
Family
ID=35487026
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004149656A Withdrawn JP2005332481A (en) | 2004-05-19 | 2004-05-19 | Recording device and method, recording medium, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005332481A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7509704B2 (en) | 2018-11-30 | 2024-07-02 | 株式会社Rsystem | Document organization support system and computer program |
-
2004
- 2004-05-19 JP JP2004149656A patent/JP2005332481A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7509704B2 (en) | 2018-11-30 | 2024-07-02 | 株式会社Rsystem | Document organization support system and computer program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1727143A1 (en) | Information processing device and method, program recording medium, and program | |
KR100982118B1 (en) | Recording device, recording method, and recording medium | |
US7689807B2 (en) | Mass storage device, mass storage controller and methods for use therewith | |
JP4816740B2 (en) | Information processing apparatus, information processing method, and program | |
US20050259542A1 (en) | Reproduction device and method, recording medium, and program | |
JP4577050B2 (en) | Recording apparatus and method, and program | |
JP2007108853A (en) | Information processor, information processing method, and computer program | |
US7424573B2 (en) | Information processing apparatus, method, and program for formatting multiple recording media integrated as one | |
JP2005332481A (en) | Recording device and method, recording medium, and program | |
JP2005339628A (en) | Recording device and method, reading device and method, recording medium and program | |
JP2007059004A (en) | Information processor and method, program, and recording medium | |
JP2006178633A (en) | Information processor, information processing method, and program | |
JP2006155461A (en) | Information processor and processing method, and program | |
JP4356011B2 (en) | Recording apparatus and method, imaging apparatus, recording medium, and program | |
JP2005332426A (en) | Recording device and method, reading device and method, recording medium, and program | |
JP2002041336A (en) | Data recording medium, data recorder and data reproducing device for handling the same | |
JP2005301885A (en) | Access method to data recording medium, information processor, and access program to data storage medium | |
JP4561323B2 (en) | Information processing apparatus, information processing method, and program | |
JP4734898B2 (en) | Information processing apparatus, information processing method, and program | |
JP2008009754A (en) | Information-processing device, method and program | |
JP2005165781A (en) | Record reproduction device and method, and record reproduction system | |
JP2006164017A (en) | Information processor, information processing method, and program | |
JP2006178632A (en) | Information processor, information processing method, and program | |
JP4586533B2 (en) | Recording apparatus, address conversion apparatus, recording control method, and recording control program | |
JP4206872B2 (en) | Information editing apparatus, imaging apparatus, and information editing 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: 20070807 |