Embodiments of the present invention generally relate to traversing computer memory, and more particularly, to a method and apparatus for efficiently traversing computer memory.
The modem computer era has brought about significant growth in the use of portable electronic devices such as mobile phones and personal digital assistants (PDAs). These devices embed sophisticated and versatile functionality into small integrated packages. For example, devices may include memory that support mobile computer applications executing on portable electronic devices. Various types of computer memory are employed on portable electronic devices, but the memory is still limited.
Various aspects of the invention are set out in the claims.
In accordance with an example embodiment of the present invention, a method comprises determining whether a next cluster associated with a file is located in contiguous memory and obtaining a location of a next cluster from a file allocation table when the next cluster associated with said file is not located in contiguous memory.
In accordance with another example embodiment of the present invention, another method comprises determining whether a list of cluster descriptors should be initialized and initializing the list of cluster descriptors upon determining that the list of cluster descriptors should be initialized, wherein initializing comprises indicating in each cluster descriptor in the list of cluster descriptors whether a next cluster associated with a file in a data region is located in contiguous memory.
For a more complete understanding of example embodiments of the present invention, reference is now made to the following description taken in connection with the accompanying drawings in which:
An example embodiment of the present invention and its potential advantages are best understood by referring to
It should be understood that computer executable instructions and data used by processor 128 and other components within electronic device 112 may be stored in a computer readable memory 134. In an embodiment, the memory may be implemented with any combination of read only memory modules or random access memory modules, optionally including both volatile and nonvolatile memory such a diskette, CD-ROM, ROM, EEPROM, FLASH MEMORY, DVD, fixed disk, and/or the like. Software may be stored within memory 134 and/or other storage to provide instructions to processor 128 for enabling electronic device 112 to perform various functions. Alternatively, some or all of the computer executable instructions may be embodied in hardware or firmware which is not shown.
In another embodiment, electronic device 112 may include additional hardware, software and/or firmware to perform one or more aspects of the invention as described herein. For example, the electronic device 112 may include audiovisual support software/firmware. In an embodiment, the electronic device 112 may be configured to receive, decode and process digital broadband broadcast transmissions that are based, for example, on the Digital Video Broadcast (DVB) standard, such as DVB-H, DVB-T or DVB-MPH, through a specific DVB receiver 141. Further, digital Audio Broadcasting/Digital Multimedia Broadcasting (DAB/DMB) may also be used to convey television, video, radio, and data.
In an alternative embodiment, the electronic device 112 may also include other types of receivers for digital broadband broadcast transmissions. Further, the electronic device 112 may be configured to receive, decode and process transmissions through radio receiver 142, WLAN transceiver 143, and telecommunications transceiver 144. In some embodiments, electronic device 112 may receive radio data stream (RDS) messages.
In an embodiment, the electronic device 112 may use computer program product implementations including a series of computer instructions fixed either on a tangible medium, such as a computer readable storage medium, a diskette, CD-ROM, ROM, EEPROM, FLASH Memory, DVD, fixed disk or transmittable to electronic device 112, via a modem or other interface device, such as a communications adapter connected to a network over a medium, which is either tangible, for example, optical or analog communication lines or implemented wirelessly, for example, microwave, infrared, radio, or other transmission techniques. The series of computer instructions may embody all or part of the functionality with respect to the computer system, and may be written in a number of programming languages for use with many different computer architectures and/or operating systems, as would be readily appreciated by one of ordinary skill. The computer instructions may be stored in any memory device, for example, memory 134, such as a semiconductor, magnetic, optical, or other memory device, and may be transmitted using any communications technology, such as optical infrared, microwave, or other transmission technology. Such a computer program product may be distributed as a removable storage medium with accompanying printed or electronic documentation, such as shrink wrapped software, preloaded with a computer system, for example, on system ROM or fixed disk, or distributed from a server or electronic bulletin board over a network such as the Internet or World Wide Web. Various embodiments of the invention may also be implemented as hardware, firmware or any combination of software such as a computer program product, computer-readable medium, hardware and firmware. Moreover, the functionality as depicted may be located on a single physical computing entity, or may be divided between multiple computing entities.
In 315, a reference is made to the first FAT entry 268 in FAT 256. Another reference is made to the first cluster descriptor in list of cluster descriptors 205. In 320, if the reference FAT entry in FAT 256 refers to the last cluster in the file, then 325 is performed. Otherwise, 335 is performed.
In one embodiment, a determination may be made whether the reference FAT entry in a FAT corresponds to the last cluster in the file by examining the size of the file. In an alternative embodiment, a determination may be made by other techniques, for example, by examining a last cluster in a file indication, such as file indication 274 of
In 325, next cluster in same file indication 218 of
In 330, if the reference FAT entry is the last FAT entry in the FAT, then the method terminates at 310, otherwise 345 is performed.
In 345, a reference is made to the next FAT entry in FAT 256 of
In 320, if the reference FAT entry in the FAT does not correspond to the last cluster in the file then 335 is performed.
In 335, a determination is made whether the next cluster associated with the file in data region 262 of
In 340, next cluster in same file indication 218 is set to indicate whether the next cluster in data region 262 corresponds to same file as the reference cluster descriptor. Execution then proceeds to 330.
In 330, if the reference FAT entry is the last FAT entry in FAT then execution is terminated at 310, otherwise 345 is performed.
In one embodiment of example process 300, the FAT may be located in a first memory such as first memory 136 of
In 415, a reference is made to a cluster descriptor for the file in the list of cluster descriptors 205 shown in
In 420, each byte of the cluster in data region 262 of
In 430, if the reference cluster in data region 262 is the last cluster in the file, then the execution terminates at 435, otherwise it is performed.
In 440, a determination is made whether next cluster associated with the file is located in contiguous memory. If the next contiguous cluster in data region 262 is associated with the file, then 443 is performed, otherwise it 445 is performed. In an example embodiment, the determination whether the next cluster associated with the file is located in contiguous memory comprises reading from a cluster descriptor wherein the cluster descriptor is associated with the file. The cluster descriptor comprises an indication that a contiguous cluster in a data region is associated with the file.
In 445, a reference is made to the FAT entry for the reference cluster. Obtain a location of the next cluster from a file allocation table when the next cluster associated with the file is not located in contiguous memory.
In 450, a reference is made to the next cluster descriptor in the list of cluster descriptors. Another reference is made to the next cluster for the file in the data region using determination in 445. Execution then proceeds to 420.
In one embodiment of example process 400, the FAT is located in a first memory such as first memory 136 of
In 530, each byte associated with a file is written to data region 262 until the end of the file or until the end of the cluster is reached. Also, one or more appropriate fields in the referenced FAT entry may be updated at this point to reflect the data written to the data region. One skilled in art will recognized which fields in the FAT entry may be written at this point based the implemented version of FAT system architecture.
In 540, if the file is large enough such that another available cluster is needed to continue writing the file, then 555 is performed, otherwise execution terminates at 550. Consideration may be given at this point to setting the next cluster in the same file indication in the reference cluster descriptor, however, this is not required in the last cluster descriptor of each file.
In 555, a reference is made to an available cluster in the data region and a determination is made whether the available cluster is located in contiguous memory. In 560, an indication is made in a cluster descriptor whether the available cluster associated with the file is located in contiguous memory. In one embodiment, the indication may be made by setting next cluster in same file indication 218 of
In one embodiment of example process 500, the FAT is located in a first memory such as first memory 136 of
Without in any way limiting the scope, interpretation, or application of the claims appearing below, it is possible that a technical effect of one or more exemplary embodiments, discussed herein, may be to allow efficient traversal of computer memory when a FAT computer file system architecture is utilized. By utilizing one or more embodiments herein, it is possible to minimize reading from and writing to some memory devices that may be subject to wear when the number of read or write accesses to a device exceeds certain thresholds. In one embodiment, by utilizing a list of cluster descriptors located in a memory device which may be susceptible to less wear, memory accesses may be minimized in another memory device which may be susceptible to more wear. For example, when clusters in a data region are contiguous, accesses to a memory device susceptible to more wear comprising a FAT may be minimized by referring to list of cluster descriptors stored on a memory device susceptible to less wear during memory traversal. By referring to a list of cluster descriptors, a determination may be made whether a next cluster in a data region associated with a file is located contiguously thereby eliminating a need to determine the location of a next cluster from a FAT.
The application logic, software or an instruction set is preferably maintained on any one of various conventional computer-readable media. In the context of this document, a “computer-readable medium” may be any media or means that can contain, store, communicate, propagate or transport the instructions for use by or in connection with an instruction execution system, apparatus or device.
If desired, the different functions discussed herein may be performed in any order and/or concurrently with each other. Furthermore, if desired, one or more of the above-described functions may be optional or may be combined.
Although various aspects of the invention are set out in the independent claims, other aspects of the invention comprise any combination of features from the described embodiments and/or the dependent claims with the features of the independent claims, and not solely the combinations explicitly set out in the claims.
It is also noted herein that while the above describes example embodiments of the invention, these descriptions should not be viewed in a limiting sense. Rather, there are several variations and modifications which may be made without departing from the scope of the present invention as defined in the appended claims.