CN106569886A - Strategy scheduling method and strategy scheduling system - Google Patents
Strategy scheduling method and strategy scheduling system Download PDFInfo
- Publication number
- CN106569886A CN106569886A CN201610950592.2A CN201610950592A CN106569886A CN 106569886 A CN106569886 A CN 106569886A CN 201610950592 A CN201610950592 A CN 201610950592A CN 106569886 A CN106569886 A CN 106569886A
- Authority
- CN
- China
- Prior art keywords
- strategy
- task
- timeslice
- tactful
- granularity
- 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
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a strategy scheduling method and a strategy scheduling system. The strategy scheduling method comprises the following steps: obtaining a strategy and a time slice; dividing a task corresponding to the strategy into task blocks according to task granularity within the time slice, and executing the task according to the strategy with the task granularity as a unit; when the time slice is used up, continuing to execute and accomplish the task block when the time slice is used up; and switching the strategy. According to the strategy scheduling method disclosed by the invention, the task corresponding to the strategy is divided into the task blocks according to the task granularity within the time slice, the task is executed with the task granularity as the unit, and when the time slice is used up, the strategy is switched after the task block is executed and accomplished when the time slice is used up, therefore throughput performance of data backup is improved.
Description
Technical field
The present invention relates to field of computer technology, it particularly relates to a kind of tactful dispatching method for data backup
With tactful scheduling system.
Background technology
Strategy is the information that user arranges backup operation, is also the core of standby system.Strategy scheduling is then according to strategy
Carry out execution system backup operation.The equity dispatching for ensureing strategy in application demand is crucial.Need to have both high performance simultaneously
Handling capacity.
A kind of method of existing strategy scheduling is strategy to be carried out based on the timeslice poll of timeslice.Timeslice poll
Refer to and strategically perform task in the tactful timeslice, if task is performed always in the tactful timeslice, when
Next strategy is traveled through when timeslice exhausts.
The tactful dispatching method of existing standby system is i.e. using the tactful dispatching method of timeslice poll.When timeslice consumption
When to the greatest extent, force to switch to new strategy immediately, or need frequent switching strategy next to obtain when under strategy without task
Individual suitable strategy.The behavior that pressure switches to new tactful and frequent switching strategy to obtain next strategy will all affect standby
The throughput performance of part system data back-up.
Lead for the tactful dispatching method in correlation technique when timeslice exhausts and when not having task under strategy
The problem for causing the throughput performance of data backup not good, not yet proposes at present effective solution.
The content of the invention
Lead for the tactful dispatching method in correlation technique when timeslice exhausts and when not having task under strategy
The problem for causing the throughput performance of data backup not good, the present invention proposes a kind of tactful dispatching method and tactful scheduling system, can
Improve the throughput performance of data backup.
The technical scheme is that what is be achieved in that:
According to an aspect of the invention, there is provided a kind of tactful dispatching method, including:Acquisition strategy and timeslice;
In timeslice, task block will be subdivided into according to task granularity with tactful corresponding task, and according to strategy with task granularity as list
Position performs task;When timeslice exhausts, continue executing with and task block when deadline piece exhausts;And carry out strategy and cut
Change.
According to one embodiment of present invention, after acquisition strategy and timeslice, also include:When strategy is idle policy
When, busy strategy is switched to perform task by elevator scanning algorithm;Wherein, busy strategy includes task.
According to one embodiment of present invention, before according to strategy with task granularity as unit implementation strategy, also include:
According to strategy generating policy contexts.
According to one embodiment of present invention, task is performed in units of task granularity according to strategy, including:By on strategy
Hereafter it is compared with corresponding thread context;When policy contexts are identical with thread context, with task granularity as list
Position performs task.
According to one embodiment of present invention, task is performed in units of task granularity according to strategy, is also included:Work as strategy
When context is different from thread context, then policy contexts are switched over.
According to one embodiment of present invention, when strategy is idle policy, busy strategy is switched to and in timeslice
It is interior to perform busy strategy, including:Conversation strategy context;Busy strategy is obtained by elevator scanning algorithm and is switched to non-
Idle policy;Task is performed in units of task granularity according to busy strategy in timeslice;And after timeslice exhausts,
It is restored to policy contexts.
According to one embodiment of present invention, task granularity is 4M.
According to one embodiment of present invention, the size all same of each timeslice.
According to one embodiment of present invention, the size of each timeslice is 1 second.
According to a further aspect in the invention, there is provided a kind of tactful scheduling system, including:Tactful acquisition module, for obtaining
Take strategy and timeslice;Performing module, in timeslice, being subdivided into according to task granularity with tactful corresponding task and appoint
Business block, and busy task is performed in units of task granularity;It is additionally operable to, when timeslice exhausts, continue executing with and the deadline
Task block when piece exhausts;And strategy switching module, carry out tactful switching.
The present invention by the way that in timeslice task block will be subdivided into according to task granularity with tactful corresponding task, with task
Granularity is that unit performs task, and when timeslice exhausts, continue executing with and after task block when deadline piece exhausts again
Tactful switching is carried out, the throughput performance of data backup is improve.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodiment
The accompanying drawing that needs are used is briefly described, it should be apparent that, drawings in the following description are only some enforcements of the present invention
Example, for those of ordinary skill in the art, on the premise of not paying creative work, can be being obtained according to these accompanying drawings
Obtain other accompanying drawings.
Fig. 1 is the flow chart of tactful dispatching method according to embodiments of the present invention;
Fig. 2 is the schematic flow sheet of the data backup of standby system according to embodiments of the present invention;
Fig. 3 is the flow process of the idle policy with busy strategy switching of tactful dispatching method according to embodiments of the present invention
Figure;
Fig. 4 is the flow chart that data backup is carried out according to strategy of tactful dispatching method according to embodiments of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on
Embodiment in the present invention, the every other embodiment that those of ordinary skill in the art are obtained belongs to present invention protection
Scope.
A kind of embodiments in accordance with the present invention, there is provided tactful dispatching method.
As shown in figure 1, tactful dispatching method according to embodiments of the present invention is comprised the following steps:
S101, acquisition strategy and timeslice;
S103, in timeslice, will be subdivided into task block with tactful corresponding task according to task granularity, and according to strategy
Task is performed in units of task granularity;The task can include backup tasks, scan task or other tasks;Wherein, task
For backup tasks;
S105, when timeslice exhausts, continues executing with and task block when deadline piece exhausts;
S107, carries out tactful switching;Strategy switching is that one by one strategy switches over transfer according to the order of first in first out.
Above-mentioned technical proposal, by the way that in timeslice task will be subdivided into according to task granularity with tactful corresponding task
Block, performs task in units of task granularity, and when timeslice exhausts, and continues executing with and task when deadline piece exhausts
Carry out tactful switching after block again, compared with prior art, it is to avoid force immediately to switch to new plan when timeslice exhausts
Omit, and then improve the throughput performance of data backup.
According to one embodiment of present invention, task granularity is 4M.Will backup load be subdivided into the data block of 4M.At that time
Between piece do not carry out tactful switching immediately when exhausting, and the data block for being carried out having backed up this 4M just switches.
It is as shown in Figure 2 the schematic flow sheet of the data backup of standby system according to embodiments of the present invention.Client 201
Strategy and (or) deletion strategy are added by strategy controller 204.Wherein, strategy controller 204 can strategy of the invention
Dispatching method distribution policy to multiple backup tasks actuating stations (202,203), multiple backup tasks actuating station (the first backup tasks
Actuating station 202, the second backup tasks actuating station 203) backup tasks are performed according to the strategy and timeslice of distribution;Work as timeslice
When depleted, stop Backup Data and return strategy execution authority.The throughput performance of data backup can be improved.
According to one embodiment of present invention, the size all same of each timeslice.Preferably, timeslice is using fixed big
Little 1 second, i.e. the size of each timeslice is 1 second.
According to one embodiment of present invention, also include after step slol:When strategy is idle policy, by electricity
Terraced scanning algorithm obtains busy strategy and switches to busy strategy;Wherein, backup tasks should be included in busy strategy.
That is, the timeslice is conceded when the timeslice of strategy is idle, give tactful switching cost minimum strategy the time, find
The minimum strategy of switching cost adopts elevator scanning algorithm.Compared with prior art, it is to avoid need when under strategy without task
Want frequent switching strategy affects the problem of data backup throughput performance to obtain next strategy, so as to further increase number
According to the throughput performance of backup.
Specifically, when strategy is idle policy, switch to busy strategy and busy strategy performed in timeslice,
Including:Conversation strategy context;Obtain and switch to busy strategy;According to busy strategy with task granularity in timeslice
Task is performed for unit;And after timeslice exhausts, it is restored to policy contexts.
As shown in figure 3, being the idle policy of tactful dispatching method according to embodiments of the present invention and busy strategy switching
Flow chart.Current strategies have Slack Time piece, concede the timeslice.Conceding the timeslice needs to travel through all of strategy, looks for
To suitable strategy, need to avoid excessive switchover policy context.Backup tasks scheduling finds next when tactful idle
Strategy uses elevator scanning algorithm.Specifically include following steps:Step S301, switchover policy context;Step S302, protects
Deposit current strategies context;Step S303, improve step S304 when current strategies are judged for idle policy;Step S304, will
Current strategies context is sent to implementation strategy thread, and is designated as A;Step S305, implementation strategy thread judges current context
In have backup tasks, will perform the strategy;Step S306, it is A to have performed and reduce after the strategy current strategies context.
In said process, if current strategies are the free time, the searching next one is needed there are the policy contexts of backup tasks.Wherein, need
Finding the next one has the busy strategy of backup tasks, uses elevator algorithm.
According to one embodiment of present invention, before according to strategy with task granularity as unit implementation strategy, also include:
According to strategy generating policy contexts.
Further, step S103 includes:Policy contexts are compared with corresponding thread context;When on strategy
When hereafter identical with thread context, task is performed in units of task granularity.Also, when policy contexts and thread context
When different, then policy contexts are switched over.
As shown in figure 4, being the stream that data backup is carried out according to strategy of tactful dispatching method according to embodiments of the present invention
Cheng Tu, comprises the following steps:Step S401, first generates policy contexts during strategy execution, then by policy contexts and thread
The context of preservation is compared so that whether determination strategy context is switched;Step S402, when policy contexts and thread are protected
When the context deposited is unequal, by implementation strategy of the switch contexts implementation strategy to select to perform;Step S403, works as plan
When slightly context is equal with the context that thread is preserved, strategically context implementation strategy, according to strategy strategy correspondence is read
Listed files;Step S404, read every time task block be 4M data and by the 4M data backups to destination end;Step
S405, conversation strategy context, and more New Policy thread context and thread context.Then repeat the above steps.
Embodiments in accordance with the present invention, additionally provide a kind of tactful scheduling system, including:
Tactful acquisition module, for acquisition strategy and timeslice;
Performing module, in timeslice, task block will to be subdivided into according to task granularity with tactful corresponding task, and
It is busy that task is performed in units of task granularity;It is additionally operable to, when timeslice exhausts, continue executing with and deadline piece exhausts
When task block;And
Strategy switching module, carries out tactful switching.
In sum, by means of the above-mentioned technical proposal of the present invention, by will be with tactful corresponding task in timeslice
Task block is subdivided into according to task granularity, task is performed in units of task granularity, and when timeslice exhausts, continued executing with simultaneously
Carry out tactful switching after task block when deadline piece exhausts again, it is to avoid force immediately to switch to when timeslice exhausts
New strategy, so as to improve the throughput performance of data backup;Also by the way that the timeslice of idle policy is distributed to into tactful switching
The busy strategy of Least-cost, it is to avoid need frequent switching strategy to obtain next strategy when under strategy without task
And the problem of impact data backup throughput performance, so as to further increase the throughput performance of data backup.
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention
Within god and principle, any modification, equivalent substitution and improvements made etc. should be included within the scope of the present invention.
Claims (10)
1. a kind of tactful dispatching method, it is characterised in that include:
Acquisition strategy and timeslice;
In the timeslice, task block will be subdivided into according to task granularity with the tactful corresponding task, and according to described
Strategy performs the task in units of the task granularity;
When the timeslice exhausts, continue executing with and task block when deadline piece exhausts;And carry out tactful switching.
2. tactful dispatching method according to claim 1, it is characterised in that after acquisition strategy and timeslice, also wrap
Include:
When the strategy is idle policy, busy strategy is switched to perform the task by elevator scanning algorithm;
Wherein, the busy strategy includes the task.
3. tactful dispatching method according to claim 2, it is characterised in that according to the strategy with the task granularity
Perform before the strategy for unit, also include:
According to the strategy generating policy contexts.
4. tactful dispatching method according to claim 3, it is characterised in that be with the task granularity according to the strategy
Unit performs the task, including:
The policy contexts are compared with corresponding thread context;
When the policy contexts are identical with the thread context, the task is performed in units of the task granularity.
5. tactful dispatching method according to claim 4, it is characterised in that be with the task granularity according to the strategy
Unit performs the task, also includes:
When the policy contexts are different from the thread context, then the policy contexts are switched over.
6. tactful dispatching method according to claim 3, it is characterised in that when the strategy for idle policy when, switching
Extremely busy strategy simultaneously performs the busy strategy in the timeslice, including:
Preserve the policy contexts;
Busy strategy is obtained by elevator scanning algorithm and the busy strategy is switched to;
The task is performed in units of the task granularity according to the busy strategy in the timeslice;And
After the timeslice exhausts, the policy contexts are restored to.
7. tactful dispatching method according to claim 1, it is characterised in that
The task granularity is 4M.
8. tactful dispatching method according to claim 7, it is characterised in that
The size all same of each timeslice.
9. tactful dispatching method according to claim 8, it is characterised in that
The size of each timeslice is 1 second.
10. a kind of tactful scheduling system, it is characterised in that include:
Tactful acquisition module, for acquisition strategy and timeslice;
Performing module, in the timeslice, task will to be subdivided into according to task granularity with the tactful corresponding task
Block, and busy the task is performed in units of the task granularity;It is additionally operable to, when the timeslice exhausts, continue executing with
And task block of deadline piece when exhausting;And
Strategy switching module, carries out tactful switching.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610950592.2A CN106569886B (en) | 2016-10-26 | 2016-10-26 | Policy scheduling method and policy scheduling system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610950592.2A CN106569886B (en) | 2016-10-26 | 2016-10-26 | Policy scheduling method and policy scheduling system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106569886A true CN106569886A (en) | 2017-04-19 |
CN106569886B CN106569886B (en) | 2020-10-16 |
Family
ID=58536627
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610950592.2A Active CN106569886B (en) | 2016-10-26 | 2016-10-26 | Policy scheduling method and policy scheduling system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106569886B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109918187A (en) * | 2019-03-12 | 2019-06-21 | 北京同城必应科技有限公司 | Method for scheduling task, device, equipment and storage medium |
CN114880102A (en) * | 2022-07-04 | 2022-08-09 | 北京智芯半导体科技有限公司 | Security chip, multitask scheduling method and device thereof, and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101489304A (en) * | 2009-02-27 | 2009-07-22 | 南京邮电大学 | Media access control method based on differentiate service of wireless multimedia sensor network |
US20130305260A1 (en) * | 2012-05-09 | 2013-11-14 | Keith BACKENSTO | System and method for deterministic context switching in a real-time scheduler |
CN103577263A (en) * | 2013-11-07 | 2014-02-12 | 广东电网公司佛山供电局 | Power quality data real-time collection method and device |
-
2016
- 2016-10-26 CN CN201610950592.2A patent/CN106569886B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101489304A (en) * | 2009-02-27 | 2009-07-22 | 南京邮电大学 | Media access control method based on differentiate service of wireless multimedia sensor network |
US20130305260A1 (en) * | 2012-05-09 | 2013-11-14 | Keith BACKENSTO | System and method for deterministic context switching in a real-time scheduler |
CN103577263A (en) * | 2013-11-07 | 2014-02-12 | 广东电网公司佛山供电局 | Power quality data real-time collection method and device |
Non-Patent Citations (1)
Title |
---|
高建平 等: ""通过任务分割提高嵌入式系统的实时性"", 《单片机与嵌入式系统应用》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109918187A (en) * | 2019-03-12 | 2019-06-21 | 北京同城必应科技有限公司 | Method for scheduling task, device, equipment and storage medium |
CN114880102A (en) * | 2022-07-04 | 2022-08-09 | 北京智芯半导体科技有限公司 | Security chip, multitask scheduling method and device thereof, and storage medium |
CN114880102B (en) * | 2022-07-04 | 2022-10-25 | 北京智芯半导体科技有限公司 | Security chip, multitask scheduling method and device thereof, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106569886B (en) | 2020-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102142006B (en) | File processing method and device of distributed file system | |
CN101923491A (en) | Thread group address space scheduling and thread switching method under multi-core environment | |
CN102662740B (en) | Asymmetric multi-core system and realization method thereof | |
CN106293934B (en) | A kind of cluster system management optimization method and platform | |
CN103346902B (en) | The method and system of data acquisition scheduling | |
Zhang et al. | Dynamic offloading algorithm in intermittently connected mobile cloudlet systems | |
WO2012160629A1 (en) | Data processing method | |
CN103885811B (en) | Method, system and device that dummy machine system total system is migrated online | |
CN106569886A (en) | Strategy scheduling method and strategy scheduling system | |
CN101169737A (en) | Task switching control method and computer system | |
CN101482829A (en) | Cluster system, processing equipment and its redundancy method | |
CN102609307A (en) | Multi-core multi-thread dual-operating system network equipment and control method thereof | |
US9104606B2 (en) | Temporal standby list | |
CN109104357A (en) | The processing method and system of PUSH message | |
CN103476074A (en) | Method and equipment for resource preemption | |
CN104657115A (en) | Multi-core concurrent load implementation method for cluster file system client | |
CN113726636A (en) | Data forwarding method and system of software forwarding equipment and electronic equipment | |
CN102073548A (en) | Method for executing task, and system thereof | |
CN110209350B (en) | Dynamic scheduling method for application I/O (input/output) request in HPC (high performance computing) system of hybrid storage architecture | |
CN101833585A (en) | Database server operation control system, method and device | |
CN103226496B (en) | Service synchronization processing method and multinuclear equipment | |
CN105373451A (en) | Virtual machine placement method and apparatus | |
CN102158416B (en) | Method and equipment for processing messages based on memory allocation | |
CN103532758A (en) | Configuration processing method suitable for next-generation transmission equipment and data equipment integration | |
CN105681185B (en) | A kind of protection switching method and protection switching device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220805 Address after: 100089 building 36, courtyard 8, Dongbeiwang West Road, Haidian District, Beijing Patentee after: Dawning Information Industry (Beijing) Co.,Ltd. Patentee after: DAWNING INFORMATION INDUSTRY Co.,Ltd. Address before: 100193 No. 36 Building, No. 8 Hospital, Wangxi Road, Haidian District, Beijing Patentee before: Dawning Information Industry (Beijing) Co.,Ltd. |