1. Field of the Invention
The present invention relates to an information recording/reproducing apparatus for recording or reproducing information in a recording medium such as an optical disk, and more particularly to an information recording/reproducing apparatus such as a camcorder or a DVD recorder.
2. Related Background Art
Conventionally, a disk recording/reproducing apparatus such as a camcorder or a DVD recorder is provided with a cache buffer for temporarily storing data read out from a disk. With the use of the cache buffer, if the data to be read out from the disk exists in the cache buffer, the data can be taken out from the cache buffer without access to the disk. A conventional technique related to the cache buffer is disclosed in, for example, Japanese Patent Application Laid-Open No. 2001-014109.
As to the conventional cache buffer technique, data to be stored cannot be controlled through an application program or a file system, and old data is merely substituted by newly read data. Therefore, the technique has a problem in that, even if the data planned to be read again does not exist on the cache buffer, access to a disk is caused at the time of re-reading, which takes time. In the technique disclosed in Japanese Patent Application Laid-Open No. 2001-014109, weighting is performed to data in a cache buffer area, and overwriting is performed in order from the data with the minimum weight. The technique increases a possibility that necessary data remains in the cache. However, the application program or file system cannot specifically designate the data for overwriting since weighting is automatically carried out.
The present invention has been made in view of the above, and therefore has an object to provide an information recording/reproducing method and apparatus which can reduce the frequency of access to an information recording medium as much as possible and shorten reading/writing time.
The information recording/reproducing method and apparatus of the present invention are as follows.
The information recording/reproducing method includes the steps of:
storing data read out from a recording medium, into a cache buffer; and
setting the data stored in the cache buffer to overwrite inhibited.
Further, the information recording/reproducing apparatus includes:
a controller for giving an instruction on recording/reproducing data in/from a recording medium;
a cache buffer for storing the reproduced data; and
a circuit for setting the data stored in the cache buffer to overwrite inhibited.
Description will be made of the best mode for implementing the present invention in detail with reference to the drawings.
The file system driver 2 checks a free area on the disk 8 and a recording position of a file to instruct a disk controller 6 to perform reading/writing of data to the disk 8. At this point, the application program 1 does not need to consider the position of the data on the disk 8. The file system driver 2 searches for the free area on the disk 8 for recording, or retrieves the position of the data on the disk 8 for reading.
The disk controller 6 writes the data stored in the memory 5 to the disk 8, or reads data from the disk 8 to the memory 5. Data 9 is actual data written on the disk 8, and reading/writing of data from/to the disk 8 is performed by means of a recording/reproducing head 7. In this embodiment, one file may be recorded in a continuous area, or plural sets of data may be recorded in different areas. A group of data recorded in a continuous area, which forms a part of the file is referred to as an extent.
Further, as described later, the application program 1 and the file system driver 2 each have a function of setting predetermined data in the cache buffer to “overwrite inhibited”. Thus, when the data to be read out again is set to “overwrite inhibited”, the data is not deleted from the cache buffer. Therefore, access to the disk 8 is not caused at the time of re-reading or re-writing, which can shorten reading/writing time.
Further, the cache buffer area 53 temporarily stores information on the position and size of data (static-image data, text data, etc.) except AV data and a file recorded on a disk, that is, management information of a file system, and stream management information on a relationship between position and size, attribute and the like of the AV data.
The normal data used in the application and the file system is recorded on the disk in sector units (2 KB). Then, when an instruction for reading normal data is issued from the application, necessary data in the data recorded in 64 KB units written on the cache buffer is copied on the designated part (normal data area) on the memory in 2 KB units.
The AV data is originally recorded on the disk in 64 KB units, and thus, can be directly written to the designated part (AV data area) on the memory not through the cache buffer. At the time of real-time recording/reproducing of the AV data, the area is used as a ring buffer, and also has a function of a shock-proof memory.
In the case where the instruction for reading data is given from the application, when an ECC block (in 64 KB units) including data exists on the cache, data is read from the cache without access to the disk. However, when the ECC block does not exist on the cache, data is newly read from the disk.
Further, in the case where the instruction for writing data is given from the application, when the data exists oh the cache, only a necessary part of the data may be rewritten to be returned to the disk. However, when the data does not exist on the cache, it is necessary that the ECC block including the corresponding data is first read from the disk, and a necessary part of the data is rewritten to be returned to the disk.
That is, the cache buffer area 53 includes an overwrite-inhibited portion and an overwrite-permitted portion. The data newly read from the disk 8 is first overwritten on the old data in the overwrite-permitted portion, and the data in the overwrite-inhibited portion remains on the memory 5 until an instruction is given. Accordingly, the data frequently read or rewritten such as management data can be left in the cache buffer area, thereby reducing the number of times of access to the disk 8.
Subsequently, judgment is made on whether the read data is designated as overwrite-inhibited data by the application program 1 or the file system driver 2 (S104).
When the data is set to “overwrite inhibited”, the ECC block including the corresponding data in the cache buffer area 53 is set to “overwrite inhibited” (S105). When the data is not set to “overwrite inhibited”, the ECC block is set to “overwrite permitted” (S106).
Note that the data to be designated as overwrite-inhibited data is previously determined.
For example, the data certain to be used again such as management data is previously determined, and is designated as overwrite-inhibited data on the cache buffer.
At this point, when the objective address exists in the cache buffer area 53, the data (2 KB) in the corresponding part is rewritten (S203), and the rewritten data is written into the disk 8 in ECC block units (S204). On the other hand, when the address does not exist, the ECC block including the corresponding address is once read in the cache buffer area 53 from the disk 8, and is copied in the overwrite-permitted portion in the cache buffer area 53 (S202). Thereafter, the data in the corresponding part is rewritten in the same manner (S203), and the rewritten ECC block is returned to the disk 8 (S204).
Subsequently, a judgment is made on whether the written data is designated as overwrite-inhibited data by the application program 1 or the file system driver 2 or not (S205). At this point, when the data is designated as overwrite-inhibited data, the ECC block including the corresponding data in the cache buffer area 53 is set to “overwrite inhibited” (S206). When the data is not designated as overwrite-inhibited data, the ECC block is set to “overwrite permitted” (S207).
Next, description will be made of effectiveness of the present invention by using specific examples.
When it is considered that AV data is actually written into the disk 8 in a real-time manner, there is the case where processing is performed which updates the file system every constant time as measures against instantaneous disconnection during writing. With the processing, even if the data on the memory 5 disappears due to generation of instantaneous disconnection, the data immediately before update of the file system can be reproduced in the disk 8.
First, management information such as related directory information is read out from the disk 8 in order to record the image. As shown in
At this point, the ECC block for 64 KB including the management information for 8 KB is read from the disk 8. The management information needs to be read again from the disk 8 at the time of update, and thus, is set to “overwrite inhibited” on the cache buffer area 53. As a result, the information does not need to be read again. Note that, in the case where the management information such as the image file management information is newly formed, and does not originally exist on the disk 8, a procedure of reading the management information is omitted.
Next, as to a procedure of recording an image in the disk 8, management information (file system information) is updated while the image is recorded in the disk 8. That is, an image 1 is recorded in the disk 8 for 512 KB, and then, the updated management information is recorded for 8 KB. Subsequently, an image 2 is recorded for 512 KB. At this point, the memory addresses and data size, which serve as recording sources, are as shown in
A 256 sector on the disk 8 corresponds to 512 KB. Thus, the 100256 sector corresponding to a recording start position on the disk 8 of the image 2 is the next sector to a recording completion position on the disk of the image 1. Further, as to the management information for 8 KB, when the ECC block including the update part does not exist on the cache buffer area, the corresponding portion needs to be read out from the disk 8 once. In this case, the ECC block read in the previous time has been set to “overwrite inhibited”, and thus, invariably exists on the cache buffer area. Therefore, it is sufficient that the update portion be rewritten to be returned to the disk 8. Moreover, the update portion is also set to “overwrite inhibited” here. However, the update portion may be set to “overwrite permitted” if it is not necessary hereafter.
Movement of the recording/reproducing head 7 on the disk 8 at this point is shown in
At this point, in the update of the file system information, when the ECC block including the update portion does not exist on the cache buffer area, the corresponding portion needs to be read out from the disk 8 once. The processing of (3) causes troublesome procedures of reading the pre-updated data from the disk 8 and writing the updated data into the disk 8.
In the case where the management information of the file system and the like is updated every constant time as described above, the corresponding portion needs to be read out from the disk 8 once if the ECC block including the management information does not exist on the memory. However, there is a possibility that real-time recording ends in failure due to the time required for the reading procedure
In this embodiment, when the ECC block including the management information is previously set to “overwrite inhibited” in the cache buffer area, the data to be rewritten invariably exists in the memory. Therefore, the procedure of reading data from the disk 8 can be omitted, so only a writing operation has to be performed for disk access. Accordingly, there is remarkably reduced a possibility that real-time recording ends in failure.
This application claims priority from Japanese Patent Application No. 2004-354146 filed on Dec. 7, 2004, which is hereby incorporated by reference herein.
Number | Date | Country | Kind |
---|---|---|---|
2004-354146 | Dec 2004 | JP | national |