WO2023165318A1 - Resource processing system and method - Google Patents

Resource processing system and method Download PDF

Info

Publication number
WO2023165318A1
WO2023165318A1 PCT/CN2023/075638 CN2023075638W WO2023165318A1 WO 2023165318 A1 WO2023165318 A1 WO 2023165318A1 CN 2023075638 W CN2023075638 W CN 2023075638W WO 2023165318 A1 WO2023165318 A1 WO 2023165318A1
Authority
WO
WIPO (PCT)
Prior art keywords
thread
transaction
information
module
resource
Prior art date
Application number
PCT/CN2023/075638
Other languages
French (fr)
Chinese (zh)
Inventor
张晋
Original Assignee
阿里巴巴(中国)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴(中国)有限公司 filed Critical 阿里巴巴(中国)有限公司
Publication of WO2023165318A1 publication Critical patent/WO2023165318A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of this specification relate to the technical field of resource scheduling, and in particular, to a resource processing system and method.
  • cloud computing is applied in more and more scenarios. It can not only support high-concurrency services, but also make full use of resources to complete transaction processing operations. It has become a widely used technology in existing technologies. of a resource.
  • the CPU task scheduler needs to implement resource scheduling or load balancing, it needs to continuously interact with each CPU.
  • scheduling decisions between different tasks may depend on each other; for example, enable On a machine with hyperthreading enabled, the virtual machine CPUs corresponding to two different virtual machines cannot run two different hyperthreads on the same machine CPU at the same time. If this rule is violated, the virtual machine will They can attack each other; it will not only consume a lot of scheduling resources, but also affect the security of tasks, so an effective solution is urgently needed to solve the above problems.
  • the embodiment of this specification provides a resource processing system.
  • One or more embodiments of this specification relate to two resource processing methods, two resource processing devices, a computing device, a computer-readable storage medium and a computer program, so as to solve the technical defects existing in the prior art .
  • a resource processing system including:
  • the resource coordination module is configured to obtain pending transactions by detecting the shared data structure; determine at least two thread modules associated with the pending transactions, and send a transaction processing request to each thread module;
  • Each thread module is configured to determine thread state information based on the transaction processing request, and feed back the thread state information to the resource coordination module;
  • the resource coordination module is further configured to determine transaction processing information corresponding to the transaction to be processed according to the thread state information of each thread module, and send the transaction processing information to each thread module;
  • Each thread module is further configured to process the transaction to be processed based on the transaction processing information; wherein, the physical resources to which each thread module belongs are the same.
  • a resource processing method applied to a resource coordination module including:
  • another resource processing method is provided, which is applied to the thread module, including:
  • a resource processing device which is applied to a resource coordination module, including:
  • a detection transaction unit configured to obtain pending transactions by detecting a shared data structure
  • determining a thread unit configured to determine at least two thread modules associated with the transaction to be processed, and send a transaction processing request to each thread module;
  • a receiving information unit configured to receive thread state information fed back by each thread module for the transaction processing request
  • the sending information unit is configured to determine transaction processing information corresponding to the transaction to be processed based on the thread state information, and send the transaction processing information to each thread module.
  • a resource processing device applied to a thread module including:
  • a receiving request unit configured to receive a transaction processing request sent by the resource coordination module for pending transactions
  • a determining information unit configured to determine thread state information according to the transaction processing request, and feed back the thread state information to the resource coordination module;
  • An information receiving unit configured to receive transaction processing information fed back by the resource coordination module for the thread state information
  • the transaction processing unit is configured to process the transaction to be processed based on the transaction processing information.
  • a computing device including:
  • the memory is used to store computer-executable instructions
  • the processor is used to implement the steps of the above resource processing method when executing the computer-executable instructions.
  • a computer-readable storage medium which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the resource processing method above are implemented.
  • a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the resource processing method above.
  • the resource coordination module when the resource coordination module obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, the pending transaction can be determined at this time At least two thread modules associated with the transaction, and the physical resources of each thread module are the same; then send a transaction processing request to each thread module, each thread module can determine the thread status information according to the transaction processing request, and feed it back to Resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to each thread module, and finally each thread module can be processed according to the transaction processing information Transaction processing operations.
  • the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, thereby improving transaction processing security and improving transaction processing efficiency to reduce resource consumption costs.
  • FIG. 1 is a schematic structural diagram of a resource processing system provided by an embodiment of this specification
  • FIG. 2 is a flowchart of a resource processing method provided by an embodiment of this specification
  • Fig. 3 is a flow chart of another resource processing method provided by an embodiment of this specification.
  • Fig. 4 is a schematic structural diagram of a resource processing device provided by an embodiment of this specification.
  • Fig. 5 is a schematic structural diagram of another resource processing device provided by an embodiment of this specification.
  • Fig. 6 is a structural block diagram of a computing device provided by an embodiment of this specification.
  • first, second, etc. may be used to describe various information in one or more embodiments of the present specification, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another.
  • the first may also be referred to as the second, and similarly, the second may also be referred to as the first without departing from the scope of one or more embodiments of the present specification.
  • the word "if” as used herein may be interpreted as “at” or "when” or "in response to a determination.”
  • CPU Central Processing Unit, processor
  • Hyper-Threading A technology that simulates multiple logical threads on the CPU, simulating a physical chip of a multi-threaded processor into two logical CPUs, so that a single processor can use thread-level parallel computing, and is compatible with multi-threaded operating systems and software. Hyper-Threading technology makes full use of idle CPU resources to get more work done in the same amount of time.
  • VM Virtual Machine, virtual machine
  • CMOS complementary metal-oxide-semiconductor
  • CMOS complementary metal-oxide-semiconductor
  • the virtual machine can be operated like a physical machine.
  • vCPU A virtual processor in a computer; a CPU in a virtual machine as opposed to a physical CPU.
  • Cloud Computing is a kind of distributed computing, which refers to decomposing a huge data computing processing program into countless small programs through the network "cloud”, and then processing and analyzing it through a system composed of multiple servers These applets get the results and return them to the user.
  • a resource processing system is provided. This specification simultaneously involves two resource processing methods, two resource processing devices, a computing device, a computer-readable storage medium, and a computer program. The following The detailed description will be given in detail one by one in the embodiment.
  • the task scheduler of the CPU needs to continuously answer two questions, one is which CPU the task should run on, and each CPU should run a task at the next moment.
  • each task is independent of each other.
  • scheduling decisions between different tasks may depend on each other. For example, on an x86-64 machine with hyperthreading enabled, vCPUs corresponding to two different VMs cannot run two different hyperthreads on the same CPU at the same time; this is because tasks of different hyperthreads on the same CPU, Share some resources on the CPU pipeline and cache. If this rule is violated, a malicious VM can exploit the vulnerability to attack another VM.
  • the schedulers in the prior art are all based on the setting that the scheduling decisions between tasks are independent of each other; although they can achieve the effect of scheduling, they cannot solve the above problems, such as the scheduler CFS used by the Linux kernel .
  • CFS is a general-purpose scheduler, and its target application is all Linux processes and threads. Since the current mainstream virtualization solution uses QEMU-KVM, and in QEMU-KVM, each vCPU is a Linux task, so it is feasible to use CFS to schedule vCPUs. However, CFS does not distinguish between vCPUs and common tasks, so CFS cannot meet the unique requirements of virtualization environments.
  • the improved version of CFS adds the requirements of the cloud environment. For example, the improved version of CFS can first schedule a vCPU on a certain hyperthread, and then notify the associated vCPU to schedule accordingly through some mechanism.
  • the resource coordination module when the resource coordination module obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it is possible to determine the pending transaction association at this time At least two thread modules, and the physical resources of each thread module are the same; then send a transaction processing request to each thread module, each thread module can determine the thread status information according to the transaction processing request, and feed it back to the resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to each thread module, and finally each thread module can perform transaction processing according to the transaction processing information Processing operations.
  • the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, And in the process of processing, a unified decision will be adopted to ensure that the transaction to be processed is either executed by all threads or not executed by all threads, so as to improve the security of transaction processing and improve the efficiency of transaction processing to reduce resource consumption costs.
  • FIG. 1 shows a schematic structural diagram of a resource processing system provided according to an embodiment of this specification.
  • the resource processing system 100 includes a resource coordination module 110 and at least two thread modules 120.
  • the thread modules 120 are thread module 1 and thread module 1 respectively.
  • Module 2 ...Thread module n, where n is a positive integer, and n ⁇ 1.
  • the resource processing system 100 includes:
  • the resource coordination module 100 is configured to obtain the transaction to be processed by detecting the shared data structure; determine at least two thread modules associated with the transaction to be processed, and send a transaction processing request to each thread module;
  • Each thread module 120 is configured to determine thread state information based on the transaction processing request, and feed back the thread state information to the resource coordination module;
  • the resource coordination module 110 is further configured to determine transaction processing information corresponding to the transaction to be processed according to the thread state information of each thread module, and send the transaction processing information to each thread module;
  • Each thread module 120 is further configured to process the transaction to be processed based on the transaction processing information; wherein, the physical resources to which each thread module belongs are the same.
  • the resource coordination module specifically refers to the module responsible for coordinating different hyperthreads in the cloud computing environment, that is, the CPU with hyperthreading enabled; correspondingly, the thread module specifically refers to the module corresponding to the hyperthread enabled by the resource coordination module, which is used to run The vCPU of the virtual machine realizes the processing of the transaction to be processed. That is to say, the resource coordination module is a CPU with hyperthreading enabled; correspondingly, each thread module is a hyperthread running a virtual machine.
  • the shared data structure specifically refers to a queue, an array, or a binary tree for storing transactions to be processed.
  • the transactions to be processed are specifically Refers to the transactions that need to be executed in the cloud computing environment, that is, the transactions that the resource user needs to use cloud computing resources to run, and the corresponding project services are realized by running the transactions.
  • the transaction processing request specifically refers to the request sent by each thread module to process the transaction to be processed. Each thread module will respond to the resource scheduler to schedule vCPUs corresponding to different virtual machines in the same CPU according to the transaction processing request. The vCPU corresponding to the machine runs pending transactions.
  • the physical resources to which each thread module belongs are the same, that is, the hyperthreads executing pending transactions belong to the same CPU, and the hyperthreads scheduled by each hyperthread belong to the same CPU.
  • the thread status information specifically refers to the status information of whether the thread module can process pending transactions at the current moment; correspondingly, the transaction processing information specifically refers to the information determined by the resource coordination module according to the thread status information fed back by each thread module, and is used for Determine whether hyper-threading is required to call resources to process pending transactions at the same time, which needs to maintain consistency, that is, when all the thread status information corresponding to hyper-threading is in the state of executing pending transactions, it is determined that resources need to be scheduled to process pending transactions; Or if the thread status information corresponding to any hyperthread is the unexecutable pending transaction state, it is determined that the pending transaction is not processed at the current moment, that is, when resource scheduling or load balancing is ensured, hyperthreads under the same CPU can be executed simultaneously or Not at the same time.
  • processing pending transactions means executing pending transactions through vCPU resources to realize front-end project operation.
  • the resource coordination module can first determine the pending transaction by detecting the shared data structure, and The detection result determines that the resource scheduler needs to execute the pending transaction, so in order to ensure the completion of the pending transaction and improve resource utilization, at least two hyperthreads corresponding to the pending transaction can be determined first, and the determined hyperthread belongs to The same CPU then sends a transaction processing request corresponding to the pending transaction to each hyperthread, that is, each hyperthread needs to execute the pending transaction at the same time.
  • each hyperthread After each hyperthread receives the transaction processing request corresponding to the transaction to be processed, considering that each hyperthread belongs to the same CPU and corresponds to a different virtual machine, each hyperthread may be running other transactions, in order to ensure the security of transaction execution , each hyperthread can feed back thread state information to the resource coordination module according to the state information at the current moment.
  • the resource coordination module can create transaction processing information according to the state of each hyper-thread to decide whether to run the pending transaction through the hyper-thread scheduled at the current moment; that is, to ensure simultaneous execution or simultaneous Do not execute; then send transaction processing information to each hyperthread, and finally the hyperthread can process the transaction to be processed according to the transaction processing information to complete the operation corresponding to the transaction processing information.
  • This embodiment uses load balancing as an example to illustrate the above resource processing method; for example, VM0 and VM1 are created under the same CPU, where VM0 corresponds to vCPU0, VM1 corresponds to vCPU1, and the hyper-threading mode is enabled for this CPU, so vCPU0 will It runs on hyperthread HT-x, and vCPU1 runs on hyperthread HT-y; based on this, according to the scheduling result of the resource scheduler, it is determined that vCPU0 and vCPU1 need to run pending transactions, and hyperthread HT-x and hyperthread HT-y is in the running state; at this time, it can be determined according to the scheduling result that the hyperthread HT-s needs to be used to run vCPU0.
  • the hyperthreading under the CPU runs the corresponding resources to complete the execution of pending transactions.
  • the scheduler of the hyperthread HT-s initiates to the CPU pending transactions in the form of vCPU0->HT-s, and vCPU1->HT-t, and the CPU determines that the hyperthread HT-s and HT-t will run To process a transaction, send a transaction processing request to each hyperthread. Since HT-s decides to run vCPU0, the CPU can default the thread status information fed back by hyperthread HT-s as OK, and then it will receive hyperthread HT-t feedback at this time. thread state information.
  • both the thread state information of the hyperthread HT-t and the thread state information of the hyperthread HT-s are OK, it means that the transaction to be processed can be executed, and the CPU will feed back to the hyperthread HT-s and HT-t respectively According to transaction execution information, hyper-threads HT-s and HT-t will respectively schedule resources vCPU0 and vCPU1 to process pending transactions according to transaction execution information.
  • the thread state information of hyper-thread HT-t is inconsistent with the thread state information of hyper-thread HT-s, it means that the thread state information of hyper-thread HT-t is Abort, that is, hyper-thread HT-t cannot be executed at the current moment to be processed transaction, the CPU will feed back the transaction interruption information to the hyper-threads HT-s and HT-t respectively, and the hyper-threads HT-s and HT-t will give up executing the pending transaction according to the transaction interruption information, that is, the resources vCPU0 and vCPU1 will not be scheduled , the hyper-threads HT-x and HT-y continue to run the resources vCPU0 and vCPU1 to implement the processing operation of the transaction to be processed.
  • the resource coordination module when the resource coordination module obtains pending transactions by detecting shared data structures, in order to improve transaction processing efficiency and reduce resource consumption costs, at least two thread modules associated with pending transactions can be determined at this time, and each The physical resources to which the thread modules belong are the same; then send transaction processing requests to each thread module separately, and each thread module can determine the thread status information according to the transaction processing requests, and feed it back to the resource coordination module; the resource coordination module can integrate each The thread state information of the thread module determines the transaction processing information of the transaction to be processed, and feeds back the transaction processing information to each thread module, and finally each thread module can treat it according to the transaction processing information Manage transactions for processing operations.
  • the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, thereby improving transaction processing security and improving transaction processing efficiency to reduce resource consumption costs.
  • the resource processing system also includes a resource scheduler; the resource scheduler is configured to receive the transaction to be processed; configure resources to be used for the transaction to be processed, and create a resource according to the configuration result Resource scheduling information; writing the pending transaction carrying the resource scheduling information into the shared data structure.
  • the resource scheduler specifically refers to a processor that schedules runnable resources in order to improve resource utilization in a cloud computing environment, and is used to implement resource scheduling and load balancing; correspondingly, the resource to be used specifically refers to the resource scheduler According to the resource operation status fed back by each node, the available resources allocated for the transaction to be processed; correspondingly, the resource scheduling information specifically refers to the information created by the resources to be used after the allocation of the transaction to be processed is completed, and is used to inform the resource coordination module that it needs to use What are the resources for subsequent implementation of pending transaction processing.
  • the resource scheduler when the resource scheduler determines that pending transactions need to be executed, it can first specify the resources to be used for the pending transactions, that is, specify a batch of scheduling or a batch of load balancing decisions, and create resources according to the configuration results of the resources to be used Scheduling information, write pending transactions carrying resource scheduling information into the shared data structure, so that the resource coordination module that implements subsequent docking with the resource scheduler can determine the pending transactions that need to be executed through the shared data structure, and complete subsequent processing operations.
  • resource scheduling information can be created through the resource scheduler first, and written into the shared data structure, so that the subsequent resource coordination module can start pending transactions by detecting the shared data module.
  • the processing mechanism completes the processing of pending transactions.
  • the resource coordination module After writing the pending transaction carrying resource scheduling information into the shared data structure, the resource coordination module will determine the pending transaction by detecting the shared data structure, and in the process, since the pending transaction carries the resource scheduling information Therefore, when the resource coordination module determines the thread, it can be completed in combination with the resource scheduling information.
  • the resource coordination module is further configured to detect the shared data structure and obtain the The pending transaction of scheduling information; determining the at least two thread modules associated with the pending transaction according to the resource scheduling information; A module sends the transaction request.
  • the resource scheduler when the resource scheduler writes the pending transaction carrying resource read information into the shared data structure, it indicates that the decision information of the resource to be used allocated for the pending transaction can be determined by detecting the shared data structure, then this The resource coordination module can detect the shared data structure to obtain pending transactions carrying resource scheduling information, and then the resource coordination module can determine at least two hyperthreads for executing the pending transactions according to the resource scheduling information.
  • the resource coordination module determines that the resource scheduler needs to execute the pending transaction, it indicates that the pending transaction is in the pending state, and can send a transaction processing request corresponding to the pending transaction to each hyperthread, so that each subsequent hyperthread can Feedback transaction processing information based on specific thread state information.
  • a thread module belonging to the same physical resource may be selected as a thread module executing a transaction to be processed; the resource coordination module is further configured to select a transaction thread module associated with the transaction to be processed according to the resource scheduling information, and determine the The physical resource to which the transaction thread module belongs; select at least one associated thread module associated with the transaction thread module in the physical resource; form the pending processing based on the transaction thread module and the at least one associated thread module The at least two thread modules associated with the transaction.
  • the transaction thread module specifically refers to the hyperthread that can process the transaction to be processed among the idle hyperthreads; correspondingly, the physical resource specifically refers to the CPU to which the thread module belongs; correspondingly, the associated thread module specifically refers to the hyperthread associated with the transaction thread
  • the module belongs to other hyperthreads of the same physical resource.
  • the resource coordination module will first determine the transaction thread module that can execute the transaction to be processed according to the resource scheduling information, and then in order to ensure the safety of transaction processing, it can determine the powerless resource to which the transaction thread module belongs, and then select among the physical resources At least one associated thread module associated with the transaction thread module can be combined with the transaction thread module and at least one associated thread module to form at least two thread modules corresponding to the transaction to be processed, which can be used to complete the transaction to be processed through at least two thread modules in the future processing to ensure transaction processing efficiency.
  • the resource scheduler when the resource scheduler determines that load balancing needs to be performed on pending transactions, it can first allocate resources vCPU0 and vCPU1 for pending transactions; The pending transactions can be written into the shared data structure.
  • the CPU detects the shared data structure and determines that it needs to use the resources vCPU0 and vCPU1 to process the transaction to be processed. At this time, it determines the hyper-thread HT-s running the resource vCPU0 according to the resource scheduling information, and then determines that it belongs to the hyper-thread HT-s.
  • hyperthread HT-t of the same CPU forms a target hyperthread for processing pending transactions based on the hyperthreads HT-s and HT-t, and is used for subsequently running resources vCPU0 and vCPU1 respectively to process pending transactions.
  • the resource coordination module determines that the resource scheduler needs to execute the pending transaction, the resource coordination module needs to send a transaction processing request to the thread module executing the pending transaction.
  • the creation of the transaction processing request can be completed in conjunction with the interrupt request associated with the resource preparation information of the transaction to be processed; in this embodiment, the resource coordination module is further configured for each thread module Determine resource preparation information respectively, create an interrupt request carrying the resource preparation information as the transaction processing request, and send it to each thread module.
  • the resource preparation information specifically refers to the preparation information that notifies each thread module that the transaction to be processed needs to be processed, and each thread module can respond to the resource preparation information to feed back information on whether the transaction to be processed can be processed at the current moment; correspondingly, the interrupt request Specifically, it refers to an inter-core interrupt carrying resource preparation information, which is used to interrupt the operation of each thread module.
  • resource preparation information can be created for each thread module, so as to notify each thread module that the transaction to be processed needs to be executed; then create The inter-core interrupt carrying resource preparation information is sent to each thread module as a transaction processing request block, so that each thread module can respond in time to the operation of executing the transaction to be processed based on the inter-core interrupt.
  • each thread module can respond to the transaction processing request in time after receiving the transaction processing request, thereby effectively improving the transaction processing efficiency.
  • each thread module will respond to the interrupt request as soon as possible after receiving the interrupt request carrying the resource preparation information; in this embodiment, each thread module is further configured to receive the interrupt request carrying the resource preparation information.
  • the resource preparation information is the interrupt request, and an interrupt processing function is called according to the interrupt request; the resource preparation information is processed by the interrupt processing function, and the thread state information is determined according to the information processing result.
  • the interrupt processing function specifically refers to a function that can feed back thread state information to the resource coordination module based on resource preparation information.
  • the thread state information fed back by it is used to represent the execution state of the thread module at the current moment.
  • the thread state information is OK and Abort respectively. , where the thread status information OK indicates that the thread module agrees to execute the pending transaction; the thread status information Abort indicates that the thread module refuses to execute the pending transaction due to some reasons.
  • the thread module when the thread module receives an inter-core interrupt carrying resource preparation information, no matter what state the thread module is processing at this time, it will call the interrupt processing function according to the inter-core interrupt, and then perform resource preparation information through the interrupt processing function. Processing, determining the thread state information corresponding to the thread module at the current moment, and feeding back the thread state information to the resource coordination module, so that the resource coordination module can perform corresponding operations according to the thread state information fed back by each thread module.
  • the CPU determines the hyper-threads HT-s and HT-t associated with the transaction to be processed, it can create a Prepare for each hyper-thread at this time, and then integrate it into the inter-core interrupt and send it to the hyper-thread HT-s and HT-t HT-t; hyper-threads HT-s and HT-t receive the inter-core interrupt carrying Prepare, will call the interrupt processing function, and then determine the thread status information as OK or Abort according to the interrupt processing function, and feed it back to the CPU. for subsequent transaction processing operations.
  • each thread module can quickly respond to inter-core interrupts to make feedback, so as to ensure that the thread status information corresponding to each thread module is executable. Under such circumstances, the processing operation of the transaction to be processed can be completed quickly.
  • each thread module communicates with the resource coordination module, in order to be able to cope with complex communication scenarios, the information communication can be completed through the information sharing unit; in this embodiment, each thread module is also configured to The thread state information is written into the information sharing unit;
  • the resource coordination module is further configured to determine the thread state information corresponding to each thread module by polling the information sharing unit; and write the transaction information into the information sharing unit;
  • each thread module is further configured to determine the transaction processing information by polling the information sharing unit, and process the transaction to be processed based on the transaction processing information.
  • the information sharing unit specifically refers to the shared variables used when communicating between the thread module and the resource coordination module, including but not limited to network, memory, local area network, etc.; that is, it is used to support each thread module to quickly connect to resource coordination
  • the variables in the information sharing unit will change, and the resource coordination module or thread module polling the information sharing unit can determine the information they need according to the change of the variables.
  • each hyper-thread determines its corresponding thread state information according to the transaction processing request, it can write the thread state information into the information sharing unit; then the resource coordination module will continuously poll the information sharing unit, when the information sharing unit After the writing of the thread state information is completed by each hyperthread, the resource coordination module will determine the thread state information corresponding to each hyperthread according to the polling result, and then determine the transaction processing information according to the thread state information fed back by each hyperthread. to decide whether to process the transaction to be processed; afterward, since the operation of processing the transaction is completed by each hyper-thread, it is also necessary to write the transaction processing information into the information sharing unit. Finally, each hyperthread can determine the transaction processing information by polling the information sharing unit, and process the transaction to be processed according to the transaction processing information.
  • each thread module and resource coordination module can quickly determine the mutual feedback information to improve transaction processing efficiency, and at the same time Reduce information transmission time.
  • each thread module executes the transaction to be processed, it will complete the transaction processing information fed back by the resource coordination module.
  • each thread module needs to be The available state can only be realized; in this embodiment, the resource coordination module is further configured to determine that the at least two thread modules are in the available state according to the thread state information corresponding to each thread module, according to the The useable state creates transaction execution information as the transaction processing information, and writes the transaction processing information into the information sharing unit;
  • each thread module is further configured to determine the transaction execution information by polling the information sharing unit, determine the target resource according to the transaction execution information, and write the target resource into the resource scheduling queue; When the target resource satisfies the transaction processing condition of the resource scheduling queue, the pending transaction is processed by the target resource.
  • the available status specifically refers to the thread module that can process the transaction to be processed; correspondingly, the transaction execution information specifically refers to that all thread modules agree to process the pending transaction; correspondingly, the target resource specifically refers to the resource that the thread module needs to run Resources are used to process pending transactions; correspondingly, the resource scheduling queue specifically refers to the queue corresponding to the thread module, which is used for standardized queuing of target resources to be run.
  • the transaction processing condition specifically refers to the operating condition of the target resource.
  • the resource coordination module determines that each thread module is in an available state according to the thread status information fed back by each thread module, it means that each thread module in at least two thread modules agrees to process the transaction to be processed.
  • transaction execution information can be created as transaction processing information, and written into the information sharing unit; each thread module polls the information sharing unit to determine that the thread modules associated with the pending transaction agree to process the pending transaction, then Each thread module can determine the target resource to run according to the transaction execution information, and write the target resource into the resource scheduling queue; and when the target resource meets the transaction processing conditions of the resource scheduling queue, Indicates that the thread module can run the target resource, then the transaction to be processed can be processed through the target resource at this time.
  • Hyper-thread HT-s and HT-t determine that the transaction execution information is Commit by polling shared variables, then at this time, hyper-thread HT-s will write resource vCPU0 into its corresponding resource scheduling queue, and hyper-thread HT-t will The resource vCPU1 is written into its corresponding resource scheduling queue; it is used to process the transaction to be processed through the resources vCPU0 and vCPU1 when the transaction processing condition is satisfied subsequently.
  • the resource coordination module is also configured to determine that at least one thread module is in an unused state according to the thread state information corresponding to each thread module In this case, creating transaction interruption information according to the non-use state as the transaction processing information, and writing the transaction processing information into the information sharing unit;
  • each thread module is further configured to determine the transaction interruption information by polling the information sharing unit, determine at least two target thread modules according to the transaction interruption information, and send the at least two target thread modules The module sends the pending transaction.
  • the non-use state specifically means that the thread module cannot process the pending transaction at the current moment; correspondingly, the transaction interruption information specifically refers to the information that the resource coordinator cancels processing the pending transaction.
  • the resource coordination module determines that there is at least one thread module fed back by the thread status information that indicates that the thread module is in a non-use state according to the thread status information fed back by each thread module, indicating that there is at least one thread module that cannot be treated at the current moment. If the transaction is processed, the resource coordination module can create transaction interruption information according to the non-use state as transaction processing information, and write it to the information sharing unit; when each thread module determines that there are other thread modules by polling the information sharing unit If the transaction to be processed cannot be processed, at least two target thread modules may be determined according to the transaction interruption information, and then the target thread module processes the transaction to be processed.
  • the thread state information of hyperthread HT-t is inconsistent with that of hyperthread HT-s, it means that the thread state information of hyperthread HT-t is Abort, that is, the current moment of hyperthread HT-t
  • the CPU will write the transaction interruption information Fail to the shared variable; the hyperthread HT-s and HT-t determine the transaction interruption information Fail by polling the shared variable, and then determine the hyperthread HT-s and HT- t will give up execution of the pending transaction according to the transaction interruption information Fail, that is, the resources vCPU0 and vCPU1 will not be scheduled, and the hyperthreads HT-x and HT-y can continue to run the resources vCPU0 and vCPU1 to realize the processing operation of the pending transaction.
  • the resource coordination module when the resource coordination module obtains transactions to be processed by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, at this time, at least two associated transactions to be processed can be determined Thread modules, and the physical resources of each thread module are the same; then send transaction processing requests to each thread module, each thread module can determine the thread status information according to the transaction processing request, and feed it back to the resource coordination module; resource coordination The module can determine the transaction processing information of the transaction to be processed by integrating the thread status information of each thread module, and feed back the transaction processing information to each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information.
  • the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
  • Fig. 2 shows a flow chart of a resource processing method provided according to an embodiment of this specification, which is applied to a resource coordination module, and specifically includes the following steps.
  • Step S202 obtain the transaction to be processed by detecting the shared data structure.
  • Step S204 determining at least two thread modules associated with the transaction to be processed, and sending a transaction processing request to each thread module.
  • Step S206 receiving thread state information fed back by each thread module for the transaction processing request.
  • Step S208 determine transaction processing information corresponding to the transaction to be processed based on the thread state information, and send the transaction processing information to each thread module.
  • the pending transaction carrying resource scheduling information is obtained; according to the resource scheduling information, at least two thread modules associated with the pending transaction are determined; after determining that the pending transaction is a pending transaction In the case of execution status, a transaction processing request is sent to each thread module.
  • the resource preparation information is determined for each thread module, an interrupt request carrying the resource preparation information is created as a transaction processing request, and sent to each thread module.
  • each thread module writes the thread state information into the information sharing unit
  • the resource coordination module determines the thread state information corresponding to each thread module by polling the information sharing unit; determines the transaction processing information corresponding to the transaction to be processed according to the thread state information corresponding to each thread module, and writes the transaction processing information to into the information sharing unit;
  • each thread module determines the transaction processing information by polling the information sharing unit, and processes the transaction to be processed based on the transaction processing information.
  • the transaction execution information is created according to the available status as the transaction processing information, and the The transaction processing information is written into the information sharing unit;
  • each thread module determines the transaction execution information by polling the information sharing unit, determines the target resource according to the transaction execution information, and writes the target resource into the resource scheduling queue; when the target resource meets the transaction processing conditions of the resource scheduling queue , process the pending transaction through the target resource.
  • the resource coordination module determines that at least one thread module is in a non-use state according to the thread state information corresponding to each thread module, the transaction interruption information is created as the transaction processing information according to the non-use state, and the transaction Write the processing information into the information sharing unit;
  • each thread module determines transaction interruption information by polling the information sharing unit, determines at least two target thread modules according to the transaction interruption information, and sends pending transactions to at least two target thread modules.
  • the resource coordination module when it obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it can determine the pending transactions according to the resource scheduling information carried in the pending transactions. Process at least two thread modules associated with the transaction, and each thread module belongs to the same physical resource; Afterwards, when it is determined that the transaction to be processed is a state to be executed, a transaction processing request is then sent to each thread module, and each thread module can determine the thread state information according to the transaction processing request, and feed it back to the resource coordination module ; The resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information operate.
  • the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
  • Fig. 3 shows a flow chart of another resource processing method provided according to an embodiment of the present specification, which is applied to a thread module, and specifically includes the following steps.
  • Step S302 receiving the transaction processing request sent by the resource coordination module for the transaction to be processed.
  • Step S304 determining thread state information according to the transaction processing request, and feeding back the thread state information to the resource coordination module.
  • Step S306 receiving transaction processing information fed back by the resource coordination module for the thread state information.
  • Step S308 process the transaction to be processed based on the transaction processing information.
  • an interrupt request carrying resource preparation information is received, and an interrupt processing function is called according to the interrupt request; the resource preparation information is processed through the interrupt processing function, and thread state information is determined according to the information processing result.
  • each thread module writes the thread state information into the information sharing unit
  • the resource coordination module determines the thread state information corresponding to each thread module by polling the information sharing unit; determines the transaction processing information corresponding to the transaction to be processed according to the thread state information corresponding to each thread module, and writes the transaction processing information to into the information sharing unit;
  • each thread module determines the transaction processing information by polling the information sharing unit, and processes the transaction to be processed based on the transaction processing information.
  • the transaction execution information is created according to the available status as the transaction processing information, and the The transaction processing information is written into the information sharing unit;
  • each thread module determines the transaction execution information by polling the information sharing unit, determines the target resource according to the transaction execution information, and writes the target resource into the resource scheduling queue; when the target resource meets the transaction processing conditions of the resource scheduling queue , process the pending transaction through the target resource.
  • the resource coordination module determines that at least one thread module is in a non-use state according to the thread state information corresponding to each thread module, the transaction interruption information is created as the transaction processing information according to the non-use state, and the transaction Write the processing information into the information sharing unit;
  • each thread module determines the transaction interruption information by polling the information sharing unit, and according to the transaction interruption information Determine at least two target thread modules, and send pending transactions to the at least two target thread modules.
  • the resource coordination module when it obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it can determine the pending transactions according to the resource scheduling information carried in the pending transactions. Process at least two thread modules associated with the transaction, and the physical resources to which each thread module belongs are the same; then when it is determined that the transaction to be processed is to be executed, then send a transaction processing request to each thread module, each The thread module can determine the thread state information according to the transaction processing request, and feed it back to the resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to Each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information.
  • the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
  • FIG. 4 shows a schematic structural diagram of a resource processing device provided by an embodiment of this specification. As shown in Figure 4, the device is applied to the resource coordination module, including:
  • a detection transaction unit 402 configured to obtain pending transactions by detecting a shared data structure
  • Determine thread unit 404 configured to determine at least two thread modules associated with the transaction to be processed, and send a transaction processing request to each thread module;
  • the information receiving unit 406 is configured to receive thread state information fed back by each thread module for the transaction processing request;
  • the sending information unit 408 is configured to determine transaction processing information corresponding to the transaction to be processed based on the thread state information, and send the transaction processing information to each thread module.
  • the device further includes: obtaining a pending transaction carrying resource scheduling information by detecting the shared data structure; determining at least two thread modules associated with the pending transaction according to the resource scheduling information; determining When the transaction to be processed is in the pending state, a transaction processing request is sent to each thread module.
  • the device further includes: separately determining resource preparation information for each thread module, creating an interrupt request carrying the resource preparation information as a transaction processing request, and sending it to each thread module.
  • the device further includes: each thread module writes the thread state information into the information sharing unit;
  • the resource coordination module determines the thread state information corresponding to each thread module by polling the information sharing unit; determines the transaction processing information corresponding to the transaction to be processed according to the thread state information corresponding to each thread module, and writes the transaction processing information to into the information sharing unit;
  • each thread module determines the transaction processing information by polling the information sharing unit, and processes the transaction to be processed based on the transaction processing information.
  • the device further includes: when the resource coordination module determines that at least two thread modules are available according to the thread status information corresponding to each thread module, create transaction execution information according to the available status as a transaction processing information and writing transaction processing information to an information sharing unit;
  • each thread module determines the transaction execution information by polling the information sharing unit, determines the target resource according to the transaction execution information, and writes the target resource into the resource scheduling queue; when the target resource meets the transaction processing conditions of the resource scheduling queue , process the pending transaction through the target resource.
  • the device further includes: when the resource coordination module determines that at least one thread module is in a non-use state according to the thread state information corresponding to each thread module, create transaction interruption information according to the non-use state as transaction processing information, and write the transaction information into the information sharing unit;
  • each thread module determines transaction interruption information by polling the information sharing unit, determines at least two target thread modules according to the transaction interruption information, and sends pending transactions to at least two target thread modules.
  • the device further includes: selecting the transaction thread module associated with the transaction to be processed according to the resource scheduling information, and determining the physical resource to which the transaction thread module belongs; selecting at least one association associated with the transaction thread module in the physical resource A thread module; based on the transaction thread module and at least one associated thread module, at least two thread modules associated with the transaction to be processed are formed.
  • the resource coordination module when it obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it can determine the pending transactions according to the resource scheduling information carried in the pending transactions. Process at least two thread modules associated with the transaction, and the physical resources to which each thread module belongs are the same; then when it is determined that the transaction to be processed is to be executed, then send a transaction processing request to each thread module, each The thread module can determine the thread state information according to the transaction processing request, and feed it back to the resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to Each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information.
  • the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
  • FIG. 5 shows a schematic structural diagram of another resource processing device provided by an embodiment of this specification. As shown in Figure 5, the device is applied to the thread module, including:
  • the receiving request unit 502 is configured to receive a transaction processing request sent by the resource coordination module for the transaction to be processed;
  • the determining information unit 504 is configured to determine thread state information according to the transaction processing request, and feed back the thread state information to the resource coordination module;
  • An information receiving unit 506 configured to receive transaction processing information fed back by the resource coordination module for the thread state information
  • the transaction processing unit 508 is configured to process the transaction to be processed based on the transaction processing information.
  • the device further includes: receiving an interrupt request carrying resource preparation information, and calling an interrupt processing function according to the interrupt request; processing the resource preparation information through the interrupt processing function, and determining the thread state according to the information processing result information.
  • the device further includes: each thread module writes the thread state information into the information sharing unit;
  • the resource coordination module determines the thread state information corresponding to each thread module by polling the information sharing unit; determines the transaction processing information corresponding to the transaction to be processed according to the thread state information corresponding to each thread module, and writes the transaction processing information to into the information sharing unit;
  • each thread module determines the transaction processing information by polling the information sharing unit, and processes the transaction to be processed based on the transaction processing information.
  • the device further includes: when the resource coordination module determines that at least two thread modules are available according to the thread status information corresponding to each thread module, create transaction execution information according to the available status as a transaction processing information and writing transaction processing information to an information sharing unit;
  • each thread module determines the transaction execution information by polling the information sharing unit, determines the target resource according to the transaction execution information, and writes the target resource into the resource scheduling queue; when the target resource meets the transaction processing conditions of the resource scheduling queue , process the pending transaction through the target resource.
  • the device further includes: when the resource coordination module determines that at least one thread module is in a non-use state according to the thread state information corresponding to each thread module, create transaction interruption information according to the non-use state as transaction processing information, and write the transaction information into the information sharing unit;
  • each thread module determines transaction interruption information by polling the information sharing unit, determines at least two target thread modules according to the transaction interruption information, and sends pending transactions to at least two target thread modules.
  • the resource coordination module when it obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it can determine the pending transactions according to the resource scheduling information carried in the pending transactions. Process at least two thread modules associated with the transaction, and the physical resources to which each thread module belongs are the same; then when it is determined that the transaction to be processed is to be executed, then send a transaction processing request to each thread module, each The thread module can determine the thread state information according to the transaction processing request, and feed it back to the resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to Each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information.
  • the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
  • FIG. 6 shows a structural block diagram of a computing device 600 provided according to an embodiment of this specification.
  • Components of the computing device 600 include, but are not limited to, memory 610 and processor 620 .
  • Processor 620 and memory 610 via bus 630 is connected, and the database 650 is used to save data.
  • Computing device 600 also includes an access device 640 that enables computing device 600 to communicate via one or more networks 660 .
  • networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet.
  • Access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)), wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, Worldwide Interoperability for Microwave Access ( Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, etc.
  • NIC network interface card
  • the above-mentioned components of the computing device 600 and other components not shown in FIG. 6 may also be connected to each other, for example, through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 6 is only for the purpose of illustration, rather than limiting the scope of this description. Those skilled in the art can add or replace other components as needed.
  • Computing device 600 may be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile telephones (e.g., smartphones), ), wearable computing devices (eg, smart watches, smart glasses, etc.), or other types of mobile devices, or stationary computing devices such as desktop computers or PCs.
  • mobile computers or mobile computing devices e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.
  • mobile telephones e.g., smartphones
  • wearable computing devices eg, smart watches, smart glasses, etc.
  • desktop computers or PCs e.g., desktop computers or PCs.
  • Computing device 600 may also be a mobile or stationary server.
  • the processor 620 is configured to execute the following computer-executable instructions.
  • the steps of the resource processing method above are implemented.
  • An embodiment of the present specification further provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the resource processing method above are implemented.
  • An embodiment of the present specification also provides a computer program, wherein, when the computer program is executed in a computer, the computer is caused to execute the steps of the resource processing method above.
  • the computer instructions include computer program code, which may be in the form of source code, object code form, an executable file or some intermediate form, etc.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signal telecommunication signal
  • software distribution medium etc.
  • the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
  • computer-readable media Excludes electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Provided in the embodiments of the present description are a resource processing system and method. The resource processing system comprises: a resource coordination module, which is configured to obtain, by means of detecting a shared data structure, a transaction to be processed, determine at least two thread modules associated with said transaction, and send a transaction processing request to each thread module; and each thread module, which is configured to determine thread state information on the basis of the transaction processing request, and feed the thread state information back to the resource coordination module, wherein the resource coordination module is further configured to determine, according to the thread state information of each thread module, transaction processing information corresponding to said transaction, and send the transaction processing information to each thread module; each thread module is further configured to process said transaction on the basis of the transaction processing information; and physical resources to which the thread modules belong are the same.

Description

资源处理系统以及方法Resource processing system and method
本申请要求于2022年03月03日提交中国专利局、申请号为202210211124.9、申请名称为“资源处理系统以及方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202210211124.9 and the application name "Resource Processing System and Method" submitted to the China Patent Office on March 3, 2022, the entire contents of which are incorporated in this application by reference.
技术领域technical field
本说明书实施例涉及资源调度技术领域,特别涉及资源处理系统以及方法。The embodiments of this specification relate to the technical field of resource scheduling, and in particular, to a resource processing system and method.
背景技术Background technique
随着互联网技术的发展,云计算在越来越多的场景中得以应用,其不仅可以支持高并发的服务,还能够充分的利用资源完成事务的处理操作,成为了现有技术中应用较为广泛的一种资源。而在云环境下,CPU的任务调度器若需要实现资源调度或负载均衡,需要不断的与各个CPU进行交互,而此环境下,不同的任务之间的调度决策可能互相产生依赖;例如,开启了超线程的机器上,两个不同的虚拟机所对应的虚拟机CPU不能同时运行在同一个机器CPU上的两个不同的超线程,如果违反该规则,就会导致在任务处理时虚拟机之间可以相互攻击;不仅会消耗大量的调度资源,还会影响任务安全性,因此亟需一种有效的方案以解决上述问题。With the development of Internet technology, cloud computing is applied in more and more scenarios. It can not only support high-concurrency services, but also make full use of resources to complete transaction processing operations. It has become a widely used technology in existing technologies. of a resource. In a cloud environment, if the CPU task scheduler needs to implement resource scheduling or load balancing, it needs to continuously interact with each CPU. In this environment, scheduling decisions between different tasks may depend on each other; for example, enable On a machine with hyperthreading enabled, the virtual machine CPUs corresponding to two different virtual machines cannot run two different hyperthreads on the same machine CPU at the same time. If this rule is violated, the virtual machine will They can attack each other; it will not only consume a lot of scheduling resources, but also affect the security of tasks, so an effective solution is urgently needed to solve the above problems.
发明内容Contents of the invention
有鉴于此,本说明书实施例提供了一种资源处理系统。本说明书一个或者多个实施例同时涉及两种资源处理方法,两种资源处理装置,一种计算设备,一种计算机可读存储介质以及一种计算机程序,以解决现有技术中存在的技术缺陷。In view of this, the embodiment of this specification provides a resource processing system. One or more embodiments of this specification relate to two resource processing methods, two resource processing devices, a computing device, a computer-readable storage medium and a computer program, so as to solve the technical defects existing in the prior art .
根据本说明书实施例的第一方面,提供了一种资源处理系统,包括:According to the first aspect of the embodiments of this specification, a resource processing system is provided, including:
资源协调模块,被配置为通过检测共享数据结构获得待处理事务;确定所述待处理事务关联的至少两个线程模块,并向每个线程模块发送事务处理请求;The resource coordination module is configured to obtain pending transactions by detecting the shared data structure; determine at least two thread modules associated with the pending transactions, and send a transaction processing request to each thread module;
每个线程模块,被配置为基于所述事务处理请求确定线程状态信息,并将所述线程状态信息反馈至所述资源协调模块;Each thread module is configured to determine thread state information based on the transaction processing request, and feed back the thread state information to the resource coordination module;
所述资源协调模块,还被配置为根据每个线程模块的线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息;The resource coordination module is further configured to determine transaction processing information corresponding to the transaction to be processed according to the thread state information of each thread module, and send the transaction processing information to each thread module;
每个线程模块,还被配置为基于所述事务处理信息对所述待处理事务进行处理;其中,各个线程模块所属的物理资源相同。Each thread module is further configured to process the transaction to be processed based on the transaction processing information; wherein, the physical resources to which each thread module belongs are the same.
根据本说明书实施例的第二方面,提供了一种资源处理方法,应用于资源协调模块,包括:According to the second aspect of the embodiments of this specification, there is provided a resource processing method applied to a resource coordination module, including:
通过检测共享数据结构获得待处理事务;Obtain pending transactions by detecting shared data structures;
确定所述待处理事务关联的至少两个线程模块,并向每个线程模块发送事务处理请求; Determine at least two thread modules associated with the transaction to be processed, and send a transaction processing request to each thread module;
接收每个线程模块针对所述事务处理请求反馈的线程状态信息;receiving thread status information fed back by each thread module for the transaction processing request;
基于所述线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息。Determine transaction processing information corresponding to the transaction to be processed based on the thread state information, and send the transaction processing information to each thread module.
根据本说明书实施例的第三方面,提供了另一种资源处理方法,应用于线程模块,包括:According to the third aspect of the embodiment of this specification, another resource processing method is provided, which is applied to the thread module, including:
接收资源协调模块针对待处理事务发送的事务处理请求;Receive the transaction processing request sent by the resource coordination module for the transaction to be processed;
根据所述事务处理请求确定线程状态信息,并将所述线程状态信息反馈至所述资源协调模块;Determine thread state information according to the transaction processing request, and feed back the thread state information to the resource coordination module;
接收所述资源协调模块针对所述线程状态信息反馈的事务处理信息;receiving transaction processing information fed back by the resource coordination module for the thread state information;
基于所述事务处理信息对所述待处理事务进行处理。Processing the transaction to be processed based on the transaction processing information.
根据本说明书实施例的第四方面,提供了一种资源处理装置,应用于资源协调模块,包括:According to the fourth aspect of the embodiments of this specification, a resource processing device is provided, which is applied to a resource coordination module, including:
检测事务单元,被配置为通过检测共享数据结构获得待处理事务;A detection transaction unit configured to obtain pending transactions by detecting a shared data structure;
确定线程单元,被配置为确定所述待处理事务关联的至少两个线程模块,并向每个线程模块发送事务处理请求;determining a thread unit, configured to determine at least two thread modules associated with the transaction to be processed, and send a transaction processing request to each thread module;
接收信息单元,被配置为接收每个线程模块针对所述事务处理请求反馈的线程状态信息;A receiving information unit configured to receive thread state information fed back by each thread module for the transaction processing request;
发送信息单元,被配置为基于所述线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息。The sending information unit is configured to determine transaction processing information corresponding to the transaction to be processed based on the thread state information, and send the transaction processing information to each thread module.
根据本说明书实施例的第五方面,提供了一种资源处理装置,应用于线程模块,包括:According to the fifth aspect of the embodiments of this specification, there is provided a resource processing device applied to a thread module, including:
接收请求单元,被配置为接收资源协调模块针对待处理事务发送的事务处理请求;A receiving request unit configured to receive a transaction processing request sent by the resource coordination module for pending transactions;
确定信息单元,被配置为根据所述事务处理请求确定线程状态信息,并将所述线程状态信息反馈至所述资源协调模块;A determining information unit configured to determine thread state information according to the transaction processing request, and feed back the thread state information to the resource coordination module;
接收信息单元,被配置为接收所述资源协调模块针对所述线程状态信息反馈的事务处理信息;An information receiving unit configured to receive transaction processing information fed back by the resource coordination module for the thread state information;
处理事务单元,被配置为基于所述事务处理信息对所述待处理事务进行处理。The transaction processing unit is configured to process the transaction to be processed based on the transaction processing information.
根据本说明书实施例的第六方面,提供了一种计算设备,包括:According to a sixth aspect of the embodiments of this specification, a computing device is provided, including:
存储器和处理器;memory and processor;
所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令时实现上述资源处理方法的步骤。The memory is used to store computer-executable instructions, and the processor is used to implement the steps of the above resource processing method when executing the computer-executable instructions.
根据本说明书实施例的第七方面,提供了一种计算机可读存储介质,其存储有计算机可执行指令,该指令被处理器执行时实现上述资源处理方法的步骤。According to a seventh aspect of the embodiments of this specification, there is provided a computer-readable storage medium, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the resource processing method above are implemented.
根据本说明书实施例的第八方面,提供了一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述资源处理方法的步骤。According to an eighth aspect of the embodiments of the present specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the resource processing method above.
本说明书提供的资源处理系统,资源协调模块通过检测共享数据结构获得待处理事务的情况下,为了能够提高事务处理效率,以及资源消耗成本的降低,此时可以确定待处理 事务关联的至少两个线程模块,且各个线程模块所属的物理资源相同;之后向每个线程模块分别发送事务处理请求,每个线程模块可以根据事务处理请求确定线程状态信息,并将其反馈到资源协调模块;资源协调模块可以通过整合各个线程模块的线程状态信息确定待处理事务的事务处理信息,并将事务处理信息反馈给各个线程模块,最后每个线程模块即可根据事务处理信息对待处理事务进行处理操作。实现在进行事务处理时,可以通过资源协调模块统计各个线程模块的线程状态,以决定是否对待处理事务进行处理,且在处理过程中,将采用统一决策完成,保证待处理事务要么被全部线程执行,要么全部线程都不执行,从而提高事务处理安全性的同时,提高事务处理效率,以降低资源消耗成本。In the resource processing system provided in this manual, when the resource coordination module obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, the pending transaction can be determined at this time At least two thread modules associated with the transaction, and the physical resources of each thread module are the same; then send a transaction processing request to each thread module, each thread module can determine the thread status information according to the transaction processing request, and feed it back to Resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to each thread module, and finally each thread module can be processed according to the transaction processing information Transaction processing operations. Realize that during transaction processing, the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, thereby improving transaction processing security and improving transaction processing efficiency to reduce resource consumption costs.
附图说明Description of drawings
图1是本说明书一个实施例提供的一种资源处理系统的结构示意图;FIG. 1 is a schematic structural diagram of a resource processing system provided by an embodiment of this specification;
图2是本说明书一个实施例提供的一种资源处理方法的流程图;FIG. 2 is a flowchart of a resource processing method provided by an embodiment of this specification;
图3是本说明书一个实施例提供的另一种资源处理方法的流程图;Fig. 3 is a flow chart of another resource processing method provided by an embodiment of this specification;
图4是本说明书一个实施例提供的一种资源处理装置的结构示意图;Fig. 4 is a schematic structural diagram of a resource processing device provided by an embodiment of this specification;
图5是本说明书一个实施例提供的另一种资源处理装置的结构示意图;Fig. 5 is a schematic structural diagram of another resource processing device provided by an embodiment of this specification;
图6是本说明书一个实施例提供的一种计算设备的结构框图。Fig. 6 is a structural block diagram of a computing device provided by an embodiment of this specification.
具体实施方式Detailed ways
在下面的描述中阐述了很多具体细节以便于充分理解本说明书。但是本说明书能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本说明书内涵的情况下做类似推广,因此本说明书不受下面公开的具体实施的限制。In the following description, numerous specific details are set forth in order to provide a thorough understanding of the specification. However, this specification can be implemented in many other ways different from those described here, and those skilled in the art can make similar extensions without violating the connotation of this specification, so this specification is not limited by the specific implementations disclosed below.
在本说明书一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本说明书一个或多个实施例。在本说明书一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本说明书一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。Terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only, and are not intended to limit one or more embodiments of this specification. As used in one or more embodiments of this specification and the appended claims, the singular forms "a", "the", and "the" are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and/or" used in one or more embodiments of the present specification refers to and includes any or all possible combinations of one or more associated listed items.
应当理解,尽管在本说明书一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本说明书一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present specification, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, the first may also be referred to as the second, and similarly, the second may also be referred to as the first without departing from the scope of one or more embodiments of the present specification. Depending on the context, the word "if" as used herein may be interpreted as "at" or "when" or "in response to a determination."
首先,对本说明书一个或多个实施例涉及的名词术语进行解释。First, terms and terms involved in one or more embodiments of this specification are explained.
CPU:(Central Processing Unit,处理器)作为计算机系统的运算和控制核心,是信息处理、程序运行的最终执行单元。CPU: (Central Processing Unit, processor) as the computing and control core of the computer system, is the final execution unit for information processing and program operation.
超线程:一种在CPU上模拟多个逻辑线程的技术,把多线程处理器一块物理芯片模拟成两个逻辑CPU,让单个处理器就能使用线程级的并行计算,进而兼容多线程操作系统和软件。超线程技术充分利用空闲CPU资源,在相同时间内完成更多工作。Hyper-Threading: A technology that simulates multiple logical threads on the CPU, simulating a physical chip of a multi-threaded processor into two logical CPUs, so that a single processor can use thread-level parallel computing, and is compatible with multi-threaded operating systems and software. Hyper-Threading technology makes full use of idle CPU resources to get more work done in the same amount of time.
VM:(Virtual Machine,虚拟机)指通过软件模拟的具有完整硬件系统功能的、运行 在一个完全隔离环境中的完整计算机系统。在实体计算机中能够完成的工作在虚拟机中都能够实现。在计算机中创建虚拟机时,需要将实体机的部分硬盘和内存容量作为虚拟机的硬盘和内存容量。每个虚拟机都有独立的CMOS、硬盘和操作系统,可以像使用实体机一样对虚拟机进行操作。VM: (Virtual Machine, virtual machine) refers to a software simulation with complete hardware system functions, running A complete computer system in a completely isolated environment. Everything that can be done on a physical computer can be done on a virtual machine. When creating a virtual machine on a computer, part of the hard disk and memory capacity of the physical machine needs to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has an independent CMOS, hard disk and operating system, and the virtual machine can be operated like a physical machine.
vCPU:电脑中的虚拟处理器;相对于物理CPU而言,虚拟机内的CPU。vCPU: A virtual processor in a computer; a CPU in a virtual machine as opposed to a physical CPU.
云计算:(Cloud Computing)是分布式计算的一种,指的是通过网络“云”将巨大的数据计算处理程序分解成无数个小程序,然后,通过多部服务器组成的系统进行处理和分析这些小程序得到结果并返回给用户。Cloud Computing: (Cloud Computing) is a kind of distributed computing, which refers to decomposing a huge data computing processing program into countless small programs through the network "cloud", and then processing and analyzing it through a system composed of multiple servers These applets get the results and return them to the user.
在本说明书中,提供了一种资源处理系统,本说明书同时涉及两种资源处理方法,两种资源处理装置,一种计算设备,一种计算机可读存储介质以及一种计算机程序,在下面的实施例中逐一进行详细说明。In this specification, a resource processing system is provided. This specification simultaneously involves two resource processing methods, two resource processing devices, a computing device, a computer-readable storage medium, and a computer program. The following The detailed description will be given in detail one by one in the embodiment.
实际应用中,CPU的任务调度器需要不断的回答两个问题,一个是任务应该在那个CPU上运行,以及每个CPU下一时刻应该运行按个任务。一般来说,每个任务是相互独立的。但是在云环境下,不同的任务之间的调度决策可能互相产生依赖。例如,在开启了超线程的x86-64机器上,两个不同VM所对应的vCPU不能同时运行在同一个CPU上的两个不同的超线程;这是因为同一个CPU不同超线程的任务,共享CPU流水线和高速缓存上的某些资源。如果违反了这一规则,一个恶意的VM就可以利用漏洞攻击另一个VM。然而现有技术中的调度器都是基于任务之间的调度决策是相互独立这一设定来实现的;其虽然能够达到调度的效果,但是无法解决上述问题,如Linux内核使用的调度器CFS。In practical applications, the task scheduler of the CPU needs to continuously answer two questions, one is which CPU the task should run on, and each CPU should run a task at the next moment. In general, each task is independent of each other. But in the cloud environment, scheduling decisions between different tasks may depend on each other. For example, on an x86-64 machine with hyperthreading enabled, vCPUs corresponding to two different VMs cannot run two different hyperthreads on the same CPU at the same time; this is because tasks of different hyperthreads on the same CPU, Share some resources on the CPU pipeline and cache. If this rule is violated, a malicious VM can exploit the vulnerability to attack another VM. However, the schedulers in the prior art are all based on the setting that the scheduling decisions between tasks are independent of each other; although they can achieve the effect of scheduling, they cannot solve the above problems, such as the scheduler CFS used by the Linux kernel .
CFS是一个通用调度器,它的目标应用是所有Linux进程与线程。由于当前主流的虚拟化方案使用QEMU-KVM,而在QEMU-KVM中,每一个vCPU都是一个Linux的任务,所以使用CFS调度vCPU是可行的。但CFS并不区分vCPU和普通任务,所以CFS无法满足虚拟化环境下特有的需求。而改进版CFS加入了云环境的需求。例如,改进版CFS可以首先在某个超线程上调度一个vCPU,然后通过某种机制通知关联的vCPU进行相应的调度。但这里的问题在于这两次调度之间可能存在时间差,因为调度器通常依赖时钟中断来进行调度和负载均衡。考虑一个每秒产生200次时钟中断的CPU,那么这个时间差最大为5ms(数学期望为2.5ms)。这5ms可能被攻击者利用,从而造成安全隐患。CFS is a general-purpose scheduler, and its target application is all Linux processes and threads. Since the current mainstream virtualization solution uses QEMU-KVM, and in QEMU-KVM, each vCPU is a Linux task, so it is feasible to use CFS to schedule vCPUs. However, CFS does not distinguish between vCPUs and common tasks, so CFS cannot meet the unique requirements of virtualization environments. The improved version of CFS adds the requirements of the cloud environment. For example, the improved version of CFS can first schedule a vCPU on a certain hyperthread, and then notify the associated vCPU to schedule accordingly through some mechanism. But the problem here is that there may be a time difference between these two schedules, because the scheduler usually relies on clock interrupts for scheduling and load balancing. Consider a CPU that generates 200 clock interrupts per second, then this time difference is at most 5ms (mathematical expectation is 2.5ms). The 5ms may be exploited by attackers, causing security risks.
如果在调度器CFS的基础上小范围修改则容易引起不一致的问题,即对多个vCPU的调度决策可能只对部分vCPU生效,这种不一致会导致严重的安全隐患问题。因此亟需一种有效的方案以解决上述问题。If a small-scale modification is made on the basis of the scheduler CFS, it is easy to cause inconsistency, that is, the scheduling decision for multiple vCPUs may only take effect for some vCPUs, and this inconsistency will lead to serious security risks. Therefore, there is an urgent need for an effective solution to solve the above problems.
有鉴于此,本说明书提供的资源处理系统,资源协调模块通过检测共享数据结构获得待处理事务的情况下,为了能够提高事务处理效率,以及资源消耗成本的降低,此时可以确定待处理事务关联的至少两个线程模块,且各个线程模块所属的物理资源相同;之后向每个线程模块分别发送事务处理请求,每个线程模块可以根据事务处理请求确定线程状态信息,并将其反馈到资源协调模块;资源协调模块可以通过整合各个线程模块的线程状态信息确定待处理事务的事务处理信息,并将事务处理信息反馈给各个线程模块,最后每个线程模块即可根据事务处理信息对待处理事务进行处理操作。实现在进行事务处理时,可以通过资源协调模块统计各个线程模块的线程状态,以决定是否对待处理事务进行处理, 且在处理过程中,将采用统一决策完成,保证待处理事务要么被全部线程执行,要么全部线程都不执行,从而提高事务处理安全性的同时,提高事务处理效率,以降低资源消耗成本。In view of this, in the resource processing system provided by this manual, when the resource coordination module obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it is possible to determine the pending transaction association at this time At least two thread modules, and the physical resources of each thread module are the same; then send a transaction processing request to each thread module, each thread module can determine the thread status information according to the transaction processing request, and feed it back to the resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to each thread module, and finally each thread module can perform transaction processing according to the transaction processing information Processing operations. Realize that during transaction processing, the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, And in the process of processing, a unified decision will be adopted to ensure that the transaction to be processed is either executed by all threads or not executed by all threads, so as to improve the security of transaction processing and improve the efficiency of transaction processing to reduce resource consumption costs.
图1示出了根据本说明书一个实施例提供的一种资源处理系统的结构示意图,资源处理系统100,包括资源协调模块110以及至少两个线程模块120,线程模块120分别为线程模块1,线程模块2…线程模块n,其中n为正整数,且n≥1。具体的,资源处理系统100,包括:FIG. 1 shows a schematic structural diagram of a resource processing system provided according to an embodiment of this specification. The resource processing system 100 includes a resource coordination module 110 and at least two thread modules 120. The thread modules 120 are thread module 1 and thread module 1 respectively. Module 2...Thread module n, where n is a positive integer, and n≥1. Specifically, the resource processing system 100 includes:
资源协调模块100,被配置为通过检测共享数据结构获得待处理事务;确定所述待处理事务关联的至少两个线程模块,并向每个线程模块发送事务处理请求;The resource coordination module 100 is configured to obtain the transaction to be processed by detecting the shared data structure; determine at least two thread modules associated with the transaction to be processed, and send a transaction processing request to each thread module;
每个线程模块120,被配置为基于所述事务处理请求确定线程状态信息,并将所述线程状态信息反馈至所述资源协调模块;Each thread module 120 is configured to determine thread state information based on the transaction processing request, and feed back the thread state information to the resource coordination module;
所述资源协调模块110,还被配置为根据每个线程模块的线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息;The resource coordination module 110 is further configured to determine transaction processing information corresponding to the transaction to be processed according to the thread state information of each thread module, and send the transaction processing information to each thread module;
每个线程模块120,还被配置为基于所述事务处理信息对所述待处理事务进行处理;其中,各个线程模块所属的物理资源相同。Each thread module 120 is further configured to process the transaction to be processed based on the transaction processing information; wherein, the physical resources to which each thread module belongs are the same.
具体的,资源协调模块具体是指云计算环境下负责协调不同超线程的模块,即开启超线程的CPU;相应的,线程模块具体是指资源协调模块开启的超线程对应的模块,用于运行虚拟机的vCPU,实现对待处理事务的处理。也就是说,资源协调模块为开启超线程的CPU;相应的,每个线程模块为运行虚拟机的超线程。Specifically, the resource coordination module specifically refers to the module responsible for coordinating different hyperthreads in the cloud computing environment, that is, the CPU with hyperthreading enabled; correspondingly, the thread module specifically refers to the module corresponding to the hyperthread enabled by the resource coordination module, which is used to run The vCPU of the virtual machine realizes the processing of the transaction to be processed. That is to say, the resource coordination module is a CPU with hyperthreading enabled; correspondingly, each thread module is a hyperthread running a virtual machine.
相应的,共享数据结构具体是指存储待处理事务的队列、数组或者二叉树等,具体应用时,可以根据实际应用场景设定,本实施例在此不作任何限定;相应的,待处理事务具体是指在云计算环境下需要执行的事务,即资源使用方需要使用云计算资源运行的事务,通过运行该事务实现相应的项目服务。相应的,事务处理请求具体是指向各个线程模块发送的对待处理事务进行处理的请求,每个线程模块将根据事务处理请求响应于资源调度器调度同一CPU中不同虚拟机对应的vCPU,实现通过虚拟机对应的vCPU运行待处理事务。Correspondingly, the shared data structure specifically refers to a queue, an array, or a binary tree for storing transactions to be processed. In specific applications, it can be set according to actual application scenarios, and this embodiment does not make any limitation here; correspondingly, the transactions to be processed are specifically Refers to the transactions that need to be executed in the cloud computing environment, that is, the transactions that the resource user needs to use cloud computing resources to run, and the corresponding project services are realized by running the transactions. Correspondingly, the transaction processing request specifically refers to the request sent by each thread module to process the transaction to be processed. Each thread module will respond to the resource scheduler to schedule vCPUs corresponding to different virtual machines in the same CPU according to the transaction processing request. The vCPU corresponding to the machine runs pending transactions.
需要说明的是,为了能够包含事务执行的安全性,以及提高资源利用率,各个线程模块所属的物理资源相同,也就是说,执行待处理事务的超线程属于同一CPU,且各个超线程所调度的资源属于该CPU中不同虚拟机对应的vCPU。It should be noted that, in order to include the security of transaction execution and improve resource utilization, the physical resources to which each thread module belongs are the same, that is, the hyperthreads executing pending transactions belong to the same CPU, and the hyperthreads scheduled by each hyperthread belong to the same CPU. The resources of belong to the vCPU corresponding to different virtual machines in this CPU.
相应的,线程状态信息具体是指线程模块当前时刻是否可以处理待处理事务的状态信息;相应的,事务处理信息具体是指资源协调模块根据各个线程模块反馈的线程状态信息确定的信息,用于确定是否需要超线程同时调用资源对待处理事务进行处理,其需要保持一致性,即全部超线程对应的线程状态信息均为可执行待处理事务的状态时,确定需要调度资源对待处理事务进行处理;或者任意一个超线程对应的线程状态信息为不可执行待处理事务状态的情况下,确定当前时刻不对待处理事务进行处理,即保证资源调度或负载均衡时,同一CPU下的超线程可以同时进行或同时不进行。相应的,对待处理事务进行处理即为通过vCPU资源执行待处理事务,实现前端的项目运行。Correspondingly, the thread status information specifically refers to the status information of whether the thread module can process pending transactions at the current moment; correspondingly, the transaction processing information specifically refers to the information determined by the resource coordination module according to the thread status information fed back by each thread module, and is used for Determine whether hyper-threading is required to call resources to process pending transactions at the same time, which needs to maintain consistency, that is, when all the thread status information corresponding to hyper-threading is in the state of executing pending transactions, it is determined that resources need to be scheduled to process pending transactions; Or if the thread status information corresponding to any hyperthread is the unexecutable pending transaction state, it is determined that the pending transaction is not processed at the current moment, that is, when resource scheduling or load balancing is ensured, hyperthreads under the same CPU can be executed simultaneously or Not at the same time. Correspondingly, processing pending transactions means executing pending transactions through vCPU resources to realize front-end project operation.
基于此,在调度器进行资源调度或负载均衡时,为了能够保证事务执行安全的同时,提高资源利用率;资源协调模块可以先通过检测共享数据结构,确定待处理事务,并根据 检测结果确定资源调度器需要执行待处理事务,则此时为了能够保证待处理事务执行完成,且提高资源利用率,可以先确定待处理事务对应的至少两个超线程,且确定的超线程属于同一CPU,之后向每个超线程发送待处理事务对应的事务处理请求,即同时各个超线程需要执行待处理事务。Based on this, when the scheduler performs resource scheduling or load balancing, in order to ensure the safety of transaction execution and improve resource utilization; the resource coordination module can first determine the pending transaction by detecting the shared data structure, and The detection result determines that the resource scheduler needs to execute the pending transaction, so in order to ensure the completion of the pending transaction and improve resource utilization, at least two hyperthreads corresponding to the pending transaction can be determined first, and the determined hyperthread belongs to The same CPU then sends a transaction processing request corresponding to the pending transaction to each hyperthread, that is, each hyperthread needs to execute the pending transaction at the same time.
每个超线程接收到待处理事务对应的事务处理请求后,考虑到各个超线程属于同一CPU,且分别对应不同的虚拟机,因此各个超线程可能在运行其他事务,为了能够保证事务执行安全性,每个超线程可以根据当前时刻的状态信息,向资源协调模块反馈线程状态信息。资源协调模块在得到各个超线程反馈的线程状态信息后,即可根据各个超线程的状态创建事务处理信息,以决定是否需要通过当前时刻调度的超线程运行待处理事务;即保证同时执行或同时不执行;之后向各个超线程发送事务处理信息,最后超线程即可根据事务处理信息对待处理事务进行处理,实现完成对应事务处理信息的操作。After each hyperthread receives the transaction processing request corresponding to the transaction to be processed, considering that each hyperthread belongs to the same CPU and corresponds to a different virtual machine, each hyperthread may be running other transactions, in order to ensure the security of transaction execution , each hyperthread can feed back thread state information to the resource coordination module according to the state information at the current moment. After obtaining the thread state information fed back by each hyper-thread, the resource coordination module can create transaction processing information according to the state of each hyper-thread to decide whether to run the pending transaction through the hyper-thread scheduled at the current moment; that is, to ensure simultaneous execution or simultaneous Do not execute; then send transaction processing information to each hyperthread, and finally the hyperthread can process the transaction to be processed according to the transaction processing information to complete the operation corresponding to the transaction processing information.
本实施例以负载均衡为例对上述资源处理方法进行说明;例如同一CPU下创建有VM0和VM1,其中,VM0对应有vCPU0,VM1对应有vCPU1,而该CPU开启了超线程模式,因此vCPU0将运行在超线程HT-x上,vCPU1运行在超线程HT-y上;基于此,根据资源调度器的调度结果,确定需要通过vCPU0和vCPU1运行待处理事务,且超线程HT-x和超线程HT-y处于运行状态;则此时可以根据调度结果确定需要使用超线程HT-s运行vCPU0,相应的,与超线程HT-s属于同一CPU的超线程HT-t将运行vCPU1,实现结合同一CPU下的超线程运行相应的资源,完成待处理事务的执行。This embodiment uses load balancing as an example to illustrate the above resource processing method; for example, VM0 and VM1 are created under the same CPU, where VM0 corresponds to vCPU0, VM1 corresponds to vCPU1, and the hyper-threading mode is enabled for this CPU, so vCPU0 will It runs on hyperthread HT-x, and vCPU1 runs on hyperthread HT-y; based on this, according to the scheduling result of the resource scheduler, it is determined that vCPU0 and vCPU1 need to run pending transactions, and hyperthread HT-x and hyperthread HT-y is in the running state; at this time, it can be determined according to the scheduling result that the hyperthread HT-s needs to be used to run vCPU0. The hyperthreading under the CPU runs the corresponding resources to complete the execution of pending transactions.
进一步的,超线程HT-s的调度器向CPU发起形如vCPU0->HT-s,以及vCPU1->HT-t的待处理事务,CPU此时确定超线程HT-s和HT-t将要运行待处理事务,则向各个超线程发送事务处理请求,由于HT-s决定运行vCPU0,因此CPU可以默认超线程HT-s反馈的线程状态信息为OK,则此时将接收超线程HT-t反馈的线程状态信息。Further, the scheduler of the hyperthread HT-s initiates to the CPU pending transactions in the form of vCPU0->HT-s, and vCPU1->HT-t, and the CPU determines that the hyperthread HT-s and HT-t will run To process a transaction, send a transaction processing request to each hyperthread. Since HT-s decides to run vCPU0, the CPU can default the thread status information fed back by hyperthread HT-s as OK, and then it will receive hyperthread HT-t feedback at this time. thread state information.
在超线程HT-t的线程状态信息与超线程HT-s的线程状态信息均为OK的情况下,说明可以对待处理事务进行执行,则CPU会向超线程HT-s和HT-t分别反馈事务执行信息,超线程HT-s和HT-t将根据事务执行信息分别调度资源vCPU0和vCPU1处理待处理事务。If both the thread state information of the hyperthread HT-t and the thread state information of the hyperthread HT-s are OK, it means that the transaction to be processed can be executed, and the CPU will feed back to the hyperthread HT-s and HT-t respectively According to transaction execution information, hyper-threads HT-s and HT-t will respectively schedule resources vCPU0 and vCPU1 to process pending transactions according to transaction execution information.
在超线程HT-t的线程状态信息与超线程HT-s的线程状态信息不一致的情况下,说明超线程HT-t的线程状态信息为Abort,即超线程HT-t当前时刻无法执行待处理事务,则CPU会向超线程HT-s和HT-t分别反馈事务中断信息,超线程HT-s和HT-t将根据事务中断信息放弃执行待处理事务,即不进行资源vCPU0和vCPU1的调度,继续由超线程HT-x和HT-y运行资源vCPU0和vCPU1,实现待处理事务的处理操作。If the thread state information of hyper-thread HT-t is inconsistent with the thread state information of hyper-thread HT-s, it means that the thread state information of hyper-thread HT-t is Abort, that is, hyper-thread HT-t cannot be executed at the current moment to be processed transaction, the CPU will feed back the transaction interruption information to the hyper-threads HT-s and HT-t respectively, and the hyper-threads HT-s and HT-t will give up executing the pending transaction according to the transaction interruption information, that is, the resources vCPU0 and vCPU1 will not be scheduled , the hyper-threads HT-x and HT-y continue to run the resources vCPU0 and vCPU1 to implement the processing operation of the transaction to be processed.
需要说明的是,在进行资源调度时,也可以采用上述实施例中相同或相应的描述内容完成资源处理,本实施例在此不作过多赘述。It should be noted that, when resource scheduling is performed, the same or corresponding description content in the foregoing embodiments may also be used to complete resource processing, and details are not described in this embodiment here.
综上,资源协调模块通过检测共享数据结构获得待处理事务的情况下,为了能够提高事务处理效率,以及资源消耗成本的降低,此时可以确定待处理事务关联的至少两个线程模块,且各个线程模块所属的物理资源相同;之后向每个线程模块分别发送事务处理请求,每个线程模块可以根据事务处理请求确定线程状态信息,并将其反馈到资源协调模块;资源协调模块可以通过整合各个线程模块的线程状态信息确定待处理事务的事务处理信息,并将事务处理信息反馈给各个线程模块,最后每个线程模块即可根据事务处理信息对待处 理事务进行处理操作。实现在进行事务处理时,可以通过资源协调模块统计各个线程模块的线程状态,以决定是否对待处理事务进行处理,且在处理过程中,将采用统一决策完成,保证待处理事务要么被全部线程执行,要么全部线程都不执行,从而提高事务处理安全性的同时,提高事务处理效率,以降低资源消耗成本。In summary, when the resource coordination module obtains pending transactions by detecting shared data structures, in order to improve transaction processing efficiency and reduce resource consumption costs, at least two thread modules associated with pending transactions can be determined at this time, and each The physical resources to which the thread modules belong are the same; then send transaction processing requests to each thread module separately, and each thread module can determine the thread status information according to the transaction processing requests, and feed it back to the resource coordination module; the resource coordination module can integrate each The thread state information of the thread module determines the transaction processing information of the transaction to be processed, and feeds back the transaction processing information to each thread module, and finally each thread module can treat it according to the transaction processing information Manage transactions for processing operations. Realize that during transaction processing, the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, thereby improving transaction processing security and improving transaction processing efficiency to reduce resource consumption costs.
进一步的,云计算环境下,若需要通过线程模块完成待处理事务的执行处理操作,需要通过资源调度器完成;也就是说,需要先由资源调度器完成资源调度或负载均衡,之后再根据调度结果进行后续的事务处理操作;即资源处理系统还包括资源调度器;所述资源调度器,被配置为接收所述待处理事务;针对所述待处理事务配置待使用资源,并根据配置结果创建资源调度信息;将携带有所述资源调度信息的所述待处理事务写入所述共享数据结构。Furthermore, in the cloud computing environment, if the execution processing operation of pending transactions needs to be completed through the thread module, it needs to be completed through the resource scheduler; that is, resource scheduling or load balancing needs to be completed by the resource scheduler first, and then according to the scheduling As a result, subsequent transaction processing operations are performed; that is, the resource processing system also includes a resource scheduler; the resource scheduler is configured to receive the transaction to be processed; configure resources to be used for the transaction to be processed, and create a resource according to the configuration result Resource scheduling information; writing the pending transaction carrying the resource scheduling information into the shared data structure.
具体的,资源调度器具体是指云计算环境下,为了提高资源利用率对可运行资源进行调度的处理器,用于实现资源调度和负载均衡;相应的,待使用资源具体是指资源调度器根据各个节点反馈的资源运行情况,针对待处理事务所分配的可使用资源;相应的,资源调度信息具体是指针对待处理事务分配完成待使用资源所创建的信息,用于告知资源协调模块需要使用的资源有哪些,用于后续实现待处理事务的处理。Specifically, the resource scheduler specifically refers to a processor that schedules runnable resources in order to improve resource utilization in a cloud computing environment, and is used to implement resource scheduling and load balancing; correspondingly, the resource to be used specifically refers to the resource scheduler According to the resource operation status fed back by each node, the available resources allocated for the transaction to be processed; correspondingly, the resource scheduling information specifically refers to the information created by the resources to be used after the allocation of the transaction to be processed is completed, and is used to inform the resource coordination module that it needs to use What are the resources for subsequent implementation of pending transaction processing.
基于此,当资源调度器确定需要执行待处理事务的情况下,可以先针对待处理事务指明待使用资源,即指明一批调度或一批负载均衡决策,并根据待使用资源的配置结果创建资源调度信息,将携带有资源调度信息的待处理事务写入共享数据结构,实现后续对接资源调度器的资源协调模块可以通过共享数据结构确定需要执行的待处理事务,完成后续的处理操作。Based on this, when the resource scheduler determines that pending transactions need to be executed, it can first specify the resources to be used for the pending transactions, that is, specify a batch of scheduling or a batch of load balancing decisions, and create resources according to the configuration results of the resources to be used Scheduling information, write pending transactions carrying resource scheduling information into the shared data structure, so that the resource coordination module that implements subsequent docking with the resource scheduler can determine the pending transactions that need to be executed through the shared data structure, and complete subsequent processing operations.
综上,为了能够支持后续的事务处理操作,可以先通过资源调度器完成资源调度信息的创建,并将其写入共享数据结构,实现后续的资源协调模块通过检测共享数据模块启动待处理事务的处理机制,完成对待处理事务的处理。To sum up, in order to support subsequent transaction processing operations, resource scheduling information can be created through the resource scheduler first, and written into the shared data structure, so that the subsequent resource coordination module can start pending transactions by detecting the shared data module. The processing mechanism completes the processing of pending transactions.
更进一步的,在将携带有资源调度信息的待处理事务写入共享数据结构后,资源协调模块将通过检测共享数据结构确定待处理事务,而在此过程中,由于待处理事务携带有资源调度信息,因此资源协调模块在进行线程确定时,可以结合资源调度信息完成,本实施例中,所述资源协调模块,进一步被配置为通过对所述共享数据结构进行检测,获得携带有所述资源调度信息的所述待处理事务;根据所述资源调度信息确定所述待处理事务关联的所述至少两个线程模块;在确定所述待处理事务为待执行状态的情况下,向每个线程模块发送所述事务处理请求。Furthermore, after writing the pending transaction carrying resource scheduling information into the shared data structure, the resource coordination module will determine the pending transaction by detecting the shared data structure, and in the process, since the pending transaction carries the resource scheduling information Therefore, when the resource coordination module determines the thread, it can be completed in combination with the resource scheduling information. In this embodiment, the resource coordination module is further configured to detect the shared data structure and obtain the The pending transaction of scheduling information; determining the at least two thread modules associated with the pending transaction according to the resource scheduling information; A module sends the transaction request.
具体的,当资源调度器将携带有资源读取信息的待处理事务写入共享数据结构中后,说明通过检测共享数据结构中可以确定针对待处理事务分配的待使用资源的决策信息,则此时资源协调模块可以通过对共享数据结构进行检测,获得携带有资源调度信息的待处理事务,之后资源协调模块根据资源调度信息可以确定执行待处理事务的至少两个超线程。当资源协调模块确定资源调度器需要执行待处理事务的情况下,说明待处理事务为待执行状态,可以向每个超线程发送待处理事务对应的事务处理请求,以方便后续每个超线程可以根据具体线程状态信息反馈事务处理信息。Specifically, when the resource scheduler writes the pending transaction carrying resource read information into the shared data structure, it indicates that the decision information of the resource to be used allocated for the pending transaction can be determined by detecting the shared data structure, then this The resource coordination module can detect the shared data structure to obtain pending transactions carrying resource scheduling information, and then the resource coordination module can determine at least two hyperthreads for executing the pending transactions according to the resource scheduling information. When the resource coordination module determines that the resource scheduler needs to execute the pending transaction, it indicates that the pending transaction is in the pending state, and can send a transaction processing request corresponding to the pending transaction to each hyperthread, so that each subsequent hyperthread can Feedback transaction processing information based on specific thread state information.
在此过程中,为了能够提高事务处理的安全性,即避免同一CPU下的不同虚拟机之间 相互攻击,可以选择属于同一物理资源的线程模块作为执行待处理事务的线程模块;资源协调模块,进一步被配置为根据所述资源调度信息选择所述待处理事务关联的事务线程模块,并确定所述事务线程模块所属的所述物理资源;在所述物理资源中选择所述事务线程模块关联的至少一个关联线程模块;基于所述事务线程模块和所述至少一个关联线程模块组成所述待处理事务关联的所述至少两个线程模块。In this process, in order to improve the security of transaction processing, it is necessary to avoid To attack each other, a thread module belonging to the same physical resource may be selected as a thread module executing a transaction to be processed; the resource coordination module is further configured to select a transaction thread module associated with the transaction to be processed according to the resource scheduling information, and determine the The physical resource to which the transaction thread module belongs; select at least one associated thread module associated with the transaction thread module in the physical resource; form the pending processing based on the transaction thread module and the at least one associated thread module The at least two thread modules associated with the transaction.
具体的,事务线程模块具体是指空闲的超线程中能够对待处理事务进行处理的超线程;相应的,物理资源具体是指线程模块所属的CPU;相应的,关联线程模块具体是指与事务线程模块属于同一物理资源的其他超线程,通过选择所属同一物理资源的超线程确定待处理事务关联的线程模块,可以保证在执行待处理事务时环境的安全性,同时能够充分利用计算资源,提高事务处理效率。Specifically, the transaction thread module specifically refers to the hyperthread that can process the transaction to be processed among the idle hyperthreads; correspondingly, the physical resource specifically refers to the CPU to which the thread module belongs; correspondingly, the associated thread module specifically refers to the hyperthread associated with the transaction thread The module belongs to other hyperthreads of the same physical resource. By selecting the hyperthread belonging to the same physical resource to determine the thread module associated with the transaction to be processed, the security of the environment can be ensured when the transaction to be processed is executed, and at the same time, computing resources can be fully utilized to improve transaction efficiency. Processing efficiency.
基于此,资源协调模块根据资源调度信息将先确定能够执行待处理事务的事务线程模块,之后为了保证事务处理的安全性,此时可以确定事务线程模块所属的无力资源,之后在物理资源中选择事务线程模块关联的至少一个关联线程模块,结合事务线程模块和至少一个关联线程模块组成待处理事务对应的至少两个线程模块即可,用于后续可以通过至少两个线程模块完成对待处理事务的处理,保证事务处理效率。Based on this, the resource coordination module will first determine the transaction thread module that can execute the transaction to be processed according to the resource scheduling information, and then in order to ensure the safety of transaction processing, it can determine the powerless resource to which the transaction thread module belongs, and then select among the physical resources At least one associated thread module associated with the transaction thread module can be combined with the transaction thread module and at least one associated thread module to form at least two thread modules corresponding to the transaction to be processed, which can be used to complete the transaction to be processed through at least two thread modules in the future processing to ensure transaction processing efficiency.
沿用上例,资源调度器在确定需要针对待处理事务进行负载均衡时,可以先针对待处理事务分配资源vCPU0和vCPU1;之后根据资源配置结果创建资源调度信息,此时将携带有资源调度信息的待处理事务写入共享数据结构中即可。CPU通过对共享数据结构进行检测,确定需要使用资源vCPU0和vCPU1对待处理事务进行处理,则此时根据资源调度信息确定运行资源vCPU0的超线程HT-s,之后再确定与超线程HT-s属于同一CPU的另一个超线程HT-t,基于超线程HT-s和HT-t组成处理待处理事务的目标超线程,以用于后续分别运行资源vCPU0和vCPU1,对待处理事务进行处理。Following the above example, when the resource scheduler determines that load balancing needs to be performed on pending transactions, it can first allocate resources vCPU0 and vCPU1 for pending transactions; The pending transactions can be written into the shared data structure. The CPU detects the shared data structure and determines that it needs to use the resources vCPU0 and vCPU1 to process the transaction to be processed. At this time, it determines the hyper-thread HT-s running the resource vCPU0 according to the resource scheduling information, and then determines that it belongs to the hyper-thread HT-s. Another hyperthread HT-t of the same CPU forms a target hyperthread for processing pending transactions based on the hyperthreads HT-s and HT-t, and is used for subsequently running resources vCPU0 and vCPU1 respectively to process pending transactions.
综上,通过选择同一物理资源对应的线程模块组成待处理事务关联的至少两个待处理事务,不仅可以保证后续对待处理事务进行处理的安全性,还能够提高事务处理效率,实现提高资源利用率。In summary, by selecting thread modules corresponding to the same physical resource to form at least two pending transactions associated with pending transactions, not only can the security of subsequent processing of pending transactions be guaranteed, but also transaction processing efficiency can be improved, and resource utilization can be improved. .
进一步的,当资源协调模块确定资源调度器需要执行待处理事务的情况下,则资源协调模块需要向执行待处理事务的线程模块发送事务处理请求,在此过程中,为了能够保证各个线程模块可以及时响应于事务处理请求作出反馈,则可以结合关联待处理事务的资源准备信息的中断请求完成事务处理请求的创建;本实施例中,所述资源协调模块,进一步被配置为针对每个线程模块分别确定资源准备信息,创建携带有所述资源准备信息的中断请求作为所述事务处理请求,并发送至每个线程模块。Further, when the resource coordination module determines that the resource scheduler needs to execute the pending transaction, the resource coordination module needs to send a transaction processing request to the thread module executing the pending transaction. In the process, in order to ensure that each thread module can If feedback is given in response to the transaction processing request in a timely manner, the creation of the transaction processing request can be completed in conjunction with the interrupt request associated with the resource preparation information of the transaction to be processed; in this embodiment, the resource coordination module is further configured for each thread module Determine resource preparation information respectively, create an interrupt request carrying the resource preparation information as the transaction processing request, and send it to each thread module.
具体的,资源准备信息具体是指通知各个线程模块需要对待处理事务进行处理的准备信息,各个线程模块可以响应于资源准备信息反馈当前时刻是否可以对待处理事务进行处理的信息;相应的,中断请求具体是指承载资源准备信息的核间中断,用于对各个线程模块进行运行中断。Specifically, the resource preparation information specifically refers to the preparation information that notifies each thread module that the transaction to be processed needs to be processed, and each thread module can respond to the resource preparation information to feed back information on whether the transaction to be processed can be processed at the current moment; correspondingly, the interrupt request Specifically, it refers to an inter-core interrupt carrying resource preparation information, which is used to interrupt the operation of each thread module.
基于此,当资源协调模块确定待处理事务关联的至少两个线程模块的情况下,可以针对每个线程模块分别创建资源准备信息,以用于可以通知各个线程模块需要执行待处理事务;之后创建携带有资源准备信息的核间中断,并将其作为事务处理请求发给各个线程模 块,实现各个线程模块可以基于核间中断及时针对执行待处理事务的操作作出响应。Based on this, when the resource coordination module determines that there are at least two thread modules associated with the transaction to be processed, resource preparation information can be created for each thread module, so as to notify each thread module that the transaction to be processed needs to be executed; then create The inter-core interrupt carrying resource preparation information is sent to each thread module as a transaction processing request block, so that each thread module can respond in time to the operation of executing the transaction to be processed based on the inter-core interrupt.
综上,通过创建携带有资源准备信息的中断请求作为事务处理请求,可以使得各个线程模块在接收到事务处理请求后,及时针对事务处理请求作出响应,从而有效的提高了事务处理效率。To sum up, by creating an interrupt request carrying resource preparation information as a transaction processing request, each thread module can respond to the transaction processing request in time after receiving the transaction processing request, thereby effectively improving the transaction processing efficiency.
更进一步的,各个线程模块在接收到携带有资源准备信息的中断请求后,则将第一时间针对中断请求作出响应;本实施例中,每个线程模块,进一步被配置为接收携带有所述资源准备信息的所述中断请求,并根据所述中断请求调用中断处理函数;通过所述中断处理函数对所述资源准备信息进行处理,根据信息处理结果确定所述线程状态信息。Furthermore, each thread module will respond to the interrupt request as soon as possible after receiving the interrupt request carrying the resource preparation information; in this embodiment, each thread module is further configured to receive the interrupt request carrying the resource preparation information. The resource preparation information is the interrupt request, and an interrupt processing function is called according to the interrupt request; the resource preparation information is processed by the interrupt processing function, and the thread state information is determined according to the information processing result.
具体的,中断处理函数具体是指能够基于资源准备信息向资源协调模块反馈线程状态信息的函数,其反馈的线程状态信息用于表征当前时刻线程模块的执行状态,线程状态信息分别为OK和Abort,其中,线程状态信息OK表示线程模块同意执行待处理事务;线程状态信息Abort表示线程模块由于某些原因拒绝执行待处理事务。Specifically, the interrupt processing function specifically refers to a function that can feed back thread state information to the resource coordination module based on resource preparation information. The thread state information fed back by it is used to represent the execution state of the thread module at the current moment. The thread state information is OK and Abort respectively. , where the thread status information OK indicates that the thread module agrees to execute the pending transaction; the thread status information Abort indicates that the thread module refuses to execute the pending transaction due to some reasons.
基于此,当线程模块接收到携带有资源准备信息的核间中断后,此时无论线程模块处理何种状态,都将根据核间中断调用中断处理函数,之后通过中断处理函数对资源准备信息进行处理,确定当前时刻线程模块对应的线程状态信息,并将线程状态信息反馈给资源协调模块,以实现资源协调模块可以根据各个线程模块反馈的线程状态信息作出相应的操作。Based on this, when the thread module receives an inter-core interrupt carrying resource preparation information, no matter what state the thread module is processing at this time, it will call the interrupt processing function according to the inter-core interrupt, and then perform resource preparation information through the interrupt processing function. Processing, determining the thread state information corresponding to the thread module at the current moment, and feeding back the thread state information to the resource coordination module, so that the resource coordination module can perform corresponding operations according to the thread state information fed back by each thread module.
沿用上例,CPU在确定待处理事务关联的超线程HT-s和HT-t后,此时可以针对各个超线程创建Prepare,之后将其整合在核间中断中发送给超线程HT-s和HT-t;超线程HT-s和HT-t接收到携带有Prepare的核间中断,将调用中断处理函数,之后根据中断处理函数确定线程状态信息为OK或者Abort,并将其反馈给CPU,以进行后续的事务处理操作。Following the above example, after the CPU determines the hyper-threads HT-s and HT-t associated with the transaction to be processed, it can create a Prepare for each hyper-thread at this time, and then integrate it into the inter-core interrupt and send it to the hyper-thread HT-s and HT-t HT-t; hyper-threads HT-s and HT-t receive the inter-core interrupt carrying Prepare, will call the interrupt processing function, and then determine the thread status information as OK or Abort according to the interrupt processing function, and feed it back to the CPU. for subsequent transaction processing operations.
综上,通过以核间中断携带资源准备信息进行事务请求,可以使得每个线程模块能够快速的响应于核间中断作出反馈,以保证在各个线程模块对应的线程状态信息均为可执行状态的情况下,可以快速的完成对待处理事务的处理操作。To sum up, by using inter-core interrupts to carry resource preparation information for transaction requests, each thread module can quickly respond to inter-core interrupts to make feedback, so as to ensure that the thread status information corresponding to each thread module is executable. Under such circumstances, the processing operation of the transaction to be processed can be completed quickly.
进一步的,各个线程模块与资源协调模块进行信息通信时,为了能够应对复杂的通信场景,可以通过信息共享单元完成信息的通信;本实施例中,每个线程模块,还被配置为将所述线程状态信息写入信息共享单元;Further, when each thread module communicates with the resource coordination module, in order to be able to cope with complex communication scenarios, the information communication can be completed through the information sharing unit; in this embodiment, each thread module is also configured to The thread state information is written into the information sharing unit;
相应的,所述资源协调模块,还被配置为通过轮询所述信息共享单元,确定每个线程模块对应的线程状态信息;根据每个线程模块对应的线程状态信息确定所述待处理事务对应的所述事务处理信息,并将所述事务处理信息写入所述信息共享单元;Correspondingly, the resource coordination module is further configured to determine the thread state information corresponding to each thread module by polling the information sharing unit; and write the transaction information into the information sharing unit;
相应的,每个线程模块,还被配置为通过轮询所述信息共享单元确定所述事务处理信息,并基于所述事务处理信息对所述待处理事务进行处理。Correspondingly, each thread module is further configured to determine the transaction processing information by polling the information sharing unit, and process the transaction to be processed based on the transaction processing information.
具体的,信息共享单元具体是指线程模块与资源协调模块之间进行通信时所使用的共享变量,包括但不限于网络、内存、局域网等;即用于支持各个线程模块可以快速的连通资源协调模块;相应的,当将信息写入信息共享单元后,信息共享单元中的变量将会发生改变,轮询信息共享单元的资源协调模块或线程模块可以根据变量的变化确定各自需要的信息。 Specifically, the information sharing unit specifically refers to the shared variables used when communicating between the thread module and the resource coordination module, including but not limited to network, memory, local area network, etc.; that is, it is used to support each thread module to quickly connect to resource coordination Correspondingly, when the information is written into the information sharing unit, the variables in the information sharing unit will change, and the resource coordination module or thread module polling the information sharing unit can determine the information they need according to the change of the variables.
基于此,当各个超线程根据事务处理请求确定各自对应的线程状态信息后,可以将线程状态信息写入信息共享单元;之后资源协调模块将不断的对信息共享单元进行轮询,当信息共享单元被各个超线程完成线程状态信息的写入后,此时资源协调模块将根据轮询结果确定每个超线程对应的线程状态信息,之后可以根据各个超线程反馈的线程状态信息确定事务处理信息,以决定是否对待处理事务进行处理;之后由于处理事务的操作由各个超线程完成,因此还需要将事务处理信息写入信息共享单元。最后每个超线程可以通过轮询信息共享单元,确定事务处理信息,并按照事务处理信息对待处理事务进行处理即可。Based on this, when each hyper-thread determines its corresponding thread state information according to the transaction processing request, it can write the thread state information into the information sharing unit; then the resource coordination module will continuously poll the information sharing unit, when the information sharing unit After the writing of the thread state information is completed by each hyperthread, the resource coordination module will determine the thread state information corresponding to each hyperthread according to the polling result, and then determine the transaction processing information according to the thread state information fed back by each hyperthread. to decide whether to process the transaction to be processed; afterward, since the operation of processing the transaction is completed by each hyper-thread, it is also necessary to write the transaction processing information into the information sharing unit. Finally, each hyperthread can determine the transaction processing information by polling the information sharing unit, and process the transaction to be processed according to the transaction processing information.
以超线程HT-s和HT-t需要反馈的线程状态信息OK为例,对通过信息共享单元传递消息的过程进行描述;超线程HT-s和HT-t此时将分别向共享变量中写入线程状态信息OK;之后CPU通过轮询共享变量确定超线程HT-s和HT-t是否同意执行待处理事务,根据轮询结果确定超线程HT-s和HT-t反馈的线程状态信息均为OK,则此时可以创建事务执行信息Commit,并将其写入共享变量;超线程HT-s和HT-t通过轮询共享变量确定事务执行信息为Commit,即可根据事务执行信息Commit分别调度资源vCPU0和vCPU1处理待处理事务。Taking the thread status information OK that hyper-threads HT-s and HT-t need to feed back as an example, describe the process of passing messages through the information sharing unit; hyper-threads HT-s and HT-t will write to the shared variable respectively The input thread status information is OK; then the CPU determines whether the hyper-threads HT-s and HT-t agree to execute the pending transaction by polling the shared variable, and determines that the thread status information fed back by the hyper-threads HT-s and HT-t is consistent according to the polling result. If it is OK, then you can create the transaction execution information Commit at this time, and write it into the shared variable; hyper-threads HT-s and HT-t determine that the transaction execution information is Commit by polling the shared variable, and you can use the transaction execution information Commit respectively Schedule resources vCPU0 and vCPU1 to process pending transactions.
综上,通过以信息共享单元为基础建立各个线程模块与资源协调模块之间的通信链路,可以使得各个线程模块和资源协调模块快速的确定相互反馈的信息,以提高事务处理效率,同时能够降低信息传递时间。In summary, by establishing the communication link between each thread module and resource coordination module based on the information sharing unit, each thread module and resource coordination module can quickly determine the mutual feedback information to improve transaction processing efficiency, and at the same time Reduce information transmission time.
具体实施时,考虑到各个线程模块在执行待处理事务时,将根据资源协调模块反馈的事务处理信息完成,在此过程中,而为了能够保证事务处理的安全性,则需要各个线程模块均为可使用状态才能够实现;本实施例中,所述资源协调模块,进一步被配置为根据每个线程模块对应的线程状态信息确定所述至少两个线程模块为可使用状态的情况下,根据所述可使用状态创建事务执行信息作为所述事务处理信息,并将所述事务处理信息写入所述信息共享单元;During the specific implementation, it is considered that when each thread module executes the transaction to be processed, it will complete the transaction processing information fed back by the resource coordination module. In this process, in order to ensure the security of transaction processing, each thread module needs to be The available state can only be realized; in this embodiment, the resource coordination module is further configured to determine that the at least two thread modules are in the available state according to the thread state information corresponding to each thread module, according to the The useable state creates transaction execution information as the transaction processing information, and writes the transaction processing information into the information sharing unit;
相应的,每个线程模块,进一步被配置为通过轮询所述信息共享单元确定所述事务执行信息,根据所述事务执行信息确定目标资源,并将所述目标资源写入资源调度队列;在所述目标资源满足所述资源调度队列的事务处理条件的情况下,通过所述目标资源对所述待处理事务进行处理。Correspondingly, each thread module is further configured to determine the transaction execution information by polling the information sharing unit, determine the target resource according to the transaction execution information, and write the target resource into the resource scheduling queue; When the target resource satisfies the transaction processing condition of the resource scheduling queue, the pending transaction is processed by the target resource.
具体的,可使用状态具体是指线程模块可以对待处理事务进行处理;相应的,事务执行信息具体是指全部线程模块都同意处理待处理事务;相应的,目标资源具体是指线程模块需要运行的资源,用于处理待处理事务;相应的,资源调度队列具体是指线程模块对应的队列,用于对将要运行的目标资源进行规范化排队。相应的,事务处理条件具体是指目标资源被运行条件。Specifically, the available status specifically refers to the thread module that can process the transaction to be processed; correspondingly, the transaction execution information specifically refers to that all thread modules agree to process the pending transaction; correspondingly, the target resource specifically refers to the resource that the thread module needs to run Resources are used to process pending transactions; correspondingly, the resource scheduling queue specifically refers to the queue corresponding to the thread module, which is used for standardized queuing of target resources to be run. Correspondingly, the transaction processing condition specifically refers to the operating condition of the target resource.
基于此,资源协调模块根据每个线程模块反馈的线程状态信息,确定各个线程模块均为可使用状态的情况下,说明至少两个线程模块中的各个线程模块均同意对待处理事务进行处理,此时可以根据使用状态创建事务执行信息作为事务处理信息,并将其写入到信息共享单元;各个线程模块通过轮询信息共享单元,确定关联待处理事务的线程模块都同意处理待处理事务,则各个线程模块可以根据事务执行信息确定各自运行的目标资源,并将目标资源写入资源调度队列;并在目标资源满足资源调度队列的事务处理条件的情况下, 说明线程模块可以运行目标资源,则此时通过目标资源对待处理事务进行处理即可。Based on this, when the resource coordination module determines that each thread module is in an available state according to the thread status information fed back by each thread module, it means that each thread module in at least two thread modules agrees to process the transaction to be processed. According to the usage status, transaction execution information can be created as transaction processing information, and written into the information sharing unit; each thread module polls the information sharing unit to determine that the thread modules associated with the pending transaction agree to process the pending transaction, then Each thread module can determine the target resource to run according to the transaction execution information, and write the target resource into the resource scheduling queue; and when the target resource meets the transaction processing conditions of the resource scheduling queue, Indicates that the thread module can run the target resource, then the transaction to be processed can be processed through the target resource at this time.
沿用上例,确定超线程HT-s和HT-t反馈的线程状态信息均为OK,则此时CPU将根据各个超线程的线程状态信息OK创建事务执行信息Commit,并将其写入共享变量;超线程HT-s和HT-t通过轮询共享变量确定事务执行信息为Commit,则此时超线程HT-s会将资源vCPU0写入其对应的资源调度队列,以及超线程HT-t会将资源vCPU1写入其对应的资源调度队列;以用于后续满足事务处理条件的情况下,通过资源vCPU0和vCPU1对待处理事务进行处理。Following the above example, confirm that the thread state information fed back by hyper-threads HT-s and HT-t is OK, then the CPU will create transaction execution information Commit according to the thread state information OK of each hyper-thread, and write it into the shared variable ; Hyper-thread HT-s and HT-t determine that the transaction execution information is Commit by polling shared variables, then at this time, hyper-thread HT-s will write resource vCPU0 into its corresponding resource scheduling queue, and hyper-thread HT-t will The resource vCPU1 is written into its corresponding resource scheduling queue; it is used to process the transaction to be processed through the resources vCPU0 and vCPU1 when the transaction processing condition is satisfied subsequently.
另一方面,在存在任意一个线程模块无法处理待处理事务的情况下,则此时资源协调模块,还被配置为根据每个线程模块对应的线程状态信息确定至少一个线程模块为非使用状态的情况下,根据所述非使用状态创建事务中断信息作为所述事务处理信息,并将所述事务处理信息写入所述信息共享单元;On the other hand, in the case that any thread module cannot process pending transactions, the resource coordination module is also configured to determine that at least one thread module is in an unused state according to the thread state information corresponding to each thread module In this case, creating transaction interruption information according to the non-use state as the transaction processing information, and writing the transaction processing information into the information sharing unit;
相应的,每个线程模块,还被配置为通过轮询所述信息共享单元确定所述事务中断信息,根据所述事务中断信息确定至少两个目标线程模块,并向所述至少两个目标线程模块发送所述待处理事务。Correspondingly, each thread module is further configured to determine the transaction interruption information by polling the information sharing unit, determine at least two target thread modules according to the transaction interruption information, and send the at least two target thread modules The module sends the pending transaction.
具体的,非使用状态具体是指线程模块无法在当前时刻处理待处理事务;相应的,事务中断信息具体是指资源协调者取消处理待处理事务的信息。Specifically, the non-use state specifically means that the thread module cannot process the pending transaction at the current moment; correspondingly, the transaction interruption information specifically refers to the information that the resource coordinator cancels processing the pending transaction.
基于此,资源协调模块根据每个线程模块反馈的线程状态信息,确定存在至少一个线程模块反馈的线程状态信息表征线程模块为非使用状态的情况下,说明存在至少一个线程模块无法在当前时刻对待处理事务进行处理,则此时资源协调模块可以根据非使用状态创建事务中断信息作为事务处理信息,并将其写入到信息共享单元;当各个线程模块通过轮询信息共享单元确定有其他线程模块无法处理待处理事物的情况下,则此时可以根据事务中断信息确定至少两个目标线程模块,之后由目标线程模块对待处理事务进行处理。Based on this, the resource coordination module determines that there is at least one thread module fed back by the thread status information that indicates that the thread module is in a non-use state according to the thread status information fed back by each thread module, indicating that there is at least one thread module that cannot be treated at the current moment. If the transaction is processed, the resource coordination module can create transaction interruption information according to the non-use state as transaction processing information, and write it to the information sharing unit; when each thread module determines that there are other thread modules by polling the information sharing unit If the transaction to be processed cannot be processed, at least two target thread modules may be determined according to the transaction interruption information, and then the target thread module processes the transaction to be processed.
沿用上例,在超线程HT-t的线程状态信息与超线程HT-s的线程状态信息不一致的情况下,说明超线程HT-t的线程状态信息为Abort,即超线程HT-t当前时刻无法执行待处理事务,则CPU会向共享变量中写入事务中断信息Fail;超线程HT-s和HT-t通过轮询共享变量确定事务中断信息Fail,则确定超线程HT-s和HT-t将根据事务中断信息Fail放弃执行待处理事务,即不进行资源vCPU0和vCPU1的调度,可以继续由超线程HT-x和HT-y运行资源vCPU0和vCPU1,实现待处理事务的处理操作。Following the above example, if the thread state information of hyperthread HT-t is inconsistent with that of hyperthread HT-s, it means that the thread state information of hyperthread HT-t is Abort, that is, the current moment of hyperthread HT-t If the pending transaction cannot be executed, the CPU will write the transaction interruption information Fail to the shared variable; the hyperthread HT-s and HT-t determine the transaction interruption information Fail by polling the shared variable, and then determine the hyperthread HT-s and HT- t will give up execution of the pending transaction according to the transaction interruption information Fail, that is, the resources vCPU0 and vCPU1 will not be scheduled, and the hyperthreads HT-x and HT-y can continue to run the resources vCPU0 and vCPU1 to realize the processing operation of the pending transaction.
本说明书提供的资源处理系统,资源协调模块通过检测共享数据结构获得待处理事务的情况下,为了能够提高事务处理效率,以及资源消耗成本的降低,此时可以确定待处理事务关联的至少两个线程模块,且各个线程模块所属的物理资源相同;之后向每个线程模块分别发送事务处理请求,每个线程模块可以根据事务处理请求确定线程状态信息,并将其反馈到资源协调模块;资源协调模块可以通过整合各个线程模块的线程状态信息确定待处理事务的事务处理信息,并将事务处理信息反馈给各个线程模块,最后每个线程模块即可根据事务处理信息对待处理事务进行处理操作。实现在进行事务处理时,可以通过资源协调模块统计各个线程模块的线程状态,以决定是否对待处理事务进行处理,且在处理过程中,将采用统一决策完成,保证待处理事务要么被全部线程执行,要么全部线程都不执行,从而提高事务处理安全性的同时,提高事务处理效率,以降低资源消耗成本。 In the resource processing system provided in this manual, when the resource coordination module obtains transactions to be processed by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, at this time, at least two associated transactions to be processed can be determined Thread modules, and the physical resources of each thread module are the same; then send transaction processing requests to each thread module, each thread module can determine the thread status information according to the transaction processing request, and feed it back to the resource coordination module; resource coordination The module can determine the transaction processing information of the transaction to be processed by integrating the thread status information of each thread module, and feed back the transaction processing information to each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information. Realize that during transaction processing, the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
图2示出了根据本说明书一个实施例提供的一种资源处理方法的流程图,应用于资源协调模块,具体包括以下步骤。Fig. 2 shows a flow chart of a resource processing method provided according to an embodiment of this specification, which is applied to a resource coordination module, and specifically includes the following steps.
步骤S202,通过检测共享数据结构获得待处理事务。Step S202, obtain the transaction to be processed by detecting the shared data structure.
步骤S204,确定所述待处理事务关联的至少两个线程模块,并向每个线程模块发送事务处理请求。Step S204, determining at least two thread modules associated with the transaction to be processed, and sending a transaction processing request to each thread module.
步骤S206,接收每个线程模块针对所述事务处理请求反馈的线程状态信息。Step S206, receiving thread state information fed back by each thread module for the transaction processing request.
步骤S208,基于所述线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息。Step S208, determine transaction processing information corresponding to the transaction to be processed based on the thread state information, and send the transaction processing information to each thread module.
一个可选的实施例中,通过对共享数据结构进行检测,获得携带有资源调度信息的待处理事务;根据资源调度信息确定待处理事务关联的至少两个线程模块;在确定待处理事务为待执行状态的情况下,向每个线程模块发送事务处理请求。In an optional embodiment, by detecting the shared data structure, the pending transaction carrying resource scheduling information is obtained; according to the resource scheduling information, at least two thread modules associated with the pending transaction are determined; after determining that the pending transaction is a pending transaction In the case of execution status, a transaction processing request is sent to each thread module.
一个可选的实施例中,针对每个线程模块分别确定资源准备信息,创建携带有资源准备信息的中断请求作为事务处理请求,并发送至每个线程模块。In an optional embodiment, the resource preparation information is determined for each thread module, an interrupt request carrying the resource preparation information is created as a transaction processing request, and sent to each thread module.
一个可选的实施例中,每个线程模块将线程状态信息写入信息共享单元;In an optional embodiment, each thread module writes the thread state information into the information sharing unit;
相应的,资源协调模块通过轮询信息共享单元,确定每个线程模块对应的线程状态信息;根据每个线程模块对应的线程状态信息确定待处理事务对应的事务处理信息,并将事务处理信息写入信息共享单元;Correspondingly, the resource coordination module determines the thread state information corresponding to each thread module by polling the information sharing unit; determines the transaction processing information corresponding to the transaction to be processed according to the thread state information corresponding to each thread module, and writes the transaction processing information to into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务处理信息,并基于事务处理信息对待处理事务进行处理。Correspondingly, each thread module determines the transaction processing information by polling the information sharing unit, and processes the transaction to be processed based on the transaction processing information.
一个可选的实施例中,资源协调模块根据每个线程模块对应的线程状态信息确定至少两个线程模块为可使用状态的情况下,根据可使用状态创建事务执行信息作为事务处理信息,并将事务处理信息写入信息共享单元;In an optional embodiment, when the resource coordination module determines that at least two thread modules are available according to the thread status information corresponding to each thread module, the transaction execution information is created according to the available status as the transaction processing information, and the The transaction processing information is written into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务执行信息,根据事务执行信息确定目标资源,并将目标资源写入资源调度队列;在目标资源满足资源调度队列的事务处理条件的情况下,通过目标资源对待处理事务进行处理。Correspondingly, each thread module determines the transaction execution information by polling the information sharing unit, determines the target resource according to the transaction execution information, and writes the target resource into the resource scheduling queue; when the target resource meets the transaction processing conditions of the resource scheduling queue , process the pending transaction through the target resource.
一个可选的实施例中,资源协调模块根据每个线程模块对应的线程状态信息确定至少一个线程模块为非使用状态的情况下,根据非使用状态创建事务中断信息作为事务处理信息,并将事务处理信息写入信息共享单元;In an optional embodiment, when the resource coordination module determines that at least one thread module is in a non-use state according to the thread state information corresponding to each thread module, the transaction interruption information is created as the transaction processing information according to the non-use state, and the transaction Write the processing information into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务中断信息,根据事务中断信息确定至少两个目标线程模块,并向至少两个目标线程模块发送待处理事务。Correspondingly, each thread module determines transaction interruption information by polling the information sharing unit, determines at least two target thread modules according to the transaction interruption information, and sends pending transactions to at least two target thread modules.
一个可选的实施例中,根据资源调度信息选择待处理事务关联的事务线程模块,并确定事务线程模块所属的物理资源;在物理资源中选择事务线程模块关联的至少一个关联线程模块;基于事务线程模块和至少一个关联线程模块组成待处理事务关联的至少两个线程模块。In an optional embodiment, select the transaction thread module associated with the transaction to be processed according to the resource scheduling information, and determine the physical resource to which the transaction thread module belongs; select at least one associated thread module associated with the transaction thread module in the physical resource; The thread module and at least one associated thread module constitute at least two thread modules associated with the transaction to be processed.
综上所述,资源协调模块通过检测共享数据结构获得待处理事务的情况下,为了能够提高事务处理效率,以及资源消耗成本的降低,此时可以根据待处理事务中携带的资源调度信息确定待处理事务关联的至少两个线程模块,且各个线程模块所属的物理资源相同; 之后在确定所述待处理事务为待执行状态的情况下,之后向每个线程模块分别发送事务处理请求,每个线程模块可以根据事务处理请求确定线程状态信息,并将其反馈到资源协调模块;资源协调模块可以通过整合各个线程模块的线程状态信息确定待处理事务的事务处理信息,并将事务处理信息反馈给各个线程模块,最后每个线程模块即可根据事务处理信息对待处理事务进行处理操作。实现在进行事务处理时,可以通过资源协调模块统计各个线程模块的线程状态,以决定是否对待处理事务进行处理,且在处理过程中,将采用统一决策完成,保证待处理事务要么被全部线程执行,要么全部线程都不执行,从而提高事务处理安全性的同时,提高事务处理效率,以降低资源消耗成本。To sum up, when the resource coordination module obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it can determine the pending transactions according to the resource scheduling information carried in the pending transactions. Process at least two thread modules associated with the transaction, and each thread module belongs to the same physical resource; Afterwards, when it is determined that the transaction to be processed is a state to be executed, a transaction processing request is then sent to each thread module, and each thread module can determine the thread state information according to the transaction processing request, and feed it back to the resource coordination module ; The resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information operate. Realize that during transaction processing, the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
上述为本实施例的一种资源处理方法的示意性方案。需要说明的是,该资源处理方法的技术方案与上述的资源处理系统的技术方案属于同一构思,资源处理方法的技术方案未详细描述的细节内容,均可以参见上述资源处理系统的技术方案的描述。The foregoing is a schematic solution of a resource processing method in this embodiment. It should be noted that the technical solution of the resource processing method and the above-mentioned technical solution of the resource processing system belong to the same concept, and details not described in detail in the technical solution of the resource processing method can be found in the description of the above-mentioned technical solution of the resource processing system .
图3示出了根据本说明书一个实施例提供的另一种资源处理方法的流程图,应用于线程模块,具体包括以下步骤。Fig. 3 shows a flow chart of another resource processing method provided according to an embodiment of the present specification, which is applied to a thread module, and specifically includes the following steps.
步骤S302,接收资源协调模块针对待处理事务发送的事务处理请求。Step S302, receiving the transaction processing request sent by the resource coordination module for the transaction to be processed.
步骤S304,根据所述事务处理请求确定线程状态信息,并将所述线程状态信息反馈至所述资源协调模块。Step S304, determining thread state information according to the transaction processing request, and feeding back the thread state information to the resource coordination module.
步骤S306,接收所述资源协调模块针对所述线程状态信息反馈的事务处理信息。Step S306, receiving transaction processing information fed back by the resource coordination module for the thread state information.
步骤S308,基于所述事务处理信息对所述待处理事务进行处理。Step S308, process the transaction to be processed based on the transaction processing information.
一个可选的实施例中,接收携带有资源准备信息的中断请求,并根据中断请求调用中断处理函数;通过中断处理函数对资源准备信息进行处理,根据信息处理结果确定线程状态信息。In an optional embodiment, an interrupt request carrying resource preparation information is received, and an interrupt processing function is called according to the interrupt request; the resource preparation information is processed through the interrupt processing function, and thread state information is determined according to the information processing result.
一个可选的实施例中,每个线程模块将线程状态信息写入信息共享单元;In an optional embodiment, each thread module writes the thread state information into the information sharing unit;
相应的,资源协调模块通过轮询信息共享单元,确定每个线程模块对应的线程状态信息;根据每个线程模块对应的线程状态信息确定待处理事务对应的事务处理信息,并将事务处理信息写入信息共享单元;Correspondingly, the resource coordination module determines the thread state information corresponding to each thread module by polling the information sharing unit; determines the transaction processing information corresponding to the transaction to be processed according to the thread state information corresponding to each thread module, and writes the transaction processing information to into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务处理信息,并基于事务处理信息对待处理事务进行处理。Correspondingly, each thread module determines the transaction processing information by polling the information sharing unit, and processes the transaction to be processed based on the transaction processing information.
一个可选的实施例中,资源协调模块根据每个线程模块对应的线程状态信息确定至少两个线程模块为可使用状态的情况下,根据可使用状态创建事务执行信息作为事务处理信息,并将事务处理信息写入信息共享单元;In an optional embodiment, when the resource coordination module determines that at least two thread modules are available according to the thread status information corresponding to each thread module, the transaction execution information is created according to the available status as the transaction processing information, and the The transaction processing information is written into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务执行信息,根据事务执行信息确定目标资源,并将目标资源写入资源调度队列;在目标资源满足资源调度队列的事务处理条件的情况下,通过目标资源对待处理事务进行处理。Correspondingly, each thread module determines the transaction execution information by polling the information sharing unit, determines the target resource according to the transaction execution information, and writes the target resource into the resource scheduling queue; when the target resource meets the transaction processing conditions of the resource scheduling queue , process the pending transaction through the target resource.
一个可选的实施例中,资源协调模块根据每个线程模块对应的线程状态信息确定至少一个线程模块为非使用状态的情况下,根据非使用状态创建事务中断信息作为事务处理信息,并将事务处理信息写入信息共享单元;In an optional embodiment, when the resource coordination module determines that at least one thread module is in a non-use state according to the thread state information corresponding to each thread module, the transaction interruption information is created as the transaction processing information according to the non-use state, and the transaction Write the processing information into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务中断信息,根据事务中断信息 确定至少两个目标线程模块,并向至少两个目标线程模块发送待处理事务。Correspondingly, each thread module determines the transaction interruption information by polling the information sharing unit, and according to the transaction interruption information Determine at least two target thread modules, and send pending transactions to the at least two target thread modules.
综上所述,资源协调模块通过检测共享数据结构获得待处理事务的情况下,为了能够提高事务处理效率,以及资源消耗成本的降低,此时可以根据待处理事务中携带的资源调度信息确定待处理事务关联的至少两个线程模块,且各个线程模块所属的物理资源相同;之后在确定所述待处理事务为待执行状态的情况下,之后向每个线程模块分别发送事务处理请求,每个线程模块可以根据事务处理请求确定线程状态信息,并将其反馈到资源协调模块;资源协调模块可以通过整合各个线程模块的线程状态信息确定待处理事务的事务处理信息,并将事务处理信息反馈给各个线程模块,最后每个线程模块即可根据事务处理信息对待处理事务进行处理操作。实现在进行事务处理时,可以通过资源协调模块统计各个线程模块的线程状态,以决定是否对待处理事务进行处理,且在处理过程中,将采用统一决策完成,保证待处理事务要么被全部线程执行,要么全部线程都不执行,从而提高事务处理安全性的同时,提高事务处理效率,以降低资源消耗成本。To sum up, when the resource coordination module obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it can determine the pending transactions according to the resource scheduling information carried in the pending transactions. Process at least two thread modules associated with the transaction, and the physical resources to which each thread module belongs are the same; then when it is determined that the transaction to be processed is to be executed, then send a transaction processing request to each thread module, each The thread module can determine the thread state information according to the transaction processing request, and feed it back to the resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to Each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information. Realize that during transaction processing, the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
上述为本实施例的另一种资源处理方法的示意性方案。需要说明的是,该资源处理方法的技术方案与上述的资源处理系统的技术方案属于同一构思,资源处理方法的技术方案未详细描述的细节内容,均可以参见上述资源处理系统的技术方案的描述。The foregoing is a schematic solution of another resource processing method in this embodiment. It should be noted that the technical solution of the resource processing method and the above-mentioned technical solution of the resource processing system belong to the same concept, and details not described in detail in the technical solution of the resource processing method can be found in the description of the above-mentioned technical solution of the resource processing system .
与上述方法实施例相对应,本说明书还提供了资源处理装置实施例,图4示出了本说明书一个实施例提供的一种资源处理装置的结构示意图。如图4所示,该装置应用于资源协调模块,包括:Corresponding to the foregoing method embodiments, this specification also provides an embodiment of a resource processing device. FIG. 4 shows a schematic structural diagram of a resource processing device provided by an embodiment of this specification. As shown in Figure 4, the device is applied to the resource coordination module, including:
检测事务单元402,被配置为通过检测共享数据结构获得待处理事务;A detection transaction unit 402 configured to obtain pending transactions by detecting a shared data structure;
确定线程单元404,被配置为确定所述待处理事务关联的至少两个线程模块,并向每个线程模块发送事务处理请求;Determine thread unit 404, configured to determine at least two thread modules associated with the transaction to be processed, and send a transaction processing request to each thread module;
接收信息单元406,被配置为接收每个线程模块针对所述事务处理请求反馈的线程状态信息;The information receiving unit 406 is configured to receive thread state information fed back by each thread module for the transaction processing request;
发送信息单元408,被配置为基于所述线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息。The sending information unit 408 is configured to determine transaction processing information corresponding to the transaction to be processed based on the thread state information, and send the transaction processing information to each thread module.
一个可选的实施例中,该装置还包括:通过对共享数据结构进行检测,获得携带有资源调度信息的待处理事务;根据资源调度信息确定待处理事务关联的至少两个线程模块;在确定待处理事务为待执行状态的情况下,向每个线程模块发送事务处理请求。In an optional embodiment, the device further includes: obtaining a pending transaction carrying resource scheduling information by detecting the shared data structure; determining at least two thread modules associated with the pending transaction according to the resource scheduling information; determining When the transaction to be processed is in the pending state, a transaction processing request is sent to each thread module.
一个可选的实施例中,该装置还包括:针对每个线程模块分别确定资源准备信息,创建携带有资源准备信息的中断请求作为事务处理请求,并发送至每个线程模块。In an optional embodiment, the device further includes: separately determining resource preparation information for each thread module, creating an interrupt request carrying the resource preparation information as a transaction processing request, and sending it to each thread module.
一个可选的实施例中,该装置还包括:每个线程模块将线程状态信息写入信息共享单元;In an optional embodiment, the device further includes: each thread module writes the thread state information into the information sharing unit;
相应的,资源协调模块通过轮询信息共享单元,确定每个线程模块对应的线程状态信息;根据每个线程模块对应的线程状态信息确定待处理事务对应的事务处理信息,并将事务处理信息写入信息共享单元;Correspondingly, the resource coordination module determines the thread state information corresponding to each thread module by polling the information sharing unit; determines the transaction processing information corresponding to the transaction to be processed according to the thread state information corresponding to each thread module, and writes the transaction processing information to into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务处理信息,并基于事务处理信息对待处理事务进行处理。 Correspondingly, each thread module determines the transaction processing information by polling the information sharing unit, and processes the transaction to be processed based on the transaction processing information.
一个可选的实施例中,该装置还包括:资源协调模块根据每个线程模块对应的线程状态信息确定至少两个线程模块为可使用状态的情况下,根据可使用状态创建事务执行信息作为事务处理信息,并将事务处理信息写入信息共享单元;In an optional embodiment, the device further includes: when the resource coordination module determines that at least two thread modules are available according to the thread status information corresponding to each thread module, create transaction execution information according to the available status as a transaction processing information and writing transaction processing information to an information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务执行信息,根据事务执行信息确定目标资源,并将目标资源写入资源调度队列;在目标资源满足资源调度队列的事务处理条件的情况下,通过目标资源对待处理事务进行处理。Correspondingly, each thread module determines the transaction execution information by polling the information sharing unit, determines the target resource according to the transaction execution information, and writes the target resource into the resource scheduling queue; when the target resource meets the transaction processing conditions of the resource scheduling queue , process the pending transaction through the target resource.
一个可选的实施例中,该装置还包括:资源协调模块根据每个线程模块对应的线程状态信息确定至少一个线程模块为非使用状态的情况下,根据非使用状态创建事务中断信息作为事务处理信息,并将事务处理信息写入信息共享单元;In an optional embodiment, the device further includes: when the resource coordination module determines that at least one thread module is in a non-use state according to the thread state information corresponding to each thread module, create transaction interruption information according to the non-use state as transaction processing information, and write the transaction information into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务中断信息,根据事务中断信息确定至少两个目标线程模块,并向至少两个目标线程模块发送待处理事务。Correspondingly, each thread module determines transaction interruption information by polling the information sharing unit, determines at least two target thread modules according to the transaction interruption information, and sends pending transactions to at least two target thread modules.
一个可选的实施例中,该装置还包括:根据资源调度信息选择待处理事务关联的事务线程模块,并确定事务线程模块所属的物理资源;在物理资源中选择事务线程模块关联的至少一个关联线程模块;基于事务线程模块和至少一个关联线程模块组成待处理事务关联的至少两个线程模块。In an optional embodiment, the device further includes: selecting the transaction thread module associated with the transaction to be processed according to the resource scheduling information, and determining the physical resource to which the transaction thread module belongs; selecting at least one association associated with the transaction thread module in the physical resource A thread module; based on the transaction thread module and at least one associated thread module, at least two thread modules associated with the transaction to be processed are formed.
综上所述,资源协调模块通过检测共享数据结构获得待处理事务的情况下,为了能够提高事务处理效率,以及资源消耗成本的降低,此时可以根据待处理事务中携带的资源调度信息确定待处理事务关联的至少两个线程模块,且各个线程模块所属的物理资源相同;之后在确定所述待处理事务为待执行状态的情况下,之后向每个线程模块分别发送事务处理请求,每个线程模块可以根据事务处理请求确定线程状态信息,并将其反馈到资源协调模块;资源协调模块可以通过整合各个线程模块的线程状态信息确定待处理事务的事务处理信息,并将事务处理信息反馈给各个线程模块,最后每个线程模块即可根据事务处理信息对待处理事务进行处理操作。实现在进行事务处理时,可以通过资源协调模块统计各个线程模块的线程状态,以决定是否对待处理事务进行处理,且在处理过程中,将采用统一决策完成,保证待处理事务要么被全部线程执行,要么全部线程都不执行,从而提高事务处理安全性的同时,提高事务处理效率,以降低资源消耗成本。To sum up, when the resource coordination module obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it can determine the pending transactions according to the resource scheduling information carried in the pending transactions. Process at least two thread modules associated with the transaction, and the physical resources to which each thread module belongs are the same; then when it is determined that the transaction to be processed is to be executed, then send a transaction processing request to each thread module, each The thread module can determine the thread state information according to the transaction processing request, and feed it back to the resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to Each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information. Realize that during transaction processing, the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
上述为本实施例的一种资源处理装置的示意性方案。需要说明的是,该资源处理装置的技术方案与上述的资源处理系统的技术方案属于同一构思,资源处理装置的技术方案未详细描述的细节内容,均可以参见上述资源处理系统的技术方案的描述。The foregoing is a schematic solution of a resource processing device in this embodiment. It should be noted that the technical solution of the resource processing device and the technical solution of the above-mentioned resource processing system belong to the same idea, and details of the technical solution of the resource processing device that are not described in detail can be found in the description of the above-mentioned technical solution of the resource processing system .
与上述方法实施例相对应,本说明书还提供了资源处理装置实施例,图5示出了本说明书一个实施例提供的另一种资源处理装置的结构示意图。如图5所示,该装置应用于线程模块,包括:Corresponding to the foregoing method embodiments, this specification also provides an embodiment of a resource processing device. FIG. 5 shows a schematic structural diagram of another resource processing device provided by an embodiment of this specification. As shown in Figure 5, the device is applied to the thread module, including:
接收请求单元502,被配置为接收资源协调模块针对待处理事务发送的事务处理请求;The receiving request unit 502 is configured to receive a transaction processing request sent by the resource coordination module for the transaction to be processed;
确定信息单元504,被配置为根据所述事务处理请求确定线程状态信息,并将所述线程状态信息反馈至所述资源协调模块;The determining information unit 504 is configured to determine thread state information according to the transaction processing request, and feed back the thread state information to the resource coordination module;
接收信息单元506,被配置为接收所述资源协调模块针对所述线程状态信息反馈的事务处理信息; An information receiving unit 506 configured to receive transaction processing information fed back by the resource coordination module for the thread state information;
处理事务单元508,被配置为基于所述事务处理信息对所述待处理事务进行处理。The transaction processing unit 508 is configured to process the transaction to be processed based on the transaction processing information.
一个可选的实施例中,该装置还包括:接收携带有资源准备信息的中断请求,并根据中断请求调用中断处理函数;通过中断处理函数对资源准备信息进行处理,根据信息处理结果确定线程状态信息。In an optional embodiment, the device further includes: receiving an interrupt request carrying resource preparation information, and calling an interrupt processing function according to the interrupt request; processing the resource preparation information through the interrupt processing function, and determining the thread state according to the information processing result information.
一个可选的实施例中,该装置还包括:每个线程模块将线程状态信息写入信息共享单元;In an optional embodiment, the device further includes: each thread module writes the thread state information into the information sharing unit;
相应的,资源协调模块通过轮询信息共享单元,确定每个线程模块对应的线程状态信息;根据每个线程模块对应的线程状态信息确定待处理事务对应的事务处理信息,并将事务处理信息写入信息共享单元;Correspondingly, the resource coordination module determines the thread state information corresponding to each thread module by polling the information sharing unit; determines the transaction processing information corresponding to the transaction to be processed according to the thread state information corresponding to each thread module, and writes the transaction processing information to into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务处理信息,并基于事务处理信息对待处理事务进行处理。Correspondingly, each thread module determines the transaction processing information by polling the information sharing unit, and processes the transaction to be processed based on the transaction processing information.
一个可选的实施例中,该装置还包括:资源协调模块根据每个线程模块对应的线程状态信息确定至少两个线程模块为可使用状态的情况下,根据可使用状态创建事务执行信息作为事务处理信息,并将事务处理信息写入信息共享单元;In an optional embodiment, the device further includes: when the resource coordination module determines that at least two thread modules are available according to the thread status information corresponding to each thread module, create transaction execution information according to the available status as a transaction processing information and writing transaction processing information to an information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务执行信息,根据事务执行信息确定目标资源,并将目标资源写入资源调度队列;在目标资源满足资源调度队列的事务处理条件的情况下,通过目标资源对待处理事务进行处理。Correspondingly, each thread module determines the transaction execution information by polling the information sharing unit, determines the target resource according to the transaction execution information, and writes the target resource into the resource scheduling queue; when the target resource meets the transaction processing conditions of the resource scheduling queue , process the pending transaction through the target resource.
一个可选的实施例中,该装置还包括:资源协调模块根据每个线程模块对应的线程状态信息确定至少一个线程模块为非使用状态的情况下,根据非使用状态创建事务中断信息作为事务处理信息,并将事务处理信息写入信息共享单元;In an optional embodiment, the device further includes: when the resource coordination module determines that at least one thread module is in a non-use state according to the thread state information corresponding to each thread module, create transaction interruption information according to the non-use state as transaction processing information, and write the transaction information into the information sharing unit;
相应的,每个线程模块通过轮询信息共享单元确定事务中断信息,根据事务中断信息确定至少两个目标线程模块,并向至少两个目标线程模块发送待处理事务。Correspondingly, each thread module determines transaction interruption information by polling the information sharing unit, determines at least two target thread modules according to the transaction interruption information, and sends pending transactions to at least two target thread modules.
综上所述,资源协调模块通过检测共享数据结构获得待处理事务的情况下,为了能够提高事务处理效率,以及资源消耗成本的降低,此时可以根据待处理事务中携带的资源调度信息确定待处理事务关联的至少两个线程模块,且各个线程模块所属的物理资源相同;之后在确定所述待处理事务为待执行状态的情况下,之后向每个线程模块分别发送事务处理请求,每个线程模块可以根据事务处理请求确定线程状态信息,并将其反馈到资源协调模块;资源协调模块可以通过整合各个线程模块的线程状态信息确定待处理事务的事务处理信息,并将事务处理信息反馈给各个线程模块,最后每个线程模块即可根据事务处理信息对待处理事务进行处理操作。实现在进行事务处理时,可以通过资源协调模块统计各个线程模块的线程状态,以决定是否对待处理事务进行处理,且在处理过程中,将采用统一决策完成,保证待处理事务要么被全部线程执行,要么全部线程都不执行,从而提高事务处理安全性的同时,提高事务处理效率,以降低资源消耗成本。To sum up, when the resource coordination module obtains pending transactions by detecting the shared data structure, in order to improve transaction processing efficiency and reduce resource consumption costs, it can determine the pending transactions according to the resource scheduling information carried in the pending transactions. Process at least two thread modules associated with the transaction, and the physical resources to which each thread module belongs are the same; then when it is determined that the transaction to be processed is to be executed, then send a transaction processing request to each thread module, each The thread module can determine the thread state information according to the transaction processing request, and feed it back to the resource coordination module; the resource coordination module can determine the transaction processing information of the transaction to be processed by integrating the thread state information of each thread module, and feed back the transaction processing information to Each thread module, and finally each thread module can process the transaction to be processed according to the transaction processing information. Realize that during transaction processing, the resource coordination module can count the thread status of each thread module to decide whether to process the transaction to be processed, and in the process of processing, it will be completed by a unified decision to ensure that the transaction to be processed is either executed by all threads , or all threads are not executed, so as to improve transaction processing security and improve transaction processing efficiency to reduce resource consumption costs.
上述为本实施例的另一种资源处理装置的示意性方案。需要说明的是,该资源处理装置的技术方案与上述的资源处理系统的技术方案属于同一构思,资源处理装置的技术方案未详细描述的细节内容,均可以参见上述资源处理系统的技术方案的描述。The foregoing is a schematic solution of another resource processing apparatus in this embodiment. It should be noted that the technical solution of the resource processing device and the technical solution of the above-mentioned resource processing system belong to the same idea, and details of the technical solution of the resource processing device that are not described in detail can be found in the description of the above-mentioned technical solution of the resource processing system .
图6示出了根据本说明书一个实施例提供的一种计算设备600的结构框图。该计算设备600的部件包括但不限于存储器610和处理器620。处理器620与存储器610通过总线 630相连接,数据库650用于保存数据。FIG. 6 shows a structural block diagram of a computing device 600 provided according to an embodiment of this specification. Components of the computing device 600 include, but are not limited to, memory 610 and processor 620 . Processor 620 and memory 610 via bus 630 is connected, and the database 650 is used to save data.
计算设备600还包括接入设备640,接入设备640使得计算设备600能够经由一个或多个网络660通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备640可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口,等等。Computing device 600 also includes an access device 640 that enables computing device 600 to communicate via one or more networks 660 . Examples of these networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. Access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)), wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, Worldwide Interoperability for Microwave Access ( Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, etc.
在本说明书的一个实施例中,计算设备600的上述部件以及图6中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图6所示的计算设备结构框图仅仅是出于示例的目的,而不是对本说明书范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。In an embodiment of the present specification, the above-mentioned components of the computing device 600 and other components not shown in FIG. 6 may also be connected to each other, for example, through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 6 is only for the purpose of illustration, rather than limiting the scope of this description. Those skilled in the art can add or replace other components as needed.
计算设备600可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备600还可以是移动式或静止式的服务器。Computing device 600 may be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile telephones (e.g., smartphones), ), wearable computing devices (eg, smart watches, smart glasses, etc.), or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. Computing device 600 may also be a mobile or stationary server.
其中,处理器620用于执行如下计算机可执行指令,该计算机可执行指令被处理器执行时实现上述资源处理方法的步骤。Wherein, the processor 620 is configured to execute the following computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the resource processing method above are implemented.
上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的资源处理方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述资源处理方法的技术方案的描述。The foregoing is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned resource processing method belong to the same concept, and details not described in detail in the technical solution of the computing device can refer to the description of the above-mentioned technical solution of the resource processing method.
本说明书一实施例还提供一种计算机可读存储介质,其存储有计算机可执行指令,该计算机可执行指令被处理器执行时实现上述资源处理方法的步骤。An embodiment of the present specification further provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the resource processing method above are implemented.
上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的资源处理方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述资源处理方法的技术方案的描述。The foregoing is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above-mentioned resource processing method belong to the same idea, and details not described in detail in the technical solution of the storage medium can refer to the description of the above-mentioned technical solution of the resource processing method.
本说明书一实施例还提供一种计算机程序,其中,当所述计算机程序在计算机中执行时,令计算机执行上述资源处理方法的步骤。An embodiment of the present specification also provides a computer program, wherein, when the computer program is executed in a computer, the computer is caused to execute the steps of the resource processing method above.
上述为本实施例的一种计算机程序的示意性方案。需要说明的是,该计算机程序的技术方案与上述的资源处理方法的技术方案属于同一构思,计算机程序的技术方案未详细描述的细节内容,均可以参见上述资源处理方法的技术方案的描述。The foregoing is a schematic solution of a computer program in this embodiment. It should be noted that the technical solution of the computer program and the technical solution of the above-mentioned resource processing method belong to the same idea, and details not described in detail in the technical solution of the computer program can refer to the description of the above-mentioned technical solution of the resource processing method.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other implementations are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. Multitasking and parallel processing are also possible or may be advantageous in certain embodiments.
所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象 代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The computer instructions include computer program code, which may be in the form of source code, object code form, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, computer-readable media Excludes electrical carrier signals and telecommunication signals.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本说明书实施例并不受所描述的动作顺序的限制,因为依据本说明书实施例,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本说明书实施例所必须的。It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are expressed as a series of action combinations, but those skilled in the art should know that the embodiments of this specification are not limited by the described action sequences. Because according to the embodiment of the present specification, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the specification.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.
以上公开的本说明书优选实施例只是用于帮助阐述本说明书。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本说明书实施例的内容,可作很多的修改和变化。本说明书选取并具体描述这些实施例,是为了更好地解释本说明书实施例的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本说明书。本说明书仅受权利要求书及其全部范围和等效物的限制。 The preferred embodiments of the present specification disclosed above are only for helping to explain the present specification. Alternative embodiments are not exhaustive in all detail, nor are the inventions limited to specific implementations described. Obviously, many modifications and changes can be made according to the contents of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can well understand and use this specification. This specification is to be limited only by the claims, along with their full scope and equivalents.

Claims (14)

  1. 一种资源处理系统,包括:A resource processing system comprising:
    资源协调模块,被配置为通过检测共享数据结构获得待处理事务;确定所述待处理事务关联的至少两个线程模块,并向每个线程模块发送事务处理请求;The resource coordination module is configured to obtain pending transactions by detecting the shared data structure; determine at least two thread modules associated with the pending transactions, and send a transaction processing request to each thread module;
    每个线程模块,被配置为基于所述事务处理请求确定线程状态信息,并将所述线程状态信息反馈至所述资源协调模块;Each thread module is configured to determine thread state information based on the transaction processing request, and feed back the thread state information to the resource coordination module;
    所述资源协调模块,还被配置为根据每个线程模块的线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息;The resource coordination module is further configured to determine transaction processing information corresponding to the transaction to be processed according to the thread state information of each thread module, and send the transaction processing information to each thread module;
    每个线程模块,还被配置为基于所述事务处理信息对所述待处理事务进行处理;其中,各个线程模块所属的物理资源相同。Each thread module is further configured to process the transaction to be processed based on the transaction processing information; wherein, the physical resources to which each thread module belongs are the same.
  2. 根据权利要求1所述的系统,还包括资源调度器;所述资源调度器,被配置为接收所述待处理事务;针对所述待处理事务配置待使用资源,并根据配置结果创建资源调度信息;将携带有所述资源调度信息的所述待处理事务写入所述共享数据结构;The system according to claim 1, further comprising a resource scheduler; the resource scheduler is configured to receive the transaction to be processed; configure resources to be used for the transaction to be processed, and create resource scheduling information according to the configuration result ; Writing the pending transaction carrying the resource scheduling information into the shared data structure;
    相应的,所述资源协调模块,进一步被配置为通过对所述共享数据结构进行检测,获得携带有所述资源调度信息的所述待处理事务;根据所述资源调度信息确定所述待处理事务关联的所述至少两个线程模块;在确定所述待处理事务为待执行状态的情况下,向每个线程模块发送所述事务处理请求。Correspondingly, the resource coordination module is further configured to obtain the pending transaction carrying the resource scheduling information by detecting the shared data structure; determine the pending transaction according to the resource scheduling information The at least two associated thread modules; when it is determined that the transaction to be processed is to be executed, send the transaction processing request to each thread module.
  3. 根据权利要求1所述的系统,所述资源协调模块,进一步被配置为针对每个线程模块分别确定资源准备信息,创建携带有所述资源准备信息的中断请求作为所述事务处理请求,并发送至每个线程模块。The system according to claim 1, the resource coordination module is further configured to determine resource preparation information for each thread module, create an interrupt request carrying the resource preparation information as the transaction processing request, and send to each thread module.
  4. 根据权利要求3所述的系统,每个线程模块,进一步被配置为接收携带有所述资源准备信息的所述中断请求,并根据所述中断请求调用中断处理函数;通过所述中断处理函数对所述资源准备信息进行处理,根据信息处理结果确定所述线程状态信息。According to the system according to claim 3, each thread module is further configured to receive the interrupt request carrying the resource preparation information, and call an interrupt processing function according to the interrupt request; through the interrupt processing function to The resource preparation information is processed, and the thread state information is determined according to information processing results.
  5. 根据权利要求1-4任意一项所述的系统,所述资源协调模块为开启超线程的CPU;相应的,每个线程模块为运行虚拟机的超线程。According to the system according to any one of claims 1-4, the resource coordination module is a CPU with hyperthreading enabled; correspondingly, each thread module is a hyperthread running a virtual machine.
  6. 根据权利要求1-4任意一项所述的系统,每个线程模块,还被配置为将所述线程状态信息写入信息共享单元;According to the system according to any one of claims 1-4, each thread module is further configured to write the thread state information into an information sharing unit;
    相应的,所述资源协调模块,还被配置为通过轮询所述信息共享单元,确定每个线程模块对应的线程状态信息;根据每个线程模块对应的线程状态信息确定所述待处理事务对应的所述事务处理信息,并将所述事务处理信息写入所述信息共享单元;Correspondingly, the resource coordination module is further configured to determine the thread state information corresponding to each thread module by polling the information sharing unit; and write the transaction information into the information sharing unit;
    相应的,每个线程模块,还被配置为通过轮询所述信息共享单元确定所述事务处理信息,并基于所述事务处理信息对所述待处理事务进行处理。Correspondingly, each thread module is further configured to determine the transaction processing information by polling the information sharing unit, and process the transaction to be processed based on the transaction processing information.
  7. 根据权利要求6所述的系统,所述资源协调模块,进一步被配置为根据每个线程模块对应的线程状态信息确定所述至少两个线程模块为可使用状态的情况下,根据所述可使用状态创建事务执行信息作为所述事务处理信息,并将所述事务处理信息写入所述信息共享单元; According to the system according to claim 6, the resource coordination module is further configured to determine that the at least two thread modules are available according to the thread state information corresponding to each thread module, according to the available state creation transaction execution information as the transaction processing information, and writing the transaction processing information into the information sharing unit;
    相应的,每个线程模块,进一步被配置为通过轮询所述信息共享单元确定所述事务执行信息,根据所述事务执行信息确定目标资源,并将所述目标资源写入资源调度队列;在所述目标资源满足所述资源调度队列的事务处理条件的情况下,通过所述目标资源对所述待处理事务进行处理。Correspondingly, each thread module is further configured to determine the transaction execution information by polling the information sharing unit, determine the target resource according to the transaction execution information, and write the target resource into the resource scheduling queue; When the target resource satisfies the transaction processing condition of the resource scheduling queue, the pending transaction is processed by the target resource.
  8. 根据权利要求6所述的系统,所述资源协调模块,还被配置为根据每个线程模块对应的线程状态信息确定至少一个线程模块为非使用状态的情况下,根据所述非使用状态创建事务中断信息作为所述事务处理信息,并将所述事务处理信息写入所述信息共享单元;According to the system according to claim 6, the resource coordination module is further configured to create a transaction according to the non-use state when at least one thread module is determined to be in the non-use state according to the thread state information corresponding to each thread module interrupt information as the transaction processing information, and write the transaction processing information into the information sharing unit;
    相应的,每个线程模块,还被配置为通过轮询所述信息共享单元确定所述事务中断信息,根据所述事务中断信息确定至少两个目标线程模块,并向所述至少两个目标线程模块发送所述待处理事务。Correspondingly, each thread module is further configured to determine the transaction interruption information by polling the information sharing unit, determine at least two target thread modules according to the transaction interruption information, and send the at least two target thread modules The module sends the pending transaction.
  9. 根据权利要求3所述的系统,所述资源协调模块,进一步被配置为根据所述资源调度信息选择所述待处理事务关联的事务线程模块,并确定所述事务线程模块所属的所述物理资源;在所述物理资源中选择所述事务线程模块关联的至少一个关联线程模块;基于所述事务线程模块和所述至少一个关联线程模块组成所述待处理事务关联的所述至少两个线程模块。The system according to claim 3, the resource coordination module is further configured to select the transaction thread module associated with the transaction to be processed according to the resource scheduling information, and determine the physical resource to which the transaction thread module belongs ; select at least one associated thread module associated with the transaction thread module in the physical resource; form the at least two thread modules associated with the transaction to be processed based on the transaction thread module and the at least one associated thread module .
  10. 一种资源处理方法,应用于资源协调模块,包括:A resource processing method, applied to a resource coordination module, comprising:
    通过检测共享数据结构获得待处理事务;Obtain pending transactions by detecting shared data structures;
    确定所述待处理事务关联的至少两个线程模块,并向每个线程模块发送事务处理请求;Determine at least two thread modules associated with the transaction to be processed, and send a transaction processing request to each thread module;
    接收每个线程模块针对所述事务处理请求反馈的线程状态信息;receiving thread status information fed back by each thread module for the transaction processing request;
    基于所述线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息。Determine transaction processing information corresponding to the transaction to be processed based on the thread state information, and send the transaction processing information to each thread module.
  11. 根据权利要求10所述的方法,所述接收每个线程模块针对所述事务处理请求反馈的线程状态信息,包括:The method according to claim 10, said receiving thread status information fed back by each thread module for said transaction processing request, comprising:
    通过轮询信息共享单元,确定每个线程模块针对所述事务处理请求反馈的线程状态信息;Determine the thread status information fed back by each thread module for the transaction processing request by polling the information sharing unit;
    相应的,所述基于所述线程状态信息确定所述待处理事务对应的事务处理信息,并向每个线程模块发送所述事务处理信息,包括:Correspondingly, determining the transaction processing information corresponding to the transaction to be processed based on the thread state information, and sending the transaction processing information to each thread module includes:
    根据每个线程模块对应的线程状态信息确定所述至少两个线程模块为可使用状态的情况下,根据所述可使用状态创建事务执行信息作为所述事务处理信息;或者,根据每个线程模块对应的线程状态信息确定至少一个线程模块为非使用状态的情况下,根据所述非使用状态创建事务中断信息作为所述事务处理信息。According to the thread state information corresponding to each thread module, when it is determined that the at least two thread modules are in an available state, create transaction execution information according to the available state as the transaction processing information; or, according to each thread module When the corresponding thread state information determines that at least one thread module is in a non-use state, creating transaction interruption information according to the non-use state as the transaction processing information.
  12. 一种资源处理方法,应用于线程模块,包括:A resource processing method applied to a thread module, including:
    接收资源协调模块针对待处理事务发送的事务处理请求;Receive the transaction processing request sent by the resource coordination module for the transaction to be processed;
    根据所述事务处理请求确定线程状态信息,并将所述线程状态信息反馈至所述资源协调模块;Determine thread state information according to the transaction processing request, and feed back the thread state information to the resource coordination module;
    接收所述资源协调模块针对所述线程状态信息反馈的事务处理信息; receiving transaction processing information fed back by the resource coordination module for the thread state information;
    基于所述事务处理信息对所述待处理事务进行处理。Processing the transaction to be processed based on the transaction processing information.
  13. 根据权利要求12所述的方法,所述将所述线程状态信息反馈至所述资源协调模块,包括:The method according to claim 12, said feeding back said thread state information to said resource coordination module, comprising:
    将所述线程状态信息写入信息共享单元,作为对应所述资源协调模块的反馈;Writing the thread state information into an information sharing unit as feedback corresponding to the resource coordination module;
    相应的,所述接收所述资源协调模块针对所述线程状态信息反馈的事务处理信息,包括:Correspondingly, the receiving the transaction processing information fed back by the resource coordination module for the thread state information includes:
    通过轮询所述信息共享单元确定所述资源协调模块针对所述线程状态信息反馈的所述事务处理信息。The transaction processing information fed back by the resource coordination module for the thread state information is determined by polling the information sharing unit.
  14. 一种计算设备,包括:A computing device comprising:
    存储器和处理器;memory and processor;
    所述存储器用于存储计算机可执行指令,所述处理器用于执行所述计算机可执行指令,该计算机可执行指令被处理器执行时实现权利要求10至13任一项所述方法的步骤。 The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 10 to 13 are realized.
PCT/CN2023/075638 2022-03-03 2023-02-13 Resource processing system and method WO2023165318A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210211124.9A CN114610485A (en) 2022-03-03 2022-03-03 Resource processing system and method
CN202210211124.9 2022-03-03

Publications (1)

Publication Number Publication Date
WO2023165318A1 true WO2023165318A1 (en) 2023-09-07

Family

ID=81861514

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/075638 WO2023165318A1 (en) 2022-03-03 2023-02-13 Resource processing system and method

Country Status (2)

Country Link
CN (1) CN114610485A (en)
WO (1) WO2023165318A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114610485A (en) * 2022-03-03 2022-06-10 阿里巴巴(中国)有限公司 Resource processing system and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050097555A1 (en) * 2003-10-30 2005-05-05 International Business Machines Corporation Method, system and program product for processing a transaction
CN101308462A (en) * 2007-05-14 2008-11-19 国际商业机器公司 Method and computing system for managing access to memorizer of shared memorizer unit
CN103455308A (en) * 2012-05-31 2013-12-18 辉达公司 Multi-threaded transactional memory coherence
US20210157700A1 (en) * 2019-11-21 2021-05-27 Apple Inc. Adaptive memory performance control by thread group
CN112988883A (en) * 2019-12-16 2021-06-18 中兴通讯股份有限公司 Database data synchronization method and device and storage medium
CN114610485A (en) * 2022-03-03 2022-06-10 阿里巴巴(中国)有限公司 Resource processing system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050097555A1 (en) * 2003-10-30 2005-05-05 International Business Machines Corporation Method, system and program product for processing a transaction
CN101308462A (en) * 2007-05-14 2008-11-19 国际商业机器公司 Method and computing system for managing access to memorizer of shared memorizer unit
CN103455308A (en) * 2012-05-31 2013-12-18 辉达公司 Multi-threaded transactional memory coherence
US20210157700A1 (en) * 2019-11-21 2021-05-27 Apple Inc. Adaptive memory performance control by thread group
CN112988883A (en) * 2019-12-16 2021-06-18 中兴通讯股份有限公司 Database data synchronization method and device and storage medium
CN114610485A (en) * 2022-03-03 2022-06-10 阿里巴巴(中国)有限公司 Resource processing system and method

Also Published As

Publication number Publication date
CN114610485A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
Calheiros et al. CloudSim: a toolkit for modeling and simulation of cloud computing environments and evaluation of resource provisioning algorithms
US8739171B2 (en) High-throughput-computing in a hybrid computing environment
TWI559153B (en) Distributed computing framework
US11645123B1 (en) Dynamic distribution of a workload processing pipeline on a computing infrastructure
EP3073373A1 (en) Method for interruption affinity binding of virtual network interface card, and computer device
US20110219373A1 (en) Virtual machine management apparatus and virtualization method for virtualization-supporting terminal platform
US10037225B2 (en) Method and system for scheduling computing
US20240160474A1 (en) Multi-core processor task scheduling method, and device and storage medium
US11537429B2 (en) Sub-idle thread priority class
US20170097854A1 (en) Task placement for related tasks in a cluster based multi-core system
WO2023165318A1 (en) Resource processing system and method
US9286125B2 (en) Processing engine implementing job arbitration with ordering status
WO2023174037A1 (en) Resource scheduling method, apparatus and system, device, medium, and program product
CN112306669A (en) Task processing method and device based on multi-core system
Maruf et al. Extending resources for avoiding overloads of mixed‐criticality tasks in cyber‐physical systems
Kumari et al. ACPM: adaptive container provisioning model to mitigate serverless cold-start
Pan et al. Sustainable serverless computing with cold-start optimization and automatic workflow resource scheduling
Guleria et al. EMF: Disaggregated GPUs in datacenters for efficiency, modularity and flexibility
Harichane et al. KubeSC‐RTP: Smart scheduler for Kubernetes platform on CPU‐GPU heterogeneous systems
CN109840151B (en) Load balancing method and device for multi-core processor
CN113608845A (en) Data processing method and device
CN112965788A (en) Task execution method, system and equipment in hybrid virtualization mode
US10958597B2 (en) General purpose ring buffer handling in a network controller
WO2023160359A1 (en) Resource scheduling method and device
CN112395062A (en) Task processing method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23762719

Country of ref document: EP

Kind code of ref document: A1