This application claims priority from Korean Patent Application No. 10-2005-0010863, filed on Feb. 4, 2005, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.
1. Field of the Invention
The present invention relates to a method and apparatus for reading data of a disk in a disk transfer system, which may be an input/output subsystem, and more particularly, to a method and apparatus for analyzing a load feature of a data transfer command of an application, which may be an input/output command, and determining whether the load of the data transfer command corresponds to a multimedia application.
2. Description of the Related Art
Disks have performed the important function of storing data in everything from mainframes to laptop computers for the past 30 years. In the past, the main concern about disks was their data storage capacity. However, since this has been sufficiently increased in recent years, the intelligence of the disk has become a focus, to allow it to perform the role of the input/output subsystem.
An operating system receives a file name input by a user from the application layer 110, which is an upper layer of the operating system, and retrieves the file name from a whole directory which is managed by itself. In the operating system, the input file is identified using file identification information called a file descriptor.
The storage space of the disk includes spatial components such as a track and a sector, and the file system layer 120 performs the role of organizing the spatial components into a linear array of logical blocks. In the general file system layer, each file is connected with a data structure, which is called an inode and has file related information such as the location, the last update time, and the access mode of the logical block in which the data is stored. The file system layer 120 retrieves the inode connected with the file which is a target of the input/output operation from the file descriptor which is received from the operating system, fetches the file related information from the inode, and performs the input/output operation.
The disk driver layer 130 connects the disk 140 to the operating system. The logical block number which is output as the result of the input/output operation is delivered to the disk driver layer 130. Since the disk 140 does not recognize the logical block number, the disk driver layer 130 converts the logical block number into physical spatial information such as a cylinder, a track and a sector, and delivers it to the disk 140. The disk 140 performs the input/output operation using the physical spatial information.
The general input/output subsystem inputs/outputs the data to/from the disk 140 according to the input/output command received from the disk driver layer 120, whether the file which is the target of the input/output command is a text file or a multimedia file.
Information electronic devices having a computer function such as information processing, transmission and storage have a specialized load of the input/output command, such as recording or playback of multimedia data such as video files and music files, unlike a general-purpose computer.
A method and apparatus for determining whether the load of the input/output command corresponds to the multimedia application, such that the optimal disk schedule corresponding to the multimedia application is set and the operating system is optimally controlled in correspondence with the multimedia application, is required in the input/output subsystem.
The present invention provides a method for analyzing a load feature of a data transfer command, which includes an input/output command, extracted from a disk driver and determining whether the load of the input/output command corresponds to a multimedia application according to the analyzing result.
The present invention also provides an apparatus for analyzing a load feature of an input/output command extracted from a disk driver and determining whether the load of the input/output command corresponds to a multimedia application according to the analyzing result.
According to an aspect of the present invention, there is provided a method for determining the load of an input/output command in a system for inputting/outputting data to/from a disk sector according to an input/output command provided from a disk driver, including: (a) extracting the input/output commands for inputting/outputting the data to/from the disk sector from the disk driver and generating a set of input/output commands from the input/output commands; (b) analyzing the load feature of the input/output command based on the set of input/output commands; and (c) determining whether the load of the input/output command corresponds to a multimedia application based on the load feature of the input/output command.
The operation (a) may include: (a1) extracting the input/output commands for inputting/outputting the data to/from the disk sector from the disk driver to store them during a first time; and (a2) generating the set of input/output commands composed of recent input/output commands during a second time from among the input/output commands stored during the first time.
The operation (b) may include: extracting the load features of the input/output commands from the set of input/output commands; and calculating a statistic of the load features of the input/output commands from the load features of the input/output commands and analyzing the load feature of the input/output command.
The operation (c) may include: classifying the load feature of the input/output command from the statistic of the load features of the input/output commands by a classifying unit generated by learning the input/output command of the multimedia application; and determining whether the load of the input/output command corresponds to the multimedia application, based on the classification of the classifying unit.
According to another aspect of the present invention, there is provided an apparatus for determining the load of an input/output command in a system for inputting/outputting data to/from a disk sector according to an input/output command provided from a disk driver, including: an extracting unit which extracts the input/output command for inputting/outputting the data to/from the disk sector from the disk driver and generates a set of input/output commands from the extracted input/output command; an analyzing unit which analyzes the load feature of the input/output command based on the set of input/output commands; and a determining unit which determines whether the load of the input/output command corresponds to a multimedia application based on the load feature of the input/output command.
The extracting unit may include: a storing unit which stores the input/output commands for inputting/outputting the data to/from the disk sector during a first time; and a generating unit which generates the set of input/output commands composed of recent input/output commands during a second time from among the input/output commands stored during the first time.
The generating unit may include: a first extracting unit which extracts the input/output commands and stores them in the storing unit; an updating unit which removes the oldest input/output command from the input/output commands stored during the first time and adds a new input/output command to the input/output commands during the first time to update the input/output commands during the first time, if the new input/output command is requested from the disk driver; and an input/output command set generating unit which generates the set of input/output commands composed of the recent input/output commands during the second time from among the updated input/output commands.
The analyzing unit may include: a second extracting unit which extracts the load features of the input/output commands from the set of input/output commands; and a calculating unit which calculates a statistic of the load features of the input/output commands from the load features of the input/output commands.
The determining unit may include: a classifying unit which classifies the load feature of the input/output command based on the learning result and the statistic of the load features of the input/output commands; and a load determining unit which determines whether the load of the input/output command corresponds to the multimedia application based on the classification of the classifying unit.
The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
FIGS. 8 A-M show a set of input/output commands of a plurality of multimedia applications, that is, a trace of the input/output commands; and
The disk driver 210 includes a first memory (not shown) for storing the input/output command delivered to the disk 220. An extracting unit 230 extracts the input/output command delivered to the disk 220 from the disk driver 210. The input/output command extracted by the extracting unit 230 is stored in a second memory (not shown) included in the extracting unit 230. Whenever a new input/output command is delivered to the disk 220 from the disk driver 210, the extracting unit 230 removes the oldest input/output command from the second memory and stores the new input/output command in the second memory to update the input/output commands. A set of input/output commands (referred to as a trace of the input/output commands) is generated from the updated input/output commands and is provided to the analyzing unit 240.
The analyzing unit 240 analyzes the load feature of the input/output command delivered to the disk 220 from the disk driver 210. The analyzing unit 240 extracts the load features of the input/output commands from the set of input/output commands and calculates a statistic of the load features of the input/output commands from the load features of the input/output commands.
The determining unit 250 determines whether the load of the input/output command corresponds to the multimedia application, based on the load feature of the input/output command analyzed by the analyzing unit 240.
First, the extracting unit 230 will be described. The generating unit 310 of the extracting unit 230 generates a set of the most recent input/output commands during a second time from among the stored input/output commands. The generating unit 310 includes an input/output command set generating unit 312, a first extracting unit 314 and an updating unit 316. The first extracting unit 314 extracts the input/output command delivered to the disk 220 from the disk driver 210. The extracting unit 230 includes a storing unit 320 for storing the input/output commands extracted by the first extracting unit 314 during a first time.
When a new input/output command is requested from the disk driver 210 to the disk 220, the updating unit 316 removes the oldest input/output command from the input/output commands during the first time and adds the new input/output command to the input/output commands during the first time to update the input/output commands during the first time. The input/output command set generating unit 312 generates a set of input/output commands composed of the input/output commands during a second time from the input/output commands during the first time which is updated by the updating unit 316.
According to the application field of the present invention, the storing unit 320 may be composed of a first storing unit (hereinafter, referred to as a free-list) which is a set of usable storage spaces, and a second storing unit (hereinafter, referred to as a used-list) which is a set of used storage spaces. The input/output commands during the first time extracted by the first extracting unit 314 are stored in the used-list. When a new input/output command is extracted, the updating unit 314 fetches the storage space from the free-list to store the new input/output command therein, and connects the storage space to the used-list. Also, the updating unit 316 removes the oldest input/output command from the used-list and returns the storage space in which the removed input/output command was stored to the free-list. The input/output command set generating unit 312 generates a set of input/output commands composed of recent input/output commands during the second time, from among the input/output commands stored in the used-list. According to the application field of the present invention, the period of the first time may be equal to the period of the second time. This is included in the scope of the present invention.
According to the application field of the present invention, the storing unit 320 may be mass storage medium connected by a general-purpose interface. In this case, the input/output commands extracted by the first extracting unit 314 are continuously stored in the storing unit 320, and the input/output command set generating unit 312 generates a set of input/output commands composed of recent input/output commands during the second time, from among the input/output commands stored in the storing unit 320.
The analyzing unit 240 includes the second extracting unit 330 and the calculating unit 340, and analyzes the load feature of the input/output command based on the set of input/output commands. The second extracting unit 330 extracts the load feature of the input/output command which composes the set of input/output commands. The input/output command delivered to the disk 220 from the disk driver 210 includes information for inputting/outputting the data which is requested for executing a file in a predetermined application to/from the sector of the disk 220. The second extracting unit 330 extracts the load feature of the input/output command, for example, an input/output request time, the number of input/output sectors, and the location of the input/output sectors, from the information.
The calculating unit 340 calculates the statistic of the load features of the input/output commands. The statistic of the load features of the input/output commands represents the loads of the input/output commands delivered to the disk 220 from the disk driver 210, and may be the average of the input/output request time intervals, the standard deviation, the median, the range of input/output request time internals, the number of the sectors read during a unit of time, and the number of input/output commands during a unit of time.
The classifying unit 410 classifies the loads of the input/output commands based on the statistic of the input/output commands. The classifying unit 410 is manufactured based on the learning result generated by learning the load feature of the input/output command of at least one multimedia application.
When at least one multimedia application such as mpeg2dec, xine or mplayer executes at least one multimedia file such as low quality news, high quality news, low quality music video or high quality music video, the material relating to the input/output request time during a unit of time and the number of input/output sectors is extracted. An input variable is generated using the extracted material. The input variable is the average of the input/output request time intervals, the standard deviation, the median, the range of input/output request time intervals, the number of sectors read during a unit of time, and the number of input/output commands during a unit of time, which are calculated from the extracted material. The calculated input variable is input to a boosting algorithm, where it is used to generate a decision tree.
The classifying unit 410 classifies whether the set of input/output commands corresponds to the multimedia application, based on the decision tree generated by a learning device. That is, the classifying unit 410 receives the statistic of the set of input/output commands and classifies whether the load of the input/output command corresponds to the multimedia application, based on the decision tree.
According to the application field of the present invention, the load feature of the input/output command of the multimedia application can be learned by another learning method, such as a Baysian learning, neural network or support vector machine method. These are included in the present invention.
The load determining unit 420 determines whether the load of the input/output command corresponds to the multimedia application, based on the classification of the classifying unit 410.
In the method for determining the load of a data input/output command, an input/output command for inputting/outputting the data of the disk sector is extracted from the disk driver, and a set of input/output commands is generated from the extracted input/output command (operation 510). The load feature of the input/output command is extracted from the set of input/output commands, and a statistic of the load features is calculated to analyze the load feature of the input/output command (operation 520). It is determined whether the load of the input/output command corresponds to the multimedia application, based on the load feature of the input/output command (operation 530).
The load features of the input/output commands, such as the input/output request time of the input/output command, the number of input/output sectors, and the location of the input/output sectors, are extracted from the set of input/output commands (operation 640). The statistic of the loads of the set of input/output commands is calculated from the load features of the input/output commands (operation 650). The statistic may be the average of the input/output request time intervals, the standard deviation, the median, the range of input/output request time internals, the number of sectors read during a unit of time, and the number of input/output commands during a unit of time. Operations 640 and 650 together form operation 520. According to the application field of the present invention, different types of load feature of the input/output command and the statistic of the loads of the input/output commands may be used. These are all included in the scope of the present invention.
Hereinafter, referring to
Referring to
First, a certain amount of data is periodically requested to the disk. Second, all the multimedia players have the trace of the input/output commands which repeatedly generate the input/output request having continuous 248 or 8 sectors. This is generated because the multimedia files are continuously stored in the disk. Third, the multimedia player reads a multimedia file, but the write operation for periodically updating the inode of the file is also generated.
As shown in
The embodiments of the present invention can be written as computer programs and can be implemented in general-use digital computers that execute the programs using a computer readable recording medium. Examples of the computer readable recording medium include magnetic storage media (e.g. ROM, floppy disks, hard disks, etc.), optical recording media (e.g. CD-ROMs, or DVDs), and storage media such as carrier waves (e.g. transmission through the internet).
According to the method and apparatus for determining the load of the input/output command of the present invention, the optimal disk schedule is set in correspondence with the multimedia application, and it is determined whether the load of the input/output command corresponds to the multimedia application such that the input/output command is optimally controlled to correspond to the multimedia application.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2005-0010863 | Feb 2005 | KR | national |