CN114416426A - Process copying method and device - Google Patents

Process copying method and device Download PDF

Info

Publication number
CN114416426A
CN114416426A CN202111556437.XA CN202111556437A CN114416426A CN 114416426 A CN114416426 A CN 114416426A CN 202111556437 A CN202111556437 A CN 202111556437A CN 114416426 A CN114416426 A CN 114416426A
Authority
CN
China
Prior art keywords
memory
page table
database
instruction
copying
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111556437.XA
Other languages
Chinese (zh)
Inventor
王悉宇
邓刚
王正恒
王若
朱国云
姚宏波
徐宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202111556437.XA priority Critical patent/CN114416426A/en
Publication of CN114416426A publication Critical patent/CN114416426A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification provides a process copying method and a device, wherein the process copying method comprises the following steps: under the condition of receiving a process copy instruction, sending a distribution instruction to a memory distributor; copying the parent process to create a child process; after the process copying is completed, calling the sub-process to perform snapshot processing on the memory database, and generating snapshot information of the memory database. By the method, the distribution instruction is sent to the memory distributor under the condition that the process copy instruction is received, the probability that the virtual address space is modified due to the fact that the virtual address space is insufficient can be effectively reduced, then the father process is copied, the child process is created, after the process copy is completed, the child process is called to perform snapshot processing on the memory database, snapshot information of the memory data is generated, and therefore the efficiency of memory database snapshot can be effectively improved.

Description

Process copying method and device
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a process copying method. The present specification also relates to a process copying apparatus, a computing device, a computer-readable storage medium, and a computer program.
Background
With the development of computer technology, process copy technology is widely applied, and particularly, memory database snapshot can be performed by using the process copy technology. Process copying refers to creating a new process by copying a called process, wherein the called process is called a parent process and the new process is called a child process. The parent process and the child process run in separate memory spaces, and the memory spaces of the parent process and the child process have the same content in the process of copying the processes. The memory database snapshot is to record and store data in the memory database at a certain time, so that even if the downtime data still exists, the recorded memory data only needs to be recovered after the server is restarted.
However, when the memory database snapshot is performed by using the process copy technology, the virtual address space is often modified due to reasons such as the need to allocate memory after the process copy, and the like, so that the parent process is blocked, and the memory database snapshot process is stuck. Therefore, there is a need to provide a faster method of memory database snapshot.
Disclosure of Invention
In view of this, the present specification provides a process copying method. One or more embodiments of the present specification also relate to a process copying apparatus, a computing device, a computer-readable storage medium, and a computer program, so as to solve the technical deficiencies of the prior art.
According to a first aspect of embodiments of the present specification, there is provided a process copying method, including:
under the condition of receiving a process copy instruction, sending a distribution instruction to a memory distributor, wherein the distribution instruction is used for instructing the memory distributor to call an operating system kernel to distribute a virtual address space meeting the size of a preset space;
copying the parent process to create a child process;
after the process copying is completed, calling the sub-process to perform snapshot processing on the memory database, and generating snapshot information of the memory database.
Optionally, before performing a copy operation on the parent process and creating the child process, the method further includes:
and sending a first state setting instruction to the memory allocator, wherein the first state setting instruction is used for indicating the memory allocator to set the access state of the virtual address space to be a recycling prohibition state.
Optionally, after the sub-process is called to perform snapshot processing on the memory database and generate snapshot information of the memory database, the method further includes:
and sending a second state setting instruction to the memory allocator, wherein the second state setting instruction is used for indicating the memory allocator to set the access state of the virtual address space to be a recoverable state.
Optionally, before performing a copy operation on the parent process and creating the child process, the method further includes:
and if the preset type of operation instruction exists, sending a first permission setting instruction to the database kernel, wherein the first permission setting instruction is used for indicating the database kernel to suspend executing the preset type of operation instruction.
Optionally, after the sub-process is called to perform snapshot processing on the memory database and generate snapshot information of the memory database, the method further includes:
and sending a second permission setting instruction to the database kernel, wherein the second permission setting instruction is used for indicating the database kernel to restore and execute the preset type of operation instruction.
Optionally, invoking a sub-process to perform snapshot processing on the memory database, and generating snapshot information of the memory database, including:
calling a subprocess, and reading data in a memory database;
and performing serialization operation on the read data, and writing the data into a disk to generate snapshot information of the memory database.
Optionally, performing a copy operation on the parent process and creating a child process, including:
acquiring a memory page table corresponding to a parent process, wherein the memory page table comprises a plurality of levels of page table entries;
splitting a memory page table into a first sub-memory page table and a second sub-memory page table based on multiple levels of page table entries, wherein the first sub-memory page table comprises page table entries storing page table information, and the second sub-memory page table comprises page table entries storing physical addresses;
calling a parent process, copying a first sub memory page table, and creating and awakening a child process;
and calling the subprocess to copy the second sub memory page table.
According to a second aspect of embodiments of the present specification, there is provided a process copying apparatus including:
the allocation module is configured to send an allocation instruction to the memory allocator under the condition that a process copy instruction is received, wherein the allocation instruction is used for indicating the memory allocator to call an operating system kernel to allocate a virtual address space meeting the size of a preset space;
the creating module is configured to copy the parent process and create the child process;
and the generating module is configured to call the sub-process to perform snapshot processing on the memory database after the process copying is completed, so as to generate snapshot information of the memory database.
Optionally, the apparatus further comprises:
the first state setting instruction sending module is configured to send a first state setting instruction to the memory allocator, where the first state setting instruction is used to instruct the memory allocator to set an access state of the virtual address space to a recycling prohibited state.
Optionally, the apparatus further comprises:
and the second state setting instruction sending module is configured to send a second state setting instruction to the memory allocator, wherein the second state setting instruction is used for instructing the memory allocator to set the access state of the virtual address space to be a recoverable state.
Optionally, the apparatus further comprises:
the first permission setting instruction sending module is configured to send a first permission setting instruction to the database kernel if the preset type of operation instruction exists, wherein the first permission setting instruction is used for indicating the database kernel to suspend executing the preset type of operation instruction.
Optionally, the apparatus further comprises:
and the second permission setting instruction sending module is configured to send a second permission setting instruction to the database kernel, wherein the second permission setting instruction is used for indicating the database kernel to restore and execute the preset type of operation instruction.
Optionally, the generation module is further configured to:
calling a subprocess, and reading data in a memory database;
and performing serialization operation on the read data, and writing the data into a disk to generate snapshot information of the memory database.
Optionally, the creation module is further configured to:
acquiring a memory page table corresponding to a parent process, wherein the memory page table comprises a plurality of levels of page table entries;
splitting a memory page table into a first sub-memory page table and a second sub-memory page table based on multiple levels of page table entries, wherein the first sub-memory page table comprises page table entries storing page table information, and the second sub-memory page table comprises page table entries storing physical addresses;
calling a parent process, copying a first sub memory page table, and creating and awakening a child process;
and calling the subprocess to copy the second sub memory page table.
According to a third aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions, which when executed by the processor, implement any of the steps of the process copying method.
According to a fourth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of any one of the process copying methods.
According to a fifth aspect of embodiments herein, there is provided a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the process copying method described above.
In the embodiment of the present description, a distribution instruction is sent to a memory distributor when a process copy instruction is received, where the distribution instruction is used to instruct the memory distributor to call an operating system kernel to distribute a virtual address space that meets a preset space size; then copying the parent process to create a child process; after the process copying is completed, calling the sub-process to perform snapshot processing on the memory database, and generating snapshot information of the memory database. By the method, the distribution instruction is sent to the memory distributor under the condition that the process copy instruction is received, the probability that the virtual address space is modified due to the fact that the virtual address space is insufficient can be effectively reduced, then the father process is copied, the child process is created, after the process copy is completed, the child process is called to perform snapshot processing on the memory database, snapshot information of the memory data is generated, and therefore the efficiency of memory database snapshot can be effectively improved.
Drawings
FIG. 1 is a flow chart illustrating a process copy method in the prior art;
FIG. 2 is a flow diagram illustrating another process copy method in the prior art;
FIG. 3 illustrates a flow diagram of a process copying method provided in accordance with one embodiment of the present specification;
FIG. 4 illustrates a flow diagram of another process copying method provided in accordance with one embodiment of the present specification;
FIG. 5 illustrates a flow diagram of yet another process copying method provided in accordance with one embodiment of the present specification;
FIG. 6 is a block diagram illustrating an in-memory database according to an embodiment of the present disclosure;
FIG. 7 is a block diagram illustrating an apparatus for copying a process according to an embodiment of the present disclosure;
FIG. 8 illustrates a block diagram of a computing device, according to one embodiment of the present description.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, as those skilled in the art will be able to make and use the present disclosure without departing from the spirit and scope of the present disclosure.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present specification relate are explained.
A memory database: the memory database refers to a database which directly operates by putting data in a memory. Compared with a magnetic disk, the data read-write speed of the memory is much higher than that of the magnetic disk, and the application performance can be greatly improved by storing the data in the memory compared with accessing the data from the magnetic disk.
Remote Dictionary service (Redis, Remote Dictionary Server): the system is an open source log-type and Key-Value database which is written by using ANSI C language, supports network, can be based on memory and can also be persistent, and provides API of multiple languages.
And (3) process copying: process copying refers to creating a new process by copying a called process, wherein the called process is called a parent process and the new process is called a child process. The parent process and the child process run in separate memory spaces, and after the processes are copied, the memory spaces of the parent process and the child process have the same content.
Memory database snapshot: the memory database snapshot records data in the memory database at a certain moment, and stores the data in the memory database to the hard disk in a file form, so that even the downtime data still exists. After the server is restarted, only the recorded memory data needs to be recovered.
Virtual address space (VMA), Virtual memoryara: is a region in the address space, also called linear region, representing a linear interval.
In the current method for generating the memory snapshot, a process copy technology is needed, and after a process copy function is called, the process is copied to generate a new process, wherein the called process is called a parent process, and the new process is called a child process.
Fig. 1 shows a flow chart of a process copying method in the prior art. Before copying the process, the parent process runs the database logic, wherein the parent process runs the database logic, the parent process runs corresponding instructions according to a series of logic codes in the database, and when a process copy function is called to start copying the parent process, the parent process is in a state of suspending the running of the database logic. Then, the parent process copies the data structure, the file descriptor, the memory page table and the like to the child process, and when the parent process copies the data structure, the file descriptor, the memory page table and the like to the child process, the parent process continues to operate the database logic.
In the method, when the process copy is carried out, the parent process suspends the operation of the database logic, and the time required by the process copy is the time for the parent process to suspend the operation of the database logic. If the memory occupation of the memory page table in the parent process is large, the copying of the memory page table is very time-consuming, and before the process copying is completed, the parent process is blocked and cannot process any request, so that the phenomenon of generating the memory database snapshot process is blocked.
Fig. 2 shows a flow chart of another process copying method in the prior art. Before copying the process, the father process is in a state of running the database logic, when a process copy function is called to copy the father process, the father process can suspend running the database logic and copy a part of data in the father process to the child process, and when the father process copies a part of data to the child process, the father process can continue running the database logic; after receiving a part of data copied by the parent process, the child process copies the other part of data left by the parent process, so as to obtain complete data information of the parent process, thereby generating a complete child process.
In the above method, when copying the process, although the process copying speed is fast and the time consumption is small, when copying the remaining another part of data of the parent process by the child process, modification of the virtual address space is often triggered due to allocation of a memory and the like, both the parent process copying the process and the child process copying the process to trigger modification of the virtual address space will cause the parent process to pause running the database logic, and the time required by the parent process copying the process and modifying the virtual address space is the time when the parent process pauses running the database logic. And the parent process suspends the operation of the database logic, so that the parent process is blocked and cannot process any request, and the parent process can continue to operate the database logic only after the modification of the virtual address space is completed, so that the phenomenon of stagnation of the snapshot flow of the memory database is caused.
Therefore, based on the defects of the process copying method, the process copying process is further optimized, so that faster process copying is realized, and the problem of unsmooth process of generating the memory database snapshot is solved. Specifically, under the condition that a process copy instruction is received, an allocation instruction is sent to the memory allocator, wherein the allocation instruction is used for instructing the memory allocator to call an operating system kernel to allocate a virtual address space meeting a preset space size. Then copying the parent process to create a child process; and after the subprocess is copied, calling the subprocess to carry out snapshot processing on the memory database, and generating snapshot information of the memory database.
By the method, the distribution instruction is sent to the memory distributor under the condition that the process copy instruction is received, the probability that the virtual address space is modified due to the fact that the virtual address space is insufficient can be effectively reduced, then the father process is copied, the child process is created, after the process copy is completed, the child process is called to perform snapshot processing on the memory database, snapshot information of the memory data is generated, and therefore the efficiency of memory database snapshot can be effectively improved.
In the present specification, a process copying method is provided, and the present specification relates to a process copying apparatus, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
An execution main body of the process copying method provided in the embodiments of the present specification may be a device having a process copying requirement, such as a device including a memory database, a device running a Linux system, and the like. The process copying method provided by the embodiment of the specification can be implemented by at least one of software, hardware circuit and logic circuit arranged in an execution main body.
Fig. 3 is a flowchart illustrating a process copying method according to an embodiment of the present specification, which specifically includes the following steps.
S302, under the condition that a process copy instruction is received, sending a distribution instruction to the memory distributor, wherein the distribution instruction is used for instructing the memory distributor to call an operating system kernel to distribute a virtual address space meeting the size of a preset space.
Because the modification of the virtual address space is often triggered due to the allocation of the memory and the like after the process is copied, so that the parent process is blocked, a sufficient virtual address space needs to be allocated in advance before the memory database snapshot is performed by using the process copying technology process, the parent process blockage in the process of process copying is avoided, and the memory database snapshot is accelerated.
In this embodiment, in a case that a process copy instruction is received, the memory database calls the snapshot component to send an allocation instruction to the memory allocator, where the process copy instruction may be a do _ fork () function, and the allocation instruction is used to instruct the memory allocator to call an operating system kernel to allocate a virtual address space meeting a preset space size. That is, in the case of receiving a process copy instruction, the memory database calls the snapshot component to send an allocation instruction to the memory allocator, and after the memory allocator receives the allocation instruction, the memory allocator calls the operating system kernel to allocate a Virtual address space meeting a preset space size, where a Virtual address space (VMA) is a region in a segment of address space, and is also called a linear region and represents a linear interval.
In a possible implementation manner of the embodiment of the present specification, a spatial threshold that can characterize the spatial usage of each segment of the VMA needs to be preset first. When a process copy instruction do _ fork () is received, the memory database calls the snapshot component to send a distribution instruction to the memory distributor, after the memory distributor receives the distribution instruction, the percentage of the used space of each section of VMA in the current available space is read, and if the percentage of the used space in the current available space is lower than the threshold value, the section of VMA is defined to meet the size of the preset space; or reading the percentage of the currently available space of each section of VMA in the used space, and if the percentage of the target available space in the used space is higher than the threshold, defining that the section of VMA meets the preset space size. Then the memory allocator calls the kernel of the operating system to allocate a virtual address space which meets the size of the preset space.
In the above embodiment, in the case of receiving the process copy instruction, the allocation instruction for instructing the memory allocator to call the kernel of the operating system to allocate the virtual address space meeting the size of the preset space is sent to the memory allocator, so that the probability that the virtual address space is modified due to the shortage of the virtual address space can be effectively reduced, and the efficiency of the memory database snapshot is improved.
S304, copying the parent process and creating the child process.
After a distribution instruction is sent to the memory distributor, so that the distributor calls an operating system kernel to distribute a virtual address space meeting the size of a preset space, the process copy instruction needs to be responded, the copying operation is carried out on a parent process, a child process is created, the snapshot processing is carried out on the memory data based on the child process in the following process, and the snapshot information of the memory database is generated.
In a possible implementation manner of the embodiment of this specification, before performing a copy operation on a parent process and creating a child process, the method further includes:
and sending a first state setting instruction to the memory allocator, wherein the first state setting instruction is used for indicating the memory allocator to set the access state of the virtual address space to be a recycling prohibition state.
Before copying the parent process and creating the child process, a first state setting instruction for instructing the memory allocator to set the access state of the virtual address space to the recycling-prohibited state needs to be sent to the memory allocator.
In this embodiment, the virtual address space is recycled actively by the memory allocator. That is, when the utilization rate of the virtual address space is low, the memory allocator actively sends a request for recovering a part of the virtual address space to the operating system, and the operating system recovers the part of the virtual address space.
When the virtual address is recovered, the virtual address space is also modified correspondingly, and after the virtual address space is modified, the process copy can cause parent process blockage due to the modification of the virtual address space, and can not process any request, thereby causing the phenomenon of generating the memory database snapshot process stagnation.
Therefore, in this embodiment, before performing a copy operation on the parent process and creating the child process, a first status instruction needs to be sent to the memory allocator, so that the memory allocator sets the access state of the virtual address space to the recycling disabled state. By the method, the virtual address space can be prevented from being modified due to the recovery of the virtual memory, and the blockage of a parent process before the process copying is finished is further avoided, so that the efficiency of the process copying and the memory database snapshot is improved.
In another possible implementation manner of the embodiment of this specification, before performing a copy operation on a parent process and creating a child process, the method further includes:
and if the preset type of operation instruction exists, sending a first permission setting instruction to the database kernel, wherein the first permission setting instruction is used for indicating the database kernel to suspend executing the preset type of operation instruction.
Before copying operation is carried out on a parent process and a child process is created, if an operation instruction of a preset type exists, a first permission setting instruction used for indicating a database kernel to suspend execution of the operation instruction of the preset type is sent to the database kernel.
The preset type of operation instruction refers to a preset operation instruction which needs to modify the virtual address space. If the preset operation instruction needing to modify the virtual address space exists, a first permission setting instruction is sent to the database kernel to indicate the database kernel to suspend executing the preset operation instruction.
For example, when a log output operation is performed, a virtual address space is applied for temporarily storing the log. Because the virtual address space is modified by applying for the virtual address space, the output log operation instruction is set as the operation instruction of the preset type in advance. When the output log operation instruction exists, a first permission setting instruction for suspending the execution of the output log instruction is sent to the database kernel, and the modification of the virtual address space can be avoided when the process is copied by suspending the execution of the output log instruction.
In the above embodiment, if there is an operation instruction of a preset type, a first permission setting instruction is sent to the database kernel, where the first permission setting instruction is used to instruct the database kernel to suspend executing the operation instruction of the preset type. By the method, the modification of the virtual address space can be avoided before the copying operation is carried out on the parent process and the child process is created, so that the blockage of the parent process is avoided before the copying of the process is finished, and the efficiency of the copying of the process and the snapshot of the memory database is improved.
In a possible implementation manner of the embodiment of the present specification, the step S304 may be specifically implemented by the manner of fig. 4;
fig. 4 is a flowchart illustrating another process copying method according to an embodiment of the present specification, which specifically includes the following steps:
s3042, obtaining a memory page table corresponding to the parent process, where the memory page table includes multiple levels of page table entries.
The memory page table is a data structure in a computer operating system, and records the corresponding relationship between pages and page frames, wherein the paging storage management divides the virtual address of a process into a series of parts with equal size, which are called pages or pages, and numbers each page, starting from 0, such as page 0, page 1, and the like; accordingly, the available physical memory is also divided into contiguous portions of the same size, called "blocks" or "page frames," each "block" being similarly numbered, starting with a 0# block, such as a 0# block, a 1# block, etc. The memory page table is the basis of the discontinuous partition allocation of the memory, and the translation from the virtual address to the physical address is realized based on the memory page table.
The page table of the memory includes multiple levels of page table entries, each level of page table entry records different information, generally, the page table entry of each level records the query relationship between one level of page table entry and the next level of page table entry in a directory manner, usually, the last level of page table entry records an actual physical address, and the physical address corresponding to the process can be more quickly located through the multiple levels of page table entries. Taking a four-level memory Page Table as an example, the four-level memory Page Table entries include a Page Global Directory (PGD), a Page superior Directory (PUD), a Page Middle Directory (PMD), and a Page Table Entry (PTE), and the process is copied, and the most important process is to copy the Page Global Directory, the Page superior Directory, the Page Middle Directory, and the Page Table Entry.
In a possible implementation manner of the embodiment of the present specification, taking a four-level memory page table as an example, before obtaining a memory page table corresponding to a parent process so as to copy the memory page table in the process, a copy _ hierarchy () function needs to be called to copy a data structure, a file descriptor, and the like in the parent process to a child process. After copying the data structure, file descriptor, etc. in the parent process to the child process, the global directory, page upper level directory, page intermediate directory, and page table entries corresponding to the parent process are obtained.
S3044, based on the multiple levels of page table entries, splitting the memory page table into a first sub-memory page table and a second sub-memory page table, where the first sub-memory page table includes page table entries storing page table information, and the second sub-memory page table includes page table entries storing physical addresses.
The memory page table is used as a data structure in the computer operating system and is placed in a page table area of a system space, and the memory page table stores the corresponding relation between pages and page frames, namely the corresponding relation between virtual addresses and physical addresses. Each Process has its own page table, and there is a pointer to the page table in the Process Control Block (PCB), wherein the Process Control Block is a special data structure set by the operating system for managing the Process, and the system uses it to record the external characteristics of the Process, describe the Process motion change Process, and the system can use the Process Control Block to Control and manage the Process.
The memory page table includes multiple levels of memory page table entries, where the multiple levels of memory page table entries store page table information of the memory page table and a physical address, where the physical address refers to an address in a memory address space of the CPU, and the physical address is used for unit addressing at the memory chip level and corresponds to an address bus linking the processor and the CPU.
Taking a three-level memory page table as an example, each entry of the first-level page table entry points to the second-level page table entry, each entry of the second-level page table entry points to the third-level page table entry, and each entry of the third-level page table entry points to a physical address of one page. For another example, taking a four-level memory page table as an example, each entry of the first-level page table entry points to the second-level page table entry, each entry of the second-level page table entry points to the third-level page table entry, each entry of the third-level page table entry points to the fourth-level page table entry, and each entry of the fourth-level page table entry points to a physical address of one page.
In this embodiment, taking a four-level memory page table as an example, the four-level memory page table includes a PGD, a PUD, a PMD, and a PTE, where each entry of the PGD points to the PUD, each entry of the PUD points to the PMD, each entry of the PMD points to the PTE, and each entry of the PTE points to a physical address of one page. That is, the memory page table stores the corresponding relationship between the four-level memory page tables, and the four-level memory page table includes four-level page table entries, which are PGD, PUD, PMD, and PTE, where the PGD stores page table information of the PUD, the PUD stores page table information of the PMD, the PMD stores page table information of the PTE, and the PTE stores a physical address corresponding to the process. Because the more the page table number of the memory page table is, the more the page table entry number is, correspondingly, the more the page table entry number is, the longest the time is consumed for copying the PTE storing the physical address in the memory page table in the process of copying the process.
Therefore, in this embodiment, when the four-level memory page table corresponding to the parent process to be copied is obtained, the four-level memory page table is split, and the PGD, the PUD, and the PMD that include the virtual address of the four-level memory page table are used as the first child memory page table; and using the PTE containing the physical address of the four-level memory page table as a second sub-memory page table.
S3046, calling the father process, copying the page table of the first sub memory, and creating and awakening the child process;
the child process is obtained by copying the first child memory page table, so that the rest is completely the same except that the Process Identification (PID) is different between the child process and the parent process, wherein PID refers to a numerical value used by a kernel in an operating system for uniquely identifying the process, and the numerical value can be used as a parameter for calling a plurality of functions, so that the process control behaviors such as process priority and command process can be adjusted.
In a possible implementation manner of the embodiments of the present specification, taking a four-level memory page table as an example, when a memory page table is split into a first sub-memory page table and a second sub-memory page table based on multiple levels of memory page table entries in the memory page table, a parent process is copied, which may specifically be implemented by the following manner:
the method comprises the steps of firstly decomposing a data copy function copy _ mm () function into a copy _ mm _ fastpath () function and a copy _ mm _ slowpath () function, and then replacing the original data copy function copy _ mm () function with the copy _ mm _ fastpath () function, wherein the copy _ mm _ fastpath () function is used for copying a first sub-memory page table to a sub-process. That is, call copy _ mm _ fastpath () function to copy PGD, PUD, PMD in the four-level memory page table into the sub-process and pass the relevant memory information of the PTE to the sub-process.
After the parent process transmits the relevant memory information of the PTE to the child process, the parent process calls a wake-up function to wake up the child process and is directly called and returned by an operating system kernel. For example, after the parent process transfers the relevant memory information of the PTE to the child process, the parent process calls a wake _ up _ new _ task to add the created child process to a running queue of the CPU to wake the child process, where the running queue of the CPU refers to a process task queue waiting for processing by the CPU when the process is in a running state.
S3048, calling the sub-process, and copying the page table of the second sub-memory.
When the child process acquires the PTE related memory information transmitted by the parent process, the child process calls a copy _ mm _ slowpath () function to copy the PTE according to the virtual addresses stored by the PGD, the PUD and the PMD in the first child memory page table and the PTE related memory information transmitted to the child process by the parent process, wherein the physical addresses pointed by the memory page table are stored in the PTE. After the child process calls a copy _ mm _ slowpath () function to copy the PTE, the child process obtains a complete four-level memory page table of the parent process, namely after the child process copies the PTE based on PTE related memory information transmitted by the parent process, the child process combines PGD, PUD and PMD copied by the parent process to finally form the complete four-level memory page table.
In the above embodiment, a memory page table corresponding to a parent process is obtained, where the memory page table includes multiple levels of page table entries; then, based on multiple levels of page table entries, splitting a memory page table into a first sub-memory page table and a second sub-memory page table, wherein the first sub-memory page table comprises page table entries storing page table information, and the second sub-memory page table comprises page table entries storing physical addresses; calling a parent process, copying a first sub memory page table, and creating and awakening a child process; and calling the subprocess to copy the second sub memory page table. By the method, the memory page table is divided into the first sub memory page table stored with the page table information page table entries and the second sub memory page table stored with the physical address page table entries, and the process is blocked because a parent process copies the second sub memory page table stored with the physical address page table entries, which consumes a large amount of time. Therefore, in the process of copying the process, the father process only needs to copy the first sub memory page table storing the page table entry, then transmits the second sub memory page table storing the physical address page table entry to the child process, and calls the child process to copy the second memory page table. The parent process directly calls and returns after transmitting the second memory page table to the child process, so that the time-consuming operation of copying the second child memory page table in which the physical address page table entry is stored can be delayed to the child process, the parent process blockage caused by copying the physical address in the memory page table by the parent process is avoided, and the process copying efficiency is improved.
And S306, after the process copying is finished, calling the sub-process to carry out snapshot processing on the memory data, and generating snapshot information of the memory database.
After the process is copied, calling the subprocess to perform snapshot processing on the memory database, thereby generating memory database snapshot information. The memory database snapshot is a state of a Remote Dictionary service (Remote Dictionary Server) at a certain time, and is stored on a disk in a file form, and the snapshot file is snapshot information of the generated memory database and is stored in a rdb (Remote database) file form.
After the state of Redis at a certain moment is stored on a disk in the form of an RDB file, even if the disk goes down, the data stored on the disk still exist, when the fault is recovered, the RDB file can be recovered only by reading the RDB file into a memory, and the recovery speed is very high.
In a possible implementation manner of the embodiment of the present specification, the step S306 may be specifically implemented by:
and calling the subprocess, and reading the data in the memory database.
And performing serialization operation on the read data, and writing the data into a disk to generate snapshot information of the memory database.
In this embodiment, a subprocess needs to be called by using a bgsave command, and the subprocess performs snapshot processing on the memory database, so as to generate snapshot information of the memory database in the form of an RDB file.
In practical application, after the subprocess is called by using a basal command, the subprocess starts to read data in the memory database and performs serialization operation on the read data, wherein the serialization operation refers to converting the memory database data into an RDB file which can be stored or transmitted, during the serialization period, the memory database data in the form of the RDB file is written into a disk, so as to generate snapshot information of the memory database, and then the RDB file can be directly read from the disk, thereby realizing the persistence effect.
By the method, the subprocess is called, the data in the memory database is read, then the read data is serialized and written into a disk, and the snapshot information of the memory data is generated. By the method, the data in the memory database read by the subprocess can be permanently stored in the disk, and the effect of data persistence is further realized.
In a possible implementation manner of this embodiment, after the invoking the sub-process to perform snapshot processing on the memory data and generate snapshot information of the memory database, the method further includes:
and sending a second state setting instruction to the memory allocator, wherein the second state setting instruction is used for indicating the memory allocator to set the access state of the virtual address space to be a recoverable state.
After the parent process is copied and the child process is created, the child process needs to send a notification of the completion of the process copy to the host process, which may be implemented by calling a function.
After the main process receives the notice that the copying of the sub-process is completed, the execution main body calls the main process to send a second state setting instruction for indicating the operating system kernel to set the access state of the virtual address space to be a recoverable state to the operating system kernel.
In the process of copying the process, a first state setting instruction for instructing the memory allocator to set the access state of the virtual address space to the recovery prohibited state is sent to the memory allocator, which may cause a phenomenon that the virtual address space is insufficient after the process copying is completed.
Therefore, in this embodiment, after the parent process is copied and the child process is created, a second status instruction needs to be sent to the memory allocator, so that the memory allocator sets the access state of the virtual address space to the recoverable state. By the method, the phenomenon that the virtual address space is insufficient due to process copying can be avoided, and further process blocking is avoided, so that the efficiency of process copying and memory database snapshot is improved.
In another possible implementation manner of the embodiment of this specification, after the sub-process is called to perform snapshot processing on the memory data and generate snapshot information of the memory database, the method further includes:
and sending a second permission setting instruction to the database kernel, wherein the second permission setting instruction is used for indicating the database kernel to set and restore the execution of the preset type of operation instruction.
After the parent process is copied and the child process is created, a second permission setting instruction for instructing the database kernel to set and restore the execution of the preset type operation instruction needs to be sent to the database kernel.
In the process of copying the process, a first state setting instruction for instructing the operating system kernel to set and suspend execution of the preset type of operating instruction is sent to the operating system kernel, which may cause a phenomenon that a virtual address space is insufficient after the process copying is completed.
Therefore, in this embodiment, after the copy operation is performed on the parent process and the child process is created, a second permission setting instruction needs to be sent to the operating system kernel, so that the operating system kernel resumes executing the preset type operation instruction. By the method, the phenomenon that the virtual address space is insufficient due to process copying can be avoided, and further process blocking is avoided, so that the efficiency of process copying and memory database snapshot is improved.
FIG. 5 is a flow diagram illustrating a further method for process copying, according to an embodiment of the present disclosure.
An execution subject of the process copy method provided in the embodiment of the present specification may be a memory database, and fig. 6 shows a schematic structural diagram of a memory database provided in an embodiment of the present specification. The memory database is a database which is directly operated by putting data in a memory, and compared with a magnetic disk, the data reading and writing speed of the memory is far higher than that of the magnetic disk, and the application performance can be greatly improved by storing the data in the memory compared with accessing from the magnetic disk.
The memory database is established on an operating system kernel and comprises a memory database kernel, a memory distributor, a snapshot component and the like, wherein the database kernel, the snapshot component and the memory distributor directly realize the calling among the parts through calling functions (namely function calling); the memory allocator calls the operating system kernel by calling an interface (i.e., system call) in the operating system kernel. And the memory distributor is responsible for the distribution and management of the memory, and the snapshot component is responsible for generating the database snapshot.
When the memory database receives a process copy instruction, the snapshot component is called to send a distribution instruction to the memory distributor, and after the memory distributor receives the distribution instruction, the kernel of the operating system is called to distribute a virtual address space meeting the size of a preset space.
And then, the memory database sends a first state setting instruction to the memory distributor, and after the memory distributor receives the first state setting instruction, the access state of the virtual address space is set to be a recovery forbidden state.
And at the same time of sending a first state setting instruction to the memory distributor by the memory database, if an operation instruction of a preset type exists, sending a first permission setting instruction to a database kernel. And when the database kernel receives the first authority setting instruction, the execution of the preset type of operation instruction is suspended.
After distributing a virtual address space meeting the size of a preset space, setting the access state of the virtual address space to be a recovery prohibition state and suspending the execution of a preset type of operation instruction, starting to copy the parent process and creating a child process. After copying a first sub memory page table storing the page table information of the memory page table in the parent process to the child process, the parent process returns to call and continues to run the database logic. And the child process continues to copy the second child memory page table, and when the child process finishes copying the second child memory page table, the child process has the complete memory page table data of the parent process. And calling the child process to send a process copy completion notification to the parent process, simultaneously reading the data of the memory database in the child process after the process copy, then performing serialization operation on the read data, and writing the data into a disk to generate snapshot information of the memory database.
When the parent process receives a process copy completion notification sent by the child process, the memory database calls the parent process to send a second state setting instruction to the memory distributor, and when the memory distributor receives the second state setting instruction, the access state of the virtual address space is set to be a recoverable state.
And when the memory database calls the main process to send a second state setting instruction to the kernel of the operating system, the main process is also required to be called to send a second permission setting instruction to the kernel of the database. And when the database kernel receives the second authority setting instruction, restoring to execute the preset type of operation instruction.
By the method, the distribution instruction is sent to the memory distributor under the condition that the process copy instruction is received, the probability that the virtual address space is modified due to the fact that the virtual address space is insufficient can be effectively reduced, then the father process is copied, the child process is created, after the process copy is completed, the child process is called to perform snapshot processing on the memory database, snapshot information of the memory data is generated, and therefore the efficiency of memory database snapshot can be effectively improved.
Corresponding to the above method embodiment, the present specification further provides an embodiment of a process copying apparatus, and fig. 7 shows a schematic structural diagram of a process copying apparatus provided in an embodiment of the present specification. As shown in fig. 7, the apparatus includes:
the allocating module 702 is configured to send, in a case that a process copy instruction is received, an allocation instruction to the memory allocator, where the allocation instruction is used to instruct the memory allocator to call an operating system kernel to allocate a virtual address space that meets a preset space size;
a creating module 704 configured to perform a copy operation on the parent process and create a child process;
the generating module 706 is configured to invoke the sub-process to perform snapshot processing on the memory database after the process copy is completed, so as to generate snapshot information of the memory database.
Optionally, the apparatus further comprises:
the first state setting instruction sending module is configured to send a first state setting instruction to the memory allocator, where the first state setting instruction is used to instruct the memory allocator to set an access state of the virtual address space to a recycling prohibited state.
Optionally, the apparatus further comprises:
and the second state setting instruction sending module is configured to send a second state setting instruction to the memory allocator, wherein the second state setting instruction is used for instructing the memory allocator to set the access state of the virtual address space to be a recoverable state.
Optionally, the apparatus further comprises:
the first permission setting instruction sending module is configured to send a first permission setting instruction to the database kernel if the preset type of operation instruction exists, wherein the first permission setting instruction is used for indicating the database kernel to set and suspend the execution of the preset type of operation instruction.
Optionally, the apparatus further comprises:
and the second permission setting instruction sending module is configured to send a second permission setting instruction to the database kernel, wherein the second permission setting instruction is used for indicating the database kernel to restore and execute the preset type of operation instruction.
Optionally, the generating module 706 is further configured to:
calling a subprocess, and reading data in a memory database;
and performing serialization operation on the read data, and writing the data into a disk to generate snapshot information of the memory database.
Optionally, the creating module 704 is further configured to:
acquiring a memory page table corresponding to a parent process, wherein the memory page table comprises a plurality of levels of page table entries;
splitting a memory page table into a first sub-memory page table and a second sub-memory page table based on multiple levels of page table entries, wherein the first sub-memory page table comprises page table entries storing page table information, and the second sub-memory page table comprises page table entries storing physical addresses;
calling a parent process, copying a first sub memory page table, and creating and awakening a child process;
and calling the subprocess to copy the second sub memory page table.
In a process copying apparatus provided by the present specification, a distribution instruction is sent to a memory distributor when a process copy instruction is received, where the distribution instruction is used to instruct the memory distributor to call an operating system kernel to distribute a virtual address space that satisfies a preset space size; then copying the parent process to create a child process; after the process copying is completed, calling the sub-process to perform snapshot processing on the memory database, and generating snapshot information of the memory database. By the method, the distribution instruction is sent to the memory distributor under the condition that the process copy instruction is received, the probability that the virtual address space is modified due to the fact that the virtual address space is insufficient can be effectively reduced, then the father process is copied, the child process is created, after the process copy is completed, the child process is called to perform snapshot processing on the memory database, snapshot information of the memory data is generated, and therefore the efficiency of memory database snapshot can be effectively improved.
The above is an exemplary scheme of a process copying apparatus according to this embodiment. It should be noted that the technical solution of the process copying apparatus and the technical solution of the process copying method belong to the same concept, and details that are not described in detail in the technical solution of the process copying apparatus can be referred to the description of the technical solution of the process copying method.
FIG. 8 illustrates a block diagram of a computing device 800, according to one embodiment of the present description. The components of the computing device 800 include, but are not limited to, memory 810 and a processor 820. The processor 820 is coupled to the memory 810 via a bus 830, and the database 850 is used to store data.
Computing device 800 also includes access device 840, access device 840 enabling computing device 800 to communicate via one or more networks 860. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 840 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 800, as well as other components not shown in FIG. 8, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 8 is for purposes of example only and is not limiting as to the scope of the description. Those skilled in the art may add or replace other components as desired.
Computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 800 may also be a mobile or stationary server.
Wherein the processor 820 is configured to execute computer-executable instructions that, when executed by the processor, implement the steps of the process copying method described above.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the process copying method described above belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the process copying method described above.
An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the process copying method described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the process copying method described above, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the process copying method described above.
An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the process copying method.
The above is an illustrative scheme of a computer program of the present embodiment. It should be noted that the technical solution of the computer program and the technical solution of the process copying method described above belong to the same concept, and details that are not described in detail in the technical solution of the computer program can be referred to the description of the technical solution of the process copying method described above.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts, but those skilled in the art should understand that the present embodiment is not limited by the described acts, because some steps may be performed in other sequences or simultaneously according to the present embodiment. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for an embodiment of the specification.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the embodiments. The specification is limited only by the claims and their full scope and equivalents.

Claims (11)

1. A process copying method, comprising:
under the condition of receiving a process copy instruction, sending a distribution instruction to a memory distributor, wherein the distribution instruction is used for indicating the memory distributor to call an operating system kernel to distribute a virtual address space meeting the size of a preset space;
copying the parent process to create a child process;
and after the process copying is finished, calling the sub-process to carry out snapshot processing on the memory database, and generating snapshot information of the memory database.
2. The method of claim 1, prior to said performing a copy operation on a parent process to create a child process, further comprising:
and sending a first state setting instruction to the memory distributor, wherein the first state setting instruction is used for indicating the memory distributor to set the access state of the virtual address space to be a recovery forbidden state.
3. The method according to claim 2, after the calling the sub-process to perform snapshot processing on the memory database and generate snapshot information of the memory database, further comprising:
and sending a second state setting instruction to the memory distributor, wherein the second state setting instruction is used for indicating the memory distributor to set the access state of the virtual address space to be a recoverable state.
4. The method of any of claims 1-3, further comprising, prior to the performing a copy operation on the parent process to create the child process:
if the preset type of operation instruction exists, sending a first permission setting instruction to a database kernel, wherein the first permission setting instruction is used for indicating the database kernel to suspend executing the preset type of operation instruction.
5. The method according to claim 4, after the calling the sub-process to perform snapshot processing on the memory database and generate snapshot information of the memory database, further comprising:
and sending a second permission setting instruction to the database kernel, wherein the second permission setting instruction is used for indicating the database kernel to restore and execute the operation instruction of the preset type.
6. The method according to claim 1, wherein the invoking the sub-process to perform snapshot processing on the memory database and generate snapshot information of the memory database includes:
calling the subprocess, and reading data in a memory database;
and performing serialization operation on the read data, and writing the data into a disk to generate snapshot information of the memory database.
7. The method of claim 1, wherein performing a copy operation on a parent process and creating a child process comprises:
obtaining a memory page table corresponding to the father process, wherein the memory page table comprises a plurality of levels of page table entries;
splitting the memory page table into a first sub-memory page table and a second sub-memory page table based on the multiple levels of page table entries, wherein the first sub-memory page table includes page table entries storing page table information, and the second sub-memory page table includes page table entries storing physical addresses;
calling the father process, copying the first sub memory page table, and creating and awakening a child process;
and calling the subprocess to copy the second sub memory page table.
8. An in-memory database snapshot apparatus, comprising:
the allocation module is configured to send an allocation instruction to a memory allocator under the condition that a process copy instruction is received, wherein the allocation instruction is used for instructing the memory allocator to call an operating system kernel to allocate a virtual address space meeting a preset space size;
the creating module is configured to copy the parent process and create the child process;
and the generating module is configured to call the sub-process to perform snapshot processing on the memory database after the process copying is completed, and generate snapshot information of the memory database.
9. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions, which when executed by the processor implement the steps of the process copying method of any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the process copying method of any one of claims 1 to 7.
11. A computer program which, when executed on a computer, causes the computer to perform the steps of the process copying method of any one of claims 1 to 7.
CN202111556437.XA 2021-12-17 2021-12-17 Process copying method and device Pending CN114416426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111556437.XA CN114416426A (en) 2021-12-17 2021-12-17 Process copying method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111556437.XA CN114416426A (en) 2021-12-17 2021-12-17 Process copying method and device

Publications (1)

Publication Number Publication Date
CN114416426A true CN114416426A (en) 2022-04-29

Family

ID=81267621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111556437.XA Pending CN114416426A (en) 2021-12-17 2021-12-17 Process copying method and device

Country Status (1)

Country Link
CN (1) CN114416426A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593485A (en) * 2013-12-04 2014-02-19 网易传媒科技(北京)有限公司 Method and device for achieving real-time operation on data base
CN109426585A (en) * 2017-08-22 2019-03-05 阿里巴巴集团控股有限公司 A kind of method and apparatus for backing up, restoring database data
CN112084058A (en) * 2020-09-23 2020-12-15 北京金山云网络技术有限公司 Process processing method and device and electronic equipment
CN112114999A (en) * 2020-09-01 2020-12-22 阿里云计算有限公司 Data backup method, data recovery method, data backup device, data recovery device and electronic equipment
CN112231121A (en) * 2020-10-20 2021-01-15 北京金山云网络技术有限公司 Method and device for creating process and electronic equipment
US20210240616A1 (en) * 2020-01-31 2021-08-05 Kove Ip, Llc External memory as an extension to local primary memory

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593485A (en) * 2013-12-04 2014-02-19 网易传媒科技(北京)有限公司 Method and device for achieving real-time operation on data base
CN109426585A (en) * 2017-08-22 2019-03-05 阿里巴巴集团控股有限公司 A kind of method and apparatus for backing up, restoring database data
US20210240616A1 (en) * 2020-01-31 2021-08-05 Kove Ip, Llc External memory as an extension to local primary memory
CN112114999A (en) * 2020-09-01 2020-12-22 阿里云计算有限公司 Data backup method, data recovery method, data backup device, data recovery device and electronic equipment
CN112084058A (en) * 2020-09-23 2020-12-15 北京金山云网络技术有限公司 Process processing method and device and electronic equipment
CN112231121A (en) * 2020-10-20 2021-01-15 北京金山云网络技术有限公司 Method and device for creating process and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JAVA全栈架构师: "图解Redis| 不多说了,这就是 RDB 快照", pages 1 - 4, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/385169440> *
YHTWEIRDO: "Redis持久化及性能优化", pages 1 - 6, Retrieved from the Internet <URL:https://www.cnblogs.com/yhtweirdo/p/15317591.html> *

Similar Documents

Publication Publication Date Title
US20190220418A1 (en) Memory Management Method and Apparatus
CN1717645B (en) Apparatus and method for multi-threaded processors performance control
US9058212B2 (en) Combining memory pages having identical content
CN114416425A (en) Process copying method and device
KR101976221B1 (en) Memory management model and interface for unmodified applications
CN110247984B (en) Service processing method, device and storage medium
CN102707900A (en) Virtual disk storage techniques
US9063918B2 (en) Determining a virtual interrupt source number from a physical interrupt source number
CN103608766A (en) Memory management model and interface for new applications
CN103620548A (en) Memory manager with enhanced application metadata
US10261918B2 (en) Process running method and apparatus
JPH06222999A (en) Swap-block assembling method and memory control mechanism
US11188365B2 (en) Memory overcommit by speculative fault
CN109885642B (en) Hierarchical storage method and device for full-text retrieval
WO2011048268A1 (en) Saving snapshot of a knowledge base without blocking
US20190227918A1 (en) Method for allocating memory resources, chip and non-transitory readable medium
CN109992352B (en) Data transmission method and device, electronic equipment and readable storage medium
CN111367856B (en) Data copying method, device, electronic equipment and machine-readable storage medium
US20200371827A1 (en) Method, Apparatus, Device and Medium for Processing Data
US20180314632A1 (en) Reclaiming storage resources
WO2023241528A1 (en) Data processing method and apparatus
CN116107925B (en) Data storage unit processing method
CN114416426A (en) Process copying method and device
CN116107772A (en) Multithreading data processing method and device, processor and electronic equipment
CN116302376A (en) Process creation method, process creation device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination