CN108415765A - Method for scheduling task, device and intelligent terminal - Google Patents
Method for scheduling task, device and intelligent terminal Download PDFInfo
- Publication number
- CN108415765A CN108415765A CN201810168280.5A CN201810168280A CN108415765A CN 108415765 A CN108415765 A CN 108415765A CN 201810168280 A CN201810168280 A CN 201810168280A CN 108415765 A CN108415765 A CN 108415765A
- Authority
- CN
- China
- Prior art keywords
- task
- asynchronous task
- execution time
- asynchronous
- processor
- 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
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/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
Abstract
The application proposes a kind of method for scheduling task, device and intelligent terminal, wherein method includes:Wherein, method includes:The addition request of the first asynchronous task is obtained, addition request includes the original execution time of the first asynchronous task;According to each execution time of current each second asynchronous task for having included in system, the optimal execution time of the first asynchronous task is determined;Optimal execution time is sent to the promoter of the first asynchronous task;If the first asynchronous task is added according to optimal execution time and executes queue by the confirmation request that the promoter for getting the first asynchronous task returns.It solves the technical problem that task scheduling mode reliability is not high in asynchronous task in the prior art, under the premise of making full use of resource, improves the reliability and harmony of task scheduling, realize the promotion of the operational efficiency and success rate of asynchronous task.
Description
Technical field
This application involves a kind of technical field of computer information processing more particularly to method for scheduling task, device and intelligence
Terminal.
Background technology
With the development of computer technology, the treating capacity of computer data is also increasing, wherein in data processing,
Asynchronous task is widely applied, and usual asynchronous task is used for the uncomfortable task in a synchronous manner to complete and processes
Journey, for example, a large amount of off-line datas processing procedure, for example, needing the task of timing operation or real time resources need not be occupied
Task processes etc..
In the related technology, the processing mode of asynchronous task is:Asynchronous task is directly transferred from database to execution node.
However, this mode cannot achieve the efficient execution and distribution to asynchronous task, often result in that resource is idle and certain resource consumptions
Fei Yi to the greatest extent etc., it is slow so as to cause the relatively low execution for making asynchronous task of accuracy of asynchronous task scheduling.
Apply for content
The application is intended to solve at least some of the technical problems in related technologies.
For this purpose, first purpose of the application is to propose a kind of method for scheduling task solve asynchronous in the prior art
The not high technical problem of task scheduling mode reliability improves task scheduling under the premise of making full use of resource in task
Reliability and harmony, realize the promotion of the operational efficiency and success rate of asynchronous task.
Second purpose of the application is to propose a kind of task scheduling apparatus.
The third purpose of the application is to propose a kind of intelligent terminal.
The 4th purpose of the application is to propose a kind of non-transitorycomputer readable storage medium.
The 5th purpose of the application is to propose a kind of computer program product.
In order to achieve the above object, the application first aspect embodiment proposes a kind of method for scheduling task, including:Obtain first
Asynchronous task addition request;According to each execution time of current each second asynchronous task for having included in system, described the is determined
The optimal execution time of one asynchronous task;The optimal execution time is sent to the promoter of first asynchronous task;If
The confirmation request that the promoter of first asynchronous task returns is got, then according to the optimal execution time, by described the
One asynchronous task, which is added, executes queue.
The method for scheduling task of the embodiment of the present application obtains the addition request of the first asynchronous task, according in system it is current
Including each second asynchronous task each execution time, determine the optimal execution time of the first asynchronous task, in turn, will most preferably hold
The row time is sent to the promoter of the first asynchronous task, if the confirmation request that the promoter for getting the first asynchronous task returns,
Then according to optimal execution time, the first asynchronous task is added and executes queue.It solves as a result, in asynchronous task in the prior art
The not high technical problem of task scheduling mode reliability improves the reliable of task scheduling under the premise of making full use of resource
Property and harmony, realize the promotion of the operational efficiency and success rate of asynchronous task.
In order to achieve the above object, the application second aspect embodiment proposes a kind of task scheduling apparatus, including:Obtain mould
Block, for obtaining the addition request of the first asynchronous task;Determining module, for asynchronous according to current included each second in system
Each execution time of task, determine the optimal execution time of first asynchronous task;Sending module, for most preferably being held described
The row time is sent to the promoter of first asynchronous task;Processing module, for getting first asynchronous task
When the confirmation request that promoter returns, according to the optimal execution time, first asynchronous task is added and executes queue.
The task scheduling apparatus of the embodiment of the present application obtains the addition request of the first asynchronous task, according in system it is current
Including each second asynchronous task each execution time, determine the optimal execution time of the first asynchronous task, in turn, will most preferably hold
The row time is sent to the promoter of the first asynchronous task, if the confirmation request that the promoter for getting the first asynchronous task returns,
Then according to optimal execution time, the first asynchronous task is added and executes queue.It solves as a result, in asynchronous task in the prior art
The not high technical problem of task scheduling mode reliability improves the reliable of task scheduling under the premise of making full use of resource
Property and harmony, realize the promotion of the operational efficiency and success rate of asynchronous task.
In order to achieve the above object, the application third aspect embodiment proposes a kind of intelligent terminal, including:Processor and storage
Device;Wherein, the processor can perform to run with described by reading the executable program code stored in the memory
The corresponding program of program code, for realizing the method for scheduling task as described in above-described embodiment.
To achieve the goals above, the application fourth aspect embodiment proposes a kind of computer-readable storage of non-transitory
Medium realizes the method for scheduling task as described in above-described embodiment when the program is executed by processor.
To achieve the goals above, the 5th aspect embodiment of the application proposes a kind of computer program product, when described
When instruction processing unit in computer program product executes, the method for scheduling task as described in above-described embodiment is executed.
The additional aspect of the application and advantage will be set forth in part in the description, and will partly become from the following description
It obtains obviously, or recognized by the practice of the application.
Description of the drawings
The application is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, wherein:
A kind of flow diagram for method for scheduling task that Fig. 1 is provided by the embodiment of the present application;
The flow diagram for another method for scheduling task that Fig. 2 is provided by the embodiment of the present application;
The flow diagram for another method for scheduling task that Fig. 3 is provided by the embodiment of the present application;
Also a kind of flow diagram of method for scheduling task that Fig. 4 is provided by the embodiment of the present application;
Fig. 5 is a kind of structural schematic diagram of task scheduling apparatus provided by the embodiments of the present application;
Fig. 6 is that a kind of product of method for scheduling task provided by the embodiments of the present application realizes schematic diagram;And
Fig. 7 is the block diagram for the exemplary computer device for realizing the application embodiment.
Specific implementation mode
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to for explaining the application, and should not be understood as the limitation to the application.
Below with reference to the accompanying drawings the method for scheduling task, device and intelligent terminal of the embodiment of the present application are described.
A kind of flow diagram for method for scheduling task that Fig. 1 is provided by the embodiment of the present application.
As background technology is analyzed, appointing in the direct called data library of the scheduling mode of asynchronous task in the prior art
It is engaged in node execution is executed, this mode that task scheduling is carried out dependent on system performance does not account for the real-time shape of resource
State causes reliability of operation not high, in some instances it may even be possible to lead to task run unsuccessfully etc..
In order to solve the above-mentioned technical problem, this application provides a kind of method for scheduling task, based on resources occupation rate
Task scheduling is carried out, the reliability and harmony of task scheduling is improved, realizes the operational efficiency and success rate of asynchronous task
Promotion, and with the promoter of asynchronous task carry out execute the time confirmation, meet the requirement of execution sequence, and make full use of
Resource.
Specifically, as shown in Figure 1, the method for scheduling task includes the following steps:
Step 101, the addition request of the first asynchronous task is obtained.
Wherein, the addition manner of the first asynchronous task is different according to the difference that application needs, as a kind of possible reality
Existing mode can provide SDK API for users to use in web front-end, when detecting call operation of the user to SDK api interfaces
Afterwards, the addition request of the first asynchronous task is got.
As alternatively possible realization method, when main thread has and asynchronous can hold according to current pending task judgement
When capable task, the first asynchronous task addition request of main thread transmission is got.
Step 102, according to each execution time of current each second asynchronous task for having included in system, determine that first is asynchronous
The optimal execution time of task.
It is appreciated that after the addition request for getting the first asynchronous task, it is suitable that node progress is not executed directly
Sequence is added, but according to each execution time of current each second asynchronous task for having included in system, determine first task most
The good execution time, as a result, according to the optimal execution time for executing the first asynchronous task of time progress of each second asynchronous task
Determination so that the execution time and the execution time of the second asynchronous task of the first asynchronous task mutually coordinates, and is improving resource
While utilization rate, it ensure that the first asynchronous task be not preempted resource when being executed with the second asynchronous task, it is reliable for operation.
It should be noted that according to the difference of application scenarios, according to current each second asynchronous task for having included in system
Each execution time, determine the mode of the optimal execution time of the first asynchronous task, it is including but not limited to following several:
The first example:
In this example, the execution time for obtaining each second asynchronous task determines free time when the second asynchronous task executes
Time, using the free time as the optimal execution time of the first asynchronous task.
For example, when comprising two it is pending or be carrying out the second asynchronous task A and B when, asynchronous task A's
The execution time is a, and execution time of asynchronous task B is b, then can using a to b between free time as the first asynchronous task
Optimal execution time, alternatively, using execute time b after free time as optimal execution time of the first asynchronous task etc..
Certainly, in this example, in order to preferably carry out the distribution of resource, asynchronous of to be added first can also be obtained
The task amount of business estimates the execution duration needs of the first asynchronous task according to the task amount of the first asynchronous task, by each second
Between asynchronous task closest between executing the free time that duration needs, as the optimal execution time for executing duration needs.
Second of example:
In this example, further include the attribute information of the first asynchronous task in the first asynchronous task of acquisition addition request,
In, the attribute information of asynchronous task includes that command context, execution number, execution unsuccessfully can number of retries, execution task data amounts
Deng.
Specifically, in this example, as shown in Fig. 2, the step 102 includes:
Step 201, according to each attribute information for executing time and each second asynchronous task of each second asynchronous task, prediction
Use state of each processor in day part in system.
Wherein, processor refer to can with the machine of Run Script unit, such as script unit according to operation function, place
It may include CPU, memory and network interface card etc. to manage device, and the use state of processor may include resources occupation rate, and the task of operation accounts for
With time etc..
Even if being appreciated that the second asynchronous task for having within some time and executing, but second when execution is asynchronous
The data volume of task is smaller, may be smaller to the pressure of processor, alternatively, the load capacity of processor it is relatively strong to processor also
Other tasks can be loaded simultaneously to be executed, thus, in order to more fully utilize the machine resources such as processor, in this example
In, according to each attribute information for executing time and each second asynchronous task of each second asynchronous task, respectively handled in forecasting system
Device day part use state, in order to according to processor in the use state of day part, the operating pressure of decision processor.
For example, the second asynchronous task A and B that be current pending or being carrying out, processor includes processor 1
With processor 2, processor 1 is used for the second asynchronous task A of execution, different when processor 2 is used for the second asynchronous task B of execution
The execution time of step task A is a, and the execution time of asynchronous task B is b, and the attribute information of the second asynchronous task A is to execute 3 times,
The not reproducible execution of failure, execution task data amount are m, and the attribute information of the second asynchronous task B is to execute 2 times, and failure can weigh
It executes 1 time again, execution task data amount is n, then it is occupancy 80% to predict processor 1 in the use state of time a, remaining
Resource is p, and it is occupancy 30%, surplus resources q to predict processor 2 in the use state of time b.
It is emphasized that the processor 1 and 2 in above-mentioned example, which distinguishes user, executes different asynchronous tasks, in reality
In implementation procedure, multiple processors can execute the same asynchronous task jointly, and executive mode can be realized by the prior art, herein
It repeats no more.
Step 202, judge each processor the first asynchronous task original execution time corresponding use state, if it is full
The attribute information of the first asynchronous task of foot.
It is appreciated that obtaining the original execution time of the first asynchronous task, which is the first asynchronous task
Promoter is desired to execute the time, judge each processor the first asynchronous task original execution time corresponding use state,
Whether the attribute information of first asynchronous task is met.
Step 203, if satisfied, then determining that the original execution time of the first asynchronous task is optimal execution time.
Specifically, if each processor meets the in the original execution time corresponding use state of the first asynchronous task
The attribute information of one asynchronous task, it is determined that the execution time of the first asynchronous task is as optimal execution time.
Continue taking the above example as an example, in the period that original execution time of the first asynchronous task includes by b when
Between, when the attribute information of the first asynchronous task is to execute 2 times, unsuccessfully repeatable to execute 1 time, execution task data amount is t, and t is big
Be less than q in p originals, then it can be using the execution time of the first asynchronous task as optimal execution time.
Step 204, if it is not, then meeting each time of the attribute information of the first asynchronous task from the use state of each processor
Duan Zhong chooses the optimal execution time of the first asynchronous task.
Specifically, if each processor is unsatisfactory in the original execution time corresponding use state of the first asynchronous task
The attribute information of first asynchronous task, then from the use state of each processor meet the first asynchronous task attribute information it is each when
Between in section, choose the optimal execution time of the first asynchronous task, wherein when choosing optimal execution time, can preferentially choose
With the original execution time immediate time, it is optimal execution time that can also choose the processor utilization rate minimum period,
Resource is made full use of as a result, mitigates the pressure of processor operation.
Wherein, according to single processor in each processor the first asynchronous task the original execution time it is corresponding use shape
State, if meet the attribute information of the first asynchronous task, determine that the best of the first asynchronous task for certain single processor is held
The row time, alternatively, according to multiple processors in each processor the first asynchronous task original execution time corresponding synthesis
Use state, if meet the attribute information of the first asynchronous task, first asynchronous when determination is operated together for each processor
The optimal execution time of business.
In practical implementation, each task in the process of implementation, may lead to processor due to network etc.
Use state changes, thus, it, may be with the execution of each task for the optimal execution time of the first asynchronous task
And be inaccurate, it thus, in the present embodiment, can be in order to further increase the reliability of task scheduling in the present embodiment
The optimal execution time of first asynchronous task is adjusted.
The determination of optimal execution time in the present embodiment as a result, on the one hand, ensure that the first asynchronous task is executing
When, the resource of processor is enough, ensure that the reliability that asynchronous task executes, and on the other hand, is initiated according to the first asynchronous task
The demand of person execute the determination of time, meets the demand between task promoter execution, and flexibility is higher.
Specifically, the flow diagram for another method for scheduling task that Fig. 3 is provided by the embodiment of the present application.Such as figure
Shown in 3, after above-mentioned steps 104, this method further includes:
Step 301, in monitoring system each task in the process of implementation, real use state of each processor in day part.
Specifically, can obtain processor each period the occupied rate of resource etc..
Step 302, less than if managing the real use state of device everywhere in the optimal execution time correspondence of the first asynchronous task
Foot the first asynchronous task attribute information, then according to each processor day part real use state, to the first asynchronous task
Optimal execution time be adjusted.
Specifically, the first asynchronous task may be led to the reason of some happen suddenly or due to the sluggishness of execution etc.
The real use state that device is managed everywhere in optimal execution time correspondence, does not meet the attribute information of the first asynchronous task, for example, the
The optimal execution time of one asynchronous task by other hot jobs it is unexpected addition etc., then according to each processor day part reality
Border use state is adjusted the optimal execution time of the first asynchronous task, wherein the optimal execution time after adjustment is really
It is identical as the method for determination of above-mentioned optimal execution time to determine mode, details are not described herein.
Step 103, optimal execution time is sent to the promoter of the first asynchronous task.
Step 104, if the confirmation request that the promoter for getting the first asynchronous task returns, when according to best executing
Between, the first asynchronous task is added and executes queue.
In some scenarios, the promoter of the first asynchronous task is higher to the priority for executing time requirement, thus, in order to
So that the promoter, which gets information about, executes the time, optimal execution time can be sent to corresponding promoter, if obtained
The confirmation request that the promoter of the first asynchronous task returns is got, for example promoter determines control or voice input validation language
First asynchronous task is added then according to optimal execution time and executes queue, in order to be held in optimal execution time by message breath etc.
Corresponding first asynchronous task of row.
In one embodiment of the application, if the confirmation that the promoter for not getting the first asynchronous task returns is asked
It asks, then promoter can be prompted to reset and execute time etc..
In conclusion the method for scheduling task of the embodiment of the present application, obtains the addition request of the first asynchronous task, according to system
In current each second asynchronous task for having included each execution time, determine the optimal execution time of the first asynchronous task, in turn,
Optimal execution time is sent to the promoter of the first asynchronous task, if the promoter for getting the first asynchronous task returns really
Recognize request, then according to optimal execution time, the first asynchronous task is added and executes queue.It solves as a result, different in the prior art
The not high technical problem of task scheduling mode reliability improves task tune under the premise of making full use of resource in step task
The reliability and harmony of degree realize the promotion of the operational efficiency and success rate of asynchronous task.
Based on above example, the determination of the Best Times of the first asynchronous routine can be according to the use of single processor
Depending on state, can also depending on the synthesis use state of each processor, likewise, when executing the first asynchronous task,
Can be by a processor according to the use state of single processor, or according to the determination of the synthesis use state of each processor
It is individually performed or each processor executes jointly.
In one embodiment of the application, in order to mitigate system-computed pressure, according to the use state of single processor
Determine the single processor for executing the first asynchronous task, also a kind of method for scheduling task that Fig. 4 is provided by the embodiment of the present application
Flow diagram.As shown in figure 4, after above-mentioned steps 104, this method further includes:
Step 401, when the system that determines reaches the optimal execution time of the first asynchronous task, each processor in acquisition system
Current utilization rate.
Step 402, the first asynchronous task is distributed to currently used rate at any processor for being less than predetermined threshold value
Reason.
Wherein, above-mentioned predetermined threshold value is demarcated according to lot of experimental data, when the utilization rate of processor is default less than this
Threshold value then shows that corresponding processor utilization rate is relatively low, can also preferably carry the operation of other tasks.
Specifically, when the system that determines reaches the optimal execution time of the first asynchronous task, each processor in acquisition system
Current utilization rate, in order to which the first asynchronous task to be distributed to currently used rate to the target processor progress for being less than predetermined threshold value
Processing, fully improves operational reliability, efficiently uses processor resource, and due to the use of the lower target processing of preceding utilization rate
Device so that the operational efficiency of the first asynchronous task is higher.
Certainly, in some possible embodiments, the minimum processor operation the of currently used rate can also be directly selected
One asynchronous task to further decrease since processor remaining space is insufficient, and leads to the hair for running the failure of the first asynchronous task
Raw probability.
Further, reliability when being run in order to further ensure the first asynchronous task, can also be to the first asynchronous task
Operating condition be monitored, further include ideal in the addition of the first asynchronous task request in one embodiment of the application
Execution state, wherein ideal execution state includes executing duration, output result, executing the frequency of failure etc., monitors first asynchronous
The practical execution state of business, judges whether practical execution state matches with ideal execution state, for example whether the frequency of failure is resonable
Think in the corresponding frequency of failure of execution state, executes duration whether in the corresponding execution duration of ideal execution state etc., if
Do not exist, then export warning information, such as output pop window information " executing limited ", or send out early warning voice messaging etc., thus with
Being investigated in time convenient for related personnel leads to execute undesirable reason, repairs in time, improves the stability of system.
In another embodiment of the application, the optimal execution time of the first asynchronous task can be also reached in the system that determines
When, the current utilization rate of each processor in acquisition system, in order to split the first asynchronous task to when corresponding multiple targets
Processor is handled, and execution efficiency is fully improved.
In conclusion the method for scheduling task of the embodiment of the present application, it is different that the processor for selecting utilization rate minimum executes first
Step task improves resource utilization and asynchronous task execution efficiency and reliability.
In order to realize that above-described embodiment, the application also propose a kind of task scheduling apparatus.Fig. 5 provides for the embodiment of the present application
A kind of task scheduling apparatus structural schematic diagram.As shown in figure 5, the task scheduling apparatus includes:Acquisition module 100 determines
Module 200, sending module 300 and processing module 400.
Wherein, acquisition module 100, for obtaining the addition request of the first asynchronous task.
Determining module 200 is determined for each execution time according to current each second asynchronous task for having included in system
The optimal execution time of first asynchronous task.
Sending module 300, the promoter for optimal execution time to be sent to the first asynchronous task.
Processing module 400, for get the first asynchronous task promoter return confirmation request when, according to best
The time is executed, the first asynchronous task is added and executes queue.
Wherein, the division of modules is only used for for example, in other embodiments in above-mentioned task scheduling apparatus, can
Task scheduling apparatus is divided into different modules as required, to complete all or part of work(of above-mentioned task scheduling apparatus
Energy.
In some possible examples, the task scheduling apparatus in the embodiment of the present application can be implemented as shown in FIG. 6
Product, wherein as shown in fig. 6, the promoter of the first asynchronous task addition can pass through the tune of SDK api interfaces in web front-end
It is asked with the addition of the first asynchronous task is initiated, wherein operation layer and service layer provide back-end services, and the demand of promoter is converted
It is stored for data, and the determination that request carries out optimal execution time is added to the first asynchronous task.
Scheduler module checks all the second asynchronous tasks for having included, by pending asynchronous of subsequent time
Business, which is scheduled, is added pending queue, and task module checks pending queue, and is provided to all processors in rear end
Source is detected, the lower processor distributed tasks of selection processor utilization rate, and is recorded to the situation that processor uses.
Module is checked to being checked in the asynchronous task of the state of execution, if scheduling time or execution overlong time,
Alarm can be triggered, related personnel is reminded to investigate, script module receives task execution request, is executed to task, records
Output journal in task execution or exception can trigger alarm if there is abnormal.
In addition, task scheduling effect is analyzed in policy module, imports mechanism of Machine Learning and optimizes task scheduling approach,
Improve the reliability that optimal execution time determines next time.Back-end data base records the attribute information of asynchronous task and executes note
Record.
It should be noted that aforementioned being also applied for the embodiment to the explanation of method for scheduling task embodiment of the task
Dispatching device, details are not described herein again.
In conclusion the task scheduling apparatus of the embodiment of the present application, obtains the addition request of the first asynchronous task, according to system
In current each second asynchronous task for having included each execution time, determine the optimal execution time of the first asynchronous task, in turn,
Optimal execution time is sent to the promoter of the first asynchronous task, if the promoter for getting the first asynchronous task returns really
Recognize request, then according to optimal execution time, the first asynchronous task is added and executes queue.It solves as a result, different in the prior art
The not high technical problem of task scheduling mode reliability improves task tune under the premise of making full use of resource in step task
The reliability and harmony of degree realize the promotion of the operational efficiency and success rate of asynchronous task.
In order to realize that above-described embodiment, the application also propose a kind of intelligent terminal, including:Processor, wherein processor is logical
It crosses and reads in memory the executable program code that stores to run program corresponding with executable program code, for realizing
The method for scheduling task of above-described embodiment description.Wherein, the intelligent terminal can be mobile phone, tablet computer, personal digital assistant,
Wearable etc. has the hardware device of various operating systems, which can be Intelligent bracelet, smartwatch, intelligence
Energy glasses etc..
In order to realize above-described embodiment, the application also proposes a kind of non-transitorycomputer readable storage medium, when described
Instruction in storage medium is performed by processor, enabling executes the method for scheduling task shown in above-described embodiment.
In order to realize that above-described embodiment, the application also propose a kind of computer program product, when the computer program produces
When instruction processing unit in product executes, the screenshotss searching method shown in above-described embodiment is executed.
Fig. 7 shows the block diagram of the exemplary computer device suitable for being used for realizing the application embodiment.What Fig. 7 was shown
Computer equipment 12 is only an example, should not bring any restrictions to the function and use scope of the embodiment of the present application.
As shown in fig. 7, computer equipment 12 is showed in the form of universal computing device.The component of computer equipment 12 can be with
Including but not limited to:One or more processor or processing unit 16, system storage 28 connect different system component
The bus 18 of (including system storage 28 and processing unit 16).
Bus 18 indicates one or more in a few class bus structures, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using the arbitrary bus structures in a variety of bus structures.It lifts
For example, these architectures include but not limited to industry standard architecture (Industry Standard
Architecture;Hereinafter referred to as:ISA) bus, microchannel architecture (Micro Channel Architecture;Below
Referred to as:MAC) bus, enhanced isa bus, Video Electronics Standards Association (Video Electronics Standards
Association;Hereinafter referred to as:VESA) local bus and peripheral component interconnection (Peripheral Component
Interconnection;Hereinafter referred to as:PCI) bus.
Computer equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be by
The usable medium that computer equipment 12 accesses, including volatile and non-volatile media, moveable and immovable medium.
Memory 28 may include the computer system readable media of form of volatile memory, such as random access memory
Device (Random Access Memory;Hereinafter referred to as:RAM) 30 and/or cache memory 32.Computer equipment 12 can be with
Further comprise other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example,
Storage system 34 can be used for reading and writing immovable, non-volatile magnetic media, and (Fig. 7 do not show, commonly referred to as " hard drive
Device ").Although being not shown in Fig. 7, can provide for being driven to the disk for moving non-volatile magnetic disk (such as " floppy disk ") read-write
Dynamic device, and to removable anonvolatile optical disk (such as:Compact disc read-only memory (Compact Disc Read Only
Memory;Hereinafter referred to as:CD-ROM), digital multi CD-ROM (Digital Video Disc Read Only
Memory;Hereinafter referred to as:DVD-ROM) or other optical mediums) read-write CD drive.In these cases, each driving
Device can be connected by one or more data media interfaces with bus 18.Memory 28 may include at least one program production
Product, the program product have one group of (for example, at least one) program module, and it is each that these program modules are configured to perform the application
The function of embodiment.
Program/utility 40 with one group of (at least one) program module 42 can be stored in such as memory 28
In, such program module 42 include but not limited to operating system, one or more application program, other program modules and
Program data may include the realization of network environment in each or certain combination in these examples.Program module 42 is usual
Execute the function and/or method in embodiments described herein.
Computer equipment 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24
Deng) communication, the equipment interacted with the computer system/server 12 can be also enabled a user to one or more to be communicated, and/
Or with any equipment (example that the computer system/server 12 is communicated with one or more of the other computing device
Such as network interface card, modem etc.) communication.This communication can be carried out by input/output (I/O) interface 22.Also, it calculates
Machine equipment 12 can also pass through network adapter 20 and one or more network (such as LAN (Local Area
Network;Hereinafter referred to as:LAN), wide area network (Wide Area Network;Hereinafter referred to as:WAN) and/or public network, example
Such as internet) communication.As shown, network adapter 20 is communicated by bus 18 with other modules of computer equipment 12.It answers
When understanding, although not shown in the drawings, other hardware and/or software module can not used in conjunction with computer equipment 12, including but not
It is limited to:Microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and
Data backup storage system etc..
Processing unit 16 is stored in program in system storage 28 by operation, to perform various functions application and
Data processing, such as realize the method referred in previous embodiment.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It can be combined in any suitable manner in one or more embodiments or example.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples
It closes and combines.
In addition, term " first ", " second " are used for description purposes only, it is not understood to indicate or imply relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present application, the meaning of " plurality " is at least two, such as two, three
It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes
It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion
Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discuss suitable
Sequence, include according to involved function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be by the application
Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (system of such as computer based system including processor or other can be held from instruction
The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicating, propagating or passing
Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment
It sets.The more specific example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wiring
Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable
Medium, because can be for example by carrying out optical scanner to paper or other media, then into edlin, interpretation or when necessary with it
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the application can be realized with hardware, software, firmware or combination thereof.Above-mentioned
In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be executed with storage
Or firmware is realized.Such as, if realized in another embodiment with hardware, following skill well known in the art can be used
Any one of art or their combination are realized:With for data-signal realize logic function logic gates from
Logic circuit is dissipated, the application-specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile
Journey gate array (FPGA) etc..
Those skilled in the art are appreciated that realize all or part of step that above-described embodiment method carries
Suddenly it is that relevant hardware can be instructed to complete by program, the program can be stored in a kind of computer-readable storage medium
In matter, which includes the steps that one or a combination set of embodiment of the method when being executed.
In addition, each functional unit in each embodiment of the application can be integrated in a processing module, it can also
That each unit physically exists alone, can also two or more units be integrated in a module.Above-mentioned integrated mould
The form that hardware had both may be used in block is realized, can also be realized in the form of software function module.The integrated module is such as
Fruit is realized in the form of software function module and when sold or used as an independent product, can also be stored in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above
Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the application
System, those skilled in the art can be changed above-described embodiment, change, replace and become within the scope of application
Type.
Claims (10)
1. a kind of method for scheduling task, which is characterized in that including:
Obtain the addition request of the first asynchronous task;
According to each execution time of current each second asynchronous task for having included in system, first asynchronous task is determined most
The good execution time;
The optimal execution time is sent to the promoter of first asynchronous task;
It, will according to the optimal execution time if the confirmation request that the promoter for getting first asynchronous task returns
First asynchronous task, which is added, executes queue.
2. the method as described in claim 1, which is characterized in that further include first asynchronous task in the addition request
Attribute information;
The optimal execution time of determination first asynchronous task, including:
According to each attribute information for executing time and each second asynchronous task of each second asynchronous task, the system is predicted
In each processor day part use state;
Judge each processor the first asynchronous task original execution time corresponding use state, if meet described
The attribute information of one asynchronous task;
If satisfied, then determining that the original execution time of first asynchronous task is optimal execution time.
3. method as claimed in claim 2, which is characterized in that described to judge each processor in the first of the first asynchronous task
Begin to execute time corresponding use state, if after the attribute information for meeting first asynchronous task, further include:
If it is not, then meeting each period of the attribute information of first asynchronous task from the use state of each processor
In, choose the optimal execution time of first asynchronous task.
4. method as claimed in claim 2 or claim 3, which is characterized in that after the addition execution queue by the first asynchronous task,
Further include:
Monitor in the system each task in the process of implementation, real use state of each processor in day part;
If the optimal execution time of first asynchronous task correspond to everywhere in manage the real use state of device, do not meet described the
The attribute information of one asynchronous task, then according to each processor day part real use state, it is asynchronous to described first
The optimal execution time of task is adjusted.
5. the method as described in claim 1-4 is any, which is characterized in that described first asynchronous task is added executes team
After row, further include:
When the system of determination reaches the optimal execution time of first asynchronous task, it is current to obtain each processor in the system
Utilization rate;
Any processor that first asynchronous task is distributed to currently used rate less than threshold value is handled.
6. method as claimed in claim 5, which is characterized in that further include first asynchronous task in the addition request
Ideal execution state;
It is described by first asynchronous task distribute to currently used rate be less than threshold value any processor handled after, also
Including:
Monitor the practical execution state of first asynchronous task;
Judge whether the practical execution state matches with the ideal execution state;
If it is not, then exporting warning information.
7. a kind of task scheduling apparatus, which is characterized in that including:
Acquisition module, for obtaining the addition request of the first asynchronous task;
Determining module determines described for each execution time according to current each second asynchronous task for having included in system
The optimal execution time of one asynchronous task;
Sending module, the promoter for the optimal execution time to be sent to first asynchronous task;
Processing module, for get first asynchronous task promoter return confirmation request when, according to it is described most
First asynchronous task is added and executes queue by the good execution time.
8. a kind of intelligent terminal, which is characterized in that including processor and memory;
Wherein, the processor can perform to run with described by reading the executable program code stored in the memory
The corresponding program of program code, for realizing the method for scheduling task as described in any in claim 1-6.
9. a kind of computer program product, which is characterized in that when the instruction processing unit in the computer program product executes
Realize the method for scheduling task as described in any in claim 1-6.
10. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, which is characterized in that the meter
The method for scheduling task as described in any in claim 1-6 is realized when calculation machine program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810168280.5A CN108415765B (en) | 2018-02-28 | 2018-02-28 | Task scheduling method and device and intelligent terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810168280.5A CN108415765B (en) | 2018-02-28 | 2018-02-28 | Task scheduling method and device and intelligent terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108415765A true CN108415765A (en) | 2018-08-17 |
CN108415765B CN108415765B (en) | 2022-06-24 |
Family
ID=63129503
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810168280.5A Active CN108415765B (en) | 2018-02-28 | 2018-02-28 | Task scheduling method and device and intelligent terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108415765B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134521A (en) * | 2019-05-28 | 2019-08-16 | 北京达佳互联信息技术有限公司 | Method, apparatus, resource manager and the storage medium of resource allocation |
CN113703939A (en) * | 2021-08-30 | 2021-11-26 | 竞技世界(北京)网络技术有限公司 | Task scheduling method and system and electronic equipment |
CN114706820A (en) * | 2022-05-18 | 2022-07-05 | 北京卡普拉科技有限公司 | Scheduling method, system, electronic device and medium for asynchronous I/O request |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050125508A1 (en) * | 2003-12-04 | 2005-06-09 | Smith Kevin B. | Systems and methods that employ correlated synchronous-on-asynchronous processing |
CN106598705A (en) * | 2015-10-15 | 2017-04-26 | 阿里巴巴集团控股有限公司 | Asynchronous task scheduling method, device and system and electronic equipment |
CN106648847A (en) * | 2016-10-14 | 2017-05-10 | 郑州云海信息技术有限公司 | Asynchronous task management method and device in cloud computing operation system |
CN106776008A (en) * | 2016-11-23 | 2017-05-31 | 福建六壬网安股份有限公司 | A kind of method and system that load balancing is realized based on zookeeper |
CN106980546A (en) * | 2016-01-18 | 2017-07-25 | 阿里巴巴集团控股有限公司 | A kind of task asynchronous execution method, apparatus and system |
CN107463642A (en) * | 2017-07-19 | 2017-12-12 | 北京京东尚科信息技术有限公司 | The method and apparatus for lifting Tool for Data Warehouse resource utilization |
CN107465548A (en) * | 2017-08-17 | 2017-12-12 | 北京云纵信息技术有限公司 | The dispositions method and device of code |
-
2018
- 2018-02-28 CN CN201810168280.5A patent/CN108415765B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050125508A1 (en) * | 2003-12-04 | 2005-06-09 | Smith Kevin B. | Systems and methods that employ correlated synchronous-on-asynchronous processing |
CN106598705A (en) * | 2015-10-15 | 2017-04-26 | 阿里巴巴集团控股有限公司 | Asynchronous task scheduling method, device and system and electronic equipment |
CN106980546A (en) * | 2016-01-18 | 2017-07-25 | 阿里巴巴集团控股有限公司 | A kind of task asynchronous execution method, apparatus and system |
CN106648847A (en) * | 2016-10-14 | 2017-05-10 | 郑州云海信息技术有限公司 | Asynchronous task management method and device in cloud computing operation system |
CN106776008A (en) * | 2016-11-23 | 2017-05-31 | 福建六壬网安股份有限公司 | A kind of method and system that load balancing is realized based on zookeeper |
CN107463642A (en) * | 2017-07-19 | 2017-12-12 | 北京京东尚科信息技术有限公司 | The method and apparatus for lifting Tool for Data Warehouse resource utilization |
CN107465548A (en) * | 2017-08-17 | 2017-12-12 | 北京云纵信息技术有限公司 | The dispositions method and device of code |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134521A (en) * | 2019-05-28 | 2019-08-16 | 北京达佳互联信息技术有限公司 | Method, apparatus, resource manager and the storage medium of resource allocation |
CN113703939A (en) * | 2021-08-30 | 2021-11-26 | 竞技世界(北京)网络技术有限公司 | Task scheduling method and system and electronic equipment |
CN114706820A (en) * | 2022-05-18 | 2022-07-05 | 北京卡普拉科技有限公司 | Scheduling method, system, electronic device and medium for asynchronous I/O request |
Also Published As
Publication number | Publication date |
---|---|
CN108415765B (en) | 2022-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7117499B2 (en) | Virtual computer systems and computer virtualization programs | |
CN110727512A (en) | Cluster resource scheduling method, device, equipment and storage medium | |
US11150951B2 (en) | Releasable resource based preemptive scheduling | |
CN104424106B (en) | The method and system of the resource of distribution storage device is operated for storage optimization | |
US8413159B2 (en) | Classifying workload for a service | |
CN108762687B (en) | I/O service quality control method, device, equipment and storage medium | |
KR20120102664A (en) | Allocating storage memory based on future use estimates | |
CN108415765A (en) | Method for scheduling task, device and intelligent terminal | |
US9395918B2 (en) | Dynamic record management including opening a virtual storage access method (VSAM) data set and modifying a VSAM control block structure | |
CN110196770A (en) | Cloud system internal storage data processing method, device, equipment and storage medium | |
CN115373835A (en) | Task resource adjusting method and device for Flink cluster and electronic equipment | |
WO2024016596A1 (en) | Container cluster scheduling method and apparatus, device, and storage medium | |
CN110442428A (en) | The coordination approach of Docker container | |
JP2005128866A (en) | Computer unit and method for controlling computer unit | |
CN110347546B (en) | Dynamic adjustment method, device, medium and electronic equipment for monitoring task | |
CN115576534B (en) | Method and device for arranging atomic service, electronic equipment and storage medium | |
WO2023138923A1 (en) | Failure prediction using informational logs and golden signals | |
CN116723198A (en) | Multi-node server host control method, device, equipment and storage medium | |
CN110489309A (en) | A kind of monitoring and early warning method, apparatus, equipment and the storage medium of interface | |
US11915060B2 (en) | Graphics processing management system | |
CN115168042A (en) | Management method and device of monitoring cluster, computer storage medium and electronic equipment | |
US20220214965A1 (en) | System and method for storage class memory tiering | |
CN111176588B (en) | Service bill issuing method, device, medium and electronic equipment | |
CN114840351A (en) | Key event processing method and device, control equipment and readable storage medium | |
CN114090201A (en) | Resource scheduling method, device, equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |