Memory data migration method, device and storage medium

By obtaining and processing memory information in the terminal system, determining and migrating the data in the memory page table, it solves the system instability problem caused by not clearing the memory data in time, and realizes the optimization and stable operation of the system memory.

CN111143241BActive Publication Date: 2024-10-25SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN201911422233.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-30
Publication Date
2024-10-25
Estimated Expiration
2039-12-30

AI Technical Summary

Technical Problem

During the use of the terminal, the memory data cannot be cleared in time, causing the system to run unstable and even crash, affecting the service life of the computer.

Method used

By obtaining the memory information of the process to be migrated and the address information in the physical memory page table, the location of the process to be migrated is determined, and by querying the physical memory page table, the storage information of the end node is removed, and the physical memory page table is rearranged to realize memory Data migration and cleaning.

Benefits of technology

The system memory space is optimized to ensure the smooth operation of the terminal system, prevent the occurrence of crashes, and extend the service life of the computer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111143241B_ABST
    Figure CN111143241B_ABST
Patent Text Reader

Abstract

The present invention provides a memory data migration method, device and storage medium, wherein the memory data migration method first obtains the process memory information of the process to be migrated in the preset process memory space, and determines the address information corresponding to the process memory information in the preset physical memory page table; then determines the position of the process to be migrated in the physical memory page table according to the address information, and determines the end node between the process to be migrated and the previous process in the physical memory page table by querying the physical memory page table; finally removes the physical memory information stored in the end node, and rearranges the physical memory page table. The present invention performs data migration on the memory information of the terminal process in the above manner, realizes the cleaning of redundant physical memory data, optimizes the system memory space, and thus ensures the smooth operation of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a memory data migration method, device and storage medium. Background Art

[0002] When using a smart terminal, some data will be stored in the internal memory for operation, which will generate corresponding memory data. For example, in some situations where a computer is used, the user will set the computer to standby mode when not in use. When the computer is in standby mode, it will not be powered off, but will continue to run the memory data in a low-power state. In this way, if the memory data is not cleaned up for a long time, it may affect the normal operation of the computer system, and even cause a crash, reducing the service life of the computer. Summary of the invention

[0003] The main purpose of the present invention is to provide a memory data migration method, device and storage medium, aiming to solve the technical problem that the terminal fails to clean up the memory data, thereby making it difficult to ensure the normal operation of the terminal.

[0004] To achieve the above object, the present invention provides a method for migrating memory data, comprising the following steps:

[0005] Acquire process memory information of the process to be migrated in a preset process memory space, and determine address information corresponding to the process memory information in a preset physical memory page table;

[0006] Determine the position of the process to be migrated in the physical memory page table according to the address information, and determine the end node between the process to be migrated and the previous process in the physical memory page table by querying the physical memory page table;

[0007] The physical memory information stored in the end node is removed, and the physical memory page table is rearranged.

[0008] Optionally, the step of determining address information corresponding to the process memory information in a preset physical memory page table includes:

[0009] Obtaining a mapping between process memory information and physical memory information, inputting the process memory information of the process to be migrated into the mapping for query, and obtaining the physical memory information of the process to be migrated;

[0010] Acquire address information of the physical memory information of the process to be migrated in the physical memory page table.

[0011] Optionally, after the step of obtaining the physical memory information of the process to be migrated, the step further includes:

[0012] Inputting the physical memory information of the process to be migrated into a preset swap area for querying to determine whether the physical memory information of the process to be migrated does not exist in the swap area;

[0013] If yes, then execute the steps: obtaining address information of the physical memory information of the process to be migrated in the physical memory page table;

[0014] If not, the migration position corresponding to the physical memory information of the process to be migrated in the swap area is obtained, so as to migrate the physical memory information of the process to be migrated in the swap area to the address of the migration position in the physical memory page table.

[0015] Optionally, the step of determining the end node between the process to be migrated and the previous process in the physical memory page table by querying the physical memory page table includes:

[0016] Obtaining a starting physical memory address of the process to be migrated in the physical memory page table from the address information;

[0017] In the physical memory page table, query the physical memory information stored in each node upward from the starting physical memory address;

[0018] When the physical memory information is found to be a preset finishing completion mark, determining that the node storing the finishing completion mark is a finishing completion node of the previous process;

[0019] All nodes between the sorting completion node and the starting physical memory address are taken as end nodes.

[0020] Optionally, the step of obtaining the starting physical memory address of the process to be migrated in the physical memory page table from the address information includes:

[0021] Determine an address identifier of the process to be migrated in the physical memory page table according to the address information;

[0022] Determine a starting physical memory address of the process to be migrated in the physical memory page table according to the address identifier.

[0023] Optionally, the step of rearranging the physical memory page table includes:

[0024] The original physical memory address corresponding to the end node is used as the previous physical memory address, so that the physical memory information of the process to be migrated is continuously arranged on the physical memory page table with the previous physical memory address as the starting point.

[0025] Optionally, the step of using the original physical memory address corresponding to the end node as the previous physical memory address includes:

[0026] The physical memory address of the end node adjacent to the previous process is used as the previous physical memory address.

[0027] Optionally, after the step of determining the end node between the process to be migrated and the previous process in the physical memory page table, the following steps are included:

[0028] The physical memory information stored in the end node is backed up to a preset swap area.

[0029] In addition, to achieve the above-mentioned purpose, the present invention also provides a device, which includes: a memory, a processor, and a memory data migration program stored on the memory and executable on the processor, and when the memory data migration program is executed by the processor, the steps of the memory data migration method described above are implemented.

[0030] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a memory data migration program is stored, and when the memory data migration program is executed by a processor, the steps of the memory data migration method described above are implemented.

[0031] The present invention provides a memory data migration method, device and storage medium, which obtains the process memory information of the process to be migrated in the preset process memory space, and determines the address information corresponding to the process memory information in the preset physical memory page table; then determines the position of the process to be migrated in the physical memory page table according to the address information, and determines the end node between the process to be migrated and the previous process in the physical memory page table by querying the physical memory page table; finally removes the physical memory information stored in the end node, and rearranges the physical memory page table. In the above manner, the present invention performs data migration on the physical memory information of the terminal process, realizes the cleaning of redundant memory physical data, optimizes the system memory space, and thus ensures the smooth operation of the terminal system. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0033] Figure 2 A schematic diagram of a flow chart of an embodiment of a method for migrating memory data according to the present invention;

[0034] Figure 3 This is a schematic diagram of a process to be migrated before migration in an embodiment of a method for migrating memory data of the present invention;

[0035] Figure 4 This is a schematic diagram of a process to be migrated after migration in an embodiment of a memory data migration method of the present invention;

[0036] Figure 5 A schematic diagram of a flow chart of another embodiment of the memory data migration method of the present invention;

[0037] Figure 6 FIG. 4 is a flow chart of another embodiment of the memory data migration method of the present invention.

[0038] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0040] like Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0041] The terminal of the present invention is a device, which may be a computer, or a terminal device with storage function such as a mobile phone, a computer, or a mobile computer.

[0042] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0043] Optionally, the terminal may also include a camera, a Wi-Fi module, etc., which will not be described in detail here.

[0044] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0045] exist Figure 1In the terminal shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 mainly includes an input unit such as a keyboard, and the keyboard includes a wireless keyboard and a wired keyboard, which is used to connect to the client and communicate data with the client; and the processor 1001 can be used to call the memory data migration program stored in the memory 1005, and perform the following operations:

[0046] Acquire process memory information of the process to be migrated in a preset process memory space, and determine address information corresponding to the process memory information in a preset physical memory page table;

[0047] Determine the position of the process to be migrated in the physical memory page table according to the address information, and determine the end node between the process to be migrated and the previous process in the physical memory page table by querying the physical memory page table;

[0048] The physical memory information stored in the end node is removed, and the physical memory page table is rearranged.

[0049] Further, the processor 1001 may call the memory data migration program stored in the memory 1005, and further perform the following operations:

[0050] Obtaining a mapping between process memory information and physical memory information, inputting the process memory information of the process to be migrated into the mapping for query, and obtaining the physical memory information of the process to be migrated;

[0051] Acquire address information of the physical memory information of the process to be migrated in the physical memory page table.

[0052] Further, the processor 1001 may call the memory data migration program stored in the memory 1005, and further perform the following operations:

[0053] Inputting the physical memory information of the process to be migrated into a preset swap area for querying to determine whether the physical memory information of the process to be migrated does not exist in the swap area;

[0054] If yes, then execute the steps: obtaining address information of the physical memory information of the process to be migrated in the physical memory page table;

[0055] If not, the migration position corresponding to the physical memory information of the process to be migrated in the swap area is obtained, so as to migrate the physical memory information of the process to be migrated in the swap area to the address of the migration position in the physical memory page table.

[0056] Further, the processor 1001 may call the memory data migration program stored in the memory 1005, and further perform the following operations:

[0057] Obtaining a starting physical memory address of the process to be migrated in the physical memory page table from the address information;

[0058] In the physical memory page table, query the physical memory information stored in each node upward from the starting physical memory address;

[0059] When the physical memory information is found to be a preset finishing completion mark, determining that the node storing the finishing completion mark is a finishing completion node of the previous process;

[0060] All nodes between the sorting completion node and the starting physical memory address are taken as end nodes.

[0061] Further, the processor 1001 may call the memory data migration program stored in the memory 1005, and further perform the following operations:

[0062] Determine an address identifier of the process to be migrated in the physical memory page table according to the address information;

[0063] Determine a starting physical memory address of the process to be migrated in the physical memory page table according to the address identifier.

[0064] Further, the processor 1001 may call the memory data migration program stored in the memory 1005, and further perform the following operations:

[0065] The original physical memory address corresponding to the end node is used as the previous physical memory address, so that the physical memory information of the process to be migrated is continuously arranged on the physical memory page table with the previous physical memory address as the starting point.

[0066] Further, the processor 1001 may call the memory data migration program stored in the memory 1005, and further perform the following operations:

[0067] The physical memory address of the end node adjacent to the previous process is used as the previous physical memory address.

[0068] Further, the processor 1001 may call the memory data migration program stored in the memory 1005, and further perform the following operations:

[0069] The physical memory information stored in the end node is backed up to a preset swap area.

[0070] The specific embodiments of the present device are basically the same as the embodiments of the memory data migration method described below, and will not be described in detail here.

[0071] See also Figure 2 , Figure 2This is a flow chart of an embodiment of a memory data migration method of the present invention. The memory data migration method provided in this embodiment includes the following steps:

[0072] Step S10, obtaining process memory information of the process to be migrated in a preset process memory space, and determining address information corresponding to the process memory information in a preset physical memory page table;

[0073] In this embodiment, a physical memory page table and a process memory space are preset. When the system is in standby mode, the physical memory data of all processes in the system are obtained, and the process to be migrated is determined from all processes. It is easy to understand that the physical memory page table is a special data structure stored in the page table area of ​​the system space. The physical memory page table stores the correspondence between the address and the physical memory information; the process memory space stores the mapping between the process and the process memory information.

[0074] It should be understood that in this embodiment, it is necessary to migrate the physical memory data of all processes of the system, so the corresponding process is selected from all system processes in a certain order as the process to be migrated, and after the process to be migrated completes the memory data migration, the next process selected in a certain order is used as the new process to be migrated, thereby realizing the memory data migration of all processes. In addition, the selection of the process to be migrated can be specifically set by those skilled in the art according to the process situation, which will not be elaborated here.

[0075] After selecting the process to be migrated, the process memory information of the process to be migrated in the preset process memory space is obtained, and the address information corresponding to the process memory information is determined in the preset physical memory page table. For example, see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a process to be migrated before migration in an embodiment of a memory data migration method of the present invention. Figure 3 In the figure, the process memory information of the process to be migrated in the process memory space is PA, PB, PC, PD and PE, and the corresponding physical memory information of the process to be migrated in the physical memory page table is MA, MB, MC, MD and ME. The address information corresponding to the process memory information in the physical memory page table is the address of MA, the address of MB, the address of MC, the address of MD, and the address of ME.

[0076] Step S20, determining the position of the process to be migrated in the physical memory page table according to the address information, and determining the end node between the process to be migrated and the previous process in the physical memory page table by querying the physical memory page table;

[0077] It is easy to understand that the physical memory page table stores the correspondence between addresses and physical memory information. Figure 3For example, in the physical memory page table, the address information corresponding to the process to be migrated is the address of MA, the address of MB, the address of MC, the address of MD, and the address of ME. Since the process is always stored in the physical memory page table with a continuous address, refer to Figure 3 , then the address of the process to be migrated in the physical memory page table is from the address of MB to the address of MA.

[0078] In the physical memory page table, in order to achieve the division between processes, there are different numbers of end nodes between each process. The end node is the node not occupied by any process. After obtaining the position of the process to be migrated in the physical memory page table, the end node between the process to be migrated and the previous process is obtained by querying the physical memory page table. Figure 3 For example, the physical memory information of the previous process of the process to be migrated is DA, DB, and DC. Then there are two end nodes in the physical memory page table, O1 at address 04 and O2 at address 05.

[0079] Step S30, removing the physical memory information stored in the end node, and rearranging the physical memory page table.

[0080] Remove the physical memory address information stored in the end node. Figure 3 For example, remove O1 stored at address 04 and O2 stored at address 05, and after removing the physical memory information stored at the end node, rearrange the physical memory page table. For details, please refer to Figure 4 , Figure 4 This is a schematic diagram of the process to be migrated after migration in an embodiment of the memory data migration method of the present invention. It can be clearly seen that after completing the migration and sorting of the memory data, the address identification of the process to be migrated in the physical memory page table is 04 to 08.

[0081] This embodiment uses the above method to migrate the physical memory information of the terminal process, clean up redundant memory data, optimize the system memory space, and thus ensure the smooth operation of the system.

[0082] Furthermore, the step of determining the address information corresponding to the process memory information in a preset physical memory page table includes:

[0083] Step S11, obtaining a mapping between process memory information and physical memory information, inputting the process memory information of the process to be migrated into the mapping for query, and obtaining the physical memory information of the process to be migrated;

[0084] Step S12: obtaining address information of the physical memory information of the process to be migrated in the physical memory page table.

[0085] In this embodiment, it should be understood that after determining the process to be migrated, while obtaining the process memory information of the process to be migrated, the mapping between the process memory information and the physical memory information of all processes is obtained. The obtained process memory information of the process to be migrated is input into the mapping for query to obtain the physical memory information of the process to be migrated. Further, the physical memory information of the process to be migrated is input into the physical memory page table to perform a query operation, determine the address corresponding to the physical memory information in the physical memory page table, and use the set of addresses as the address information of the process to be migrated in the physical memory page table.

[0086] In this embodiment, the address information of the process to be migrated is obtained by querying in a preset physical memory page table in the above manner, and then the physical memory information stored in the above address is migrated to achieve smooth migration of memory data.

[0087] For further information, see Figure 5 , Figure 5 The flowchart of another embodiment of the memory data migration method of the present invention is shown in FIG.

[0088] Step S40, inputting the physical memory information of the process to be migrated into a preset swap area for query, so as to determine whether the physical memory information of the process to be migrated does not exist in the swap area;

[0089] Step S50: If yes, execute step S12;

[0090] Step S60: If not, obtain the migration position corresponding to the physical memory information of the process to be migrated in the swap area, so as to migrate the physical memory information of the process to be migrated in the swap area to the address of the migration position in the physical memory page table.

[0091] Based on the contents of the above embodiments, a new embodiment is proposed. In this embodiment, a swap area is preset. It is easy to understand that the swap area, namely the Swap space, releases a part of the space in the physical memory when the system's running memory is insufficient, and backs up the information stored in the physical memory to the Swap space for use by the currently running program.

[0092] After obtaining the process memory information and physical memory information of the process to be migrated, the physical memory information of the process to be migrated is input into the preset swap area for query to determine whether the same physical memory information exists in the swap area. If the same physical memory information exists in the swap area, it means that the process to be migrated may have performed a backup operation in the swap area. Then, the migration position corresponding to the same physical memory information in the swap area is obtained, and the corresponding same physical memory information in the process to be migrated is migrated to the address corresponding to the migration position in the physical memory page table, so as to realize the migration and arrangement of memory data. In addition, after the physical memory information in the swap area is taken, the physical memory information is removed from the swap area.

[0093] If the same physical memory information does not exist in the swap area, the scheme implemented in the above embodiment is executed to obtain the address information of the physical memory information of the process to be migrated in the physical memory page table; determine the end node in the physical memory page table according to the address information, and remove the physical memory information stored in the end node; rearrange the physical memory page table according to the end node to realize the migration and organization of memory data.

[0094] This embodiment inputs the physical memory information of the process to be migrated into the swap area for query. When it is determined that the same physical memory information exists in the swap area, the same physical memory information stored in the swap area is directly migrated to the physical memory page table, thereby cleaning up redundant memory data and optimizing the system memory space, thereby ensuring the smooth operation of the system.

[0095] Further, the step of determining the end node between the process to be migrated and the previous process in the preset physical memory page table includes:

[0096] Step S21, obtaining the starting physical memory address of the process to be migrated in the physical memory page table from the address information;

[0097] Step S22, in the physical memory page table, query the physical memory information stored in each node upward from the starting physical memory address;

[0098] Step S23, when the physical memory information is found to be a preset arrangement completion mark, determining that the node storing the arrangement completion mark is the arrangement completion node of the previous process;

[0099] Step S24, taking all nodes between the sorting completion node and the above-mentioned starting physical memory address as end nodes.

[0100] Furthermore, the step of obtaining the starting physical memory address of the process to be migrated in the physical memory page table from the address information includes:

[0101] Step S211, determining the address identifier of the process to be migrated in the physical memory page table according to the address information;

[0102] Step S212: determining the starting physical memory address of the process to be migrated in the physical memory page table according to the address identifier.

[0103] For further details of this embodiment, please refer to Figure 3 , Figure 3 This is a schematic diagram of a process to be migrated before migration in an embodiment of a memory data migration method of the present invention. Figure 3 It can be known that the address information corresponding to the physical memory information of the process to be migrated in the physical memory page table is the address of MA, the address of MB, the address of MC, the address of MD, and the address of ME. According to the address information, the address identifier of MA, the address identifier of MB, the address identifier of MC, the address identifier of MD, and the address identifier of ME are obtained by querying the physical memory page table. Figure 3 It can be obtained that the address identifier of MA is 12, the address identifier of MB is 06, the address identifier of MC is 11, the address identifier of MD is 07, and the address identifier of ME is 08. According to the above address identifiers, it can be obtained that the address identifier of MB is 06, which is earlier than the address identifiers of all other physical memory information. The address of MB in the physical memory page table is used as the starting physical memory address. It is easy to understand that after each process ends, the last node of the process is used as the finishing completion node, and the finishing completion node stores the finishing completion identifier. Therefore, after determining the starting physical memory address, in the physical memory page table, the starting physical memory address can be used as the starting point to query the physical memory information stored in each node upward. When the physical memory information stored in a node is found to be the preset finishing completion identifier, the query of the physical memory page table is stopped and the node is used as the previous finishing completion node, and all nodes between the finishing completion node and the starting physical memory address are used as the end nodes. As shown in Figure 3 As shown, the finishing node of the previous process of the process to be migrated is DC, and all nodes from DC to MB, namely O1 and O2, are used as end nodes.

[0104] This embodiment determines the starting physical address of the process to be migrated and the ending node in the physical memory page table through the above method, and then organizes the physical memory information of the process to be migrated to achieve smooth migration of memory data.

[0105] Further, the step of rearranging the physical memory page table according to the end node includes:

[0106] Step S31, taking the original physical memory address corresponding to the end node as the previous physical memory address, so that the physical memory information of the process to be migrated is continuously arranged on the physical memory page table with the previous physical memory address as the starting point.

[0107] Furthermore, the step of using the original physical memory address corresponding to the end node as the previous physical memory address includes:

[0108] Step S311: Using the physical memory address of the end node adjacent to the previous process as the previous physical memory address.

[0109] See also Figure 4 , Figure 4 The schematic diagram of the migration process to be migrated in the first embodiment of the memory data migration method of the present invention. As shown in the figure, the physical memory page table includes two end nodes O1 and O2, which are easy to obtain. O1 is the end node adjacent to the previous process, and the physical memory address of O1 is used as the previous physical memory address. According to the previous physical memory address, the physical memory information MA, MB, MC, MD, and ME are migrated on the physical memory page table, and MB is migrated to the physical memory address of O1, MD is migrated to the physical memory address of O2, ME is migrated to the physical memory address of MB, MC is migrated to the physical memory address of MD, and MA is migrated to the physical memory address of ME, so that the physical memory information MA, MB, MC, MD, and ME are arranged continuously on the physical memory page table, memory data migration is realized, and system memory space is optimized, thereby ensuring the smooth operation of the system. In addition, if the physical memory page table includes only one end node O2, MB is migrated to the physical memory address of O2, MD is migrated to the physical memory address of MB, ME is migrated to the physical memory address of MD, MC is migrated to the physical memory address of ME, and MA is migrated to the physical memory address of MC.

[0110] For further information, see Figure 6 , Figure 6 This is a flow chart of another embodiment of the memory data migration method of the present invention. After the above step S20 determines the end node between the process to be migrated and the previous process in the physical memory page table, it also includes:

[0111] Step S70, backing up the physical memory information stored in the end node to a preset swap area.

[0112] Before removing the physical memory information stored in the end node, back up the physical memory information stored in the end node on the swap area to avoid system freeze or crash caused by erroneous removal of the physical memory information.

[0113] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a memory data migration program is stored. When the memory data migration program is executed by a processor, the operation of the memory data migration method described above is implemented.

[0114] The specific embodiments of the computer-readable storage medium of the present invention are basically the same as the embodiments of the above-mentioned memory data migration method, and are not described in detail here.

[0115] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0116] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0118] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A memory data migration method, characterized in that: The following steps are involved: Acquire process memory information of the process to be migrated in a preset process memory space, and determine address information corresponding to the process memory information in a preset physical memory page table; Determine the position of the process to be migrated in the physical memory page table according to the address information, and determine the end node between the process to be migrated and the previous process in the physical memory page table by querying the physical memory page table; Remove the physical memory information stored in the end node and rearrange the physical memory page table, The step of determining the address information corresponding to the process memory information in a preset physical memory page table includes: Obtaining a mapping between process memory information and physical memory information, inputting the process memory information of the process to be migrated into the mapping for query, and obtaining the physical memory information of the process to be migrated; Obtaining address information of the physical memory information of the process to be migrated in the physical memory page table; Wherein, after the step of obtaining the physical memory information of the process to be migrated, the method further includes: Inputting the physical memory information of the process to be migrated into a preset swap area for querying to determine whether the physical memory information of the process to be migrated does not exist in the swap area, wherein the preset swap area is a Swap space; If yes, then execute the steps: obtaining address information of the physical memory information of the process to be migrated in the physical memory page table; If not, the migration position corresponding to the physical memory information of the process to be migrated in the swap area is obtained, so as to migrate the physical memory information of the process to be migrated in the swap area to the address of the migration position in the physical memory page table.

2. The memory data migration method according to claim 1, characterized in that: The step of determining the end node between the process to be migrated and the previous process in the physical memory page table by querying the physical memory page table includes: Obtaining a starting physical memory address of the process to be migrated in the physical memory page table from the address information; In the physical memory page table, query the physical memory information stored in each node upward from the starting physical memory address; When the physical memory information is found to be a preset finishing completion mark, determining that the node storing the finishing completion mark is a finishing completion node of the previous process; All nodes between the sorting completion node and the starting physical memory address are taken as end nodes.

3. The memory data migration method according to claim 2, characterized in that: The step of obtaining the starting physical memory address of the process to be migrated in the physical memory page table from the address information comprises: Determine an address identifier of the process to be migrated in the physical memory page table according to the address information; Determine a starting physical memory address of the process to be migrated in the physical memory page table according to the address identifier.

4. The memory data migration method according to claim 1, characterized in that: The step of rearranging the physical memory page table comprises: The original physical memory address corresponding to the end node is used as the previous physical memory address, so that the physical memory information of the process to be migrated is continuously arranged on the physical memory page table with the previous physical memory address as the starting point.

5. The memory data migration method according to claim 4, characterized in that: The step of using the original physical memory address corresponding to the end node as the previous physical memory address comprises: The physical memory address of the end node adjacent to the previous process is used as the previous physical memory address.

6. The memory data migration method according to any one of claims 1 to 5, characterized in that: After the step of determining the end node between the process to be migrated and the previous process in the physical memory page table, the method includes: The physical memory information stored in the end node is backed up to a preset swap area.

7. A memory data migration device, characterized in that: The device comprises: a memory, a processor, and a memory data migration program stored in the memory and executable on the processor, wherein the memory data migration program is configured to implement the steps of the memory data migration method according to any one of claims 1 to 6.

8. A storage medium, characterized in that: The storage medium stores a memory data migration program, and when the memory data migration program is executed by the processor, the steps of the memory data migration method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • A method for unified bus dynamic memory migration and in-transit transaction consistency verification

    CN123048431A