Unlike deadlock, livelocked packets continue to move through the network, but never reach their destination.

This is primarily a concern for non-minimal routing algorithms that can misroute packets.

If there is no guarantee on the maximum number of times a packet may be misrouted, the packet may remain in the network indefinitely.

Dropping flow control techniques can also cause livelock.

If a packet is dropped every time it re-enters the network, it may never reach its destination.

There are two primary techniques for avoiding livelock, deterministic and probabilistic avoidance.

In deterministic avoidance, a small amount of state is added to each packet to ensure its progress.

The state can be a misroute count, which holds the number of times a packet has been misrouted.

Once the count reaches a threshold, no more misrouting is allowed.

This approach is common in non-minimal, adaptive routing.

A similar approach is to store an age-based priority in each packet.

When a conflict between packets occurs, the highest priority (oldest) packet wins.

When used in deflection routing or dropping flow control, a packet will become the highest priority packet in the network after a finite amount of time.

This prevents any more deflections or drops and the packet will proceed directly to its destination.

Probabilistic avoidance prevents livelock by guaranteeing the probability that a packet remains in the network for T cycles approaches zero as T tends to infinity(无穷大).

For example, we might want to avoid livelock in a 2-ary k-mesh with deflection routing and single flit packets.

The maximum number of hops a packet can ever be from its destination is H_max = 2(k−1).

We then write a string for the history of a packet, where t denotes a routing decision toward the destination and d represents a deflection (such as tddtdtt . . .).

If the number of t ’s in the string minus the number of d’s ever exceeds H_max , then we know the packet must have reached its destination.

As long as the probability of a packet routing toward destination is always non-zero, the probability of this occurring approaches one.

Therefore, our network is livelock-free as long as we can always guarantee a non-zero chance of a packet moving toward its destination at each hop.

Livelock的更多相关文章

  1. 活锁(livelock)

    活锁(livelock) 活锁指的是任务或者执行者没有被阻塞,由于某些条件没有满足,导致一直重复尝试,失败,尝试,失败. 活锁和死锁的区别在于,处于活锁的实体是在不断的改变状态,所谓的“活”, 而处于 ...

  2. 有关于并发中的死锁(Deadlock)、饥饿(Starvation)、活锁(Livelock)

    最近在看<实战Java高并发程序设计>,发现了之前没有接触过的几个名词. 死锁:之前在接触多线程的时候,接触过死锁的情况.死锁是线程中最糟糕的情况,如下面的图中的四辆车子一样,如果没有一辆 ...

  3. “全栈2019”Java多线程第二十三章:活锁(Livelock)详解

    难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java多 ...

  4. 活锁(livelock) 专题

    活锁(livelock) 活锁指的是任务或者执行者没有被阻塞,由于某些条件没有满足,导致一直重复尝试,失败,尝试,失败. 活锁和死锁的区别在于,处于活锁的实体是在不断的改变状态,所谓的“活”, 而处于 ...

  5. .Net多线程编程—预备知识

    1 基本概念 共享内存的多核架构:一个单独的封装包内封装了多个互相连接的未处理器,且所有内核都可以访问主内存.共享内存的多核系统的一些微架构,例如内核暂停功能,超频. 内核暂停功能:当使用内核不多的时 ...

  6. 分布式系统理论进阶 - Paxos

    引言 <分布式系统理论基础 - 一致性.2PC和3PC>一文介绍了一致性.达成一致性需要面临的各种问题以及2PC.3PC模型,Paxos协议在节点宕机恢复.消息无序或丢失.网络分化的场景下 ...

  7. Concurrency vs. Parallelism

    http://getakka.net/docs/concepts/terminology Terminology and Concepts In this chapter we attempt to ...

  8. Questa Functional Verification-autocheck

    1.AutoCheck analysis introduce Autocheck是自动对RTL代码使用形式验证进行规则检查的检查器,是Questa Verify tools的一部分.Autochenc ...

  9. [转]透过 Linux 内核看无锁编程

    非阻塞型同步 (Non-blocking Synchronization) 简介 如何正确有效的保护共享数据是编写并行程序必须面临的一个难题,通常的手段就是同步.同步可分为阻塞型同步(Blocking ...

随机推荐

  1. 【jquery】checkbox

    jquery操作checkbox 模拟选中: $('#aaa').prop('checked', true); 模拟取消选中: $('#aaa').prop('checked', false); 其它 ...

  2. [剑指Offer]62-圆圈中最后剩下的数(约瑟夫环问题)(法二待做)

    题目链接 https://www.nowcoder.com/practice/f78a359491e64a50bce2d89cff857eb6?tpId=13&tqId=11199&t ...

  3. [Java学习]面向对象-package;内部类;UML图表示六种关系

    package 软件包 类名前加入命名空间(包),解决命名冲突问题. 定义格式:公司域名倒叙.项目名.模块名; package语句写在文件第一行 使用import语句导入package java.la ...

  4. java_11接口

    1接口的概念 接口是功能的集合,同样可看做是一种数据类型,是比抽象类更为抽象的”类”. 接口只描述所应该具备的方法,并没有具体实现,具体的实现由接口的实现类(相当于接口的子类)来完成.这样将功能的定义 ...

  5. 用户Cookie和会话Session、SessionId的关系

    一.客户端用cookie保存了sessionID 客户端用cookie保存了sessionID,当我们请求服务器的时候,会把这个sessionID一起发给服务器,服务器会到内存中搜索对应的sessio ...

  6. 自动化运维工具 SaltStack 搭建

    原文地址:https://www.ibm.com/developerworks/cn/opensource/os-devops-saltstack-in-cloud/index.html#N10072 ...

  7. android抽屉效果

    所谓抽屉  是区别于侧滑菜单 他不会把内容区域挤掉  他只是覆盖在内容区域 下边一个布局文件  一个代码   可以说的就是布局文件就是 <android.support.v4.widget.Dr ...

  8. Redhat ssh服务登录慢

    redhat在安装以后每次通过ssh服务登录,要等待几秒才能进入. 只要在sshd_config修改一下以下值就好 vim /etc/ssh/sshd_config UseDNS no service ...

  9. Vue 进度条 和 图片的动态更改

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  10. BZOJ2730 [HNOI2012]矿场搭建 - Tarjan割点

    Solution 输入中没有出现过的矿场点是不用考虑的, 所以不用考虑只有 一个点 的点双联通分量. 要使某个挖矿点倒塌, 相当于割去这个点, 所以我们求一遍割点和点双联通分量. 之后的点双联通分量构 ...