These and/or other aspects and advantages of the invention will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
Reference will now be made in detail to the present embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below in order to explain the present invention by referring to the figures.
The access time table 202 stores optimal access times of the hard disk according to different environmental factors by classifying the optimal access times into a plurality of entry values. The environmental factors include, but are not limited to, temperature, humidity, and voltage. When the temperature, humidity, and voltage are not appropriate, the hard disk malfunctions or does not work at all. Thus, a slow access time at which the hard disk can be stably operated is generally used.
For example, when the environment is poor, the hard disk does not work in Entry 1 when the access time is short. However, in Entry 2 at which the access time is relatively slower, the hard disk can be operated because stability is better than in Entry 1. In this case, the entry count value is set to Entry 2 so that the hard disk is operated.
The entry values of the access time table 202 are determined by experiments according to an aspect of the invention. That is, by checking the operation of a hard disk while changing environmental factors such as temperature and humidity, the entry modes are classified from Entry 1 to Entry n by selecting an access time at which the hard disk can be operated at the fastest speed in the respective environment. As described above, Entry 1 is a mode when the access time is shortest and Entry n is a mode when the access time is longest. However, it is understood that one or all of the entries can be otherwise described, such as through modeling of the access times in addition to or instead of through experimentation.
Referring to
The MBR storing unit 206 reads an MBR, which is the first sector of the hard disk, and stores the same as a reference MBR. In detail, the MBR is a record that is first read from a disk when a computer is first booted. The MBR refers to information to identify the position of an OS and load the OS on a main memory device of the computer when the computer starts, and is stored in the first sector of the hard disk or floppy disk. The reference MBR is used later to check how the hard disk is normally operated.
The hard disk status checking unit 208 checks whether the hard disk is normally operated. While not required in all aspects, the status of the hard disk is checked in a method of performing a diagnostic test, a method of checking whether a hard disk ID is read, and/or a method of reading the MBR and checking whether the read MBR matches the reference MBR.
The diagnostic test program is included in the hard disk itself. When a desired value is output in response to a diagnostic test command, the hard disk passes the diagnostic test and the hard disk is determined to be operating normally. When a value other than the desired value is output, the hard disk fails to pass the diagnostic test and the hard disk is determined to not be operating normally.
In the method of checking whether a hard disk ID is read, since the hard disk cannot read an ID when the environment is poor, the hard disk can be determined to be operating normally when the ID of the hard disk can be read. The ID of the hard disk records additional information, such as the storage capacity, model number, and a manufacturer of the hard disk.
In the method of reading the MBR and checking whether the read MBR matches a reference MBR, when the read MBR does not match the reference MBR, the hard disk is determined to not be operating normally. When the access time is too short (the operation speed of the hard disk is too fast), data stored in the MBR may be broken. The mismatch of the MBR and the reference MBR signifies that data is broken so that the hard disk is not operating normally.
The error detection unit 210 detects whether an error is generated during a process of reading or writing data with respect to the hard disk. A time out method is used in the present embodiment as a method to detect an error. According to the time out method, when a particular command is input and no response thereto exists for a predetermined time period, an error is determined to have occurred. However, the error detection method is not limited to the above-described time out method and a variety of error detection methods can be used according to other aspects.
The hard disk device driver 220 operates the hard disk based on the final entry count value. That is, the hard disk device driver operates the hard disk using the optimal access time when the final entry count value is determined by the entry count setting unit 204.
In operation 406, it is determined whether a hard disk access time automatic setting is performed after the initialization. When the access time automatic setting is not performed, in operation 404, Entry n set as the entry count value becomes the final entry count value in operation 418. However, it is understood that if Entry n is not the last entry time, an entry with a lower access time or a higher value than n can be used in other aspects.
In operation 408, when the access time automatic setting is performed, the MBR is read and the read MBR is stored as a reference MBR. The reason for doing so is that the reference MBR is used to check whether the hard disk operates normally. In operation 410, Entry 1 is set as the entry count value. In operation 412, whether the hard disk operates normally is checked.
The methods of checking whether the hard disk operates normally include the method of performing a diagnostic test, the method of checking whether the hard disk ID is read, and the method of reading the MBR and checking whether the value matches the reference MBR. The operation of the hard disk status checking unit 208 including the above methods will be described with reference to
In operation 414, when the hard disk is operating normally, the presently set entry count value is set as the final entry count value. In operation 416, when the hard disk is not operating normally, the entry count value is increased by 1 and it is determined whether the new entry count value is the final entry value (Entry n). When the entry count value is not the final entry value (Entry n), whether the hard disk is operating normally is checked again and the entry count value is increased by 1 until the hard disk operates normally or the entry count value is Entry n. However, when the entry count value is Entry n, Entry n becomes the final entry count value.
For example, when the hard disk is not operating normally when the entry count value is Entry 1, the entry count value is set as Entry 2. At this time, since Entry 2 is not the final entry value (Entry n), it is checked whether the hard disk is operating normally. When the hard disk operates normally, the present set entry count value is set as the final entry count value. However, it is understood that the value can be otherwise adjusted, such as by using Entry n-1, n-2, . . . to Entry 1.
In operation 418, the final entry count value is transmitted to the hard disk device driver 220. When the final entry count value is transmitted to the hard disk device driver 220, an optimal access time of the hard disk is set so that the hard disk can be operated at a fastest possible speed in a given environment.
In operation 412-4, it is checked whether the hard disk ID is read. When the hard disk ID is read, the hard disk is determined to be operating normally and the MBR is then read and checked against the reference MBR (operation 412-6). When the hard disk ID is not read, the hard disk is determined to not be operating normally and the operation 416 in which the entry count value is increased by 1 is performed.
In operation 412-6, the MBR is read and it is checked whether the MBR matches the reference MBR. When the read MBR matches the reference MBR, the hard disk is determined to be operating normally so that, in operation 414, the presently set entry count value is set as the final entry count value. When the read MBR fails to match the reference MBR, the hard disk is determined to not be operating normally and the operation 416 in which the entry count value is increased by 1 is performed.
In operation 604, the MBR is read and stored as the reference MBR. The stored reference MBR is used to check the normal operation of the hard disk. In operation 606, the entry count value when the error is generated is set as the entry count value. That is, increasing the entry count value from the entry value when the error is generated to Entry n is more efficient than increasing the entry count value from Entry 1 to Entry n. For example, when Entry 10 is an optimal access time and Entry 5 is the entry count value when an error is generated, it is more efficient to check the normal operation of the hard disk in order from Entry 5 to Entry 10 than from Entry 1 to Entry 10.
Since operations 608 through 614 are the same as the operations 412 through 418 of
Aspects of the present invention can also be embodied as computer-readable codes on a computer-readable recording medium and can be realized in a common digital computer executing the program using a computer-readable recording medium. The computer-readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer-readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and a computer data signal embodied in a carrier wave comprising a compression source code segment and an encryption source code segment (such as data transmission through the Internet). The computer-readable recording medium can also be distributed over network coupled computer systems so that the computer-readable code is stored and executed in a distributed fashion. Moreover, the hard disk drive can be used with a computer, can be a portable drive, and/or can be used with a media player.
As described above, according to aspects of the present invention, an optimal hard disk access time can be automatically determined regardless of the change in the external environmental factors, such as temperature and humidity.
Although a few embodiments of the present invention have been shown and described, it would be appreciated by those skilled in the art that changes may be made in this embodiment without departing from the principles and spirit of the invention, the scope of which is defined in the claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2006-63490 | Jul 2006 | KR | national |