首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 109 毫秒
1.
解决“哲学家进餐问题”的关键是进程或线程之间同步,避免由于竞争临界资源产生死锁。本文介绍了一种预防死锁产生的方法。该方法通过给“哲学家进餐问题”问题附加一个竞争规则从而有效地预防了死锁的产生。文中给出了完整的实现代码。  相似文献   

2.
解决“哲学家进餐问题”的关健是线程之间同步和死锁的避免。本文介绍的方法通过给“哲学家进餐问题”问题加上一个限制条件从而有效地预防了死锁的产生。文中给出了完整的实现代码。  相似文献   

3.
解决“哲学家进餐问题”的关键是线程之间同步和死锁的避免。本文介绍的方法通过给“哲学家进餐问题”问题加上一个限制条件从而有效地预防了死锁的产生。文中给出了完整的实现代码。  相似文献   

4.
CAN总线中非周期信息的随机动态优先级调度   总被引:2,自引:0,他引:2  
针对CAN总线中非周期信息传输的“死锁”现象,利用动态优先级提升机制中消息在发送队列的位置随等待时间动态改变的思想,对非周期性信息的传输采用基于随机数的动态优先级调度策略,以解决CAN总线中非周期信息传输的“死锁”问题。  相似文献   

5.
Java通过“同步”机制为多线程面向对象程序设计避免“相干性”破坏数据一致性提供了一种可行的手段,但这种手段若使用不当,则会造成死锁。针对Java同步机制提出Java多线程程序死锁潜在可能性分析的一种方法,进一步描述了该方法中使用的CHD/LCSD图的构造算法及实现。  相似文献   

6.
韩耀军  蒋昌俊 《计算机科学》2002,29(12):190-192
1.引言系统的并发性与资源的共享性是并发操作系统的主要特征,其目的是最大限度地提高计算机资源的利用率。死锁是并发操作系统必须解决的一个重要问题。人们试图用不同的方法来解决死锁问题。如Dijkstra提出的有名的死锁避免的“银行家算法”,Coffman等人给出的死锁检测算法。 Petri网模型作为模拟与分析并发、异步、分布式系统的一种有效工具,已被用于解决操作系统中的许多问题。如进程通讯中的生产者/消费者问题、哲学家用餐问题,资源竞  相似文献   

7.
模拟交通冲突是道路交通微观仿真中的实现难点。该文描述了由于机动车辆对固定冲突点竞争而引起的“死锁”现象,分析了这种现象的产生机理。在评述现有解决方法的基础上,结合交通冲突的方式和固定冲突点的分布情况,给出了死锁模型和典型情况下预防死锁的算法,同时设定时间参数和车流量参数以便进行路口通行能力评价。最后针对有交通信号控制的十字路口进行仿真编程实现,仿真结果表明本算法对于机动车辆在固定冲突点的死锁预防是可行的,仿真效果与实际的车辆走行情况相吻合。  相似文献   

8.
死锁处理是分布式系统中的关键问题,其中处理死锁最主要的手段为死锁检测。在评价死锁检测算法性能时伪死锁率被视为一项重要指标,故降低伪死锁率对提高算法性能有着促进作用,而目前大多数算法改进对伪死锁率关注较少。本文阐述了伪死锁研究的意义,并对若干种死锁检测算法的伪死锁率进行研究和模拟实验,认为现有的死锁算法可分为两类:环内检测和环无关检测。并分别通过减少冗余消息和本地死锁解决两种改进方法来降低目前算法的伪死锁率,最终实验表明算法性能获得较大提高。  相似文献   

9.
主要研究操作系统进程的死锁问题。进程死锁问题是操作系统的主要问题之一,很多学者专家一直在研究怎样解决这个问题。首先提出了死锁的概念,死锁发生的原因及产生死锁的四个必要条件,然后又讨论了破坏死锁发生的必要条件,就能预防死锁的发生,最后具体的谈论了死锁避免的最著名的算法—银行家算法,从而阻止死锁的发生。  相似文献   

10.
徐尤南  郭英英 《计算机工程》2001,27(10):173-174,182
结合实例分析了客户/服务器(C/S)环境下应用程序系统可能发生联机事务处理速度迟缓甚至死锁的各种因素,研究了防范联机事务处理速度迟缓甚至死锁的解决方案。该方案已成功应用于“中国铁路客票发售和预订系统”这一基于客户/服务器体系结构的大型实时联机事务处理系统中。  相似文献   

11.
In the literature, only a few studies have been performed on the distributed deadlock detection and resolution problem in the generalized request model. Most of the studies are based on the diffusing computation technique where propagation of probes and backward propagation of replies are required to detect deadlock. The replies carry the dependency information between processes for the initiator of the algorithm to determine deadlock. Since fast detection of deadlock is critical, we take a centralized approach that removes the need of backward propagation of replies, but sends the dependency information directly to the initiator of the algorithm. This enables reduction of time cost for deadlock detection to half of that of the existing distributed algorithms. The algorithm is extended to handle concurrent executions in order to further improve deadlock detection time, whereas the current algorithms focus only on a single execution. Simulation experiments are performed to see the effectiveness of this centralized approach as compared to previous distributed algorithms. It is found that our algorithm shows better results in several performance metrics especially in deadlock latency and algorithm execution time.  相似文献   

12.
不恰当的最大安全推进时间(GALT)计算方法会影响系统整体运行,严重情况下可能导致系统死锁,使整个系统仿真无法向前推进。为此,分析经典时间推进Frederick算法中可能出现死锁的情况,给出死锁出现的原因,并对死锁产生的原因进行论证,在此基础上,设计一种基于该算法的改进无死锁时间管理GALT计算算法。分析结果表明,改进算法可以有效解决GALT计算产生的死锁问题。  相似文献   

13.
In this note a polynomial time algorithm is given for the minimum cost recovery from a deadlock situation resulting from a new request by a single task in a deadlock free system of tasks. We obtain the algorithm by reducing this deadlock recovery problem to a particular network flow problem.  相似文献   

14.
Wormhole networks have traditionally used deadlock avoidance strategies. More recently, deadlock recovery strategies have begun to gain acceptance. In particular, progressive deadlock recovery techniques allocate a few dedicated resources to quickly deliver deadlocked packets. Deadlock recovery is based on the assumption that deadlocks are rare; otherwise, recovery techniques are not efficient. Measurements of deadlock occurrence frequency show that deadlocks are highly unlikely when enough routing freedom is provided. However, networks are more prone to deadlocks when the network is close to or beyond saturation, causing some network performance degradation. Similar performance degradation behavior at saturation was also observed in networks using deadlock avoidance strategies. In this paper, we take a different approach to handling deadlocks and performance degradation. We propose the use of an injection limitation mechanism that prevents performance degradation near the saturation point and, at the same time, reduces the probability of deadlock to negligible values. We also propose an improved deadlock detection mechanism that uses only local information, detects all deadlocks, and considerably reduces the probability of false deadlock detection over previous proposals. In the rare case when impending deadlock is detected, our proposal consists of using a simple recovery technique that absorbs the deadlocked message at the current node and later reinjects it for continued routing toward its destination. Performance evaluation results show that our new approach to handling deadlock is more efficient than previously proposed techniques  相似文献   

15.
分布式移动代理系统的异步死锁检测   总被引:1,自引:0,他引:1  
移动代理技术在为分布式应用提供全新的网络计算方式的同时也产生了传统分布式计算领域所没有的新的交互模式和执行模式。传统分布式计算的处理方法如并发控制和死锁检测方法不再适用于客户和服务提供者都可在网络中随处移动的移动代理系统。通过移动代理来建模长寿事务,并根据移动代理的特点提出了一种异步分布式死锁检测和解除算法。它将事务代理的执行与死锁检测机制分离,用专门的代理负责死锁检测的初始化、检测和消除等工作。死锁的检测通过创建若干检测代理,使其在各个站点间移动来收集资源请求和分配信息,并据此构造全局等待图;通过分析和探测全局等待图中是否存在圈来完成。算法具有独立于网络的拓扑结构,死锁的检测和事务代理的执行异步操作,不对代理的移动性施加任何限制等特点。  相似文献   

16.
嵌入式实时操作系统的资源调度   总被引:3,自引:0,他引:3  
赵志强  谢康林 《计算机工程》2003,29(2):273-274,281
主要讨论了在嵌入式RTOS中采用的资源调度策略,给出了一种由于任务共享系统资源而引起的死锁解决方式,这种方式可以大大减少死锁的发生。  相似文献   

17.
A key issue emerging from the unified automated material handling systems (UAMHSs) in 300 mm wafer fabrications is the system deadlock. This paper addresses the deadlock recovery strategy of unified automated material handling systems (UAMHSs) with limited buffers. A formal model for UAMHSs deadlock detection is proposed. Sufficient conditions for system deadlocks based on actual UAMHS characteristics are defined along with a novel deadlock recovery strategy. Moreover, an effective heuristic algorithm is proposed for parallel resolving UAMHS deadlocks. The performances are evaluated in simulation by monitoring indexes reflecting efficiency of the material handling system. Results of the simulation experiments show that the novel deadlock recovery strategy is superior to the benchmark strategy in reducing deadlock time and improving tools’ utilization. Furthermore, the proposed algorithm features real-time operation and large scale cases, and is suitable for practical applications.  相似文献   

18.
This paper proposes a distributed algorithm for resolving deadlocks under the OR request model. The algorithm builds a distributed spanning tree by propagating probes. An encoding scheme is devised to deduce the ancestor–descendant relationship between tree nodes, so that the initiator of the algorithm collects only non-tree edge information to detect deadlock, whereas the current algorithms require all the edge information for deadlock detection. The proposed algorithm resolves all deadlocks reachable from the initiator. Its performance in terms of number of messages and execution time is better than or comparable to that of the existing algorithms. We further showed through analytic evaluation that the suggested algorithm substantially shortens deadlock detection time.  相似文献   

19.
A temporal logic-based specification language and deadlock analyzer for Ada is described. The deadlock analyzer is intended for use within Timebench, a concurrent system-design environment with support for Ada. The specification language, COL, uses linear-time temporal logic to provide a formal basis for axiomatic reasoning. The deadlock analysis tool uses the reasoning power of COL to demonstrate that Ada designs specified in COL are systemwide deadlock-free: in essence, it uses a specialized theorem prover to deduce the absence of deadlock. The deadlock algorithm is shown to be decidable for finite systems and acceptable otherwise. It is also shown to have a worst-case computational complexity that is exponential with the number of tasks. The analyzer has been implemented in Prolog. Numerous examples are evaluated using the analyzer, including readers and writers, gas station, five dining philosophers, and a layered communications system. The results indicate that analysis time is reasonable for moderate designs in spite of the worst-case complexity of the algorithm  相似文献   

20.
Motivated by recent developments in the semiconductor manufacturing industry, this paper undertakes an analytical investigation of the problem of selecting optimally the deadlock resolution strategy for buffer space allocation in flexibly automated production systems. In the process, it extends the behavioral models for the aforementioned systems currently considered in the literature, to account for probabilistic uncontrollable effects like the requirement for extra finishing steps and/or rework, and it introduces a new deadlock resolution scheme, characterized as randomized deadlock avoidance. The combination of these two extensions brings the considered system behavior(s) to the realm of probabilistic automata, an area of increasing academic interest. For the resulting model, and under the assumption of Markovian timings, it develops an analytical methodology for selecting the optimal deadlock resolution strategy that maximizes the steady-state system throughput, and it demonstrates its effectiveness through application to a "prototype" system configuration. The obtained results provide an interesting analytical expression of the need to assess the gains obtained by the increased concurrency supported by the deadlock detection and recovery strategy versus the productivity losses experienced under this approach due to increased system blocking, and/or additional material handling overheads. It turns out that, for the considered system configuration, the optimal selection scheme switches between detection and recovery and pure deadlock avoidance, every time that the time cost of deadlock recovery, tau(d), crosses a threshold Theta, which is a function of the remaining system behavioral and timing parameters. Beyond its own theoretical merit, this last result raises also the question of whether the policy randomization introduced in this work will ever enhance the performance of any configuration in the considered class of Resource Allocation Systems (RAS); this issue will be investigated in a sequel paper.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号