CN106959895A - The resource regulating method and system of quick release thread - Google Patents

The resource regulating method and system of quick release thread Download PDF

Info

Publication number
CN106959895A
CN106959895A CN201610016539.5A CN201610016539A CN106959895A CN 106959895 A CN106959895 A CN 106959895A CN 201610016539 A CN201610016539 A CN 201610016539A CN 106959895 A CN106959895 A CN 106959895A
Authority
CN
China
Prior art keywords
thread
task
puzzle lock
mission
failure
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.)
Granted
Application number
CN201610016539.5A
Other languages
Chinese (zh)
Other versions
CN106959895B (en
Inventor
童寅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610016539.5A priority Critical patent/CN106959895B/en
Publication of CN106959895A publication Critical patent/CN106959895A/en
Application granted granted Critical
Publication of CN106959895B publication Critical patent/CN106959895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Retry When Errors Occur (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application proposes the resource regulating method and system of a kind of quick release thread, and this method includes:Scheduling thread distributes multiple tasks to mission thread;Puzzle lock records the task performance of the multiple mission thread;When there is the failure of at least one tasks carrying in the multiple task, corresponding mission thread sends failure information to the Puzzle lock, and wakes up the scheduling thread;The scheduling thread obtains the failure information of the Puzzle lock record, and discharges other related mission threads.This method can be when performing an associated group task to task failure carry out quick response and terminate inter-related task, it is to avoid non-essential resource consumption.

Description

The resource regulating method and system of quick release thread
Technical field
The application is related to Computing processing technology field, more particularly to a kind of scheduling of resource side of quick release thread Method and system.
Background technology
Puzzle lock, i.e., in multi-thread concurrent operation, the mechanism of overall lock control is carried out to a group task, it shows as Release it should be locked when expected tasks carrying is completed.
Existing mainstream scheme mainly uses following steps:
A. count initialized is locked, and sets a number of tasks initial value N, and a time-out time T.
B. main thread submits all tasks to start to perform, and Puzzle lock is counted.
C. main thread waits Puzzle lock release, during this period, perform the thread of task perform complete when by Puzzle lock N perform the operation that subtracts one.
D. Puzzle lock is kept to zero in N, or the stand-by period is discharged when exceeding the time-out time T of setting.
But, when performing a related group task, if one of mission failure, Puzzle lock can not be released quickly Put, the thread of other tasks still occupied can produce non-essential resource consumption until corresponding tasks carrying terminates, Meanwhile, main thread can not know the execution state of each task, can only terminate the group task in Puzzle lock zero setting and move back Go out the main thread, response speed is slow, and resource occupation time is long, and operation efficiency is relatively low.
The content of the invention
To solve above mentioned problem of the prior art, the purpose of the application is to propose a kind of quick release thread Resource regulating method and system, can when performing an associated group task to the failure carry out quick response of task simultaneously Terminate inter-related task, it is to avoid non-essential resource consumption.
To reach above-mentioned purpose, the resource regulating method for the quick release thread that the embodiment of the present application is proposed, including:Adjust Degree thread distributes multiple tasks to mission thread;Puzzle lock records the task performance of the multiple mission thread; When there is the failure of at least one tasks carrying in the multiple task, corresponding mission thread sends to the Puzzle lock and lost Information is lost, and wakes up the scheduling thread;The scheduling thread obtains the failure information of the Puzzle lock record, And discharge other related mission threads.
To reach above-mentioned purpose, the resource scheduling system for the quick release thread that the embodiment of the present application is proposed, including:Adjust Thread is spent, the described of the Puzzle lock record is obtained for multiple tasks to be distributed to mission thread, and after being waken up Failure information, and discharge other related mission threads;Puzzle lock, the task for recording the multiple mission thread Performance;Mission thread, the task for performing scheduling thread distribution, and when the tasks carrying fails, Failure information is sent to the Puzzle lock, and wakes up the scheduling thread.
The technical scheme provided from above the embodiment of the present application, is lost by there is a task in associated task Failure information is recorded by Puzzle lock when losing and main thread is waken up, main thread discharges other of correlation according to the record of Puzzle lock Mission thread, can all mission failures caused by one mission failure of quick response, resource is discharged in time, it is to avoid no Necessary resource occupation;In addition, the failure cause that main thread is recorded by Puzzle lock can obtain corresponding failure information, Be conducive to being improved system according to the information of mission failure, and then improve the automatization level of system, improve efficiency.
The aspect and advantage that the application is added will be set forth in part in the description, and will partly become from the following description Obtain substantially, or recognized by the practice of the application.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only It is some embodiments of the present application, for those of ordinary skill in the art, is not paying the premise of creative work Under, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the theory diagram for carrying out thread resources scheduling using Puzzle lock in the prior art;
Fig. 2 is the schematic flow sheet of the resource regulating method for the quick release thread that the embodiment of the application one is proposed;
Fig. 3 is that the utilization Puzzle lock of another embodiment of the application realizes the execution block schematic illustration quickly failed;
Fig. 4 is the structural representation of the resource scheduling system of the quick release thread of the embodiment of the application one.
Embodiment
The embodiment of the present application provides the resource regulating method and system of a kind of quick release thread.
In order that those skilled in the art more fully understand the technical scheme in the application, it is real below in conjunction with the application The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described Embodiment be only some embodiments of the present application, rather than whole embodiment.Based on the embodiment in the application, The every other embodiment that those of ordinary skill in the art are obtained under the premise of creative work is not made, all should Belong to the scope of the application protection.
Fig. 1 is the theory diagram that thread resources scheduling is carried out using Puzzle lock, in the prior art, main thread main It can be appreciated that scheduling thread, is responsible for initializing Puzzle lock, sets number of tasks N and time-out time T, will Task is issued in thread pool and performed, and calls Puzzle lock to exercise supervision the mission thread in thread pool.Puzzle lock is opened Checked whether after beginning work and be provided with time-out time, wait is directly entered if time-out time is not provided with, i.e., until institute There is task to terminate, Puzzle lock zero setting when just exit, if there is provided entering the overtime wait of band, i.e. institute if time-out time There is task to terminate, Puzzle lock zero setting or stand-by period reach that time-out time then exits wait.In waiting process every time Mission thread has renewal main thread to be all waken up, and checks whether count value is zeroed:
If a) be not zeroed, and there is time-out time, then calculate whether remaining time-out time is more than zero:
If remaining time-out time is more than zero, it is continuing with remaining time-out time and is waited;
If remaining time-out time is less than zero, directly return, and it is time-out to set result;
If b) be not zeroed, and without time-out time, then continue waiting for;
If c) be zeroed, wait is directly exited, and return.
On the basis of above-mentioned counting lock mechanism, each mission thread, which to be changed, can all recorded Puzzle lock and wake up main line Journey checks count value, but above-mentioned existing resource dispatching method is only applicable to the multiple tasks of nonexistence results correlation Execution, it is this when the implementing result of all tasks can all be affected when there is a mission failure in a group task The higher group task of results relevance will can not discharge other mission threads in a mission failure, cause money The inessential occupancy in source, Puzzle lock and main thread, which are not all set up, responds rapidly to this mechanism individually failed, so that nothing The resource of method rapidly shared by release.
Fig. 2 is the schematic flow sheet of the resource regulating method for the quick release thread that the embodiment of the application one is proposed, at this In embodiment shown in figure, failure information and wakeup schedule thread are sent to Puzzle lock by mission thread so that scheduling Thread identification mission can fail rapidly, discharge other related mission threads.As shown in Fig. 2 this method includes:
Step 201, scheduling thread distributes multiple tasks to mission thread.
Step 202, Puzzle lock records the task performance of the multiple mission thread.
Step 203, when there is the failure of at least one tasks carrying in the multiple task, corresponding mission thread is to institute State Puzzle lock and send failure information, and wake up the scheduling thread.
Step 204, scheduling thread obtains the failure information of the Puzzle lock record, and discharges other related timess Business thread.
Wherein, failure information can include execution status of task and failure cause.Execution status of task is, for example, that task is lost Lose, failure cause there can be a variety of situations, fed back available for generation system journal or as operation etc..Failure information can To be marked using special identifier, the application is not limited this.
According to existing scheduling mechanism, scheduling thread is referred to as main thread, is locked in count initialized and divides task It is assigned to after mission thread, main thread can enter dormancy, and subtract Puzzle lock when mission thread completes task and wake up in the lump Whether main thread checks count value zero setting.
Embodiments in accordance with the present invention, also failure information can be sent when task thread execution task fails to Puzzle lock And main thread is waken up, Puzzle lock records the status of fail and failure cause of the mission thread, and main thread is looked into after being waken up Puzzle lock is seen, situation about being recorded first according to Puzzle lock terminates the execution of other tasks, discharges other related task lines Journey, so can all mission failures caused by one mission failure of quick response, resource is discharged in time, it is to avoid need not The resource occupation wanted;In addition, the failure cause that main thread is recorded by Puzzle lock can obtain corresponding feedback, favorably System is improved according to the reason for mission failure, and then improves the automatization level of system.
According to one embodiment of the application, at least one described tasks carrying unsuccessfully includes at least one described task weight Try to fail after preset times, or, at least one described task is not carried out success in preset time.For example, can be with Pre-set each task and retry and no longer retried after how many times, regard as mission failure, one can also be pre-set and appointed Business time, the time equivalent to default time-out time in Puzzle lock or can be individually for each task and set The time-out time put, when task execution time exceedes the preset time, task is identified as failure.So in system During the mechanism that middle presence entirety is retried, the number of retries of overall task can be reduced as far as possible, and the task to a thread is entered Row repeatedly retry or time-out after just stop the progress of other tasks, effectively reduce resource and repeat occupancy, improve efficiency.
According to one embodiment of the application, the task performance of the multiple mission thread is recorded in the Puzzle lock Afterwards, methods described also includes:The mission thread sends task status information after completion task to the Puzzle lock; The Puzzle lock is waited according to task quantity, the task status information and parameter preset.For example in mission thread Notifications count is locked and wakes up main thread after running succeeded, and often has tasks carrying success count value to subtract one, until count value is Lock is discharged when zero.Wherein, parameter preset can be a time out time or number of retries etc..
According to one embodiment of the application, when at least one tasks carrying fails, when at least one tasks carrying loses When losing, the count value of the Puzzle lock is set to default particular value;When the success of all tasks carryings, the Puzzle lock Count value zero setting.For example, the lock zero setting release of tasks carrying success count, Puzzle lock when having a tasks carrying failure Same release, but a particular value can be set to, -1 or other particular value is for example set to, so that host process can be known The Puzzle lock is not normal release or abnormal release.
According to one embodiment of the application, the Puzzle lock includes default structural data mapping, described right The mission thread answered is sent to the Puzzle lock after failure information, and the Puzzle lock records the failure information in institute State in the corresponding structural data mapping of mission thread.Structural data mapping e.g. build in advance chart, Form etc., is corresponded with the mark of each thread, after failure information is received, and Puzzle lock can recognize the transmission mistake The mark of the mission thread of information is lost, such as the numbering of thread, corresponding knot is found according to the mark of the mission thread Structure data are mapped, and the failure information received is correspondingly write in the mapping, and the information of record is, for example,:Thread Numbering, implementing result, implementation progress, failure cause etc., wherein, implementing result needs reason based on failure Solution, can also be recorded when running succeeded by the mapping, so that implementing result can also be success, this Invention is no longer explained;Failure cause can be the mistake that mission thread is got during execution task Code or error message by mistake, such as performed task is the accounts information that A accounts are obtained to server A, is being held Mission thread can grab the error message of server A return, error message by feasible means during row failure E.g. server connection time-out, accounts information are not present, ask out of date etc..Mapped and remembered by structural data The related failure information of each mission thread is recorded, effective error message can be carried out after task terminates and is summarized and anti- Feedback, is easy to the error correction and improvement of program.
Embodiments in accordance with the present invention, discharge Puzzle lock when can have a mission failure in associated task, , being capable of one mission failure of quick response and related other of wakeup schedule thread release are not carried out the mission thread terminated Caused all mission failures, discharge resource in time, it is to avoid unnecessary resource occupation;In addition, main thread passes through meter The failure cause of number lock record can obtain corresponding feedback, be conducive to changing system according to the reason for mission failure Enter, and then improve the automatization level of system, improve efficiency.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of resource scheduling system of quick release thread, It can be used for realizing the method described by above-described embodiment, as described in the following examples.Due to quick release thread The principle that resource scheduling system solves problem is similar to the resource regulating method of quick release thread, therefore quick release line The implementation of the resource scheduling system of journey may refer to the implementation of the resource scheduling system of quick release thread, repeat part not Repeat again.It is used below, term " unit " or " module " can realize predetermined function software and/or The combination of hardware.Although the system described by following examples is preferably realized with software, hardware, or soft The realization of the combination of part and hardware is also that may and be contemplated.
Fig. 3 is the structural representation of the resource scheduling system of the quick release thread of the embodiment of the application one.The present embodiment System can be realize corresponding function logical block constitute, or operation have corresponding function software electronics set Standby, the system of the present embodiment can be that operating system can also be computer program etc..
As shown in figure 3, the resource scheduling system of the quick release thread includes:Scheduling thread 100, Puzzle lock 200 With mission thread 300.
Wherein, scheduling thread 100 is used to distribute multiple tasks to mission thread, and obtains the meter after being waken up The failure information of number lock record, and discharge other related mission threads.
Puzzle lock 200 is used for the task performance for recording the multiple mission thread;
Mission thread 300 is used for the performing scheduling thread distribution of the task, and when the tasks carrying fails, to institute State Puzzle lock and send failure information, and wake up the scheduling thread.
According to one embodiment of the application, the failure information includes execution status of task and failure cause.
According to one embodiment of the application, at least one described tasks carrying unsuccessfully includes at least one described task weight Try to fail after preset times, or, at least one described task is not carried out success in preset time.
According to one embodiment of the application, the mission thread is additionally operable to after completion task send to the Puzzle lock Task status information;The Puzzle lock is additionally operable to be carried out according to task quantity, the task status information and parameter preset Wait.
According to one embodiment of the application, the Puzzle lock is additionally operable to:, will when at least one tasks carrying fails Count value is set to default particular value;When the success of all tasks carryings, count value is set to zero.
According to one embodiment of the application, the Puzzle lock also includes logging modle, for by the mission thread The failure information record is in the mapping of corresponding structural data.
Embodiments in accordance with the present invention, discharge Puzzle lock when can have a mission failure in associated task, , being capable of one mission failure of quick response and related other of wakeup schedule thread release are not carried out the mission thread terminated Caused all mission failures, discharge resource in time, it is to avoid unnecessary resource occupation;In addition, main thread passes through meter The failure cause of number lock record can obtain corresponding feedback, be conducive to changing system according to the reason for mission failure Enter, and then improve the automatization level of system, improve efficiency.
Specifically, it is that the execution block schematic illustration quickly failed is realized using Puzzle lock as shown in Figure 4:
Step 1, count initialized is locked, and assigns the initial value N of currently one task groups quantity of lock.Wherein, in a tool In body embodiment, time-out time can also be initialized for Puzzle lock, when overall task, which performs the time, exceedes time-out time, Puzzle lock zero setting.
Step 2, task is assigned to mission thread and starts to perform by main thread.
Specifically, the mission thread in main thread scheduling thread pond performs corresponding task, Puzzle lock record multiple tasks The task performance of thread.
Step 3, main thread dormancy, waits Puzzle lock release.
Step 4, when mission thread performs Mission Success, count value is subtracted one by mission thread control Puzzle lock, and is called out Awake main thread checks counting lock status.
Step 5, when mission thread performs mission failure, mission thread sends failure information to Puzzle lock, will count Value is set to default particular value, and wakes up main thread.
Specifically, mission thread can be by the preset interface of Puzzle lock to the corresponding structuring of the thread in Puzzle lock Data mapping is modified or mission thread sends failure information to Puzzle lock, and Puzzle lock is unsuccessfully believed according to this The mark of breath and mission thread changes corresponding structural data mapping, and changes count value accordingly.
In the particular embodiment, mission failure can be judged by setting time-out time, can also be by performed Task code return value in itself judge mission failure, still unsuccessfully judge after preset times by that can also be retried Mission failure.These modes can be realized by the way that task code is configured or changed in itself, no longer be gone to live in the household of one's in-laws on getting married herein State.
Step 6, counting lock status is checked after main thread is waken up, judges whether Puzzle lock normally discharges.
Wherein, default particular value for example can be negative, decimal or other non-zero positive integer values between N Deng the present embodiment is illustrated exemplified by -1.
Specifically, normal release can be judged whether by the count value of Puzzle lock, if count value is 1 to N Between conventional integer value, then judge that Puzzle lock not yet discharges, perform step 3;If count value is 0, judge Puzzle lock is normal release, and all mission threads are finished and run succeeded, and perform step 7;If count value is - 1, then judge that Puzzle lock discharges to be abnormal, perform step 8.
Step 7, main thread discharges, and returns to task action result.
Step 8, main thread cancels other related tasks, discharges corresponding mission thread.
Step 9, main thread obtains the information of Puzzle lock record, according to the returning result log of each mission thread.
Wherein step 9 is optional, and the returning result generation daily record of each mission thread can be obtained by step 9, is led to Later arrangement of the phase to daily record is summarized, and task code or system etc. are improved.
It is the account for obtaining the A accounts being stored on N platform servers with task in the specific embodiment of the application Exemplified by information, the task can be divided into N number of parallel task and distribute to N number of mission thread, Mei Geren by main thread The content of business is to obtain the part accounts information of A accounts storage on that server to wherein one server.Meanwhile, Main thread constructs an initial count value and the tasks carrying situation of each mission thread is carried out for N Puzzle lock counter Supervision.
Mission thread starts after execution task, and main thread enters dormancy, and Puzzle lock is started counting up, and Puzzle lock can be set Time-out time, mission failure is judged after more than default time-out time, can also be not provided with time-out time, only be existed The count value of Puzzle lock just discharges main thread when being preset value.Preset value is, for example, 0 or default particular value.
Whenever there is tasks carrying success, corresponding mission thread can send the information that task is completed to Puzzle lock, and pass through Notification signal notify wakes up main thread and checks Puzzle lock.Puzzle lock is instructed according to the information by countDown () will Count value subtracts one, until the success of all tasks carryings, and count value is kept to 0, and task overall execution is finished, and main thread is released Put, and return to implementing result.
When one of mission thread fails, then the accounts information of A accounts, therefore this can not be completely got The overall failure of business, it is necessary that remaining unfinished inter-related task thread is not just all continued executing with.Now, failure Mission thread failure information (such as failure cause, error code) recorded in Puzzle lock by preset interface In corresponding structural data mapping, and Puzzle lock, main thread root are checked by notification signal notify wake-up main threads Judge Puzzle lock counting of abnormal according to the count value of Puzzle lock for -1, quick release Puzzle lock stops other related tasks, Discharge related mission thread.Judge the method for tasks carrying failure with reference to step 5.Further, it is also possible to according to structure Change the related daily record of the content generation recorded in data mapping and carry out error analysis.
The count value of Puzzle lock is set to default by the present embodiment when can have a mission failure in associated task Particular value, and wake up other related mission threads of main thread release, can one mission failure of quick response cause All mission failures, resource is discharged in time, it is to avoid unnecessary resource occupation;In addition, main thread passes through Puzzle lock The failure cause of record can obtain corresponding feedback, be conducive to being improved system according to the reason for mission failure, And then the automatization level of system is improved, improve efficiency.
It should be noted that in the description of the present application, term " first ", " second " etc. are only used for describing purpose, and It is not intended that indicating or implying relative importance.In addition, in the description of the present application, it is unless otherwise indicated, " many It is individual " it is meant that two or more.
Any process described otherwise above or method description are construed as in flow chart or herein, represent to include The module of the code of one or more executable instructions for the step of realizing specific logical function or process, fragment Or part, and the scope of the preferred embodiment of the application includes other realization, wherein can not by shown or The order of discussion, including according to involved function by it is basic simultaneously in the way of or in the opposite order, carry out perform function, This should be understood by embodiments herein person of ordinary skill in the field.
It should be appreciated that each several part of the application can be realized with hardware, software, firmware or combinations thereof.Upper State in embodiment, multiple steps or method can be performed in memory and by suitable instruction execution system with storage Software or firmware realize.If for example, being realized with hardware, with another embodiment, this can be used Any one of following technology known to field or their combination are realized:With for realizing logic to data-signal The discrete logic of the logic gates of function, the application specific integrated circuit with suitable combinational logic gate circuit, can Program gate array (PGA), field programmable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method is carried Rapid to can be by program to instruct the hardware of correlation to complete, described program can be stored in a kind of computer-readable and deposit In storage media, the program upon execution, including one or a combination set of the step of embodiment of the method.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means with reference to the embodiment or the specific features of example description, structure, material Or feature is contained at least one embodiment of the application or example.In this manual, above-mentioned term is shown The statement of meaning property is not necessarily referring to identical embodiment or example.Moreover, description specific features, structure, material or Person's feature can in an appropriate manner be combined in any one or more embodiments or example.
Although embodiments herein has been shown and described above, it is to be understood that above-described embodiment is example Property, it is impossible to the limitation to the application is interpreted as, one of ordinary skill in the art within the scope of application can be right Above-described embodiment is changed, changed, replacing and modification.

Claims (12)

1. a kind of resource regulating method of quick release thread, it is characterised in that including:
Scheduling thread distributes multiple tasks to mission thread;
Puzzle lock records the task performance of the multiple mission thread;
When there is the failure of at least one tasks carrying in the multiple task, corresponding mission thread is sent out to the Puzzle lock Failure information is sent, and wakes up the scheduling thread;
The scheduling thread obtains the failure information of the Puzzle lock record, and discharges other related task lines Journey.
2. according to the method described in claim 1, it is characterised in that the failure information includes execution status of task And failure cause.
3. according to the method described in claim 1, it is characterised in that at least one described tasks carrying unsuccessfully includes At least one described task retried and fail after preset times, or, at least one described task is not held in preset time Go successfully.
4. according to the method described in claim 1, it is characterised in that record the multiple task in the Puzzle lock After the task performance of thread, methods described also includes:
The mission thread sends task status information after completion task to the Puzzle lock;
The Puzzle lock is waited according to task quantity, the task status information and parameter preset.
5. according to the method described in claim 1, it is characterised in that methods described also includes:
When at least one tasks carrying fails, the count value of the Puzzle lock is set to default particular value, so that described Scheduling thread identification has tasks carrying failure;
When the success of all tasks carryings, the count value zero setting of the Puzzle lock.
6. according to the method described in claim 1, it is characterised in that the Puzzle lock includes default structuring Data map, and after the corresponding mission thread sends failure information to the Puzzle lock, methods described also includes:
The Puzzle lock records the failure information in the corresponding structural data mapping of the mission thread.
7. a kind of resource scheduling system of quick release thread, it is characterised in that including:
Scheduling thread, the Puzzle lock record is obtained for multiple tasks to be distributed to mission thread, and after being waken up The failure information, and discharge other related mission threads;
Puzzle lock, the task performance for recording the multiple mission thread;
Mission thread, the task for performing scheduling thread distribution, and when the tasks carrying fails, to described Puzzle lock sends failure information, and wakes up the scheduling thread.
8. system according to claim 7, it is characterised in that the failure information includes execution status of task And failure cause.
9. system according to claim 7, it is characterised in that at least one described tasks carrying unsuccessfully includes At least one described task retried and fail after preset times, or, at least one described task is not held in preset time Go successfully.
10. system according to claim 7, it is characterised in that the mission thread is additionally operable in completion task Afterwards task status information is sent to the Puzzle lock;The Puzzle lock is additionally operable to according to task quantity, the task status Information and parameter preset are waited.
11. system according to claim 7, it is characterised in that the Puzzle lock is additionally operable to:
When at least one tasks carrying fails, count value is set to default particular value;
When the success of all tasks carryings, count value is set to zero.
12. system according to claim 7, it is characterised in that the Puzzle lock also includes logging modle, is used Recorded in by the failure information of the mission thread in corresponding structural data maps.
CN201610016539.5A 2016-01-12 2016-01-12 Resource scheduling method and system for quickly releasing threads Active CN106959895B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610016539.5A CN106959895B (en) 2016-01-12 2016-01-12 Resource scheduling method and system for quickly releasing threads

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610016539.5A CN106959895B (en) 2016-01-12 2016-01-12 Resource scheduling method and system for quickly releasing threads

Publications (2)

Publication Number Publication Date
CN106959895A true CN106959895A (en) 2017-07-18
CN106959895B CN106959895B (en) 2021-01-01

Family

ID=59480844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610016539.5A Active CN106959895B (en) 2016-01-12 2016-01-12 Resource scheduling method and system for quickly releasing threads

Country Status (1)

Country Link
CN (1) CN106959895B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678838A (en) * 2017-10-19 2018-02-09 郑州云海信息技术有限公司 A kind of method, apparatus and virtual machine management platform for tracking virtual machine operations
CN109032775A (en) * 2018-06-29 2018-12-18 武汉斗鱼网络科技有限公司 A kind of method, terminal device and storage medium obtaining Task Progress
CN109117115A (en) * 2018-07-16 2019-01-01 精硕科技(北京)股份有限公司 data operation scheduling processing method and device, storage medium, processor
CN109254838A (en) * 2018-08-21 2019-01-22 中邮科通信技术股份有限公司 A kind of automation task based on JAVA BeanShell
CN112084014A (en) * 2020-08-10 2020-12-15 珠海格力电器股份有限公司 Data processing method, device, equipment and medium
CN114428649A (en) * 2022-01-26 2022-05-03 上海燧原科技有限公司 Configurable hardware resource synchronization device and method
CN114528113A (en) * 2022-04-24 2022-05-24 广州中望龙腾软件股份有限公司 Thread lock management system, method, equipment and readable medium
CN117608791A (en) * 2023-12-01 2024-02-27 成都北中网芯科技有限公司 Split thread scheduling method and verification method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1917504A (en) * 2005-08-20 2007-02-21 中兴通讯股份有限公司 Method for preventing deadlock caused by accessing shared data of resources
CN101425024A (en) * 2008-10-24 2009-05-06 中国移动通信集团山东有限公司 Multitasking method and device
CN101576830A (en) * 2009-06-04 2009-11-11 中兴通讯股份有限公司 Deadlock detection method and device of database transaction lock mechanism
CN101957780A (en) * 2010-08-17 2011-01-26 中国电子科技集团公司第二十八研究所 Resource state information-based grid task scheduling processor and grid task scheduling processing method
CN104461862A (en) * 2014-10-23 2015-03-25 中标软件有限公司 Data processing system and method and device for resource recovery after thread crash

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1917504A (en) * 2005-08-20 2007-02-21 中兴通讯股份有限公司 Method for preventing deadlock caused by accessing shared data of resources
CN101425024A (en) * 2008-10-24 2009-05-06 中国移动通信集团山东有限公司 Multitasking method and device
CN101576830A (en) * 2009-06-04 2009-11-11 中兴通讯股份有限公司 Deadlock detection method and device of database transaction lock mechanism
CN101957780A (en) * 2010-08-17 2011-01-26 中国电子科技集团公司第二十八研究所 Resource state information-based grid task scheduling processor and grid task scheduling processing method
CN104461862A (en) * 2014-10-23 2015-03-25 中标软件有限公司 Data processing system and method and device for resource recovery after thread crash

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
五月的仓颉: "Java多线程11:ReentrantLock的使用和Condition", 《博客园HTTPS://WWW.CNBLOGS.COM/XRQ730/P/4855155.HTML》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678838A (en) * 2017-10-19 2018-02-09 郑州云海信息技术有限公司 A kind of method, apparatus and virtual machine management platform for tracking virtual machine operations
CN107678838B (en) * 2017-10-19 2021-07-02 郑州云海信息技术有限公司 Method and device for tracking operation of virtual machine and virtual machine management platform
CN109032775A (en) * 2018-06-29 2018-12-18 武汉斗鱼网络科技有限公司 A kind of method, terminal device and storage medium obtaining Task Progress
CN109117115A (en) * 2018-07-16 2019-01-01 精硕科技(北京)股份有限公司 data operation scheduling processing method and device, storage medium, processor
CN109254838A (en) * 2018-08-21 2019-01-22 中邮科通信技术股份有限公司 A kind of automation task based on JAVA BeanShell
CN109254838B (en) * 2018-08-21 2021-11-23 中邮科通信技术股份有限公司 JAVA-based automation task of BeanShell
CN112084014A (en) * 2020-08-10 2020-12-15 珠海格力电器股份有限公司 Data processing method, device, equipment and medium
CN114428649A (en) * 2022-01-26 2022-05-03 上海燧原科技有限公司 Configurable hardware resource synchronization device and method
CN114428649B (en) * 2022-01-26 2024-03-05 上海燧原科技股份有限公司 Configurable hardware resource synchronization device and method
CN114528113A (en) * 2022-04-24 2022-05-24 广州中望龙腾软件股份有限公司 Thread lock management system, method, equipment and readable medium
CN114528113B (en) * 2022-04-24 2022-08-23 广州中望龙腾软件股份有限公司 Thread lock management system, method, equipment and readable medium
CN117608791A (en) * 2023-12-01 2024-02-27 成都北中网芯科技有限公司 Split thread scheduling method and verification method thereof

Also Published As

Publication number Publication date
CN106959895B (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN106959895A (en) The resource regulating method and system of quick release thread
Gu et al. Liquid: Intelligent resource estimation and network-efficient scheduling for deep learning jobs on distributed GPU clusters
Zhang et al. Fuxi: a fault-tolerant resource management and job scheduling system at internet scale
AU2011299337B2 (en) Controlled automatic healing of data-center services
US9275172B2 (en) Systems and methods for analyzing performance of virtual environments
CN107832146A (en) Thread pool task processing method in highly available cluster system
CN109412874B (en) Equipment resource configuration method, device, server and storage medium
CN104063279B (en) Method for scheduling task, device and terminal
US20140215481A1 (en) Assigning nodes to jobs based on reliability factors
CN108268319A (en) Method for scheduling task, apparatus and system
CN104317650A (en) Map/Reduce type mass data processing platform-orientated job scheduling method
CN103581313B (en) Connection establishment method for processing equipment and cluster server and processing equipment
CN105378668B (en) The interruption of operating system management in multicomputer system guides
CN109710416B (en) Resource scheduling method and device
CN102457578B (en) A kind of distributed network monitoring method based on case mechanism
CN102081554A (en) Cloud computing operating system as well as kernel control system and method thereof
CN113886029A (en) Cross-region distributed data center task scheduling method and system
CN112445615A (en) Thread scheduling system, computer equipment and storage medium
CN111160873A (en) Batch processing device and method based on distributed architecture
CN107566214A (en) A kind of performance test methods and device
CN109039929A (en) Business scheduling method and device
CN108415766A (en) A kind of rendering task dynamic dispatching method
CN115934344A (en) Heterogeneous distributed reinforcement learning calculation method, system and storage medium
CN112698931B (en) Distributed scheduling system for cloud workflow
CN107203256A (en) Energy-conservation distribution method and device under a kind of network function virtualization scene

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
TA01 Transfer of patent application right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant