Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Active Publication Date: 2018-05-18
深圳市恒扬数据股份有限公司
View PDF3 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In view of this, an embodiment of the present invention provides a resource allocation method and system to solve the problems of unbalanced allocation of computing resources and low utilization of computing resources in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Resource allocation method and system
  • Resource allocation method and system
  • Resource allocation method and system

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a resource allocation method and system, which are suitable for use in the field of resource scheduling technology. The method includes: acquiring a starting instruction inputby a user, starting a service program according to the starting instruction, and generating at least one thread; acquiring at least one thread requesting computation resources of the same hardware acceleration card ; allocating a service mutex lock to a target thread according to a time order of thread application; allocating the target thread to a target computation unit of a smallest number of queuing-up threads, and releasing the service mutex lock of the target thread; processing service data of the target thread if the number of queuing-up threads before the target thread is zero; allocating a service mutex lock to the target thread; and resetting a mark bit of the target thread, enabling a moving bit pointer of a queue, where the target thread is located, to point to a next thread ofwhich service data are to be processed, releasing the service mutex lock of the target thread, and canceling the target thread. According to the method, a computation resource utilization rate can besignificantly increased, and an application value of the hardware acceleration card can be increased.

Description

technical field [0001] The invention belongs to the technical field of resource scheduling, and in particular relates to a resource allocation method and system. Background technique [0002] In the face of more and more computing needs with high professional requirements, it is a reliable technical solution to offload specific calculations originally performed by the CPU by introducing professional hardware accelerator cards. This solution is not only low-cost, but also can greatly improve the utilization of professional computing resources. [0003] At present, in heterogeneous computer systems based on hardware accelerator cards, computing resource allocation usually adopts a static allocation method of round-robin scheduling. However, due to the difference in the size of the source data allocated to the computing unit each time, the time for the source data to be transmitted from the host to the hardware accelerator card is different, the time for the computing resource...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/52G06F9/50
CPCG06F9/505G06F9/526
Inventor 李超黄俞翔
Owner 深圳市恒扬数据股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products