Scheduling method and system, service device, computer program product, and storage medium
By filtering and allocating appropriate user-space processes in kernel mode to handle connection requests, the user-space process congestion problem is solved, improving the performance and resource utilization of service devices.
Patent Information
- Application Number
- PCT/IB2025/051310
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-05
- Filing Date
- 2025-02-07
- Publication Date
- 2025-12-11
AI Technical Summary
The existing service device's kernel-mode scheduling mechanism for user-mode processes causes congestion in some processes, impacting performance.
In kernel mode, obtain the process list of the target application, filter out the candidate processes that meet the preset filtering requirements, and assign the target process to the connection request through hash calculation or other methods, and schedule it to the appropriate user-mode process.
By rationally scheduling connection requests and balancing the running status of user-mode processes, the performance and resource utilization of service devices can be improved.
Smart Images

Figure IB2025051310_11122025_PF_FP_ABST
Abstract
Description
[0001]The technical field of the present application is cloud computing, and particularly relates to a scheduling method, system, service device, computer program product and storage medium. Background art At present, more and more service devices start to support multi-process design to improve work throughput. For example, in an Application Load Balancer (ALB) system, a service device serving as a relay node can fully utilize its multiple cores to start multiple user-mode processes to forward messages sent by clients to appropriate servers in the back end. In such a service device, multiple user-mode processes listen on the same port in the transport layer of the seven-layer network model. To avoid waking up multiple user-mode processes due to receiving a request, the service device schedules user-mode processes in the kernel mode to schedule the received request to one of the user-mode processes for processing. The scheduling mechanism used in the kernel mode is usually to divide the received request equally among multiple user-mode processes. However, because the processing time required by different requests may be different, this scheduling mechanism often causes congestion of requests carried by some user-mode processes, affecting the performance of the service device. The present application provides a scheduling method, system, service device, computer program product and storage medium to more reasonably schedule connection requests in the transport layer to improve the performance of the service device. The present application provides a scheduling method applicable to the operating system of a service device, wherein the operating system includes a kernel mode and a user mode, and a target application runs in the user mode of the operating system. The method includes: in the kernel mode of the operating system, in response to receiving a connection request for the target application, obtaining a process list corresponding to the target application, the process list containing at least one candidate process selected from multiple user-mode processes started for the target application, and the running state of the candidate process meeting a preset selection requirement; allocating a target process for the connection request from the candidate processes contained in the process list; and scheduling the connection request to the target process to make the target process process the connection request. Further, in response to receiving a connection request for the target application, obtaining a process list corresponding to the target application includes: in response to receiving a connection request for the target application, reading the process list from the kernel state storage space and transferring it from the user mode.Further, the method can further include: obtaining, in the user mode of the operating system, state parameters respectively provided by the plurality of user mode processes for describing running states; filtering, from the plurality of user mode processes, at least one candidate process that meets the preset filtering requirement according to the state parameters respectively corresponding to the plurality of user mode processes, to generate the process list; and transferring the process list to a kernel mode storage space. Further, obtaining, in the user mode of the operating system, the state parameters respectively provided by the plurality of user mode processes for describing running states includes: reading, in the user mode of the operating system, the state parameters written by the plurality of user mode processes from the user mode storage space corresponding to the target application. Further, filtering, from the plurality of user mode processes, at least one candidate process that meets the preset filtering requirement includes: for any user mode process in the plurality of user mode processes, if each state parameter provided by the user mode process meets a filtering threshold value in a corresponding description dimension, the user mode process is determined to be a candidate process that meets the preset filtering requirement; wherein the filtering threshold value is calculated according to the state parameters obtained in the corresponding description dimension. Further, if each state parameter provided by the user mode process meets a filtering threshold value in a corresponding description dimension, the user mode process is determined to be a candidate process that meets the preset filtering requirement, including: if the description dimension used is multiple, a plurality of rounds of filtering operations are sequentially started to sequentially use the plurality of description dimensions; in a first round of filtering operation, a first filtering threshold value is calculated for a first description dimension according to the state parameters provided by the plurality of user mode processes in the first description dimension used in the first round of filtering operation; if the state parameter of any user mode process in the plurality of user mode processes in the first description dimension meets the first filtering threshold value, the user mode process is added to a filtering list corresponding to the first round of filtering operation; in a non-first round of filtering operation, a second filtering threshold value is calculated for a second description dimension according to the state parameters provided by the user mode processes included in a filtering list corresponding to a previous round of filtering operation in the second description dimension used in the non-first round of filtering operation; if the state parameter of any user mode process in the filtering list corresponding to the previous round of filtering operation in the second description dimension meets the second filtering threshold value, the user mode process is added to a filtering list corresponding to the non-first round of filtering operation; and the user mode processes in the filtering list generated after the last round of filtering operation are determined to be the candidate processes.Further, the method can further include: defining a bitmap in a user mode of the operating system, a plurality of bits in the bitmap corresponding to the plurality of user mode processes; updating a value of a bit corresponding to a user mode process meeting the first filtering threshold in the bitmap to a first value to represent adding the user mode process to a filtering list corresponding to the first round filtering operation for the first round filtering operation; performing an intersection operation between the value of the bit corresponding to the user mode process meeting the first filtering threshold in the bitmap and the first value for the non-first round filtering operation; and if the value of the bit after the intersection operation is still the first value, representing adding the user mode process to a filtering list corresponding to the non-first round filtering operation. Further, the state parameter includes a connection count and / or a queue count, the connection count being used to represent a number of connections that have been established and not released, and the queue count being used to represent a number of processing requests that have not been completed. Further, the process list is delivered to a kernel mode storage space, including: in the user mode, invoking an execution engine supporting a kernel function extension deployed in the kernel mode to deliver the process list to the kernel mode storage space by using the execution engine. Further, a target process is allocated for the connection establishment request from candidate processes included in the process list, including: in the kernel mode of the operating system, performing a hash calculation on the connection establishment request to obtain a hash value corresponding to the connection establishment request; and based on the hash value, allocating the target process for the connection establishment request from the candidate processes included in the process list. Further, the method can further include: in the kernel mode of the operating system, loading function logic of a target function for allocating a user mode process as custom function logic by using an execution engine supporting a kernel function extension; and when the target function is run in response to the connection establishment request, scheduling the connection establishment request according to the custom function logic; and the custom function logic includes the operation of obtaining the process list corresponding to the target application and subsequent operations. Further, the execution engine includes an extended Berkeley Packet Filter (eBPF). Embodiments of the present disclosure also provide a scheduling system deployed in an operating system of a service device, the scheduling system including a kernel mode component and a user mode component, the kernel mode component running in a kernel mode of the operating system, and the user mode component running in a user mode of the operating system, based on the kernel mode component and the user mode component, the scheduling system being configured to perform the scheduling method described above.The embodiment of the present disclosure further provides a service device, comprising a memory, a processor and a communication component; the memory is used for storing one or more computer instructions issued by an operating system; the processor is coupled with the memory and the communication component, and is used for executing the one or more computer instructions, so as to execute the foregoing scheduling method. The embodiment of the present disclosure further provides a computer readable storage medium storing a computer program, when the computer program is executed by one or more processors, the one or more processors execute the foregoing scheduling method. The embodiment of the present disclosure further provides a computer program product, comprising a computer program, when the computer program is executed by one or more processors, the one or more processors execute the foregoing scheduling method. In the embodiment of the present disclosure, a new scheduling mechanism is provided in the kernel state of the operating system for the connection request in the transport layer. In the kernel state of the operating system, in response to receiving the connection request for the target application, the process list corresponding to the target application can be acquired, wherein the process list contains not all user state processes started for the target application, but at least one candidate process determined according to the running state of the user state processes. In this way, through the process list, the kernel state can indirectly perceive the running state of each user state process, and the user state process whose running state does not meet the preset screening requirement can be excluded from the scheduling range. On this basis, in the kernel state, the connection request can be scheduled to a target process in the process list, so as to process the connection request through the target process. Accordingly, in the embodiment of the present disclosure, the connection request can be scheduled to the user state process whose running state is more in line with the application scenario requirement in the kernel state, so as to make the running state of each user state process more balanced, and thus the performance of the service device is improved. BRIEF DESCRIPTION OF DRAWINGS The accompanying drawings used to provide further understanding of the present disclosure and form a part of the present disclosure, and the illustrative embodiments of the present disclosure and their descriptions serve to explain the present disclosure, and do not constitute improper limitations on the present disclosure. In the drawings: Fig. 1 is a structural schematic diagram of a scheduling system provided by an exemplary embodiment of the present disclosure; Fig. 2 is a flow schematic diagram of a scheduling method provided by an exemplary embodiment of the present disclosure; Fig. 3 is a structural schematic diagram of a preferred implementation of a scheduling system provided by an exemplary embodiment of the present disclosure; Fig. 4 is a flow schematic diagram of another scheduling method provided by an exemplary embodiment of the present disclosure; Fig. 5 is a logic schematic diagram corresponding to the scheduling method provided by Fig. 4; and Fig. 6 is a structural schematic diagram of a service device provided by another exemplary embodiment of the present disclosure.DETAILED DESCRIPTION In order to make the purposes, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be described clearly and completely below in connection with specific embodiments of the present disclosure and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present disclosure, but not all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present disclosure. Before starting to describe the technical solutions provided by the embodiments of the present disclosure in detail, several technical concepts related to the present disclosure are simply explained as follows. An operating system is the core software of a computer system, which provides a running environment and basic services for application programs. The kernel of the operating system is the core part of the operating system. The kernel of the operating system is usually responsible for process management, memory management, device management, file system management and network communication management. In addition to the above-mentioned management work, the kernel of the operating system can also be responsible for security management, virtualization management and parallel processing, and more description is not made here. The operating system can switch between the kernel state and the user state to protect the security and stability of the kernel of the operating system. In the kernel state, the kernel program running in the operating system is a plurality of kernel programs, which constitute the kernel of the operating system. At this time, the operating system can execute privileged instructions, or can execute non-privileged instructions. Among them, the privileged instruction is usually an operation instruction that has a major impact on the computer system and may have an irreparable impact, therefore, it must be issued by the kernel of the operating system, and cannot be issued by the user's application program. In the user state, the application program running in the operating system is an application program at this time, and the operating system can only execute non-privileged instructions. A service device can be understood as a device for providing cloud services. When the service device provides services to the outside, it needs to establish a connection with the request end first, for this purpose, the request end needs to initiate a connection request to the service device, after the connection is completed, the request end can send service-related processing requests to the service device to trigger the service device to respond to these processing requests, and thus realize the service. Since the connection request usually arrives at the service device through network communication, and the network communication management is responsible by the kernel of the operating system, therefore, the connection request usually arrives at the kernel state of the service device. As introduced in the background art, at present, more and more service devices begin to support multiple processes, therefore, in the kernel state, it is necessary to distribute the connection request among multiple user state processes. Referring to the commonly used scheduling mechanism mentioned in the background art: the received connection request is evenly divided into multiple user state processes.As the processing time required by different requests can be different, this scheduling mechanism often causes congestion of connection establishment requests carried on part of user mode processes, affects the response efficiency of the connection establishment requests, and further affects the throughput and other performances of the service device. Therefore, an embodiment of the present disclosure proposes a scheduling scheme. For connection establishment requests in the transport layer, a new scheduling mechanism is implemented in the kernel mode of the operating system in the service device, so as to more reasonably schedule the received connection establishment requests to appropriate user mode processes, thereby effectively shortening the waiting time of the connection establishment requests and improving the response efficiency of the connection establishment requests. The technical solutions provided by the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. FIG. 1 is a structural schematic diagram of a scheduling system provided by an exemplary embodiment of the present disclosure. Referring to FIG. 1, the scheduling system is deployed in the operating system of a service device, and the operating system includes a kernel mode and a user mode. The scheduling system can include a user mode component and a kernel mode component. The kernel mode component runs in the kernel mode of the operating system, and the user mode component runs in the user mode of the operating system. In this embodiment, the kernel mode component can be understood as a kernel program responsible for allocating user mode processes, i.e., allocating to user mode processes and target processes. The user mode component can be understood as a user mode program used in cooperation with the kernel mode component to support the kernel mode component to complete the allocation of user mode processes. The user mode component in this embodiment can be an independent program running in the user mode and located outside the application program in the user mode. Of course, it can also be a functional module integrated in the application program, and this embodiment does not limit it. Deservedly, the user mode component is a component newly added in the scheduling system in this embodiment. As can be known from the traditional scheduling mechanism described in the background art, as the user mode and the kernel mode are information isolated, the kernel mode component only relies on the fixed scheduling strategy in itself to perform scheduling, and these fixed scheduling strategies are irrelevant to the user mode. In this embodiment, this traditional scheduling mechanism is abandoned, and the user mode component is added in the scheduling system. In this embodiment, the user mode component can be used to timely feed back the running state of the user mode process to the kernel mode component, i.e., providing new scheduling basis for the kernel mode component through the process list. In this embodiment, the type of services provided by the service device is not limited. In some exemplary application scenarios, the service device can be a relay node in the Application Load Balancer (ALB) system mentioned in the background art. In this application scenario, the type of services provided by the service device is network forwarding and load balancing.application running in a running environment provided by an operating system of the service device, that is, the ALB instance runs in a user mode of the operating system and can be requested to connect as a target application. Of course, this is only exemplary, and in other application scenarios, the service type provided by the service device in this embodiment can also be a storage service, a database service, or a WEB service, and the application running in the user mode of the operating system of the service device will also be an application program adapted to the service type, and no more examples are given here. Referring to FIG. 1, in the operating system, a plurality of user mode processes can be started for the target application. The target application runs in the user mode of the operating system, and the target application is an application program for supporting the service device to provide services externally. The user mode process in this embodiment refers to an application process started for the target application in the user mode of the operating system. The user mode process in this embodiment can be a heavy-weight process, a light-weight process, etc., which is not limited here. For a request end that needs to use the service provided by the service device, a connection request can be initiated for the target application. It is worth mentioning that the connection request in this embodiment is located in the fourth layer of the seven-layer network model, that is, the transport layer. In the seven-layer network model, the transport layer is mainly used to manage end-to-end data transmission in the network. For the service device in this embodiment, the request end that expects to use the service provided by the service device needs to initiate a connection request in the transport layer, which can be reasonably understood as a connection request for requesting to connect with the target application in the service device, specifically, the connection request is used to request to establish a connection with the user mode process started for the target application in the service device. In this way, after the service device completes the response to the connection request, a connection channel can be established between the service device and the request end in the transport layer. Then, in the application layer of the seven-layer network model, the request end can initiate a service-related processing request to the service device in this embodiment based on the established connection channel. Therefore, the scheduling method in this embodiment is used to schedule the connection request sent to the service device in the transport layer of the seven-layer network model. Continue to refer to FIG. 1, as mentioned above, the connection request initiated by the request end will arrive at the kernel mode of the operating system of the service device. In this embodiment, based on the kernel mode component in the scheduling system, a new scheduling mechanism can be implemented in the kernel mode to schedule the received connection request to a more suitable user mode process. FIG. 2 is a flowchart of a scheduling method provided by an exemplary embodiment of the present disclosure.Referring to FIG. 2, the method can be applicable to an operating system in a service device, the operating system including a kernel state and a user state, and specifically can be applicable to the above-mentioned scheduling system deployed in the operating system. The method can include: in step 200, in the kernel state of the operating system, in response to receiving a connection request for a target application, obtaining a process list corresponding to the target application, the process list including at least one candidate process selected from a plurality of user state processes started for the target application, a running state of the candidate process meeting a preset filtering requirement; in step 201, from the candidate processes included in the process list, assigning a target process for the connection request; and in step 202, scheduling the connection request to the target process, so that the target process processes the connection request. In the embodiment, the technical logic in the kernel state can be implemented based on a kernel state component in the scheduling system. As mentioned above, the connection request will arrive at the kernel state of the operating system in the service device, and the connection request can be received by the kernel state component in the scheduling system in the embodiment. On this basis, referring to FIG. 2, in step 200, the kernel state component can obtain a process list corresponding to the target application in response to receiving a connection request for the target application. It is worth emphasizing here that the process list in the embodiment does not include all user state processes started for the target application, but at least one candidate process determined according to the preliminary filtering of the running states of the user state processes. In the embodiment, the filtering requirement can be designed on demand in the preliminary filtering link, based on which, only the user state process with a running state meeting the preset filtering requirement can be confirmed as a candidate process. In other words, the user state process with a running state not meeting the preset filtering requirement will not be included in the process list in the embodiment. In the embodiment, the process list can circumscribe a scheduling range for the kernel state, so that the user state processes not included in the process list are excluded from the scheduling range of the kernel state. In actual application, for different types of application programs, the preset filtering requirement in the embodiment can be flexibly adjusted to provide a process list adapted to different application scenario requirements. This makes the scheduling method provided in the embodiment support more flexible expansion, thereby supporting various application scenario requirements. Here, the application scenario requirement can be understood as expecting what aspects of performance balance between the user state processes after scheduling, or expecting the request end to obtain better service performance in what aspects, and the like. For example, the first exemplary application scenario requirement can be to expect the queuing delay on each user state process to be more balanced, and for example, the second exemplary application scenario requirement can be to expect the request end to use as many idle resources as possible to implement the service. More examples are not given here. The preset filtering requirement can be customized in the embodiment to adapt to different application scenario requirements.For example, for the first exemplary application scenario requirement described above, a preset filtering requirement can be defined to filter the user-mode processes with short queuing delays into the process list; and for the second exemplary application scenario requirement described above, a preset filtering requirement can also be defined to filter the user-mode processes with sufficient idle resources into the process list. It should be understood that in this embodiment, the kernel state obtains the process list corresponding to the target application, which is equivalent to indirectly perceiving the running states of the multiple user-mode processes started for the target application in the kernel state. Since the process list is filtered based on the running states of the user-mode processes, the running states of the candidate processes included in the process list all conform to the preset filtering requirement, which has already reflected the running states of the candidate processes. On this basis, with reference to FIG. 2, in step 201, the kernel state component can assign a target process for the connection establishment request from the obtained process list. In step 201, the kernel state component can perform re-selection based on the process list to finally determine the target process for the connection establishment request. In this embodiment, the selection strategy can also be designed on demand in the re-selection link. In an exemplary re-selection scheme: the kernel state component can perform hash calculation on the connection establishment request to obtain a hash value corresponding to the connection establishment request; and based on the hash value, the kernel state component can assign a target process for the connection establishment request from the process list. In the exemplary re-selection scheme, optionally, the five-tuple (source IP, source port, destination IP, destination port, and protocol number) corresponding to the connection establishment request can be subjected to hash calculation to obtain the hash value corresponding to the connection establishment request. After obtaining the hash value corresponding to the connection establishment request, the hash value and the total number of candidate processes in the process list can be subjected to modulo operation, and the candidate process pointed to by the obtained remainder is taken as the target process. Of course, in addition thereto, consistent hashing and other technologies can also be used to determine the target process from the process list based on the hash value. In the exemplary re-selection scheme, the assignment manner for assigning the target process from the process list based on the hash value is not limited, and no more examples are given herein. The hash calculation manner can more evenly schedule the connection establishment request to each candidate process to further avoid congestion problems of some user-mode processes. It is emphasized here that in actual applications, hash collision and other problems may occur during hash calculation, which may cause the target process assigned to the connection establishment request to be different from the process assigned in the case where no hash collision problem occurs. However, even if such a situation occurs, it will not cause congestion problems of some user-mode processes in the re-selection scheme.This is because, in the embodiment, the preliminary screening link is also designed. If the hash collision occurs in the re-selection link, causing the user process to be allocated too many connection requests, the user process will be excluded from the process list in the preliminary screening link because the running state does not meet the preset screening requirement, and the user process will not be allocated more connection requests temporarily, and the temporary busy state will be relieved. It can be known that, under the cooperation of the preliminary screening link and the re-selection link, the running states of the multiple user processes can be balanced, and accordingly, the connection requests can be responded to more quickly. It should be understood that the re-selection scheme described above is only exemplary, and other re-selection schemes can also be used in the embodiment, for example, a target process can be randomly selected from the process list. The re-selection scheme in the embodiment is not limited to this, and more examples are not given here. After the target process is allocated for the connection request, referring to FIG. 2, in step 202, the kernel component can schedule the connection request to the target process, so that the target process processes the connection request. For the target process, a connection can be established with the request end initiating the connection request in response to the connection request. After the target process and the request end establish the connection, the request end can continue to initiate the processing request related to the service to the target process through the connection channel between the two parties, and the target process can respond to the processing request to provide the service for the request end. For example, if the service device is a relay node in the ALB system, the request end can initiate a forwarding request to the target process after establishing the connection with the target process, and the target process can respond to the forwarding request to forward the message in the forwarding request to a server in the back-end server group, that is, the ALB service can be provided for the request end. For example, if the service device is a storage node in the storage cluster, the request end can initiate a data read / write request to the target process after establishing the connection with the target process, and the target process can respond to the data read / write request to provide the storage service for the request end. In summary, in the embodiment, a new scheduling mechanism is provided in the kernel state of the operating system for the connection request sent to the service device in the transport layer. In the kernel state, in response to receiving the connection request for the target application, the process list corresponding to the target application can be obtained, wherein the process list contains not all user processes started for the target application, but at least one candidate process determined by preliminary screening according to the running states of the user processes. In this way, through the process list, the kernel state can indirectly perceive the running states of the user processes, and the user processes whose running states do not meet the preset screening requirement can be excluded from the scheduling range as the scheduling basis.On this basis, in the kernel state, the connection establishment request can be dispatched to a target process in the process list to process the establishment request through the target process. Accordingly, in the example, the connection establishment request can be dispatched to a user process in the kernel state whose running state is more in line with the application scenario requirements, so that the running states of the user processes are more balanced, which makes the CPU utilization, memory utilization, and utilization of other resources of the user processes more balanced, and thus the performance and resource utilization of the service device can be effectively improved. FIG. 3 is a structural schematic diagram of a preferred implementation of a scheduling system according to an example embodiment of the present disclosure. Referring to the figure, in the preferred implementation, the scheduling system further includes an execution engine supporting kernel function extension. The execution engine supporting kernel function extension refers to a type of execution engine that can implement kernel function extension without modifying the kernel code. Referring to FIG. 3, the execution engine of this type can be deployed in the kernel state of the operating system in the service device. Based on this, in the preferred implementation, the technical logic of steps 200-202 described above can be written as custom function logic, and in the kernel state, the function logic of the target function for allocating user processes can be loaded as custom function logic by the execution engine of this type, i.e., custom function logic. This type of execution engine can include an extended Berkeley Packet Filter (eBPF). Therefore, in this embodiment, eBPF can be deployed in the kernel state of the operating system in the service device, and before starting to execute the scheduling method provided in this embodiment, the custom function logic written in this embodiment is injected into the target function in the kernel state component using eBPF. Of course, this is only exemplary, and the present embodiment is not limited to BPF. In addition, based on the principle of this type of execution engine, the target function in the kernel state component can be used as a loading point, and a hook (HOOK) mechanism can be used for kernel interaction to load the function logic of the target function as custom function logic. In this way, in the preferred implementation, the kernel code does not need to be intruded, that is, the original code of the kernel state component in the service device does not need to be modified, and the kernel state component can have the ability to implement the scheduling method provided in this embodiment. As mentioned earlier, the kernel state component in this embodiment is essentially a kernel program. The original code corresponding to the kernel state component includes calls to multiple functions, and these functions include the target function for allocating user processes.Accordingly, after receiving the connection establishment request, the kernel mode component can run according to the original code, and when running to the target function, the custom function logic provided in the embodiment can be automatically executed, that is, the target process is allocated for the received connection establishment request according to steps 200-202 of the embodiment. After the target function is executed, the determined target process can be transmitted to the function for performing scheduling in the kernel mode component to trigger the function to schedule the connection establishment request to the target process, so as to complete the scheduling. Accordingly, in the preferred implementation, based on the execution engine supporting the extension of the kernel function deployed in the kernel mode, the custom function logic written in the embodiment can be loaded into the kernel mode component for the target function of allocating the user mode process without intruding the kernel code, so that when running to the target function, the kernel mode component can allocate the target process for the connection establishment request more reasonably according to the scheduling method provided in the embodiment, and schedule the connection establishment request to the target process while fully considering the actual running state of the user mode process. This makes the scheduling method provided in the embodiment have better deployment convenience, and the new scheduling mechanism proposed in the embodiment can be implemented in the kernel mode without modifying the kernel code of the service device. Of course, the above implementation is optional, and in the embodiment, other implementation manners can also be used to enable the kernel mode component to execute the scheduling method provided in the embodiment. For example, the kernel mode component in the kernel mode can be directly modified to have the ability to execute the scheduling method provided in the embodiment, and the like. The embodiment is not limited thereto, and no more examples are given here. FIG. 4 is a flowchart of another scheduling method provided in an example embodiment of the disclosure. Referring to FIG. 4, the method can include: step 400, in the kernel mode of the operating system, in response to receiving a connection establishment request for a target application, reading a process list from the user mode of the operating system from the kernel mode storage space, the process list containing at least one candidate process selected from a plurality of user mode processes started for the target application, the running state of the candidate process meeting a preset screening requirement; step 401, allocating a target process for the connection establishment request from the candidate processes contained in the process list; step 402, scheduling the connection establishment request to the target process, so that the target process processes the connection establishment request. In the embodiment, steps 401 and 402 can refer to the description of steps 201 and 202 in FIG. 1, and will not be repeated here. In the embodiment, step 400 provides an optional implementation for step 200 in FIG. 1. FIG. 5 is a logic diagram corresponding to the scheduling method provided in FIG. 4.Referring to FIG. 5, in the alternative implementation, it is proposed that a process list can be constructed for the target application in the user mode of the operating system, and the process list can be updated and delivered from the user mode to the kernel mode. Based on this, referring to FIG. 4, in step 400, the kernel mode component can read the process list delivered from the user mode from the kernel mode storage space. Generally, the operating system can divide the memory of the service device into the kernel mode storage space and the user mode storage space, the kernel mode storage space can be understood as the memory space used in the kernel mode. The user mode storage space can be understood as the memory space used in the user mode. After the user mode delivers the process list constructed for the target application to the kernel mode, the process list will be stored in the kernel mode storage space. Preferably, the user mode component can invoke the execution engine supporting the extension of the kernel function provided by the scheduling system in FIG. 3, the execution engine can store the process list, in the user mode, the user mode component can invoke the execution engine deployed in the kernel mode to deliver the process list to the kernel mode storage space by using the execution engine. Here, the capability of the execution engine for delivering data between the user mode and the kernel mode is utilized, so that the process list in the embodiment can be delivered from the user mode to the kernel mode without modifying the kernel code. The process of constructing the process list for the target application in the user mode and delivering the process list to the kernel mode will be described in detail below. As mentioned earlier, the scheduling system includes the user mode component, here, the user mode component can undertake the work of constructing the process list for the target application and delivering the process list to the kernel mode. Referring to FIG. 5, in the user mode, the user mode component can obtain the state parameters provided by each of the plurality of user mode processes started for the target application, the state parameters are used to describe the running state of the user mode processes. The user mode component can also select at least one candidate process meeting the preset selection requirement from the plurality of user mode processes according to the state parameters corresponding to each of the plurality of user mode processes, to generate the process list corresponding to the target application. The user mode component can also deliver the process list to the kernel mode, so that the process list is stored in the kernel mode storage space. In an exemplary implementation scheme: the plurality of user mode processes started for the target application can actively update the state parameters corresponding to the user mode processes to the user mode storage space corresponding to the target application. Here, the update frequency is not limited, in actual application, the update frequency can be customized, for example, updated once every 5s. Based on this, referring to FIG. 5, the user mode component can read the state parameters written by the plurality of user mode processes from the user mode storage space corresponding to the target application.Of course, this is only exemplary, in this embodiment, other implementation solutions can also be used to support the user state component to obtain the state parameters provided by the plurality of user state processes respectively. For example, the user state component can actively monitor the running state of each user state process to obtain the state parameters corresponding to each user state process respectively. No more implementation solutions are exemplified here. In this embodiment, one or more state parameters in a description dimension can be selected to describe the running state of the user state process. The selected description dimension can include but is not limited to connection count or queue count, etc. The connection count can be used to represent the number of connections that have been established and have not been released, and the queue count can be used to represent the number of processing requests that have not been completed. In this embodiment, as mentioned earlier, in the preliminary screening link (i.e., the link of constructing the process list), the preset screening requirement can be flexibly adjusted according to different application scenario requirements. Therefore, the selected description dimension can be flexibly set for the preset screening requirement according to the application scenario requirement, so that the preset screening requirement is adapted to the application scenario requirement. In this way, the user state component can evaluate the running state of the plurality of user state processes of the target application from the selected description dimension, to screen out the candidate processes that meet the preset screening requirement to form the process list corresponding to the target application. It can be understood that, by reasonably selecting the description dimension, the process list constructed by the user state component for the target application can be adapted to the application scenario requirement. An exemplary screening solution in the preliminary screening link is provided as follows: in the user state, the user state component can determine any user state process in the plurality of user state processes as a candidate process that meets the preset screening requirement, if each state parameter provided by the user state process meets the screening threshold value in the corresponding description dimension; wherein the screening threshold value is calculated according to the state parameter obtained in the corresponding description dimension. For example, if the selected description dimension is the connection count and the busy count in the foregoing example, the user state component can calculate a first screening threshold value for the connection count and a second screening threshold value for the busy count according to the connection count and the busy count provided by the plurality of user state processes respectively. On this basis, the user state component can screen out the user state processes whose connection count exceeds the first screening threshold value and whose busy count exceeds the second screening threshold value from the plurality of user state processes corresponding to the target application as candidate processes. Exemplarily, the screening threshold value can be a type of value such as an average value or a median value, which is not limited here.Further, an optional implementation logic is provided for the screening concept in the exemplary screening scheme: if the selected description dimension is multiple, multiple rounds of screening operations are sequentially started to sequentially use the multiple description dimensions; in the first round of screening operation, a first screening threshold is calculated for a first description dimension according to state parameters provided by the multiple user state processes under the first description dimension in the first round of screening operation; if the state parameter of any user state process under the first description dimension meets the first screening threshold, the user state process is added to a screening list corresponding to the first round of screening operation; in a non-first round of screening operation, a second screening threshold is calculated for a second description dimension according to state parameters provided by user state processes contained in a screening list corresponding to a previous round of screening operation under the second description dimension in the non-first round of screening operation; if the state parameter of any user state process under the second description dimension meets the second screening threshold, the user state process is added to a screening list corresponding to the non-first round of screening operation; user state processes in a screening list generated after the last round of screening operation are determined as candidate processes. Understandably, in the optional implementation logic, the screening list can be narrowed down round by round, and user state processes contained in the screening list generated after the last round of screening operation meet the screening threshold under the corresponding description dimension for each state parameter. Accordingly, the screening list generated after the last round of screening operation can be used as the process list corresponding to the target application in the present embodiment. For the optional implementation logic, an exemplary engineering implementation manner can be: in user state, a bitmap is defined, and multiple bits in the bitmap correspond to multiple user state processes one by one; for the first round of screening operation, the value of the bit corresponding to the user state process meeting the first screening threshold in the bitmap is updated to a first value to represent that the user state process is added to the screening list corresponding to the first round of screening operation; for the non-first round of screening operation, the value of the bit corresponding to the user state process meeting the first screening threshold in the bitmap is intersected with the first value; if the value of the bit after intersection is still the first value, it represents that the user state process is added to the screening list corresponding to the non-first round of screening operation. Understandably, in the engineering implementation manner, a bitmap is maintained for the target application. Here, bitmap is the abbreviation of bitmap, and bitmap means that each bit is used to store a certain state. The bitmap can contain multiple bits, and the value of each bit can be 0 or 1 to identify different states of the object. In the engineering implementation manner, the user state process is taken as the object pointed by the bit in the bitmap, and whether the user state process is retained in the current round of screening operation is represented by the value of the bit.In the engineering implementation, the first value is l. oThus, by performing the intersection operation on the bits, if the value of any bit is still 1 after the last round of screening operations is completed, it can be determined that each state parameter provided by the user-mode process indicated by the bit meets the screening threshold under the corresponding description dimension, and the user-mode process can be added to the process list as a candidate process. In this way, the bitmap can represent the candidate processes that should be included in the process list of the target application. On this basis, the user-mode component can provide the bitmap to an execution engine in the kernel mode for supporting the extension of kernel functions. The execution engine can load the bitmap into the kernel-mode storage space through a mapping mechanism supported by the execution engine. An exemplary mapping mechanism can be a key-value mechanism, in which the value in the mapping mechanism corresponds to the bitmap. It should be noted that the above implementation manner is only exemplary, and other implementation manners can also be used to record the user-mode processes retained in each round. For example, an array for recording the respective numbers of the user-mode processes retained in each round can be set for each round of screening operations, so as to record the user-mode processes retained in each round through the array. No more examples are given here. It should be noted that the implementation logic provided for the above screening concept is also exemplary, and other implementation logics can also be used to determine whether each state parameter provided by the user-mode process meets the screening threshold under the corresponding description dimension. For example, the screening threshold for each description dimension can be calculated based on the state parameters provided by the user-mode processes, and then it can be determined whether each state parameter provided by each user-mode process meets the screening threshold under the corresponding description dimension. If yes, the user-mode process can be added to the process list. That is, the evaluation range is not gradually narrowed as in the implementation logic provided for the above screening concept, but each user-mode process is evaluated with a uniform and unchanged screening threshold under each description dimension. No more examples are given here. It should be noted that the screening scheme provided for the preliminary screening link is also only exemplary, and other exemplary screening schemes can also be used to implement the screening of the process list for the target application by the user-mode component. For example, if any state parameter provided by the user-mode process meets the screening threshold under the corresponding description dimension, the user-mode process can be added to the process list, that is, each state parameter provided by the user-mode process does not need to meet the corresponding screening threshold as in the above exemplary screening scheme. No more examples are given here. In summary, with reference to FIG. 5, in this embodiment, the user-mode component can be responsible for constructing the process list for the target application and delivering the process list to the kernel mode.Further, the process of constructing the process list by the user mode component is independent of the scheduling process in the kernel mode component, and the user mode component can update the process list corresponding to the target application in a timely manner and deliver it to the kernel mode in a timely manner according to a self-defined frequency, so as to ensure the freshness of the process list used in the kernel mode and improve the scheduling effect in the kernel mode. Of course, in addition to the deployment mode of deploying the process list construction link in the user mode as shown in FIG. 4 and FIG. 5, in the embodiment, other deployment modes can also be used to deploy the process list construction link. For example, the sub-link of obtaining the state parameters provided by the plurality of user mode components can be deployed in the user mode, and the user mode component is responsible for delivering the obtained state parameters to the kernel mode, and the sub-link of filtering the process list for the target application based on the state parameters can be deployed in the kernel mode. No more examples of deployment modes are given here, and the embodiment does not limit the deployment mode. The inventor found in the research process that the cost of extending the function of the operating system in the user mode is relatively low, and therefore, deploying the process list construction link that needs to adapt to the diversity of application scene requirements in the user mode can better support the flexible extension of the process list construction link, so that the scheduling method provided in the embodiment can adapt to different application scene requirements more quickly. It should be noted that some of the processes described in the above embodiments and the accompanying drawings include a plurality of operations that occur in a specific order, but it should be clearly understood that these operations can be executed or performed in parallel or in a different order from the order in which they appear in this text. The serial numbers of the operations, such as 201, 202, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes can include more or fewer operations, and the operations can be executed in sequence or in parallel. It should be noted that the "first", "second", etc. in this text are used to distinguish different filtering thresholds, filtering operations, etc., and do not represent the order of precedence, nor do they limit that the "first" and "second" are different types. FIG. 6 is a structural schematic diagram of a service device provided by another exemplary embodiment of the disclosure. As shown in FIG. 6, the service device can include a memory 60, a processor 61, and a communication component 62. The memory 60 is used to store one or more computer instructions issued by the operating system of the service device, and the processor 61 is coupled with the memory 60 and the communication component 62, and is used to execute the computer instructions in the memory 60.In the embodiment, the operating system comprises a kernel mode and a user mode, the kernel mode component runs in the kernel mode and the user mode component runs in the user mode, the kernel mode component and the user mode component send one or more computer instructions to the memory 60 according to the scheduling scheme provided by the embodiment, so that the processor 61 performs the following steps: in the kernel mode of the operating system, in response to receiving a connection request for a target application, obtaining a process list corresponding to the target application, the process list comprising at least one candidate process selected from a plurality of user mode processes started for the target application, and a running state of the candidate process meeting a preset filtering requirement; allocating a target process for the connection request from the candidate process included in the process list; and scheduling the connection request to the target process, so that the target process processes the connection request. In an optional embodiment, when the processor 61, in the kernel mode of the operating system, in response to receiving a connection request for a target application, obtains a process list corresponding to the target application, the processor 61 can be specifically configured to: in the kernel mode of the operating system, in response to receiving a connection request for a target application, reading the process list from the user mode of the operating system from the kernel mode storage space. In an optional embodiment, the processor 61 can be further configured to: in the user mode of the operating system, obtaining a state parameter for describing a running state provided by each of the plurality of user mode processes; selecting at least one candidate process meeting the preset filtering requirement from the plurality of user mode processes according to the state parameter corresponding to each of the plurality of user mode processes, to generate the process list; and delivering the process list to the kernel mode storage space. In an optional embodiment, when the processor 61, in the user mode of the operating system, obtains a state parameter for describing a running state provided by each of the plurality of user mode processes, the processor 61 can be specifically configured to: in the user mode of the operating system, reading the state parameter written by the plurality of user mode processes from the user mode storage space corresponding to the target application. In an optional embodiment, when the processor 61 selects at least one candidate process meeting the preset filtering requirement from the plurality of user mode processes, the processor 61 can be specifically configured to: for any user mode process in the plurality of user mode processes, if each state parameter provided by the user mode process meets a filtering threshold in a corresponding description dimension, the user mode process is determined to be a candidate process meeting the preset filtering requirement; wherein the filtering threshold is calculated according to the obtained state parameter in the corresponding description dimension.In an optional embodiment, if each state parameter provided by the user-mode process meets the filtering threshold in the corresponding description dimension, the processor 61 can be specifically configured to: if a plurality of description dimensions are used, sequentially start a plurality of rounds of filtering operations to sequentially use the plurality of description dimensions; in a first round of filtering operation, calculate a first filtering threshold for a first description dimension used in the first round of filtering operation according to the state parameters provided by the plurality of user-mode processes in the first description dimension; if the state parameter of any user-mode process in the plurality of user-mode processes in the first description dimension meets the first filtering threshold, add the user-mode process to a filtering list corresponding to the first round of filtering operation; in a non-first round of filtering operation, calculate a second filtering threshold for a second description dimension used in the non-first round of filtering operation according to the state parameters provided by the user-mode processes included in a filtering list corresponding to a previous round of filtering operation in the second description dimension; if the state parameter of any user-mode process in the filtering list corresponding to the previous round of filtering operation in the second description dimension meets the second filtering threshold, add the user-mode process to a filtering list corresponding to the non-first round of filtering operation; and determine the user-mode processes in the filtering list generated after the last round of filtering operation as the candidate processes. In an optional embodiment, the processor 61 can be further configured to: define a bitmap in the user state of the operating system, a plurality of bits in the bitmap corresponding to the plurality of user-mode processes one by one; for the first round of filtering operation, update the value of the bit corresponding to the user-mode process meeting the first filtering threshold in the bitmap to a first value to represent that the user-mode process is added to the filtering list corresponding to the first round of filtering operation; and for the non-first round of filtering operation, perform an intersection operation between the value of the bit corresponding to the user-mode process meeting the first filtering threshold in the bitmap and the first value; if the value of the bit after the intersection operation is still the first value, it represents that the user-mode process is added to the filtering list corresponding to the non-first round of filtering operation. In an optional embodiment, the state parameter includes a connection count and / or a queue count, the connection count is used to represent the number of connections that have been established and have not been released, and the queue count is used to represent the number of processing requests that have not been completed. In an optional embodiment, when the processor 61 delivers the process list to the kernel state storage space, the processor 61 can be specifically configured to: in the user state of the operating system, call an execution engine supporting a kernel function extension deployed in the kernel state to deliver the process list to the kernel state storage space by using the execution engine.In an optional embodiment, when the processor 61 allocates the target process for the connection establishment request from the process list, the processor 61 can be specifically configured to: perform hash calculation on the connection establishment request in the kernel state of the operating system to obtain a hash value corresponding to the connection establishment request; and allocate the target process for the connection establishment request from the process list based on the hash value. In an optional embodiment, the processor 61 can be further configured to: load function logic of a target function for allocating a user state process as custom function logic by using an execution engine supporting kernel function extension in the kernel state; and complete scheduling of the connection establishment request according to the custom function logic when the target function is run in response to the connection establishment request; and the custom function logic includes the operation of obtaining the process list corresponding to the target application and subsequent operations. In an optional embodiment, the execution engine includes an extended Berkeley Packet Filter (eBPF). As shown in FIG. 6, the service device further includes a power component 63 and other components. Only some components are shown in FIG. 6, which does not mean that the service device only includes the components shown in FIG. 6. It is worth mentioning that the technical details in the above embodiments of the service device can refer to the related descriptions of the user state component and the kernel state component included in the scheduling system in the foregoing system embodiments and the method embodiments, and will not be described here again in order to save space, but this should not cause loss of the protection scope of the disclosure. Accordingly, the embodiments of the disclosure further provide a computer readable storage medium storing a computer program, and the computer program is executed to implement each step in the above method embodiments. Accordingly, the embodiments of the disclosure further provide a computer program product, and the computer program included in the computer program product is executed to implement each step in the above method embodiments. The memory in FIG. 6 is used to store a computer program and can be configured to store other various data to support operations on a computing platform. Examples of these data include instructions of any application program or method for operating on a computing platform, contact data, phonebook data, messages, images, videos, and the like. The memory can be realized by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The communication component in FIG. 6 is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices.The device in which the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G, or the like, or a combination thereof. In one example embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In one example embodiment, the communication component further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies. The power component in FIG. 6, provides power to various components of the device in which the power component is located. The power component can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device in which the power component is located. As will be appreciated by one skilled in the art, embodiments of the present disclosure can be provided as a method, system, or computer program product. Accordingly, the present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer program instructions. The present disclosure is described in reference to flow diagrams and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flow diagrams and / or block diagrams block or blocks.These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable devices to generate a computer-implemented process, so that the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one or more flows in the flowchart and / or one or more blocks in the block diagram. It should also be noted that the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of another identical element in the process, method, article or device that includes the element. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal. The above only describes the embodiments of the present disclosure and does not limit the present disclosure. The present disclosure can have various changes and modifications for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure. Industrial applicability In the embodiments of the present disclosure, a new scheduling mechanism is provided in the kernel state of the operating system of the service device for the connection request in the transport layer. In the kernel state of the operating system, in response to receiving a connection request for a target application, a process list corresponding to the target application can be obtained, wherein the process list contains not all user state processes started for the target application, but at least one candidate process determined by preliminary screening according to the running state of the user state processes. In this way, through the process list, the kernel state can indirectly perceive the running state of each user state process as a scheduling basis, and the user state process whose running state does not meet the preset screening requirement can be excluded from the scheduling range. On this basis, in the kernel state, the connection request can be scheduled to a target process in the process list, so as to process the connection request through the target process.Therefore, in the embodiments of the present disclosure, the connection establishment request can be scheduled to a user mode process in a running state in the kernel mode, which is more in line with the application scenario requirements, so that the running state of each user mode process is more balanced, and the performance of the service device is improved.
Claims
CLAIM 1. A scheduling method, applicable to an operating system of a service device, the operating system comprising a kernel state and a user state, a target application running in the user state of the operating system, the method comprising: In a kernel state of the operating system, in response to receiving a connection establishment request for the target application, obtaining a process list corresponding to the target application, the process list containing at least one candidate process selected from a plurality of user state processes started for the target application, a running state of the candidate process meeting a preset filtering requirement; from the candidate processes contained in the process list, assigning a target process for the connection establishment request; scheduling the connection establishment request to the target process, so that the target process processes the connection establishment request.
2. The method of claim 1, wherein, In response to receiving a connection establishment request for a target application, obtaining a process list corresponding to the target application, comprising: in response to receiving a connection establishment request for a target application, reading from a kernel state storage space a process list delivered from a user state of the operating system.
3. The method according to claim 2, wherein, Also includes: In a user state of the operating system, obtaining state parameters respectively provided by the plurality of user state processes for describing a running state; According to the state parameters respectively corresponding to the plurality of user state processes, selecting at least one candidate process meeting a preset filtering requirement from the plurality of user state processes to generate the process list; delivering the process list to a kernel state storage space.
4. The method of claim 3, wherein, In a user state of the operating system, obtaining state parameters respectively provided by the plurality of user state processes for describing a running state, comprising: in a user state of the operating system, reading from a user state storage space corresponding to the target application, state parameters written by the plurality of user state processes.
5. The method of claim 3, wherein, Selecting at least one candidate process meeting the preset filtering requirement from the plurality of user state processes, comprising: for any user state process in the plurality of user state processes, if each state parameter provided by the user state process meets a filtering threshold value under a corresponding description dimension, the user state process is determined to be a candidate process meeting the preset filtering requirement; wherein the filtering threshold value is calculated according to the obtained state parameter under the corresponding description dimension.
6. The method of claim 5, wherein, If each state parameter provided by the user state process meets the filtering threshold value under the corresponding description dimension, the user state process is determined to be a candidate process meeting the preset filtering requirement, comprising: if the used description dimension is multiple, a plurality of rounds of filtering operations are sequentially started to sequentially use the multiple description dimensions; In the first round of screening operation, a first screening threshold is calculated for a first description dimension used in the first round of screening operation according to state parameters provided by the user state processes in the first description dimension; if the state parameters of any user state process in the first description dimension meet the first screening threshold, the user state process is added to a screening list corresponding to the first round of screening operation; in a non-first round of screening operation, a second screening threshold is calculated for a second description dimension used in the non-first round of screening operation according to state parameters provided by user state processes included in a screening list corresponding to a previous round of screening operation in the second description dimension; if the state parameters of any user state process in the screening list corresponding to the previous round of screening operation meet the second screening threshold, the user state process is added to a screening list corresponding to the non-first round of screening operation; and user state processes in a screening list generated after a last round of screening operation are determined as the candidate processes.
7. The method according to claim 6, wherein, Further comprising: In the user state of the operating system, a bitmap is defined, and a plurality of bits in the bitmap correspond to the plurality of user state processes; For the first round of screening operation, the value of the bit corresponding to the user state process meeting the first screening threshold in the bitmap is updated to a first value to represent that the user state process is added to the screening list corresponding to the first round of screening operation; for the non-first round of screening operation, the value of the bit corresponding to the user state process meeting the first screening threshold in the bitmap is intersected with the first value; if the value of the bit after the intersection is still the first value, it represents that the user state process is added to the screening list corresponding to the non-first round of screening operation.
8. The method according to any one of claims 1 to 7, wherein, The state parameters include a connection count and / or a queue count, the connection count is used to represent the number of established and not released connections, and the queue count is used to represent the number of not processed processing requests.
9. The method of claim 3, wherein, The process list is transmitted to a kernel state storage space, including: in the user state of the operating system, an execution engine supporting kernel function extension deployed in the kernel state is called to transmit the process list to the kernel state storage space by using the execution engine.
10. The method according to claim 1, wherein, A target process is assigned to the connection establishment request from the candidate processes included in the process list, including: in the kernel state of the operating system, the connection establishment request is hashed to obtain a hash value corresponding to the connection establishment request; and based on the hash value, the target process is assigned to the connection establishment request from the candidate processes included in the process list.
11. The method of claim 1, wherein, Further comprising: In the kernel state of the operating system, function logic of a target function for assigning user state processes is loaded as custom function logic by using the execution engine supporting kernel function extension; 19. In the case of running to the target function in response to the connection establishment request, the scheduling of the connection establishment request is completed according to the custom function logic; the custom function logic includes the operation of obtaining the process list corresponding to the target application and subsequent operations.
12. The method according to claim 9 or 11, wherein, The execution engine includes an extended Berkeley packet filter (eBPFo 13. A scheduling system deployed in an operating system of a service device, the scheduling system comprising a kernel mode component and a user mode component, the kernel mode component running in a kernel mode of the operating system, the user mode component running in a user mode of the operating system, based on the kernel mode component and the user mode component, the scheduling system being configured to perform the scheduling method of any one of claims 1-2.
14. A service device comprising a memory, a processor and a communication component; the memory being configured to store one or more computer instructions issued by an operating system; the processor being coupled to the memory and the communication component, and being configured to execute the one or more computer instructions for performing the scheduling method of any one of claims 1-12.
15. A computer-readable storage medium storing a computer program, which, when executed by one or more processors, causes the one or more processors to perform the scheduling method of any one of claims 1-12.
16. A computer program product comprising a computer program, which, when executed by one or more processors, causes the one or more processors to perform the scheduling method of any one of claims 1-12.
Citation Information
Patent Citations
Process scheduling method and apparatus and host device
CN107797848A
Method and device for acquiring process calling information, electronic equipment and storage medium
CN116107837A
Load balancing processing method and device, storage medium and electronic device
CN117768394A
Multi-tenant offloaded protocol processing for virtual routers
US20220321471A1
Cited By
An eBPF-based multi-task network traffic isolation collection method
CN122394968A