JP2007334687A - Information processor and file access method - Google Patents

Information processor and file access method Download PDF

Info

Publication number
JP2007334687A
JP2007334687A JP2006166561A JP2006166561A JP2007334687A JP 2007334687 A JP2007334687 A JP 2007334687A JP 2006166561 A JP2006166561 A JP 2006166561A JP 2006166561 A JP2006166561 A JP 2006166561A JP 2007334687 A JP2007334687 A JP 2007334687A
Authority
JP
Japan
Prior art keywords
file
reused
accessed
cache buffer
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006166561A
Other languages
Japanese (ja)
Inventor
Masao Aihara
正男 合原
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2006166561A priority Critical patent/JP2007334687A/en
Publication of JP2007334687A publication Critical patent/JP2007334687A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To prevent meta-data, a setting file or the like likely to be reused from being expelled from a cache buffer, and to provide the efficient file access without changing any application. <P>SOLUTION: An information processor for handling the file stored in a secondary storage unit has a determination means for determining whether or not the file to be accessed is likely to be reused. If the determination means determines that the file to be accessed is not likely to be reused, the file is accessed without using any cache buffer. If the determination means determines that the file to be accessed is likely to be reused, an access means is further provided for making access to the file by using the cache buffer. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、情報処理装置及びファイルアクセス方法に関する。   The present invention relates to an information processing apparatus and a file access method.

ファイルシステムは通常キャッシュバッファと呼ばれる記憶領域を利用する。ファイルシステムはアプリケーションからのファイル読み込み要求があった場合には、該当するファイルのデータをハードディスクやメモリカード等の二次記憶装置からセクタ単位でキャッシュバッファに転送する。次にファイルシステムは要求されただけのデータをキャッシュバッファからアプリケーションの指定したメモリ領域に転送する。   A file system normally uses a storage area called a cache buffer. When there is a file read request from an application, the file system transfers the data of the corresponding file from a secondary storage device such as a hard disk or a memory card to the cache buffer in units of sectors. Next, the file system transfers only the requested data from the cache buffer to the memory area designated by the application.

キャッシュバッファの内容はできるだけ保持され、アプリケーションから再び同じデータの読み込み要求があった場合には、ファイルシステムは二次記憶装置からの転送を省略し、キャッシュバッファのデータからアプリの指定するメモリ領域に転送する。これによって動作の遅い二次記憶装置へのアクセスを減らすことができ、速度向上に効果的である。   The contents of the cache buffer are retained as much as possible, and when the application requests to read the same data again, the file system skips the transfer from the secondary storage device and stores the cache buffer data in the memory area specified by the application. Forward. As a result, access to the secondary storage device that operates slowly can be reduced, which is effective in improving the speed.

また、アプリケーションからファイルへの書き込み要求があった場合には、ファイルシステムはアプリケーションの指定したデータをキャッシュバッファに転送し、次に二次記憶装置に転送する。ファイルシステムはキャッシュバッファから二次記憶装置への実際のデータ転送は遅らせることができる。したがって、二次記憶装置へ転送する前にアプリケーションから同じデータの上書き要求があったときは、ファイルシステムはキャッシュバッファのデータだけを変更し、最後の変更結果のみを二次記憶装置に転送する。このことによって、二次記憶装置へのアクセスを減らすことができる。   When there is a write request to the file from the application, the file system transfers the data designated by the application to the cache buffer, and then transfers it to the secondary storage device. The file system can delay the actual data transfer from the cache buffer to the secondary storage. Therefore, when there is an overwrite request for the same data from the application before transferring to the secondary storage device, the file system changes only the data in the cache buffer and transfers only the last change result to the secondary storage device. This can reduce access to the secondary storage device.

また、ファイルシステムにはファイルにアクセスするために必要なディレクトリエントリ・FAT・inodeといったメタデータが存在する。ファイルシステムはメタデータを読み込んだり書き込んだりする時にも、一度キャッシュバッファにメタデータを転送し、キャッシュバッファ上のメタデータにアクセスする。   Further, the file system has metadata such as directory entry, FAT, and inode necessary for accessing the file. When the file system reads or writes metadata, the file system once transfers the metadata to the cache buffer and accesses the metadata on the cache buffer.

このようにファイルシステムはキャッシュバッファに一度転送したデータはなるべく捨てずに保持しておき、キャッシュバッファを全て使い切って足りなくなったときに初めて古いデータを捨てて、空いたキャッシュバッファの領域を新しいデータの為に使う。このことで、ファイルシステムは、ファイルアクセスを効率的に実現している。   In this way, the file system retains the data once transferred to the cache buffer as much as possible, and discards the old data for the first time when the cache buffer is completely used up. Use for Thus, the file system efficiently realizes file access.

特開特開2003−122606号公報JP-A-2003-122606

近年は画像・音声・動画映像といった大容量のマルチメディアデータを扱う機器が増えている。これらの機器は、データの編集ができる一部の機器を除いて、マルチメディアデータを扱う際には大容量のファイルの先頭から末尾までを連続的にアクセスする。或いは、これらの機器は、次々と別のファイルへのアクセスを繰り返すことが多い。つまり、一つのファイルの特定のデータを何度も読んだり何度も書き直したりすることは極めて少ない。また、大容量のデータを扱う機器であっても、キャッシュバッファとして使える記憶領域は小さく、一つのファイルの全てのデータがキャッシュバッファに入りきらないものも多い。   In recent years, an increasing number of devices handle large-capacity multimedia data such as images, audio, and video. With the exception of some devices that can edit data, these devices continuously access from the beginning to the end of a large-capacity file when handling multimedia data. Alternatively, these devices often repeat access to different files one after another. In other words, it is extremely rare to read or rewrite specific data in a file many times. Also, even a device that handles a large amount of data has a small storage area that can be used as a cache buffer, and many of the data of one file cannot fit into the cache buffer in many cases.

しかしながら、これらの機器は、このような大容量データもキャッシュバッファを経由して読み書きする。そのため、大容量マルチメディアデータにアクセスすると、限りあるキャッシュバッファが大容量マルチメディアデータに専有されてしまい、メタデータや設定ファイルの内容が追い出されてしまう問題があった。   However, these devices read and write such a large amount of data via the cache buffer. Therefore, when accessing large-capacity multimedia data, there is a problem that a limited cache buffer is exclusively used for the large-capacity multimedia data, and the contents of metadata and setting files are evicted.

本発明はこのような問題点に鑑みなされたもので、再利用される可能性の高いメタデータや設定ファイル等がキャッシュバッファから追い出されるのを防ぎ、効率的なファイルアクセスをアプリケーションの変更なしに提供することを目的とする。   The present invention has been made in view of such problems, and prevents metadata and configuration files that are highly likely to be reused from being flushed out of the cache buffer, thereby enabling efficient file access without application changes. The purpose is to provide.

そこで、本発明は、二次記憶装置に記憶されているファイルを扱う情報処理装置であって、アクセスする前記ファイルが再利用される可能性の低いファイルか否かを判断する判断手段を有し、前記判断手段において、アクセスする前記ファイルが再利用される可能性の低いファイルであると判断された場合には、キャッシュバッファを利用しないで前記ファイルにアクセスし、前記判断手段において、アクセスするファイルが再利用される可能性の高いファイルであると判断された場合には、前記キャッシュバッファを利用して前記ファイルにアクセスするアクセス手段を更に有することを特徴とする。   Therefore, the present invention is an information processing apparatus that handles a file stored in a secondary storage device, and includes a determination unit that determines whether or not the accessed file is a file that is unlikely to be reused. When the determination unit determines that the file to be accessed is a file that is unlikely to be reused, the file is accessed without using a cache buffer, and the file to be accessed is determined by the determination unit. When the file is determined to be a file that is highly likely to be reused, it further includes an access means for accessing the file using the cache buffer.

係る構成とすることにより、例えば、再利用される可能性の低いデータにアクセスする際にはキャッシュバッファを経由しないでアクセスすることができる。よって、再利用される可能性の高いメタデータや設定ファイル等がキャッシュバッファから追い出されるのを防ぎ、効率的なファイルアクセスをアプリケーションの変更なしに提供することができる。   By adopting such a configuration, for example, when accessing data that is unlikely to be reused, the data can be accessed without going through the cache buffer. Therefore, it is possible to prevent metadata and setting files that are likely to be reused from being evicted from the cache buffer, and to provide efficient file access without application changes.

また、本発明は、ファイルアクセス方法としてもよい。   The present invention may be a file access method.

本発明によれば、再利用される可能性の高いメタデータや設定ファイル等がキャッシュバッファから追い出されるのを防ぎ、効率的なファイルアクセスをアプリケーションの変更なしに提供することができる。   According to the present invention, it is possible to prevent metadata and setting files that are highly likely to be reused from being flushed out of the cache buffer, and to provide efficient file access without application changes.

以下、本発明の実施形態について図面に基づいて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(第1の実施形態)
図1は、本実施形態における、二次記憶装置にデータを読み書きできるシステムの一例のシステム構成図である。図1において、プロセッサ1は、主記憶装置2、拡張子リスト5、二次記憶装置6を含むシステム全体を制御する。
(First embodiment)
FIG. 1 is a system configuration diagram of an example of a system capable of reading and writing data from and to a secondary storage device in the present embodiment. In FIG. 1, a processor 1 controls the entire system including a main storage device 2, an extension list 5, and a secondary storage device 6.

主記憶装置2は、ユーザエリア3と、キャッシュバッファ4と、FDテーブル7と、を含んでいる。ユーザエリア3は、アプリケーションが指定するエリアで、二次記憶装置6に転送したいデータが含まれているエリア、或いは二次記憶装置6からデータを転送したいデータが含まれているエリアである。プロセッサ1は、通常はキャッシュバッファ4を通じて二次記憶装置6にアクセスする。   The main storage device 2 includes a user area 3, a cache buffer 4, and an FD table 7. The user area 3 is an area designated by the application, and is an area containing data to be transferred to the secondary storage device 6 or an area containing data to be transferred from the secondary storage device 6. The processor 1 usually accesses the secondary storage device 6 through the cache buffer 4.

FDテーブル7は、図2に示されるように、ファイルディスクリプタごとにNBと呼ばれるフラグを格納する領域を有している。図2は、FDテーブルの一例を示す図である。拡張子リスト5は、図3のように再利用される可能性の低いファイルの拡張子が記録されている。図3は、拡張子リストの一例を示す図である。   As shown in FIG. 2, the FD table 7 has an area for storing a flag called NB for each file descriptor. FIG. 2 is a diagram illustrating an example of the FD table. The extension list 5 records file extensions that are unlikely to be reused as shown in FIG. FIG. 3 is a diagram illustrating an example of the extension list.

本実施形態のシステムの動作について、図4のフローチャートを用いて説明する。図4−1は、本実施形態のシステムの動作の一例を示すフローチャート(その1)である。また、図4−2は、本実施形態のシステムの動作の一例を示すフローチャート(その2)である。なお、図4−1のフローチャートは、本実施形態のシステムで動くプログラムのうち、アプリケーションがファイルを扱う前にコールするopen()について、本実施形態の特徴的な部分のみを記述している。また、図4−2のフローチャートは、本実施形態のシステムで動くプログラムのうち、アプリケーションがファイルのデータを読み書きするときのread()/write()について、本実施形態の特徴的な部分のみを記述している。   The operation of the system of this embodiment will be described with reference to the flowchart of FIG. FIG. 4A is a flowchart (part 1) illustrating an example of the operation of the system according to the present embodiment. FIG. 4B is a flowchart (part 2) illustrating an example of the operation of the system according to the present embodiment. The flowchart in FIG. 4A describes only the characteristic part of the present embodiment regarding the open () that is called before the application handles the file among the programs running on the system of the present embodiment. The flowchart of FIG. 4-2 shows only the characteristic part of the present embodiment regarding read () / write () when the application reads and writes file data among the programs running on the system of the present embodiment. It is described.

アプリケーションがopen()をコールすると、S1のopen処理が行われる。S1の処理は、一般のシステムで行われるopen()の処理を示しており、open()は、引数で指定されたファイル名に相当するファイルにアクセスするために必要な準備をし、必要であればファイルを作成する。そして、open()は、そのファイルにアクセスするためのファイルディスクリプタと呼ばれるIDを割り当てる。   When the application calls open (), the open process of S1 is performed. The process of S1 shows the process of open () performed in a general system. The open () prepares and is necessary for accessing the file corresponding to the file name specified by the argument. Create a file if it exists. Open () assigns an ID called a file descriptor for accessing the file.

指定されたファイルが存在しない、作成できない、アクセス権がない等の理由でエラーになったときは、open()は処理を終了する。   If an error occurs because the specified file does not exist, cannot be created, or there is no access right, open () terminates the process.

open処理が成功したときはS2に進む。S2では、open()は、与えられたファイル名の拡張子が拡張子リスト5に存在するかどうかを検査する。存在すれば、S3において、open()は、FDテーブルの与えられたファイルディスクリプタに相当するNBフラグを1にして処理を終了する。与えられた拡張子が拡張子リスト5に存在しない場合は、S4において、open()は、対応するNBフラグを0にして処理を終了する。   When the open process is successful, the process proceeds to S2. In S <b> 2, open () checks whether the extension of the given file name exists in the extension list 5. If present, in S3, open () sets the NB flag corresponding to the file descriptor given in the FD table to 1, and ends the process. If the given extension does not exist in the extension list 5, open () sets the corresponding NB flag to 0 in S4 and ends the process.

次にアプリケーションがファイルのデータにアクセスするためにread()/write()をコールしたときのシステムの動作について図4−2のフローチャートを用いて説明する。まず始めに、read()/write()は、S11で引数として与えられたファイルディスクリプタに相当するNBフラグを調べ、それが1であればS12へ、0であればS13に進む。   Next, the operation of the system when an application calls read () / write () to access file data will be described with reference to the flowchart of FIG. First, read () / write () checks the NB flag corresponding to the file descriptor given as an argument in S11. If it is 1, the process proceeds to S12, and if it is 0, the process proceeds to S13.

S12ではread()/write()は、キャッシュバッファ4を使わずにread/write処理を行う。ここでは、read()/write()は、可能であれば二次記憶装置6と、ユーザエリア3とで直接データを転送する。しかし、直接データ転送できない場合、read()/write()は、キャッシュバッファ4のうち1セクタ分の領域1つだけを選択し、このキャッシュバッファエリアのみを経由してデータ転送を行う。これにより、キャッシュバッファに既に入っているデータが追い出されることが無くなるか、あったとしても1セクタ分のデータだけが追い出されるだけで済む。   In S <b> 12, read () / write () performs read / write processing without using the cache buffer 4. Here, read () / write () transfers data directly between the secondary storage device 6 and the user area 3 if possible. However, when direct data transfer is not possible, read () / write () selects only one area for one sector from the cache buffer 4 and performs data transfer only through this cache buffer area. As a result, data already stored in the cache buffer is not expelled, or even if only one sector of data is expelled.

なお、直接データ転送できない場合としては、例えば、二次記憶装置6が扱えるデータ長と、read()/write()で指定されたデータ長と、が違う場合がある。また、直接データ転送できない場合としては、例えば、アプリケーションが要求したデータの先頭からのオフセットが、二次記憶装置6が扱えるデータの最小単位であるセクタの倍数になっていない場合等がある。   As a case where direct data transfer is not possible, for example, the data length that can be handled by the secondary storage device 6 may be different from the data length specified by read () / write (). As a case where direct data transfer is not possible, for example, there is a case where the offset from the head of the data requested by the application is not a multiple of the sector which is the minimum unit of data that can be handled by the secondary storage device 6.

S13では、read()/write()は、キャッシュバッファ4を利用して通常のアクセスを行う。S12かS13の処理が終わるとread()/write()は、処理を終了する。   In S <b> 13, read () / write () performs normal access using the cache buffer 4. When the process of S12 or S13 ends, read () / write () ends the process.

(第2の実施形態)
次に、拡張子リストの代わりにファイルタイプDBを持ち、それによって再利用される可能性の低いファイルであるかどうかを判断する実施形態を示す。JPEG,MPEG,MP3等の標準的なファイルフォーマットは、先頭の数バイトに特徴的なデータパターンが含まれている。
(Second Embodiment)
Next, an embodiment for determining whether a file has a file type DB instead of an extension list and is less likely to be reused will be described. Standard file formats such as JPEG, MPEG, and MP3 include characteristic data patterns in the first few bytes.

例えば画像ファイルのフォーマットとして標準的なJPEGの場合は先頭の2バイトが0xff,0xd8である。あmた、動画ファイルのフォーマットとして標準的なMPEGの場合は先頭の4バイトが0x00,0x00,0x01,0xb3である。従って、それを調べればファイル名の拡張子が信頼できない場合でもそのデータの種類を判別することができる。   For example, in the case of standard JPEG as an image file format, the first two bytes are 0xff and 0xd8. In the case of standard MPEG as a moving image file format, the first 4 bytes are 0x00, 0x00, 0x01, 0xb3. Therefore, by examining this, even if the extension of the file name is not reliable, the type of the data can be determined.

図5は、本実施形態における、二次記憶装置にデータを読み書きできるシステムの一例のシステム構成図である。図5において、プロセッサ11は、主記憶装置12、ファイルタイプDB15、二次記憶装置12を含むシステム全体を制御する。   FIG. 5 is a system configuration diagram of an example of a system capable of reading and writing data from and to the secondary storage device in the present embodiment. In FIG. 5, the processor 11 controls the entire system including the main storage device 12, the file type DB 15, and the secondary storage device 12.

主記憶装置12は、ユーザエリア13と、キャッシュバッファ14と、FDテーブル17と、を含んでいる。ユーザエリア13は、アプリケーションが指定するエリアで、二次記憶装置16に転送したいデータが含まれているエリア、或いは二次記憶装置16からデータを転送したいエリアである。プロセッサ11は、通常はキャッシュバッファ14を通じて二次記憶装置16にアクセスする。   The main storage device 12 includes a user area 13, a cache buffer 14, and an FD table 17. The user area 13 is an area designated by the application, is an area that contains data to be transferred to the secondary storage device 16, or is an area where data is to be transferred from the secondary storage device 16. The processor 11 normally accesses the secondary storage device 16 through the cache buffer 14.

FDテーブル17は、ファイルディスクリプタごとにNBと呼ばれるフラグを格納する領域を有している。ファイルタイプDB15は、図6のように再利用される可能性の低いファイルフォーマットの先頭に現れるバイト列が記録されている。図6は、ファイルタイプDBの一例を示す図である。   The FD table 17 has an area for storing a flag called NB for each file descriptor. In the file type DB 15, a byte string that appears at the beginning of a file format that is unlikely to be reused as shown in FIG. 6 is recorded. FIG. 6 is a diagram illustrating an example of the file type DB.

本実施形態のシステムの動作について、図7及び図8のフローチャートを用いて説明する。図7は、本実施形態のシステムの動作の一例を示すフローチャート(その1)である。また、図8は、本実施形態のシステムの動作の一例を示すフローチャート(その2)である。   The operation of the system of this embodiment will be described using the flowcharts of FIGS. FIG. 7 is a flowchart (part 1) illustrating an example of the operation of the system according to the present embodiment. FIG. 8 is a flowchart (part 2) illustrating an example of the operation of the system of the present embodiment.

なお、図7のフローチャートは、本実施形態のシステムで動くプログラムのうち、アプリケーションがファイルを扱う前にコールするopen()について、本実施形態の特徴的な部分のみを記述している。また、図8のフローチャートは、本実施形態のシステムで動くプログラムのうち、ファイルのデータを読み書きするときのread()/write()について、本実施形態の特徴的な部分のみを記述している。   Note that the flowchart of FIG. 7 describes only the characteristic part of this embodiment with respect to open () that is called before the application handles the file among the programs that run in the system of this embodiment. Further, the flowchart of FIG. 8 describes only the characteristic part of the present embodiment regarding read () / write () when reading / writing file data among the programs running on the system of the present embodiment. .

アプリケーションがopen()をコールすると、S21のopen処理が行われる。S21の処理は、一般のシステムで行われるopen()の処理を示しており、open()は、引数で指定されたファイル名に相当するファイルにアクセスするために必要な準備をし、必要であればファイルを作成する。そして、open()は、そのファイルにアクセスするためのファイルディスクリプタと呼ばれるIDを割り当てる。   When the application calls open (), the open process of S21 is performed. The process of S21 shows the process of open () performed in a general system. The open () prepares and is necessary for accessing the file corresponding to the file name specified by the argument. Create a file if it exists. Open () assigns an ID called a file descriptor for accessing the file.

指定されたファイルが存在しない、作成できない、アクセス権がない等の理由でエラーになったときは、open()は処理を終了する。   If an error occurs because the specified file does not exist, cannot be created, or there is no access right, open () terminates the process.

open処理が成功したときはS22に進む。S22では、open()は、引数で与えられたファイルが新規ファイルか否かを調べ、新規ファイルであればS24へ、既存ファイルであればS23に移る。   If the open process is successful, the process proceeds to S22. In S22, open () checks whether or not the file given by the argument is a new file. If it is a new file, the process proceeds to S24, and if it is an existing file, the process proceeds to S23.

S24では、open()は、FDテーブルの与えられたファイルディスクリプタに対応するNBフラグを2にした後、処理を終了する。   In S24, open () sets the NB flag corresponding to the given file descriptor in the FD table to 2, and then ends the process.

S23では、open()は、ファイルの先頭のデータを読む。読み込むデータ長はファイルタイプDB15に登録されているバイト列のうちで最長のバイト数である。その後S25に進み、open()は、ファイルタイプDBに登録されているバイト列を調べ、読み込んだファイルの先頭データと一致するものがあるか否かを調べる。   In S23, open () reads the top data of the file. The data length to be read is the longest number of bytes in the byte sequence registered in the file type DB 15. Thereafter, the process proceeds to S25, in which open () checks the byte string registered in the file type DB, and checks whether there is a match with the head data of the read file.

一致するバイト列があれば、open()は、S26に進む。一致するバイト列がなければ、open()は、S27に進む。S26では、open()は、対応するNBフラグを1にして処理を終了する。S27では、open()は、対応するNBフラグを0にして処理を終了する。   If there is a matching byte string, open () proceeds to S26. If there is no matching byte string, open () proceeds to S27. In S26, open () sets the corresponding NB flag to 1 and ends the process. In S27, open () sets the corresponding NB flag to 0 and ends the process.

次にアプリケーションがファイルのデータにアクセスするためにread()/write()をコールしたときの動作について図8のフローチャートを用いて説明する。まず始めに、read()/write()は、S31で引数として与えられたファイルディスクリプタに相当するNBフラグを調べ、それが0であればS35へ、1であればS36へ、2であればS32へ進む。   Next, the operation when the application calls read () / write () to access file data will be described with reference to the flowchart of FIG. First, read () / write () checks the NB flag corresponding to the file descriptor given as an argument in S31. If it is 0, it goes to S35, if it is 1, it goes to S36. Proceed to S32.

S32に進んだ場合、それは新規ファイルに対するwrite()コールであり、引数で書き込むべきデータ列が与えられている。ここでは、write()は、ファイルタイプDBに登録されているバイト列を調べ、書き込むべきデータ列の先頭と一致するものがあるか否かを調べる。   When the process proceeds to S32, it is a write () call for a new file, and a data string to be written is given as an argument. Here, write () checks the byte string registered in the file type DB, and checks whether there is a match with the head of the data string to be written.

一致するバイト列があればread()/write()は、S34に進み、一致するバイト列がなければread()/write()は、S33に進む。S33では、read()/write()は、対応するNBフラグを0にしてS35に移る。S34では、read()/write()は、対応するNBフラグを1にしてS36に移る。   If there is a matching byte sequence, read () / write () proceeds to S34, and if there is no matching byte sequence, read () / write () proceeds to S33. In S33, read () / write () sets the corresponding NB flag to 0 and proceeds to S35. In S34, read () / write () sets the corresponding NB flag to 1, and proceeds to S36.

S35では、read()/write()は、キャッシュバッファを利用して通常のアクセスを行う。S36では、read()/write()は、キャッシュバッファを使わずにread/write処理を行う。ここでは、read()/write()は、可能であれば二次記憶装置16と、ユーザエリア13とで直接データを転送する。しかし、直接データ転送できない場合、read()/write()は、キャッシュバッファ14のうち1セクタ分の領域1つだけを選択し、このキャッシュバッファエリアのみを経由してデータ転送を行う。これにより、キャッシュバッファに既に入っているデータが追い出されることが無くなるか、あったとしても1セクタ分のデータだけが追い出されるだけで済む。   In S35, read () / write () performs normal access using the cache buffer. In S36, read () / write () performs read / write processing without using a cache buffer. Here, read () / write () transfers data directly between the secondary storage device 16 and the user area 13 if possible. However, if direct data transfer is not possible, read () / write () selects only one area for one sector from the cache buffer 14 and performs data transfer only through this cache buffer area. As a result, data already stored in the cache buffer is not expelled, or even if only one sector of data is expelled.

なお、直接データ転送できない場合としては、例えば、二次記憶装置16が扱えるデータ長と、read()/write()で指定されたデータ長と、が違う場合等がある。また、直接データ転送できない場合としては、例えば、アプリケーションが要求したデータの先頭からのオフセットが、二次記憶装置16が扱えるデータの最小単位であるセクタの倍数になっていない場合等がある。   As a case where data cannot be directly transferred, for example, the data length that can be handled by the secondary storage device 16 is different from the data length specified by read () / write (). As a case where direct data transfer is not possible, for example, there is a case where the offset from the head of the data requested by the application is not a multiple of the sector which is the minimum unit of data that can be handled by the secondary storage device 16.

S35かS36の処理が終わるとread()/write()は終了を終了する。   When the process of S35 or S36 is finished, read () / write () finishes the end.

以上、上述したように各実施形態によれば、再利用される可能性の高いメタデータや設定ファイル等がキャッシュバッファから追い出されるのを防ぎ、効率的なファイルアクセスをアプリケーションの変更なしに提供することができる。   As described above, according to each embodiment as described above, it is possible to prevent metadata and setting files that are highly likely to be reused from being evicted from the cache buffer, and to provide efficient file access without application changes. be able to.

以上、本発明の好ましい実施形態について詳述したが、本発明は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   The preferred embodiments of the present invention have been described in detail above, but the present invention is not limited to such specific embodiments, and various modifications can be made within the scope of the gist of the present invention described in the claims.・ Change is possible.

本実施形態における、二次記憶装置にデータを読み書きできるシステムの一例のシステム構成図である。It is a system configuration figure of an example of a system which can read and write data to a secondary storage unit in this embodiment. FDテーブルの一例を示す図である。It is a figure which shows an example of FD table. 拡張子リストの一例を示す図である。It is a figure which shows an example of an extension list | wrist. 本実施形態のシステムの動作の一例を示すフローチャート(その1)である。It is a flowchart (the 1) which shows an example of operation | movement of the system of this embodiment. 本実施形態のシステムの動作の一例を示すフローチャート(その2)である。It is a flowchart (the 2) which shows an example of operation | movement of the system of this embodiment. 本実施形態における、二次記憶装置にデータを読み書きできるシステムの一例のシステム構成図である。It is a system configuration figure of an example of a system which can read and write data to a secondary storage unit in this embodiment. ファイルタイプDBの一例を示す図である。It is a figure which shows an example of file type DB. 本実施形態のシステムの動作の一例を示すフローチャート(その1)である。It is a flowchart (the 1) which shows an example of operation | movement of the system of this embodiment. 本実施形態のシステムの動作の一例を示すフローチャート(その2)である。It is a flowchart (the 2) which shows an example of operation | movement of the system of this embodiment.

符号の説明Explanation of symbols

1 プロセッサ
2 主記憶装置
3 ユーザエリア
4 キャッシュバッファ
5 拡張子リスト
6 二次記憶装置
7 FDテーブル
1 processor 2 main storage device 3 user area 4 cache buffer 5 extension list 6 secondary storage device 7 FD table

Claims (6)

二次記憶装置に記憶されているファイルを扱う情報処理装置であって、
アクセスする前記ファイルが再利用される可能性の低いファイルか否かを判断する判断手段を有し、
前記判断手段において、アクセスする前記ファイルが再利用される可能性の低いファイルであると判断された場合には、キャッシュバッファを利用しないで前記ファイルにアクセスし、前記判断手段において、アクセスするファイルが再利用される可能性の高いファイルであると判断された場合には、前記キャッシュバッファを利用して前記ファイルにアクセスするアクセス手段を更に有することを特徴とする情報処理装置。
An information processing apparatus that handles files stored in a secondary storage device,
Determining means for determining whether or not the file to be accessed is a file that is unlikely to be reused;
If it is determined by the determination means that the file to be accessed is a file that is unlikely to be reused, the file is accessed without using a cache buffer, and the file to be accessed is determined by the determination means. An information processing apparatus, further comprising an access unit that accesses the file using the cache buffer when it is determined that the file has a high possibility of being reused.
二次記憶装置に記憶されているファイルを扱う情報処理装置であって、
アクセスする前記ファイルが再利用される可能性の低いファイルか否かを判断する判断手段を有し、
前記判断手段において、アクセスする前記ファイルが再利用される可能性の低いファイルであると判断された場合には、キャッシュバッファの一部分を利用して前記ファイルにアクセスし、前記判断手段において、アクセスするファイルが再利用される可能性の高いファイルであると判断された場合には、前記キャッシュバッファの大部分を利用して前記ファイルにアクセスするアクセス手段を更に有することを特徴とする情報処理装置。
An information processing apparatus that handles files stored in a secondary storage device,
Determining means for determining whether or not the file to be accessed is a file that is unlikely to be reused;
If the determining means determines that the file to be accessed is a file that is unlikely to be reused, the file is accessed using a part of a cache buffer, and the determining means accesses the file. An information processing apparatus, further comprising: an access unit configured to access the file using a large part of the cache buffer when it is determined that the file is highly likely to be reused.
前記判断手段は、再利用される可能性が低いファイルのフォーマットの拡張子を含む拡張子情報を用いて、アクセスする、前記二次記憶装置に記憶されているファイルが再利用される可能性の低いファイルか否かを判断することを特徴とする請求項1又は2に記載の情報処理装置。   The determination means accesses the file stored in the secondary storage device using the extension information including the extension of the file format that is unlikely to be reused. The information processing apparatus according to claim 1, wherein it is determined whether the file is a low file. 前記判断手段は、再利用される可能性が低いファイルのフォーマットの先頭のバイト列を含む先頭バイト列情報を用いて、アクセスする、前記二次記憶装置に記憶されているファイルが再利用される可能性の低いファイルか否かを判断することを特徴とする請求項1又は2に記載の情報処理装置。   The determination means uses the first byte string information including the first byte string of the file format that is unlikely to be reused, and the file stored in the secondary storage device that is accessed is reused. The information processing apparatus according to claim 1, wherein the information processing apparatus determines whether the file has a low possibility. 二次記憶装置に記憶されているファイルを扱う情報処理装置におけるファイルアクセス方法であって、
アクセスする前記ファイルが再利用される可能性の低いファイルか否かを判断する判断ステップを有し、
前記判断ステップにおいて、アクセスする前記ファイルが再利用される可能性の低いファイルであると判断された場合には、キャッシュバッファを利用しないで前記ファイルにアクセスし、前記判断ステップにおいて、アクセスするファイルが再利用される可能性の高いファイルであると判断された場合には、前記キャッシュバッファを利用して前記ファイルにアクセスするアクセスステップを更に有することを特徴とするファイルアクセス方法。
A file access method in an information processing apparatus that handles a file stored in a secondary storage device,
Determining whether the file to be accessed is a file that is unlikely to be reused;
If it is determined in the determining step that the file to be accessed is a file that is unlikely to be reused, the file is accessed without using a cache buffer. In the determining step, the file to be accessed The file access method further comprising an access step of accessing the file using the cache buffer when it is determined that the file has a high possibility of being reused.
二次記憶装置に記憶されているファイルを扱う情報処理装置におけるファイルアクセス方法であって、
アクセスする前記ファイルが再利用される可能性の低いファイルか否かを判断する判断ステップを有し、
前記判断ステップにおいて、アクセスする前記ファイルが再利用される可能性の低いファイルであると判断された場合には、キャッシュバッファの一部分を利用して前記ファイルにアクセスし、前記判断ステップにおいて、アクセスするファイルが再利用される可能性の高いファイルであると判断された場合には、前記キャッシュバッファの大部分を利用して前記ファイルにアクセスするアクセスステップを更に有することを特徴とするファイルアクセス方法。
A file access method in an information processing apparatus that handles a file stored in a secondary storage device,
Determining whether the file to be accessed is a file that is unlikely to be reused;
If it is determined in the determining step that the file to be accessed is a file that is unlikely to be reused, the file is accessed using a part of a cache buffer, and the file is accessed in the determining step. The file access method, further comprising: an access step of accessing the file using a large part of the cache buffer when it is determined that the file is highly likely to be reused.
JP2006166561A 2006-06-15 2006-06-15 Information processor and file access method Pending JP2007334687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006166561A JP2007334687A (en) 2006-06-15 2006-06-15 Information processor and file access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006166561A JP2007334687A (en) 2006-06-15 2006-06-15 Information processor and file access method

Publications (1)

Publication Number Publication Date
JP2007334687A true JP2007334687A (en) 2007-12-27

Family

ID=38934103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006166561A Pending JP2007334687A (en) 2006-06-15 2006-06-15 Information processor and file access method

Country Status (1)

Country Link
JP (1) JP2007334687A (en)

Similar Documents

Publication Publication Date Title
US7921083B2 (en) File management device and electronic equipment
US7831578B2 (en) Apparatus for file system management with virtual file name
US8239395B2 (en) Storage device presenting to hosts only files compatible with a defined host capability
US20080222348A1 (en) File system for managing files according to application
KR100790991B1 (en) Method for managing metadata of file system using DBMS
JP5194005B2 (en) Application program interface for managing media files
US7415572B2 (en) File system, file recording method, and file reading method
US9959046B2 (en) Multi-streaming mechanism to optimize journal based data storage systems on SSD
JP2008107965A (en) Information processing apparatus, information processing method, program, and program recording medium
TWI302298B (en) Recordable record carrier having a user area, recording apparatus and method for recording information on recordable record carrier having a user area, and computer readable medium
JP5259780B2 (en) Video file creation apparatus and video file creation method
JP2005301853A (en) Information processor and information processing method, program, and storage medium
KR100982118B1 (en) Recording device, recording method, and recording medium
US8478109B2 (en) Recording apparatus and method, program, and storage medium
US7689807B2 (en) Mass storage device, mass storage controller and methods for use therewith
JP2007334687A (en) Information processor and file access method
JP2009277077A (en) Recording/reproducing apparatus and information processing method
JP4984677B2 (en) Information processing device
JP2003150416A (en) File management device and method therefor
US9015127B2 (en) File archiving system and method
US20110106861A1 (en) Interface Techniques Providing Contiguous Storage For Files
EP2256648A1 (en) Method for storing data files, method for reading data content, and data store
JP5245260B2 (en) File processing program, file processing method, file processing apparatus, and function program
JP4480592B2 (en) File system
JP2008186053A (en) File management device, file management method and file management program