首页> 外文会议>Reliable software technologies-Ada-Europe 2009 >Weak Fairness Semantic Drawbacks in Java Multithreading
【24h】

Weak Fairness Semantic Drawbacks in Java Multithreading

机译:Java多线程中的弱公平语义缺陷

获取原文
获取原文并翻译 | 示例

摘要

With the development of embedded and mobile systems, Java is being widely used for application programs and is also considered for implementing systems kernel or application platforms. It is the aim of this paper to exemplify some subtle programming errors that may result from the process queuing and awaking policy, which corresponds to a weak fairness semantic and which has been chosen for implementing the monitor concept in this language. Two examples show some subtle deadlocks resulting from this policy. The first example deals with process synchronization: processes seeking after partners for a peer-to-peer communication call a symmetrical rendezvous server. The second example concerns resource sharing according to a solution of the dining philosophers paradigm. In this example, several implementations are presented, the last ones aiming to provide deterministic process awakening. All these examples have been validated and simulated and this allows comparing their concurrency complexity and effectiveness. Our conclusion is, first, that the use of Java for multithreading programming necessitates sometimes additional shielding code for developing correct programs and, second, that a good acquaintance with several styles of concurrent programming helps designing more robust Java solutions, once the choice of the implementation language is irrevocable.
机译:随着嵌入式和移动系统的发展,Java被广泛用于应用程序,并且也被认为用于实现系统内核或应用程序平台。本文的目的是举例说明一些可能由进程排队和唤醒策略引起的微妙的编程错误,这些错误对应于弱的公平语义,并已被选择用于以这种语言实现监控器概念。有两个示例显示了此策略导致的一些微妙的僵局。第一个示例涉及流程同步:流程在寻找伙伴以进行对等通信时调用对称的集合服务器。第二个示例根据餐饮哲学家范式的解决方案涉及资源共享。在此示例中,提出了几种实现,最后一种旨在提供确定性的过程唤醒。所有这些示例已经过验证和模拟,因此可以比较它们的并发复杂性和有效性。我们的结论是,首先,使用Java进行多线程编程有时需要额外的屏蔽代码来开发正确的程序;其次,一旦选择实现,对几种并发编程样式的熟悉将有助于设计更健壮的Java解决方案。语言是不可撤销的。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号