首页> 外文期刊>Journal of Logic and Algebraic Programming >Safe locking for multi-threaded Java with exceptions
【24h】

Safe locking for multi-threaded Java with exceptions

机译:安全锁定带异常的多线程Java

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

摘要

There are many mechanisms for concurrency control in high-level programming languages. In Java, the original mechanism for concurrency control, based on synchronized blocks, is lexically scoped. For more flexible control, Java 5 introduced non-lexical lock primitives on re-entrant locks. These operators may lead to run-time errors and unwanted behavior; e.g., taking a lock without releasing it, which could lead to a deadlock, or trying to release a lock without owning it. This paper develops a static type and effect system to prevent the mentioned lock errors for a formal, object-oriented calculus which supports non-lexical lock handling and exceptions. Based on an operational semantics, we prove soundness of the effect type analysis. Challenges in the design of the effect type system are dynamic creation of threads, objects, and especially of locks, aliasing of lock references, passing of lock references between threads, and reentrant locks as found in Java. Furthermore, the exception handling mechanism complicates the control-flow and thus the analysis.
机译:高级编程语言中有许多用于并发控制的机制。在Java中,基于同步块的并发控制的原始机制在词法上具有作用域。为了更灵活地控制,Java 5在重入锁上引入了非词法锁原语。这些运算符可能会导致运行时错误和不良行为;例如,在没有释放锁的情况下获得锁,这可能导致死锁,或者试图在不拥有锁的情况下释放锁。本文开发了一个静态类型和效果系统,以针对支持非词法锁处理和异常的形式化,面向对象的演算来防止上述锁错误。基于操作语义,我们证明了效果类型分析的合理性。效果类型系统的设计挑战是动态创建线程,对象(尤其是锁),创建锁引用的别名,在线程之间传递锁引用以及Java中可重入的锁。此外,异常处理机制使控制流和分析变得复杂。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号