The document discusses thread synchronization in Java. It covers Java threads, synchronization mechanisms like monitors and locks, cooperation between threads using wait() and notify(), and mutual exclusion with synchronized blocks and methods. It also describes lightweight locking techniques used in Hotspot like biased locking, and thin locks and lock reservation in IBM's JVM.
Java Performance Fundamental 세미나 교재입니다
2장은 JVM의 메모리 구조인 Runtime Data Areas에 대한 설명을 하고 있습니다. 크게는4개의 모듈로 나누어 지는 Runtime Data Areas를 부분 별로 자세히 다루고 있습니다. 그리고 나서 우리가 프로그램을 수행할 때 Runtime Data Areas에서는 어떻게 데이터들이 움직이는 지를 간단한 예제를 통해 알아보고자 합니다.
* Runtime Data Areas의 구조
* PC Register
* Java Virtual Machine Stacks
* Native Method Stack
* Method Area
* Java Heap
* Runtime Data Areas Simulation
Java Performance Fundamental 세미나 교재입니다. 3장은 Garbage Collection에 대해 설명하고 있습니다. 먼저 JVM에서 사용하는 Garbage Collection 뿐만 아니라 일반적인 Garbage Collection의 Algorithm을 상세히 알아봅니다. 그 후 Hotspot JVM의 Heap구조와 Garbage Collector를 설명하고 Generation별로 어떻게 동작하는 지에 대해 설명합니다. 이어 IBM JVM에 대한 Heap 구조와 Garbage Collector에 대해서도 설명합니다.
* Garbage Collection 이란?
* Garbage Collection 의 대상
* Garbage Collection 의 기본 Algorithm
* Hotspot JVM의 Garbage Collection
o Serial Collector
o Incremental Collector
o Parallel Collector
o CMS Collector
o Parallel Compaction Collector
o Garbage First Collector
* IBM JVM의 Garbage Collection
o Optimize for Throughput Collector
o Optimize for Pause Time Collector
o Generational Concurrent Collector
o Subpool Collector
Java Performance Fundamental 세미나 교재입니다. 4장은 Class Loader를 다루고 있습니다. Class Loader란 무엇이고 Class가 어떻게 JVM안으로 들어와 메모리의 일부로 동작하는지에 대해 상세하게 설명하고 있습니다. 그리고 Java 5에서 새로 소개된 Class Sharing에 대해서도 다루고 있습니다.
* Class Loader
o Namespace
o Class Loader Delegation Model
o Class Sharing
* Class Loader Work
o Loading
o Linking
o Initialization
Java Performance Fundamental 세미나 교재입니다. 5장은 Execution Engine에 대한 내용을 다루고 있습니다. Class파일에 저장되어 있는 Bytecode를 해석하는 방법을 JIT Compiler와 Hotspot Compiler의 동작과정을 통해 자세히 알아봅니다.
* Execution Engine
* IBM JIT Compiler
* Hotspot Compiler
Java Performance Fundamental 세미나 교재입니다. 7장은 처음에는 JDBC에 대한 얘기로 시작하고 있습니다. 그리고 Oracle JDBC Driver에 대한 설명을 진행하고 여러 Oracle JDBC Driver 중 성능의 차이를 테스트를 통해 알아보게 됩니다. 그리고 Oracle에서 SQL이 수행될 때 Oracle 내부에서는 어떠한 일이 벌어지는지를 살펴보고, Java에서 SQL을 수행할 때와 어떤 차이가 있는지를 테스트를 통해 비교해 본다. 그리고 나서 JDBC에서 제공하는 여러 튜닝 기능이 어떻게 성능에 영향을 주게 되는지를 테스트합니다. 이를 통해 이 기능들이 어느 부분에 얼마만큼의 성능 개선을 하게 되는 지를 실감할 수 있게 됩니다.
* JDBC Overview
* Oracle JDBC Driver
* Java SQL Execution
* Java SQL Performance
Srihitha Technologies provides Java Training in Ameerpet by real time Experts. For more information about Java training in Ameerpet call 9394799566 / 9290641808.
Srihitha Technologies provides J2EE Online Training in Ameerpet by real time Experts. For more information about J2EE online training in Ameerpet call 9885144200 / 9394799566.
Java Performance Fundamental 세미나 교재입니다
2장은 JVM의 메모리 구조인 Runtime Data Areas에 대한 설명을 하고 있습니다. 크게는4개의 모듈로 나누어 지는 Runtime Data Areas를 부분 별로 자세히 다루고 있습니다. 그리고 나서 우리가 프로그램을 수행할 때 Runtime Data Areas에서는 어떻게 데이터들이 움직이는 지를 간단한 예제를 통해 알아보고자 합니다.
* Runtime Data Areas의 구조
* PC Register
* Java Virtual Machine Stacks
* Native Method Stack
* Method Area
* Java Heap
* Runtime Data Areas Simulation
Java Performance Fundamental 세미나 교재입니다. 3장은 Garbage Collection에 대해 설명하고 있습니다. 먼저 JVM에서 사용하는 Garbage Collection 뿐만 아니라 일반적인 Garbage Collection의 Algorithm을 상세히 알아봅니다. 그 후 Hotspot JVM의 Heap구조와 Garbage Collector를 설명하고 Generation별로 어떻게 동작하는 지에 대해 설명합니다. 이어 IBM JVM에 대한 Heap 구조와 Garbage Collector에 대해서도 설명합니다.
* Garbage Collection 이란?
* Garbage Collection 의 대상
* Garbage Collection 의 기본 Algorithm
* Hotspot JVM의 Garbage Collection
o Serial Collector
o Incremental Collector
o Parallel Collector
o CMS Collector
o Parallel Compaction Collector
o Garbage First Collector
* IBM JVM의 Garbage Collection
o Optimize for Throughput Collector
o Optimize for Pause Time Collector
o Generational Concurrent Collector
o Subpool Collector
Java Performance Fundamental 세미나 교재입니다. 4장은 Class Loader를 다루고 있습니다. Class Loader란 무엇이고 Class가 어떻게 JVM안으로 들어와 메모리의 일부로 동작하는지에 대해 상세하게 설명하고 있습니다. 그리고 Java 5에서 새로 소개된 Class Sharing에 대해서도 다루고 있습니다.
* Class Loader
o Namespace
o Class Loader Delegation Model
o Class Sharing
* Class Loader Work
o Loading
o Linking
o Initialization
Java Performance Fundamental 세미나 교재입니다. 5장은 Execution Engine에 대한 내용을 다루고 있습니다. Class파일에 저장되어 있는 Bytecode를 해석하는 방법을 JIT Compiler와 Hotspot Compiler의 동작과정을 통해 자세히 알아봅니다.
* Execution Engine
* IBM JIT Compiler
* Hotspot Compiler
Java Performance Fundamental 세미나 교재입니다. 7장은 처음에는 JDBC에 대한 얘기로 시작하고 있습니다. 그리고 Oracle JDBC Driver에 대한 설명을 진행하고 여러 Oracle JDBC Driver 중 성능의 차이를 테스트를 통해 알아보게 됩니다. 그리고 Oracle에서 SQL이 수행될 때 Oracle 내부에서는 어떠한 일이 벌어지는지를 살펴보고, Java에서 SQL을 수행할 때와 어떤 차이가 있는지를 테스트를 통해 비교해 본다. 그리고 나서 JDBC에서 제공하는 여러 튜닝 기능이 어떻게 성능에 영향을 주게 되는지를 테스트합니다. 이를 통해 이 기능들이 어느 부분에 얼마만큼의 성능 개선을 하게 되는 지를 실감할 수 있게 됩니다.
* JDBC Overview
* Oracle JDBC Driver
* Java SQL Execution
* Java SQL Performance
Srihitha Technologies provides Java Training in Ameerpet by real time Experts. For more information about Java training in Ameerpet call 9394799566 / 9290641808.
Srihitha Technologies provides J2EE Online Training in Ameerpet by real time Experts. For more information about J2EE online training in Ameerpet call 9885144200 / 9394799566.
Srihitha Technologies provides Java Online Training in Ameerpet by real time Experts. For more information about Java online training in Ameerpet call 9885144200 / 9394799566.
Here is the presentation I did at Trifork GeekNights, January 12+13.
The talk is about my journey into Erlang land, how we need to start thinking about threads and processes in a new way, and some aspects of the work I have done towards implementing Erlang on the JVM platform.
Follow-up discussion either at my blog: http://javalimit.com/ or at http://groups.google.com/group/erjang
Finally Java SE 7 is GA and you can start using it. This talk will cover the most important new features of the language and the virtual machine. It will also cover some features that did not make it in to the SE 7 release. Finally we will discuss current state of Java as an ecosystem and my analysis and hopes for the future.
The session details are accessible over here: http://www.eventreg.com/cc250/sessionDetail.jsp?SID=314613
Session abstract
Nowadays, every platform considers having the "OSGi supported" checkbox ticked and offers "easy" and "smooth" migration from the classical Java EE world to the new "modular" future. In spite of the multiple guidelines and best practices, migrating from a monolithic Java EE application to OSGi remains a pain and reveals a number of hidden and time-consuming pitfalls and hurdles. The session will guide you through the usual problems that every project faces on its way to holy modularity, providing helpful tips and tricks on how to quickly find your way through the maze of NoClassDeffFound, ClassCast, and other OSGi-specific errors.
It is easy to monitor the performance of JVM if one knows how GC and Threads work in JVM. This presentation throws light on Collector types, HotSpot Collection Algorithms, Thread Monitoring, Method Profiling and Heap Profiling
Ingenious techno Solution offers expertise guidance on
Complete Hands on Lab training on the following domain
JAVA
.NET
EMBEDDED SYSTEMS
ROBOTICS
NS2
MECHANICAL
MATLAB etc
for further details contact us:
enquiry@ingenioustech.in
044-42046028 or 8428302179.
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
JavaOne 2016
This session provides 50 best practices for Java EE 7, with examples. The best practices covered focus primarily on JPA, CDI, JAX-WS, and JAX-RS. In addition, topics involving testing and deployment are covered. This presentation points out where best practices have changed, common misconceptions, and antipatterns that should be avoided. This is a fast-paced presentation with many code samples.
빅데이터를 데이터 그 자체로 인식하는 오해가 존재한다. 그 이유는 아마도 빅데이터를 설명할 때 데이터의 속성을 가지고 설명하기 때문이라 생각한다.
하지만 빅데이터로 분류할 수 있는 데이터는 사실상 존재하지 않는다. 크다는 것, 비정형이라는 것 모두 상대적인 개념이기 때문이다.
빅데이터는 데이터 그 자체가 아니라 데이터를 가지고 무엇을 할 수 있는가에 초점이 맞추어져야 한다. 데이터를 기반하여 앎의 기초를 다지고 데이터로 자신의 생각을 증명하며 데이터에서 못 보던 무언가를 보는 것 이러한 것들이 빅데이터라 생각한다.
빅데이터 Myth 첫 번째로 이러한 오해를 깨고자 한다.
IoT, Cloud, Big Data가 데이터로 엮여 Data Innovation를 향하고 있고, In-Memory는 혁신을 위한 촉매제로 작용한다. 알티베이스는 In-Memory DNA를 지닌 유일한 DBMS업체로 실시간 세상을 연결하여 Data Innovation의 밑거름이 되고자 한다.
Srihitha Technologies provides Java Online Training in Ameerpet by real time Experts. For more information about Java online training in Ameerpet call 9885144200 / 9394799566.
Here is the presentation I did at Trifork GeekNights, January 12+13.
The talk is about my journey into Erlang land, how we need to start thinking about threads and processes in a new way, and some aspects of the work I have done towards implementing Erlang on the JVM platform.
Follow-up discussion either at my blog: http://javalimit.com/ or at http://groups.google.com/group/erjang
Finally Java SE 7 is GA and you can start using it. This talk will cover the most important new features of the language and the virtual machine. It will also cover some features that did not make it in to the SE 7 release. Finally we will discuss current state of Java as an ecosystem and my analysis and hopes for the future.
The session details are accessible over here: http://www.eventreg.com/cc250/sessionDetail.jsp?SID=314613
Session abstract
Nowadays, every platform considers having the "OSGi supported" checkbox ticked and offers "easy" and "smooth" migration from the classical Java EE world to the new "modular" future. In spite of the multiple guidelines and best practices, migrating from a monolithic Java EE application to OSGi remains a pain and reveals a number of hidden and time-consuming pitfalls and hurdles. The session will guide you through the usual problems that every project faces on its way to holy modularity, providing helpful tips and tricks on how to quickly find your way through the maze of NoClassDeffFound, ClassCast, and other OSGi-specific errors.
It is easy to monitor the performance of JVM if one knows how GC and Threads work in JVM. This presentation throws light on Collector types, HotSpot Collection Algorithms, Thread Monitoring, Method Profiling and Heap Profiling
Ingenious techno Solution offers expertise guidance on
Complete Hands on Lab training on the following domain
JAVA
.NET
EMBEDDED SYSTEMS
ROBOTICS
NS2
MECHANICAL
MATLAB etc
for further details contact us:
enquiry@ingenioustech.in
044-42046028 or 8428302179.
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
JavaOne 2016
This session provides 50 best practices for Java EE 7, with examples. The best practices covered focus primarily on JPA, CDI, JAX-WS, and JAX-RS. In addition, topics involving testing and deployment are covered. This presentation points out where best practices have changed, common misconceptions, and antipatterns that should be avoided. This is a fast-paced presentation with many code samples.
빅데이터를 데이터 그 자체로 인식하는 오해가 존재한다. 그 이유는 아마도 빅데이터를 설명할 때 데이터의 속성을 가지고 설명하기 때문이라 생각한다.
하지만 빅데이터로 분류할 수 있는 데이터는 사실상 존재하지 않는다. 크다는 것, 비정형이라는 것 모두 상대적인 개념이기 때문이다.
빅데이터는 데이터 그 자체가 아니라 데이터를 가지고 무엇을 할 수 있는가에 초점이 맞추어져야 한다. 데이터를 기반하여 앎의 기초를 다지고 데이터로 자신의 생각을 증명하며 데이터에서 못 보던 무언가를 보는 것 이러한 것들이 빅데이터라 생각한다.
빅데이터 Myth 첫 번째로 이러한 오해를 깨고자 한다.
IoT, Cloud, Big Data가 데이터로 엮여 Data Innovation를 향하고 있고, In-Memory는 혁신을 위한 촉매제로 작용한다. 알티베이스는 In-Memory DNA를 지닌 유일한 DBMS업체로 실시간 세상을 연결하여 Data Innovation의 밑거름이 되고자 한다.
Constructors, Destructors, call in parameterized Constructor, Multiple constructor in a class, Explicit/implicit call, Copy constructor, Dynamic Constructors and call in parameterized Constructor
향후 빅데이터의 주된 소스는 머신데이터가 될 것이다. 머신데이터의 속성은 스트리밍, 실시간이라는 특징을 가진다. 향후 머신데이터는 실시간 빅데이터 솔루션을 통해 우리의 생활로 서서히 스며들 것이다. IoT와 같은 새로운 트렌드에 빅데이터가 어우러지기 위해서도 머신데이터 기반의 실시간 빅데이터 솔루션이 필요하며 이러한 연유로 더욱 각광을 받게 될 것이다.
상용 실시간 빅데이터 솔루션 중 최고의 성능을 자랑하는 로그프레소는 향후 실시간 빅데이터와 머신 데이터에 가장 적합한 솔루션이다.
이 슬라이드는 머신데이터와 로그프레소의 기술을 설명하고 있다.
Napa.js is a multi-threaded JavaScript runtime built on V8. This deck was presented by the project founder and co-author Daiyi Peng in TypeScript meetup (https://www.meetup.com/San-Francisco-TypeScript-Meetup/events/244605380/) on Dec 13, 2017.
Concurrency and Multithreading Demistified - Reversim Summit 2014Haim Yadid
Life as a software engineer is so exciting! Computing power continue to rise exponentially, software demands continue to rise exponentially as well, so far so good. The bad news are that in the last decade the computing power of single threaded application remains almost flat.
If you decide to continue ignoring concurrency and multi-threading the gap between the problems you are able to solve and your hardware capabilities will continue to rise. In this session we will discuss different approaches for taming the concurrency beast, such as shared mutability,shared immutability and isolated mutability actors, STM, etc we will discuss the shortcomings and the dangers of each approach and we will compare different programming languages and how they choose to tackle/ignore concurrency.
Что делает JVM? Компилирует код и выполняет сборку мусора, — скажете вы и будете совершенно правы. Тем не менее, Java приложения могут работать даже при полном отсутсвии JIT и GC.
Виртуальная машина состоит из большого числа компонентов, благодаря которым исполнение Java программ становится возможным. Из доклада вы узнаете, что представляет собой байткод, где лежат переменные, что содержится в class-файлах, кто ловит исключения, насколько дороги JNI методы, как работает синхронизация и многое другое.
Konferencija Javantura Zagreb 2014 by HUJAK
Java 8 JavaScript – Nashorn by Miroslav Rešetar
Java 8 donosi podršku za scripting u JavaScriptu. Engine se zove Nashorn (openjdk.java.net/projects/nashorn) i nasljednik je popularnog Rhino engine-a. Za razliku od starijeg Rhino-a, Nashorn koristi invoke dynamic Java 7 mehanizam što mu omogućava puno bolje performanse. Nashorn je moderni engine, usklađen sa ECMAScript 5.1 standardom. To omogućava uporabu popularnih JavaScript biblioteka iz Java programa što otvara neke sasvim nove načine kako implementiramo naša Java rješenja. Prezentacija ima za cilj upoznati Java developera s mogućnostima integracije JavaScript-a u buduća Java 8 rješenja.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
The Metaverse and AI: how can decision-makers harness the Metaverse for their...Jen Stirrup
The Metaverse is popularized in science fiction, and now it is becoming closer to being a part of our daily lives through the use of social media and shopping companies. How can businesses survive in a world where Artificial Intelligence is becoming the present as well as the future of technology, and how does the Metaverse fit into business strategy when futurist ideas are developing into reality at accelerated rates? How do we do this when our data isn't up to scratch? How can we move towards success with our data so we are set up for the Metaverse when it arrives?
How can you help your company evolve, adapt, and succeed using Artificial Intelligence and the Metaverse to stay ahead of the competition? What are the potential issues, complications, and benefits that these technologies could bring to us and our organizations? In this session, Jen Stirrup will explain how to start thinking about these technologies as an organisation.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
14. Java Performance
14
Java Performance Fundamental | twitter @novathinker
artdb@ex-em.com | performeister.tistory.com
Hotspot Synchronization
• Light-Weight Lock
– Object Header
• Object Header word Mark Work
Mark Word Hash Code (0) Age Biased Tag
Thread ID, epoch(1)
23 bit 6 bit 1 bit 2 bit
Hash Code (0) Age Biased Tag Biased bit Tag
Thread ID, epoch(1)
0 01 Unlocked
(000) Lock Record Address 0 00 Light-weight locked
(010) Monitor Address 0 10 Heavy-weight locked
0 11 Marked for GC
(011) Forwarding Address 1 01 Biased / Biasable
15. Java Performance
15
Java Performance Fundamental | twitter @novathinker
artdb@ex-em.com | performeister.tistory.com
Hotspot Synchronization
• Light-Weight Lock
– Light-Weight Locking
• Object Header word Mark Work
• Atomic compare-and-swap(CAS) instruction
lock
• CAS thread lock
• CAS heavy weight lock
• Object lock thread stack frame mark
word move (displaced mark )
• Lock Mark Word
16. Java Performance
16
Java Performance Fundamental | twitter @novathinker
artdb@ex-em.com | performeister.tistory.com
Hotspot Synchronization
• Light-Weight Lock
– Light-Weight Locking
Execution Execution
Stack Stack
Locking
Method Method
Activation Activation
Mark word 01 Stack pointer
Lock Displaced hdr Mark word 01
Record Object Object
owner owner
17. Java Performance
17
Java Performance Fundamental | twitter @novathinker
artdb@ex-em.com | performeister.tistory.com
Hotspot Synchronization
• Light-Weight Lock
– Light-Weight Locking
Unlock
Hash Code Age 0 01
Recursive lock
Light weight lock Pointer to lock record 00 Unlock
heavy weight lock Pointer to heavyweight 10
26. Java Performance
Java Performance Fundamental | twitter @novathinker
IBM JVM Synchronization artdb@ex-em.com | performeister.tistory.com 26
• Thin Lock
– Object Layout for Thin Lock
• Lock Word
Garbage Collection
(2bits) bit (2bits)
Pinned
Object Size G P
(double word) Array bit (1bit)
Class pointer or array size
Monitor Shape bit Thread index count
(1bit) S H T A
Monitor index Type
Hash code state (2bits)
Object Data
Hash code
27. Java Performance
Java Performance Fundamental | twitter @novathinker
IBM JVM Synchronization artdb@ex-em.com | performeister.tistory.com27
• Thin Lock
– Object Layout for Thin Lock
• Object Lock Word 24 bit
• Lock Word bit Lock
– Monitor Shape Lock
– 0 Thin lock
– 1 Fat lock
• Thin Lock •Recursive (nested) lock count
•Maximum 255 nested lock
Count
0 Thread ID (15 bits)
(8bits)
28. Java Performance
Java Performance Fundamental | twitter @novathinker
IBM JVM Synchronization artdb@ex-em.com | performeister.tistory.com 28
• Thin Lock
Spin
– Thin Locking lock
loop
Fail Own No Get
CAS
Lock? Lock? No
Success YES YES
0 Nested Lock Lock
24bit monitor shape, Count
count 0 Lock Release Fat lock
Thread ID Monitor index monitor
Count
Lock Release index
Lock word
CAS Monitor shape 1