A volatile-by-default JVM for server applications
A *memory consistency model* (or simply *memory model*) defines the possible values that a shared-memory read may return in a multithreaded programming language. Choosing a memory model involves an inherent performance-programmability tradeoff. The Java language has adopted a *relaxed* (or *weak*) m...
Uložené v:
| Vydané v: | Proceedings of ACM on programming languages Ročník 1; číslo OOPSLA; s. 1 - 25 |
|---|---|
| Hlavní autori: | , , |
| Médium: | Journal Article |
| Jazyk: | English |
| Vydavateľské údaje: |
01.10.2017
|
| ISSN: | 2475-1421, 2475-1421 |
| On-line prístup: | Získať plný text |
| Tagy: |
Pridať tag
Žiadne tagy, Buďte prvý, kto otaguje tento záznam!
|
| Abstract | A *memory consistency model* (or simply *memory model*) defines the possible values that a shared-memory read may return in a multithreaded programming language. Choosing a memory model involves an inherent performance-programmability tradeoff. The Java language has adopted a *relaxed* (or *weak*) memory model that is designed to admit most traditional compiler optimizations and obviate the need for hardware fences on most shared-memory accesses. The downside, however, is that programmers are exposed to a complex and unintuitive semantics and must carefully declare certain variables as `volatile` in order to enforce program orderings that are necessary for proper behavior.
This paper proposes a simpler and stronger memory model for Java through a conceptually small change: *every* variable has `volatile` semantics by default, but the language allows a programmer to tag certain variables, methods, or classes as `relaxed` and provides the current Java semantics for these portions of code. This *volatile-by-default* semantics provides *sequential consistency* (SC) for all programs by default. At the same time, expert programmers retain the freedom to build performance-critical libraries that violate the SC semantics.
At the outset, it is unclear if the `volatile`-by-default semantics is practical for Java, given the cost of memory fences on today's hardware platforms. The core contribution of this paper is to demonstrate, through comprehensive empirical evaluation, that the `volatile`-by-default semantics is arguably acceptable for a predominant use case for Java today -- server-side applications running on Intel x86 architectures. We present VBD-HotSpot, a modification to Oracle's widely used HotSpot JVM that implements the `volatile`-by-default semantics for x86. To our knowledge VBD-HotSpot is the first implementation of SC for Java in the context of a modern JVM. VBD-HotSpot incurs an average overhead versus the baseline HotSpot JVM of 28% for the Da Capo benchmarks, which is significant though perhaps less than commonly assumed. Further, VBD-HotSpot incurs average overheads of 12% and 19% respectively on standard benchmark suites for big-data analytics and machine learning in the widely used Spark framework. |
|---|---|
| AbstractList | A *memory consistency model* (or simply *memory model*) defines the possible values that a shared-memory read may return in a multithreaded programming language. Choosing a memory model involves an inherent performance-programmability tradeoff. The Java language has adopted a *relaxed* (or *weak*) memory model that is designed to admit most traditional compiler optimizations and obviate the need for hardware fences on most shared-memory accesses. The downside, however, is that programmers are exposed to a complex and unintuitive semantics and must carefully declare certain variables as `volatile` in order to enforce program orderings that are necessary for proper behavior.
This paper proposes a simpler and stronger memory model for Java through a conceptually small change: *every* variable has `volatile` semantics by default, but the language allows a programmer to tag certain variables, methods, or classes as `relaxed` and provides the current Java semantics for these portions of code. This *volatile-by-default* semantics provides *sequential consistency* (SC) for all programs by default. At the same time, expert programmers retain the freedom to build performance-critical libraries that violate the SC semantics.
At the outset, it is unclear if the `volatile`-by-default semantics is practical for Java, given the cost of memory fences on today's hardware platforms. The core contribution of this paper is to demonstrate, through comprehensive empirical evaluation, that the `volatile`-by-default semantics is arguably acceptable for a predominant use case for Java today -- server-side applications running on Intel x86 architectures. We present VBD-HotSpot, a modification to Oracle's widely used HotSpot JVM that implements the `volatile`-by-default semantics for x86. To our knowledge VBD-HotSpot is the first implementation of SC for Java in the context of a modern JVM. VBD-HotSpot incurs an average overhead versus the baseline HotSpot JVM of 28% for the Da Capo benchmarks, which is significant though perhaps less than commonly assumed. Further, VBD-HotSpot incurs average overheads of 12% and 19% respectively on standard benchmark suites for big-data analytics and machine learning in the widely used Spark framework. |
| Author | Musuvathi, Madanlal Liu, Lun Millstein, Todd |
| Author_xml | – sequence: 1 givenname: Lun surname: Liu fullname: Liu, Lun organization: University of California at Los Angeles, USA – sequence: 2 givenname: Todd surname: Millstein fullname: Millstein, Todd organization: University of California at Los Angeles, USA – sequence: 3 givenname: Madanlal surname: Musuvathi fullname: Musuvathi, Madanlal organization: Microsoft Research, USA |
| BookMark | eNplj8tOwzAURC1UJEqp-IXsWBl8c-3YWVYVTxWxAbbRrR9SkEkiO1Tq3xOgCwSrmcWZ0cwpm3V95xk7B3EJINUVAqLReMTmpdSKgyxh9sufsGXOb0IIqFEarOcMVsWujzS20fPtnjsf6COOxcPrYxH6VGSfdj4VNAyxtRPVd_mMHQeK2S8PumAvN9fP6zu-ebq9X6823JbKjLwCqm1QAtGTV6TBga40GGGEk0KhK7dOQSVReSLhnDFUS5LeiIBWT7kF4z-9NvU5Jx8a247fE8ZEbWxANF-Xm8Plib_4ww-pfae0_0d-Aqo5VOo |
| CitedBy_id | crossref_primary_10_1145_3462206 crossref_primary_10_1016_j_ecoenv_2022_114403 crossref_primary_10_1134_S0361768821060050 crossref_primary_10_1145_3434328 crossref_primary_10_1145_3276506 crossref_primary_10_1145_3729277 crossref_primary_10_1016_j_cropd_2025_100112 |
| Cites_doi | 10.1145/1787234.1787255 10.1109/ISSRE.2016.48 10.1145/1815961.1815987 10.1145/1375581.1375591 10.1109/SC.2005.43 10.1145/2429069.2429110 10.1147/sj.442.0399 10.1145/1065944.1065947 10.1145/1250662.1250697 10.5555/3241639.3241651 10.1145/1297027.1297033 10.1145/1806596.1806625 10.1145/2807426.2807432 10.1145/2814270.2814313 10.1145/1993498.1993522 10.1145/1755913.1755922 10.1145/42190.42277 10.1145/2851141.2851150 10.5555/2001252.2001255 10.1145/2414729.2414732 10.1145/1950365.1950375 10.1145/1669112.1669131 10.1007/978-3-540-70592-5_3 10.1109/TC.1979.1675439 10.1007/978-3-642-31424-7_36 10.1145/1806596.1806636 10.1145/2934664 10.1145/1040305.1040336 10.1145/2694344.2694379 |
| ContentType | Journal Article |
| DBID | AAYXX CITATION |
| DOI | 10.1145/3133873 |
| DatabaseName | CrossRef |
| DatabaseTitle | CrossRef |
| DatabaseTitleList | CrossRef |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Computer Science |
| EISSN | 2475-1421 |
| EndPage | 25 |
| ExternalDocumentID | 10_1145_3133873 |
| GroupedDBID | AAKMM AAYFX AAYXX ACM AEFXT AEJOY AIKLT AKRVB ALMA_UNASSIGNED_HOLDINGS CITATION EBS GUFHI LHSKQ M~E OK1 ROL |
| ID | FETCH-LOGICAL-c258t-61a9cf5033eae5a71d176718080d4053d2bd516435eaa0dd88a94a4e80f3c7503 |
| ISICitedReferencesCount | 6 |
| ISICitedReferencesURI | http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=000688014000005&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| ISSN | 2475-1421 |
| IngestDate | Tue Nov 18 21:03:42 EST 2025 Sat Nov 29 07:49:00 EST 2025 |
| IsDoiOpenAccess | false |
| IsOpenAccess | true |
| IsPeerReviewed | true |
| IsScholarly | true |
| Issue | OOPSLA |
| Language | English |
| LinkModel | OpenURL |
| MergedId | FETCHMERGED-LOGICAL-c258t-61a9cf5033eae5a71d176718080d4053d2bd516435eaa0dd88a94a4e80f3c7503 |
| OpenAccessLink | https://dl.acm.org/doi/pdf/10.1145/3133873 |
| PageCount | 25 |
| ParticipantIDs | crossref_citationtrail_10_1145_3133873 crossref_primary_10_1145_3133873 |
| PublicationCentury | 2000 |
| PublicationDate | 2017-10-01 |
| PublicationDateYYYYMMDD | 2017-10-01 |
| PublicationDate_xml | – month: 10 year: 2017 text: 2017-10-01 day: 01 |
| PublicationDecade | 2010 |
| PublicationTitle | Proceedings of ACM on programming languages |
| PublicationYear | 2017 |
| References | Bacon D. (e_1_2_1_7_1) 2017 Douglas (e_1_2_1_38_1) 1997 Blackburn S. M. (e_1_2_1_8_1) Adve S. V. (e_1_2_1_2_1) e_1_2_1_42_1 e_1_2_1_41_1 e_1_2_1_40_1 e_1_2_1_23_1 e_1_2_1_24_1 e_1_2_1_45_1 e_1_2_1_43_1 Singh Abhayendra (e_1_2_1_44_1) e_1_2_1_27_1 e_1_2_1_25_1 e_1_2_1_48_1 e_1_2_1_26_1 Machine Java Virtual (e_1_2_1_20_1) 2017 Marino Daniel (e_1_2_1_28_1) e_1_2_1_29_1 Gharachorloo K. (e_1_2_1_18_1) Kaiser Jan-Oliver (e_1_2_1_22_1) Vollmer Michael (e_1_2_1_47_1) J. (e_1_2_1_12_1) (e_1_2_1_6_1) 2017; 13 Cenciarelli Pietro (e_1_2_1_13_1) 2007; 4421 e_1_2_1_31_1 e_1_2_1_30_1 e_1_2_1_5_1 e_1_2_1_3_1 e_1_2_1_34_1 e_1_2_1_1_1 e_1_2_1_10_1 (e_1_2_1_21_1) 2017 e_1_2_1_33_1 e_1_2_1_11_1 e_1_2_1_16_1 e_1_2_1_39_1 J (e_1_2_1_46_1) 2017 e_1_2_1_17_1 Meng Xiangrui (e_1_2_1_32_1) 2015 e_1_2_1_14_1 e_1_2_1_37_1 e_1_2_1_15_1 e_1_2_1_36_1 Owens Scott (e_1_2_1_35_1) 2009; 5674 e_1_2_1_9_1 Alglave Jade (e_1_2_1_4_1) e_1_2_1_19_1 |
| References_xml | – ident: e_1_2_1_1_1 doi: 10.1145/1787234.1787255 – volume-title: MLlib: Machine Learning in Apache Spark. CoRR abs/1505.06807 year: 2015 ident: e_1_2_1_32_1 – volume: 4421 volume-title: 16th European Symposium on Programming (Lecture Notes in Computer Science), Rocco De Nicola (Ed.) year: 2007 ident: e_1_2_1_13_1 – volume-title: Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications. ACM Press ident: e_1_2_1_8_1 – ident: e_1_2_1_19_1 doi: 10.1109/ISSRE.2016.48 – volume-title: https://docs.oracle.com/javase/specs/jvms/se8/html year: 2017 ident: e_1_2_1_20_1 – ident: e_1_2_1_25_1 doi: 10.1145/1815961.1815987 – ident: e_1_2_1_11_1 doi: 10.1145/1375581.1375591 – ident: e_1_2_1_23_1 doi: 10.1109/SC.2005.43 – volume-title: Proc. of the International Conference on Parallel Processing. 355–364 ident: e_1_2_1_18_1 – volume-title: Proc. of the 17th Annual International Symposium on Computer Architecture. ACM, 2–14 ident: e_1_2_1_2_1 – volume-title: Proceedings of the 22Nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’17) ident: e_1_2_1_47_1 – volume-title: Do not publish partially initialized objects. Accessed year: 2017 ident: e_1_2_1_46_1 – ident: e_1_2_1_15_1 doi: 10.1145/2429069.2429110 – ident: e_1_2_1_5_1 doi: 10.1147/sj.442.0399 – volume-title: Accessed year: 2017 ident: e_1_2_1_7_1 – volume: 13 start-page: 1 issue: 2 year: 2017 ident: e_1_2_1_6_1 article-title: ARM Cortex-A Series Programmer’s Guide for ARMv8-A Version: 1.0 publication-title: Section – volume: 5674 volume-title: 22nd International Conference, TPHOLs 2009 (Lecture Notes in Computer Science), Stefan Berghofer, Tobias Nipkow, Christian Urban, and Makarius Wenzel (Eds.) year: 2009 ident: e_1_2_1_35_1 – ident: e_1_2_1_45_1 doi: 10.1145/1065944.1065947 – volume-title: 31st European Conference on Object-Oriented Programming (ECOOP 2017) (Leibniz International Proceedings in Informatics (LIPIcs)), Peter Müller (Ed.) ident: e_1_2_1_22_1 – ident: e_1_2_1_14_1 doi: 10.1145/1250662.1250697 – ident: e_1_2_1_34_1 doi: 10.5555/3241639.3241651 – volume-title: Proceedings of the Workshop on Memory Systems Performance and Correctness (MSPC ’14) ident: e_1_2_1_12_1 – ident: e_1_2_1_17_1 doi: 10.1145/1297027.1297033 – ident: e_1_2_1_16_1 doi: 10.1145/1806596.1806625 – ident: e_1_2_1_40_1 doi: 10.1145/2807426.2807432 – ident: e_1_2_1_31_1 doi: 10.1145/2814270.2814313 – volume-title: Schmidt and Tim Harrison year: 1997 ident: e_1_2_1_38_1 – ident: e_1_2_1_30_1 doi: 10.1145/1993498.1993522 – ident: e_1_2_1_36_1 doi: 10.1145/1755913.1755922 – ident: e_1_2_1_42_1 doi: 10.1145/42190.42277 – ident: e_1_2_1_37_1 doi: 10.1145/2851141.2851150 – volume-title: Proc. of the 39th Annual International Symposium on Computer Architecture. 524 –535 ident: e_1_2_1_44_1 – ident: e_1_2_1_9_1 doi: 10.5555/2001252.2001255 – ident: e_1_2_1_10_1 doi: 10.1145/2414729.2414732 – volume-title: Computer Aided Verification - 26th International Conference. 508–524. ident: e_1_2_1_4_1 – volume-title: JSR-133 Cookbook for Compiler Writers. Accessed year: 2017 ident: e_1_2_1_21_1 – ident: e_1_2_1_43_1 doi: 10.1145/1950365.1950375 – ident: e_1_2_1_3_1 doi: 10.1145/1669112.1669131 – ident: e_1_2_1_41_1 doi: 10.1007/978-3-540-70592-5_3 – ident: e_1_2_1_33_1 – ident: e_1_2_1_24_1 doi: 10.1109/TC.1979.1675439 – ident: e_1_2_1_26_1 doi: 10.1007/978-3-642-31424-7_36 – ident: e_1_2_1_29_1 doi: 10.1145/1806596.1806636 – ident: e_1_2_1_48_1 doi: 10.1145/2934664 – volume-title: 1st Summit on Advances in Programming Languages (SNAPL 2015) (Leibniz International Proceedings in Informatics (LIPIcs)), Thomas Ball, Rastislav Bodik, Shriram Krishnamurthi, Benjamin S ident: e_1_2_1_28_1 – ident: e_1_2_1_27_1 doi: 10.1145/1040305.1040336 – ident: e_1_2_1_39_1 doi: 10.1145/2694344.2694379 |
| SSID | ssj0001934839 |
| Score | 2.0676014 |
| Snippet | A *memory consistency model* (or simply *memory model*) defines the possible values that a shared-memory read may return in a multithreaded programming... |
| SourceID | crossref |
| SourceType | Enrichment Source Index Database |
| StartPage | 1 |
| Title | A volatile-by-default JVM for server applications |
| Volume | 1 |
| WOSCitedRecordID | wos000688014000005&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| journalDatabaseRights | – providerCode: PRVHPJ databaseName: ROAD: Directory of Open Access Scholarly Resources customDbUrl: eissn: 2475-1421 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0001934839 issn: 2475-1421 databaseCode: M~E dateStart: 20170101 isFulltext: true titleUrlDefault: https://road.issn.org providerName: ISSN International Centre |
| link | http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV3NaxQxFA9aPXixfmK1Sg7iZYnORzJJjkNpEem2C67S25KZl4HCOi27O6Ve_Nt9mWSmcS2oBy9DCMkwmd_jfeV9EPK2StM6MbpgUOiM8UYlTIEWDCQgDVXCVhXvm03IkxN1dqZnIdx23bcTkG2rrq_15X-FGucQbJc6-w9wjy_FCRwj6PhE2PH5V8CXE-Q4OF5aVn1nYBvTLTeTT1-nfUShc8La1SS-t47109koz_oQj_Jg6m4TQhDXN-dWGBycoy5-fN71xn03kpnLL1wPXTTnFwA3qK67Kxfu6LOEwLTLcJrgd0BZNkSwBfaUcSlYyn1-83t7y9zAXyMyOj2dfT4uI4aZRpLXZ0D_ztO5K3-RO2Padz35tWr2ljQbYwx9xrVYhI13yb1MCu149_RH5IbTOVd9v7nx231qtdv7IeyNdJZI-Zg_Ig-D1UBLj_Zjcse2T8ju0JGDBgb9lKQlvQV8iuBTBJ968GkM_jPy5ehwfvCRhaYYrM6E2qCpb3TduMtna6wwMoVUFqhgoOYPqHznkFUg0AbOhTUmAVDKaG64VUmT1-7S-jnZaS9a-4JQUTccCoEcWQCvLK5E0ZgCVFJVXCbFHnk3HHtRh4rxrnHJcrH1b_cIHRde-iIp20te_nnJK_Lghs72yc5m1dnX5H59tTlfr970sP0Eo65XXQ |
| linkProvider | ISSN International Centre |
| openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=A+volatile-by-default+JVM+for+server+applications&rft.jtitle=Proceedings+of+ACM+on+programming+languages&rft.au=Liu%2C+Lun&rft.au=Millstein%2C+Todd&rft.au=Musuvathi%2C+Madanlal&rft.date=2017-10-01&rft.issn=2475-1421&rft.eissn=2475-1421&rft.volume=1&rft.issue=OOPSLA&rft.spage=1&rft.epage=25&rft_id=info:doi/10.1145%2F3133873&rft.externalDBID=n%2Fa&rft.externalDocID=10_1145_3133873 |
| thumbnail_l | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=2475-1421&client=summon |
| thumbnail_m | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=2475-1421&client=summon |
| thumbnail_s | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=2475-1421&client=summon |