Intelligent preemption system
The intelligent preemption system selectively preempts low-priority tasks by estimating workload time and using machine learning models, solving the adverse effects of existing GPU preemption technologies on performance and power consumption, and achieving more efficient resource management.
Patent Information
- Application Number
- CN202380033064.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-04-11
- Filing Date
- 2023-04-04
- Publication Date
- 2024-12-17
AI Technical Summary
Existing GPU preemption technologies have adverse effects on the performance and power consumption of computing devices in terms of workload duration, preemption duration and preemption time, and the process of saving and restoring tasks is relatively expensive.
Introduce an intelligent preemption system to estimate the duration of workload through additional data, selectively preempt low-priority tasks, use machine learning models to determine preemption scheduling, avoid preemption near completion and close deadlines, and reduce the negative impact on GPU performance.
Through the use of intelligent preemption systems, power is saved, the negative impact on GPU performance is reduced, the performance and power consumption efficiency of the GPU are improved, and unnecessary preemption operations are avoided.
Smart Images

Figure CN119156601A_ABST
Abstract
Description
[0001] priority
[0002] This application claims the benefit of priority to U.S. Patent Application No. 17 / 718,008, filed on April 11, 2022, the entire contents of which are incorporated herein by reference. Technical Field
[0003] Embodiments herein generally relate to computer software preemption. More specifically, but not by way of limitation, embodiments herein describe a preemption system for selectively preempting a graphics processing unit (GPU). Background Art
[0004] In computer software, preemption is the act of temporarily stopping a currently executing task with the intention of resuming it at a later time. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] In the drawings, which are not necessarily drawn to scale, similar reference numerals may describe similar components in different views. To easily identify the discussion of any particular element or action, the highest digit or digits in the reference numeral refer to the figure number in which the element is first introduced. Some non-limiting examples are shown in the figures of the accompanying drawings, in which:
[0006] Figure 1 is a diagrammatic representation of a networked environment in which the present disclosure may be deployed, according to some examples.
[0007] Figure 2 is a diagrammatic representation of a messaging system having both client-side and server-side functionality according to some examples.
[0008] Figure 3 is an illustration of example preemption events scheduled by a preemption system according to an example implementation.
[0009] Figure 4 is an illustration of an example timeline during which a preemption system preempts a low priority task according to an example implementation.
[0010] Figure 5 is an example method for selectively preempting a GPU according to an example implementation.
[0011] Figure 6 is a diagrammatic representation of a machine in the form of a computer system according to some examples within which a set of instructions may be executed for causing the machine to perform any one or more of the methodologies discussed herein.
[0012] Figure 7 is a block diagram illustrating a software architecture in which examples may be implemented. DETAILED DESCRIPTION
[0013] An example of preemption is the process of allowing a high priority task to interrupt a low priority task. This allows the high priority job to run as quickly as possible without having to wait for competing computing resources to become free. Preemption can be accomplished in one of two ways. The first is by discarding the low priority task and restarting it when the high priority task is finished. The second is by saving the progress of the low priority task and resuming it after the high priority task is finished.
[0014] Graphics processing unit (GPU) preemption can be achieved by saving all progress and last state of lower priority tasks and restoring them at a later time. However, the process of saving progress and restoring tasks can be computationally expensive. Based on the duration of the workload, the duration of the preemption, and the time of the preemption, GPU preemption can have an adverse effect on the performance and power consumption of the computing device.
[0015] The systems and methods herein describe an intelligent preemption system. The proposed intelligent preemption system uses additional data to estimate specific times within the duration of a workload to selectively preempt low priority tasks, thereby saving power and mitigating negative impacts on the performance of the GPU.
[0016] The intelligent preemption system identifies high-priority tasks and low-priority tasks running on the GPU. High-priority tasks can be tasks that should be completed first or as soon as possible relative to other tasks. In some examples, high-priority tasks must be completed before a deadline, or are tasks that other processes rely heavily on in other ways. Human users of the intelligent preemption system can mark tasks as high-priority tasks. The intelligent preemption system determines whether preemption will be beneficial by estimating two key values: the preemption save time for low-priority tasks and the execution time of low-priority tasks. The preemption save time is the time it takes to perform the preemption. For example, the preemption save time is the time it takes to save the current progress of a lower priority task. The execution time of a low-priority task is the total amount of time it takes to execute the low-priority task. The time described in this article can be GPU clock time.
[0017] The two conditions that the intelligent preemption system checks are:
[0018] E(t PS )>E(t L )-t L0 );as well as
[0019] (min(E(t PS ),E(t L )-t L0 )+t H>t V )
[0020] Among them, t PS is the preemption saving time, t L is the total execution time of the low priority task, t L0 is the time until the low-priority task is preempted, t H is the total execution time of the high priority task, and t V is the time until the next deadline.
[0021] If the above two conditions are met, the intelligent preemption system preempts the low priority task with the high priority task. Other details of the intelligent preemption system are described in the following paragraphs.
[0022] Networked computing environment
[0023] Figure 1 1 is a block diagram illustrating an example of a messaging system 100 for exchanging data (e.g., messages and associated content) over a network. The messaging system 100 includes multiple instances of a client device 102, each instance hosting several applications, including a messaging client 104 and other applications 106. Each messaging client 104 is communicatively coupled to other instances of the messaging client 104 (e.g., hosted on respective other client devices 102), a messaging server system 108, and a third-party server 110 via a network 112 (e.g., the Internet). The messaging client 104 may also communicate with the locally hosted applications 106 using an application program interface (API).
[0024] The messaging clients 104 are able to communicate and exchange data with other messaging clients 104 and messaging server systems 108 via the network 112. The data exchanged between the messaging clients 104 and between the messaging clients 104 and messaging server systems 108 include functions (e.g., commands for activating functions) and payload data (e.g., text, audio, video, or other multimedia data).
[0025] The messaging server system 108 provides server-side functionality to certain messaging clients 104 via the network 112. Although certain functions of the messaging system 100 are described herein as being performed by the messaging client 104 or by the messaging server system 108, it may be a design choice whether certain functions are located within the messaging client 104 or within the messaging server system 108. For example, it may be technically preferable to initially deploy certain technologies and functions within the messaging server system 108, but later migrate the technologies and functions to the messaging client 104 where the client device 102 has sufficient processing power.
[0026] The messaging server system 108 supports various services and operations provided to the messaging clients 104. Such operations include sending data to the messaging clients 104, receiving data from the messaging clients 104, and processing data generated by the messaging clients 104. As examples, the data may include message content, client device information, geolocation information, media enhancements and overlays, message content persistence conditions, social network information, and live event information. The data exchange within the messaging system 100 is activated and controlled by functions available via the user interface (UI) of the messaging client 104.
[0027] Turning now specifically to the messaging server system 108, an application program interface (API) server 116 is coupled to the application server 114 and provides a programming interface to the application server 114. The application server 114 is communicatively coupled to a database server 120, which facilitates access to a database 126 that stores data associated with messages processed by the application server 114. Similarly, a web server 128 is coupled to the application server 114 and provides a web-based interface to the application server 114. To this end, the web server 128 processes incoming network requests via the Hypertext Transfer Protocol (HTTP) and several other related protocols.
[0028] The application program interface (API) server 116 receives and sends message data (e.g., commands and message payloads) between the client device 102 and the application server 114. Specifically, the application program interface (API) server 116 provides a set of interfaces (e.g., routines and protocols) that can be called or queried by the messaging client 104 to activate the functions of the application server 114. An application program interface (API) server 116 exposes various functions supported by the application server 114, including: account registration; login functionality; sending messages from a particular messaging client 104 to another messaging client 104 via the application server 114; sending media files (e.g., images or videos) from a messaging client 104 to a messaging server 118 and for possible access by another messaging client 104; setting up a collection of media data (e.g., a story); retrieving a friend list of a user of a client device 102; retrieving such a collection; retrieving messages and content; adding and removing entities (e.g., friends) from an entity graph (e.g., a social graph); locating friends in a social graph; and opening application events (e.g., related to a messaging client 104).
[0029] The application server 114 hosts several server applications and subsystems, including, for example, a messaging server 118, an image processing server 122, a social networking server 124, and a preemption system 130. The messaging server 118 implements several message processing techniques and functions, particularly those related to the aggregation and other processing of content (e.g., text and multimedia content) included in messages received from multiple instances of the messaging client 104. As will be described in more detail, text and media content from multiple sources can be aggregated into collections of content (e.g., referred to as stories or galleries). These collections are then made available to the messaging client 104. In view of the hardware requirements for other processor and memory intensive data processing, other processor and memory intensive data processing can also be performed on the server side by the messaging server 118.
[0030] The application server 114 also includes an image processing server 122 that is dedicated to performing various image processing operations, typically with respect to images or videos within the payload of messages sent from or received at the messaging server 118 .
[0031] The social network server 124 supports various social networking functions and services and makes them available to the messaging server 118. Examples of functions and services supported by the social network server 124 include identifying other users with whom a particular user of the messaging system 100 has relationships or that the particular user is "following," and also identifying interests and other entities of a particular user.
[0032] Returning to the messaging client 104, the features and functions of the external resource (e.g., application 106 or applet) are available to the user via the interface of the messaging client 104. In this context, "external" refers to the fact that the application 106 or applet is outside the messaging client 104. External resources are usually provided by a third party, but can also be provided by the creator or provider of the messaging client 104. The messaging client 104 receives a user selection of an option to launch or access the features of such an external resource. The external resource can be an application 106 (e.g., a "local app") installed on the client device 102, or a small-scale version of the application (e.g., a "applet") hosted on the client device 102 or away from the client device 102 (e.g., on a third-party server 110). The small-scale version of the application includes a subset of the features and functions of the application (e.g., a full-scale, local version of the application) and is implemented using a markup language document. In one example, the small-scale version of the application (e.g., a "applet") is a web-based markup language version of the application and is embedded in the messaging client 104. In addition to using markup language documents (eg, *ml files), applets may include scripting languages (eg, .*js files or .json files) and style sheets (eg, *ss files).
[0033] In response to receiving a user selection of an option to launch or access a feature of an external resource, the messaging client 104 determines whether the selected external resource is a web-based external resource or a locally installed application 106. In some cases, the application 106 locally installed on the client device 102 can be independent of the messaging client 104 and launched separately from the messaging client 104, such as by selecting an icon corresponding to the application 106 on a home screen of the client device 102. A small-scale version of such an application can be launched or accessed via the messaging client 104, and in some examples, none of the portions of the small-scale application can be accessed outside of the messaging client 104 or limited portions of the small-scale application can be accessed outside of the messaging client 104. The small-scale application can be launched by the messaging client 104 receiving, for example, a markup language document associated with the small-scale application from a third-party server 110 and processing such a document.
[0034] In response to determining that the external resource is a locally installed application 106, the messaging client 104 instructs the client device 102 to launch the external resource by executing the locally stored code corresponding to the external resource. In response to determining that the external resource is a web-based resource, the messaging client 104 communicates with the third-party server 110 (for example) to obtain a markup language document corresponding to the selected external resource. The messaging client 104 then processes the obtained markup language document to present the web-based external resource within the user interface of the messaging client 104.
[0035] The messaging client 104 may notify the user of the client device 102 or other users (e.g., "friends") associated with such a user of activities occurring in one or more external resources. For example, the messaging client 104 may provide a notification to a participant in a conversation (e.g., a chat session) in the messaging client 104 about the current or recent use of an external resource by one or more members of a user group. One or more users may be invited to join an active external resource or to start an external resource that was recently used but is currently inactive (in the friend group). An external resource may provide the participants in the conversation, each using a corresponding messaging client 104, with the ability to share items, conditions, states, or locations in an external resource with one or more members of a user group entering a chat session. A shared item may be an interactive chat card that members of a chat may interact with, for example, to start a corresponding external resource, view specific information within an external resource, or bring members of a chat to a specific location or state within an external resource. Within a given external resource, a response message may be sent to a user on the messaging client 104. The external resource may selectively include different media items in the response based on the current context of the external resource.
[0036] The messaging client 104 may present a list of available external resources (e.g., applications 106 or applets) to the user to launch or access a given external resource. The list may be presented in the form of a context-sensitive menu. For example, icons representing different applications (or applets) of the application 106 (or applets) may vary based on how the user launches the menu (e.g., from a conversational interface or from a non-conversational interface).
[0037] The preemption system 130 determines a preemption schedule for running high priority tasks and low priority tasks on the GPU. The preemption system 130 uses a machine learning model trained on historical preemption data to determine the preemption schedule. Therefore, the preemption system 130 improves the performance and power consumption of the GPU by determining the preemption schedule.
[0038] System Architecture
[0039] Figure 21 is a block diagram showing additional details about the messaging system 100 according to some examples. Specifically, the messaging system 100 is shown to include a messaging client 104 and an application server 114. The messaging system 100 contains several subsystems that are supported on the client side by the messaging client 104 and on the server side by the application server 114. These subsystems include, for example, a transient timer system 202, a collection management system 204, an enhancement system 208, a map system 210, a game system 212, an external resource system 214, and a preemption system 130.
[0040] The transient timer system 202 is responsible for implementing temporary or time-limited access to content by the messaging client 104 and the messaging server 118. The transient timer system 202 includes several timers that selectively enable access (e.g., for presentation and display) of messages and associated content via the messaging client 104 based on duration and display parameters associated with a message or a collection of messages (e.g., a story). Additional details regarding the operation of the transient timer system 202 are provided below.
[0041] The collection management system 204 is responsible for managing collections or collections of media (e.g., collections of text, images, video, and audio data). Collections of content (e.g., messages, including images, videos, text, and audio) may be organized into "event galleries" or "event stories." Such collections may be made available for a specified period of time (e.g., the duration of the event to which the content relates). For example, content related to a concert may be made available as a "story" for the duration of the concert. The collection management system 204 may also be responsible for publishing an icon to the user interface of the messaging client 104 that provides notification of the existence of a particular collection.
[0042] In addition, the collection management system 204 also includes a curation interface 206, which enables collection managers to manage and curate specific content collections. For example, the curation interface 206 enables event organizers to curate collections of content related to specific events (e.g., deleting inappropriate content or redundant messages). In addition, the collection management system 204 uses machine vision (or image recognition technology) and content rules to automatically curate content collections. In some examples, compensation can be paid to users for including user-generated content in a collection. In such a case, the collection management system 204 operates to automatically pay such users for using their content.
[0043] The enhancement system 208 provides various functions that enable users to enhance (e.g., annotate or otherwise modify or edit) media content associated with a message. For example, the enhancement system 208 provides functions related to the generation and publication of media overlays for messages processed by the messaging system 100. The enhancement system 208 is operable to provide media overlays or enhancements (e.g., image filters) to the messaging client 104 based on the geographic location of the client device 102. In another example, the enhancement system 208 is operable to provide media overlays to the messaging client 104 based on other information (e.g., social network information of the user of the client device 102). The media overlay can include audio and visual content and visual effects. Examples of audio and visual content include pictures, text, logos, animations, and sound effects. Examples of visual effects include color overlays. Audio and visual content or visual effects can be applied to media content items (e.g., photos) at the client device 102. For example, the media overlay can include text or images that can be superimposed on the top of a photo taken by the client device 102. In another example, the media overlay includes a location identification overlay (e.g., Venice Beach), the name of a live event, or a business name overlay (e.g., Beach Cafe). In another example, the augmentation system 208 uses the geolocation of the client device 102 to identify a media overlay that includes the name of a business at the geolocation of the client device 102. The media overlay may include other logos associated with the business. The media overlay may be stored in the database 126 and accessed through the database server 120.
[0044] In some examples, the enhancement system 208 provides a user-based publishing platform that enables a user to select a geolocation on a map and upload content associated with the selected geolocation. The user may also specify under what circumstances a particular media overlay should be provided to other users. The enhancement system 208 generates a media overlay that includes the uploaded content and associates the uploaded content with the selected geolocation.
[0045] In other examples, the enhancement system 208 provides a merchant-based publishing platform that enables merchants to select specific media overlays associated with a geographic location via a bidding process. For example, the enhancement system 208 associates the highest bidding merchant's media overlay with the corresponding geographic location for a predefined amount of time.
[0046] The mapping system 210 provides various geolocation functions and supports the presentation of map-based media content and messages by the messaging client 104. For example, the mapping system 210 enables the display of user icons or avatars (e.g., stored in the profile data 316 (deleted)) on a map to indicate the current or past locations of the user's "friends" and media content (e.g., a collection of messages including photos and videos) generated by such friends in the context of the map. For example, on the mapping interface of the messaging client 104, messages posted by the user to the messaging system 100 from a particular geolocation can be displayed to the "friends" of the particular user within the context of that particular location on the map. The user can also share his or her location and status information with other users of the messaging system 100 (e.g., using appropriate status avatars) via the messaging client 104, where the location and status information is similarly displayed to selected users within the context of the mapping interface of the messaging client 104.
[0047] The gaming system 212 provides various gaming functions within the context of the messaging client 104. The messaging client 104 provides a gaming interface that provides a list of available games that can be launched by a user within the context of the messaging client 104 and played with other users of the messaging system 100. The messaging system 100 also enables a particular user to invite other users to participate in playing a particular game by sending an invitation to such other users from the messaging client 104. The messaging client 104 also supports both voice and text messaging (e.g., chatting) within the context of playing games, provides leaderboards for games, and also supports providing in-game rewards (e.g., game coins and items).
[0048] The external resource system 214 provides an interface for the messaging client 104 to communicate with a remote server (e.g., a third-party server 110) to launch or access external resources (i.e., applications or applets). Each third-party server 110 hosts, for example, an application or a small-scale version of an application based on a markup language (e.g., HTML5) (e.g., a game application, a utility application, a payment application, or a ride-sharing application). The messaging client 104 can launch a web-based resource (e.g., an application) by accessing an HTML5 file from a third-party server 110 associated with a web-based resource. In some examples, the application hosted by the third-party server 110 is programmed in JavaScript using a software development kit (SDK) provided by the messaging server 118. The SDK includes an application programming interface (API) having functions that can be called or activated by a web-based application. In some examples, the messaging server 118 includes a JavaScript library that provides a given external resource access to certain user data of the messaging client 104. HTML5 is used as an example technology for programming games, but applications and resources programmed based on other technologies can be used.
[0049] To integrate the functionality of the SDK into a web-based resource, the SDK is downloaded by the third-party server 110 from the messaging server 118, or received by the third-party server 110 in other ways. Once downloaded or received, the SDK will be included as part of the application code of the web-based external resource. The code of the web-based resource can then call or activate certain functions of the SDK to integrate the features of the messaging client 104 into the web-based resource.
[0050] The SDK stored on the messaging server 118 effectively provides a bridge between external resources (e.g., applications 106 or applet) and the messaging client 104. This provides users with a seamless experience of communicating with other users on the messaging client 104 while retaining the look and feel of the messaging client 104. In order to bridge the communication between the external resources and the messaging client 104, in some examples, the SDK facilitates the communication between the third-party server 110 and the messaging client 104. In some examples, the WebViewJavaScriptBridge running on the client device 102 establishes two one-way communication channels between the external resources and the messaging client 104. Messages are sent asynchronously between the external resources and the messaging client 104 via these communication channels. Each SDK function activation is sent as a message and a callback. Each SDK function is implemented by constructing a unique callback identifier and sending a message with the callback identifier.
[0051] By using the SDK, not all information from the messaging client 104 is shared with the third-party server 110. The SDK limits which information is shared based on the needs of the external resource. In some examples, each third-party server 110 provides an HTML5 file corresponding to a web-based external resource to the messaging server 118. The messaging server 118 can add a visual representation (e.g., box art or other graphics) of the web-based external resource in the messaging client 104. Once the user selects the visual representation or indicates that the messaging client 104 accesses a feature of a web-based external resource through the GUI of the messaging client 104, the messaging client 104 obtains the HTML5 file and instantiates the resources required to access the feature of the web-based external resource.
[0052] The messaging client 104 presents a graphical user interface (e.g., a login page or title screen) for the external resource. During, before, or after presenting the login page or title screen, the messaging client 104 determines whether the launched external resource has been previously authorized to access the user data of the messaging client 104. In response to determining that the launched external resource has been previously authorized to access the user data of the messaging client 104, the messaging client 104 presents another graphical user interface of the external resource including the functions and features of the external resource. In response to determining that the launched external resource has not been previously authorized to access the user data of the messaging client 104, after displaying the login page or title screen of the external resource for a threshold period of time (e.g., 3 seconds), the messaging client 104 slides a menu for authorizing the external resource to access the user data (e.g., animating the menu to emerge from the bottom of the screen to the middle or other portion of the screen). The menu identifies the type of user data that the external resource will be authorized to use. In response to receiving the user selection of the accept option, the messaging client 104 adds the external resource to the list of authorized external resources and enables the external resource to access the user data from the messaging client 104. In some examples, the messaging client 104 authorizes the external resource to access the user data according to the OAuth 2 framework.
[0053] The messaging client 104 controls the type of user data shared with the external resource based on the type of external resource that is authorized. For example, an external resource including a full-scale application (e.g., application 106) is provided with access to a first type of user data (e.g., only a two-dimensional avatar of a user with or without different avatar characteristics). As another example, an external resource including a small-scale version of an application (e.g., a web-based version of the application) is provided with access to a second type of user data (e.g., payment information, a two-dimensional avatar of a user, a three-dimensional avatar of a user, and an avatar with various avatar characteristics). Avatar characteristics include different ways to customize the look and feel of an avatar (e.g., different poses, facial features, clothing, etc.).
[0054] In some examples, preemption system 130 is implemented on a GPU of client device 102 (e.g., as part of messaging client 104). In some examples, preemption system 130 is implemented on a GPU of a server (e.g., application server 114). In some examples, some operations of preemption system 130 are run on the GPU of client device 102 and other operations are run on the GPU of the server.
[0055] Figure 3 is an illustration of an example preemption event scheduled by the preemption system 130. Depending on the duration of the GPU workload, the duration of the preemption, and the time of the preemption, sometimes preemption may be detrimental to the performance and power consumption of the GPU. The preemption system 130 uses additional data to estimate certain times (e.g., preemption save time, execution time of low priority tasks, execution time of high priority tasks) to make more informed decisions about preemption events. A preemption event can be a decision to initiate a preemption (e.g., a high priority task interrupts a low priority task) or a decision to avoid a preemption (e.g., allowing a low priority task to complete without interruption). The preemption system 130 avoids two key preemption events: preemption near completion and preemption near deadline.
[0056] Near completion preemption is a situation during which a low priority task 304 is near completion and it is preferred to complete the low priority task 304 rather than preempt it. Timeline 302 is an example schedule of a low priority task 304 and a high priority task 306 running on a GPU without any scheduled preemption events. Timeline 308 is an example schedule of preempting a low priority task 304 with a high priority task 306.
[0057] In timeline 308, at block 310, the low priority task runs until the low priority task is terminated at time t L0 At block 312, the current progress of the low priority task is saved, and the associated preemption save time is represented by time tPS The high priority task 306 interrupts the low priority task and runs until it has been fully executed for time t H At block 314, the progress of the low priority task 304 is resumed, and the associated preemption resumption time is increased by time t PR In block 314, the low priority task 304 is completed, and the relative time taken to complete the low priority task 304 is represented by time t L1 express.
[0058] like Figure 3 As shown, the duration of timeline 302 is shorter than the duration of timeline 308. In this case, it is preferred to avoid preemption when the low priority task 304 is close to completion. The key conditions that must be met for the preemption system 130 to skip the preemption of the near completion are the following:
[0059] (t ps >t L1 )
[0060] or (t ps >(tL-t L0 ))
[0061] where tps is the time it takes to save the progress of the low-priority task before preemption (i.e., preemption save time), and t L1 is the remaining time of the low priority task after preemption, and t L0 is the time until the lower priority task is preempted.
[0062] Near-deadline preemption is a situation during which there is a deadline before which a high priority task 306 is completed. For example, the high priority task 306 may be a vertical synchronization (e.g., VSync). At some point, the deadline may not be met and preempting the current task (e.g., low priority task 304) will degrade the performance of the device. The key conditions for situations where it is best to skip near-deadline preemption are the following:
[0063] t PS +t H >t V
[0064] Among them, tps is the preemption saving time, t H is the total execution time of the high priority task, and t H is the time until the next deadline.
[0065] Figure 41 is a diagram of an example timeline during which the preemption system 130 preempts a low priority task. In some examples, the preemption system 130 preempts the low priority task near the beginning of the low priority task's run time. In this case, it may be helpful to completely discard the progress of the low priority task because the time required to save and restore the progress of the low priority task may be greater than the time required to completely repeat the low priority task.
[0066] Timeline 402 is an example timeline for preempting a low priority task. At block 404, at time t L0 At time t PS At block 408, for a duration of t H The high priority task is executed within t, and after the high priority task is completed, at block 410, at time t PR At block 412, for a duration of t L1 Complete low priority tasks within a certain period of time.
[0067] In contrast, timeline 414 is an example timeline in which the preemption system 130 preempts a low priority task near the start of the task and discards the current progress of the low priority task. L0 At block 416, a preemption event is scheduled and the high priority task 408 is executed until the high priority task 408 is terminated at time t H At block 420, the preemption event ends, and at block 418, the low priority job resumes and runs until it completes at time t L Completed at.
[0068] like Figure 4 As shown, timeline 414 enables high priority task 408 and low priority tasks to complete earlier than in timeline 402. The key conditions that must be met for preemption system 130 to perform preemption near the beginning are:
[0069] t L0 +t Penalty <t PS +t PR
[0070] Among them, t L0 is the time until the low-priority task is preempted, t P enalty is the time to discard and repeat work, tps is the preemptive save time, and t PR It is to seize the recovery time.
[0071] Although the flowchart described below may show the operations as a sequential process, many operations may be performed in parallel or concurrently. In addition, the order of the operations may be rearranged. The process terminates when its operations are completed. A process may correspond to a method, a program, an algorithm, etc. The operations of a method may be performed in whole or in part, may be performed in conjunction with some or all of the operations in other methods, and may be performed by any number of different systems (e.g., the systems described herein) or any part thereof (e.g., a processor included in any system).
[0072] Figure 5 An example method 500 for selectively preempting a GPU according to an example implementation is provided. The method 500 may be performed by a GPU on a client device, a GPU on a server, or any combination thereof. The method 500 may be implemented within a GPU microcode, a GPU kernel driver, or any combination thereof.
[0073] At operation 502, the preemption system 130 identifies low priority tasks and high priority tasks running concurrently on a processor. For example, the processor is a GPU.
[0074] At operation 504, the preemption system 130 uses a machine learning model trained to analyze historical preemption data to estimate the preemption preservation time and execution time of the low priority task. The preemption preservation time is the time spent to save the progress of the low priority task until the preemption event is scheduled. The execution time of the low priority task is the total duration of the low priority task. In some examples, the preemption system 130 also uses the machine learning model to estimate the execution time of the high priority task. In some examples, at least one of the estimated preemption preservation time of the low priority task, the estimated execution time of the low priority task, and the estimated execution time of the high priority task is received as input by a user of the client device.
[0075] The machine learning model can be a recurrent neural network.In some examples, the historical preemption data includes, but is not limited to, the average amount of time it takes a high priority task to run (e.g., the average execution time of a high priority task) and the average execution time of a low priority task, the average preemption save time of a low priority task, and the average recovery time of a low priority task.
[0076] At operation 506, the preemption system 130 determines whether the estimated preemption preservation time of the low priority task satisfies a first preemption condition. The first condition may be as follows:
[0077] E(t PS )>E(t L )-t L0 );
[0078] Among them, t PS is the preemption saving time, tL is the total execution time of the low priority task, and t L0 is the time until the lower priority task is preempted.
[0079] At operation 508, the preemption system 130 determines that the estimated execution time of the low priority task satisfies a second preemption condition. The second condition may be as follows:
[0080] (min(E(t PS ),E(t L )-t L0 )+t H >t V )
[0081] Among them, t PS is the preemption saving time, t L is the total execution time of the low priority task, t L0 is the time until the low-priority task is preempted, t H is the total execution time of the high priority task, and t V is the time until the next deadline.
[0082] At operation 510, in response to determining that the estimated preemption save time satisfies the first preemption condition and determining that the estimated execution time of the low priority task satisfies the second preemption condition, the preemption system 130 schedules a preemption event associated with the high priority task and the low priority task. The preemption event can be a decision by the preemption system 130 to allow the high priority task to interrupt the low priority task at a specified time. The preemption event can be a decision to allow the low priority task to complete without being preempted by the high priority task. For example, the preemption event can be a decision to allow the low priority task to complete without being preempted by the high priority task. Figure 3 to Figure 4 Describes any preemption events.
[0083] In some examples, preemption system 130 may estimate t L , so that E(t L )>t L In this case, the preemption system 130 overestimates t L , and the traditional preemption will be performed because the above conditions may not be met. The traditional preemption is the following situation: at time t L0 preempts the low priority task at time t PS The progress of the low-priority task is saved within t. H After the high priority task is completed, the high priority task is executed within the duration t PR The progress of the low-priority task is restored within t. L1 Complete low priority tasks within a certain period of time.
[0084] In some examples, preemption system 130 may estimate t PS , so that E(t PS )>t PS In this case, the preemption system 130 underestimates t PS , and traditional preemption will be performed because the above two conditions may not be met.
[0085] In some examples, preemption system 130 may estimate t PS , so that E(t PS )<t PS In this case, the preemption system 130 overestimates t PS , and preemption may be skipped entirely. Although the high priority task may be delayed in this case, the preemption system 130 saves power consumption of the GPU by not having to preempt lower priority tasks that may be closer to completion.
[0086] In some examples, preemption system 130 may estimate t L , so that E(t L )<t L In this case, the preemption system 130 underestimates t L In such cases, the preemption system 130 may need additional feedback from the user (eg, a deadline before which the high priority task needs to be completed) to help make a more informed decision.
[0087] Machine Architecture
[0088] Figure 6600 within which instructions 610 (e.g., software, programs, applications, applet, app, or other executable code) may be executed for causing the machine 600 to perform any one or more of the methodologies discussed herein. For example, the instructions 610 may cause the machine 600 to perform any one or more of the methodologies described herein. The instructions 610 convert a general purpose, unprogrammed machine 600 into a specific machine 600 that is programmed to perform the functions described and illustrated in the manner described. The machine 600 may operate as a standalone device or may be coupled (e.g., networked) to other machines. In a network deployment, the machine 600 may operate as a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. The machine 600 may include, but is not limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a laptop computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular phone, a smart phone, a mobile device, a wearable device (e.g., a smart watch), a smart home device (e.g., a smart appliance), other smart devices, a web appliance, a network router, a network switch, a network bridge, or any machine capable of sequentially or otherwise executing instructions 610 specifying actions to be taken by the machine 600. In addition, although only a single machine 600 is shown, the term "machine" should also be taken to include a collection of machines that individually or jointly execute instructions 610 to perform any one or more of the methods discussed herein. For example, the machine 600 may include any of the client device 102 or a number of server devices that form part of the messaging server system 108. In some examples, the machine 600 may also include both a client system and a server system, wherein certain operations of a particular method or algorithm are performed on the server side, and certain operations of the particular method or algorithm are performed on the client side.
[0089] The machine 600 may include a processor 604, a memory 606, and an input / output I / O component 602, which may be configured to communicate with each other via a bus 640. In an example, the processor 604 (e.g., a central processing unit (CPU), a reduced instruction set computing (RISC) processor, a complex instruction set computing (CISC) processor, a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a radio frequency integrated circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, a processor 608 and a processor 612 that execute instructions 610. The term "processor" is intended to include multi-core processors, which may include two or more independent processors (sometimes referred to as "cores") that may execute instructions simultaneously. Although Figure 6 Multiple processors 604 are shown, but machine 600 may include a single processor with a single core, a single processor with multiple cores (e.g., a multi-core processor), multiple processors with a single core, multiple processors with multiple cores, or any combination thereof.
[0090] The memory 606 includes a main memory 614, a static memory 616, and a storage unit 618, which are all accessible by the processor 604 via the bus 640. The main memory 606, the static memory 616, and the storage unit 618 store instructions 610 that implement any one or more of the methods or functions described herein. The instructions 610 may also reside, completely or partially, within the main memory 614, within the static memory 616, within the machine-readable medium 620 within the storage unit 618, within at least one of the processors 604 (e.g., within a cache memory of a processor), or within any suitable combination thereof during execution thereof by the machine 600.
[0091] I / O components 602 may include various components that receive input, provide output, generate output, send information, exchange information, capture measurements, etc. The specific I / O components 602 included in a particular machine will depend on the type of machine. For example, a portable machine such as a mobile phone may include a touch input device or other such input mechanism, while a headless server machine will be less likely to include such a touch input device. It will be appreciated that I / O components 602 may include Figure 66. In various examples, the I / O components 602 may include a user output component 626 and a user input component 628. The user output component 626 may include a visual component (e.g., a display such as a plasma display panel (PDP), a light emitting diode (LED) display, a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)), an acoustic component (e.g., a speaker), a tactile component (e.g., a vibration motor, a resistance mechanism), other signal generators, etc. The user input component 628 may include an alphanumeric input component (e.g., a keyboard, a touch screen configured to receive alphanumeric input, an optical keyboard, or other alphanumeric input component), a point-based input component (e.g., a mouse, a touch pad, a trackball, a joystick, a motion sensor, or other pointing instrument), a tactile input component (e.g., a physical button, a touch screen or other tactile input component that provides the location and force of a touch or touch gesture), an audio input component (e.g., a microphone), etc.
[0092] In other examples, the I / O component 602 may include a biometric component 630, a motion component 632, an environmental component 634, or a position component 636, as well as a wide range of other components. For example, the biometric component 630 includes components for detecting expressions (e.g., hand expressions, facial expressions, voice expressions, body postures, or eye tracking), measuring biosignals (e.g., blood pressure, heart rate, body temperature, sweat, or brain waves), identifying people (e.g., voice recognition, retinal recognition, facial recognition, fingerprint recognition, or EEG-based recognition), etc. The motion component 632 includes an acceleration sensor component (e.g., an accelerometer), a gravity sensor component, and a rotation sensor component (e.g., a gyroscope).
[0093] Environmental components 634 include, for example, one or more cameras (with still image / photo and video capabilities), lighting sensor components (e.g., a photometer), temperature sensor components (e.g., one or more thermometers that detect ambient temperature), humidity sensor components, pressure sensor components (e.g., a barometer), acoustic sensor components (e.g., one or more microphones that detect background noise), proximity sensor components (e.g., an infrared sensor that detects nearby objects), gas sensors (e.g., a gas detection sensor for detecting concentrations of hazardous gases for safety purposes or for measuring pollutants in the atmosphere), or other components that can provide indications, measurements, or signals corresponding to the surrounding physical environment.
[0094] With respect to cameras, client device 102 may have a camera system including, for example, a front-facing camera on a front surface of client device 102 and a rear-facing camera on a rear surface of client device 102. The front-facing camera may, for example, be used to capture still images and videos (e.g., “selfies”) of a user of client device 102, which may then be enhanced with the enhancement data (e.g., filters) described above. The rear-facing camera may, for example, be used to capture still images and videos in a more traditional camera mode, where the images are similarly enhanced using the enhancement data. In addition to the front-facing camera and the rear-facing camera, client device 102 may also include a 360° camera for capturing 360° photos and videos.
[0095] Additionally, the camera system of the client device 102 may include dual rear cameras (e.g., a main camera and a depth sensing camera), or even triple, quad, or quintuple rear camera configurations on the front and back sides of the client device 102. For example, these multi-camera systems may include a wide-angle camera, an ultra-wide-angle camera, a telephoto camera, a macro camera, and a depth sensor.
[0096] The location component 636 includes a positioning sensor component (e.g., a GPS receiver component), an altitude sensor component (e.g., an altimeter or barometer that detects air pressure, from which the altitude can be obtained), an orientation sensor component (e.g., a magnetometer), etc.
[0097] A variety of technologies can be used to achieve communication. The I / O component 602 also includes a communication component 638 that is operable to couple the machine 600 to the network 622 or device 624 via a corresponding coupling or connection. For example, the communication component 638 may include a network interface component or another suitable device that interfaces with the network 622. In other examples, the communication component 638 may include a wired communication component, a wireless communication component, a cellular communication component, a near field communication (NFC) component, Parts (e.g. Low energy consumption), Components, and other communication components for providing communication via other forms. Device 624 can be another machine or any of a variety of peripheral devices (e.g., a peripheral device coupled via USB).
[0098] In addition, the communication component 638 can detect the identifier or include components operable to detect the identifier. For example, the communication component 638 can include a radio frequency identification (RFID) tag reader component, an NFC smart tag detection component, an optical reader component (e.g., an optical sensor for detecting one-dimensional bar codes such as Universal Product Code (UPC) bar codes, multi-dimensional bar codes such as Quick Response (QR) codes, Aztec codes, Data Matrix, Dataglyph, MaxiCode, PDF417, UltraCode, UCC RSS-2D bar codes, and other optical codes) or an acoustic detection component (e.g., a microphone for identifying an audio signal of a tag). In addition, various information can be derived via the communication component 638, such as a location via Internet Protocol (IP) geolocation, a location via Internet Protocol (IP), ... The location of signal triangulation, the location of an NFC beacon signal via detection that can indicate a specific location, etc.
[0099] Various memories (e.g., main memory 614, static memory 616, and memory of processor 604) and storage unit 618 may store one or more sets of instructions and data structures (e.g., software) used by or implementing any one or more of the methods or functions described herein. When executed by processor 604, these instructions (e.g., instructions 610) cause various operations to implement the disclosed examples.
[0100] The instructions 610 may be sent or received over the network 622 using a transmission medium via a network interface device (e.g., a network interface component included in the communication component 638) and using any of several well-known transmission protocols (e.g., Hypertext Transfer Protocol (HTTP)). Similarly, the instructions 610 may be sent or received via a coupling (e.g., a peer-to-peer coupling) to the device 624 using a transmission medium.
[0101] Software Architecture
[0102] Figure 7 700 is a block diagram illustrating a software architecture 704 that may be installed on any one or more of the devices described herein. The software architecture 704 is supported by hardware, such as a machine 702, including a processor 720, a memory 726, and an I / O component 738. In this example, the software architecture 704 may be conceptualized as a stack of layers, where each layer provides specific functionality. The software architecture 704 includes layers such as an operating system 712, a library 710, a framework 708, and an application 706. In operation, the application 706 invokes an API call 750 through the software stack and receives a message 752 in response to the API call 750.
[0103] The operating system 712 manages hardware resources and provides public services. The operating system 712 includes, for example, a kernel 714, a service 716, and a driver 722. The kernel 714 serves as an abstraction layer between the hardware and other software layers. For example, the kernel 714 provides functions such as memory management, processor management (e.g., scheduling), component management, networking, and security settings. The service 716 can provide other public services to other software layers. The driver 722 is responsible for controlling the underlying hardware or interfacing with the underlying hardware. For example, the driver 722 may include a display driver, a camera driver, or Low-power drivers, Flash drivers, Serial communication drivers (e.g., USB drivers), Drivers, audio drivers, power management drivers, etc.
[0104] The library 710 provides a common low-level infrastructure used by the application 706. The library 710 may include a system library 718 (e.g., a C standard library) that provides functions such as memory allocation functions, string manipulation functions, mathematical functions, etc. In addition, the library 710 may include an API library 724, such as a media library (e.g., a library for supporting the presentation and manipulation of various media formats, such as Moving Picture Experts Group-4 (MPEG4), Advanced Video Coding (H.264 or AVC), Moving Picture Experts Group Layer-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Photographic Experts Group (JPEG or JPG), or Portable Network Graphics (PNG)), a graphics library (e.g., an OpenGL framework for presenting in two dimensions (2D) and three dimensions (3D) in graphics content on a display), a database library (e.g., SQLite providing various relational database functions), a web library (e.g., WebKit providing web browsing functions), etc. The library 710 may also include various other libraries 728 to provide many other APIs to the application 706.
[0105] The framework 708 provides a common high-level infrastructure used by the applications 706. For example, the framework 708 provides various graphical user interface (GUI) functions, high-level resource management, and high-level positioning services. The framework 708 can provide a wide range of other APIs that can be used by the applications 706, some of which can be specific to a particular operating system or platform.
[0106] In an example, applications 706 may include home applications 736, contact applications 730, browser applications 732, book reader applications 734, location applications 742, media applications 744, messaging applications 746, game applications 748, and a broad category of other applications such as third-party applications 740. Applications 706 are programs that perform functions defined in the program. Various programming languages may be used to create one or more of the applications 706 constructed in various ways, such as object-oriented programming languages (e.g., Objective-C, Java, or C++) or procedural programming languages (e.g., C or assembly language). In a specific example, third-party applications 740 (e.g., applications created by entities other than the vendor of a particular platform using ANDROID TM or IOS TM Software Development Kit (SDK) can be used to develop applications on mobile operating systems such as IOS TM ANDROID TM , Phone, or other mobile operating system running on the mobile software. In this example, the third-party application 740 can activate the API call 750 provided by the operating system 712 to facilitate the functions described herein.
[0107] Glossary
[0108] "Carrier signal" refers to any intangible medium that can store, encode or carry instructions for execution by a machine and includes digital or analog communications signals or other intangible media that facilitates communication of such instructions. Instructions may be sent or received over a network using a transmission medium via a network interface device.
[0109] "Client Device" refers to any machine that interfaces with a communications network to obtain resources from one or more server systems or other client devices. A client device may be, but is not limited to, a mobile phone, a desktop computer, a laptop computer, a portable digital assistant (PDA), a smart phone, a tablet computer, an ultrabook, a netbook, a laptop computer, a multiprocessor system, a microprocessor-based or programmable consumer electronics product, a game console, a set-top box, or any other communications device that a user may use to access a network.
[0110] "Communications network" means one or more parts of a network, which may be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless LAN (WLAN), a wide area network (WAN), a wireless WAN (WWAN), a metropolitan area network (MAN), the Internet, a part of the Internet, a part of the public switched telephone network (PSTN), a plain old telephone service (POTS) network, a cellular telephone network, a wireless network, A network, other type of network, or a combination of two or more such networks. For example, the network or a portion of the network may include a wireless network or a cellular network, and the coupling may be a code division multiple access (CDMA) connection, a global system for mobile communications (GSM) connection, or other type of cellular or wireless coupling. In this example, the coupling may implement any of various types of data transmission technologies, such as single carrier radio transmission technology (1xRTT), evolution data optimized (EVDO) technology, general packet radio service (GPRS) technology, enhanced data rate for GSM evolution (EDGE) technology, the third generation partnership project (3GPP) including 3G, fourth generation wireless (4G) network, universal mobile telecommunications system (UMTS), high speed packet access (HSPA), world wide interoperability for microwave access (WiMAX), long term evolution (LTE) standards, other data transmission technologies defined by various standard setting organizations, other long distance protocols, or other data transmission technologies.
[0111] "Component" refers to a logic, device, or physical entity with the following boundaries, which is defined by function or subroutine calls, branch points, APIs, or other technologies that provide partitioning or modularization for specific processing or control functions. Components can be combined with other components via their interfaces to perform machine processing. Components can be packaged functional hardware units designed for use with other components and can be part of a program that generally performs specific functions in related functions. Components can constitute software components (e.g., codes implemented on machine-readable media) or hardware components. "Hardware components" are tangible units that can perform certain operations and can be configured or arranged in a certain physical manner. In various examples, one or more computer systems (e.g., independent computer systems, client computer systems, or server computer systems) or one or more hardware components (e.g., processors or processor groups) of a computer system can be configured by software (e.g., applications or application parts) to operate to perform certain operations described herein. Hardware components can also be implemented mechanically, electronically, or any suitable combination thereof. For example, a hardware component may include a dedicated circuit or logic that is permanently configured to perform certain operations. The hardware component may be a dedicated processor, such as a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC). The hardware component may also include a programmable logic or circuit system that is temporarily configured to perform certain operations by software. For example, the hardware component may include software executed by a general-purpose processor or other programmable processor. Once configured by such software, the hardware component becomes a specific machine (or a specific component of a machine) that is uniquely customized to perform the configured function, and is no longer a general-purpose processor. It should be understood that it can be decided whether to mechanically implement the hardware component in a dedicated and permanently configured circuit system or in a temporarily configured (e.g., configured by software) circuit system for cost and time considerations. Therefore, the phrase "hardware component" (or "hardware-implemented component") should be understood to include a tangible entity, that is, an entity that is physically constructed, permanently configured (e.g., hardwired) or temporarily configured (e.g., programmed) to operate in some way or perform certain operations described herein. Considering an example in which a hardware component is temporarily configured (e.g., programmed), it is not necessary to configure or instantiate each of the hardware components at any one time. For example, in the case where a hardware component includes a general-purpose processor that is configured by software to become a special-purpose processor, the general-purpose processor can be respectively configured as different special-purpose processors (e.g., including different hardware components) at different times. Software accordingly configures one or more specific processors to, for example, constitute a specific hardware component at one time, and to constitute different hardware components at different times. Hardware components can provide information to other hardware components and receive information from other hardware components. Accordingly, the described hardware components can be considered to be coupled in communication.In the case of multiple hardware components being present at the same time, communication can be achieved by signal transmission (e.g., by appropriate circuits and buses) between or among two or more hardware components. In examples where multiple hardware components are configured or instantiated at different times, communication between such hardware components can be achieved, for example, by storing information in a memory structure accessible to multiple hardware components and retrieving information in the memory structure. For example, a hardware component can perform an operation, and the output of the operation is stored in a memory device coupled to it in communication. Then, another hardware component can access the memory device at a subsequent time to retrieve the stored output and process it. The hardware component can also initiate communication with an input device or an output device, and can operate on resources (e.g., a collection of information). The various operations of the example methods described herein can be performed at least in part by one or more processors that are temporarily configured (e.g., by software) or permanently configured to perform related operations. Whether it is temporarily configured or permanently configured, such a processor can constitute a processor-implemented component that operates to perform one or more operations or functions described herein. As used herein, "processor-implemented components" refer to hardware components implemented using one or more processors. Similarly, the method described in this article can be implemented at least in part by a processor, wherein one or more specific processors are examples of hardware. For example, at least some operations of the method can be performed by one or more processors 1004 or the parts implemented by the processor. In addition, one or more processors can also operate to support the execution of related operations in a "cloud computing" environment or as a "software as a service" (SaaS) operation. For example, at least some operations in the operation can be performed by a group of computers (as an example of a machine including a processor), wherein these operations can be accessed via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., API). The execution of some operations in the operation can be distributed between processors, not only can reside in a single machine, but also can be deployed across several machines. In some examples, a processor or a part implemented by a processor can be located in a single geographic location (e.g., in a home environment, an office environment, or a server cluster). In other examples, a processor or a part implemented by a processor can be distributed across several geographic locations.
[0112] "Computer-readable storage media" refers to both machine storage media and transmission media. Therefore, these terms include storage devices / media and carrier / modulated data signals. The terms "machine-readable medium", "computer-readable medium" and "device-readable medium" mean the same thing and can be used interchangeably in this disclosure.
[0113] "Transient messages" are messages that are accessible for a limited duration. Transient messages can be text, images, videos, etc. The access time for transient messages can be set by the sender of the message. Alternatively, the access time can be a default setting or a setting specified by the recipient. Regardless of the setting technique, the message is transient.
[0114] "Machine storage media" refers to a single or multiple storage devices and media (e.g., centralized or distributed databases, and associated caches and servers) that store executable instructions, routines, and data. Thus, the term should be considered to include, but is not limited to, solid-state memory and optical and magnetic media, including memory internal or external to the processor. Specific examples of machine storage media, computer storage media, and device storage media include: non-volatile memory, including, for example, semiconductor memory devices such as erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), FPGA, and flash memory devices; magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The terms "machine storage media", "device storage media", and "computer storage media" mean the same thing and may be used interchangeably in this disclosure. The terms "machine storage media", "computer storage media", and "device storage media" expressly exclude carrier waves, modulated data signals, and other such media (at least some of which are encompassed by the term "signal media").
[0115] “Non-transitory computer-readable storage medium” refers to tangible media capable of storing, encoding, or carrying instructions to be executed by a machine.
[0116] "Signal medium" refers to any intangible medium that is capable of storing, encoding or carrying instructions executed by a machine and includes digital or analog communication signals or other intangible media that facilitate the communication of software or data. The term "signal medium" should be deemed to include any form of modulated data signals, carrier waves, etc. The term "modulated data signal" refers to a signal that has one or more of its various characteristics set or changed in such a manner as to encode information in the signal. The terms "transmission medium" and "signal medium" mean the same thing and may be used interchangeably in this disclosure.
Claims
1. A method comprising: Identify low-priority tasks and high-priority tasks running on the processor; Using a machine learning model trained to analyze historical preemption data, estimating a preemption save time of the low priority task and an execution time of the low priority task; Determining that the estimated preemption preservation time of the low priority task satisfies a first preemption condition; Determining that the estimated execution time of the low priority task satisfies a second preemption condition; In response to determining that the estimated preemption save time satisfies the first preemption condition and determining that the estimated execution time of the low priority task satisfies the second preemption condition, preemption events associated with the high priority task and the low priority task are scheduled.
2. The method according to claim 1, wherein: The machine learning model is a recurrent neural network.
3. The method according to claim 1, further comprising: The machine learning model is used to estimate the execution time of the high priority task.
4. The method according to claim 1, further comprising: The preemption save time of the low priority task and the execution time of the low priority task are received as input from a user of a client device.
5. The method according to claim 1, wherein: The preemption event includes allowing the high priority task to interrupt the low priority task.
6. The method according to claim 1, wherein: The processor is a graphics processing unit (GPU).
7. The method according to claim 6, wherein: The historical data includes an average amount of time that the high priority task utilized the GPU.
8. A system comprising: processor; as well as a memory storing instructions that, when executed by the processor, configure the system to: Identify low-priority tasks and high-priority tasks running on the processor; Using a machine learning model trained to analyze historical preemption data, estimating a preemption save time of the low priority task and an execution time of the low priority task; Determining that the estimated preemption preservation time of the low priority task satisfies a first preemption condition; Determining that the estimated execution time of the low priority task satisfies a second preemption condition; In response to determining that the estimated preemption save time satisfies the first preemption condition and determining that the estimated execution time of the low priority task satisfies the second preemption condition, preemption events associated with the high priority task and the low priority task are scheduled.
9. The system according to claim 8, wherein: The machine learning model is a recurrent neural network.
10. The system according to claim 8, wherein: The instructions further configure the system to: The machine learning model is used to estimate the execution time of the high priority task.
11. The system according to claim 8, wherein: The instructions further configure the system to: The preemption save time of the low priority task and the execution time of the low priority task are received as input from a user of a client device.
12. The system according to claim 8, wherein: The preemption event includes allowing the high priority task to interrupt the low priority task.
13. The system according to claim 8, wherein: The processor is a graphics processing unit (GPU).
14. The system according to claim 13, wherein: The historical data includes an average amount of time that the high priority task utilized the GPU.
15. A non-transitory computer-readable storage medium comprising instructions that, when executed by a computer, cause the computer to: Identify low-priority tasks and high-priority tasks running on the processor; Using a machine learning model trained to analyze historical preemption data, estimating a preemption save time of the low priority task and an execution time of the low priority task; Determining that the estimated preemption preservation time of the low priority task satisfies a first preemption condition; Determining that the estimated execution time of the low priority task satisfies a second preemption condition; In response to determining that the estimated preemption save time satisfies the first preemption condition and determining that the estimated execution time of the low priority task satisfies the second preemption condition, preemption events associated with the high priority task and the low priority task are scheduled.
16. The computer-readable storage medium of claim 15, wherein: The machine learning model is a recurrent neural network.
17. The computer-readable storage medium of claim 15, wherein: The instructions further configure the computer to: The machine learning model is used to estimate the execution time of the high priority task.
18. The computer-readable storage medium of claim 15, wherein: The instructions further configure the computer to: The preemption save time of the low priority task and the execution time of the low priority task are received as input from a user of a client device.
19. The computer-readable storage medium of claim 15, wherein: The preemption event includes allowing the high priority task to interrupt the low priority task.
20. The computer-readable storage medium of claim 15, wherein: The processor is a graphics processing unit (GPU).
Citation Information
Patent Citations
Intelligent preemption system
US20230325243A1
Cited By
Preemption management method and device, equipment, storage medium and program product
CN120510017A
