SlideShare uma empresa Scribd logo
1 de 113
Baixar para ler offline
The following is intended to outline our general product direction. It is intended for information purposes
only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing decisions. The development,
release, timing, and pricing of any features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.
Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and
prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed
discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and
Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q
under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website
at http://www.oracle.com/investor. All information in this presentation is current as of September 2019
and Oracle undertakes no duty to update any statement in light of new information or future events.
Safe Harbor
Copyright © 2019 Oracle and/or its affiliates.
Java Concurrency,
A(nother) Peek Under the Hood
[DEV4211]
Principal Member of Technical Staff
Java Platform Group
September 19, 2019
David Buck
Copyright © 2019 Oracle and/or its affiliates.
IoT Microservices DevOps in the Cloud
Copyright © 2019 Oracle and/or its affiliates.
IoT Microservices DevOps in the Cloud
Copyright © 2019 Oracle and/or its affiliates.
IoT Microservices DevOps in the Cloud
Copyright © 2019 Oracle and/or its affiliates.
JVM Sustaining Engineer
OpenJDK Update Project
Maintainer
JavaOne Rock Star
Co-author of Oracle WebLogic
Server 11g 構築・運用ガイド
@DavidBuckJP
https://blogs.oracle.com/buck/
Who am I? David Buck (left)
Program Agenda
Introduction
Background
Tangent 1: Special Relativity
History
Implementation
Tangent 2: HSDIS
Future
Conclusions
1
2
3
4
5
7
6
Introduction
Motivation
“But I don’t write multithreaded code…”
Web Server
picture: Coolcaesar at the English language Wikipedia [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)]
GUI
Libraries
picture: David Vignoni / ICON KING (http://icon-king.com) [LGPL (http://www.gnu.org/licenses/lgpl.html) or LGPL (http://www.gnu.org/licenses/lgpl.html)]
Batch Processing
picture: US Social Security Administration (http://www.ssa.gov/history/acalcs.html) [Public domain]
“But I don’t write multithreaded code…”
“But I don’t write multithreaded code…”
Race Conditions
picture: Sakurambo at English Wikipedia [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)]
Heisenbugs
Bug Heisenberg
Heisenbug
picture: Bundesarchiv, Bild 183-R57262 / Unknown / CC-BY-SA 3.0 [CC BY-SA 3.0 de (http://creativecommons.org/licenses/by-sa/3.0/de/deed.en)]
Observer Effect
picture: Christian Schirm (Own work) [CC0]
Avoiding Heisenbugs
Java Memory Model
synchronized keyword
java.util.concurrent
Avoiding Heisenbugs
Java Memory Model
synchronized keyword
java.util.concurrent
• Don’t do XXX
• You must do YYY
a² + b² == c²
picture: WTF Public License, Version 2
Background
Memory Model
Memory Model
Definition 1
Specification that explains when we can guarantee that a written
value may be read correctly
void hogeMethod1() {
int localA = 42;
assert localA == 42;
}
static int staticA;
void hogeMethod2() {
staticA = 42;
assert staticA == 42;
}
int data = 0;
boolean ready = false;
void hoge3() {
while (!ready) {};
assert data == 42;
}
void hoge4() {
data = 42;
ready = true;
}
Culprit #1
Culprit #2
Memory Ordering
void hoge5() {
a = 1;
b = 2;
c = 3;
d = 4;
e = 5;
a = a + 1;
}
Memory Ordering
void hoge5() {
a = 1;
b = 2;
c = 3;
d = 4;
e = 5;
a = a + 1;
}
void hoge5() {
a = 2;
b = 2;
c = 3;
d = 4;
e = 5;
}
Memory Ordering
void hoge5() {
a = 1;
b = 2;
c = 3;
d = 4;
e = 5;
a = a + 1;
}
void hoge5() {
b = 2;
c = 3;
d = 4;
e = 5;
a = 2;
}
Rule
Single threaded behavior must never change
Out of Order Execution
picture: Amit6, original version (File:Superscalarpipeline.png) by User:Poil (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)]
CPU Differences
Type Alpha ARMv7
PA-
RISC
POWER
SPARC
RMO
SPARC
PSO
SPARC
TSO
x86
x86
oostore
AMD64 IA-64 zSeries
load-
load
Y Y Y Y Y Y Y
load-
store
Y Y Y Y Y Y Y
store-
store
Y Y Y Y Y Y Y Y
store-
load
Y Y Y Y Y Y Y Y Y Y Y Y
Atomic
(loads)
Y Y Y Y Y
Atomic
(stores)
Y Y Y Y Y Y
Depend
ent
loads
Y
instruct
ion
cache
Y Y Y Y Y Y Y Y Y Y
chart source: https://en.wikipedia.org/wiki/Memory_ordering
CPU Differences
Loose Strict
Alpha
X86
CPU Differences
Loose Strict
Memory Barriers
int data = 0;
boolean ready = false;
void hoge3() {
while (!ready) {};
assert data == 42;
}
void hoge4() {
data = 42;
ready = true;
}
Memory Barriers
int data = 0;
boolean ready = false;
void hoge3() {
while (!ready) {};
assert data == 42;
}
void hoge4() {
data = 42;
ready = true;
}
Memory Barriers
int data = 0;
boolean ready = false;
void hoge3() {
while (!ready) {};
assert data == 42;
}
void hoge4() {
data = 42;
ready = true;
}
Memory Barriers Types
store-store
store-load
load-store
load-load
Compiler Barriers
GCC
__asm__ __volatile__("":::"memory");
VC++
_ReadBarrier
_WriteBarrier
_ReadWriteBarrier
Tangent 1: Special Relativity
picture: Sakurambo (Own work) [Public domain]
Tangent 1: Special Relativity
A
B
C
Tangent 1: Special Relativity
A
B
C
A, B, C
Tangent 1: Special Relativity
A
B
C
A, B, C C, B, A
Tangent 1: Special Relativity
Observed order depends on viewer's frame of reference
A
B
C
A, B, C C, B, A
No single “correct” timeline
Special Relativity
Observed order of events depends on frame of reference
No single “correct” timeline
Special Relativity
Observed order of events depends on frame of reference
Multithreaded Code
Observed order of events depends on thread
Memory Model
Definition 2
Clarify what multithreaded behavior developers may depend on
Memory Model
Definition 2
Clarify what multithreaded behavior developers may depend on
Limits what types of optimizations the runtime may do
History
Java Memory Model (JMM)
Write once, run anywhere
1995
Part of the formal language
specification
Happened-before
picture: Peter Campbell [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC BY-SA 4.0-3.0-2.5-2.0-1.0 (http://creativecommons.org/licenses/by-sa/4.0-3.0-2.5-2.0-1.0)]
happened-before
Leslie Lamport
LaTex
happened-before
picture: Leslie Lamport [GFDL (http://en.wikipedia.org/wiki/GFDL]
happened-before
void hoge5() {
a = 1;
b = 2;
c = 3;
d = 4;
e = 5;
a = a + 1;
}
happened-before
void hoge4() {
data = 42;
ready = true;
}
void hoge3() {
while (!ready) {};
assert data == 42;
}
happened-before
void hoge4() {
data = 42;
ready = true;
}
void hoge3() {
while (!ready) {};
assert data == 42;
}
happened-before
void synchronized hoge4() {
data = 42;
ready = true;
}
void synchronized hoge3() {
while (!ready) {};
assert data == 42;
}
Warning: if hoge3 is executed first, the above code will deadlock
happened-before
void synchronized hoge4()
{
data = 42;
ready = true;
}
void synchronized hoge3()
{
while (!ready) {};
assert data == 42;
}
Warning: if hoge3 is executed first, the above code will deadlock
JMM Specification
Original JMM Keywords
synchronized
mutual exclusion
happened-before
Original JMM Keywords
synchronized
mutual exclusion
happened-before
volatile
Visibility
Problems with the Original JMM
volatile does not establish a happened-before relationship
final values can change
Many important runtime optimization were not allowed
Doug Lea
Author of the Java Multithreaded
bible
Introduced his own OSS high-
level multithreaded library
Java SE 5.0
Modern JMM introduced
Lea’s library added to official JDK
picture: Zvi Roger [CC BY 3.0 (http://creativecommons.org/licenses/by/3.0)]
Modern JMM
JSR-133
Fixed shortcomings in original JMM
volatile does establish happens-before
final values will never change
Modern JMM Keywords
synchronized
mutual exclusion
happened-before
volatile
visibility
happened-before
final
immutability
JSR-133 の volatile
void hoge4() {
data = 42;
ready = true;
}
void hoge3() {
while (!ready) {};
assert data == 42;
}
Warning: if hoge3 is executed first, the above code will deadlock
volatile boolean ready = false;
volatile != atomic
volatile int id = 0;
int incID() {
return id++;
}
volatile != atomic
volatile int id = 0;
int incID() {
return id++;
}
reg = [id]
reg++
[id] = reg
volatile != atomic
volatile int id = 0;
synchronized int incID() {
return id++;
}
64-bit updates are not guaranteed atomic
• Reads and Writes to long and double values may not happen
atomically
• Possible to read a mix of two different writes
Copyright © 2019 Oracle and/or its affiliates.
Old value MSB New value LSB
happened-before
Monitor (acquisition / release)
Volatile (read / write)
final “freeze” (constructor)
JNI
System.out.println()
Input / Output
thread start()/join()
operations on j.u.concurrent collections
java.util.concurent
JSR-166
Doug Lea’s OSS multithreading library
Multithreaded Control
java.util.concurent
synchronized
wait()/notify()
volatile / final
Abstract
Low-level
Fork/Join (JDK 7)
Functional Programming (JDK 8)
Lambda Forms
Stream API
λ
Var Handles
• Lower-level than volatile / final
• Allows a value to be volatile only when we want it to be
• Explicate fence and acquire / release semantics
• Added in JDK 9 to replace several use cases previously only
supported with sun.misc.Unsafe
Copyright © 2019 Oracle and/or its affiliates.
Implementation
Tangent 2: HSDIS (HotSpot
Disassembler)
Lets us see code generated by JIT
Requires a disassembler plugin
GNU binutils-based plugin
base-hsdis
Command line options
+PrintAssembly
+CompileCommand=print,*MyClass.myMethod
Demos
ARM Assembly Crash Course
ARM Assembly Crash Course
Op Target Source
ARM Assembly Crash Course
MOV r02 #42
ARM Assembly Crash Course
MOV r02 #42
r02 = 42
ARM Assembly Crash Course
Op Target Source
ARM Assembly Crash Course
Op Target Source
Exception
STR Source Target
ARM Assembly Crash Course
MOV
Copies registers
MOV r02 r03
Writes Literals
MOV r02 #42
ARM Assembly Crash Course
LDx
Loads data from memory to a register
ldr r03, [r06]
r03 = *r06
ARM Assembly Crash Course
CMP / BEQ
Compare and branch if equal
cmp r0, #0
beq 0x74178d08
if (r0 == 0) goto 0x74178d08
ARM Assembly Crash Course
DMB
Data Memory Barrier
dmb st
dmb sy
One more thing…
Safe Points
Methods proactively poll
JVM makes page unreadable to stop the world
movw ip, #45056 ; 0xb000
movt ip, #30461 ; 0x76fd
ldr ip, [ip] ; {poll_return}
Long Value
static long val = 0;
public static void main(String[] args) {
new Thread(() -> { while(true) val = -1L; } ).start();
new Thread(() -> { while(true) val = 0L; } ).start();
while (true) {
long temp = val;
if ( temp != -1 && temp != 0 ) {
System.out.println("temp (DEC): " + temp);
System.out.println("temp (BIN): " + Long.toBinaryString(temp));
System.exit(-1);
}
}
}
Object Initialization
public class ObjInit {
static ObjInit globalRef = new ObjInit();
long number;
public ObjInit() {
number = 42;
}
Object Initialization
public static void main(String[] args) {
new Thread(()
-> { while(true) {
long temp = globalRef.number;
if (temp != 42) {
System.out.println(temp);
System.exit(-1);
}
}
} ).start();
new Thread(()
-> { while(true) globalRef = new ObjInit(); } ).start(); }}
public class Loop extends Thread {
static boolean done = false;
public static void main(String[] args) {
Thread childThread = new Loop();
childThread.start();
System.out.println("Starting loop");
spinWait();
System.out.println("Exited loop");
}
private static void spinWait() {
while (!done) ;
}
public void run() {
try {
Thread.sleep(5 * 1000);
} catch (Exception e) {}
done = true;
}
} // class Loop
Loop
Future
JEP-188/JMM9
Not delivered with JDK 9 (JMM9 != JDK 9)
JVM-level specification
Compatibility with C11/C++11
Cover new features added since JDK 5
(e.g. AtomicX.weakCompareAndSet())
Conclusions
Avoid low-level API
java.util.concurent
synchronized
wait()/notify()
volatile / final
Var handles
Abstract
Low-level
Code against the specification
Intermittent bugs are common
Behavior changes with JRE / platform
Stuff to avoid
synchronized (new Object()) { }
Randomly adding volatile declarations until it magically starts working
Testing
As close to production environment as possible
Same hardware
Same JRE (including version)
Same settings
Testing
As much variety as possible
Various hardware
Various JREs (including version)
Various settings
Java Concurrency in Practice
Java Concurrency Bible
Covers JSR-133 / JSR-166
Summary
Avoid low-level APIs
Code against the standard, not the implementation
Testing is always indispensible
Must read Java Concurrency in Practice (JCiP)
Thank You!!!
[ JSR 133 (Java Memory Model) FAQ ]
https://www.cs.umd.edu/~pugh/java/
memoryModel/jsr-133-faq.html
[ Java Concurrency in Practice ]
http://jcip.net/
[ Concurrent Programming in Java ]
http://gee.cs.oswego.edu/dl/cpj/
[ The JSR-133 Cookbook for Compiler Writers ]
http://gee.cs.oswego.edu/dl/jmm/cook
book.html
[ PrintAssembly ]
https://wiki.openjdk.java.net/display/H
otSpot/PrintAssembly
[ BASIC DISASSEMBLER PLUGIN FOR
HOTSPOT DOWNLOADS ]
https://kenai.com/projects/base-
hsdis/downloads
References
Session Survey
Help us make the content
even better. Please complete
the session survey in the
Mobile App.
Copyright © 2019 Oracle and/or its affiliates.
The preceding is intended to outline our general product direction. It is intended for information purposes
only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing decisions. The development,
release, timing, and pricing of any features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.
Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and
prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed
discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and
Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q
under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website
at http://www.oracle.com/investor. All information in this presentation is current as of September 2019
and Oracle undertakes no duty to update any statement in light of new information or future events.
Safe Harbor
Copyright © 2019 Oracle and/or its affiliates.

Mais conteúdo relacionado

Mais procurados

JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityDanHeidinga
 
Compile ahead of time. It's fine?
Compile ahead of time. It's fine?Compile ahead of time. It's fine?
Compile ahead of time. It's fine?Dmitry Chuyko
 
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013Arun Gupta
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Arun Gupta
 
Clone Clone Make: a better way to build
Clone Clone Make: a better way to buildClone Clone Make: a better way to build
Clone Clone Make: a better way to buildDanHeidinga
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесьDmitry Chuyko
 
JDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGJDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGYuji Kubota
 
Flavors of Concurrency in Java
Flavors of Concurrency in JavaFlavors of Concurrency in Java
Flavors of Concurrency in JavaJavaDayUA
 
Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9sumsid1234
 
J9's MethodHandle Compilation Pipeline #JFokus2015
J9's MethodHandle Compilation Pipeline #JFokus2015J9's MethodHandle Compilation Pipeline #JFokus2015
J9's MethodHandle Compilation Pipeline #JFokus2015DanHeidinga
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Kevin Sutter
 
Hierarchy Viewer Internals
Hierarchy Viewer InternalsHierarchy Viewer Internals
Hierarchy Viewer InternalsKyungmin Lee
 
FOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VMFOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VMCharlie Gracie
 
Building a web application with ontinuation monads
Building a web application with ontinuation monadsBuilding a web application with ontinuation monads
Building a web application with ontinuation monadsSeitaro Yuuki
 
J9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMJ9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMDanHeidinga
 
How to reverse engineer Android applications
How to reverse engineer Android applicationsHow to reverse engineer Android applications
How to reverse engineer Android applicationshubx
 

Mais procurados (20)

JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
 
Compile ahead of time. It's fine?
Compile ahead of time. It's fine?Compile ahead of time. It's fine?
Compile ahead of time. It's fine?
 
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
 
Clone Clone Make: a better way to build
Clone Clone Make: a better way to buildClone Clone Make: a better way to build
Clone Clone Make: a better way to build
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесь
 
Javaee6 Overview
Javaee6 OverviewJavaee6 Overview
Javaee6 Overview
 
JDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGJDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUG
 
Flavors of Concurrency in Java
Flavors of Concurrency in JavaFlavors of Concurrency in Java
Flavors of Concurrency in Java
 
Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9Hacking Oracle From Web Apps 1 9
Hacking Oracle From Web Apps 1 9
 
J9's MethodHandle Compilation Pipeline #JFokus2015
J9's MethodHandle Compilation Pipeline #JFokus2015J9's MethodHandle Compilation Pipeline #JFokus2015
J9's MethodHandle Compilation Pipeline #JFokus2015
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1
 
Hierarchy Viewer Internals
Hierarchy Viewer InternalsHierarchy Viewer Internals
Hierarchy Viewer Internals
 
FOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VMFOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VM
 
Building a web application with ontinuation monads
Building a web application with ontinuation monadsBuilding a web application with ontinuation monads
Building a web application with ontinuation monads
 
J9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMJ9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVM
 
HotSpotコトハジメ
HotSpotコトハジメHotSpotコトハジメ
HotSpotコトハジメ
 
An Overview of Project Jigsaw
An Overview of Project JigsawAn Overview of Project Jigsaw
An Overview of Project Jigsaw
 
Jigsaw modularity
Jigsaw modularityJigsaw modularity
Jigsaw modularity
 
How to reverse engineer Android applications
How to reverse engineer Android applicationsHow to reverse engineer Android applications
How to reverse engineer Android applications
 

Semelhante a Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]

Production Time Profiling Out of the Box
Production Time Profiling Out of the BoxProduction Time Profiling Out of the Box
Production Time Profiling Out of the BoxMarcus Hirt
 
Jwis2011 ruo ando
Jwis2011 ruo andoJwis2011 ruo ando
Jwis2011 ruo andoRuo Ando
 
20191119 Cloud Native Java : GraalVM
20191119 Cloud Native Java : GraalVM20191119 Cloud Native Java : GraalVM
20191119 Cloud Native Java : GraalVMTaewan Kim
 
S02 hybrid app_and_gae_restful_architecture_v2.0
S02 hybrid app_and_gae_restful_architecture_v2.0S02 hybrid app_and_gae_restful_architecture_v2.0
S02 hybrid app_and_gae_restful_architecture_v2.0Sun-Jin Jang
 
Joget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 20 - Basic System AdministrationJoget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 20 - Basic System AdministrationJoget Workflow
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Logico
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best PracticesDavid Delabassee
 
Play Framework vs Grails Smackdown - JavaOne 2013
Play Framework vs Grails Smackdown - JavaOne 2013Play Framework vs Grails Smackdown - JavaOne 2013
Play Framework vs Grails Smackdown - JavaOne 2013Matt Raible
 
Spring Boot Loves K8s
Spring Boot Loves K8sSpring Boot Loves K8s
Spring Boot Loves K8sVMware Tanzu
 
High Volume Payments using Mule
High Volume Payments using MuleHigh Volume Payments using Mule
High Volume Payments using MuleAdhish Pendharkar
 
GraalVM Overview Compact version
GraalVM Overview Compact versionGraalVM Overview Compact version
GraalVM Overview Compact versionscalaconfjp
 
How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...Christoph Matthies
 
Top Ten Java Defense for Web Applications v2
Top Ten Java Defense for Web Applications v2Top Ten Java Defense for Web Applications v2
Top Ten Java Defense for Web Applications v2Jim Manico
 
Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Andres Almiray
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production EnvironmentsBruno Borges
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Matthew McCullough
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Edward Burns
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]David Buck
 

Semelhante a Java Concurrency, A(nother) Peek Under the Hood [Code One 2019] (20)

Production Time Profiling Out of the Box
Production Time Profiling Out of the BoxProduction Time Profiling Out of the Box
Production Time Profiling Out of the Box
 
Open j9 jdk on RISC-V
Open j9 jdk on RISC-VOpen j9 jdk on RISC-V
Open j9 jdk on RISC-V
 
Jwis2011 ruo ando
Jwis2011 ruo andoJwis2011 ruo ando
Jwis2011 ruo ando
 
20191119 Cloud Native Java : GraalVM
20191119 Cloud Native Java : GraalVM20191119 Cloud Native Java : GraalVM
20191119 Cloud Native Java : GraalVM
 
S02 hybrid app_and_gae_restful_architecture_v2.0
S02 hybrid app_and_gae_restful_architecture_v2.0S02 hybrid app_and_gae_restful_architecture_v2.0
S02 hybrid app_and_gae_restful_architecture_v2.0
 
Joget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 20 - Basic System AdministrationJoget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 20 - Basic System Administration
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
JVMs in Containers
JVMs in ContainersJVMs in Containers
JVMs in Containers
 
Play Framework vs Grails Smackdown - JavaOne 2013
Play Framework vs Grails Smackdown - JavaOne 2013Play Framework vs Grails Smackdown - JavaOne 2013
Play Framework vs Grails Smackdown - JavaOne 2013
 
Spring Boot Loves K8s
Spring Boot Loves K8sSpring Boot Loves K8s
Spring Boot Loves K8s
 
High Volume Payments using Mule
High Volume Payments using MuleHigh Volume Payments using Mule
High Volume Payments using Mule
 
GraalVM Overview Compact version
GraalVM Overview Compact versionGraalVM Overview Compact version
GraalVM Overview Compact version
 
How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...
 
Top Ten Java Defense for Web Applications v2
Top Ten Java Defense for Web Applications v2Top Ten Java Defense for Web Applications v2
Top Ten Java Defense for Web Applications v2
 
Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019Gradle Ex Machina - Devoxx 2019
Gradle Ex Machina - Devoxx 2019
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production Environments
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
 

Mais de David Buck

JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]David Buck
 
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...David Buck
 
Z Garbage Collector
Z Garbage CollectorZ Garbage Collector
Z Garbage CollectorDavid Buck
 
Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019David Buck
 
Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018David Buck
 
JDK 10 へようこそ
JDK 10 へようこそJDK 10 へようこそ
JDK 10 へようこそDavid Buck
 
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]David Buck
 
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]David Buck
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]David Buck
 
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]David Buck
 
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]David Buck
 
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]David Buck
 
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]David Buck
 
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]David Buck
 
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]David Buck
 
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] David Buck
 
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...David Buck
 
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]David Buck
 
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]David Buck
 
OpenJDK 参加入門 [JJUG CCC 2017 Fall E2]
OpenJDK 参加入門 [JJUG CCC 2017 Fall E2]OpenJDK 参加入門 [JJUG CCC 2017 Fall E2]
OpenJDK 参加入門 [JJUG CCC 2017 Fall E2]David Buck
 

Mais de David Buck (20)

JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
 
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
 
Z Garbage Collector
Z Garbage CollectorZ Garbage Collector
Z Garbage Collector
 
Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019
 
Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018
 
JDK 10 へようこそ
JDK 10 へようこそJDK 10 へようこそ
JDK 10 へようこそ
 
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
 
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
 
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
 
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
 
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
 
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
 
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
 
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
 
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
 
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
 
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
 
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]
 
OpenJDK 参加入門 [JJUG CCC 2017 Fall E2]
OpenJDK 参加入門 [JJUG CCC 2017 Fall E2]OpenJDK 参加入門 [JJUG CCC 2017 Fall E2]
OpenJDK 参加入門 [JJUG CCC 2017 Fall E2]
 

Último

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Último (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]

  • 1. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Safe Harbor Copyright © 2019 Oracle and/or its affiliates.
  • 2. Java Concurrency, A(nother) Peek Under the Hood [DEV4211] Principal Member of Technical Staff Java Platform Group September 19, 2019 David Buck Copyright © 2019 Oracle and/or its affiliates.
  • 3. IoT Microservices DevOps in the Cloud Copyright © 2019 Oracle and/or its affiliates.
  • 4. IoT Microservices DevOps in the Cloud Copyright © 2019 Oracle and/or its affiliates.
  • 5. IoT Microservices DevOps in the Cloud Copyright © 2019 Oracle and/or its affiliates.
  • 6. JVM Sustaining Engineer OpenJDK Update Project Maintainer JavaOne Rock Star Co-author of Oracle WebLogic Server 11g 構築・運用ガイド @DavidBuckJP https://blogs.oracle.com/buck/ Who am I? David Buck (left)
  • 7. Program Agenda Introduction Background Tangent 1: Special Relativity History Implementation Tangent 2: HSDIS Future Conclusions 1 2 3 4 5 7 6
  • 9. Motivation “But I don’t write multithreaded code…”
  • 10. Web Server picture: Coolcaesar at the English language Wikipedia [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)]
  • 11. GUI
  • 12. Libraries picture: David Vignoni / ICON KING (http://icon-king.com) [LGPL (http://www.gnu.org/licenses/lgpl.html) or LGPL (http://www.gnu.org/licenses/lgpl.html)]
  • 13. Batch Processing picture: US Social Security Administration (http://www.ssa.gov/history/acalcs.html) [Public domain]
  • 14. “But I don’t write multithreaded code…”
  • 15. “But I don’t write multithreaded code…”
  • 16. Race Conditions picture: Sakurambo at English Wikipedia [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)]
  • 17. Heisenbugs Bug Heisenberg Heisenbug picture: Bundesarchiv, Bild 183-R57262 / Unknown / CC-BY-SA 3.0 [CC BY-SA 3.0 de (http://creativecommons.org/licenses/by-sa/3.0/de/deed.en)]
  • 18. Observer Effect picture: Christian Schirm (Own work) [CC0]
  • 19. Avoiding Heisenbugs Java Memory Model synchronized keyword java.util.concurrent
  • 20. Avoiding Heisenbugs Java Memory Model synchronized keyword java.util.concurrent • Don’t do XXX • You must do YYY
  • 21. a² + b² == c²
  • 22. picture: WTF Public License, Version 2
  • 25. Memory Model Definition 1 Specification that explains when we can guarantee that a written value may be read correctly
  • 26. void hogeMethod1() { int localA = 42; assert localA == 42; }
  • 27. static int staticA; void hogeMethod2() { staticA = 42; assert staticA == 42; }
  • 28. int data = 0; boolean ready = false; void hoge3() { while (!ready) {}; assert data == 42; } void hoge4() { data = 42; ready = true; }
  • 31. Memory Ordering void hoge5() { a = 1; b = 2; c = 3; d = 4; e = 5; a = a + 1; }
  • 32. Memory Ordering void hoge5() { a = 1; b = 2; c = 3; d = 4; e = 5; a = a + 1; } void hoge5() { a = 2; b = 2; c = 3; d = 4; e = 5; }
  • 33. Memory Ordering void hoge5() { a = 1; b = 2; c = 3; d = 4; e = 5; a = a + 1; } void hoge5() { b = 2; c = 3; d = 4; e = 5; a = 2; }
  • 34. Rule Single threaded behavior must never change
  • 35. Out of Order Execution picture: Amit6, original version (File:Superscalarpipeline.png) by User:Poil (Own work) [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0)]
  • 36. CPU Differences Type Alpha ARMv7 PA- RISC POWER SPARC RMO SPARC PSO SPARC TSO x86 x86 oostore AMD64 IA-64 zSeries load- load Y Y Y Y Y Y Y load- store Y Y Y Y Y Y Y store- store Y Y Y Y Y Y Y Y store- load Y Y Y Y Y Y Y Y Y Y Y Y Atomic (loads) Y Y Y Y Y Atomic (stores) Y Y Y Y Y Y Depend ent loads Y instruct ion cache Y Y Y Y Y Y Y Y Y Y chart source: https://en.wikipedia.org/wiki/Memory_ordering
  • 39. Memory Barriers int data = 0; boolean ready = false; void hoge3() { while (!ready) {}; assert data == 42; } void hoge4() { data = 42; ready = true; }
  • 40. Memory Barriers int data = 0; boolean ready = false; void hoge3() { while (!ready) {}; assert data == 42; } void hoge4() { data = 42; ready = true; }
  • 41. Memory Barriers int data = 0; boolean ready = false; void hoge3() { while (!ready) {}; assert data == 42; } void hoge4() { data = 42; ready = true; }
  • 44.
  • 45. Tangent 1: Special Relativity picture: Sakurambo (Own work) [Public domain]
  • 46. Tangent 1: Special Relativity A B C
  • 47. Tangent 1: Special Relativity A B C A, B, C
  • 48. Tangent 1: Special Relativity A B C A, B, C C, B, A
  • 49. Tangent 1: Special Relativity Observed order depends on viewer's frame of reference A B C A, B, C C, B, A
  • 50. No single “correct” timeline Special Relativity Observed order of events depends on frame of reference
  • 51. No single “correct” timeline Special Relativity Observed order of events depends on frame of reference Multithreaded Code Observed order of events depends on thread
  • 52. Memory Model Definition 2 Clarify what multithreaded behavior developers may depend on
  • 53. Memory Model Definition 2 Clarify what multithreaded behavior developers may depend on Limits what types of optimizations the runtime may do
  • 55. Java Memory Model (JMM) Write once, run anywhere 1995 Part of the formal language specification Happened-before picture: Peter Campbell [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC BY-SA 4.0-3.0-2.5-2.0-1.0 (http://creativecommons.org/licenses/by-sa/4.0-3.0-2.5-2.0-1.0)]
  • 57. Leslie Lamport LaTex happened-before picture: Leslie Lamport [GFDL (http://en.wikipedia.org/wiki/GFDL]
  • 58. happened-before void hoge5() { a = 1; b = 2; c = 3; d = 4; e = 5; a = a + 1; }
  • 59. happened-before void hoge4() { data = 42; ready = true; } void hoge3() { while (!ready) {}; assert data == 42; }
  • 60. happened-before void hoge4() { data = 42; ready = true; } void hoge3() { while (!ready) {}; assert data == 42; }
  • 61. happened-before void synchronized hoge4() { data = 42; ready = true; } void synchronized hoge3() { while (!ready) {}; assert data == 42; } Warning: if hoge3 is executed first, the above code will deadlock
  • 62. happened-before void synchronized hoge4() { data = 42; ready = true; } void synchronized hoge3() { while (!ready) {}; assert data == 42; } Warning: if hoge3 is executed first, the above code will deadlock
  • 64. Original JMM Keywords synchronized mutual exclusion happened-before
  • 65. Original JMM Keywords synchronized mutual exclusion happened-before volatile Visibility
  • 66. Problems with the Original JMM volatile does not establish a happened-before relationship final values can change Many important runtime optimization were not allowed
  • 67. Doug Lea Author of the Java Multithreaded bible Introduced his own OSS high- level multithreaded library
  • 68. Java SE 5.0 Modern JMM introduced Lea’s library added to official JDK picture: Zvi Roger [CC BY 3.0 (http://creativecommons.org/licenses/by/3.0)]
  • 69. Modern JMM JSR-133 Fixed shortcomings in original JMM volatile does establish happens-before final values will never change
  • 70. Modern JMM Keywords synchronized mutual exclusion happened-before volatile visibility happened-before final immutability
  • 71. JSR-133 の volatile void hoge4() { data = 42; ready = true; } void hoge3() { while (!ready) {}; assert data == 42; } Warning: if hoge3 is executed first, the above code will deadlock volatile boolean ready = false;
  • 72. volatile != atomic volatile int id = 0; int incID() { return id++; }
  • 73. volatile != atomic volatile int id = 0; int incID() { return id++; } reg = [id] reg++ [id] = reg
  • 74. volatile != atomic volatile int id = 0; synchronized int incID() { return id++; }
  • 75. 64-bit updates are not guaranteed atomic • Reads and Writes to long and double values may not happen atomically • Possible to read a mix of two different writes Copyright © 2019 Oracle and/or its affiliates. Old value MSB New value LSB
  • 76. happened-before Monitor (acquisition / release) Volatile (read / write) final “freeze” (constructor) JNI System.out.println() Input / Output thread start()/join() operations on j.u.concurrent collections
  • 80. Functional Programming (JDK 8) Lambda Forms Stream API λ
  • 81. Var Handles • Lower-level than volatile / final • Allows a value to be volatile only when we want it to be • Explicate fence and acquire / release semantics • Added in JDK 9 to replace several use cases previously only supported with sun.misc.Unsafe Copyright © 2019 Oracle and/or its affiliates.
  • 83. Tangent 2: HSDIS (HotSpot Disassembler) Lets us see code generated by JIT Requires a disassembler plugin GNU binutils-based plugin base-hsdis Command line options +PrintAssembly +CompileCommand=print,*MyClass.myMethod
  • 84. Demos
  • 86. ARM Assembly Crash Course Op Target Source
  • 87. ARM Assembly Crash Course MOV r02 #42
  • 88. ARM Assembly Crash Course MOV r02 #42 r02 = 42
  • 89. ARM Assembly Crash Course Op Target Source
  • 90. ARM Assembly Crash Course Op Target Source Exception STR Source Target
  • 91. ARM Assembly Crash Course MOV Copies registers MOV r02 r03 Writes Literals MOV r02 #42
  • 92. ARM Assembly Crash Course LDx Loads data from memory to a register ldr r03, [r06] r03 = *r06
  • 93. ARM Assembly Crash Course CMP / BEQ Compare and branch if equal cmp r0, #0 beq 0x74178d08 if (r0 == 0) goto 0x74178d08
  • 94. ARM Assembly Crash Course DMB Data Memory Barrier dmb st dmb sy
  • 96. Safe Points Methods proactively poll JVM makes page unreadable to stop the world movw ip, #45056 ; 0xb000 movt ip, #30461 ; 0x76fd ldr ip, [ip] ; {poll_return}
  • 97. Long Value static long val = 0; public static void main(String[] args) { new Thread(() -> { while(true) val = -1L; } ).start(); new Thread(() -> { while(true) val = 0L; } ).start(); while (true) { long temp = val; if ( temp != -1 && temp != 0 ) { System.out.println("temp (DEC): " + temp); System.out.println("temp (BIN): " + Long.toBinaryString(temp)); System.exit(-1); } } }
  • 98. Object Initialization public class ObjInit { static ObjInit globalRef = new ObjInit(); long number; public ObjInit() { number = 42; }
  • 99. Object Initialization public static void main(String[] args) { new Thread(() -> { while(true) { long temp = globalRef.number; if (temp != 42) { System.out.println(temp); System.exit(-1); } } } ).start(); new Thread(() -> { while(true) globalRef = new ObjInit(); } ).start(); }}
  • 100. public class Loop extends Thread { static boolean done = false; public static void main(String[] args) { Thread childThread = new Loop(); childThread.start(); System.out.println("Starting loop"); spinWait(); System.out.println("Exited loop"); } private static void spinWait() { while (!done) ; } public void run() { try { Thread.sleep(5 * 1000); } catch (Exception e) {} done = true; } } // class Loop Loop
  • 101. Future
  • 102. JEP-188/JMM9 Not delivered with JDK 9 (JMM9 != JDK 9) JVM-level specification Compatibility with C11/C++11 Cover new features added since JDK 5 (e.g. AtomicX.weakCompareAndSet())
  • 105. Code against the specification Intermittent bugs are common Behavior changes with JRE / platform Stuff to avoid synchronized (new Object()) { } Randomly adding volatile declarations until it magically starts working
  • 106. Testing As close to production environment as possible Same hardware Same JRE (including version) Same settings
  • 107. Testing As much variety as possible Various hardware Various JREs (including version) Various settings
  • 108. Java Concurrency in Practice Java Concurrency Bible Covers JSR-133 / JSR-166
  • 109. Summary Avoid low-level APIs Code against the standard, not the implementation Testing is always indispensible Must read Java Concurrency in Practice (JCiP)
  • 111. [ JSR 133 (Java Memory Model) FAQ ] https://www.cs.umd.edu/~pugh/java/ memoryModel/jsr-133-faq.html [ Java Concurrency in Practice ] http://jcip.net/ [ Concurrent Programming in Java ] http://gee.cs.oswego.edu/dl/cpj/ [ The JSR-133 Cookbook for Compiler Writers ] http://gee.cs.oswego.edu/dl/jmm/cook book.html [ PrintAssembly ] https://wiki.openjdk.java.net/display/H otSpot/PrintAssembly [ BASIC DISASSEMBLER PLUGIN FOR HOTSPOT DOWNLOADS ] https://kenai.com/projects/base- hsdis/downloads References
  • 112. Session Survey Help us make the content even better. Please complete the session survey in the Mobile App. Copyright © 2019 Oracle and/or its affiliates.
  • 113. The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Safe Harbor Copyright © 2019 Oracle and/or its affiliates.