CN107656806A - A kind of resource allocation methods and resource allocation device - Google Patents
A kind of resource allocation methods and resource allocation device Download PDFInfo
- Publication number
- CN107656806A CN107656806A CN201610593967.4A CN201610593967A CN107656806A CN 107656806 A CN107656806 A CN 107656806A CN 201610593967 A CN201610593967 A CN 201610593967A CN 107656806 A CN107656806 A CN 107656806A
- Authority
- CN
- China
- Prior art keywords
- resource
- thread
- idling
- allocation device
- pond
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
The embodiment of the present application discloses a kind of resource allocation methods and resource allocation device, for carrying out dynamic allocation of resources to subject thread, avoids and shared resource is at war with other threads.The embodiment of the present application method includes:Resource allocation device judges to whether there is the first idling-resource in thread execution resource pond, and first idling-resource is the available resources in thread execution resource pond described in the first moment;If first idling-resource in the thread execution resource pond be present, the resource allocation device is that subject thread distributes target execution resource according to first idling-resource.
Description
Technical field
The present invention relates to computer realm, more particularly to a kind of resource allocation methods and resource allocation device.
Background technology
With internet and the development of cloud computing, increasing application is moved to high in the clouds from local, and these applications are most
Shared data center is running in eventually.Data-center applications are complicated and demand is changeable, in order to improve the resource of data center
Utilization rate, multiple strategies using mixed deployment can be typically taken, the method merged using virtualization, container even load will be multiple
Using operating in same server.
Under full load operation, afterbody caching (English full name is shared:Last Level Cache, referred to as:LLC it is) competing
Striving interference can cause one times of delay to increase;Shared drive interference maximum can cause the hydraulic performance decline of three times;By multithreading application
Competition to shared resource, 7%-70% performance inconsistency can be caused.Competition of the i.e. current a variety of applications to shared resource, i.e.,
For multithreading to shared resource static division, competition is shared to bring uncertain performance inconsistency, produces long-tail phenomenon.
The content of the invention
The embodiment of the present application provides a kind of resource allocation methods and resource allocation device, dynamic for carrying out subject thread
State distributes resource, avoids and shared resource is at war with other threads.
The embodiment of the present application provides a kind of resource allocation methods, including:
Resource allocation device judges to whether there is the first idling-resource, first idling-resource in thread execution resource pond
For the available resources in thread execution resource pond described in the first moment;If there have described first in the thread execution resource pond to be empty
Not busy resource, then the resource allocation device is that subject thread distributes target execution resource according to first idling-resource.
In the embodiment of the present application, the resource allocation device has resource according to the thread execution resource pond at the first moment
It is that subject thread distributes target execution resource as the first idling-resource and according to first idling-resource.In this whole resource point
During matching somebody with somebody, the resource allocation device carries out dynamically distributes to subject thread and performs resource, avoids with other threads to shared
Resource is at war with.
Optionally, it is that the subject thread distributes target execution resource according to first idling-resource in the resource allocation device
When, the resource allocation device can use following scheme:
A kind of possible implementation is:The resource allocation device judges whether first idling-resource is more than or equal to
The default resource of the first of the subject thread, the described first default resource is that the resource allocation device is that the subject thread is pre-
First distribute;If first idling-resource is more than or equal to the described first default resource, the resource allocation device is described
It is the described first default resource that the target of subject thread distribution, which performs resource,;If first idling-resource is less than described the
One default resource, then the resource allocation device is that the target execution resource of the subject thread distribution is described first empty
Not busy resource.
Alternatively possible implementation is:The resource allocation device is using first idling-resource as the score
The target of journey performs resource.
In the embodiment of the present application, the resource allocation device can use a variety of dynamically distributes modes according to the first idling-resource
Target is distributed for subject thread and performs resource, avoids being at war with to shared resource with other threads.
Optionally, if in preset duration, the resource allocation device is preset to the first of subject thread distribution provide in advance
The target that source is more than subject thread actual use performs resource, then the resource allocation device can adjust the first default resource
Whole is the second default resource, and the second default resource is less than the first default resource.
In the embodiment of the present application, the resource allocation device can be recycled the default resource of the subject thread,
Be advantageous to improve the level of resources utilization.
Optionally, the resource allocation device can also perform money by monitoring each thread in the thread execution resource pond
Source obtains the idling-resource in the thread execution resource pond in real time, and concrete mode is as follows:The resource allocation device obtains the line
The execution resource of each thread in Cheng Zhihang resource pools;The resource allocation device is integrated the execution resource of each thread
Obtain occupied resource;The resource allocation device judges whether the occupied resource is less than the thread execution resource pond
Source material, if so, then the resource allocation device determines the first idling-resource in the thread execution resource pond be present.
Resource allocation device monitors the execution resource of each thread in the thread execution resource pond in the embodiment of the present application, has
Idling-resource present in the thread execution resource pond is obtained in real time beneficial to the resource allocation device.
Optionally, if the resource allocation device determines that the described first idle money is not present in the thread execution resource pond
Source, then the resource allocation device block the subject thread;The resource allocation device judges the thread execution resource pond
In whether there is the second idling-resource, second idling-resource is the available money in thread execution resource pond described in the second moment
Source;If second idling-resource in the thread execution resource pond be present, the resource allocation device is according to described second
Idling-resource is that the subject thread distributes the target execution resource.
In the embodiment of the present application, the resource allocation device can not have the situation of idling-resource in thread performs resource pool
Under, subject thread obstruction is not added into the thread execution resource pond, the thread execution resource pond can so be effectively ensured
In other threads execution performance.
Optionally, the thread execution resource pond is attached most importance to order buffer queue and reservation station and access queue.
In actual applications, the thread execution resource pond can be individually for regenerating sequence buffer queue or reservation station or memory access
Queue, specific refer to do not limit herein.
In the embodiment of the present application, the resource allocation device is mainly for buffer queue and the reservation station and access queue of reordering
Optimize, can effectively improve resource utilization.
Second aspect, the embodiment of the present application provide a kind of resource allocation device, and the resource allocation device is above-mentioned with realizing
The function of resource allocation device in method.The function can be realized by hardware, and corresponding software can also be performed by hardware
Realize.The hardware or software include one or more modules corresponding with above-mentioned function phase.
In a kind of possible implementation, the resource allocation device includes:
First judge module, for judging to whether there is the first idling-resource in thread execution resource pond, described first is empty
Not busy resource is the available resources in thread execution resource pond described in the first moment;
First processing module, if determining there is described in the thread execution resource pond for first judge module
One idling-resource, then the resource allocation device is that subject thread distributes target execution resource according to first idling-resource.
In alternatively possible implementation, the resource allocation device includes:
Processor, bus;
The processor is connected with the bus;
The processor, perform following steps:
Judge to whether there is the first idling-resource in thread execution resource pond, first idling-resource for first the moment institute
State the available resources in thread execution resource pond;If first idling-resource, root in the thread execution resource pond be present
It is that subject thread distributes target execution resource according to first idling-resource.
The third aspect, a kind of computer-readable storage medium is provided in the embodiment of the present application, is deposited in the computer-readable storage medium
Program code is contained, the program code is used to indicate the method for performing above-mentioned first aspect.
As can be seen from the above technical solutions, the embodiment of the present invention has advantages below:Resource allocation device obtains thread
Perform resource pool has resource as the first idling-resource at the first moment;The resource allocation device is in first idling-resource
Meet that distributing target in the case of preparatory condition for subject thread performs resource.In this whole resource allocation process, the resource
Distributor carries out dynamically distributes to subject thread and performs resource, avoids and shared resource is at war with other threads.
Brief description of the drawings
Fig. 1 is a schematic diagram of resource allocation in the prior art;
Fig. 2 is a schematic diagram of resource allocation methods in the embodiment of the present application;
Fig. 3 is a schematic diagram of resource allocation device in the embodiment of the present application;
Fig. 4 is another schematic diagram of resource allocation device in the embodiment of the present application.
Embodiment
The embodiment of the present application provides a kind of resource allocation methods and resource allocation device, dynamic for carrying out subject thread
State distributes resource, avoids and shared resource is at war with other threads.
Term " first ", " second ", " the 3rd " in the description and claims of this application and above-mentioned accompanying drawing, "
The (if present)s such as four " are for distinguishing similar object, without for describing specific order or precedence.It should manage
The data that solution so uses can exchange in the appropriate case, so that the embodiments described herein can be with except illustrating herein
Or the order beyond the content of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that
Cover it is non-exclusive include, for example, containing the process of series of steps or unit, method, system, product or equipment need not limit
In those steps or unit for clearly listing, but may include not list clearly or for these processes, method, production
The intrinsic other steps of product or equipment or unit.
With internet and the development of cloud computing, increasing application is moved to high in the clouds from local, and using virtual
Change, the method for container even load fusion operates in multiple applications in same server.But the software and hardware resources without management are shared
Uncertain performance inconsistency is brought, produces long-tail phenomenon.If current resource allocation conditions are as shown in figure 1, in the presence of two
Thread carries out thread execution resource pond simultaneously, then the resource in the thread execution resource pond is divided into two parts to two threads, i.e.,
Belong to the resource in the static division thread execution resource pond.
In order to solve this problem, the embodiment of the present application provides following technical method:Resource allocation device judges thread
Perform in resource pool and whether there is the first idling-resource, first idling-resource is thread execution resource pond described in the first moment
In available resources;If first idling-resource in the thread execution resource pond be present, the resource allocation device root
It is that subject thread distributes target execution resource according to first idling-resource.
Resource allocation device is realizes that the dynamically distributes target to subject thread performs resource in the application, and concrete mode is such as
Shown in Fig. 2:
201st, resource allocation device obtains the execution resource of each thread in thread execution resource pond.
The execution resource of each thread of the resource allocation device to being carrying out in thread execution resource pond is monitored, and is obtained
The execution resource of each thread.
In actual applications, the resource in thread execution resource pond is to have distributed in advance, such as in the caching team that reorders
Row or reservation station or access queue, computer just give reorder buffer queue or the distribution of the reservation station or the access queue in advance
Good resource, such as the buffer queue that reorders have 150, and reservation station has 100, and access queue has 80, and is performed in thread
The resource allocation of resource pool well after, the resource in the thread resources pond will not become again.And each thread can have a thread
Mark, such as core numbering or thread number.And resource allocation device can be according to the thread identification in thread execution resource
Each thread being carrying out in pond is monitored, and then gets the actual execution resource of each thread.Such as the caching that reorders
Just running 3 threads, i.e. thread 1 in queue, thread 2, thread 3, the resource allocation device can monitor these three lines in real time
Journey, the actual execution resource for getting the thread 1 are 50, and the actual execution resource of thread 2 is 60, and thread 3 is actually held
Row resource is 30.
202nd, the execution resource of each thread is integrated to obtain in thread execution resource pond and taken by resource allocation device
Resource.
The resource allocation device after the execution resource of each thread is got, unite by the execution resource to each thread
Meter, obtains occupied resource in the thread execution resource pond.For example apply as described above, the occupancy in buffer queue that reorders
Resource is 140.
203rd, resource allocation device judges whether the occupied resource is less than the original money in the thread execution resource pond
Source, if so, then performing step 204, step 201 is performed to step 203 if it is not, then performing step 205 and circulating.
Resource allocation device is after the occupied resource in the thread execution resource pond is got, with the thread resources pond
Source material is compared, if the occupied resource is less than the source material, illustrates the free time in the thread resources pond also be present
Resource, at this moment resource allocation device execution step 204, if the occupied resource is equal to the source material, illustrates the thread
Resource pool has been fully loaded with, and at this moment the resource allocation device performs step 205, while the resource allocation device can also continue to perform step
Rapid 201 to step 203.
204th, resource allocation device is that subject thread distributes target execution resource according to the first idling-resource.
When the resource allocation device determines the first idling-resource to be present in the thread execution resource pond, resource allocation dress
Putting can be that the subject thread distributes target execution resource according to the situation of first idling-resource.
In actual applications, resource allocation device can be that each thread precalculates a default resource, such as should
The default resource of subject thread is 50.And the resource allocation device is that the subject thread distributes mesh according to first idling-resource
Mark, which performs resource, can have the following two kinds can be with implementation:
In a kind of possible implementation, the resource allocation device can be by the of first idling-resource and the subject thread
One default resource is compared, if first idling-resource is more than the first default resource, the resource allocation device is the mesh
The target of graticule journey distribution performs resource and is equal to the first default resource;If first idling-resource is less than the first default money
Source, then the resource allocation device is that the target execution resource of subject thread distribution is equal to first idling-resource.On such as
State in application, the first idling-resource of the buffer queue that reorders is 10, and the first of the subject thread the default resource is 50
, then to be the subject thread perform resource to the resource allocation device in the target for reordering buffer queue distribution is just 10.
If the first idling-resource of certain buffer queue that reorders is 60, and the first of the subject thread the default resource is 50,
Then to be the subject thread perform resource to the resource allocation device in the target for reordering buffer queue distribution is just 50.So
The resource that effectively can be reordered using this in buffer queue, and be unlikely to cause the wasting of resources.
In alternatively possible implementation, the resource allocation device directly performs money using first idling-resource as target
Distribute to the subject thread in source.In applying as described above, the first idling-resource of the buffer queue that reorders is 10, the resource
Distributor is the subject thread, and to perform resource in the target for reordering buffer queue distribution be just 10.If this reorders slow
The first idling-resource for depositing queue is 60, then the resource allocation device is the subject thread in the buffer queue distribution of reordering
Target perform resource just be 60.
Optionally, the target that can monitor the subject thread in real time due to the resource allocation device performs resource, if therefore
In preset duration, the resource allocation device get the subject thread target perform resource in most cases both less than this
One default resource, then the resource allocation device the first of the subject thread the default resource can be adjusted to to be less than this and first preset
The default resource of the second of resource.For example sampled at two in the same period, it is respectively 30 that the target of the subject thread, which performs resource,
40, that is, the first default resource 50 of the subject thread is both less than, then the resource allocation device can consider that this is first default
Resource setting is excessive, the default resource of the subject thread can be adjusted into 35 by 50.
The preset duration can be pre-set by the resource allocation device herein, for example sample the same period or other feelings at two
Condition, do not limit herein specifically.
Optionally, because the subject thread needs to first pass through the buffer queue that reorders during execution, then lead to again
Cross reservation station;And if the subject thread is when being access instruction, after by the reservation station, it will performed in access queue
The subject thread, then the resource allocation device can also be by the execution resource of reorder buffer queue and reservation station and access queue
Actual use situation is that the subject thread distributes target execution resource.If being access instruction than the subject thread, then the resource
Distributor can be the score when the buffer queue that reorders, the reservation station and the access queue all have idling-resource
Journey distribution target performs resource;If the subject thread is not access instruction, the resource allocation device can reorder at this
Buffer queue and the reservation station are all present distributes target execution resource in idling-resource for the subject thread.
205th, resource allocation device obstruction subject thread.
The resource allocation device does not perform subject thread pause.
In the present embodiment, the resource allocation device it is determined that in the thread execution resource pond exist the first idling-resource it
Afterwards, resource is performed to subject thread distribution target according to first idling-resource.In this resource allocation process, the resource
Distributor is that the subject thread dynamically distributes target performs resource, avoids the subject thread from entering with other threads and other threads
Line journey competes.
Resource allocation methods are illustrated above, resource allocation device is described from the angle of device below,
Referring specifically to Fig. 3, a kind of a kind of embodiment for resource allocation device that the embodiment of the present application provides, the resource allocation device bag
Include:
First judge module 301, first processing module 302;
First judge module 301, for judging to whether there is the first idling-resource in thread execution resource pond, described first
Idling-resource is the available resources in thread execution resource pond described in the first moment;
First processing module 302, if determining exist in the thread execution resource pond for first judge module 301
First idling-resource, then the resource allocation device is that subject thread distributes target execution according to first idling-resource
Resource.
Optionally, the first processing module 302 includes:
First judging unit, for judging whether first idling-resource is more than or equal to the first of the subject thread
Default resource, the described first default resource is that the resource allocation device is that the subject thread is allocated in advance;
First processing units, if being more than or equal to the described first default resource for first idling-resource, for institute
The target for stating subject thread distribution performs resource as the described first default resource;If first idling-resource is less than described
First default resource, then it is first idling-resource that the target for subject thread distribution, which performs resource,.
Optionally, the first processing module 302 includes:
Second processing unit, for performing resource using first idling-resource as the target of the subject thread.
Optionally, the resource allocation device also includes:
Adjusting module 303, it is pre- by described first if performing resource for the target is less than the described first default resource
If resource is adjusted to the second default resource, the described second default resource is less than the described first default resource.
Optionally, first judge module 301 includes:
Acquiring unit, for obtaining the execution resource of each thread in the thread execution resource pond;
Combining unit, the execution resource of each thread for the acquiring unit to be got are integrated to obtain
Take resource;
Second judging unit, for judging whether the occupied resource that the merging module obtains is less than the thread
The source material of resource pool is performed, if so, then the resource allocation device determines there is first in the thread execution resource pond
Idling-resource.
Optionally, the resource allocation device also includes:
Blocking module 304, if for first idling-resource to be not present in the thread execution resource pond, block institute
State subject thread;
Second judge module 305, it is described for judging to whether there is the second idling-resource in the thread execution resource pond
Second idling-resource is the available resources in thread execution resource pond described in the second moment;
Second processing module 306, if for second idling-resource, basis be present in the thread execution resource pond
Second idling-resource is that the subject thread distributes the target execution resource.
Optionally, the thread execution resource pond is attached most importance to order buffer queue, reservation station and access queue.
In the present embodiment, the first processing module 302 is in first judge module 301 it is determined that the thread execution resource pond
In exist the first idling-resource after, according to first idling-resource to the subject thread distribution target perform resource.At this
In resource allocation process, the resource allocation device is that the subject thread dynamically distributes target performs resource, avoids the subject thread
Thread competition is carried out with other threads and other threads.The adjusting module 303 can be according to practical situations to the mesh simultaneously
The default resource of graticule journey carries out resource reclaim, is advantageous to improve the utilization ratio of resource.
Referring to Fig. 4, a kind of another embodiment for resource allocation device that the embodiment of the present application provides, the resource allocation
Device includes:
Processor 401, bus 402;
The processor 401 is connected with the bus 402;
The processor, perform following steps:
Judge to whether there is the first idling-resource in thread execution resource pond, first idling-resource for first the moment institute
State the available resources in thread execution resource pond;If first idling-resource, root in the thread execution resource pond be present
It is that subject thread distributes target execution resource according to first idling-resource.
Bus 402 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation
PCI) bus or EISA (extended industry standard architecture, abbreviation EISA)
Bus etc..The bus can be divided into address bus, data/address bus, controlling bus etc..It is only thick with one in Fig. 4 for ease of representing
Line represents, it is not intended that an only bus or a type of bus.
Processor 401 can be central processing unit (central processing unit, abbreviation CPU), network processing unit
(network processor, abbreviation NP) or CPU and NP combination.
Processor 401 can further include hardware chip.Above-mentioned hardware chip can be application specific integrated circuit
(application-specific integrated circuit, abbreviation ASIC), PLD
(programmable logic device, abbreviation PLD) or its combination.Above-mentioned PLD can be CPLD
(complex programmable logic device, abbreviation CPLD), field programmable gate array (field-
Programmable gate array, abbreviation FPGA), GAL (generic array logic, abbreviation GAL) or
It is combined.
Shown in Figure 4, the server can also include memory 403;The memory 403 can include volatile storage
Device (volatile memory), such as random access memory (random-access memory, abbreviation RAM);Memory
Nonvolatile memory (non-volatile memory), such as flash memory (flash memory), hard disk can be included
(hard disk drive, abbreviation HDD) or solid state hard disc (solid-state drive, abbreviation SSD);Memory 403 may be used also
With the combination of the memory including mentioned kind.
Alternatively, memory 403 can be also used for storage program instruction, and the processor 401 calls to be deposited in the memory 403
The programmed instruction of storage, one or more of embodiment illustrated in fig. 2 step, or wherein optional embodiment can be performed, it is real
The function of resource allocation device behavior in the existing above method.
Shown in Figure 4, the server can also include transceiver 404;The transceiver 404 can be that the resource allocation fills
Put reception instruction or information.
With reference to above-described embodiment, the processor 401 can perform above-mentioned steps 201 to step 205, and here is omitted.
In the present embodiment, after it is determined that there is the first idling-resource in the processor 401, root in the thread execution resource pond
According to first idling-resource resource is performed to subject thread distribution target.In this resource allocation process, the resource allocation
Device is that the subject thread dynamically distributes target performs resource, avoids the subject thread from entering line with other threads with other threads
Cheng Jingzheng.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the unit
Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing
Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or
The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit
Close or communicate to connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the present invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before
Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding
State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these
Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (15)
- A kind of 1. resource allocation methods, it is characterised in that including:Resource allocation device judges to whether there is the first idling-resource in thread execution resource pond, and first idling-resource is the Available resources in thread execution resource pond described in one moment;If first idling-resource in the thread execution resource pond be present, the resource allocation device is according to described first Idling-resource is that subject thread distributes target execution resource.
- 2. according to the method for claim 1, it is characterised in that the resource allocation device is according to first idling-resource Distributing target execution resource for subject thread includes:The resource allocation device judges whether first idling-resource is more than or equal to the first of the subject thread and presets Resource, the described first default resource is that the resource allocation device is that the subject thread is allocated in advance;If first idling-resource is more than or equal to the described first default resource, the resource allocation device is the target It is the described first default resource that the target of thread distribution, which performs resource,;If first idling-resource is less than the described first default resource, the resource allocation device is the subject thread point It is first idling-resource that the target matched somebody with somebody, which performs resource,.
- 3. according to the method for claim 1, it is characterised in that the resource allocation device is according to first idling-resource Distributing target execution resource for subject thread includes:First idling-resource is performed resource by the resource allocation device.
- 4. the method according to any one of Claims 2 or 3, it is characterised in that methods described also includes:If the target, which performs resource, is less than the described first default resource, the resource allocation device presets money by described first Source is adjusted to the second default resource, and the described second default resource is less than the described first default resource.
- 5. according to the method in any one of claims 1 to 3, it is characterised in that resource allocation device judges that thread performs Include in resource pool with the presence or absence of the first idling-resource:The resource allocation device obtains the execution resource of each thread in the thread execution resource pond;The execution resource of each thread is integrated to obtain occupied resource by the resource allocation device;The resource allocation device judges whether the occupied resource is less than the source material in the thread execution resource pond, if It is that then the resource allocation device determines the first idling-resource in the thread execution resource pond be present.
- 6. according to the method in any one of claims 1 to 3, it is characterised in that methods described also includes:If the resource allocation device determines that first idling-resource, the money are not present in the thread execution resource pond Source distributor blocks the subject thread;The resource allocation device judges to whether there is the second idling-resource in the thread execution resource pond, and described second is idle Resource is the available resources in thread execution resource pond described in the second moment;If second idling-resource in the thread execution resource pond be present, the resource allocation device is according to described second Idling-resource is that the subject thread distributes the target execution resource.
- 7. according to the method in any one of claims 1 to 3, it is characterised in that the thread execution resource pond is rearrangement Sequence buffer queue and reservation station and access queue.
- A kind of 8. resource allocation device, it is characterised in that including:First judge module, for judging to whether there is the first idling-resource in thread execution resource pond, the described first idle money Source is the available resources in thread execution resource pond described in the first moment;First processing module, if determining first sky in the thread execution resource pond be present for first judge module Not busy resource, then the resource allocation device is that subject thread distributes target execution resource according to first idling-resource.
- 9. resource allocation device according to claim 8, it is characterised in that the first processing module includes:First judging unit, preset for judging whether first idling-resource is more than or equal to the first of the subject thread Resource, the described first default resource is that the resource allocation device is that the subject thread is allocated in advance;First processing units, if being more than or equal to the described first default resource for first idling-resource, for the mesh It is the described first default resource that the target of graticule journey distribution, which performs resource,;If first idling-resource is less than described first Default resource, then it is first idling-resource that the target for subject thread distribution, which performs resource,.
- 10. resource allocation device according to claim 8, it is characterised in that the first processing module includes:Second processing unit, for performing resource using first idling-resource as the target of the subject thread.
- 11. the resource allocation device according to any one of claim 9 or 10, it is characterised in that the resource allocation dress Putting also includes:Adjusting module, if performing resource for the target is less than the described first default resource, by the described first default resource The second default resource is adjusted to, the described second default resource is less than the described first default resource.
- 12. the resource allocation device according to any one of claim 8 to 10, it is characterised in that described first judges mould Block includes:Acquiring unit, for obtaining the execution resource of each thread in the thread execution resource pond;Combining unit, the execution resource of each thread for the acquiring unit to be got, which is integrated, have been taken Resource;Second judging unit, for judging whether the occupied resource that the merging module obtains is less than thread execution The source material of resource pool, if so, then the resource allocation device determines for the first free time in the thread execution resource pond be present Resource.
- 13. the resource allocation device according to any one of claim 8 to 10, it is characterised in that the resource allocation dress Putting also includes:Blocking module, if for first idling-resource to be not present in the thread execution resource pond, block the target Thread;Second judge module, for judging to whether there is the second idling-resource in the thread execution resource pond, described second is empty Not busy resource is the available resources in thread execution resource pond described in the second moment;Second processing module, if for second idling-resource be present in the thread execution resource pond, according to described Two idling-resources are that the subject thread distributes the target execution resource.
- 14. the resource allocation device according to any one of claim 8 to 10, it is characterised in that the thread performs money Source pond is attached most importance to order buffer queue, reservation station and access queue.
- A kind of 15. resource allocation device, it is characterised in that including:Processor, bus;The processor is connected with the bus;The processor, perform following steps:Judge to whether there is the first idling-resource in thread execution resource pond, first idling-resource is line described in the first moment Available resources in Cheng Zhihang resource pools;If first idling-resource in the thread execution resource pond be present, according to institute State the first idling-resource and distribute target execution resource for subject thread.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610593967.4A CN107656806A (en) | 2016-07-25 | 2016-07-25 | A kind of resource allocation methods and resource allocation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610593967.4A CN107656806A (en) | 2016-07-25 | 2016-07-25 | A kind of resource allocation methods and resource allocation device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107656806A true CN107656806A (en) | 2018-02-02 |
Family
ID=61127137
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610593967.4A Pending CN107656806A (en) | 2016-07-25 | 2016-07-25 | A kind of resource allocation methods and resource allocation device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107656806A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110908795A (en) * | 2019-11-04 | 2020-03-24 | 深圳先进技术研究院 | Cloud computing cluster mixed part job scheduling method and device, server and storage device |
CN112019454A (en) * | 2019-05-29 | 2020-12-01 | 潘仲光 | Resource processing method, device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101055533A (en) * | 2007-05-28 | 2007-10-17 | 中兴通讯股份有限公司 | Multithreading processor dynamic EMS memory management system and method |
CN103810045A (en) * | 2012-11-09 | 2014-05-21 | 阿里巴巴集团控股有限公司 | Resource allocation method, resource manager, resource server and system |
US20140208331A1 (en) * | 2013-01-18 | 2014-07-24 | Nec Laboratories America, Inc. | Methods of processing core selection for applications on manycore processors |
-
2016
- 2016-07-25 CN CN201610593967.4A patent/CN107656806A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101055533A (en) * | 2007-05-28 | 2007-10-17 | 中兴通讯股份有限公司 | Multithreading processor dynamic EMS memory management system and method |
CN103810045A (en) * | 2012-11-09 | 2014-05-21 | 阿里巴巴集团控股有限公司 | Resource allocation method, resource manager, resource server and system |
US20140208331A1 (en) * | 2013-01-18 | 2014-07-24 | Nec Laboratories America, Inc. | Methods of processing core selection for applications on manycore processors |
Non-Patent Citations (3)
Title |
---|
何军,等: "多线程处理器资源分配策略", 《计算机工程》 * |
王薇,等: "《Java程序设计与实践》", 30 September 2010 * |
田艾平 等 编著: "《微型计算机技术》", 30 September 2000, 同济大学出版社 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112019454A (en) * | 2019-05-29 | 2020-12-01 | 潘仲光 | Resource processing method, device and storage medium |
CN110908795A (en) * | 2019-11-04 | 2020-03-24 | 深圳先进技术研究院 | Cloud computing cluster mixed part job scheduling method and device, server and storage device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE102016221811B4 (en) | Allocation of resources with tiered storage | |
DE102022107621A1 (en) | RESOURCE SELECTION PARTLY BASED ON WORKLOAD | |
CN104320854B (en) | Resource regulating method and device | |
DE112017001762T5 (en) | TECHNOLOGIES FOR THE USE OF DYNAMIC UNDERLAY NETWORKS IN CLOUD COMPUTING INFRASTRUCTURES | |
DE102019102883A1 (en) | Technologies for moving workloads between hardware queue managers | |
DE112005001512T5 (en) | Apparatus and method for high-speed access to a volatile disk drive storage using an integrated direct memory access device | |
CN104011685A (en) | Resource management method of virtual machine system, virtual machine system, and apparatus | |
CN108519917A (en) | A kind of resource pool distribution method and device | |
CN106502918B (en) | A kind of scheduling memory method and device | |
DE102019130686A1 (en) | TECHNOLOGIES TO PROVIDE DYNAMIC SELECTION OF EDGE AND LOCAL ACCELERATOR RESOURCES | |
CN106294233A (en) | The transfer control method of a kind of direct memory access and device | |
CN102937912B (en) | Dispatching method of virtual machine and equipment | |
CN106598495A (en) | Mixed storage service quality control method and control apparatus | |
CN104572301A (en) | Resource distribution method and system | |
CN107864211A (en) | Cluster resource dispatching method and system | |
US20210026696A1 (en) | Scheduling of a plurality of graphic processing units | |
CN109228954B (en) | Charging pile energy management method and system and charging pile group system | |
CN112905342A (en) | Resource scheduling method, device, equipment and computer readable storage medium | |
CN108429783A (en) | Electronic device, configuration file method for pushing and storage medium | |
CN106502778A (en) | A kind of terminal and its process scheduling optimization method | |
CN109542600B (en) | Distributed task scheduling system and method | |
DE102020201347A1 (en) | TECHNOLOGIES FOR ALIGNING SECURITY REQUIREMENTS OF FUNCTIONAL AS SERVICE IN EDGE CLOUDS | |
CN106598737A (en) | Method and device for implementing hardware resource allocation | |
CN106708615A (en) | Application management method and terminal | |
CN107656806A (en) | A kind of resource allocation methods and resource allocation device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180202 |
|
RJ01 | Rejection of invention patent application after publication |