• DocumentCode
    533638
  • Title

    Safe Typing for Transactional vs. Lock-Based Concurrency in Multi-threaded Java

  • Author

    Tran, Thi Mai Thuong ; Owe, Olaf ; Steffen, Martin

  • Author_Institution
    Dept. of Inf., Univ. of Oslo, Oslo, Norway
  • fYear
    2010
  • fDate
    7-9 Oct. 2010
  • Firstpage
    188
  • Lastpage
    193
  • Abstract
    Many concurrency models have been developed for high-level programming languages such as Java. A trend here is towards more flexible concurrency control protocols, going beyond the original Java multi-threading treatment based on lexically-scoped concurrency control mechanism. Two proposals supporting flexible, non-lexical concurrency control are the lock-handling via the Lock-classes in Java5 and Transactional Featherweight Java (TFJ), an extension of Featherweight Java by transactions. Even if these two take quite different approaches towards dealing with concurrency - “pessimistic” or lock-based vs. “optimistic” or based on transactions - the added flexibility of non-lexical use of the corresponding concurrency operators comes at a similar price: improper usage leads to run-time exceptions and unwanted behavior. This is in contrast with the more disciplined use under a lexically scoped regime, where each entrance to a critical region is syntactically accompanied by a corresponding exit (as e.g. with traditional synchronized methods or as with so-called atomic blocks). To assure safe use of locking, resp. transactions in these settings, we present in this paper abstractions in the form of two static type and effect systems, which make sure that for instance, no lock is released by a thread which does not hold it, resp., that no commit is executed outside any transaction. We furthermore compare the two mentioned approaches to concurrency control on the basis of these type abstractions.
  • Keywords
    Java; concurrency control; multi-threading; transaction processing; abstractions; concurrency control protocols; high-level programming languages; lock-handling; multi-threaded Java; transactional featherweight Java; Calculus; Concurrency control; Concurrent computing; Instruction sets; Java; Monitoring; Proposals;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Knowledge and Systems Engineering (KSE), 2010 Second International Conference on
  • Conference_Location
    Hanoi
  • Print_ISBN
    978-1-4244-8334-1
  • Type

    conf

  • DOI
    10.1109/KSE.2010.9
  • Filename
    5632064