Looped network anti-starvation flow control method adopting token bottom-preserving distributed greedy algorithm

文档序号:1641616 发布日期:2019-12-20 浏览:17次 中文

阅读说明:本技术 一种采用令牌保底分布式贪心算法的环网防饥饿流控方法 (Looped network anti-starvation flow control method adopting token bottom-preserving distributed greedy algorithm ) 是由 高剑刚 王谛 张清波 陈庆强 王吉军 杨萱 周玉瀚 于 2019-09-06 设计创作,主要内容包括:一种采用令牌保底分布式贪心算法的环网防饥饿流控方法,属于分布控制环网流控技术领域。方法包括步骤S01,当监测到环网的网上状态为空闲时,本地节点发送报文上网;步骤S02,本地节点在一定时间后仍未能传送报文时,请求网上正在传送报文的微片携带对应令牌;步骤S03,环网上传送报文的微片依次传送,微片传送至目标节点后下网,令牌绕环网传送回到本地节点并失效;其中,在微片自本地节点传送至目标节点的路径中的其他节点不能上网。本发明在不增加额外缓冲资源的前提下,避免饥饿问题、平衡各节点负载,优化环网的性能和可实现性。(A ring network starvation-prevention flow control method adopting a token bottom-preserving distributed greedy algorithm belongs to the technical field of distributed control ring network flow control. The method comprises the steps of S01, when the online state of the ring network is monitored to be idle, the local node sends a message to surf the internet; step S02, when the local node still can not transmit the message after a certain time, requesting the microchip transmitting the message on the network to carry the corresponding token; step S03, the flits of the message transmitted on the ring network are transmitted in sequence, the flits are transmitted to the target node and then are off-line, the token is transmitted back to the local node around the ring network and is invalid; and other nodes in the path of the microchip transmitted from the local node to the target node cannot surf the internet. The invention avoids starvation problem, balances load of each node and optimizes performance and realizability of the ring network on the premise of not increasing additional buffer resources.)

1. A ring network starvation-prevention flow control method adopting a token-based distributed greedy algorithm is characterized by comprising the following steps:

step S01, when the on-line state of the ring network is idle, the local node sends a message to surf the network;

step S02, when the local node still can not transmit the message after a certain time, requesting the microchip transmitting the message on the network to carry the corresponding token;

step S03, the flits of the message transmitted on the ring network are transmitted in sequence, the flits are transmitted to the target node and then are off-line, the token is transmitted back to the local node around the ring network and is invalid; and other nodes in the path of the microchip transmitted from the local node to the target node cannot surf the internet.

2. The method for controlling hungry flow of a ring network using a token-preserving distributed greedy algorithm as claimed in claim 1, wherein step S01 comprises:

step S11, monitoring the online state of the ring network in each clock cycle;

and step S12, if the previous node has no message passing, the local node sends a message to surf the internet.

3. The method for controlling hungry flow of a ring network using a token-preserving distributed greedy algorithm as claimed in claim 1, wherein step S02 comprises:

step S21, when the count of the overtime counter at the local node reaches the overtime threshold, the starvation avoidance state machine of the local node enters a token request state S1 from an initial idle state S0, and the token counter of the local node records the remaining message length of the overtime message;

step S22, each flit in the network transmission message carries a token, and the token comprises a token effective bit and a hop field; and setting the initial value of the token hop count of the hop count field as the number of nodes of the ring network.

4. The method for controlling flow of preventing starvation of a ring network using a token-preserving distributed greedy algorithm according to claim 3, wherein the determination procedure when the count of the timeout counter at the local node reaches the timeout threshold in step S21 includes:

the initial value of an overtime counter at a local node is 0, and when a local message is blocked for one clock cycle, the count of the overtime counter is increased by 1;

when the timeout counter count at the local node equals the timeout threshold, the timeout counter count at the local node is deemed to have reached the timeout threshold.

5. A method for controlling flow of hungry prevention for a ring network using a token-preserving distributed greedy algorithm as claimed in claim 3, wherein the timeout threshold is a configurable register value.

6. A method for controlling hungry flow control by a ring network using a token-preserving distributed greedy algorithm as claimed in claim 3, wherein step S03 comprises:

step S31, the local node requests a token from the ring network, and the count of the token counter is decreased by 1;

step S32, the microchip is sent to the target node and then is taken off the network, and the token is sent back to the local node around the ring network; the token hop count is reduced by 1 along with the forward one hop of the token on the ring network, and when the ring network returns to a local node, the token hop count is 0 and the token is invalid;

step S33, when the count of the token counter is larger than 0, returning to step S31, the local node requests the next token from the ring network, and ending until the count of the token counter is 0; wherein, when the token counter counts to 0, the starvation avoidance state machine of the local node transitions from the token request state S1 to the initial idle state S0.

7. The method for controlling flow of preventing hungry by a ring network using a token-preserving distributed greedy algorithm as claimed in claim 6, wherein step S31 further comprises: when the token carried by the flit is invalid, the token is set to be valid.

8. The method for controlling flow of preventing hungry by a ring network using a token-preserving distributed greedy algorithm as claimed in claim 1, wherein step S03 further comprises: there is also a message transmission path between the local node and other nodes of the ring network outside the transmission path from the target node.

9. The method according to claim 8, wherein the packet forwarding process between the local node and other nodes of the ring network outside the transmission path of the target node includes:

two of the other nodes of the ring network outside the local node to target node transmission path are respectively used as the local node and the target node, and the local node executes the steps S01-S03.

10. The method according to claim 8, wherein there is more than one packet transmission path between the local node and other nodes of the ring network outside the transmission path of the target node.

Technical Field

The invention belongs to the technical field of distributed control ring network flow control, and particularly relates to a ring network starvation-prevention flow control method adopting a token-based distributed greedy algorithm.

Background

As an important component of high-performance computers, microprocessors have a decisive influence on overall system performance, integration scale and stable operation. At present, network on chip (noc) technology is widely used in microprocessors. Compared with a bus and a cross switch, the bandwidth of the network on chip is greatly improved, and the realizability is greatly enhanced. The ring network is a common network topology structure on a chip, is suitable for efficient interconnection within 20 nodes, and is widely used in a high-performance microprocessor. From the aspect of flow control, the ring network can be divided into two types of centralized control and distributed control. The centralized control ring network needs a central control logic to carry out global judgment on the request condition of each node, and the expandability is poor; each node of the distributed control ring network independently controls the message transmission, and the expandability is strong.

Distributed control ring networks also present problems in use. Because each node is difficult to know global information, the problem of load balancing of the distributed control ring network is difficult to process. For example, a node has a message locally needing to access the internet, and a previous node on the ring network also has an already accessed message arriving, and if the message of the previous node is blocked, all the already accessed messages on the whole ring network are blocked. One possible solution is that the message already on the internet is allowed to be blocked, and a buffer resource is additionally added to store the message sent from the previous node, but this may cause the resource overhead of the ring network to be increased, the power consumption during operation to be increased, and the relation between the buffer demand and the injection rate of the network is large, and when the injection rate is large, the buffer demand will be sharply increased.

Another possible solution is that messages already on the internet are not allowed to be blocked, but this may lead to serious starvation problems. For example, if the previous node continuously sends a message, the message of the local node cannot be connected to the internet all the time, which causes a serious imbalance of the load on the ring network. When starvation occurs, multiple flits of a message may be pulled apart, and the continuity of information transmission may be seriously degraded.

In summary, the conventional method is difficult to effectively handle the problems of load balancing, starvation avoidance, and the like of the distributed control ring network without increasing additional buffering resources.

The invention patent CN200810116021.4 discloses a multi-service scheduling method, and specifically discloses a method comprising A, calculating the service transmission rate in a certain time period before the current scheduling time slot, counting the packet loss rate of L2 packets and the waiting time of head packets of the service, and then calculating the scheduling priority among the services; B. acquiring a service with the highest priority from a scheduling queue, and distributing resources for the service through a GBR token bucket when the service is determined to be the GBR service; C. and updating the available resources, determining that the available resources are not empty, continuously allocating resources for the GBR service through the MBR token bucket, and combining the resources allocated for the service through the GBR token bucket and the MBR token bucket. The invention considers the QoS attribute of the service, and meets the GBR requirement of the service while avoiding the hungry condition, but the invention only solves the hungry problem of the service with the highest priority.

Disclosure of Invention

Aiming at the problems in the prior art, the invention provides a method for controlling the starvation prevention flow of the ring network by adopting a token-based distributed greedy algorithm, which avoids the starvation problem, balances the load of each node and optimizes the performance and the realizability of the ring network on the premise of not increasing additional buffer resources.

The invention is realized by the following technical scheme:

the invention provides a ring network starvation-prevention flow control method adopting a token bottom-preserving distributed greedy algorithm, which comprises the following steps:

step S01, when the on-line state of the ring network is idle, the local node sends a message to surf the network;

step S02, when the local node still can not transmit the message after a certain time, requesting the microchip transmitting the message on the network to carry the corresponding token;

step S03, sequentially transmitting the flits of the message transmitted on the ring network, sending the flits to a target node and then off-line, and transmitting the token to the application node around the ring network and losing effectiveness; and other nodes in the path of the microchip transmitted from the local node to the target node cannot surf the internet.

The invention ensures the efficiency of data transmission on the ring network by using a greedy algorithm, and the fairness of the use of the ring network data path is ensured by using a token method.

Preferably, step S01 includes:

step S11, monitoring the online state of the ring network in each clock cycle;

and step S12, if the previous node has no message passing, the local node sends a message to surf the internet.

Preferably, step S02 includes:

step S21, when the count of the overtime counter at the local node reaches the overtime threshold, the starvation avoidance state machine of the local node enters a token request state S1 from an initial idle state S0, and the token counter of the local node records the remaining message length of the overtime message;

step S22, each flit in the network transmission message carries a token, and the token comprises a token effective bit and a hop field; and setting the initial value of the token hop count of the hop count field as the number of nodes of the ring network.

Preferably, the judging process when the count of the timeout counter at the local node reaches the timeout threshold in step S21 includes:

the initial value of an overtime counter at a local node is 0, and when a local message is blocked for one clock cycle, the count of the overtime counter is increased by 1;

when the timeout counter count at the local node equals the timeout threshold, the timeout counter count at the local node is deemed to have reached the timeout threshold.

Preferably, the timeout threshold is a configurable register value.

Preferably, step S03 includes:

step S31, the local node requests a token from the ring network, and the count of the token counter is decreased by 1;

step S32, the microchip is sent to the target node and then is taken off the network, and the token is sent back to the local node around the ring network; the token hop count is reduced by 1 along with the forward one hop of the token on the ring network, and when the ring network returns to a local node, the token hop count is 0 and the token is invalid;

step S33, when the count of the token counter is larger than 0, returning to step S31, the local node requests the next token from the ring network, and ending until the count of the token counter is 0; wherein, when the token counter counts to 0, the starvation avoidance state machine of the local node transitions from the token request state S1 to the initial idle state S0.

Preferably, step S31 further includes: when the token carried by the flit is invalid, the token is set to be valid.

Preferably, step S03 further includes: there is also a message transmission path between the local node and other nodes of the ring network outside the transmission path from the target node.

Preferably, the process of transmitting the message between the local node and the other nodes of the ring network outside the transmission path of the target node includes:

two of the other nodes of the ring network outside the local node to target node transmission path are respectively used as the local node and the target node, and the local node executes the steps S01-S03.

Preferably, more than one message transmission path exists between the local node and other nodes of the ring network outside the transmission path of the target node.

The invention has the following beneficial effects:

the invention discloses a method for controlling starvation prevention of a ring network by adopting a token bottom-preserving distributed greedy algorithm, which optimizes the expandability of the ring network, minimizes the resource overhead of the ring network, minimizes the power consumption of the ring network during operation, avoids the starvation phenomenon in the ring network, ensures the continuity of information transmission on the ring network, optimizes the load balancing condition of the ring network and ensures the utilization rate of the effective bandwidth of the ring network.

Drawings

Fig. 1 is a general flow chart of a method for controlling hungry flow in a ring network using a token-preserving distributed greedy algorithm according to the present invention;

FIG. 2 is a diagram of a management structure of the starvation avoidance state machine;

fig. 3a is a schematic diagram of a flow (1) of a specific example of a ring network starvation flow control prevention method using a token-preserving distributed greedy algorithm according to the present invention;

fig. 3b is a schematic diagram of a flow (2) of a specific example of a ring network starvation flow control prevention method using a token-preserving distributed greedy algorithm according to the present invention;

fig. 3c is a schematic diagram of a flow (3) of a specific example of a ring network starvation flow control prevention method using a token-preserving distributed greedy algorithm according to the present invention;

fig. 3d is a schematic diagram of a flow (4) of a specific example of a ring network starvation flow control prevention method using a token-preserving distributed greedy algorithm according to the present invention;

fig. 3e is a schematic diagram of a specific example of a flow (5) of a ring network starvation flow control prevention method using a token-preserving distributed greedy algorithm according to the present invention.

Detailed Description

The following are specific embodiments of the present invention and are further described with reference to the drawings, but the present invention is not limited to these embodiments.

As shown in fig. 1, the method for controlling hungry flow prevention of a ring network using a token-preserving distributed greedy algorithm of the present invention includes:

step S01, when the on-line state of the ring network is idle, the local node sends a message to surf the network;

step S02, when the local node still can not transmit the message after a certain time, requesting the microchip transmitting the message on the network to carry the corresponding token;

step S03, sequentially transmitting the flits of the message transmitted on the ring network, sending the flits to a target node and then off-line, and transmitting the token to the application node around the ring network and losing effectiveness; and other nodes in the path of the microchip transmitted from the local node to the target node cannot surf the internet.

Before the method is adopted to carry out flow control on the ring network structure, an overtime control module is required to be arranged at each node of the ring network structure. The timeout control module includes a starvation avoidance state machine, a token counter, and a timeout counter.

When a node (hereinafter referred to as a "local node") in the ring network structure finds that no message passes through the previous node, the online state of the ring network is considered to be an idle state, and the local node sends a message to surf the network to execute subsequent message transmission. A timeout control module is required in the process.

Specifically, step S01 includes:

step S11, monitoring the online state of the ring network in each clock cycle;

and step S12, if the previous node has no message passing, the local node sends a message to surf the internet.

And determining the online state of the ring network by taking one clock cycle as a monitoring period. If the previous node has a message passing through, the local node can not send the message to surf the internet; otherwise, the message can be sent to surf the internet. The message contains a plurality of microchips, and the microchip for sending the message is mainly used for surfing the internet. For example, when the valid bit of the flit is detected to be 0, it is considered that no message passes through the previous node, and the flit can be sent to the internet.

Specifically, step S02 includes:

step S21, when the count of the timeout counter at the local node reaches the timeout threshold, the starvation avoidance state machine of the local node enters a token request state S1 (refer to fig. 2) from the initial idle state S0, and the token counter of the local node records the remaining message length of the timeout message;

step S22, each flit in the network transmission message carries a token, and the token comprises a token effective bit and a hop field; and the token hop count of the hop count field is set as the number of nodes of the ring network.

In step S21, the determining process when the count of the timeout counter at the local node reaches the timeout threshold includes: the initial value of an overtime counter at a local node is 0, and when a local message is blocked for one clock cycle, the count of the overtime counter is increased by 1; when the timeout counter count at the local node equals the timeout threshold M, then the timeout counter count at the local node is deemed to have reached the timeout threshold. The timeout threshold M is a configurable register value.

The token counter of the local node records the remaining message length of the overtime message, which means that: setting the initial value of the token counter as the residual message length of the overtime message. The remaining message length of the message is determined by how many tokens are needed (each flit carries one token) according to the number of overtime message flits.

Specifically, step S03 includes:

step S31, the local node requests a token on the ring network, and the count of the token counter is decreased by 1;

step S32, the microchip is sent to the target node and then is taken off the network, and the token is sent back to the local node around the ring network; the token hop count is reduced by 1 along with the forward one hop of the token on the ring network, and when the ring network returns to a local node, the token hop count is 0 and the token is invalid;

step S33, when the count of the token counter is larger than 0, returning to step S31, the local node requests the next token from the ring network, and ending until the count of the token counter is 0; when the token counter is counted to 0, the starvation avoidance state machine of the local node transitions from the token request state S1 to the initial idle state S0 (see fig. 2).

Step S31 further includes: when the token carried by the flit is invalid, the token is set to be valid. For each node, when the starvation avoidance state machine transitions from the S0 state to the S1 state, or is in the S1 state and the token counter is greater than 0, if the token carried by the flit passing through the local node is invalid, the token is set to valid. For example, the token valid bit is 0, considered invalid, and the token valid bit is 1, considered valid. The token counter is used for continuously requesting tokens and enabling the rest messages to be continuously on the internet.

And when the token hop count becomes 0 (the token rotates one circle on the ring network and returns to the original request node), the token is invalid. For each node, if the token carried by the flit passing through the node is valid, no matter whether the flit is valid, the message with the target exceeding the token requesting node cannot be sent to surf the internet. Therefore, when the flit carrying the token returns to the request node, the flit is surely an idle flit, and therefore the overtime message is enabled to surf the internet.

In order to fully utilize the ring network resource, step S03 further includes: there is also a message transmission path between the local node and other nodes of the ring network outside the transmission path from the target node. In an embodiment, the message transmission process includes: two of other nodes of the ring network outside the transmission path from the local node to the target node are respectively used as the local node and the target node, and the local node executes the steps S01-S03, namely S01, when the online state of the ring network is monitored to be idle, the local node sends a message to surf the internet; step S02, when the local node still can not transmit the message after a certain time, requesting the microchip transmitting the message on the network to carry the corresponding token; step S03, the flits (whether carrying tokens or not) of the message are transmitted on the ring network in sequence, the flits are transmitted to the target node and then are off-line, the tokens are transmitted back to the request node around the ring network and are invalid; and other nodes in the path of the microchip transmitted from the local node to the target node cannot surf the internet. In another embodiment, the message transmission process includes: when the network state of the ring network is monitored to be idle, the local node sends a message to surf the network.

There may be more than one message transmission path between the local node and other nodes of the ring network outside the transmission path of the target node as long as the transmission of other messages is not interfered.

Fig. 3a to 3e show an example of a method for controlling starvation prevention flow of a ring network using a token-preserving distributed greedy algorithm according to the present invention. Fig. 3 is a 11-node ring network. In fig. 3a, RIU6 is the first local node, RIU6 times out the message to be networked, and the starvation avoidance state machine enters S1 state to request token 6, and the token hop count is 11. In fig. 3b, the microchip is off-line from RIU3, and the path from RIU6 to RI3 in the direction of the arrow has RIU7 to go on-line, and the microchip on the line is reserved and therefore cannot go on-line. In fig. 3c, the path along the arrow direction between RIU4 and RIU6 does not interfere with the path along the arrow direction between RIU6 and RI3, and then the second local node RIU4 flit in the path along the arrow direction between RIU4 and RIU6 is to surf the internet, so that the internet can be surfed; and the flit is screened off at RIU5 (see fig. 3 d) and the flit becomes inactive. In fig. 3e, the token 6 returns to the origin, the token hop count is 0, if the message to be networked in 3a still does not surf the internet, the internet can be surfed at this time, and the token is set to be invalid; if there has been a previous opportunity to surf the internet, the token is simply invalidated.

It will be appreciated by persons skilled in the art that the embodiments of the invention described above and shown in the drawings are given by way of example only and are not limiting of the invention. The objects of the present invention have been fully and effectively accomplished. The functional and structural principles of the present invention have been shown and described in the examples, and any variations or modifications of the embodiments of the present invention may be made without departing from the principles.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于混合流量融合的时分复用方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!