Method, device, electronic device and computer readable storage medium for task processing

By determining context information during task pauses and utilizing distributed memory to prefetch target data, the latency and performance bottlenecks of traditional memory solutions are resolved, resulting in more efficient task processing and a better user experience.

CN113849281BActive Publication Date: 2026-01-27HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010598811.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-28
Publication Date
2026-01-27
Estimated Expiration
2040-06-28

AI Technical Summary

Technical Problem

Traditional memory solutions cannot simultaneously meet the requirements of latency and performance, leading to bottlenecks in computing devices, especially in terms of memory bandwidth, capacity, and cost.

Method used

By determining context information based on a task pause trigger event in the first device and sending this information to the second device to prefetch target data, and the second device determining and sending the target data to the first device based on the context information, the accuracy and efficiency of data prefetching are improved by utilizing distributed computing capabilities.

Benefits of technology

It reduces task processing latency, improves task processing efficiency and user experience, and significantly improves the accuracy and efficiency of data access, especially in distributed storage environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849281B_ABST
    Figure CN113849281B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a method, device and medium for task processing. According to the scheme of the present disclosure, a first device determines context information of a task based on an event triggering suspension of the task, the context information indicating an execution state of the task on the first device. The first device sends the context information to a second device and receives target data to be used for subsequent execution of the task from the second device, the target data being determined by the second device based on the context information. In this way, the target data to be used for subsequent execution of the task can be obtained in advance during suspension of the task, thereby improving task processing efficiency and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this disclosure generally relate to the field of information processing, and more specifically, to a method, apparatus, electronic device, and computer-readable storage medium for task processing. Background Technology

[0002] Memory, such as Dynamic Random Access Memory (DRAM), is a crucial component in computing devices. Data used for tasks performed on a computing device needs to be loaded into memory so that the processor can execute those tasks. Therefore, memory has a significant impact on the performance and stability of computing devices.

[0003] However, with the development of information technology, memory has become a bottleneck in computing devices, manifesting as bandwidth, capacity, or cost bottlenecks. To address these bottlenecks, it has been recognized that alternative storage media are needed to replace or supplement memory, that memory bandwidth needs to be increased, or that infrequently accessed data needs to be swapped to other storage media. However, traditional solutions typically cannot simultaneously meet both latency and performance requirements. Summary of the Invention

[0004] Overall, the embodiments of this disclosure provide a task processing solution.

[0005] In a first aspect of this disclosure, a task processing method is provided. The method includes: a first device determining task context information based on a task pause trigger event, the context information indicating the execution state of the task on the first device; sending the context information to a second device; and receiving target data determined by the second device based on the context information, which will be used in the subsequent execution of the task. In this manner, the first device can prefetch target data from the second device for subsequent task execution, thereby effectively reducing latency and improving task processing efficiency and user experience.

[0006] In some embodiments, the triggering event includes at least one of the following: an interrupt event, a memory page fault event, a task scheduling event, and an active send event. In this way, the prefetching of target data can be triggered without affecting the execution of the task.

[0007] In some embodiments, determining the context information includes determining at least one of the following: information about the functional modules being executed in the task when the task is paused, the progress of the task at the time of pause, and task-related data stored in the registers of the first device at the time of pause. In this way, the context information can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on the context information, thereby improving the accuracy and efficiency of acquiring the target data.

[0008] In some embodiments, sending context information to a second device includes: adding the context information to a first data transmission unit to be transmitted; and sending the first data transmission unit to the second device. In this manner, the context information can be conveniently sent to the second device using the data transmission unit.

[0009] In some embodiments, adding context information to the first data transmission unit includes: storing the context information in a free space within the first data transmission unit; and setting a first type indicator in the first data transmission unit to indicate that the first data transmission unit carries context information. In this way, the free space in the data transmission unit can be used to transmit context information, thereby reducing data transmission between devices.

[0010] In some embodiments, receiving target data used for the subsequent execution of a task determined by the second device based on context information includes: receiving a second data transmission unit from the second device; and obtaining the target data from the second data transmission unit. In this manner, the target data can be conveniently obtained using the data transmission unit.

[0011] In some embodiments, the target data includes the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks that will be used in the subsequent execution of the task. In this way, various data to be used in the subsequent execution of the task and the storage locations for accessing this data can be obtained.

[0012] In a second aspect of this disclosure, a task processing method is provided. The method includes: a second device receiving context information of a task being executed by a first device, the context information indicating the execution state of the task on the first device; determining target data to be used in the subsequent execution of the task based on the context information; and sending the target data to the first device. In this manner, the second device can accurately predict the target data to be used in the subsequent execution of the task based on the acquired context information, and can proactively push this target data to the first device, thereby effectively reducing latency and improving task processing efficiency and user experience.

[0013] In some embodiments, the second device receiving context information of a task performed by the first device includes: receiving a first data transmission unit from the first device; and obtaining context information from the first data transmission unit. In this manner, context information can be conveniently obtained using the data transmission unit.

[0014] In some embodiments, the context information includes at least one of the following: information about the functional modules being executed in the task when the task is paused; the progress of the task execution when the task is paused; and task-related data stored in the registers of the first device when the task is paused. In this way, the context information can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on the context information, thereby improving the accuracy and efficiency of acquiring the target data.

[0015] In some embodiments, determining the target data includes: acquiring predetermined static information associated with the task, which does not change as the task is executed; and determining the target data required for the subsequent execution of the task based on the static information and contextual information. In this way, by combining static information with contextual information reflecting the current execution status of the task, the subsequent execution of the task can be accurately simulated, thereby accurately predicting the target data to be used in subsequent execution.

[0016] In some embodiments, obtaining static information includes obtaining task-specific code, including compiled object code or uncompiled code. In this way, task-specific static code can be obtained. Therefore, based on the task's code, the target data to be used in the subsequent execution of the task can be accurately predicted.

[0017] In some embodiments, determining target data includes determining the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks that will be used in the subsequent execution of the task. In this way, it is possible to predict the various types of data to be used in the subsequent execution of the task and the storage locations for accessing that data.

[0018] In some embodiments, sending target data includes: adding the target data to a second data transmission unit to be sent; and sending the second data transmission unit to a first device. In this manner, the target data can be conveniently sent to the first device using the data transmission unit.

[0019] In some embodiments, adding target data to the second data transmission unit includes: storing the target data in a free space within the second data transmission unit; and setting a second type indicator in the second data transmission unit to indicate that the second data transmission unit carries the target data. In this way, the free space in the data transmission unit can be used to transmit context information, thereby reducing data transmission between devices.

[0020] In a third aspect of this disclosure, a task processing apparatus is provided. The task processing apparatus includes: a context information determining unit configured to allow a first device to determine context information of a task based on a task pause trigger event, the context information indicating the execution state of the task on the first device; a context information sending unit configured to send the context information to a second device; and a target data receiving unit configured to receive target data determined by the second device based on the context information, which will be used in the subsequent execution of the task. In this manner, the first device can prefetch target data from the second device for subsequent task execution, thereby effectively reducing latency and improving task processing efficiency and user experience.

[0021] In some embodiments, the triggering event includes at least one of the following: an interrupt event, a memory page fault event, a task scheduling event, and an active send event. In this way, the prefetching of target data can be triggered without affecting the execution of the task.

[0022] In some embodiments, the context information determination unit includes at least one of the following: a functional module determination unit configured to determine information about the functional modules being executed in the task when the task is paused; a progress determination unit configured to determine the progress of the task execution when the task is paused; and a register determination unit configured to determine the task-related data stored in the registers of the first device when the task is paused. In this way, the context information can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on the context information, thereby improving the accuracy and efficiency of acquiring the target data.

[0023] In some embodiments, the context information sending unit includes: a context information adding unit configured to add context information to a first data transmission unit to be sent; and a first data transmission unit sending unit configured to send the first data transmission unit to a second device. In this manner, context information can be conveniently sent to a second device using the data transmission unit.

[0024] In some embodiments, the context information adding unit includes: a context information storage unit configured to store context information in a free space in the first data transmission unit; and a first type indicator setting unit configured to set a first type indicator in the first data transmission unit, the first type indicator indicating that the first data transmission unit carries context information. In this way, the free space in the data transmission unit can be used to transmit context information, thereby reducing data transmission between devices.

[0025] In some embodiments, the target data receiving unit includes: a second data transmission unit receiving unit configured to receive a second data transmission unit from a second device; and a target data acquisition unit configured to acquire target data from the second data transmission unit. In this manner, target data can be conveniently acquired using the data transmission unit.

[0026] In some embodiments, the target data includes the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks that will be used in the subsequent execution of the task. In this way, various data to be used in the subsequent execution of the task and the storage locations for accessing this data can be obtained.

[0027] In a fourth aspect of this disclosure, a task processing apparatus is provided. The task processing apparatus includes: a context information receiving unit configured to receive context information of a task executed by a first device, the context information indicating the execution state of the task on the first device; a target data determining unit configured to determine target data to be used in the subsequent execution of the task based on the context information; and a target data sending unit configured to send the target data to the first device. In this manner, the second device can accurately predict the target data to be used in the subsequent execution of the task based on the acquired context information, and can proactively push this target data to the first device, thereby effectively reducing latency and improving task processing efficiency and user experience.

[0028] In some embodiments, the context information receiving unit includes: a first data transmission unit receiving unit configured to receive a first data transmission unit from a first device; and a context information obtaining unit configured to obtain context information from the first data transmission unit. In this manner, context information can be conveniently obtained using the data transmission unit.

[0029] In some embodiments, the context information includes at least one of the following: information about the functional modules being executed in the task when the task is paused; the progress of the task execution when the task is paused; and task-related data stored in the registers of the first device when the task is paused. In this way, the context information can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on the context information, thereby improving the accuracy and efficiency of acquiring the target data.

[0030] In some embodiments, the target data determination unit includes: a static information acquisition unit configured to acquire predetermined static information associated with the task, the static information not changing with the execution of the task; and a required target data determination unit configured to determine the target data required for the subsequent execution of the task based on the static information and context information. In this way, the subsequent execution of the task can be accurately simulated by combining static information and context information reflecting the current execution status of the task, thereby accurately predicting the target data to be used in subsequent execution.

[0031] In some embodiments, the static information acquisition unit includes a code acquisition unit configured to acquire task-specific code, including compiled object code or uncompiled code. In this way, task-specific static code can be acquired. Therefore, the target data to be used in the subsequent execution of the task can be accurately predicted based on the task's code.

[0032] In some embodiments, the target data determination unit includes a specific target data determination unit configured to determine the value and storage location of at least one of a variable, object, array, heap, and stack to be used in the subsequent execution of the task. In this way, it is possible to predict the various data to be used in the subsequent execution of the task and the storage locations for accessing that data.

[0033] In some embodiments, the target data sending unit includes: a target data adding unit configured to add target data to a second data transmission unit to be sent; and a second data transmission unit sending unit configured to send the second data transmission unit to a first device. In this manner, target data can be conveniently sent to the first device using the data transmission unit.

[0034] In some embodiments, the second data transmission unit sending unit includes: a target data storage unit configured to store target data in a free space within the second data transmission unit; and a second type indicator setting unit configured to set a second type indicator in the second data transmission unit, the second type indicator indicating that the second data transmission unit carries target data. In this way, free space in the data transmission unit can be used to transmit context information, thereby reducing data transmission between devices.

[0035] In a fifth aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processing unit and at least one memory. The at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to implement the method of the first aspect.

[0036] In a sixth aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processing unit and at least one memory. The at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to implement the method of the second aspect.

[0037] In a seventh aspect of this disclosure, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method of the first aspect.

[0038] In an eighth aspect of this disclosure, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method of the second aspect.

[0039] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0040] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0041] Figure 1 A schematic diagram is shown illustrating an example environment in which embodiments of the present disclosure can be implemented;

[0042] Figure 2 A schematic diagram of a task processing procedure according to some embodiments of the present disclosure is shown;

[0043] Figure 3 A schematic diagram illustrating a task processing procedure in a distributed storage server system according to some embodiments of the present disclosure is shown;

[0044] Figure 4 A schematic diagram of a task processing procedure in a memory pool system according to some embodiments of the present disclosure is shown;

[0045] Figure 5 A flowchart illustrating a task processing procedure performed at a first device according to some embodiments of the present disclosure is shown;

[0046] Figure 6 A flowchart illustrating a task processing procedure performed at a second device according to some embodiments of the present disclosure is shown;

[0047] Figure 7A schematic block diagram of an apparatus for task processing according to some embodiments of the present disclosure is shown;

[0048] Figure 8 A schematic block diagram of another apparatus for task processing according to some embodiments of the present disclosure is shown; and

[0049] Figure 9 A block diagram of an example device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation

[0050] The principles of this disclosure will now be described with reference to some exemplary embodiments. It should be understood that these embodiments are described for illustrative purposes only and to assist those skilled in the art in understanding and implementing this disclosure, and do not imply any limitation on the scope of this disclosure. The disclosure described herein can be implemented in various ways besides the methods described below.

[0051] In the following description and claims, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains.

[0052] As used herein, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well. The term “comprising” and its variations should be interpreted as open-ended terms meaning “including, but not limited to.” The term “based on” should be interpreted as “at least partially based on.” The terms “one embodiment” and “embodiment” should be interpreted as “at least one embodiment.” The term “another embodiment” should be understood as “at least one other embodiment.” The terms “first,” “second,” etc., may refer to different or the same objects. Other definitions (explicit and implicit) may be included below.

[0053] As mentioned above, with the development of information technology, memory such as DRAM (also known as "RAM") can become a bottleneck in computing devices. Currently, various methods exist to address the problems of high memory cost and insufficient memory bandwidth. For example, in many information technology products, infrequently accessed data can be stored on other storage media (such as lower-cost solid-state drives (SSDs), hard disk drives (HDDs), or newer storage media (such as phase-change memory (PCM), resistive random access memory (ReRAM), non-volatile magnetic random access memory (MRAM), carbon nanotube memory (NRAM), memory-centric memory controllers, etc.)) to reduce the required memory space. Another example is in server node clusters, where memory space can be expanded by sharing the memory of other remote server nodes. Both of these methods alleviate the memory-induced bottleneck problem to some extent.

[0054] However, both of these methods lead to increased latency and decreased performance. For example, with local memory, the processor (such as the central processing unit (CPU)) can access data synchronously with very low latency (e.g., 60 nanoseconds), resulting in good performance. With remote memory, there may be long wait times when the processor accesses data synchronously via a network channel, or significant latency (e.g., 10 microseconds to milliseconds) when accessing data asynchronously via a network channel, impacting performance. With other storage media, the processor needs to access data asynchronously, resulting in very high latency (e.g., 10-50 microseconds), causing task execution to stall. These different memory latencies will lead to differences in user experience.

[0055] To further improve performance and reduce latency while reducing costs, the above methods can be optimized. For example, network channels and storage media themselves can be optimized to reduce latency. For instance, to optimize network channels, the network channel speed can be increased, the protocols used on the network channel can be simplified, or a low-latency design using a message state machine can be employed. For example, network latency using InfiniBand technology is lower than that using RoCE (RDMA over Converged Ethernet) technology. Furthermore, to optimize storage media, high-speed storage media can be used instead of low-speed media, such as using SSDs instead of HDDs. However, the latency of optimized storage media is still significantly higher than that of memory such as DRAM.

[0056] Furthermore, various techniques can be employed to improve performance and reduce latency. For example, caching techniques (e.g., multi-level caches in the CPU) or buffering techniques (e.g., page buffers in the operating system) can be used to store frequently accessed data in caches or buffers (based on, for example, a Least Recently Used (LRU) algorithm). Additionally, prefetching techniques can be used to efficiently prefetch data from remote storage media (such as other storage media and memory in another server node) via network channels, thereby reducing the time the CPU waits for data from remote storage media and reducing latency.

[0057] Traditional prefetching techniques include, for example, CPU branch prediction techniques for prefetching data and / or instructions, and prediction techniques based on memory page access history statistics. In CPU branch prediction, the instruction that might be executed in the future can be predicted using the current program counter (PC) pointer, and that instruction is prefetched into the cache to improve execution speed and reduce latency. However, in this technique, the granularity of data prefetching is the size of a cache line, which cannot solve the problem of slow memory media prefetching at the page level.

[0058] In memory page access history prediction techniques, historical correlation statistics are performed on memory pages, and the pages are grouped based on this correlation. Memory pages are then exchanged between groups based on their correlation. Pages within the same group can be prefetched simultaneously to increase the prefetch hit rate. However, this technique does not consider the context information of CPU operation, such as process execution, which affects the accuracy and efficiency of prefetching.

[0059] Compared to the conventional techniques described above, embodiments of this disclosure provide a solution for task processing. Generally, according to the various embodiments described herein, a first device determines the context information of a task based on an event that triggers a task pause. The context information indicates the execution state of the task on the first device. The first device sends the context information to a second device. Based on the received context information, the second device determines the target data to be used for the subsequent execution of the task and sends the target data to the first device. The first device receives the target data from the second device for the subsequent execution of the task. In this way, the second device can predict the target data outside of the first device executing the task itself, thereby accelerating the prefetching of the target data. Furthermore, the second device can predict the target data more accurately, taking into account the current execution context of the task, and without relying on historical statistics such as the number of times the target data is accessed, thus enabling prediction even for occasionally accessed target data. Therefore, by accurately predicting the target data, the time the first device spends waiting for the target data to be used and the transmission of invalid data can be reduced, thereby improving task processing efficiency and user experience.

[0060] Various exemplary embodiments of this disclosure will now be described in conjunction with the accompanying drawings.

[0061] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. As shown, example environment 100 includes a first device 110. The first device 110 can be any suitable device with storage and computing capabilities, such as a mobile phone, set-top box, projector, entertainment unit, navigation device, communication device, personal digital assistant (PDA), tablet computer, personal computer, portable computer, desktop computer, server, storage system, or memory pool, etc.

[0062] The storage capacity of the first device 110 can be provided by its memory 112. Data required for tasks performed in the first device 110 can be stored in the memory 112. The memory 112 can be any suitable device with storage capacity, including but not limited to SDRAM, DDR SDRAM and RDRAM memory, cache, buffer, and any other electrical storage device, magnetic storage device, optical storage device, electromagnetic storage device, semiconductor storage device, distributed storage device, cloud storage device, or any suitable combination thereof.

[0063] Environment 100 also includes second devices, such as server 120-1, storage pool 120-2, and storage system 120-3 (collectively referred to below as "second device 120"). Server 120-1 may be a storage server node in a storage server cluster or any suitable server. Storage pool 120-2 may be a storage-centric storage pool managed by a central media controller. Storage system 120-3 may be a storage system consisting of remote storage media and media controllers. Although the second device 120 is shown as a server, storage pool, and storage system, it should be understood that this is merely exemplary and not intended to limit the scope of this disclosure. The second device 120 may be any suitable device with storage and computing capabilities, such as a server, storage system, or storage pool. Furthermore, it should be understood that the number of second devices 120 is merely exemplary, and the number of second devices 120 may be any suitable.

[0064] The storage capacity of the second device 120 can be provided by its existing memory. The memory of the second device 120 can form a storage plane or storage space with the memory 112 of the first device 110. The first device 110 and the second device 120 can share this storage plane or storage space, so that the data required by the first device 110 to perform its tasks can also be stored in the memory of the second device 120. The memory of the second device 120 can be any suitable device with storage capacity, including but not limited to SDRAM, DDR SDRAM and RDRAM memory, cache, buffer, and any other electrical storage device, magnetic storage device, optical storage device, electromagnetic storage device, semiconductor storage device, distributed storage device, cloud storage device, or any suitable combination thereof.

[0065] When the first device 110 executes a task (e.g., when executing a program, thread, or process), prefetching the data required by the task into the memory 112 of the first device 110 can reduce the waiting time spent by the first device 110 during task execution, thereby improving performance and reducing latency. To this end, the first device 110 can determine the context information of the task. The context information indicates the execution state of the task on the first device 110. The first device 110 can send this context information to the second device 120. Based on the received context information, the second device 120 can determine the target data to be used for the subsequent execution of the task and actively push the target data to the first device 110. This achieves data prefetching by the first device. It should be understood that the actions performed by the first device 110 and the second device 120 are interchangeable. That is, the actions performed by the first device 110 can be performed by the second device 120, and vice versa.

[0066] In this way, the second device 120 can more accurately predict target data while taking into account the current execution context of the task. Furthermore, by utilizing the computing power of the second device 120 to predict target data, the prefetching of target data can be accelerated. Especially in the presence of multiple devices, distributed prediction performed by multiple devices can leverage the computing power of each device, pushing predicted target data to each other, thereby significantly improving efficiency and reducing latency.

[0067] The following will combine Figure 2 The operations performed on the first device 110 and the second device 120 are described in detail. Figure 2 A schematic diagram of a task processing procedure 200 according to some embodiments of the present disclosure is shown. It should be understood that the procedure 200 may also include additional steps not shown and / or the steps shown may be omitted, and the scope of the present disclosure is not limited in this respect.

[0068] In task processing 200, the task executed by the first device 110 is, for example, a program, thread, or process running on the first device 110. For instance, the task may be executed by the first device 110. Figure 1 The program, thread, or process initiated by code 230 shown. To improve efficiency and reduce latency, the first device 110 can prefetch target data to be used in the subsequent execution of the task. For example, as shown in line 234 of code 230, the value of array "g_a[i]" needs to be prefetched because array "a[i]" needs to be assigned a value.

[0069] To prefetch target data to be used for the subsequent execution of a task, the first device 110 can determine the task's context information 240. In some embodiments, the first device 110 can determine the task's context information 240 based on an event that triggers a task pause. For example, such a triggering event may include an interrupt event, a memory page fault event, a task scheduling event, and / or other events that cause the task to pause. For instance, the first device 110 may pause task execution due to entering the function module "func_foo()" (as shown in line 232 of code 230). Additionally, triggering events may include proactively sent events. For example, the task's code may contain a statement that proactively sends context information 240 to prefetch target data, so that the first device 110 can determine the task's context information 240 when that statement is executed. In this way, the prefetching of target data can be triggered without affecting the execution of the task. Furthermore, since the task is paused, the task's context information 240 remains unchanged during the pause, thus ensuring the correctness of the context information 240.

[0070] Alternatively, the first device 110 can also determine the task context information 240 while the task is being executed. For example, the first device 110 can determine the task context information 240 by initiating an additional thread or process. In this way, the efficiency of determining the context information 240 can be improved without waiting for the task to pause execution.

[0071] In some embodiments, the first device 110 may predetermine whether the target data is already stored in its local memory 112. If the target data is already stored in the memory 112, the first device 110 can directly retrieve the target data from the memory 112 without determining the context information 240 and prefetching the target data from the second device. In this way, the transmission of the context information 240 can be reduced, and the resources consumed by the second device 120 in predicting the target data can be reduced.

[0072] Alternatively, in some embodiments, the first device does not need to determine in advance whether the target data is already stored in its local memory 112, but directly determines the context information 240 and provides the context information 240 to the second device 120 for predicting the target data. In this way, the computing power of the second device 120 can be fully utilized, thereby improving efficiency and reducing latency.

[0073] Context information 240 indicates the execution status of a task on the first device 110. Context information 240 may include various suitable information reflecting the current execution status of the task. For example, context information 240 may include information about the functional modules being executed in the task when the task is paused, such as the function name of the executing function module, "func_foo()". Furthermore, context information 240 may also include the progress of the task execution when the task is paused. For example, the address of the currently executed instruction in memory 112 stored in the PC register. In addition to the PC register, context information 240 may also include task-related data stored in other registers of the first device 110 when the task is paused, such as the offset within the stack segment currently being executed stored in the stack pointer (SP) register. In this way, context information 240 can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on context information 240, thereby improving the accuracy and efficiency of acquiring the target data.

[0074] After determining the context information 240, the first device 110 can send the context information 240 to the second device 120. In some embodiments, the first device 110 can add the context information 240 to a data transmission unit to be sent and send the data transmission unit to the second device 120. For example, the data transmission unit may be a message or packet transmitted on the network between the first device 110 and the second device 120. In this way, the context information 240 can be conveniently sent to the second device 120 using the data transmission unit.

[0075] In some embodiments, the data transmission unit is originally needed to be transmitted between the first device 110 and the second device 120. For example, the data transmission unit may be a heartbeat message sent between the first device 110 and the second device 120. However, there is idle space in this data transmission unit that does not contain valid data. In this case, the first device 110 can store context information 240 in the idle space of the data transmission unit. Specifically, the first device 110 can determine the idle space in the data transmission unit that does not contain valid data and store the context information in that idle space. In this way, the idle space in the data transmission unit can be used to transmit the context information 240, thereby reducing data transmission between devices and reducing network usage. Alternatively, the context information 240 can also be transmitted through a dedicated data transmission unit without relying on the idle space of the data transmission unit that transmits other messages. In this way, the context information 240 can be transmitted more efficiently, thereby further reducing latency.

[0076] In some embodiments, the first device 110 may also provide a type indicator in the data transmission unit. This type indicator indicates that the data transmission unit carries context information. In this way, the data transmission unit carrying context information 240 can be easily identified. Furthermore, in some embodiments, the first device 110 may also provide a location indicator in the data transmission unit. This location indicator indicates the position of the context information within the data transmission unit. In this way, the position of the context information 240 within the data transmission unit can be directly determined, thereby enabling the context information 240 to be quickly obtained.

[0077] The second device 120 can receive a data transmission unit from the first device 110 and obtain context information 240 from the data transmission unit. In some embodiments, when the data transmission unit is provided with a type indicator, if the second device 120 recognizes the type indicator included in the data transmission unit, the second device 120 can determine that the data transmission unit carries context information 240. Additionally, in some embodiments, when the data transmission unit is provided with a location indicator, the second device 120 can directly determine the location of the context information 240 in the data transmission unit based on the location indicator and extract the context information 240 from that location. In this way, when the second device 120 receives a data transmission unit, it can easily identify the data transmission unit carrying context information 240 and directly determine the location of the context information 240 in the data transmission unit, thereby quickly obtaining the context information 240.

[0078] After acquiring the context information 240, the second device 120 can determine the target data 260 to be used for the subsequent execution of the task based on the context information 240. In this way, the second device 120 can more accurately predict the target data 260 while taking into account the current execution context of the task, thereby improving task processing efficiency and user experience.

[0079] Additionally, in some embodiments, in addition to context information 240, the second device 120 may also acquire static information 250 associated with the task. Static information 250 is predetermined information that does not change with the execution of the task. Static information 250 may, for example, include the task's code, which may include compiled object code, uncompiled code, or other similar code. As an example, static information 250 may be a copy of code 230 in the first device in the second device. Because static information 250 is a copy of code 230, after acquiring context information 240 reflecting the current execution status of the task (code 230), the second device 120 can accurately simulate the subsequent execution of the task and predict the target data 260 to be used in subsequent execution.

[0080] For example, target data 260 may include the values ​​and storage locations of variables, objects, arrays, heaps, and stacks that will be used in the subsequent execution of the task. For example, target data 260 may be an array "g_a[i]" and its address in the storage plane or storage space. It should be understood that since the processor of the first device 110 retrieves target data 260 from memory 112 through the storage location of target data 260, providing the storage location of target data 260 is for the processor to access or locate target data 260. In this way, various data to be used in the subsequent execution of the task and the storage locations for accessing this data can be predicted.

[0081] After determining the target data 260, the second device 120 can send the target data 260 to the first device 110. Similar to the transmission of context information 240, in some embodiments, the second device 120 can add the target data 260 to a data transmission unit to be sent and send the data transmission unit to the first device 110. For example, the data transmission unit can be a message or packet transmitted on the network between the first device 110 and the second device 120. In this way, the target data 260 can be conveniently sent to the first device 110 using the data transmission unit.

[0082] In some embodiments, the data transmission unit is originally needed for transmission between the first device 110 and the second device 120. For example, the data transmission unit may be a heartbeat message sent between the first device 110 and the second device 120. There is free space in this data transmission unit that does not contain valid data. In this case, the second device 120 can store the target data 260 in the free space in the data transmission unit. Specifically, the second device 120 can determine the free space in the data transmission unit that does not contain valid data and store the target data 260 in that free space. In this way, the free space in the data transmission unit can be used to transmit the target data 260, thereby reducing data transmission between devices and reducing network usage. Alternatively, the target data 260 can also be transmitted through a dedicated data transmission unit without relying on the free space of the data transmission unit used for transmitting other messages. In this way, the target data 260 can be transmitted more efficiently, thereby further reducing latency.

[0083] In some embodiments, the second device 120 may also include a type indicator in the data transmission unit. This type indicator indicates that the data transmission unit carries target data 260. This allows for convenient identification of the data transmission unit carrying target data 260. Furthermore, in some embodiments, the second device 120 may also include a location indicator in the data transmission unit. This location indicator indicates the position of the target data 260 within the data transmission unit. This allows for direct determination of the position of the target data 260 within the data transmission unit, enabling rapid acquisition of the target data 260.

[0084] The first device 110 can receive a data transmission unit from the second device 120 and obtain target data 260 from the data transmission unit. In some embodiments, when the data transmission unit is provided with a type indicator, if the first device 110 recognizes the type indicator included in the data transmission unit, the first device 110 can determine that the data transmission unit carries target data 260. Additionally, in some embodiments, when the data transmission unit is provided with a location indicator, the first device 110 can directly determine the location of the target data 260 in the data transmission unit based on the location indicator and extract the target data 260 from that location. In this way, when the first device 110 receives a data transmission unit, it can easily identify the data transmission unit carrying target data 260 and directly determine the location of the target data 260 in the data transmission unit, thereby quickly obtaining the target data 260.

[0085] For example, since the second device 120 proactively pushes the target data 260 to the first device 110 in advance, the first device 110 can obtain the target data "g_a[i]" to be assigned before executing line 234 in code 230. Therefore, when the processor of the first device 110 executes line 234, it can directly access the target data 260 from the local memory 112 of the first device 110, thereby significantly reducing the time the processor of the first device 110 waits for the required data and improving the execution efficiency of the task.

[0086] The following will combine Figure 3 and Figure 4 The illustrations depict example systems according to some embodiments of the present disclosure. It should be understood that these systems are merely exemplary, and the scope of the present disclosure is not limited in this respect. Figure 3 A schematic diagram of a task processing procedure in a distributed storage server system 300 according to some embodiments of the present disclosure is shown.

[0087] The distributed storage server system 300 includes four storage servers 310-1 to 310-4 (collectively referred to as "storage server 310" below). It should be understood that... Figure 3 The number of storage servers 310 shown is merely exemplary, and the number of storage servers 310 can be any suitable number.

[0088] Any one of these storage servers 310 can be used as a first device 110, while the other storage servers can be used as a second device 120. For example, storage server 310-1 can be the first device 110, in which case storage servers 310-2, 310-3, or 310-4 can all be the second devices 120.

[0089] Each storage server 310-1 to 310-4 has a corresponding memory, which forms a storage plane or storage space. The memory of each storage server 310-1 to 310-4 stores its corresponding metadata 320-1 to 320-4 (hereinafter collectively referred to as "metadata 320") and cache data 330-1 to 330-4 (hereinafter collectively referred to as "cache data 330"). Since the memory of storage server 310 forms a storage plane, the metadata 320 and cache data 330 can also be considered to be distributed and stored within this storage plane.

[0090] In some embodiments, a storage server 310 may need to use metadata 320 or cached data 330 on other storage servers 310 to fulfill a request. For example, storage server 310-1 may need to use metadata 320-4 or cached data 330-4 on storage server 310-4. In this case, storage server 310-1 can be considered as a first device 110, and storage server 310-4 can be considered as a second device 120. Storage server 310-1 can determine the context information of the task to be performed to fulfill the request and send the context information to storage server 310-4. For example, storage server 310-1 can store the context information in the free space of a data transfer unit and send the data transfer unit to storage server 310-4.

[0091] It should be understood that, in some embodiments, this context information can be sent to all other storage servers, such as storage servers 310-2 to 310-4. That is, these storage servers can all be considered as the second device 120. In this way, storage server 310-1 does not need to determine the destination of the context information or the storage server where the target data is stored, but instead makes full use of the computing power of other storage servers 310-2 to 310-4 to determine whether the target data is stored thereon.

[0092] After receiving the context information, storage server 310-4 can determine the metadata 320-4 or cached data 330-4 as the target data based on the context information. For example, as described above, storage server 310-4 can simulate the subsequent execution of the task based on the context information and static information to determine the metadata 320-4 or cached data 330-4 to be used in the subsequent execution of the task. Then, storage server 310-4 can send the metadata 320-4 or cached data 330-4 to storage server 310-1. For example, storage server 310-4 can store the metadata 320-4 or cached data 330-4 in the free space of the data transmission unit and send the data transmission unit to storage server 310-1.

[0093] In this way, storage server 310-4 can more accurately predict target data while considering the current execution context of the task, and proactively push the target data to storage server 310-1, thereby significantly improving efficiency and reducing latency. Furthermore, since storage servers 310 utilize the free space in the data transmission unit to transmit task context information and target data, data transmission between devices is reduced, and network usage is minimized.

[0094] Figure 4 A schematic diagram illustrating a task processing procedure in a memory pool system 400 according to some embodiments of the present disclosure is shown. The memory pool system 400 includes a plurality of servers 410-1 to 410-4 (collectively referred to below as "servers 410"). It should be understood that the number of servers 410 is merely exemplary, and the number of servers 410 can be any suitable number. Servers 410 are connected to a memory pool 420. Memory pool 420 may be a memory-centric memory pool managed by a central media controller. Memory pool 420 may store data required to perform tasks on servers 410. Any of servers 410-1 to 410-4 may serve as a first device 110, and memory pool 420 may serve as a second device 120.

[0095] In some embodiments, server 410 may need to use data stored in memory pool 420 to complete a request. For example, server 410-1 may need to use data stored in memory pool 420. In this case, server 410-1 can determine the context information of the task to be performed to complete the request and send that context information to memory pool 420.

[0096] After receiving context information, memory pool 420 can determine the target data to be used for the subsequent execution of the task based on the context information. For example, as described above, the controller of memory pool 420 can simulate the subsequent execution of the task based on context information and static information to determine the target data. Then, memory pool 420 can send the target data to server 410-1. It should be understood that the transmission of both context information and target data can utilize the free space in the data transmission unit, thereby reducing data transmission between devices and reducing network occupancy.

[0097] In this way, the memory pool 420 can more accurately predict the target data, taking into account the current execution context of the task, and actively push the target data to the server 410-1, thereby significantly improving efficiency and reducing latency.

[0098] The following will combine Figure 5 and Figure 6 The operation of the first device 110 and the second device 120 is described in detail. Figure 5 A flowchart illustrating a task processing procedure 500 performed at a first device 110 according to some embodiments of the present disclosure is shown. For example, method 500 may be performed by, for example... Figure 1 The first device 110 shown is used to perform this. It should be understood that method 500 may also include additional steps not shown and / or the steps shown may be omitted, and the scope of this disclosure is not limited in this respect.

[0099] At 510, the first device determines the task's context information based on the task pause trigger event. The context information indicates the task's execution status on the first device. At 520, the first device sends the context information to the second device. At 530, the first device receives target data determined by the second device based on the context information, which will be used in the subsequent execution of the task. In this way, the first device can prefetch target data from the second device for subsequent task execution, thereby effectively reducing latency and improving task processing efficiency and user experience.

[0100] In some embodiments, the triggering event may include, for example, an interrupt event, a memory page fault event, a task scheduling event, an active send event, and / or other events. In this way, the prefetching of target data can be triggered without affecting the execution of the task.

[0101] In some embodiments, context information may include, for example, information about the functional modules being executed in the task when the task is paused, the progress of the task at the time of pause, task-related data and / or other information stored in the registers of the first device at the time of pause. In this way, the context information can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on the context information, thereby improving the accuracy and efficiency of acquiring the target data.

[0102] In some embodiments, in order to send context information to the second device, the first device adds the context information to a first data transmission unit to be sent, and then sends the first data transmission unit to the second device. In this way, the context information can be conveniently sent to the second device using the data transmission unit.

[0103] In some embodiments, to add context information to the first data transmission unit, the first device stores the context information in a free space within the first data transmission unit. Furthermore, the first device sets a first type indicator in the first data transmission unit. The first type indicator indicates that the first data transmission unit carries context information. In this way, the free space in the data transmission unit can be used to transmit context information, thereby reducing data transmission between devices.

[0104] In some embodiments, in order to receive target data used for the subsequent execution of a task determined by the second device based on context information, the first device receives a second data transmission unit from the second device and obtains the target data from the second data transmission unit. In this manner, the target data can be conveniently obtained using the data transmission unit.

[0105] In some embodiments, the target data may include, for example, the values ​​of at least one of the variables, objects, arrays, heaps, and stacks to be used in the subsequent execution of the task, their storage locations, and / or other data. In this way, various data to be used in the subsequent execution of the task and the storage locations for accessing this data can be obtained.

[0106] Figure 6 A flowchart illustrating a task processing procedure 600 performed at a second device 120 according to some embodiments of the present disclosure is shown. For example, method 600 may be performed by, for example... Figure 1 The second device 120 shown is used to perform the procedure. It should be understood that method 600 may also include additional steps not shown and / or the steps shown may be omitted, and the scope of this disclosure is not limited in this respect.

[0107] At 610, the second device receives context information about the task being executed by the first device. The context information indicates the execution status of the task on the first device. At 620, based on the context information, the second device determines the target data to be used in the subsequent execution of the task. At 630, the second device sends the target data to the first device. In this way, the second device can accurately predict the target data to be used in the subsequent execution of the task based on the acquired context information, and can proactively push this target data to the first device, thereby effectively reducing latency and improving task processing efficiency and user experience.

[0108] In some embodiments, in order to receive context information about a task performed by the first device, the second device receives a first data transmission unit from the first device and obtains context information from the first data transmission unit. In this way, context information can be conveniently obtained using the data transmission unit.

[0109] In some embodiments, context information may include, for example, information about the functional modules being executed in the task when the task is paused, the progress of the task at the time of pause, task-related data and / or other information stored in the registers of the first device at the time of pause. In this way, the context information can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on the context information, thereby improving the accuracy and efficiency of acquiring the target data.

[0110] In some embodiments, to determine target data, the second device acquires predetermined static information associated with the task. This static information does not change as the task is executed. The second device determines the target data required for the subsequent execution of the task based on the static information and contextual information. In this way, by combining the static information with contextual information reflecting the current execution status of the task, the subsequent execution of the task can be accurately simulated, thereby accurately predicting the target data to be used in subsequent execution.

[0111] In some embodiments, to obtain static information, the second device acquires task-specific code. This code includes compiled object code or uncompiled code. In this way, task-specific static code can be acquired. Therefore, based on the task's code, the target data to be used in the subsequent execution of the task can be accurately predicted.

[0112] In some embodiments, in order to determine target data, the second device determines the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks that will be used in the subsequent execution of the task, and / or other data. In this way, it is possible to predict the various types of data to be used in the subsequent execution of the task and the storage locations for accessing that data.

[0113] In some embodiments, in order to send target data, the second device adds the target data to a second data transmission unit to be sent, and sends the second data transmission unit to the first device. In this way, the target data can be conveniently sent to the first device using the data transmission unit.

[0114] In some embodiments, in order to add target data to the second data transmission unit, the second device stores the target data in the free space of the second data transmission unit. Furthermore, the second device sets a second type indicator in the second data transmission unit. The second type indicator is used to indicate that the second data transmission unit carries target data. In this way, the free space in the data transmission unit can be used to transmit context information, thereby reducing data transmission between devices.

[0115] Figure 7 A schematic block diagram of an apparatus 700 for task processing according to some embodiments of the present disclosure is shown. Figure 7 The illustrated apparatus 700 includes: a context information determination unit 710, configured to allow a first device to determine context information of a task based on a task pause trigger event, the context information indicating the execution state of the task on the first device; a context information sending unit 720, configured to send the context information to a second device; and a target data receiving unit 730, configured to receive target data determined by the second device based on the context information, which will be used in the subsequent execution of the task. In this manner, the first device can prefetch target data from the second device for subsequent task execution, thereby effectively reducing latency and improving task processing efficiency and user experience.

[0116] In some embodiments, the triggering event includes at least one of the following: an interrupt event, a memory page fault event, a task scheduling event, and an active send event. In this way, the prefetching of target data can be triggered without affecting the execution of the task.

[0117] In some embodiments, the context information determination unit 710 includes at least one of the following: a function module determination unit configured to determine information about the function modules being executed in the task when the task is paused; a progress determination unit configured to determine the progress of the task when the task is paused; and a register determination unit configured to determine the task-related data stored in the registers of the first device when the task is paused. In this way, the context information can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on the context information, thereby improving the accuracy and efficiency of acquiring the target data.

[0118] In some embodiments, the context information sending unit 720 includes: a context information adding unit configured to add context information to a first data transmission unit to be sent; and a first data transmission unit sending unit configured to send the first data transmission unit to a second device. In this manner, context information can be conveniently sent to the second device using the data transmission unit.

[0119] In some embodiments, the context information adding unit includes: a context information storage unit configured to store context information in a free space in the first data transmission unit; and a first type indicator setting unit configured to set a first type indicator in the first data transmission unit, the first type indicator indicating that the first data transmission unit carries context information. In this way, the free space in the data transmission unit can be used to transmit context information, thereby reducing data transmission between devices.

[0120] In some embodiments, the target data receiving unit 730 includes: a second data transmission unit receiving unit configured to receive a second data transmission unit from a second device; and a target data acquisition unit configured to acquire target data from the second data transmission unit. In this manner, target data can be conveniently acquired using the data transmission unit.

[0121] In some embodiments, the target data includes the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks that will be used in the subsequent execution of the task. In this way, various data to be used in the subsequent execution of the task and the storage locations for accessing this data can be obtained.

[0122] Figure 8 A schematic block diagram of an apparatus 800 for task processing according to some embodiments of the present disclosure is shown. Figure 8 The illustrated apparatus 800 includes: a context information receiving unit 810, configured to receive context information of a task executed by a first device, wherein the context information indicates the execution status of the task on the first device; a target data determining unit 820, configured to determine target data to be used in the subsequent execution of the task based on the context information; and a target data sending unit 830, configured to send the target data to the first device. In this manner, the second device can accurately predict the target data to be used in the subsequent execution of the task based on the acquired context information, and can proactively push this target data to the first device, thereby effectively reducing latency and improving task processing efficiency and user experience.

[0123] In some embodiments, the context information receiving unit 810 includes: a first data transmission unit receiving unit configured to receive a first data transmission unit from a first device; and a context information obtaining unit configured to obtain context information from the first data transmission unit. In this manner, context information can be conveniently obtained using the data transmission unit.

[0124] In some embodiments, the context information includes at least one of the following: information about the functional modules being executed in the task when the task is paused; the progress of the task execution when the task is paused; and task-related data stored in the registers of the first device when the task is paused. In this way, the context information can fully reflect the current execution status of the task. Therefore, the target data to be prefetched can be accurately predicted based on the context information, thereby improving the accuracy and efficiency of acquiring the target data.

[0125] In some embodiments, the target data determination unit 820 includes: a static information acquisition unit configured to acquire predetermined static information associated with the task, the static information not changing with the execution of the task; and a required target data determination unit configured to determine the target data required for the subsequent execution of the task based on the static information and context information. In this way, the subsequent execution of the task can be accurately simulated by combining static information and context information reflecting the current execution status of the task, thereby accurately predicting the target data to be used in subsequent execution.

[0126] In some embodiments, the static information acquisition unit includes a code acquisition unit configured to acquire task-specific code, including compiled object code or uncompiled code. In this way, task-specific static code can be acquired. Therefore, the target data to be used in the subsequent execution of the task can be accurately predicted based on the task's code.

[0127] In some embodiments, the target data determination unit 820 includes a specific target data determination unit configured to determine the value and storage location of at least one of variables, objects, arrays, heaps, and stacks to be used in the subsequent execution of the task. In this way, it is possible to predict the various data to be used in the subsequent execution of the task and the storage locations for accessing that data.

[0128] In some embodiments, the target data sending unit 830 includes: a target data adding unit configured to add target data to a second data transmission unit to be sent; and a second data transmission unit sending unit configured to send the second data transmission unit to a first device. In this manner, target data can be conveniently sent to the first device using the data transmission unit.

[0129] In some embodiments, the second data transmission unit sending unit includes: a target data storage unit configured to store target data in a free space within the second data transmission unit; and a second type indicator setting unit configured to set a second type indicator in the second data transmission unit, the second type indicator indicating that the second data transmission unit carries target data. In this way, free space in the data transmission unit can be used to transmit context information, thereby reducing data transmission between devices.

[0130] Embodiments of the present invention Figure 7 and Figure 8 The device shown can be implemented in hardware, software, or a combination of both. This embodiment of the invention does not limit the specific implementation of the device.

[0131] Figure 9 A block diagram of an example device 900 suitable for implementing embodiments of the present disclosure is shown. For example, such as Figure 1 The first device 110 and the second device 120 shown can be implemented by device 900. For example... Figure 9 As shown, device 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 902 or loaded from storage unit 905 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. CPU 901, ROM 902, and RAM 903 are interconnected via bus 904.

[0132] The device 900 also includes a communication unit 906, such as a network interface card (NIC). The communication unit 906 allows the device 900 to exchange information / data with other devices through computer networks and / or various telecommunications networks.

[0133] The various processes and handling described above, such as methods 500 or 600, can be executed by processing unit 901. For example, in some embodiments, method 500 or 600 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 905. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902 and / or communication unit 906. When the computer program is loaded into RAM 903 and executed by CPU 901, one or more actions of method 500 or 600 described above can be performed.

[0134] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.

[0135] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0136] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0137] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, Java, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0138] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0139] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0140] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0142] The various embodiments of this disclosure have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments.

Claims

1. A task processing method, characterized in that, include: The first device determines the context information of the task based on a task pause trigger event when the local storage device does not have the target data used for the subsequent execution of the task. The context information indicates the execution status of the task on the first device. Send the context information to the second device; as well as Receive the target data that the second device determines based on the context information, which will be used in the subsequent execution of the task.

2. The method according to claim 1, characterized in that, The triggering events include at least one of the following: interrupt events, memory page fault events, task scheduling events, and active sending events.

3. The method according to claim 1, characterized in that, Determining the context information for the task includes determining at least one of the following: Information about the functional modules being executed in the task when the task is paused, and the progress of the task at the time of pause. Data related to the task stored in the registers of the first device when the task is paused.

4. The method according to claim 1, characterized in that, Sending the context information to the second device includes: Add the context information to the first data transmission unit to be sent; and The first data transmission unit is sent to the second device.

5. The method according to claim 4, characterized in that, The step of adding the context information to the first data transmission unit to be sent includes: The context information is stored in the free space of the first data transmission unit; and A first type indicator is set in the first data transmission unit, which is used to indicate that the first data transmission unit carries the context information.

6. The method according to claim 1, characterized in that, The target data used for subsequent execution of the task, determined by the second device based on the context information, includes: Receive a second data transmission unit from the second device; and The target data is obtained from the second data transmission unit.

7. The method according to claim 1, characterized in that, The target data includes the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks that will be used in the subsequent execution of the task.

8. A task processing method, characterized in that, include: The second device receives context information of a task executed by the first device, the context information indicating the execution status of the task on the first device and being determined when the local storage device of the first device does not have target data for the subsequent execution of the task; Based on the context information, the target data to be used for the subsequent execution of the task is determined; as well as The target data is sent to the first device.

9. The method according to claim 8, characterized in that, The second device receives context information about the task being performed by the first device, including: Receive a first data transmission unit from the first device; and The context information is obtained from the first data transmission unit.

10. The method according to claim 8, characterized in that, The context information includes at least one of the following: Information about the functional modules being executed in the task when the task is paused; the progress of the task when the task is paused; and Data related to the task stored in the registers of the first device when the task is paused.

11. The method according to claim 8, characterized in that, The target data to be used for the subsequent execution of the task includes: Obtain static information associated with the task, the static information not changing as the task is executed; and The target data required for the subsequent execution of the task is determined based on the static information and the context information.

12. The method according to claim 11, characterized in that, The acquisition of static information associated with the task includes: Obtain code for the task, including compiled object code or uncompiled code.

13. The method according to claim 8, characterized in that, The determination of the target data to be used in the subsequent execution of the task includes: determining the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks to be used in the subsequent execution of the task.

14. The method according to claim 8, characterized in that, Sending the target data to the first device includes: Add the target data to the second data transmission unit to be sent; and The second data transmission unit is sent to the first device.

15. The method according to claim 14, characterized in that, The step of adding the target data to the second data transmission unit to be sent includes: The target data is stored in the free space of the second data transmission unit; and A second type indicator is set in the second data transmission unit, which is used to indicate that the second data transmission unit carries the target data.

16. A task processing device, characterized in that, include: The context information determination unit is configured to determine the context information of the task when the first device does not have target data for the subsequent execution of the task in the local storage device based on a task pause trigger event, wherein the context information indicates the execution status of the task on the first device; The context information sending unit is configured to send the context information to the second device; as well as The target data receiving unit is configured to receive the target data determined by the second device based on the context information, which will be used in the subsequent execution of the task.

17. The apparatus according to claim 16, characterized in that, The triggering events include at least one of the following: interrupt events, memory page fault events, task scheduling events, and active sending events.

18. The apparatus according to claim 16, characterized in that, The context information determination unit includes at least one of the following: The functional module determination unit is configured to determine information about the functional modules that are being executed in the task when the task is paused. The progress determination unit is configured to determine the progress of the task when the task is paused. A register determination unit is configured to determine task-related data stored in the registers of the first device when the task is paused.

19. The apparatus according to claim 16, characterized in that, The context information sending unit includes: The context information adding unit is configured to add the context information to the first data transmission unit to be sent; and The first data transmission unit is configured to send the first data transmission unit to the second device.

20. The apparatus according to claim 19, characterized in that, The context information adding unit includes: A context information storage unit is configured to store the context information in a free space within the first data transmission unit; and A first type indicator setting unit is configured to set a first type indicator in the first data transmission unit, wherein the first type indicator is used to indicate that the first data transmission unit carries the context information.

21. The apparatus according to claim 16, characterized in that, The target data receiving unit includes: The second data transmission unit receiving unit is configured to receive a second data transmission unit from the second device; and The target data acquisition unit is configured to acquire the target data from the second data transmission unit.

22. The apparatus according to claim 16, characterized in that, The target data includes the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks that will be used in the subsequent execution of the task.

23. A task processing device, characterized in that, include: The context information receiving unit is configured to allow the second device to receive context information of a task executed by the first device, wherein the context information indicates the execution status of the task on the first device and is determined when the local storage device of the first device does not have target data for subsequent execution of the task; The target data determination unit is configured to determine the target data to be used in the subsequent execution of the task based on the context information. as well as The target data sending unit is configured to send the target data to the first device.

24. The apparatus according to claim 23, characterized in that, The context information receiving unit includes: A first data transmission unit receiving unit is configured to receive a first data transmission unit from the first device; and The context information acquisition unit is configured to acquire the context information from the first data transmission unit.

25. The apparatus according to claim 23, characterized in that, The context information includes at least one of the following: Information about the functional modules that are being executed in the task when the task is paused; The progress of the task when the task was paused; and Data related to the task stored in the registers of the first device when the task is paused.

26. The apparatus according to claim 23, characterized in that, The target data determination unit includes: A static information acquisition unit is configured to acquire static information associated with the task, the static information not changing as the task is executed; and The required target data determination unit is configured to determine the target data required for the subsequent execution of the task based on the static information and the context information.

27. The apparatus according to claim 26, characterized in that, The static information acquisition unit includes: The code acquisition unit is configured to acquire code for the task, the code including compiled object code or uncompiled code.

28. The apparatus according to claim 23, characterized in that, The target data determination unit includes: a specific target data determination unit, configured to determine the value and storage location of at least one of the variables, objects, arrays, heaps, and stacks to be used in the subsequent execution of the task.

29. The apparatus according to claim 23, characterized in that, The target data transmission unit includes: The target data adding unit is configured to add the target data to the second data transmission unit to be sent; and The second data transmission unit is configured to send the second data transmission unit to the first device.

30. The apparatus according to claim 29, characterized in that, The second data transmission unit sending unit includes: The target data storage unit is configured to store the target data in a free space within the second data transmission unit; and The second type indicator setting unit is configured to set a second type indicator in the second data transmission unit, the second type indicator being used to indicate that the second data transmission unit carries the target data.

31. An electronic device, characterized in that, include: At least one processing unit; At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the device to perform the operation of the method according to any one of claims 1 to 7.

32. An electronic device, characterized in that, include: At least one processing unit; At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the device to perform the operation of the method according to any one of claims 8 to 15.

33. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the operation of the method according to any one of claims 1 to 7.

34. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the operation of the method according to any one of claims 8 to 15.

Citation Information

Patent Citations

  • Data prefetching method of DHT memory system and node and system

    CN102111448A

  • Data locality based Hadoop task scheduling method and device

    CN108228323A

  • Content Pre-fetching for Computing Devices

    US20130226837A1

  • Quality of cache management in a computer

    US20180081813A1