首页> 外文学位 >Contract-based Synchronization of Multi-threaded Java Programs.
【24h】

Contract-based Synchronization of Multi-threaded Java Programs.

机译:基于合同的多线程Java程序同步。

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

摘要

Today, most new software products use concurrency in some capacity. However, the expressive power afforded by the use of concurrency comes at the expense of increased complexity. Without proper synchronization, concurrent access to shared objects can lead to race conditions, and incorrect synchronization logic can lead to starvation or deadlock. Moreover, concurrency confounds the development of reusable software modules because code implementing an application's synchronization logic tends to be tightly interleaved with the "functional" code. Interleaving complicates program understanding and maintenance, producing brittle applications.;Contract-based models of synchronization, such as the Synchronization Units Model (Szumo), attempt to address these problems by: (1) expressing synchronization concerns in declarative synchronization contracts to separate them from functional code; and (2) using a runtime system that dynamically interprets and "negotiates" the contracts, thereby automatically synchronizing threads. However, this approach requires a special compiler and runtime system, making it difficult to integrate Szumo into mainstream object-oriented programming languages or conduct empirical studies to understand software engineering tradeoffs when using Szumo or hand coding synchronization.;This thesis investigates two "lighter-weight" approaches for integrating a contract-based synchronization model with a mainstream object-oriented programming language. The first approach works with any multi-threaded Java program. In this approach, an application programmer adds special Java annotations to a class whose methods contain only functional code. A compiler plugin generates synchronization code from the annotated program based on synchronization concerns declared in the annotations; the generated synchronization code is added to the annotated program, which then executes in a standard JVM. The second approach targets IP telecommunication (IPT) services that are deployed to a SIP servlets container. It makes use of a synchronization middleware. Instead of embedding synchronization code in the message handlers that implement a service, a programmer provides a synchronization contract that is loaded when the service is deployed to a container running our middleware. The middleware intercepts messages that a container routes to the service and consults the contract to determine when to schedule the message handler thread.;Contributions of work reported in this thesis include: (1) Development of a generative approach that permits use of synchronization annotations with a mainstream object-oriented language. (2) Development of a middleware approach that permits use of contract-based synchronization with a standard execution platform for services. (3) Demonstration that contract-based synchronization enables packaging the implementation of synchronization as an OTS component, which can be seamlessly swapped with one that implements a different protocol, e.g., to tune performance. (4) Presentation of results of case studies with both approaches.;The work described in this thesis was performed in collaboration with AT&T Research Labs and Oracle Research Labs.
机译:如今,大多数新软件产品都以某种方式使用并发。但是,使用并发提供的表达能力是以增加复杂性为代价的。如果没有正确的同步,对共享对象的并发访问会导致争用情况,而错误的同步逻辑会导致饥饿或死锁。而且,并发使可重用软件模块的开发混乱,因为实现应用程序同步逻辑的代码往往与“功能”代码紧密地交织在一起。交织使程序的理解和维护复杂化,产生脆弱的应用程序。基于合同的同步模型,例如同步单元模型(Szumo),试图通过以下方法解决这些问题:(1)在声明性同步契约中表达同步问题,以将它们与功能代码; (2)使用运行时系统来动态解释和“协商”合同,从而自动同步线程。但是,这种方法需要特殊的编译器和运行时系统,因此很难将Szumo集成到主流的面向对象的编程语言中,也很难进行实证研究来理解使用Szumo或手工编码同步时的软件工程权衡。加权”方法,将基于合同的同步模型与主流的面向对象的编程语言集成在一起。第一种方法适用于任何多线程Java程序。在这种方法中,应用程序程序员将特殊的Java注释添加到其方法仅包含功能代码的类中。编译器插件根据注释中声明的同步问题从带注释的程序生成同步代码;生成的同步代码将添加到带注释的程序中,然后在标准JVM中执行。第二种方法针对部署到SIP Servlet容器的IP电信(IPT)服务。它利用了同步中间件。程序员没有将同步代码嵌入实现服务的消息处理程序中,而是提供了同步契约,该契约在将服务部署到运行我们的中间件的容器时加载。中间件拦截容器路由到服务的消息,并咨询合同以确定何时安排消息处理程序线程。本论文中报告的工作贡献包括:(1)开发一种生成方法,该方法允许使用与主流的面向对象语言。 (2)开发一种中间件方法,该方法允许与基于服务的标准执行平台一起使用基于合同的同步。 (3)证明基于合同的同步可以将同步的实现打包为OTS组件,可以与实现不同协议(例如,调整性能)的OTS组件无缝交换。 (4)用这两种方法展示案例研究的结果。本论文中描述的工作是与AT&T研究实验室和Oracle研究实验室合作完成的。

著录项

  • 作者

    Huang, Yi.;

  • 作者单位

    Michigan State University.;

  • 授予单位 Michigan State University.;
  • 学科 Computer Science.
  • 学位 Ph.D.
  • 年度 2011
  • 页码 153 p.
  • 总页数 153
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号