Main memory device having heterogeneous memories, computer system including the same, and data management method thereof

A main memory device includes a first memory device; and a second memory device having an access latency different from that of the first memory device. The first memory device determines, based on an access count for at least one region of the first memory device, a hot page included in the at least one region.

CROSS-REFERENCE TO RELATED APPLICATION

The present application claims priority under 35 U.S.C. § 119(a) to Korean application number 10-2019-0001723, filed on Jan. 7, 2019, in the Korean Intellectual Property Office, which is incorporated herein by reference in its entirety.

BACKGROUND

1. Technical Field

Various embodiments generally relate to a computer system, and more particularly, to a computer system including a main memory device having heterogeneous memories and a data management method thereof.

2. Related Art

A computer system may include various types of memory devices. A memory device includes a memory for storing data and a memory controller which controls the operation of the memory. A memory may be a volatile memory such as a DRAM (dynamic random access memory) or an SRAM (static random access memory), or a nonvolatile memory such as an EEPROM (electrically erasable programmable ROM), an FRAM (ferroelectric RAM), a PCRAM (phase change RAM), an MRAM (magnetic RAM) or a flash memory. Data stored in a volatile memory is lost when power supply is interrupted, whereas data stored in a nonvolatile memory is not lost even when power supply is interrupted. Recently, a main memory device in which heterogeneous memories, i.e., both volatile and nonvolatile memories, are mounted is being developed.

A volatile memory has a high operating (for example, write and read) speed, whereas a nonvolatile memory has a relatively low operating speed. Due to this fact, in order to improve the performance of a memory system, data (for example, hot data) which is frequently accessed needs to be stored in a volatile memory, and data (for example, cold data) which is not frequently accessed needs to be stored in a nonvolatile memory.

SUMMARY

Various embodiments are directed to a main memory device having heterogeneous memories, a computer system including the same and a data management method thereof, capable of improving an operation performance through a data migration depending on an access count.

In an embodiment, a main memory device may include: a first memory device; and a second memory device having an access latency different from that of the first memory device. The first memory device may determine, based on an access count for at least one region of the first memory device, a hot page included in the at least one region.

In an embodiment, a main memory device may include: a first memory device; and a second memory device having a power consumption per unit time different from that of the first memory device. The first memory device may determine, based on an access count for at least one region of the first memory device, a hot page included in the at least one region.

In an embodiment, a computer system may include: a central processing unit (CPU); and a main memory device coupled with the CPU through a system bus. The main memory device may comprise a first memory device; and a second memory device having an access latency shorter than that of the first memory device. The first memory device may determine, based on an access count for each of one or more regions of the first memory device, a hot page included in at least one of the one or more regions.

In an embodiment, a data management method of a computer system including a central processing unit (CPU) and a main memory device which is coupled with the CPU through a system bus and is configured with a first memory device and a second memory device having different access latencies may include: transmitting, by the CPU to the first memory device, a hot page checking command for checking whether a hot page exists in a first memory of the first memory device; transmitting, by the first memory device to the CPU, one of a first response including an address corresponding to the hot page in the first memory and a second response indicating that the hot page does not exist in the first memory depending on whether the hot page exists or not; and transmitting, by the CPU to the main memory device, when the first response is received from the first memory device, a data migration command for exchanging hot data stored in the hot page of the first memory and cold data in a second memory of the second memory device.

In an embodiment, a memory system may include: a first memory device including plural groups each having one or more first memory regions; a second memory device including plural second memory regions; a first controller configured to identify a hot memory region, which is most recently accessed among the first memory regions within a group that has been accessed more than any of the other groups or a greater number of times than a threshold; and a second controller configured to identify a cold memory region, which is least recently accessed among the second memory regions. The first and second controllers respectively control the first and second memory devices to swap data between the hot memory region and the cold memory region.

In an embodiment, a memory system may include: a first memory device including plural groups each having one or more first memory regions; a second memory device; a first controller configured to identify a hot memory region, which is most recently accessed among the first memory regions within a group that has been accessed more than any of the other groups or a greater number of times than a threshold; and a second controller configured to control an operation of the second memory device. The first and second controllers respectively control the first and second memory devices to migrate data of the hot memory region to the second memory device.

According to the embodiments, since hot data of a high access frequency and cold data of a low access frequency may be precisely tracked in a main memory device and thereby valid (or meaningful) hot data may be migrated to a memory of which the operation speed is high, the operation performance of an entire system may be improved.

Also, according to the embodiments, by determining hot data based on a probability, it is possible to track a hot page in which hot data is stored, even though an access count is managed by a unit larger than a page, and as a result, a data migration may be performed by the unit of page.

Further, according to the embodiments, by managing an access count by the unit of a page group including a plurality of pages, it is possible to prevent a storage overhead for storage of access counts from increasing.

DETAILED DESCRIPTION

A main memory device having heterogeneous memories, a computer system including the same, and a data management method thereof are described below with reference to the accompanying drawings through various embodiments. Throughout the specification, reference to “an embodiment,” “another embodiment” or the like is not necessarily to only one embodiment, and different references to any such phrase is not necessarily to the same embodiment(s).

FIG. 1is a diagram illustrating an example of a computer system10in accordance with an embodiment.

The computer system10may be, for example, a general-purpose or special-purpose computer system such as a mainframe computer, a server computer, a personal computer, a mobile appliance and/or a programmable home electronics product.

Referring toFIG. 1, the computer system10includes a central processing unit (CPU)100, a main memory device200, a storage300and an input/output interface400which are electrically coupled to a system bus500. According to an embodiment, the computer system10may further include a separate cache memory150which is coupled to the CPU100.

The CPU100may be implemented with any of various commercially available processors. For example, the CPU100may include, without a limitation, any of AMD® Athlon®, Duron® and Opteron® processors; ARM® application, embedded and secure processors; an IBM®, Motorola®, Dragonball® and PowerPC® processors; IBM and Sony® cell processors; Intel® Celeron®, Core(2) Duo®, Core i3, Core i5, Core i7, Itanium®, Pentium®, Xeon®, and XScale® processors; and similar processors. Dual microprocessors, multi-core processors and other multi-processor architectures may be adopted as the CPU100.

The CPU100may execute or process programs and/or data stored in the main memory device200. For example, the CPU100may execute or process the programs and/or the data in response to a clock signal outputted from a clock signal generator (not illustrated).

The CPU100may be configured to access the cache memory150and the main memory device200. For example, the CPU100may store data in the main memory device200. Further, the CPU100may read data stored in the cache memory150and the main memory device200.

The CPU100may perform various operations based on data stored in the main memory device200. For example, the CPU100may instruct the main memory device200to perform a data migration between a first memory device210and a second memory device250.

The cache memory150refers to a general-purpose memory for reducing a bottleneck phenomenon due to a speed difference between a device having a high speed and a device having a low speed. That is to say, the cache memory150serves to alleviate a data bottleneck phenomenon between the CPU100which operates at a high speed and the main memory device200which operates at a relatively low speed. The cache memory150may cache data frequently accessed by the CPU100among data stored in the main memory device200.

While not illustrated inFIG. 1, the cache memory150may include a plurality of caches. For example, the cache memory150may include an L1 cache and an L2 cache. Here, ‘L’ denotes level with the associated number indicating a specific level on a relative scale. In general, the L1 cache may be built in the CPU100and may be used first for the reference and use of data. The L1 cache may be fastest in speed among caches, but a storage capacity thereof may be small. If data does not exist in the L1 cache (for example, in the case of a cache miss), the CPU100may access the L2 cache. The L2 cache may be relatively slower in speed than the L1 cache, but a storage capacity thereof may be larger. If data does not exist even in the L2 cache, the CPU100accesses the main memory device200.

The main memory device200may include the first memory device210and the second memory device250. The first memory device210and the second memory device250may have different structures. For instance, the first memory device210may include a nonvolatile memory (NVM) and a controller which controls the nonvolatile memory, and the second memory device250may include a volatile memory (VM) and a controller which controls the volatile memory. For example, the volatile memory may be a DRAM (dynamic random access memory) and the nonvolatile memory may be a PCRAM (phase change RAM), but the present invention is not specifically limited to that configuration.

The computer system10may store data in the main memory device200for a short time and temporarily. The main memory device200may store data of a file system format, or may store an operation system program by separately setting a read-only space. When the CPU100executes an application program, at least a part of the application program may be read from the storage300and be loaded to the main memory device200. The main memory device200is described below in detail with reference to drawings.

The storage300may include at least one of a hard disk drive (HDD) and a solid state drive (SSD). A storage refers to a storage medium in which the computer system10stores user data for a long time. An operation system (OS), an application program, program data and so forth may be stored in the storage300.

The input/output interface400may be configured by an input interface and an output interface. The input interface may be coupled with an external input device. According to an embodiment, the external input device may be a keyboard, a mouse, a mike, a scanner or the like. A user may input a command, data and information to the computer system10through the external input device.

The output interface may be coupled with an external output device. According to an embodiment, the external output device may be a monitor, a printer, a speaker or the like. An execution and processing result of the computer system10for a user command is expressed through the external output device.

FIG. 2is a diagram illustrating an example of the configuration of the main memory device200illustrated inFIG. 1.

Referring toFIG. 2, the main memory device200may include the first memory device210including a first memory230as a nonvolatile memory and the second memory device250including a second memory270as a volatile memory. An operating speed, that is, a write and read speed, of the first memory device210may be slower than an operating speed of the second memory device250, but a storage capacity of the first memory device210may be larger than a storage capacity of the second memory device250.

As described above, in the case where a cache miss occurs in the cache memory150, the CPU100accesses the main memory device200and searches for data. Since an operating speed of the second memory device250is faster than an operating speed of the first memory device210, data which the CPU100searches for may be more quickly accessed in the case where it is stored in the second memory device250than in the case where it is stored in the first memory device210.

To this end, the CPU100may control the main memory device200to migrate data that has been accessed many times and thus has a relatively high access count (hot data), among data stored in the first memory device210, to the second memory device250, and to migrate data that has been accessed only a few times and thus has a relatively low access count (cold data) among data stored in the second memory device250, to the first memory device210.

In this regard, in the case where the CPU100manages access counts by the unit of page for the first memory device210, hot data and cold data of the first memory device210determined by the CPU100may be different from actual hot data and cold data in the first memory device210. This is because most of access requests received in the CPU100from an external source are hit in the cache memory150, accesses to the main memory device200is only a small fraction and the CPU100cannot accurately determine whether accessed data is stored in the cache memory150or is stored in the main memory device200.

Due to this fact, in the present embodiment, the first memory device210of the main memory device200directly tracks a page of which an access count is relatively high (e.g., a hot page storing hot data) in the first memory230, and transmits a tracking result to the CPU100according to a request of the CPU100. The CPU100controls the main memory device200to perform a data migration between the first memory device210and the second memory device250, based on the tracking result received from the first memory device210. The data migration between the first memory device210and the second memory device250may be an operation of exchanging hot data in the first memory230and cold data in the second memory270. A detailed configuration and method therefor are described below in detail with reference to drawings.

Continuing to refer toFIG. 2, the first memory device210may include a first controller220and the first memory230. The second memory device250may include a second controller260and the second memory270. While each of the first memory230and the second memory270is illustrated simply as block inFIG. 2, this is merely for clarity. As those skilled in the art understand, each of the first memory230and the second memory270may include a plurality of memory chips.

The first controller220of the first memory device210may control the operation of the first memory230. The first controller220may control the first memory230to perform an operation corresponding to a command received from the CPU100.

The first controller220may group the data storage region of the first memory230into a plurality of regions. Each of the plurality of grouped regions may include a plurality of pages. Each such region is considered an ‘access management region.’ The first controller220may manage an access count for each of the access management regions, and may determine a hot page in which hot data is stored in the first memory230, based on the access counts of the access management regions respectively.

The first controller220manages and tracks accesses to the first memory230not by the unit of page but by the unit of access management region, which is larger than page, because the storage capacity of the first memory230is remarkably large, and to manage such capacity by the unit of page would undesirably increase storage overhead for storing access counts for respective pages increases.

Therefore, in accordance with embodiments of the present invention, in order to prevent storage overhead from increasing, each access count is with respect to an access management region, which unit is larger than that of a page. Determination of a hot page in the first memory230by the first controller220based on access count for the access management regions, respectively, is described below in detail with reference to drawings.

The first memory230may include a memory cell array (not illustrated) which is constituted by a plurality of memory cells, a peripheral circuit (not illustrated) for writing data to the memory cell array or reading data from the memory cell array, and control logic (not illustrated) for controlling the operation of the peripheral circuit. The first memory230may be a nonvolatile memory. For example, the first memory230may be configured by a PCRAM. However, that is merely an example; the first memory230may be configured by any of various nonvolatile memories.

The second controller260of the second memory device250may control the operation of the second memory270. The second controller260may control the second memory270to perform an operation corresponding to a command received from the CPU100. The second memory270may perform an operation of writing data to a memory cell array (not illustrated) or reading data from the memory cell array, depending on a command provided from the second controller260.

The second memory270may include the memory cell array which is constituted by a plurality of memory cells, a peripheral circuit (not illustrated) for writing data to the memory cell array or reading data from the memory cell array, and control logic (not illustrated) for controlling the operation of the peripheral circuit.

The second memory270may be a volatile memory. For example, the second memory270may be configured by a DRAM. However, that is merely an example; the second memory270may be configured by any of various volatile memories.

The first memory device210may have a relatively longer access latency than the second memory device250. An access latency may mean a period of time from a time at which a command is transmitted from the CPU100to a time at which an operation corresponding to the transmitted command is completed and a response is transmitted to the CPU100. The first memory device210may have a relatively larger power consumption amount per unit time than the second memory device250.

FIG. 3Ais a diagram illustrating an example of the configuration of the first controller220of the first memory device210in accordance with an embodiment.

Referring toFIG. 3A, the first controller220may include a first interface221, a memory core222, an access management circuit223, an access count storage circuit224, and a second interface225.

The first interface221may be configured to receive a command transmitted from the CPU100or transmit data to the CPU100, through the system bus500.

The memory core222may control general operations of the first controller220. The memory core222may be configured by a micro control unit (MCU) or a central processing unit (CPU). The memory core222may process a command transmitted from the CPU100. In order to process a command transmitted from the CPU100, the memory core222may drive a code type instruction or algorithm, that is, a firmware, and may control internal function blocks, such as the first interface221, the access management circuit223, the access count storage circuit224and the second interface225, and the first memory230.

The memory core222may generate control signals for controlling an operation of the first memory230, based on a command transmitted from the CPU100, and may provide the generated control signals to the first memory230through the second interface225.

The memory core222may group the entire data storage region of the first memory230into a plurality of access management regions each of which includes a plurality of pages. The memory core222may manage access counts for the respective access management regions of the first memory230, by using the access management circuit223.

The access management circuit223may manage access counts for the respective access management regions of the first memory230according to the control of the memory core222. For example, the access management circuit223may increment an access count of a corresponding access management region, which access count is stored in the access count storage circuit224, each time such region of the first memory230is accessed. The access to an access management region may be an access to a certain page among a plurality of pages in the corresponding access management region. For example, when a first page in a first access management region is accessed, it is the access count of the first access management region that is incremented, not an access count of the first page per se.

The access count storage circuit224may be configured to store access counts of the respective access management regions of the first memory230. The access count storage circuit224may be included in a certain region of a memory (not illustrated) such as an SRAM and a DRAM included in the first controller220or may be provided as a separate register.

The second interface225may control the first memory230according to the control of the memory core222. The second interface225may provide control signals, generated by the memory core222, to the first memory230. The control signals may include a command, an address, an operation control signal and the like for controlling the first memory230. The second interface225may provide data to the first memory230or may be provided with data from the first memory230.

The first interface221, the memory core222, the access management circuit223, the access count storage circuit224and the second interface225of the first controller220may be electrically coupled through an internal bus227.

FIG. 3Bis a diagram illustrating an example of the configuration of the first controller220of the first memory device210in accordance with another embodiment. In describing the configuration of the first controller220ofFIG. 3B, description of components in, and previously described with respect to, the first controller220ofFIG. 3Ais omitted here.

Referring toFIG. 3B, the first controller220may include an access management logic228which is included in the memory core222. The access management logic228may be configured by software, hardware or a combination thereof.

FIG. 4Ais a diagram illustrating an example of the configuration of the access count storage circuit224,FIG. 4Bis a diagram illustrating an example of determining whether or not a hot page has occurred for one access management region, andFIG. 4Cis a diagram illustrating an example of a state in which a hot page address is stored in the access count storage circuit224. By way of example, it is assumed that the first memory230is grouped into n access management regions. Here, n is a natural number of 1 or greater.

Referring toFIG. 4A, the access count storage circuit224may be configured to store n access counts for n access management regions REGION1to REGIONn, respectively, and store a hot page address when a hot page occurs. A hot page represents a page in which hot data is stored, and a hot page and hot data may have the same meaning in the present specification. A hot page may be a page which is accessed at a time when an access count of a corresponding access management region is at or exceeds a threshold value m, where m≥1. The threshold value may be preset.

For example, as illustrated inFIG. 4B, it is assumed that m accesses have been made to a first access management region REGION1of the first memory230from the CPU100. When a first access A1is made, an access count corresponding to the first access management region REGION1in the access count storage circuit224may be changed from ‘0’ to ‘1.’ The access count may be maintained in an access count field. Then, each time each another access is made, i.e., from the second access A2to an mth access Am, the access count corresponding to the first access management region REGION1in the access count storage circuit224may be incremented by ‘1,’ and will eventually become ‘m’ as illustrated inFIG. 4C.

When an access count of the first access management region REGION1reaches ‘m,’ the access management circuit223may store an address (for example, ADDR_H) corresponding to a page accessed on the mth access, among a plurality of pages in the first access management region REGION1, in a hot page address field corresponding to the first access management region REGION1in the access count storage circuit224. The determination of the mth accessed page as a hot page may be performed based on probability. That is to say, based on a characteristic that a previously accessed page has a high probability to be accessed again, it is assumed that most of the m accesses to the first access management region REGION1are to the mth accessed page. In this way, by determining a hot page based on probability, even though an access count is managed by the unit of access management region, which unit is larger than that of a page, it is possible to track a hot page with a high degree of accuracy, and as a result, data migration may be performed by the unit of page.

Moreover, as described above, by managing an access count not by the unit of page but by a larger unit (that is, an access management region including a plurality of pages), it is possible to prevent storage overhead for storage of access counts from increasing.

It was described that the first controller220of the first memory device210manages access counts of the respective access management regions of the first memory230, and when an access count of an access management region reaches the threshold value m, stores an address corresponding to the mth accessed page accessed, among the pages in the corresponding access management region, as a hot page address. Below, a method for migrating data stored in a hot page, determined based on an access count of each access management region, to the second memory device250having a high operating speed is described in detail.

FIG. 5is a flow chart to assist in the explanation of a data management method in accordance with an embodiment. In explaining the data management method in accordance with the present embodiment, in addition to reference toFIG. 5, reference may be made toFIGS. 3A to 4C.

At step S501, the CPU100may determine whether a period (e.g., a preset period) for checking whether a hot page exists in the first memory230of the first memory device210is reached. If so, the process may proceed to step S503.

At the step S503, the CPU100may transmit a command for checking whether a hot page exists in the first memory230, that is, a hot page checking command CMD_H is transmitted to the first memory device210through the system bus500(seeFIG. 1).

At step S505, the first controller220of the first memory device210may check whether an address (that is, a hot page address) stored in the access count storage circuit224, e.g., in the host page address field thereof, exists, in response to the hot page checking command CMD_H received from the CPU100. When it is determined that a hot page address is stored in the access count storage circuit224, the process may proceed to step S507. On the other hand, when no hot page address is stored in the access count storage circuit224, the process may proceed to step S509.

At the step S507, the first controller220of the first memory device210may transmit a hot page address ADDR_H to the CPU100through the system bus500. Thereafter, the process may proceed to step S511.

On the other hand, at the step S509, the first controller220of the first memory device210may transmit to the CPU100a response RES_NH indicating that no hot page exists. Thereafter, the process may proceed to step S517.

At the step S511, the CPU100may transmit a data migration command CMD_DM to the first memory device210and the second memory device250. The data migration command CMD_DM may include a data migration command for migrating hot data, stored in a page corresponding to the hot page address ADDR_H of the first memory230of the first memory device210, to the second memory270of the second memory device250. Also, the data migration command CMD_DM may include a command for migrating cold data, stored in a cold page of the second memory270of the second memory device250, to the first memory230of the first memory device210. Thus, thereafter, the process may proceed to step S513and step S515, respectively. For example, steps S513and S515may be simultaneously performed, but it is to be noted that the present invention is not specifically limited to such parallel processing.

At the step S513, the second controller260of the second memory device250may read cold data from a cold page of the second memory270and temporarily store the read cold data in a buffer memory (not illustrated), and may store hot data received from the first memory device210in the cold page. Further, the second controller260may transmit the cold data temporarily stored in the buffer memory to the first memory device210.

If the second memory270of the second memory device250includes an empty page, the procedure in which cold data is read from a cold page and is temporarily stored in the buffer memory may be omitted, and hot data of the first memory230may be immediately stored in the empty page of the second memory270.

However, in order to migrate hot data of the first memory230to the second memory270in a state in which the second memory270is full, the hot data needs to be exchanged with data stored in the second memory270. To this end, the CPU100may select data, among data stored in the second memory270, to be exchanged with hot data of the first memory230, and criteria for selecting data in the second memory270may be a time of last access or frequency of access. For example, the CPU100may select data (that is, cold data) stored in a page which is least recently used among pages of the second memory270, as data to be exchanged with hot data of the first memory230.

At the step S511, the CPU100may select cold data in the second memory270of the second memory device250before transmitting the data migration command CMD_DM to the first memory device210and the second memory device250. The data migration command CMD_DM may include a cold page address at which the selected cold data is stored. A method for the CPU100to select cold data in the second memory270is described below in detail with reference toFIG. 6.

At the step S515, the first controller220of the first memory device210may read hot data from a hot page of the first memory230and transmit the read hot data to the second memory device250, and may store cold data received from the second memory device250in the hot page.

At the step S517, the CPU100may transmit an access count storage circuit reset command CMD_R, for initializing values stored in the access count field and the hot page address field of the access count storage circuit224, to the first memory device210. While it was described above by way of example that the CPU100sequentially transmits the commands CMD_H, CMD_DM and CMD_R, the CPU100may transmit a single aggregate command including all of the above-described commands CMD_H, CMD_DM and CMD_R to the first and second memory devices210and250.

At step S519, the first controller220of the first memory device210may initialize values (or information) stored in the access count storage circuit224, according to the access count storage circuit reset command CMD_R received from the CPU100.

FIG. 6is a diagram illustrating an example of least recently used (LRU) queues for the first memory230and the second memory270, respectively. As described above, the CPU100may select cold data in the second memory230to be exchanged with hot data of the first memory230, by using the LRU queue of the second memory270illustrated inFIG. 6.

The CPU100may separately manage the LRU queues for the first memory230and the second memory270, respectively. For convenience of explanation, the LRU queue for the first memory230is referred to as a first LRU queue LRUQ1, and the LRU queue for the second memory270is referred to as a second LRU queue LRUQ2. The first LRU queue LRUQ1and the second LRU queue LRUQ2may be stored in the first memory230or the second memory270. The first LRU queue LRUQ1and the second LRU queue LRUQ2may have the same configuration. For example, each of the first LRU queue LRUQ1and the second LRU queue LRUQ2may include a plurality of spaces for queueing a plurality of addresses. In each of the first LRU queue LRUQ1and the second LRU queue LRUQ2, an address of a most recently used (MRU) page may be queued in a first space at one end of the corresponding queue, and an address of a least recently used (LRU) page may be queued in a first space at the other end.

Each time an access is made to each of the first memory230and the second memory270, an address of an accessed page stored in the MRU space of each of the first LRU queue LRUQ1and the second LRU queue LRUQ2is updated, and addresses of remaining accessed pages from an accessed page previously stored in the MRU space may be shifted one space toward the LRU space.

The CPU100may check an LRU page in the second memory270by referring to the second LRU queue LRUQ2, and may determine data stored in the corresponding page as cold data to be exchanged with hot data of the first memory230. On the other hand, if the exchange of hot data of the first memory230and cold data of the second memory270is completed, the CPU100may update information, that is, page addresses, stored in the MRU spaces of the first LRU queue LRUQ1and the second LRU queue LRUQ2.

FIG. 7Ais a diagram illustrating an example of a data migration between the first memory device210and the second memory device250, andFIG. 7Bis a diagram to assist in the explanation of a state in which the first LRU queue LRUQ1and the second LRU queue LRUQ2are updated after a data migration.

Referring toFIG. 7A, the CPU100may transmit the data migration command CMD_DM to the first memory device210and the second memory device250through the system bus500({circle around (1)}).

The data migration command CMD_DM may include an address of a hot page in which hot data is stored in the first memory230, a read command for reading the hot data from the hot page and a write command for storing cold data transmitted from the second memory device250. However, the present invention is not specifically limited this configuration.

Also, the data migration command CMD_DM may include an address of a cold page in which cold data is stored in the second memory270, a read command for reading the cold data from the cold page and a write command for storing hot data transmitted from the first memory device210. However, the present invention is not specifically limited to this configuration.

The second controller260of the second memory device250which receives the data migration command CMD_DM from the CPU100may read cold data from the second memory270and may temporarily store the read cold data in a buffer memory (not illustrated) included in the second controller260({circle around (2)}). Similarly, the first controller220of the first memory device210may read hot data from the first memory230based on the data migration command CMD_DM ({circle around (2)}), and may transmit the read hot data to the second controller260({circle around (3)}).

The second controller260may store the hot data received from the first memory device210, in the second memory270({circle around (4)}). A region in which the hot data is stored in the second memory270is a region in which the cold data was stored.

The second controller260may transmit the cold data temporarily stored in the buffer memory to the first memory device210({circle around (5)}). The first controller220may store the cold data received from the second memory device250, in the first memory230({circle around (6)}). A region in which the cold data is stored in the first memory230is a region in which the hot data was stored. As a result, the hot data of the first memory230may be exchanged with the cold data of the second memory270.

As described above, to execute a data migration between the first memory230and the second memory270, the CPU100accesses a page in which hot data is stored in the first memory230, and accesses an LRU page (seeFIG. 6) in the second memory270.

Due to this fact, as illustrated inFIG. 7B, an address (for example, ADDR_C) corresponding to an LRU page in the second LRU queue LRUQ2before data exchange may be stored in the MRU space as an MRU address in the second LRU queue LRUQ2after data exchange. As new address information (i.e., ADDR_C) is stored in the MRU space of the second LRU queue LRUQ2, subsequent addresses including an address previously stored in the MRU space may be migrated one space by one space toward the LRU space. For example, it is assumed that, before data exchange, addresses ‘1’ to ‘k’ are stored in the second LRU queue LRUQ2and the address ‘k’ is the cold page address ADDR_C. After data exchange, as the address ‘k’ is stored in the MRU space of the second LRU queue LRUQ2, each of the addresses ‘1’ to ‘k−1’ is migrated or shifted one space rightward, and thus the address ‘k−1’ becomes an LRU page.

Moreover, an address (for example, ADDR_H) corresponding to a hot page in the first LRU queue LRUQ1before data exchange may be stored in the MRU space as an MRU address in the first LRU queue LRUQ1after data exchange. As a new address (that is, ADDR_H) is stored in the MRU space of the first LRU queue LRUQ1, each of addresses from an address which is previously stored in the MRU space to an address which is previously stored in a space before a space in which the hot page address ADDR_H was previously stored may be migrated one space toward the LRU space. For example, it is assumed that, before data exchange, addresses ‘1’ to ‘k’ are stored in the first LRU queue LRUQ1and the address ‘3’ is the hot page address ADDR_H. After data exchange, as the address ‘3’ is stored in the MRU space of the first LRU queue LRUQ1, the addresses ‘1’ and ‘2’ are each migrated one space rightward. In the first LRU queue LRUQ1, the address ‘k’ is still an LRU page.

When data exchange is completed, the first controller220of the first memory device210may perform a reset operation of initializing information stored in the access count field and the hot page address field of the access count storage circuit224. The reset operation for the access count storage circuit224is performed in this way because, in the case where an access count reaches the threshold value m as the access count is incremented for a substantially long time, it is unnecessary to migrate data stored in a corresponding page to the second memory270as hot data. In other words, in this case, the hot data may be invalid (or meaningless) hot data. Therefore, each time commands for periodically checking hot data, migrating the hot data and resetting the access count storage circuit224are received from the CPU100, the first controller220resets the access count storage circuit224regardless of whether or not hot data exists and whether or not a data migration is performed.

FIG. 8is a diagram illustrating an example of the configuration of a system1000in accordance with an embodiment. InFIG. 8, the system1000may include a main board1110, a processor1120and memory modules1130. The main board1110, on which components constituting the system1000may be mounted, may be referred to as a mother board. The main board1110may include a slot (not illustrated) in which the processor1120may be mounted and slots1140in which the memory modules1130may be mounted. The main board1110may include wiring lines1150for electrically coupling the processor1120and the memory modules1130. The processor1120may be mounted on the main board1110. The processor1120may include a central processing unit (CPU), a graphic processing unit (GPU), a multimedia processor (MMP) or a digital signal processor. Further, the processor1120may be realized in the form of a system-on-chip by combining processor chips having various functions, such as application processors (AP).

The memory modules1130may be mounted on the main board1110through the slots1140of the main board1110. The memory modules1130may be coupled with the wiring lines1150of the main board1110through module pins formed in module substrates and the slots1140. Each of the memory modules1130may include, for example, a UDIMM (unbuffered dual in-line memory module), a DIMM (dual in-line memory module), an RDIMM (registered dual in-line memory module), an LRDIMM (load-reduced dual in-line memory module), an SODIMM (small outline dual in-line memory module) or an NVDIMM (nonvolatile dual in-line memory module).

The main memory device200illustrated inFIG. 1may be applied as the memory module1130. Each of the memory modules1130may include a plurality of memory devices1131. Each of the plurality of memory devices1131may include at least one of a volatile memory device and a nonvolatile memory device. The volatile memory device may include an SRAM, a DRAM or an SDRAM, and the nonvolatile memory device may include a ROM, a PROM, an EEPROM, an EPROM, a flash memory, a PRAM, an MRAM, an RRAM or an FRAM. The second memory device250of the main memory device200illustrated inFIG. 1may be applied as the memory device1131including a nonvolatile memory device. Moreover, each of the memory devices1131may include a stacked memory device or a multi-chip package which is formed as a plurality of chips are stacked.

FIG. 9is a diagram illustrating an example of the configuration of a system2000in accordance with an embodiment. InFIG. 9, the system2000may include a processor2010, a memory controller2020and a memory device2030. The processor2010may be coupled with the memory controller2020through a chip set2040, and the memory controller2020may be coupled with the memory device2030through a plurality of buses. While one processor2010is illustrated inFIG. 9, it is to be noted that the present invention is not specifically limited to such configuration; a plurality of processors may be provided physically or logically.

The chip set2040may provide communication paths through which signals are transmitted between the processor2010and the memory controller2020. The processor2010may perform an arithmetic operation, and may transmit a request and data to the memory controller2020through the chip set2040to input/output desired data.

The memory controller2020may transmit a command signal, an address signal, a clock signal and data to the memory device2030through the plurality of buses. By receiving the signals from the memory controller2020, the memory device2030may store data and output stored data to the memory controller2020. The memory device2030may include at least one memory module. The main memory device200ofFIG. 1may be applied as the memory device2030.

InFIG. 9, the system2000may further include an input/output bus2110, input/output devices2120,2130and2140, a disk driver controller2050and a disk drive2060. The chip set2040may be coupled with the input/output bus2110. The input/output bus2110may provide communication paths for transmission of signals from the chip set2040to the input/output devices2120,2130and2140. The input/output devices2120,2130and2140may include a mouse2120, a video display2130and a keyboard2140. The input/output bus2110may include any communication protocol communicating with the input/output devices2120,2130and2140. Further, the input/output bus2110may be integrated into the chip set2040.

The disk driver controller2050may operate by being coupled with the chip set2040. The disk driver controller2050may provide communication paths between the chip set2040and the at least one disk drive2060. The disk drive2060may be utilized as an external data storage device by storing commands and data. The disk driver controller2050and the disk drive2060may communicate with each other or with the chip set2040by using any communication protocol including the input/output bus2110.

While various embodiments have been illustrated and described, it will be understood to those skilled in the art that the embodiments described are examples only. Accordingly, the present invention is not limited to the described embodiments. Rather, the present invention encompasses all variations and modifications of the disclosed embodiments that fall within the scope of the claims and their equivalents.