CN113760508A - Script issuing and scheduling method based on time wheel - Google Patents

Script issuing and scheduling method based on time wheel Download PDF

Info

Publication number
CN113760508A
CN113760508A CN202110950173.XA CN202110950173A CN113760508A CN 113760508 A CN113760508 A CN 113760508A CN 202110950173 A CN202110950173 A CN 202110950173A CN 113760508 A CN113760508 A CN 113760508A
Authority
CN
China
Prior art keywords
time
task
wheel
queue
tasks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110950173.XA
Other languages
Chinese (zh)
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.)
Chengdu DBAPPSecurity Co Ltd
Original Assignee
Chengdu DBAPPSecurity Co 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 Chengdu DBAPPSecurity Co Ltd filed Critical Chengdu DBAPPSecurity Co Ltd
Priority to CN202110950173.XA priority Critical patent/CN113760508A/en
Publication of CN113760508A publication Critical patent/CN113760508A/en
Pending legal-status Critical Current

Links

Images

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling 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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of data structures, and discloses a script issuing and scheduling method based on a time wheel, which comprises the following steps: s1, receiving a scheduling task through a time wheel; s2, splitting the scheduling task into task queues according to time and distributing the task queues to time slots corresponding to the time wheels; s3, storing the task queue into a time slot through a preset priority stack; and S4, presetting a time wheel execution rule, and executing the task queue stored in the time wheel according to the time wheel execution rule. The time wheel is used as a scheduling basic data structure, and a priority stack is added, so that the accurate scheduling of tasks is completed with small expenditure.

Description

Script issuing and scheduling method based on time wheel
Technical Field
The invention relates to the technical field of data structures, in particular to a script issuing and scheduling method based on a time wheel, which is used for optimizing a scheduling strategy issued by a script, and reducing the script issuing and scheduling by the data structure of the time wheel, so that the task execution is more on time, the complexity of the task realization is lower, and the resource overhead in the task execution is reduced.
Background
Some scheduling tasks often exist in the security software, and most of the tasks are timing and periodic tasks, such as tasks of timing asset state detection, timing asset resource state acquisition, periodic script execution and the like. Taking the bastion machine as an example, the bastion machine is taken as safety software, and scheduling tasks exist, most of the tasks are periodic tasks, and other tasks are timed, and the maximum period cannot exceed one year. If there are a large number of scheduling tasks in a system, a number of problems are faced.
1. The large number of scheduling tasks, each using their own scheduler to manage the life cycle of the task, is wasteful of cpu resources and inefficient, often with delays in task execution.
2. When the third-party components are used for completing the scheduling of tasks, some third-party components cannot completely meet the requirements, and some large and complete third-party components consume some unnecessary resources.
3. In general, for a simple task, a timer is used to check every 1 second, and the whole task queue needs to be traversed every time, which causes unnecessary overhead.
4. The linear table is used as a scheduling model to solve scheduling tasks, the tasks need to be queried and executed every second, and the tasks need to be queried row by row and column by column, so that the task execution time is inaccurate.
5. The data structure is ordered according to the execution time, so that the task closest to the front can be taken each time, but the time required for ordering itself is not a little worth, and the execution time of the task is not accurate.
In order to execute the scheduling task on time, the overhead is small, and the implementation complexity is small. The invention uses the time wheel as a scheduling basic data structure, and completes accurate scheduling of tasks with less expenditure by adding the priority stack.
Disclosure of Invention
The invention aims to provide a script issuing and scheduling method based on a time wheel, which reduces the script issuing and scheduling through a data structure of the time wheel, and achieves the effects of more punctual task execution, more convenient task realization and reduction of resource overhead in task execution.
The invention is realized by the following technical scheme: a script issuing and scheduling method based on a time wheel comprises the following steps: s1, receiving a scheduling task through a time wheel;
s2, splitting the scheduling task into task queues according to time and distributing the task queues to time slots corresponding to the time wheels;
s3, storing the task queue into a time slot through a preset priority stack; and S4, presetting a time wheel execution rule, and executing the task queue stored in the time wheel according to the time wheel execution rule.
The principle of the technical scheme is that the data structure of the time wheel is utilized to reduce script issuing scheduling, so that the effects of enabling task execution to be more on time, enabling task implementation to be simpler and more convenient and reducing resource overhead in task execution are achieved, and meanwhile scheduling of time complexity in timing and periodic task scenes can be better solved by combining the priority stack. The time wheel can solve the problem of scheduling a large number of tasks, meanwhile, the time for executing the tasks is more accurate, on the basis, the tasks can be better executed more accurately by combining the priority stack, and the calling time error of the high-priority tasks is reduced.
In order to better implement the present invention, step S1 further includes: s1.1, setting the number of corresponding time wheels according to the requirement of a scheduling task; and S1.2, classifying the scheduling tasks and setting corresponding execution modes.
In the technical scheme, the maximum execution period is judged according to the scheduling task requirements, if the maximum execution period is a year, the maximum disk of the time wheel is a lunar pinwheel, the corresponding number of the time wheels is set according to the scheduling task requirements, the scheduling tasks are classified, and the scheduling of time complexity can be better solved by setting corresponding execution modes.
In order to better implement the present invention, step S1.2 further comprises: and classifying the scheduling tasks into timing tasks and periodic tasks.
To better implement the present invention, further, the timing task and the periodic task include:
determining the time of the timing task, inserting the timing task into a task queue of a time-in hand wheel according to the maximum time unit, deleting the task queue of the last time unit in sequence according to a time pointer, inserting the task queue into the task queue of the time hand wheel at the next time, and not executing the task after executing once;
and determining the time of the periodic task, inserting the periodic task into a task queue of the time-in pinwheel according to the maximum time unit, copying one periodic task when a time pointer reaches the maximum time unit value, changing the periodic task into a timing task, inserting the timing task into the task queue of the previous time unit, deleting the task queue of the previous time unit in sequence according to the time pointer, inserting the timing task into the task queue of the time-in pinwheel at the next time, and executing the timing task once every period.
In the technical scheme, a plurality of tasks executed in a timing or periodic manner exist in the safety software, and when the tasks are executed, a certain scheduling logic is needed to accurately execute the tasks.
In order to better implement the present invention, step S2 further includes: and determining the time slot according to the time disc corresponding to the time wheel.
In the technical scheme, if the time wheel has only one second disk, if 1000 scheduling tasks exist, the 1000 scheduling tasks are equivalently split into the 60 time slots, if the time wheel has two disks, a second disk and a minute disk, the number of the time slots is 120, and if the time wheel has three disks, a second disk, a minute disk and a time disk, the number of the time slots is 180. According to the time disc corresponding to the time wheel, the time slots are determined, the number of tasks in each slot is greatly reduced, the speed is accelerated when the time slots are searched, and the accuracy is also higher.
In order to better implement the present invention, step S3 further includes:
s3.1, presetting a priority stack corresponding to a time wheel;
s3.2, determining all wheel discs of the time wheel according to the task queue;
s3.3, arranging the task queues into priority queues by combining the priority stacks and all disks of the time wheel;
and S3.4, storing the priority queue into the time slot.
In the technical scheme, many pieces of safety software which is already realized by third-party components are designed for a general scene, so that many redundant things exist, the safety software is only suitable for a specific scene, for example, the safety software is not suitable for a bastion machine, extra expenses are not needed to be added to run the redundant things, the time accuracy of task scheduling can be improved by combining a priority stack on the basis of a time wheel, and the task of 10:00:00 cannot be scheduled in 10:00: 01.
In order to better implement the present invention, further, step S3.1 comprises: judging whether a priority value is set when a user sets a scheduling task;
if so, taking the set priority value as the priority;
if not, the time sequence of the scheduling task creation is taken as the priority, and the priority of the scheduling task created first is judged to be higher than that of the scheduling task created later. In the technical scheme, if a user sets a priority value when setting a scheduling task, a smaller value is taken as priority. Each slot of the time wheel will have a plurality of tasks to be executed at the same time, and the priority heap is at the top of the heap, so that the code with high priority is submitted to the operating system first, and therefore the code can be executed at a more accurate time point. The priority heap is used for solving the problem that too many tasks need to be executed at the same time, for example, 100 tasks are specified at 12:00 time, and when the time is up, the 100 tasks are all executed at the same time, so that the priority of the tasks needs to be increased to ensure that the tasks are on time as much as possible, and the tasks are called by codes first when the time is up, so that the high-priority tasks are on time as much as possible.
In order to better implement the present invention, step S4 further includes: presetting a time wheel execution rule according to the number of the time wheels in the step S1.1 and the execution mode in the step S1.2;
and executing the task queue stored by the priority stack in the time wheel according to the time wheel execution rule.
To better implement the present invention, further, the time-round execution rule includes:
A1. the second hand wheel of the minimum unit wheel is increased by 1 per second, the minute hand is increased by 1 if the second hand is full of 60, the hour hand is increased by 1 if the minute hand is full of 60, the day wheel logic is entered if the hour hand is full of 24, and the month wheel logic and the week wheel logic are entered in sequence in an increasing mode;
A2. if the hour is not full 24, judging whether the current time queue is empty, if so, entering step A4, if not, taking out the tasks from the task queue in sequence, copying and modifying the tasks into timed tasks, and inserting the timed tasks into corresponding minute wheels; judging whether the task is a periodic task, if so, entering the step A4, and if not, deleting the task from the current time round queue and entering the step A4;
A3. if the minute hand is less than 60, judging whether the current minute queue is empty, if so, entering step A4, if not, taking out the tasks from the queue in sequence, copying and modifying the tasks into timed tasks, and inserting the timed tasks into the corresponding second wheel; judging whether the task is a periodic task, if so, entering the step A4, otherwise, deleting the task from the current minute wheel queue, and entering the step A4;
A4. if the second hand is less than 60, judging whether the current second queue is empty, if so, entering step A1, and if not, taking out the tasks from the queue in sequence and executing the current task; and judging whether the task is a periodic task, if so, entering the step A1, and if not, deleting the task from the queue and entering the step A1.
In the technical scheme, each slot of the time wheel has a plurality of tasks which need to be executed at the same time, and the priority heap enables the code with high priority to be submitted to an operating system first, so that the code can be executed at a more accurate time point. This is also the advantage of using priority heaps. Assuming that a slot has 100 million tasks, submitting the 100 million tasks to the operating system must take a certain amount of time, which may be 1 second or more from the first to the completion of the submission, then some tasks may be delayed, so some important tasks are set as tasks with higher priority to be submitted to the operating system first, and then it is more on-time.
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) the time accuracy of task scheduling can be improved by combining the priority stack on the basis of the time wheel;
(2) by reducing script issuing scheduling through a data structure such as a time wheel and combining a priority stack, the effects of enabling tasks to be executed more accurately, enabling the tasks to be realized more conveniently and reducing resource overhead in task execution can be achieved;
(3) compared with other types of data structures of third-party components, the time wheel splits the task into n slots, so that the number of tasks in each slot is greatly reduced, and the searching speed is accelerated.
Drawings
The invention is further described in connection with the following figures and examples, all of which are intended to be open ended and within the scope of the invention.
Fig. 1 is a flowchart of a script issuing and scheduling method based on a time wheel provided by the present invention.
FIG. 2 is a task queue storage mode combining a time wheel and a priority heap according to the present invention.
FIG. 3 is a logic diagram of a time wheel execution rule of a script issuing and scheduling method based on a time wheel according to the present invention.
Detailed Description
Example 1:
in the method for scheduling script issuing based on time wheel according to this embodiment, as shown in fig. 1, the data structure such as time wheel is used to simplify scheduling time complexity in the scene of timed tasks and periodic tasks, so as to achieve the effect of efficiently scheduling tasks and reducing system resource overhead, and meanwhile, in combination with priority stack, the task execution is better on time, and the call time error of high-priority tasks is reduced. Taking the bastion machine as an example, the bastion machine is used as a safety device, and has tasks of timing and periodicity, such as the tasks of timing detection of asset states, timing collection of asset resource states, periodic execution of scripts and the like. And most of the tasks are periodic tasks and some are timed tasks, and the longest period does not exceed one year. If a third-party component is used to complete the scheduling of tasks, some third-party components may not fully meet the requirements, while some large and full third-party components may consume some unnecessary resources. In general, for a simple task, a timer is used to check every 1 second, and the whole task queue needs to be traversed every time, which causes unnecessary overhead.
Example 2:
this embodiment is further optimized based on embodiment 1, and by taking the fortress machine as an example, the maximum execution cycle of the fortress machine is year, so the maximum disk of the time wheel is the month wheel, and the cycle is the common requirement, so the 6 types of wheels of second, minute, hour, day, week and month are totally arranged, and the day wheel is 4 because of the big and small month and leap year, the big and small month is 28, 29, 30 and 31 respectively, and 11 time wheels are totally arranged. Other parts of this embodiment are the same as embodiment 1, and thus are not described again.
Example 3:
in this embodiment, further optimization is performed on the basis of the above embodiment 2, for example, tasks common in the bastion machine are mainly classified into two major categories, one is a timing task and does not need to be executed after being executed once, and the other is a periodic task and is executed once every period. The rest of this embodiment is the same as embodiment 1 or 2, and therefore, the description thereof is omitted.
Example 4:
this embodiment is further optimized on the basis of embodiment 3 described above.
For timing task 1, assume that the task is 12:30:15 execution.
The maximum time unit of the task is hour, so the task is inserted into the queue of the hour wheel 12; when the needle moves to 12, deleting the task from the 12-hour queue and inserting the task into the 30-hour queue of the minute wheel; when the minute hand moves to 30, the task is deleted from the 30 minute queue and is inserted into the 15 queue of the second hand wheel; when the second hand goes to 15, the task is deleted from the 15 second queue and then executed.
For timed task 2, assume that the task is executed 10:05:30, the execution requirement is 10:05:30 minutes, the maximum time unit of the task is hours, so the task is inserted into the queue of 10 of the hour wheel, that is, the task is inserted into the slot with 10 of the hour wheel; when the hour hand moves to the slot with 10 hours, the task is deleted from the 10-hour queue and is inserted into the 05 queue of the minute hand wheel, namely the task is placed into the slot with 05 minute hand wheel; when the minute hand goes to 05 this slot, if the second hand goes to 30, the task is deleted from the 30 second queue and then executed.
For periodic task 1, assume that the task is performed 12:30:15 daily. The maximum time unit of the task is small, so the task is inserted into the queue of 12 of the hour wheel, when the hour wheel moves to 12, because the hour wheel is a periodic task, a copy of the task and a timing task are inserted into the queue of 30 of the minute wheel, when the minute wheel moves to 30, the task is deleted from the queue of 30 minutes and inserted into the queue of 15 seconds of the second wheel, when the second wheel moves to 15, the task is deleted from the queue of 15 seconds, and then the task is executed.
Example 5:
this embodiment is further optimized based on the above embodiment, in this embodiment, if the time wheel has only one second disk, if there are 1000 scheduling tasks, it is equivalent to splitting the 1000 scheduling tasks into the 60 time slots, if the time wheel has two disks, a second disk and a minute disk, there are 120 time slots, if the time wheel has three disks, a second disk, a minute disk and a time disk, there are 180 time slots. Every groove of time wheel can have a plurality of tasks that need be executed at the same moment, confirms the task quantity that every groove the time slot is very big has reduced the inside according to the time panel that the time wheel corresponds, and speed can be more accelerated when looking for, and the precision also can be higher.
Example 6:
the embodiment is further optimized on the basis of any one of the above embodiments, and many third-party components and other data structures are designed for general scenes, so that there are many redundancies which are only suitable for specific scenes, for example, the third-party components and other data structures are not suitable for a bastion machine, and there is no need to add extra overhead to run away those redundancies, and the time accuracy of task scheduling can be improved by combining a priority heap on the basis of a time round, so that the task of 10:00:00 cannot be scheduled at 10:00:01 as far as possible. The time round + priority queue is to solve the complex scheduling of timing/periodic task scene time. In a time/period task scenario, if a third-party component is used to complete the task scheduling, some third-party components may not fully meet the requirements, and some large and full third-party components may consume some unnecessary resources.
Example 7:
the present embodiment is further optimized based on the above embodiment 6, as shown in fig. 2, the right half of fig. 2 is a large top pile, the higher the priority is, the top pile is arranged, taking the second hand wheel as an example, the task queue storage manner of 15 seconds is as shown in fig. 2, the left half of fig. 2 is the second hand wheel, and the right half of fig. 2 is the tree-shaped task queue storage pile of 15 seconds.
The priority of the priority heap has two setting ways, firstly, a user designates a priority value when setting a task, and takes priority with a small value, secondly, if the user does not set the priority, the system takes the time of task creation as the priority, and the priority created first is higher. The priority heap is used for solving the problem that too many tasks need to be executed at the same time, for example, 100 tasks are specified at 12:00 time, when the time is up, the 100 tasks are all executed at the same time, the simultaneous execution cannot guarantee the real simultaneous execution, because the code always has precedence, in order to guarantee that the tasks are on time as much as possible, the priority of the tasks needs to be increased, and then the tasks are called by the code first when the time comes, so that the high-priority tasks are on time as much as possible. This place uses priority heap rather than linear table priority queue because heap organizes data using tree structure, and the efficiency of data lookup is higher than linear table priority queue.
Example 8:
other parts of this embodiment are the same as any of embodiments 1 to 7, and thus are not described again.
Example 9:
this embodiment is further optimized based on any of the above embodiments 1 to 7, as shown in fig. 3, the time-round operation rule is actually integrated with the time-round data structure, the selected time-round logic rule is selected after a large number of data tests, and as can be seen from the time-round execution rule logic diagram shown in fig. 3: the time wheel is used for realizing the time type tasks, the execution time of the tasks does not need to be sequenced, and compared with other data structures such as a two-dimensional table, the execution time of the tasks needs to be sequenced, the close time arrangement is ensured to be in front, and therefore the tasks are convenient to read; the absolute execution time of all tasks in the time wheel does not need to be modified every second; when a new task is inserted, the inserted positions do not need to be found in sequence; if the task is a periodic task, the periodic task does not need to be inserted back to the position corresponding to the time point; if the total number of tasks is 10000 and the execution time is random, other data structures (such as a two-dimensional table) need to modify the execution time of 10000 tasks per second, which consumes CPU resources greatly, and may even result in that all tasks are not executed on time due to the time needed to modify the execution time of the 10000 tasks. Compared with the use of a time wheel, the 10000 tasks are all inserted into 180+ time slots, and when the tasks are inserted, only the maximum execution time unit of the task execution time needs to be checked, then the tasks are directly inserted into the corresponding slot positions, the slot positions do not need to be searched, and the execution time of all the tasks in the time wheel does not need to be modified every second. The periodic task is always in a fixed position in the time wheel, so that repeated insertion is not needed, namely, the periodic task is only deleted less operation relative to the timing task. Therefore, the time wheel can realize timing tasks and periodic tasks through the same logic, complete the insertion and deletion operations of new tasks by using simpler operation, and reduce the consumption of a CPU (Central processing Unit) so as to improve the accuracy of task execution time.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, and all simple modifications and equivalent variations of the above embodiments according to the technical spirit of the present invention are included in the scope of the present invention.

Claims (9)

1. A script issuing and scheduling method based on a time wheel is characterized by comprising the following steps:
s1, receiving a scheduling task through a time wheel;
s2, splitting the scheduling task into task queues according to time and distributing the task queues to time slots corresponding to the time wheels;
s3, storing the task queue into a time slot through a preset priority stack; and S4, presetting a time wheel execution rule, and executing the task queue stored in the time wheel according to the time wheel execution rule.
2. The script issuing scheduling method based on time wheel as claimed in claim 1, wherein the step S1 includes: s1.1, setting the number of corresponding time wheels according to the requirement of a scheduling task; and S1.2, classifying the scheduling tasks and setting corresponding execution modes.
3. The script issuing and scheduling method based on the time wheel as claimed in claim 2, wherein the step S1.2 includes: and classifying the scheduling tasks into timing tasks and periodic tasks.
4. The method according to claim 3, wherein the timing task and the periodic task include: determining the time of the timing task, inserting the timing task into a task queue of a time-in hand wheel according to the maximum time unit, deleting the task queue of the last time unit in sequence according to a time pointer, inserting the task queue into the task queue of the time hand wheel at the next time, and not executing the task after executing once;
and determining the time of the periodic task, inserting the periodic task into a task queue of the time-in pinwheel according to the maximum time unit, copying one periodic task when a time pointer reaches the maximum time unit value, changing the periodic task into a timing task, inserting the timing task into the task queue of the previous time unit, deleting the task queue of the previous time unit in sequence according to the time pointer, inserting the timing task into the task queue of the time-in pinwheel at the next time, and executing the timing task once every period.
5. The script issuing scheduling method based on time wheel as claimed in claim 1, wherein the step S2 includes:
and determining the time slot according to the time disc corresponding to the time wheel.
6. The script issuing scheduling method based on time wheel as claimed in claim 1, wherein the step S3 includes:
s3.1, presetting a priority stack corresponding to a time wheel;
s3.2, determining all wheel discs of the time wheel according to the task queue;
s3.3, arranging the task queues into priority queues by combining the priority stacks and all disks of the time wheel;
and S3.4, storing the priority queue into the time slot.
7. The method for scheduling script issuing based on time wheel as claimed in claim 6, wherein the step S3.1 comprises: judging whether a priority value is set when a user sets a scheduling task;
if so, taking the set priority value as the priority; if not, the time sequence of the scheduling task creation is taken as the priority, and the priority of the scheduling task created first is judged to be higher than that of the scheduling task created later.
8. The script issuing scheduling method based on time wheel as claimed in claim 1, wherein the step S4 includes:
presetting a time wheel execution rule according to the number of the time wheels in the step S1.1 and the execution mode in the step S1.2;
and executing the task queue stored by the priority stack in the time wheel according to the time wheel execution rule.
9. The method according to claim 8, wherein the time-round execution rule comprises:
A1. the second hand wheel of the minimum unit wheel is increased by 1 per second, the minute hand is increased by 1 if the second hand is full of 60, the hour hand is increased by 1 if the minute hand is full of 60, the day wheel logic is entered if the hour hand is full of 24, and the month wheel logic and the week wheel logic are entered in sequence in an increasing mode;
A2. if the hour is not full 24, judging whether the current time queue is empty, if so, entering step A4, if not, taking out the tasks from the task queue in sequence, copying and modifying the tasks into timed tasks, and inserting the timed tasks into corresponding minute wheels; judging whether the task is a periodic task, if so, entering the step A4, and if not, deleting the task from the current time round queue and entering the step A4;
A3. if the minute hand is less than 60, judging whether the current minute queue is empty, if so, entering step A4, if not, taking out the tasks from the queue in sequence, copying and modifying the tasks into timed tasks, and inserting the timed tasks into the corresponding second wheel; judging whether the task is a periodic task, if so, entering the step A4, otherwise, deleting the task from the current minute wheel queue, and entering the step A4;
A4. if the second hand is less than 60, judging whether the current second queue is empty, if so, entering step A1, and if not, taking out the tasks from the queue in sequence and executing the current task; and judging whether the task is a periodic task, if so, entering the step A1, and if not, deleting the task from the queue and entering the step A1.
CN202110950173.XA 2021-08-18 2021-08-18 Script issuing and scheduling method based on time wheel Pending CN113760508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110950173.XA CN113760508A (en) 2021-08-18 2021-08-18 Script issuing and scheduling method based on time wheel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110950173.XA CN113760508A (en) 2021-08-18 2021-08-18 Script issuing and scheduling method based on time wheel

Publications (1)

Publication Number Publication Date
CN113760508A true CN113760508A (en) 2021-12-07

Family

ID=78790324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110950173.XA Pending CN113760508A (en) 2021-08-18 2021-08-18 Script issuing and scheduling method based on time wheel

Country Status (1)

Country Link
CN (1) CN113760508A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291558A (en) * 2016-03-30 2017-10-24 阿里巴巴集团控股有限公司 A kind of application programming interfaces deadlock monitoring method and device
CN110119323A (en) * 2019-05-13 2019-08-13 重庆八戒电子商务有限公司 It is a kind of to take turns the method and system for executing delay queue based on the time
CN112181614A (en) * 2020-09-14 2021-01-05 中国银联股份有限公司 Task timeout monitoring method, device, equipment, system and storage medium
CN112346857A (en) * 2020-10-22 2021-02-09 杭州安恒信息技术股份有限公司 Data issuing method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291558A (en) * 2016-03-30 2017-10-24 阿里巴巴集团控股有限公司 A kind of application programming interfaces deadlock monitoring method and device
CN110119323A (en) * 2019-05-13 2019-08-13 重庆八戒电子商务有限公司 It is a kind of to take turns the method and system for executing delay queue based on the time
CN112181614A (en) * 2020-09-14 2021-01-05 中国银联股份有限公司 Task timeout monitoring method, device, equipment, system and storage medium
CN112346857A (en) * 2020-10-22 2021-02-09 杭州安恒信息技术股份有限公司 Data issuing method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
小小笑儿: "定时器和时间轮系列(二): 优先级队列和延时队列", 《HTTPS://ZHUANLAN.ZHIHU.COM/P/132481008》, pages 1 - 13 *
阿里巴巴淘系技术团队官网博客的博客: "任务调度:时间轮算法经典案例解析及应用实现", 《HTTPS://BLOG.CSDN.NET/TAOBAOJISHU/ARTICLE/DETAILS/10867547》, pages 1 - 12 *

Similar Documents

Publication Publication Date Title
Varghese et al. Hashed and hierarchical timing wheels: Data structures for the efficient implementation of a timer facility
US7827167B2 (en) Database management system and method including a query executor for generating multiple tasks
US7246353B2 (en) Method and system for managing the execution of threads and the processing of data
US11132383B2 (en) Techniques for processing database tables using indexes
KR20120109533A (en) Managing queries
US11074246B2 (en) Cluster-based random walk processing
CN104360824A (en) Data merging method and device
CN109409555A (en) Meeting room preordering method, device and computer equipment based on data analysis
CN110134701A (en) A kind of buffering benefit account method and device
CN113760508A (en) Script issuing and scheduling method based on time wheel
CN117251275A (en) Multi-application asynchronous I/O request scheduling method, system, equipment and medium
Wang et al. Improving the size of communication buffers in synchronous models with time constraints
KR102634807B1 (en) Expected pre-execution of data queries
CN107562529A (en) The implementation method and device of timed task in a kind of operation system
CN110673939B (en) Task scheduling method, device and medium based on airflow and yarn
CN113419832A (en) Processing method and device of delay task and terminal
CN113392134A (en) Data sorting method, database engine and storage medium
CN115794446B (en) Message processing method and device, electronic equipment and storage medium
CN116893854B (en) Method, device, equipment and storage medium for detecting conflict of instruction resources
CN111259023B (en) Data scheduling method and device, electronic equipment and storage medium
CN117235313B (en) Storage catalog statistics method and device, electronic equipment and storage medium
US12019619B2 (en) Time-to-run column for database management systems
US11625400B2 (en) Optimal query scheduling for resource utilization optimization
CN114840545B (en) Block chain fine-grained editing method supporting rapid state updating
CN112416539B (en) Multi-task parallel scheduling method for heterogeneous many-core processor

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