Resource allocation method and system
A technology of resource allocation and threading, applied in the direction of resource allocation, program synchronization, program control design, etc., can solve the problems of low utilization rate of computing resources and unbalanced distribution of computing resources, so as to improve the utilization rate of computing resources and solve the problem of computing resource allocation. Unbalanced effect of improving application value
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] refer to figure 1 , figure 1 The implementation process of the resource allocation method provided by Embodiment 1 of the present invention is shown. The subject of execution of the process in this embodiment may be a terminal device, and the process is described in detail as follows:
[0035] S101: Obtain a starting command input by a user, start a business program according to the starting command, create a process corresponding to the business program, acquire business data, and generate at least one thread for processing the business data.
[0036] When the user starts the service program, the terminal device obtains the start instruction input by the user, and starts the service program according to the start instruction.
[0037] Create a process corresponding to the business program, and assign a process number to the process.
[0038] After the business program is started, create a corresponding process for the business program and assign a process number to t...
Embodiment 2
[0095] refer to figure 2 , figure 2 The implementation flow of the resource allocation method provided by Embodiment 2 of the present invention is shown. On the basis of the foregoing embodiments, the embodiments of the present invention are described in detail as follows:
[0096] S201: Create a shared data area, initialize a process registry, a load balancing table, a management mutex and a business mutex.
[0097] The shared data area is used to save the process registry and load balancing table.
[0098] Clear the process registry information and load balancing table information, and set the MAGIC identification code.
[0099] S202: Acquire a management mutex.
[0100] An administrative mutex is acquired before accessing information in the process registry and load balancing tables.
[0101] S203: Obtain all online process information and online thread information, judge whether there are offline processes and offline threads in the process registry according to the...
Embodiment 3
[0115] refer to image 3 , image 3 A schematic structural diagram of the resource allocation system 300 provided by Embodiment 3 of the present invention is shown. The resource allocation system 300 in this embodiment includes: an instruction acquisition module 301, a thread acquisition module 302, a first business mutex allocation module 303, a target thread allocation module 304, a target thread processing module 305, and a second business mutex allocation Module 306 and the target thread logout module 307.
[0116] The instruction obtaining module 301 is used to obtain the startup instruction input by the user, start the business program according to the startup instruction, create a process corresponding to the business program, obtain business data, and generate at least one thread for processing the business data.
[0117] The instruction acquisition module 301 also includes: a process number allocation unit, a thread number allocation unit and a storage unit.
[011...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com