CN105376177A - Configurable multi-priority scheduling method - Google Patents

Configurable multi-priority scheduling method Download PDF

Info

Publication number
CN105376177A
CN105376177A CN201510930459.6A CN201510930459A CN105376177A CN 105376177 A CN105376177 A CN 105376177A CN 201510930459 A CN201510930459 A CN 201510930459A CN 105376177 A CN105376177 A CN 105376177A
Authority
CN
China
Prior art keywords
variable
priority
queue
priorities
mix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510930459.6A
Other languages
Chinese (zh)
Other versions
CN105376177B (en
Inventor
田泽
张荣华
郭亮
刘浩
张亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Xiangteng Microelectronics Technology Co Ltd
Original Assignee
Xian Aeronautics Computing Technique Research Institute of AVIC
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 Xian Aeronautics Computing Technique Research Institute of AVIC filed Critical Xian Aeronautics Computing Technique Research Institute of AVIC
Priority to CN201510930459.6A priority Critical patent/CN105376177B/en
Publication of CN105376177A publication Critical patent/CN105376177A/en
Application granted granted Critical
Publication of CN105376177B publication Critical patent/CN105376177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a configurable multi-priority scheduling method. According to the configurable multi-priority scheduling method, configurable priorities and circulatory priorities are adopted, and therefore, the priorities can be configurable, and scheduling can be carried out according to configured priorities, fair polling scheduling can be realized when the priorities of a plurality of queues are equal. The scheduling method has the advantages of simplicity, easiness in expansion and flexibility in circuit implementation, and can be applied to network communication and the like.

Description

A kind of configurable multipriority dispatching method
Technical field
The invention belongs to computer hardware technology, relate to a kind of configurable multipriority dispatching method and circuit.
Background technology
Often relate to the scheduling of multiple queues of configurable priority in network communications, conventional scheduling method is defined in fixed priority and queue, or priority level is defined as height two grades, low priority shares 1 high priority dispatch window, variable for complexity, the scheduling of multipriority grade, mainly through software simulating, cannot carry out integrated in circuit design.
Summary of the invention
The object of this invention is to provide a kind of configurable multipriority dispatching method and circuit, by adopting configuration preference level and circular priority, effectively solving the design of the dispatch circuit of configurable, multipriority queue.
Technical solution of the present invention is:
A kind of configurable multipriority dispatching method, comprises the following steps:
1) mix of priorities variable is built
1.1) adopt binary coding, configure an independently configuration preference level variable respectively to all queues participating in scheduling; Adopt binary coding, distribute the initial cycle priority variable of an acquiescence to all queues participating in scheduling respectively; The coding of described circular priority variable increases progressively successively from 0, and the initial cycle priority of each queue is unequal;
1.2) the mix of priorities variable that this queue participates in scheduling by the configuration preference level variable of each queue and circular priority variable in succession, is merged into; If certain queue does not participate in scheduling, then this queue mix of priorities variable exports as full 0;
2) the mix of priorities variable of all queues is carried out or computing by turn by two-stage system, form M bit line or priority variable; Described M is the figure place of the two-stage system coding of mix of priorities variable; Described line or priority variable are
PRI_WOR[M-1],PRI_WOR[M-2],PRI_WOR[M-3],……,PRI_WOR[0];
3) priority arbitration variable assignment is built
3.1) build M position priority arbitration variable, its initial value is 0 entirely;
3.2) if [M-1] position of line or priority variable is 1, be then 1 by [M-1] position assignment of priority arbitration variable, all the other positions remain unchanged;
3.3) the mix of priorities variable of each queue and priority arbitration variable are compared: if mix of priorities variable is more than or equal to priority arbitration variable, then the mix of priorities variable of this queue is constant; If mix of priorities variable is less than priority arbitration variable, then it is 0 that the mix of priorities variable of this queue exports;
3.4) according to the method for step 3.2 to 3.3, judge [M-1] position successively, [M-2] position, [M-3] position, until [0] position, then priority arbitration variable assignments is complete; It is the highest that this queue corresponding to priority arbitration variable is priority;
3.5) to this queue scheduling process;
4) priority variable is upgraded:
4.1) set the circular priority variable of serviced queue as N, then the circular priority variable of larger than N queue is constant, and the circular priority variable update of serviced queue is 0, and the circular priority variable of the queue larger than N all adds 1;
4.2) be full 0 by priority arbitration variable update;
5) repeat step 3 and step 4, dispatch next time.
Wherein, in step 1.1, the configuration preference level variable of different queue can be identical.
Step 3.4) in, if in assignment procedure, the mix of priorities variable of residual queue has been 0 all, then priority arbitration variable assignments is complete.
Beneficial effect of the present invention:
1, the target of the present invention's scheduling is exactly participate in finding out in the queue of scheduling that priority is unique, the highest mix of priorities numbering, the namely queue of priority arbitration numbering ARB_PRI and correspondence all.
2, the present invention is by adopting configurable priority and circular priority, both priority had been achieved configurable, dispatch by configuration preference level, solve again the problem of the fair polling dispatching when multiple queue priority is equal, dispatching method is simple, be easy to expand, circuit realiration is flexible, can be applicable in the application such as network service.
Embodiment
The configurable multipriority dispatching method of the present invention and circuit, comprise the following steps:
Step 1, priority configuration adopts binary coding to be configured, and each queue has oneself independently configuration preference level variable;
Step 2, according to the number of queue participating in scheduling, each queue has oneself independently circular priority variable, also binary coding is adopted, according to system application background, the initial cycle priority of each queue assignment one acquiescence, circular priority coding increases progressively successively from 0, and the initial cycle priority of each queue is unequal;
The configuration preference level of step 3, each queue and circular priority are in succession, be merged into this queue and participate in scheduling mix of priorities, wherein configuration preference level is by software merit rating, circular priority upgrades according to last scheduling result, serviced circular priority is N, and what circular priority was less than N adds 1, and priority equals N's, namely serviced queue priority is 0, constant larger than N of circular priority;
If step 4, each queue mix of priorities are made up of M position binary coding, so scheduling needs M cycle to complete;
Step 4.1, the step-by-step of all queue mix of priorities are carried out or computing, form M line or signal PRI_WOR [M-1], PRI_WOR [M-2], PRI_WOR [M-2] ..., PRI_WOR [0];
If certain queue of step 4.2 does not participate in scheduling, then this queue mix of priorities exports as full 0, the target of scheduling is exactly participate in finding out in the queue of scheduling that priority is unique, the highest mix of priorities numbering all, namely priority arbitration numbering ARB_PRI, and the queue of correspondence, it is full 0 that priority arbitration starts to dispatch duration;
Step 4.3, first judge priority arbitration ARB_PRI [M-1], if PRI_WOR [M-1] is 1, then ARB_PRI [M-1] is 1, and all the other positions remain unchanged, namely 0;
Step 4.4, each queue mix of priorities and priority arbitration compare, if be more than or equal to, mix of priorities is constant, if being less than mix of priorities is full 0, the mix of priorities not participating in dispatching is full 0;
Step 4.5, continuation judge priority arbitration ARB_PRI [M-2], if PRI_WOR [M-2] is 1, then ARB_PRI [M-2] is 1, otherwise is 0, and all the other positions remain unchanged;
Step 4.6, each queue mix of priorities and priority arbitration compare, if be more than or equal to, mix of priorities is constant, if being less than mix of priorities is full 0, so repeatedly, until last position of ARB_PRI is also finally decided, then priority arbitration ARB_PRI is the highest for participating in scheduling queue medium priority, and this queue is scheduled place;
Step 4.7, dispatched after carry out circular priority renewal by according to the value of circular priority corresponding in priority arbitration, serviced circular priority is N, what circular priority was less than N adds 1, priority equals N's, namely serviced queue priority is 0, constant larger than N of circular priority.

Claims (3)

1. a configurable multipriority dispatching method, is characterized in that: comprise the following steps:
1) mix of priorities variable is built
1.1) adopt binary coding, configure an independently configuration preference level variable respectively to all queues participating in scheduling; Adopt binary coding, distribute the initial cycle priority variable of an acquiescence to all queues participating in scheduling respectively; The coding of described circular priority variable increases progressively successively from 0, and the initial cycle priority of each queue is unequal;
1.2) the mix of priorities variable that this queue participates in scheduling by the configuration preference level variable of each queue and circular priority variable in succession, is merged into; If certain queue does not participate in scheduling, then this queue mix of priorities variable exports as full 0;
2) the mix of priorities variable of all queues is carried out or computing by turn by two-stage system, form M bit line or priority variable; Described M is the figure place of the two-stage system coding of mix of priorities variable; Described line or priority variable are
PRI_WOR[M-1],PRI_WOR[M-2],PRI_WOR[M-3],……,PRI_WOR[0];
3) priority arbitration variable assignment is built
3.1) build M position priority arbitration variable, its initial value is 0 entirely;
3.2) if [M-1] position of line or priority variable is 1, be then 1 by [M-1] position assignment of priority arbitration variable, all the other positions remain unchanged;
3.3) the mix of priorities variable of each queue and priority arbitration variable are compared: if mix of priorities variable is more than or equal to priority arbitration variable, then the mix of priorities variable of this queue is constant; If mix of priorities variable is less than priority arbitration variable, then it is 0 that the mix of priorities variable of this queue exports;
3.4) according to the method for step 3.2 to 3.3, judge [M-1] position successively, [M-2] position, [M-3] position, until [0] position, then priority arbitration variable assignments is complete; It is the highest that this queue corresponding to priority arbitration variable is priority;
3.5) to this queue scheduling process;
4) priority variable is upgraded:
4.1) set the circular priority variable of serviced queue as N, then the circular priority variable of larger than N queue is constant, and the circular priority variable update of serviced queue is 0, and the circular priority variable of the queue larger than N all adds 1;
4.2) be full 0 by priority arbitration variable update;
5) repeat step 3 and step 4, dispatch next time.
2. configurable multipriority dispatching method according to claim 1, is characterized in that: the configuration preference level variable of described different queue can be identical.
3. configurable multipriority dispatching method according to claim 1, is characterized in that: described step 3.4) in, if in assignment procedure, the mix of priorities variable of residual queue has been 0 all, then priority arbitration variable assignments is complete.
CN201510930459.6A 2015-12-12 2015-12-12 A kind of configurable multipriority dispatching method Active CN105376177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510930459.6A CN105376177B (en) 2015-12-12 2015-12-12 A kind of configurable multipriority dispatching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510930459.6A CN105376177B (en) 2015-12-12 2015-12-12 A kind of configurable multipriority dispatching method

Publications (2)

Publication Number Publication Date
CN105376177A true CN105376177A (en) 2016-03-02
CN105376177B CN105376177B (en) 2018-07-03

Family

ID=55377994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510930459.6A Active CN105376177B (en) 2015-12-12 2015-12-12 A kind of configurable multipriority dispatching method

Country Status (1)

Country Link
CN (1) CN105376177B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897614A (en) * 2016-04-07 2016-08-24 成都华日通讯技术有限公司 Routing method and device based on multichannel data packet priority

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0989770A1 (en) * 1998-09-22 2000-03-29 Fujitsu Limited Packet transfer control apparatus and scheduling method therefor
US20030231593A1 (en) * 2002-06-04 2003-12-18 James Bauman Flexible multilevel output traffic control
CN1972242A (en) * 2005-11-23 2007-05-30 中国科学院计算技术研究所 A difference weight queue scheduling apparatus and scheduling method for network processor
CN103547330A (en) * 2012-12-12 2014-01-29 华为技术有限公司 User scheduling method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0989770A1 (en) * 1998-09-22 2000-03-29 Fujitsu Limited Packet transfer control apparatus and scheduling method therefor
US20030231593A1 (en) * 2002-06-04 2003-12-18 James Bauman Flexible multilevel output traffic control
CN1972242A (en) * 2005-11-23 2007-05-30 中国科学院计算技术研究所 A difference weight queue scheduling apparatus and scheduling method for network processor
CN103547330A (en) * 2012-12-12 2014-01-29 华为技术有限公司 User scheduling method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897614A (en) * 2016-04-07 2016-08-24 成都华日通讯技术有限公司 Routing method and device based on multichannel data packet priority
CN105897614B (en) * 2016-04-07 2018-11-09 成都华日通讯技术有限公司 Method for routing based on multi-channel data packet priority and equipment

Also Published As

Publication number Publication date
CN105376177B (en) 2018-07-03

Similar Documents

Publication Publication Date Title
CN103235835A (en) Inquiry implementation method for database cluster and device
CN109818876A (en) The generation method of global optimization's time trigger traffic scheduling table
CN102594663A (en) Queue scheduling method and device
CN106790332B (en) Resource scheduling method, system and main node
US10033546B2 (en) Method and system for reprogramming
CN103679388A (en) Production scheduling method and system
CN107396445B (en) A kind of information reporting dispatching method, system, host equipment and slave devices
CN108768865B (en) Method for generating time-triggered service scheduling table supporting multicast service
CN107766271A (en) BMS addresses on electric automobile are from distribution system
CN105812504B (en) A kind of intelligent mailing address coding method
CN103218326B (en) Comprehensive arbiter device
CN105376177A (en) Configurable multi-priority scheduling method
CN102347877A (en) Bus dispatching method and device
CN105357716A (en) Resource distribution method and device
CN106325997B (en) Virtual resource allocation method and device
CN103327634A (en) Method and device for scheduling time slot
CN108880860B (en) Policy management method and device
EP3686738A1 (en) Device and method for accelerating graphics processor units, and computer readable storage medium
EP3364608A1 (en) Systems and methods for scheduling a message
JP2020178315A5 (en)
CN110557344A (en) Method for configuring identification information of QoS flow and network equipment
CN108092865B (en) Balanced distribution method for periodic bus messages
CN111309467B (en) Task distribution method and device, electronic equipment and storage medium
CN109799758B (en) CAN bus application system and numbering method of processing nodes
CN104636310A (en) Data processing method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20221010

Address after: Room S303, Innovation Building, No. 25, Gaoxin 1st Road, Xi'an, Shaanxi 710075

Patentee after: XI'AN XIANGTENG MICROELECTRONICS TECHNOLOGY Co.,Ltd.

Address before: No. 15, Jinye Second Road, Xi'an, Shaanxi 710065

Patentee before: AVIC XI''AN AERONAUTICS COMPUTING TECHNIQUE RESEARCH INSTITUTE