The present application discloses an access control apparatus and an access control method for controlling accesses to each recording area on a disk on a command with a time limit requiring completion of the command in a predefined period of time.
Recently, magnetic disk apparatuses (hereinafter referred to as HDDs) are widely used as data storage incorporated in personal computers (hereinafter referred to as PCs) or connected to the PCs. The use of the HDDs has been expanding in application, not only for PCs, but for various equipment such as video recorders and car navigation systems requiring storage of a large amount of data.
Not all sectors in a recording area of the magnetic disk (hereinafter referred to as an HD) mounted in the HDD are writable or readable. There are defective sectors in the recording area to which data can not written or from which data can not read. Therefore, the HDDs require a process which is called an automated alternate process.
FIGS. 1A, 1B, and 1C are explanatory illustration of the automated alternate process.
Each sector included in the recording area of the HD is assigned a logical block addressing (LBA) address for identifying the sector as shown in FIG. 1A. In this application, data are written onto each sector in numerical order as LBA 10, 11 and 12. For example, if writing data onto a sector at LBA address 13 fails and the data are not written when retrying the access a predefined number of times, the data attempted to be written in the sector at LBA address 13 are stored in a sector at LBA address 0 as shown in FIG. 1B. Then, information that the data attempted to be written in the sector at LBA address 13 are stored in the sector at LBA address 0 is recorded in an alternate candidate table shown in FIG. 1C provided in a different area of the HD.
Therefore, the data are read from the sector at LBA address 0 instead of the sector at LBA address 13 when a read command to read the data stored in the sector at LBA address 13 is received.
As described above, the process for storing data on the alternate sector instead of the sector on which the data are initially attempted to be written is called an alternate process. An alternate process that is executed automatically in a specific sequence is called the automated alternate process.
However, the automated alternate process takes a long time when an access to a sector is retried and failed. The automated alternate process takes a long time because a magnetic head is moved to the alternate area to store the data and the information on the alternate sector is recorded in the alternate candidate table.
For example, stream commands such as movies and music require real-time processing. These stream commands are issued with a command completion time limit (CCTL). The command completion time limit requires execution of the commands in a period of time specified by the time limit absolutely. If the accesses to multiple sectors are retried during execution of the stream command, a time-out error will occur and the movie or the music may be intermittent.
Japanese Laid-open Patent Publication No. H11-327808 discloses that the automated alternate process is not executed when the time is running out even though the process is required.
In Japanese Laid-open Patent Publication No. H11-327808, the automated alternate process is not executed. Therefore, data to be stored at the sector are not stored. Thus, the data to be read from the sector does not exist. This leads to deterioration of a data quality such as an image quality of the movie or a sound quality of the music.
Japanese Laid-open Patent Publication No. 2003-196924 discloses that the automated alternate process is not executed immediately after failing to store the data. The data are stored in an interim buffer and the data are read from the buffer and stored on the alternate sector of the HD when processing time is finished.
However, Japanese Laid-open Patent Publication No. 2003-196924 discloses only the write process onto the HD, and mentions no comprehensive process including a read process. Besides, Japanese Laid-open Patent Publication No. 2003-196924 does not point out an issue or offer a solution when a write command is reissued and the sector at the LBA address is accessed again before the data stored in the interim buffer are stored on the HD or a read command is issued and the sector at the LBA address is accessed.