The use of a cache in a computer reduces memory access time and increases the overall speed of a device. Typically, a cache is an area of memory which serves as a temporary storage area for a device and has a shorter access time than the device it is caching. Data frequently accessed by the processor remain in the cache after an initial access. Subsequent accesses to the same data may be made to the cache.
Two types of caching are commonly used, memory caching and disk caching. A memory cache, sometimes known as cache store, is typically a high-speed memory device such as a static random access memory (SRAM). Memory caching is effective because most programs access the same data or instructions repeatedly.
Disk caching works under the same principle as memory caching but uses a conventional memory device such as a dynamic random access memory (DRAM). The most recently accessed data from the disk is stored in the disk cache. When a program needs to access the data from the disk, the disk cache is first checked to see if the data is in the disk cache. Disk caching can significantly improve the performance of applications because accessing a byte of data in RAM can be thousands of times faster than accessing a byte on a disk.
Both the SRAM and DRAM are volatile memories. Therefore, in systems using a volatile memory as the cache memory, data stored in the cache memory would be lost when the power is shut off to the system. Accordingly, some devices may utilize non-volatile memory.
Certain non-volatile memories, such as polymer memory, are destructive read memories. Data stored in a memory location of destructive read memories are erased by the process of reading the memory location. Further, a polymer memory location can only be written in one direction, for example, from a one to a zero, but not from a zero to a one. Thus, a polymer memory location must be erased or blank prior to writing new data to the memory location.
Applications utilizing destructive read memories would have to track erased or blank memory locations. However, upon a loss of system power or other event, blank memory location information may be lost preventing system recovery or causing significant loss of data.
The present invention may be better understood, and its numerous features and advantages made apparent to those skilled in the art by referencing the accompanying drawings.
The use of the same reference symbols in different drawings indicates similar or identical items.
In the following description, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In other instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
References to “one embodiment,” “an embodiment,” “example embodiment,” “various embodiments,” etc., indicate that the embodiment(s) of the invention so described may include a particular feature, structure, or characteristic, but not every embodiment necessarily includes the particular feature, structure, or characteristic. Further, repeated use of the phrase “in one embodiment” does not necessarily refer to the same embodiment, although it may.
As used herein, unless otherwise specified the use of the ordinal adjectives “first,” “second,” “third,” etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
As disclosed herein, a “cache” refers to a temporary storage area and can be either a memory cache or a disk cache. The term “system boot” refers to initialization of a computer both when the power is first turned on, known as cold booting, and when a computer is restarted, known as warm booting. The term “computer readable medium” includes, but is not limited to portable or fixed storage devices, optical storage devices, and any other memory devices capable of storing computer instructions and/or data. The term “computer instructions” are software or firmware including data, codes, and programs that can be read and/or executed to perform certain tasks.
During a read operation, data bits 102 are sensed by data sense amplifiers 112 and reference bits 104 and 106 are sensed and processed by reference sense amplifier and threshold derivation circuitry 114. The outputs of the data sense amplifiers 112 and reference sense amplifier and threshold derivation circuitry 114 are compared by comparison circuitry 116 to determine the digital read data.
Reading a memory word in polymer memory device 100 erases the memory cells of the word, including data bits 102 and reference bits 104 and 106, leaving the word in a blank state, for example, all ones. A memory word in a blank state will return random results when read because an improper threshold will be derived. Thus, the location of blank memory words should be managed to preserve data and aid in system recovery after a power loss or crash event.
Although system 400 is illustrated as a system with a single processor, other embodiments may be implemented with multiple processors, in which additional processors may be coupled to the bus 430. In such cases, each additional processor may share the non-volatile storage cache device 450 and main memory 420 for writing data and/or instructions to and reading data and/or instructions from the same. Also, although non-volatile storage cache device 450 is shown external to mass storage device 460, in other embodiments non-volatile storage cache device 450 may be internally implemented into any non-volatile media in a system. For example, in one embodiment, non-volatile storage cache device 450 may be a portion of mass storage device 460.
Because retrieving data from mass storage device 460 can be slow, caching may be achieved by storing data recently accessed from the mass storage device 460 in a non-volatile storage media such as non-volatile storage cache device 450. The next time the data is needed, it may be available in non-volatile storage cache device 450, thereby avoiding a time-consuming search and fetch in mass storage device 460. Non-volatile storage cache device 450 may also be used for writing. In particular, data may be written to non-volatile storage cache device 450 at high speed and then stored until the data is written to mass storage device 460, for example, during idle machine cycles or idle cycles in a mass storage subsystem.
According to one embodiment of the present invention, a memory controller, for example, memory control hub 440, handles blank detection and builds a management table tracking blank and/or non-blank memory words. Software enables blank detection only when necessary, for example, during reads when blank locations are not known.
Realizations in accordance with the present invention have been described in the context of particular embodiments. These embodiments are meant to be illustrative and not limiting. Many variations, modifications, additions, and improvements are possible. Accordingly, plural instances may be provided for components described herein as a single instance. Boundaries between various components, operations and data stores are somewhat arbitrary, and particular operations are illustrated in the context of specific illustrative configurations. Other allocations of functionality are envisioned and may fall within the scope of claims that follow. Finally, structures and functionality presented as discrete components in the various configurations may be implemented as a combined structure or component. These and other variations, modifications, additions, and improvements may fall within the scope of the invention as defined in the claims that follow.