Memory management system and memory management method

By using memory management systems and methods in heterogeneous memory architectures, monitoring the processor's access to memory, predicting the memory usage time, and turning on or off the memory in advance, the power consumption caused by unnecessary memory opening in heterogeneous memory architectures is solved. and performance issues, more efficient energy consumption management and operation speed improvements are achieved.

CN111880724BActive Publication Date: 2024-11-29MEDIATEK INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010309797.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-20
Publication Date
2024-11-29
Estimated Expiration
2040-04-20

AI Technical Summary

Technical Problem

In heterogeneous memory architecture, memory may be turned on unnecessarily when not required to be used, resulting in excessive power consumption and slow operation speed, affecting system performance.

Method used

Through the memory management system and method, the memory access monitoring module is used to monitor the processor's access to the memory, predict when the memory will be used, and the memory will be turned on or off in advance to reduce unnecessary power consumption and improve operation speed.

Benefits of technology

It effectively reduces the power consumption of memory, improves the operating speed of the system, avoids unnecessary memory opening, and optimizes the performance of heterogeneous architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111880724B_ABST
    Figure CN111880724B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a memory management system and a memory management method. Specifically, the memory management system includes a memory, a processor, a memory access monitoring module and a memory management module. The processor is used to access the memory. The memory access monitoring module includes a first terminal coupled to the processor and a second terminal coupled to the memory. The memory access monitoring module is used to monitor whether the processor has accessed the memory so as to generate monitoring data. The memory management module is used to receive the monitoring data and predict when the memory will be accessed based on at least the monitoring data. The present disclosure proposes a memory management system and a memory management method, which achieve the beneficial effect of reducing power consumption by making predictions through monitoring the memory.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to U.S. patent application No. 16 / 402,198, filed on May 2, 2019, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the field of memory, and in particular to a memory management system and a memory management method. Background Art

[0004] In the field of memory, a heterogeneous architecture may be used. A heterogeneous architecture includes a first memory and a second memory. For example, the first memory may be cheaper, operate slower, have a larger memory capacity, and consume more power than the second memory.

[0005] In order to balance efficiency and cost, some data and programs can be stored in the first memory instead of the second memory. Through this heterogeneous architecture approach, performance can be improved without excessively increasing the cost of memory. However, several problems have been found. When there is no need to use a larger, slower, and more energy-consuming memory, the memory may still be turned on unnecessarily. This will lead to excessive power consumption.

[0006] Figure 1 FIG. 2 shows a timing diagram of turning on / off a memory according to the prior art. Figure 1 In FIG. 1 , the horizontal axis corresponds to time, and the vertical axis corresponds to the power supplied to the memory. Figure 1 As shown in the example of , at time t1, an application is started, and thus a memory (e.g., the first memory described above) is powered on and turned on. At time t2, the application is deactivated, and thus the memory is turned off. The memory may be turned on for a time interval T11. However, during the time interval T11, the memory may not always be accessed. In other words, the memory may be turned on unnecessarily and consume excessive power. In addition, a solution is being sought to increase the operating speed of a heterogeneous architecture. Summary of the invention

[0007] The embodiment discloses a memory management system, which includes a memory, a processor, a memory access monitoring module and a memory management module. The processor is used to access the memory. The memory access monitoring module includes a first terminal coupled to the processor and a second terminal coupled to the memory. The memory access monitoring module is used to monitor whether the processor has accessed the memory so as to generate monitoring data. The memory management module is used to receive the monitoring data and predict when the memory will be accessed based on at least the monitoring data.

[0008] Another embodiment discloses a memory management method. The memory management method includes: monitoring whether the processor has stored in the memory to generate monitoring data; predicting when the processor will access the memory based on the monitoring data; and turning on the memory a little in advance when it is predicted that the memory will be accessed. Conversely, the best time can be predicted to turn off the memory to save energy.

[0009] The present disclosure proposes a memory management system and a memory management method, which achieve the beneficial effect of reducing power consumption by making predictions through monitoring the memory.

[0010] These and other objects of the present invention will no doubt become apparent to those skilled in the art after reading the following detailed description of the preferred embodiment illustrated in the various drawings and figures. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A timing diagram for turning on / off a memory according to the prior art is shown.

[0012] Figure 2 A memory management system according to an embodiment is shown.

[0013] Figure 3 A flow chart of a memory management method according to an embodiment is shown.

[0014] Figure 4 A timing diagram for turning on / off the first memory according to an embodiment is shown. DETAILED DESCRIPTION

[0015] Figure 2 A memory management system 100 according to an embodiment is shown. The memory management system 100 may include a first memory 110, a second memory 120, a processor 150, a memory access monitoring module 160, and a memory management module 180.

[0016] According to an embodiment, the first memory 110 may be (but not limited to) a dynamic random-access memory (DRAM), a read-only memory (ROM), a flash memory, or a static random-access memory (SRAM). The processor 150 may be (but not limited to) a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor, a microcontroller, or a circuit having a processing function. The memory access monitoring module 160 may be a circuit block embedded in a bus, wherein the bus may be coupled between the processor 150 and the first memory 110. The memory management module 180 may be formed by software, hardware, and / or firmware, and is used to execute a prediction algorithm.

[0017] The processor 150 may be used to access the first memory 110. The memory access monitoring module 160 includes: a first terminal coupled to the processor 150, and a second terminal coupled to the first memory 110. The memory access monitoring module 160 may be used to monitor whether the processor 150 has accessed the first memory 110, so as to generate monitoring data Dm. For example, according to an embodiment, the memory access monitoring module 160 may monitor whether the processor 150 has accessed the first memory 110 by monitoring whether the processor 150 has sent an address corresponding to the first memory 110. The memory management module 180 may be used to receive the monitoring data Dm, and predict when the first memory 110 will be accessed based on at least the monitoring data Dm.

[0018] According to an embodiment, the memory access monitoring module 160 may include (but not limited to) a detector 1610 and a monitor 1620. The detector 1610 may be used to detect whether the processor 150 has accessed the first memory 110. The monitor 1620 may be used to record the start time and end time of the processor 150 accessing the first memory 110. The monitoring data Dm may be generated based on the information collected by the detector 1610 and the monitor 1620.

[0019] After the first memory 110 is accessed multiple times, multiple genuine start times and multiple genuine end times of accessing the first memory 110 may be collected, and the memory management module 180 may predict when the first memory 110 will be accessed based on experience.

[0020] According to an embodiment, when the memory management module 180 predicts that the first memory 110 will be accessed, the memory management module 180 may arrange the first memory 110 to be turned on. According to an embodiment, when the first memory 110 is to be accessed but the first memory 110 is not turned on to prepare for access, the memory management module 180 may control the processor 150 to perform a stall operation until the first memory 110 is turned on. In other words, the memory management module 180 may control the processor 150 to perform a stall operation to wait for the first memory 110 to be turned on. When the processor 150 performs the stall operation, the processor 150 may stall the entire process of accessing the first memory 110 or only suspend the process of accessing the first memory 110. After the first memory 110 has been turned on, the processor 150 may resume the operation or resume the process of accessing the first memory 110.

[0021] According to an embodiment, when the memory management module 180 predicts that the first memory 110 will not be accessed, the memory management module 180 may arrange the first memory 110 to be turned off.

[0022] According to an embodiment, when the memory is turned on, the memory may be controlled to enter an active mode or to provide power to the memory. When the memory is turned off, the memory may be controlled to enter a self-refresh mode or a power-down mode, or the memory may be powered off.

[0023] According to an embodiment, the memory management module 180 may use the monitoring data Dm to predict when the first memory 110 will be accessed through machine learning. As described above, the memory management module 180 may be used to execute a prediction algorithm to predict when the first memory 110 will be accessed.

[0024] According to an embodiment, the memory management module 180 may also be used to use the monitoring data Dm to correct the prediction made by the memory management module 180. In other words, as the memory management module 180 continuously receives the monitoring data Dm from the memory access monitoring module 160, the memory management module 180 may continuously improve the accuracy and correctness of the prediction. There may be an error value between the predicted time and the actual time when the processor 150 accesses the first memory 110, but due to machine learning and / or statistical calculations, the error value can be detected to improve and optimize subsequent predictions.

[0025] Data can be obtained to make the prediction more and more accurate by recurrently predicting when the first memory 110 will be accessed and checking the actual time of accessing the first memory 110. According to an embodiment, the predicted time of opening the first memory 110 can be closer and closer to the actual time of opening the first memory 110, and the predicted time of closing the first memory 110 can be closer and closer to the actual time of closing the first memory 110.

[0026] about Figure 2 The second memory 120 shown in the figure can be SRAM, DRAM, ROM or flash memory. The memory access monitoring module 160 can also include a third terminal coupled to the second memory 120. The memory access monitoring module 160 can also be used to monitor whether the processor 150 has accessed the second memory 120, so as to expand the monitoring data Dm. In other words, the monitoring data Dm can include not only information on whether the first memory 110 is accessed, but also information on whether the second memory 120 is accessed, and related time information.

[0027] According to an embodiment, the memory management module 180 can predict when the first memory 110 will be accessed based on the monitoring data Dm and the operation scenario. The operation scenario can be a condition for applying a group of devices and / or a group of programs. For example, when a gyroscope sensor, a barometer sensor, a pedometer sensor, and a thermometer sensor of an enabled mobile device (e.g., a mobile phone) are used, the condition can be an operation scenario. In another example, when a group of mobile applications are used, the condition can be another operation scenario. Because the time and frequency of turning on / off the first memory 110 can vary with the operation scenario, the memory management module 180 can predict when the first memory 110 will be accessed based on the monitoring data Dm and the operation scenario. When entering different operation scenarios, the memory management module 180 can use the corresponding time plan to make predictions. According to an embodiment, the detector 1610 can detect a group of devices / programs used with the first memory 110, and the monitor 1620 can record the amount of data used by the device / program. The information about the used devices / programs collected by the detector 1610 and the monitor 1620 may be used by the memory management module 180 to determine the corresponding operation scenario. According to an embodiment, the monitoring data Dm may also include information about the operation scenario.

[0028] Figure 3 2 shows a flow chart of a memory management method 200 according to an embodiment. Figure 2 and Figure 3As shown, the memory management method 200 may include the following steps.

[0029] Step 220: predicting when the processor 150 will access the first memory 110 according to the monitoring data Dm;

[0030] Step 230: When it is predicted that the first memory 110 will be accessed, enable the first memory 110;

[0031] Step 240: When it is predicted that the first memory 110 will not be accessed, shut down the first memory 110; and

[0032] Step 250: Monitoring whether the processor 150 has accessed the first memory 110 to generate monitoring data Dm.

[0033] According to an embodiment, as described above, it is possible to Figure 2 The memory management module 180 of the present invention may be used to perform step 220. Steps 230 and 240 may be performed according to the prediction made by the memory management module 180 to turn on / off the first memory 110. Figure 3 This is just an example. If necessary, step 240 may be performed before step 230, and step 230 and step 240 may be performed sequentially. Step 250 may be performed by Figure 2 According to an embodiment, when step 230 and step 240 are executed to collect and generate monitoring data Dm, step 250 may be executed simultaneously. For example, when step 220 is initially executed, an initial default setting may be used for prediction, and then the default setting may be modified according to the monitoring result (e.g., data Dm) obtained in step 250, and then the modified setting may be used for subsequent prediction. The steps may be repeatedly executed as a loop. Figure 3 The method 200 is used to continuously monitor the difference between the predicted time and the actual time when the first memory 110 is accessed, so as to continuously correct and optimize the prediction accordingly. As described above, these steps can be performed cyclically to improve the accuracy of the prediction, and dynamic memory management can be achieved.

[0034] For example, the first memory 110 may have a larger storage capacity, a lower operating speed, and a higher power consumption. The second memory 120 may have a smaller storage capacity, a higher operating speed, and a lower power consumption. For example, the first memory 110 may be (but not limited to) a DRAM, and the second memory 120 may be (but not limited to) an SRAM. According to an embodiment, the first memory 110 may be turned on / off according to a prediction made by the memory management module 180, the second memory 120 may be turned off when the system 100 is suspended, and the second memory 120 may be turned on when the system 100 is awakened. However, this is merely an example and is not intended to limit the scope of the embodiment.

[0035] Figure 4 FIG. 2 shows a timing diagram of turning on / off the first memory 110 according to an embodiment. Figure 4 , the horizontal axis corresponds to time, and the vertical axis corresponds to power supplied to the first memory 110. Figure 4 In the example, at time t41, the system 100 may be awakened from the suspend mode (sleep mode) to enter the wake-up mode. At time t42, the processor 150 may try to access data and may find the data in the cache memory. In other words, a "cache hit" may occur at time t42. According to the prior art, because the cache memory may be transparent to the program running on the processor 150, the first memory 110 may be unnecessarily turned on when not in use. However, if Figure 4 As shown, according to an embodiment, because the memory management module 180 does not predict that the first memory 110 will be accessed at time t42, the first memory 110 will not be unnecessarily turned on at time t42. Because the memory management module 180 can predict that the first memory 110 will be accessed after time t43 and will not be accessed after time t45, the first memory 110 can be turned on at time t43 and turned off at time t45. For example, at time t43, the processor 150 may not be able to find the required data in the cache memory, so a "cache miss" may occur. Because the first memory 110 can actually be accessed starting from time t44, and time t44 is after time t43, the processor 150 may not need to perform a suspend operation to wait for the first memory 110 to be turned on, and the speed of the operating system can be improved. Between time t46 and time t47, because the following may occur Figure 4The cache hit shown in FIG. 1 is hit, so the first memory 110 may not be turned on. However, according to the prior art, because the system enters the wake-up mode from the suspend mode, the first memory 110 may be unnecessarily turned on from time t46 to time t47, and the first memory 110 may be turned on but not accessed. According to the prediction made by the memory management module 180, the memory 110 may be turned on a little earlier when the memory 110 starts to be accessed, and the optimal time to turn off the memory 110 may be predicted to save energy.

[0036] By means of the memory management system 100 and the memory management method 200, it is possible to avoid the first memory 110 from being turned on unnecessarily when it is not accessed, so that power consumption can be reduced. With the help of advance prediction, it is possible to avoid turning on the first memory 110 after the processor 150 sends an address, so the time waiting for the first memory 110 to be awakened from the sleep mode can be reduced, and the operating speed of the system can be improved. In addition, when the memory management system 100 is designed as a cacheable structure, it is possible to avoid turning on the first memory 110 unnecessarily when the required data has been obtained in the cache memory, wherein the cache memory can be a smaller and faster memory embedded between the processor 150 and a group of main memories (including the memory 110 and the memory 120), and the condition for obtaining the required data in the cache memory can be a so-called cache hit. According to an embodiment, when the system is awakened / suspended, the memory may not be turned on / off synchronously, so excessive power consumption caused by turning on the memory unnecessarily can be reduced. In summary, with the help of the memory management system and the memory management method provided by the embodiment, in a heterogeneous architecture, problems related to memory cost, power consumption and operating speed can be reduced.

[0037] It is easy for a person skilled in the art to realize that various modifications and changes can be made to the apparatus and method while maintaining the teachings of the present invention. Therefore, the above disclosure should be interpreted as being limited only by the scope of the appended claims.

Claims

1. A memory management system, characterized in that: include: a first memory; a processor, wherein the processor is configured to access the first memory; a memory access monitoring module, the memory access monitoring module comprising: a first terminal coupled to the processor and a second terminal coupled to the first memory, the memory access monitoring module being configured to monitor whether the processor has accessed the first memory so as to generate monitoring data; as well as a memory management module, the memory management module being configured to receive the monitoring data and predict, at least based on the monitoring data, that the first memory will be accessed, wherein when the memory management module predicts that the first memory will be accessed, the memory management module arranges the first memory to be turned on, wherein when the memory management module predicts that the first memory will not be accessed, the memory management module arranges the first memory to be closed, The difference between the predicted time and the actual time of accessing the first memory is obtained according to the monitoring data, and the difference is used to correct the prediction made by the memory management module.

2. The memory management system according to claim 1, characterized in that: The memory access monitoring module also includes: a detector configured to detect whether the processor has accessed the first memory; and a monitor, the monitor being configured to record a start time and an end time of an access by the processor to the first memory; The monitoring data is generated based on information collected by the detector and the monitor.

3. The memory management system according to claim 1, characterized in that: The memory management module controls the processor to perform a suspension operation or just suspend the process until the first memory is enabled.

4. The memory management system according to claim 1, characterized in that: The memory management module uses the monitoring data to predict, through machine learning, when the first memory will be accessed.

5. The memory management system according to claim 1, characterized in that: The memory management system also includes: a second memory, wherein the memory access monitoring module also includes: a third terminal coupled to the second memory, and the memory access monitoring module is also configured to monitor whether the processor has accessed the second memory in order to expand the monitoring data.

6. The memory management system according to claim 1, characterized in that: The memory access monitoring module monitors whether the processor has accessed the first memory by monitoring whether the processor has sent an address corresponding to the first memory.

7. The memory management system according to claim 1, characterized in that: The first memory is a dynamic random access memory, a read-only memory, a flash memory or a static random access memory.

8. The memory management system according to claim 1, characterized in that: The memory management module predicts when the first memory will be accessed based on the monitoring data and the operation scenario.

9. A memory management method, characterized in that: include: monitoring whether the processor has accessed the first memory to generate monitoring data; predicting when the processor will access the first memory according to the monitoring data; When it is predicted that the first memory will be accessed, opening the first memory; When it is predicted that the first memory will not be accessed, shutting down the first memory; as well as The prediction is modified according to a difference between a predicted time and an actual time of accessing the first memory, wherein the difference is obtained according to the monitoring data.

10. The memory management method according to claim 9, characterized in that: The memory management method further comprises: The processor is controlled to perform a suspend operation or just pause a process until the first memory is enabled.

11. The memory management method according to claim 9, characterized in that: The monitoring data is generated in the following way: detecting whether the processor has accessed the first memory; and The start time and the end time of the processor accessing the first memory are recorded.

12. The memory management method according to claim 9, characterized in that: When the processor will access the first memory is predicted through machine learning based on the monitoring data.

13. The memory management method according to claim 9, characterized in that: The memory management method further comprises the following steps: It is monitored whether the processor has accessed the second memory in order to expand the monitoring data.

14. The memory management method according to claim 9, characterized in that: When the processor will access the first memory is predicted based on the monitoring data and the operation scenario.

Citation Information

Patent Citations

  • Virtual machine memory management in systems with asymmetric memory

    CN102402399A

  • Dynamically adjustable cache size based on application behavior to save power

    US20030145239A1

  • Information processing method, information processing apparatus and non-transitory computer readable medium

    US20160154589A1

  • Cloud scaling with non-blocking non-spinning cross-domain event synchronization and data communication

    US20190104178A1

  • Data prefetcher with predictor capabilities

    US6820173B1