Recording area management method and storage apparatus

Abstract: The present invention is directed to the provision of a storage apparatus using a recording area management method and an error recovery processing method suitable for processing moving picture data and the like, wherein empty areas are registered separately in an empty area list for high-speed processing and an empty area list for low-speed processing according the classification made based on the result of comparing the length of each empty area with a minimum area length, and in the event of an error occurrence, a remaining time available for error processing is estimated from the difference between the time required to execute accumulated record or read requests and a limit time, and an error processing method, from among a plurality of error processing methods requiring different lengths of time for processing, is selected and carried out according to the remaining time.

Description: BACKGROUND OF THE INVENTION The present invention relates to a method for managing recording areas, which is suitable for application for the recording and playback of data, such as moving picture data, that needs to be recorded or read out at high speed in a prescribed cycle, and more particularly to a method for managing fragmented areas, and a storage apparatus using this method. Fragmented area management methods employed in a conventional storage apparatus will be described first. In a recording apparatus for reading and writing data on a recording medium, such as a magnetic disk or an optical disk, with a read/write head moving relative to the recording medium, there occurs a time interval during which read/write operations cannot be performed, for example, when the read/write head is being moved for positioning or when the read/write head is waiting for the desired data to rotate beneath it. One example of the conventional magnetic disk apparatus will be described with reference to FIG. 13, which is a schematic plan view showing a magnetic disk, etc. in the conventional magnetic disk apparatus. In FIG. 13, the magnetic disk 182 is a magnetic recording medium on which data are recorded as magnetizations. A head 188 converts an electrical signal into a magnetic field, or a magnetic field into an electrical signal, to record data on the magnetic disk 182 or to read data on the magnetic disk 182. An arm 187 supports the head 188 thereon and moves it across the surface of the magnetic disk 182. Tracks 183 are concentric circles into which the surface of the magnetic disk 182 is divided, each track 183 serving as a unit of storage area. Each track 183 is divided into sectors 184 of equal size which also serve as storage area units, each sector 184 being the smallest access unit of the magnetic disk 182. The tracks 183 are labelled with track numbers starting from the innermost or outermost track, while the sectors 184 within each track 183 are assigned sector numbers. Any storage area on the magnetic disk can therefore be identified by the track number and sector number, such as "sector 5" on "track 2". In the magnetic disk apparatus, data can be accessed on a sector-by-sector basis, which means that when a file consists of a plurality of sectors, all the sectors constituting the file are not necessarily contained within one track or stored sequentially in contiguous tracks. In an extreme case, there can occur a file consisting of a sector located in the outermost track and a sector located in the innermost track. To read data recorded on the magnetic disk 182 having the above-mentioned configuration, first the head 188 moves to the track containing the sector where the desired data is recorded. Next, the head 188 waits for the specified sector to be brought beneath the head 188 by the rotation of the magnetic disk 182, and then reads out the data recorded on that sector. At this time, if the next data to read is located in an adjacent sector, the data can be read continuously without moving the head 188 and without a rotational delay. In contrast, if the data stored are scattered over non-contiguous sectors or fragmented, the three-step process consisting of moving the head 188, waiting for disk rotation, and reading out data must be repeated for each sector. Accordingly, when reading data in non-contiguous sectors, the time required to move the head 188 and the rotational delay add to the data non-readable time, as compared when reading data in contiguous sectors. On the other hand, when recording a sequence of data on the magnetic disk 182, the data are recorded by finding empty sectors contiguous to each other or available in ascending order of track and sector numbers. As recording and erasing operations are repeated on the magnetic disk 182, the empty areas become fragmented into smaller areas; when data are recorded in such fragmented areas, the read/write speed of the storage apparatus slows, degrading the overall performance of the storage apparatus. With regard to this problem, a number of methods for managing recording areas have been proposed that are aimed at preventing disk read/write speed from slowing down even if recording and erasing operations are repeated, and thus ensuring full performance of the storage apparatus. In one such method, areas constituting files and empty areas are managed using a plurality of continuous areas, and one example of this method is disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 1-236488. The recording area management method disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 1-236488, is applicable for a storage apparatus that uses a rewritable optical disk. According to the storage apparatus of this prior art, to record a file in a single continuous area, each continuous area is managed using its start and end positions or its length, and based on the size of the file to be recorded, a search is made for an empty area long enough to record the file; it is claimed that this simplifies the area management and achieves high-speed read/write operations. Furthermore, an example of a storage apparatus that ensures storing each file in contiguous empty areas is disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 7-200369. In the storage apparatus of this prior art, file reallocation is performed in which any file located after an empty area is moved forward to fill the empty area, thereby moving the empty area rearward. According to the storage apparatus disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 7-200369, it is claimed that, by evaluating the time required for the file reallocation and the size of the resulting contiguous empty areas, effective file reallocation is achieved to secure contiguous empty areas. The conventional storage apparatus disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 1-236488, which is designed to record data by searching empty area management information for an empty area long enough to record the data, has had the problems that it requires a search time before starting the recording, and also that the method cannot be applied unless the size of the file to be recorded is known in advance. Further, the conventional storage apparatus disclosed in the gazette of the Japanese unexamined patent application, (TOKKAI) Hei 7-200369, which is designed to secure contiguous empty areas by performing file reallocation, has had the problem that the time required to evaluate the efficiency of reallocation and to reallocate the files increases as the magnetic disk capacity increases. The US 5 481 702 A teaches to use several area management tables for respective unit area sizes with a bit value indicating the vacant or occupied state of the area. BRIEF SUMMARY OF THE INVENTION To overcome the above-mentioned problems associated with the fragmented area management methods employed in the conventional storage apparatus, it is an object of the present invention to provide a storage apparatus that eliminates the need for reallocation of files and searching for empty areas, and that can reduce the time interval during which data reading or writing cannot be done because of the head movement and the waiting time for disk rotation. It is also an object of the present invention to provide a recording area management method. These objects are attained by the features of claim 1 concerning the method and by the features of claim 5 concerning the apparatus. In this way, according to the recording area management method of the present invention, empty areas of long area length and empty areas of short area length are used selectively according to the speed required for data reading or writing, and contiguous empty areas are classified according to their lengths and registered in different empty area lists for management, thus making it possible to record data requiring high-speed reading or writing in empty areas of long area length and data not requiring high-speed reading or writing in empty areas of short area length, and consequently achieving high-speed read/write operations. BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS FIG. 1 is a block diagram showing a storage apparatus according to a first embodiment of the present invention; FIG. 2 is a diagram for explaining an example of management information according to the first embodiment; FIG. 3 is a flow chart illustrating a file deletion process flow according to the first embodiment; FIG. 4 is a schematic diagram showing a data storage allocation according to the first embodiment; FIG. 5 is a schematic diagram showing a data storage allocation according to the first embodiment; FIG. 6 is a flow chart illustrating a process flow for calculating a minimum area length according to the first embodiment; FIG. 7 is a flow chart illustrating a file storage process flow according to the first embodiment; FIG. 8 is a schematic diagram showing a data storage allocation according to the first embodiment; FIG. 9 is a flow chart illustrating a file deletion process flow according to a second embodiment of the present invention; FIG. 10 is a schematic diagram showing a data storage allocation according to the second embodiment; FIG. 11 is a schematic diagram showing a data storage allocation according to the second embodiment; FIG. 12 is a schematic diagram showing a data storage allocation according to the second embodiment; and FIG. 13 is the diagram for explaining the configuration of the magnetic disk in the conventional magnetic disk apparatus. DETAILED DESCRIPTION OF THE INVENTION The preferred embodiments of the storage apparatus of the present invention will be described below with reference to the accompanying drawings. «Embodiment 1» FIG. 1 is a block diagram showing a video recording apparatus as a storage apparatus implementing a recording area management method according to a first embodiment. As shown in FIG. 1, the video recording apparatus of the first embodiment comprises a central processing unit 1, a program storage apparatus 2, a magnetic disk apparatus 4, an input apparatus 5, and an output apparatus 6. The magnetic disk apparatus 4 is connected to the central processing unit 1, input apparatus 5, output apparatus 6, etc. via an interface 3. A video signal 12 is input to the input apparatus 5 where the input video signal 12 is quantized. The output apparatus 6 converts the quantized video signal into the video signal 12 for output. In FIG. 1, reference numeral 7 indicates a bus for transferring signals from the central processing unit 1, and reference numeral 8 designates a dedicated bus for transferring the quantized video signal between the magnetic disk apparatus 4, the input apparatus 5, and the output apparatus 6. The magnetic disk apparatus 4 holds a disk characteristic list 9, management information 10, and data files 11. The disk characteristic list 9 holds various characteristic values of the magnetic disk apparatus, such as maximum number of sectors, maximum value of head seek time, waiting time per revolution, data read/write access time, etc. The management information 10 is used to manage data storage allocations within the magnetic disk apparatus, and consists of a file list, a data area list, a first empty area list, a second empty area list, etc. The disk characteristic list 9 is stored in a nonvolatile memory within the magnetic disk apparatus, while the management information 10 and the data files 11 are stored on a magnetic disk. The various apparatus constituting the video recording apparatus of the first embodiment are controlled by the central processing unit 1 using programs stored in the program storage apparatus 2, and the recording and playback operations of the video signal 12 and management of recording areas are thus performed. Next, a signal flow will be described that occurs when recording the video signal 12 on the magnetic disk apparatus 4. The video signal 12 is quantized in the input apparatus 5 continuously without any breaks. The quantized video signal is transferred on the dedicated bus 8, fed into the magnetic disk apparatus 4 via the interface 3, and recorded in a data file 11. Conversely, when playing back the video signal 12, the data file 11 stored in the magnetic disk apparatus 4 is read out. The readout data file 11 is transferred on the dedicated bus 8 and fed into the output apparatus 6 via the interface 3. The output apparatus 6 converts it into the video signal 12 for output. Next, the management information 10 used to manage data storage allocations within the magnetic disk apparatus 4 will be described with reference to FIG. 2. FIG. 2 is a diagram for explaining by way of example the structures of the file list 13 and the data area list 14 in the management information 10. In the file list 13, file name 15 is a file identifier for identifying a file, and the field indicated by reference numeral 16 carries the location of the starting area among the plurality of areas constituting the file. The field indicated by reference numeral 17 carries the number of areas constituting the file. The file list 13 holds file information on all individual files stored in the magnetic disk apparatus 4. The file information, as mentioned above, consists of the file name 15, the location of the starting area 16 among the areas constituting each file, and the number of areas 17. The data area list 14 holds data area information consisting of a head address and an end address for each of the areas constituting each individual file recorded in the magnetic disk apparatus 4. In the example shown in FIG. 2, file 1 consists of two areas, that is, the first and second areas in the data area list 14, the first area being the starting area. File 2 consists only of one area, that is, the third area in the data area list 14, the third area thus being the starting area. The first area in the data area list 14 is specified by the head address 1 and end address 1. Likewise, the second area in the data area list 14 is specified by the head address 2 and end address 2, and the third area in the data area list 14 is specified by the head address 3 and end address 3. Though not shown in the figure, the first empty area list and the second empty area list in the management information 10 have the same structure as the data area list 14, and each holds a plurality of empty area information sections each consisting of a head address and an end address of an empty area. Next, the recording area management method of the first embodiment using the above-mentioned management information 10 will be described with reference to FIGs. 3 to 5. FIG. 3 is a flow chart illustrating a file deletion process flow according to the first embodiment. FIGs. 4 and 5 are schematic diagrams showing data storage allocations on the magnetic disk before and after the file deletion process. In FIGs. 4 and 5, reference numeral 66 indicates the file list, 67 the data area list, 68 the first empty area list, and 69 the second empty area list. In the file list 66, reference numerals 51 to 54 indicate file information stored in the file list 66. In the data area list 67, reference numerals 56 to 60 indicate data area information stored in the data area list 67. Reference numerals 63 and 64 in the first empty area list 68 indicate empty area information stored in the first empty area list 68, and reference numeral 65 in the second empty area list 69 indicates empty area information stored in the second empty area list 69. The operation of the file deletion process according to the first embodiment will be described below with reference to FIGs. 3, 4, and 5. With the data storage allocation on the magnetic disk as shown in FIG. 4, when a command is issued to delete File 3, the file deletion process shown in FIG. 3 is invoked. In process step 21 in FIG. 3, information on the location of the starting area and the number of areas of File 3 is retrieved from the file information 53 labelled with the file name File 3 in the file list 66. Next, since the location of the starting area of File 3 shown in FIG. 4 is "4", in process step 22 in FIG. 3 the head address and end address are retrieved from the fourth data area information 59 in the data area list 67. In decision step 23 in FIG. 3, the length of the area is computed from the end address and head address, and then compared with a minimum area length. The minimum area length here is a reference length used to distinguish each area by its length and switch the processing mode in order to secure an effective transfer rate considering access time. If the minimum area length is 500, for example, the length of the area to be deleted, which is 1000, is longer than the minimum area length. Accordingly, in process step 25, the head address and end address are entered as they are into the first empty area list 68. The first empty area list 68 now holds the empty area information 63 and 64, as shown in FIG. 5. Further, in process step 26 in FIG. 3, the fourth data area information 59 is deleted from the data area list 67, after which the fifth data area information is moved forward to fill the empty space created by the deletion; the result is the data area list 67 shown in FIG. 5. Next, in decision step 27, 1 is subtracted from the number of areas of File 3 to compute the number of areas remaining to be processed, and the result is substituted for the number of areas of File 3, based on which a decision is made as to whether there remains any area yet to be processed. If there is an area remaining to be processed, the process returns to process step 22, and the process from process step 22 through decision step 27 is repeated. In the illustrated example, the number of areas of File 3 is 1, and therefore, 1 minus 1 is 0, leaving no areas remaining to be processed. As a result, in process step 28, the file information 53 (FIG. 4) for File 3 is deleted, and the file information 54 for File 4 is moved forward to fill the space, as shown in the file list 66 in FIG. 5. Then, the starting area location of each file is updated to match the updated data area list 67, as shown in FIG. 5, upon which the deletion process for File 3 is terminated. Next, the method of minimum area length calculation used in the above-mentioned deletion process will be described with reference to FIG. 6. FIG. 6 is a flow chart illustrating the process for minimum area length calculation. When an instruction is issued to calculate the minimum area length at the time of initializing a magnetic disk, the minimum area length calculation process shown in FIG. 6 is invoked. In process step 18, the maximum value of access time and the data write or read speed are acquired from the disk characteristic list 9 of the magnetic disk apparatus 4. Using the acquired information, the minimum area length is calculated in process step 19, and the calculated minimum area length is recorded in the disk characteristic list 9 in process step 20. The minimum area length calculation process in process step 19 is invoked at the time of initializing the magnetic disk, and the obtained value is recorded in the disk characteristic list 9. Thereafter, the minimum area length recorded in the disk characteristic list 9 is referenced. The equation used in the calculation process in process step 19 will be explained below. The minimum area length here is obtained as a minimum value of data amount L that satisfies the following equation (1): L/Vs ≥ T+L/Vd In equation (1), Vs is the signal processing speed at which the video signal 12 input to the input apparatus 5 (FIG. 1) is quantized, or the signal processing speed at which the quantized video signal is converted by the output apparatus 6 into the video signal 12, Vd is the data write or read speed of the magnetic disk apparatus 4, and T is the maximum value of the access time of the magnetic disk apparatus 4, which is the sum of the time required for the head to move from the outermost track to the innermost track and the time required to wait for one complete revolution of the disk. In equation (1), the time shown on the left-hand side, which is required for the input apparatus 5 or the output apparatus 6 to process data of data amount L, that is, the maximum time that can be spent for the transfer of the data of data amount L from the input apparatus 5 to the magnetic disk apparatus 4 or from the magnetic disk apparatus 4 to the output apparatus 6, has been used as the maximum processing time used for the calculation of the minimum area length. The right-hand side shows the sum of the maximum value of the access time required for the head of the magnetic disk apparatus 4 to move to the target area and wait for the disk revolution and the time required to write or read the data of data amount L. Accordingly, when data is recorded in contiguous areas having a total length equal to or greater than the minimum area length represented by the minimum value of data amount L that satisfies the above-mentioned equation (1), or when contiguous empty areas having a total length equal to or greater than the minimum area length are available, the read or write time of the magnetic disk apparatus 4 is always inside of the maximum processing time, so that there cannot occur the situation where the data input/output of the magnetic disk apparatus 4 cannot catch up with the signal processing at the input apparatus 5 or output apparatus 6. Since the data write or read speed Vd of the magnetic disk apparatus 4 and the time T required for the head to move from the outermost track to the innermost track are values inherent in the magnetic disk apparatus 4, these values are measured in advance and recorded in a specific area on the magnetic disk. Accordingly, if the magnetic disk apparatus is replaced by a new one, the minimum area length matched to the new magnetic disk apparatus can be set by using the values stored in the new magnetic disk apparatus. The method of measuring the maximum value of access time and the data write or read speed in the first embodiment will be described next. First, a description will be given of how the maximum value of access time is measured. To begin with, the head is moved to a specific area on the magnetic disk, for example, to the sector with a logical block address 0 which is one of the numbers assigned to the individual sectors on the magnetic disk, and that position is set as the origin. Next, a command is issued to move the head from the origin to another sector, and the process waits until an operation completion notification is received. The time of the command issuance and the time of the reception of the operation completion notification are acquired, and the access time is determined from the difference between these times. Measurements are made by repeating the above-mentioned operation with respect to all sectors other than the sector at the origin, and the maximum value of the access time is thus determined. Next, a description will be given of how the data write or read speed is measured. First, the head is moved to the track where a measurement is to be made. Next, a command is issued to write or read a prescribed amount of data, for example, data of one sector, and the processing time is measured. This operation is repeated several times, and the average is taken to compute an average processing time. Since this average processing time includes the rotational delay time, an average rotational delay time, i.e., the time required for the disk to make a half revolution, is subtracted from the average processing time, thereby obtaining the time required to write or read the data. Then, the write or read speed is computed from the amount of data written or read out. The operation up to this point is performed on each track, and the slowest speed is obtained. This speed is determined as the data write or read speed. Next, the operation of a file storage process according to the first embodiment will be described with reference to FIG. 7. FIG. 7 is a flow chart illustrating the flow of the file storage process according to the first embodiment. With the data storage allocation on the magnetic disk as previously shown in FIG. 5, when a data store command is issued with a file identifier of File 5, the data storage process shown in FIG. 7 is invoked. In decision step 33 in FIG. 7, a decision is made as to whether the data to be stored as File 5 is data that should be stored in an empty area of short area length registered in the second empty area list 69. If the data is the one that should be stored in an empty area registered in the second empty area list 69, then a decision is made in decision step 35 as to whether there is an empty area registered in the second empty area list 69. If it is decided in this decision step 35 that there is an empty area registered, the data is stored in that empty area. On the other hand, if there is no empty area registered, the branch to decision step 34 is followed. On the other hand, if it is decided in decision step 33 that the data to be stored is not data that should be stored in an empty area of short area length registered in the second empty area list 69, which means that the data is data that should be stored in an empty area of long area length registered in the first empty area list 68, then in decision step 34 it is examined whether there is an empty area registered in the first empty area list 68. For example, if it is assumed that the data to be stored as File 5 is the one that should be stored in the first empty area list 68, and that the length is 3000, then the process proceeds from decision step 33 to decision step 34 where it is examined whether there is an empty area registered in the first empty area list 68. If the result shows that there is an empty area registered in the first empty area list 68, the process proceeds to process step 36. In process step 36, the head address and end address of the empty area are acquired from the empty area information 63 at the head of the first empty area list 68, and in process step 38, the data to be stored is stored in sequence starting from the head address of the empty area. Since the empty area length of the empty area information 63 is 1000, as shown in FIG. 5, the empty area of the empty area information 63 is used up when the data is stored up to the length of 1000, and the storing operation is suspended with data of a length of 2000 remaining to be stored. In process step 40 in FIG. 7, the head address and end address of the area where the data has been stored are registered as data area information 61 in the data area list 67. In process step 42, since the empty area of the empty area information 63 has all been used for data storage, the empty area information 63 is deleted from the first empty area list 68. Next, in decision step 44, a decision is made as to whether there is data remaining to be stored. In the illustrated example, since there remains data of a length of 2000 yet to be stored, the process returns to decision step 34 to repeat the above-mentioned data storing operation. In process step 36, the head address (10000) and end address (100000) are acquired from the empty area information 64 in the first empty area list 68. In process-step 38, the remaining data to be stored is stored in the area whose head address is 10000. In process step 40, the head address 10000 and end address 12000 are registered as the data area information 62 in the data area list 67. Then, in process step 42, the head address of the empty area information 64 in the first empty area list 68 is changed to 12001. In decision step 44, a decision is made as to whether there is data remaining to be stored. In the illustrated example, since there is no data remaining to be stored, in process step 47 file information 55 (File 5) is registered in the file list 66, upon which the file storage process is terminated. The resulting data storage allocation is shown in FIG. 8. As mentioned above, in the storage apparatus of the first embodiment, the length of an empty area is compared in area length comparing means with the minimum area length, and in accordance with the result of the comparison, the empty area is registered in the first empty area list or the second empty area list. The first embodiment thus provides the effect that empty areas of long area length and empty areas of short area length can be used selectively according to the speed required for data writing or reading. Furthermore, in the storage apparatus of the first embodiment, the minimum storage area length is obtained as a minimum data amount for which the sum of the maximum value of the time required to access an empty area or storage area and the time required to write data to or read data from the storage area is equal to or smaller than the maximum processing time required to process the data. The first embodiment therefore provides the effect that optimum minimum area length can be set for different recording media having different access times and different read/write times. Further, the maximum value of the time required to access a storage area and the time required to write data to or read data from the storage area are measured and stored in advance, with the effect that optimum minimum area length can be set automatically when the recording medium is replaced by a different recording medium having a different read/write time. The first embodiment has been described by dealing with a case where an entire file is deleted or stored, but it will be appreciated that the deletion and storage operations can also be performed in like manner when deleting a portion of a file or adding a portion of a file to another existing file. Further, a head address and an end address are used to specify an area in the data area list, first empty area list, and second empty area list, but it will be noted that such areas can also be specified by a head address and area length. Furthermore, the first embodiment has been described using a magnetic disk apparatus as an example, but it will be recognized that the configuration of the first embodiment is applicable to any storage apparatus that performs reading and writing with a read/write head moving relative to a recording medium. In the first embodiment, it has been described that the data write or read speed is measured by writing or reading data of one sector, but the data amount is not limited to one sector but can be set to any suitable number of sectors. Furthermore, when measuring the access time, instead of setting the origin at the position of the sector of logical block address 0, as mentioned above, the origin may be set at any other position as long as the position can be used to measure the maximum value of the access time. Moreover, the first embodiment has been described as having a configuration where the disk characteristic list is stored in a nonvolatile memory, but instead, the disk characteristic list may be stored on a recording medium as long as it can be written and read out externally. «Embodiment 2» Next, a second embodiment of the storage apparatus of the present invention will be described with reference to the accompanying drawings. The storage apparatus of the second embodiment differs from the first embodiment only in the file deletion process, and the other processes are the same between them. Accordingly, the file deletion process will be described hereinafter. FIG. 9 is a flow chart illustrating the flow of the file deletion process according to the second embodiment of the present invention. FIGs. 10, 11, and 12 are schematic diagrams for explaining data storage allocations on the magnetic disk during the file deletion process. In FIGs. 10, 11, and 12, the file list 66, the data area list 67, the first empty area list 68, and the second empty area list 69, as well as the information in each list, are the same as those used in the description of the first embodiment, and therefore, their descriptions will not be repeated here. In the second embodiment, as in the first embodiment, it is assumed that the minimum area length is 500. With the data storage allocation on the magnetic disk as shown in FIG. 10, when a command is issued to delete File 2, the location of the starting area and the number of areas of File 2 are retrieved in process step 21 (FIG. 9) from the file information 52 for File 2 carried in the file list 66. Since the location of the starting area of File 2 in the file list 66 is "2", as shown in FIG. 10, in process step 22 the head address and end address are acquired from the second data area information 57 in the data area list 67. The area defined by the head address and end address of this data area information 57 is designated as the area to be deleted. In decision step 29 in FIG. 9, the thus acquired head address and end address of the area to be deleted are compared with the head address and end address of each empty area registered in the second empty area list 69, to determine whether an area contiguous to the area to be deleted is registered in the second empty area list 69. In the state shown in FIG. 10, the area to be deleted is from 2001 to 3000 of the data area information 57, whereas the empty area registered in the second empty area list 69 is from 5801 to 6000. Since, in the second empty area list 69, there are no areas contiguous to the area to be deleted, the process proceeds to decision step 31. In decision step 31, an operation similar to that in the preceding decision step 29 is performed, to determine whether an area contiguous to the area to be deleted is registered in the first empty area list 68. Since an empty area from 3001 to 4000 is registered as empty area information 63 in the first empty area list 68, in process step 32 the empty area is combined with the area to be deleted, and the combined area 2001 to 4000 is now designated as the area to be deleted. Then, the empty area information 63 is deleted from the first empty area list 68. Since the new area to be deleted is created by combining with the empty area registered in the first empty area list 68, it is clear that its length is longer than the minimum area length 500. Accordingly, decision step 23 is skipped, and in process step 25, the new area to be deleted is registered as empty area information 63 in the first empty area list 68 by sorting the registered information by head address. In process step 26, the data area information 57 is deleted from the data area list 67, and the resulting vacant space is filled by moving the data area information 58, 60 forward. At the end of this step, the data storage allocation on the magnetic disk is as shown in the schematic diagram of FIG. 11. Next, in decision step 27, 1 is subtracted from the number of areas of File 2, and 1 remains, which indicates that there is an area remaining to be deleted. Accordingly, the process returns to process step 22 to repeat the above-mentioned deletion operation. Information on the next area to be deleted is retrieved from the second data area information 58 (head address: 4001, end address: 5800) in the data area list 67 shown in FIG. 11. In decision step 29, the second empty area list 69 is checked to determine whether there is any empty area contiguous to the area to be deleted. Since the empty area (head address: 5801, end address: 6000) registered in the empty area information 65 is contiguous to the area to be deleted (head address: 4001, end address: 5800), in process step 30 the empty area is combined with the area to be deleted, and the combined area from 4001 to 6000 is now designated as the area to be deleted. Then, the empty area information 65 is deleted from the second empty area list 69. If there is any empty area information down the list after the empty area information 65, such empty area information is moved forward to fill the newly created vacant space; however, in the illustrated example, since there is no such empty area registered in the second empty area list 69, the operation to fill the vacant space is not performed. Further, in decision step 31, the first empty area list 68 is checked to determine whether there is any empty area contiguous to the area to be deleted. In the illustrated example, since the empty area (head address: 2001, end address: 4000) registered in the empty area information 63 is contiguous to the area to be deleted (head address: 4001, end address: 6000), in process step 32 the empty area is combined with the area to be deleted, and the combined area from 2001 to 6000 is now designated as the area to be deleted. Then, the empty area information 63 is deleted from the first empty area list 68. Since the new area to be deleted is created by combining with the empty area registered in the first empty area list 68, it is clear that its length is longer than the minimum area length 500. Accordingly, decision step 23 is skipped, and in process step 25, the new area to be deleted is registered as empty area information 63 in the first empty area list 68. In process step 26, the data area information 58 is deleted from the data area list 67, and the data area information 60 is moved forward to fill the vacant space. In decision step 27, 1 is subtracted from the number of areas of File 2, and 0 remains, which indicates that there are no longer any areas remaining to be deleted. Accordingly, in process step 28, the file information 52 of File 2 is deleted, and the file information 54 is moved forward to fill the vacant space. The starting area location of File 4 is updated to match the updated data area list; the resulting data storage allocation is shown in FIG. 12. The file storage process is the same in operation as that described in the foregoing first embodiment, and therefore, will not be described here. As mentioned above, in the second embodiment, it is determined whether or not an area contiguous to an empty area is located within the empty areas registered in the first empty area list or the second empty area list. If an empty area contiguous to it is located, the empty area is combined with the empty area contiguous to it, to create a new continuous empty area, and the length of the new continuous empty area is compared with the minimum area length, in accordance with the result of which the empty area is registered in the first empty area list or the second empty area list. The storage apparatus of the second embodiment thus has the effect of achieving efficient utilization of empty areas, eliminating the possibility of contiguous areas being broken up into smaller pieces and managed as empty areas. As in the first embodiment, the storage apparatus of the second embodiment also has been described by dealing with a case where an entire file is deleted or stored, but it will be appreciated that the same effect can be achieved when deleting a portion of a file or adding a portion of a file to another existing file. Further, in the second embodiment, a head address and an end address are used to specify an area in the data area list, first empty area list, and second empty area list, but it will be noted that such areas may be specified by a head address and area length. Furthermore, the second embodiment has been described using a magnetic disk as an example, but it will be recognized that the configuration of the second embodiment is applicable to any storage apparatus that performs reading and writing with a read/write head moving relative to a recording medium. «Embodiment 3» A third embodiment of the storage apparatus of the present invention will be described below with reference to relevant drawings.

Claims: A recording area management method for managing a file list (66) which is used to identify a file consisting of a series of data clusters, a data area list (67) which is a list of position information of a plurality of areas holding said data clusters constituting said file, a first empty area list (68) which is a list of position information of empty areas where no data are stored, and a second empty area list (69) which is a list of position information of empty areas not included in said first empty area list, said recording area management method comprising: an area length comparing step in which the length of an empty area in said first empty area list (68) or said second empty area list (69) is compared with a predetermined minimum area length; and a registration step in which said empty area is registered in said first empty area list (68) or said second empty area list (69) in accordance with the result of comparing the length of said empty area with said minimum area length in said area length comparing step. A recording area management method according to claim 1, wherein when a recording area as an empty area or an area constituting a file satisfies the relation that the sum of a maximum value of the time required to access said recording area and the time required to record data an or read data from said recording area is equal to or less than a maximum processing time required to process said data, the area length of said recording area is determined as said minimum area length. A recording area management according to claim 1, further comprising: an adjacent area judging step in which it is judged whether or not an area adjacent to an empty area exists among the empty areas registered in said first empty area list (68) or said second empty area list (69); a deleting step in which, if an area adjacent to said empty area is registered in said first empty area list (68) or said second empty area list (69), said empty area and said adjacent empty area are combined to create a new continuous empty area, and information concerning said adjacent area is deleted from said first empty area list (68) or said second empty area list (69); an area length comparing step in which the length of said empty area is compared with a predetermined minimum area length; and a registration step in which said new continuous empty area is registered in said first empty area list (68) or said second empty-area list (69) in accordance with the result of comparing the length of said new continuous empty area with said minimum area length in said area length comparing step. A recording area management method according to claim 3, wherein when a recording area as an empty area or an area constituting a file satisfies the relation that the sum of a maximum value of the time required to access said recording area and the time required to record data an or read data from said recording area is equal to or less than a maximum processing time required to process said data, the area length of said recording area is determined as said minimum area length. A storage apparatus comprising: storage means for storing management information (10) comprising a file list (66) which is used to identify a file consisting of a series of data clusters, a data area list (67) which is a list of position information of a plurality of areas holding said data clusters constituting said file, a first empty area list (68) which is a list of position information of empty areas where no data are stored, and a second empty area list (69) which is a list of position information of empty areas not included in said first empty area list; area length comparing means for comparing the length of an empty area in said first empty area list (68) or said second empty area list (69) with a predetermined minimum area length; and registration means for registering said empty area in said first empty area list (68) or said second empty area list (69) in accordance with the result of the comparison performed in said area length comparing means. A storage apparatus according to claim 5, wherein when a recording area as an empty area or an area constituting a file satisfies the relation that the sum of a maximum value of the time required to access said recording area and the time required to record data an or read data from said recording area is equal to or less than a maximum processing time required to process said data, the area length of said recording area is determined as said minimum area length. A storage apparatus according to claim 6, comprising: measuring means for measuring the maximum value of the time required to access said recording area as an empty area or an area constituting a file, and the time required to record data an or read data from said recording area; and storage means for storing said measured maximum value of the time required to access said recording area, and said measured time required to record data an or read data from said recording area. A storage apparatus according to claim 5, further comprising: adjacent area judging means for judging whether an area adjacent to an empty area exists among the empty areas registered in said first empty area list (68) or said second empty area list (69); and registration means for, when it is judged by said adjacent area judging means that an adjacent empty area exists, combining said empty area with said adjacent empty area to create a new continuous empty area, deleting information concerning said adjacent empty area from said first empty area list (68) or said second empty area list (69), and registering said new continuous empty area in said first empty area list (68) or said second empty area list (69) in accordance with the result of comparing the length of said new continuous empty area with said minimum area length in said area length comparing means. A storage apparatus according to claim 8, wherein when a recording area as an empty area or an area constituting a file satisfies the relation that the sum of a maximum value of the time required to access said recording area and the time required to record data an or read data from said recording area is equal to or less than a maximum processing time required to process said data, the area length of said recording area is determined as said minimum area length. A storage apparatus according to claim 9, comprising: measuring means for measuring the maximum value of the time required to access said recording area as an empty area or an area constituting a file, and the time required to record data an or read data from said recording area; and storage means for storing said measured maximum value of the time required to access said recording area, and said measured time required to record data an or read data from said recording area.

Inventors: AYAKI YASUSHI, KOUDO TOSHIKAZU, KUNO YOSHIKI, ONO HITOSHI, AYAKI, YASUSHI, KOUDO, TOSHIKAZU, KUNO, YOSHIKI, ONO, HITOSHI
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1997
Main classification: G06F3
IPC codes: G11B27, G11B20, G06F3, G06F11