Abstract:
A system and method for determining when data stored in a data storage device is becoming unreliable. A list of trigger events is maintained, either on the media, or on a host processor, and the number of trigger events pertaining to data retrieval errors is also maintained either on the disc media or on the host processor. Based upon the trigger events and the running totals, the disc media is scanned for errors from time to time and the error detecting algorithm can change depending upon the respective trigger totals. The triggers are typically representative of events likely to cause errors to occur and can be tailored to different types of storage media

Description:
BACKGROUND OF THE INVENTION 
     Data storage devices have methods to ensure the integrity of the data. In one method, called “read-after-write,” data is put onto the media, and is then immediately read to ensure that the data was correctly written. There is also a process that separately and non-automatically looks at the media and checks to see that it can be read back from the device. This disc verification is a utility (called ScanDisk) that can be used on current PCs. 
     The mechanism of read-after-write is disadvantageous in a slow device in that it takes a significant amount of extra time to run that process. For example, a CD has a much slower read and write speed than does a hard drive. The data rates for a CD for writing are something today between 300 and 600 Kbytes per second, and a hard drive is on the order of ten times faster than that. The reading speed of a CD is about six times faster than the writing speed, and a hard drive reading speed is the same as the writing speed. Thus, if the user needs to conduct an operation on a CD where data is written and read back, it will be significantly slower than if the user were able to simply write the data to the disc without verifying it. This is how the file system for CD currently works. Data is written but not verified. 
     When the user does a format operation to prepare a CD disc for taking data, the system typically writes to that disc to arrange where the data will ultimately be put and then verifies that the data is able to be read back. But after the data has been written, the user has no assurance that something hasn&#39;t happened to damage the disc between the time of format and the time of writing data. Any rewritable particular media will be used over a long period of time, and many things can happen to that disc. The disc can be scratched, get fingerprints and dirt on it, etc.—All of these factors will affect both the successful writing of additional data as well as reading of the data. 
     On a hard disk, the media is in a very controlled, sealed environment. You cannot put a fingerprint on a hard disk. You cannot get dirt on a hard disk. But a removable media is exposed to the environment, thereby making it more vulnerable to damage. CD media is particularly susceptible to this damage because it is the only rewritable media that does not have a protective case (i.e. audio tapes, VCR tapes, floppy disks, etc.) When a user does the formatting and verifying, the disc is physically secure since it is in a device away from fingers, etc. But when the CD is removed from the drive problems arise. This is a significant difference between hard disk and CD technology. 
     All data storage devices take advantage of error correction designed in the format. There are many error correction algorithms. They are all effective in correcting errors and defects, but every method has limitations. A thick thumb print on a CD disc, for instance, will render sections of the CD disc unreadable. Since this type of reusable media is in a very unprotected environment, it will be handled and is likely to become soiled and damaged at random times over a long period of time. Therefore, a method is needed to ensure the steadfastness of data integrity. 
     SUMMARY OF THE INVENTION 
     These and other objects, features and technical advantages are achieved by an improved system and method which automatically performs disc verification on the disc without any user intervention. It would run at appropriate intervals, determined by looking at certain parameters of the disc, in order to insure a minimum risk of either data unreadability or data being written on a location unsuccessfully. The improved system includes the error correction processes that currently apply to CD&#39;s, but the algorithms will look at the disc and the usage of the disc, in particular, how much the disc has been handled by a user. It will then determine the appropriate time to automatically run the disc verification function and repair of the disc. 
     One of the features of the error correction on a CD as compared to a hard disk, is that a hard disk will only tell the user whether the data is good or bad. Either the ECC worked or it did not work to correct the data. CD technology typically set a threshold on how much ECC is used before informing the system to relocate the data because of risk of lost data. CD technology also typically allows for the system to inquire how much ECC was used to read the data. The improved system uses this method of inquiring how much ECC was used to intelligently determine if disc verification is required. 
     Since the process of assessing, cleaning up the disc, and relocating data is done in the background, this system achieves additional protection without having to do a read back after the write process. Consequently, the improved system gains the performance of a write-it-and-go-on device, while preserving the protection of being able to check the disc at regular and appropriate intervals. 
     The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and the specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which: 
     FIG. 1 is a diagram of the operation of the trigger event recording; and 
     FIG. 2 is a diagram of the operation of error checking as a function of set trigger limits being exceeded. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Turning now to FIG. 1, box  101  which advantageously runs on a host processor, such as a PC, or other computing device, monitors the trigger events which occur. The definitions of the trigger events to be monitored are stored on the portable storage medium, (or on the host computer or on a network). Box  102  contains and controls the triggers, which by way of example could be number of media inserts; number of hours of use; number of files that have changed; number of errors or type of errors per hour of use; change in the sparing table; or the differences in the files date and time stamps. 
     One trigger could be a specified number of times that the media has been inserted into the drive unit of the host processor (not shown). The number of insertions is an indication that someone had to handle it at least x number of times because every time it is inserted it is by a handling process. You don&#39;t really know how many other times it has been handled when it is outside the drive so this is a little bit indirect. Each time the disc is inserted in the improved system a counter on the disc would be incremented. When it reached a predetermined value the disc verification process would begin. When completed the counter would be cleared. If data was recovered but took a predetermine amount of ECC the data would be automatically move to a good area on the disc. 
     A second trigger could be the number of hours of use of the storage media. 
     The number of hours of use is a further abstraction. The medium could have been sitting inside the drive a long time but the assumption is that after the disc is used so many times it would have been swapped out with other discs. So it is getting at how long the disc has been used and assuming that if it has been used a number of periods of time it would have been removed several times. The system could actually record use on the medium, or on the host. The length of time the disc is in use could be stored on the disc in the improved system. This location would be updated each time the disc was in use. When it reached a predetermined value the disc verification process would begin. When completed this location would be clearer. If data was recovered but took a predetermined amount of ECC the data would be automatically move to a good area on the disc. 
     A third trigger could be the number of files that have changed. The improved system would watch the number of files that have been written and how many files have been removed. The number of files that have changed (added, modified or deleted) could be stored on the disc in the improved system. This location would be updated each time files changed. When it reached a predetermined value the disc verification process would begin. When completed this location would be cleared. If data was recovered but took a predetermine amount of ECC the data would be automatically move to a good area on the disc. 
     A fourth trigger is the number and type of errors received. By reading the data the system generates information about how much of the ECC has been involved. That information can be requested along with the data and so the system can set its threshold based on that. In the current CDs there are three levels of error correction. Call them C 1 , C 2  and C 3 . Basically, C 1  and C 2  are combined and you get information about how much of C 1  and C 2  were required to recover the data if there was an error. And then you also get that same information on C 3 . If C 1  and C 2  could not correct it, it will go to C 3  to correct it and the information as to what level of C 3  error correction was required to recover the data is available. 
     The point is even when you are successful reading the data, you can get some information about how difficult it was and the improved system would utilize the information that is available to make some additional decisions about whether it is appropriate to look for errors on the entire disc. 
     If the improved system becomes aware that there are a high number of errors occurring during reading, this is an indication that the improved system should look at the entire disc rather than just what the user was reading right then. 
     The improved system could be set up to readjust the portions that have data or the entire disc. This is important since it increases the likelihood of errors at any location. Running the disc verification routine will allow for the detection of trouble conditions before a user ever tries to write to that area. 
     If the improved system determines that there are significant portions of bad areas on the disc, it could alert the user that it is time to copy to another disc. Another feature of the improved system is that it will detect contamination and could inform the user to clean the disc before trouble occurs. 
     The fifth trigger is a change in the sparing table. The sparing table is where the storage device records the places that cannot be written to. The system watches that table and as more locations are added to that table the system knows that the disc is wearing out or that there is additional dirt on the disc. The file system writes that table. So the computer and device as it exists today manage the media and as they are unsuccessful in reading something back or get high error rates they will be relocating data, so our method watches that sparing table and determines when its time to look again at the whole disc. 
     A fifth trigger could be to determine the difference in data and time between the newest file and the oldest file. This time delta would be saved on the disc. When the delta reaches a predetermined value the disc verification process would begin. When completed this value would be marked as verified. A new time delta would be started from the time delta marked as verified. When this new delta reached a predetermined value the disc verification process would begin. This new time delta would then be stored where the old time delta was and would be marked as verified. If data was recovered but took a predetermine amount of ECC the data would be automatically move to a good area on the disc. 
     This method is similar to trigger numbers two and three. It has the advantage that continuous monitoring of the files on the disc is not required. It has the disadvantage that only one file of significant time delay could trigger the disc verification process. 
     Box  103  checks for trigger events and simply logs the various events into table  104 . Some trigger events, however, need not be captured in a table since they are in tables already and that table acts as a trigger such that when that table gets too full (for example, the error table) the system reacts. 
     FIG. 2 shows the control of the algorithm that determines when to initiate a disc verification process automatically. The user will not have to invoke this procedure. Most users do not have the kind of knowledge to know that they should run a disc verification and thus a key point is to put the intelligence into the system to determine when a disc verification should be run. Even a very experienced user would not necessarily know when this should be done, because if the user had a CD for some time and then handed it to a friend, that friend would not know the state of that disc, nor how much it had been handled, nor how long it had been since it had been cleaned up, etc. Additionally, the friend&#39;s device may perform differently with the disc. It may read with more or less errors do to better or worse optics. Using this improved system, a portable memory can have multiple users and multiple owners and still be cared for properly. 
     Box  201  compares the trigger events table against each individual trigger event set limit box  202  to determine if the set limit has been reached. If it has been reached diagnosis are run, box  205 , which diagnosing could be a disc verification routine, or could be particular to a given type of trigger, if desired. Note also that the trigger limits can be adjusted, as desired, either by a user, or by the system or from information obtained externally, such as from a network/web. 
     Box  206  reads the medium and box  207  detects and stores errors, or invokes the error table and blocks certain portions of the medium from further use in cooperation with box  208 . In some situations, the trigger event table is updated. Box  205  controls whatever action, such as notifying a user, changing speeds of the system, etc., as appropriate, given the error condition. 
     There is actually a whole series of protocols that can be used around this concept. One is that nothing is done until the system reaches a certain threshold, for example the error table is 50% full. There could be a nonlinear progression so that as it gets more full disc verification is run more often. Another could be the rate of change you are using the disc and nothing is happening in that table. All of a sudden the system starts to see the table fill up rapidly. The improved system could implement disc verification more often as the rate of that table fills up. 
     The trigger event list as well as the trigger event occurrence list can be stored on the CD disc, on a public medium or on a host processor. The host processor could transfer one or both of these lists to the portable device at certain times, periodically, or upon certain events, such as the removal of the device from that host, or upon a command from the user. 
     The improved system described is primarily designed for CD&#39;s running in conjunction with a PC or host processor. However, any system using a portable data storage medium can take advantage of the concepts taught herein. For example, DVD&#39;s and other storage devices can be scanned to know when their useful life is compromised, or to know when to move data to an alternate storage location before that data is lost forever. In some situations, even the hard drive of the processor can be mainframed in this fashion. 
     Although the present invention and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.