The inventions generally relate to memory storage of file fragments.
Physical files stored on a hard disk drive are not always contiguous on the disk drive even though a user is not typically aware of it. In fact, physical files are often split up into file fragments on the disk drive. Such file fragments add to the uncertainty of accesses from the disk, and may cause isochronous deadlines to be missed. This can result in non-desired results such as screen flicker or sound pops. The file system of the Operating System (OS) is responsible for the allocation of files to specific sectors on the hard disk drive. Changes in the file system can cause multiple file fragments to occur. A sample file and its fragmentation are shown below:
If such a fragmented file is accessed, each fragment in the file means that a disk seek must be performed. Once the seek is completed, the data may be transferred from the disk. A heavily fragmented system impacts a user's response time. Therefore, in many systems using Windows Operating System, for example, there is a need to manually invoke a “DEFRAG” utility once in a while in order to defragment the fragmented files. File fragments can result in additional seek times and also in additional rotations of the disk drive. Therefore, a need has arisen to reduce the negative delays associated with file fragments on a disk drive.
The inventions will be understood more fully from the detailed description given below and from the accompanying drawings of some embodiments of the inventions which, however, should not be taken to limit the inventions to the specific embodiments described, but are for explanation and understanding only.
Some embodiments of the inventions relate to memory storage of file fragments.
In some embodiments a beginning portion of a disk drive file fragment is stored in a memory, and the beginning portion of the disk drive file fragment is accessed from the memory (for example, in response to a disk access request to access the file fragment from the disk drive).
In some embodiments an article includes a computer readable medium having instructions thereon which when executed cause a computer to store a beginning portion of a disk drive file fragment in a memory, and to access the beginning portion of the disk drive file fragment from the memory.
In some embodiments a memory is to store a beginning portion of a disk drive file fragment, and a processor is to access the beginning portion of the disk drive file fragment from the memory.
In some embodiments, memory 206 can be used along with knowledge of file fragmentation to obtain smooth disk access and meet all isochronous requirements. If the beginning portion of each fragment is stored (or cached) into memory 206 and that beginning portion is a big enough portion, the need for waiting for extraneous rotations can be reduced and/or eliminated and a user's needs are better satisfied.
In some embodiments, for a fragment (and/or for each fragment on a disk drive) the following equation applies:
In the above equation, n is the number of sectors to store in the memory (or cache), S is the number of bytes per sector (this number is usually 512), tseek is the seek time estimated for the disk (this should include any disk revolution times needed to cover the latency), bdisk is the data bandwidth of the disk, and bisoch is the desired isochronous rate. Solving this equation for n, the following is obtained:
For example, solving this for the typical parameters for current disk drives, where S=512, tseek=0.015+0.01 seconds (seek time plus one rotation), bdisk=50 MB/sec, bisoch=2.5 MB/sec (20 Mbit/sec is equivalent to high definition TV), a value for n of approximately greater than or equal to 133.6 sectors is obtained. Therefore, in some embodiments, data rate requirements covering all disk fragmentation may be met by storing (or caching) the beginning 134 sectors of each file fragment. In some embodiments, it is noted that for file fragments shorter than n (or shorter than 134 in this case) the entire file fragment should be stored (or cached). In some embodiments, such an entirely stored (or cached) file fragment may be deducted from the storage (or cache) requirements for the next file fragment. In some embodiments, if the first fragment of a file is stored (or cached) in this manner benefits include a faster application launch, for example.
In some embodiments, a better isochronous experience may be obtained. Glitches in audio and video may be minimized or eliminated, and a user experience similar to a consumer electric (CE) device is possible using typical personal computer (PC) components.
Some embodiments have been described herein as being implemented using a controller. It is noted that the controller may in some embodiments be a processor (for example, a Central Processing Unit or CPU of a computer or some other processor). For example, in some embodiments, implementations may include a controller (and/or processor) within a chipset. In some embodiments, implementations of the controller may include driver software. Some embodiments may include a controller implemented in hardware, software, and/or firmware.
Although some embodiments have been described in reference to particular implementations, other implementations are possible according to some embodiments. Additionally, the arrangement and/or order of circuit elements or other features illustrated in the drawings and/or described herein need not be arranged in the particular way illustrated and described. Many other arrangements are possible according to some embodiments.
In each system shown in a figure, the elements in some cases may each have a same reference number or a different reference number to suggest that the elements represented could be different and/or similar. However, an element may be flexible enough to have different implementations and work with some or all of the systems shown or described herein. The various elements shown in the figures may be the same or different. Which one is referred to as a first element and which is called a second element is arbitrary.
In the description and claims, the terms “coupled” and “connected,” along with their derivatives, may be used. It should be understood that these terms are not intended as synonyms for each other. Rather, in particular embodiments, “connected” may be used to indicate that two or more elements are in direct physical or electrical contact with each other. “Coupled” may mean that two or more elements are in direct physical or electrical contact. However, “coupled” may also mean that two or more elements are not in direct contact with each other, but yet still co-operate or interact with each other.
An algorithm is here, and generally, considered to be a self-consistent sequence of acts or operations leading to a desired result. These include physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers or the like. It should be understood, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities.
Some embodiments may be implemented in one or a combination of hardware, firmware, and software. Some embodiments may also be implemented as instructions stored on a machine-readable medium, which may be read and executed by a computing platform to perform the operations described herein. A machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer). For example, a machine-readable medium may include read only memory (ROM); random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, the interfaces that transmit and/or receive signals, etc.), and others.
An embodiment is an implementation or example of the inventions. Reference in the specification to “an embodiment,” “one embodiment,” “some embodiments,” or “other embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least some embodiments, but not necessarily all embodiments, of the inventions. The various appearances “an embodiment,” “one embodiment,” or “some embodiments” are not necessarily all referring to the same embodiments.
Not all components, features, structures, characteristics, etc. described and illustrated herein need be included in a particular embodiment or embodiments. If the specification states a component, feature, structure, or characteristic “may”, “might”, “can” or “could” be included, for example, that particular component, feature, structure, or characteristic is not required to be included. If the specification or claim refers to “a” or “an” element, that does not mean there is only one of the element. If the specification or claims refer to “an additional” element, that does not preclude there being more than one of the additional element.
Although flow diagrams and/or state diagrams may have been used herein to describe embodiments, the inventions are not limited to those diagrams or to corresponding descriptions herein. For example, flow need not move through each illustrated box or state or in exactly the same order as illustrated and described herein.
The inventions are not restricted to the particular details listed herein. Indeed, those skilled in the art having the benefit of this disclosure will appreciate that many other variations from the foregoing description and drawings may be made within the scope of the present inventions. Accordingly, it is the following claims including any amendments thereto that define the scope of the inventions.