SlideShare une entreprise Scribd logo
1  sur  67
Télécharger pour lire hors ligne
Alexey	Fyodorov
Odnoklassniki
@23derevo
Non-blocking	synchronization
what	is	it	and	why	we	(don't?)	need	it
What	is	this	talk	about?
3
Concurrency
Who	is	this	talk	for?
5
For concurrency
beginners
Sorry
Please go to another room
6
For concurrency
beginners
Sorry
Please go to another room
For non-blocking
programming beginners
A short introduction
For advanced concurrent
programmers
We will talk about CAS/atomics
implementation details!
For hipsters We will cover internet hype!
Immutable vs. Mutable
Intro.	Locking
8
9
Main Models
Shared Memory Messaging
write + read send + onReceive
Similar to how we program it Similar to how a real hardware works
Distributed ProgrammingConcurrent Programming
10
Advantages of Parallelism
Resource utilization
Async handling
Simplicity
Utilization of several cores/CPUs
aka PERFORMANCE
Complexity goes to magic frameworks
• ArrayBlockingQueue
• ConcurrentHashMap
• Akka
Responsible services, Responsible UI
11
Lock lock = new ReentrantLock()
Lock lock = new ReentrantLock(true)
12
Fairness
Lock lock = new ReentrantLock(true)
13
Locking in Java
Old School
wait()
notify()
notifyAll()
synchronized {
doSomething();
}
public synchronized foo() {
doSomethingElse();
} Lock lock = new ReentrantLock();
try {
lock.lock();
doSomething();
} finally {
lock.unlock();
} Since Java 5
In	the	Language In	the	Standard	Library	(JDK)
java.util.concurrent.*
java.util.concurrent.atomic.*
14
Counter
public interface Counter {
long get();
void increment();
}
15
Simple Counter
public interface Counter {
long get();
void increment();
}
public class SimpleCounter implements Counter {
long value = 0;
public long get() {
return value;
}
public void increment() {
value++;
}
}
16
Volatile Counter
public class VolatileCounter implements Counter {
volatile long value = 0;
public long get() {
return value;
}
public void increment() {
value++;
}
}
public interface Counter {
long get();
void increment();
}
17
Synchronized Counter
public class SynchronizedCounter implements Counter {
long value = 0;
public synchronized long get() {
return value;
}
public synchronized void increment() {
value++;
}
}
public interface Counter {
long get();
void increment();
}
18
Disadvantages of Locking
• Deadlocks
• Priority Inversion
• Reliability
- What will happen if lock owner die?
• Performance
- Scheduler can push lock owner out
- No parallelism inside a critical section!
19
Amdahl’s Law
α non-parallelizable part of the computation
1-α parallelizable part of the computation
p number of threads
Sp=
"
α#	
%&α
'
We	need	something	else!
Welcome	to	Non-blocking	Synchronization
22
If-Modify-Write
volatile int value = 0;
if (value == 0) {
value = 42;
}
No	Atomicity
in	terms	of	JMM
23
Compare and Swap
int value = 0;
synchronized (...) {
if (value == 0) {
value = 42;
}
}
24
Compare and Swap
int value = 0;
i.compareAndSet(0, 42);
25
CAS Semantics
public class PseudoCAS {
private long value;
public synchronized long get() {
return value;
}
public synchronized long compareAndSwap(long expectedValue, long newValue) {
long oldValue = value;
if (oldValue == expectedValue) {
value = newValue;
}
return oldValue;
}
public synchronized boolean compareAndSet(long expectedValue, long newValue) {
return expectedValue == compareAndSwap(expectedValue, newValue);
}
}
26
Pseudo-CAS Counter
public class PseudoCasLoopCounter implements Counter {
private PseudoCAS value = new PseudoCAS();
public long get() {
return value.get();
}
public void increment() {
long v;
do {
v = value.get();
} while (value.compareAndSet(v, v + 1));
}
}
public interface Counter {
long get();
void increment();
}
27
Pseudo-CAS Counter
public class PseudoCasLoopCounter implements Counter {
private PseudoCAS value = new PseudoCAS();
public long get() {
return value.get();
}
public void increment() {
long v;
do {
v = value.get();
} while (value.compareAndSet(v, v + 1));
}
}
public interface Counter {
long get();
void increment();
}
CAS	in Java
29
CAS in Java
Since Java 5, JSR166
java.util.concurrent.atomic
• Scalars
• Field updaters
• Arrays
• Compound variables
• Accumulators/Adders
since Java 8
30
Scalars
• AtomicBoolean
• AtomicInteger
• AtomicLong
• AtomicReference
31
Scalars
• AtomicBoolean
• AtomicInteger
• AtomicLong
• AtomicReference
32
• boolean compareAndSet(long expect, long update)
• long addAndGet(long delta)
• long getAndAdd(long delta)
• long getAndDecrement()
• long getAndIncrement()
• long incrementAndGet()
• …
AtomicLong
33
• boolean compareAndSet(long expect, long update)
• long addAndGet(long delta)
• long getAndAdd(long delta)
• long getAndDecrement()
• long getAndIncrement()
• long incrementAndGet()
• …
AtomicLong
34
CAS Counter
public interface Counter {
long get();
void increment();
}
public class CasLoopCounter implements Counter {
private AtomicLong value = new AtomicLong();
public long get() {
return value.get();
}
public void increment() {
long v;
do {
v = value.get();
} while (value.compareAndSet(v, v + 1));
}
}
35
Compare and Swap — Hardware Support
compare-and-swap
CAS
load-link / store-conditional
LL/SC
cmpxchg
ldrex/strex lwarx/stwcx
36
CAS Disadvantages
Contended	CAS —> tons	of	useless CPU	cycles
do {
v = value.get();
} while (value.compareAndSet(v, v + 1));
Writing	fast	and	correct	CAS	algorithms	requires	an	expertise
37
• boolean compareAndSet(long expect, long update)
• long addAndGet(long delta)
• long getAndAdd(long delta)
• long getAndDecrement()
• long getAndIncrement()
• long incrementAndGet()
• …
AtomicLong
38
Get-and-Add Counter
public interface Counter {
long get();
void increment();
}
public class CasLoopCounter implements Counter {
private AtomicLong value = new AtomicLong();
public long get() {
return value.get();
}
public void increment() {
value.getAndAdd(1);
}
}
39
39
atomicLong.getAndAdd(5)
JDK	7u95	 JDK	8u74	
83
46
15 11
132
105
45 43
1 2 3 4
ops	/	μs
threads
40
40
atomicLong.getAndAdd(5)
JDK	7u95	 JDK	8u74	
83
46
15 11
132
105
45 43
1 2 3 4
ops	/	μs
threads
41
41
atomicLong.getAndAdd(5)
lock addq $0x5,0x10(%rbp))loop:
mov 0x10(%rbx),%rax
mov %rax,%r11
add $0x5,%r11
lock cmpxchg %r11,0x10(%rbx)
sete %r11b
movzbl %r11b,%r11d
test %r10d,%r10d
je loop
JDK	7u95				-XX:+PrintAssembly JDK	8u74				-XX:+PrintAssembly
83
46
15 11
132
105
45 43
1 2 3 4
ops	/	μs
threads
42
AtomicLong.getAndAdd() — JDK 7
cmpxchg
43
AtomicLong.getAndAdd() — JDK 8
lock addq
JVM	
Intrinsic
44
Multivariable Invariant
45
Multivariable Invariant
46
Field Updaters
• AtomicIntegerFieldUpdater
- Reflection-based updater for volatile int
• AtomicLongFieldUpdater
- Reflection-based updater for volatile long
• AtomicReferenceFieldUpdater
- Reflection-based updater for volatile object
47
AtomicLongFieldUpdater
long addAndGet(T obj, long delta)
boolean compareAndSet(T obj, long exp, long upd)
long getAndAdd(T obj, long delta)
long incrementAndGet(T obj)
48
Volatile Counter
public class VolatileCounter implements Counter {
volatile long value = 0;
public long get() {
return value;
}
public void increment() {
value++;
}
}
public interface Counter {
long get();
void increment();
}
49
AtomicLongFieldUpdater-based Counter
public class AFUCounter implements Counter {
private final VolatileCounter counter = new VolatileCounter();
AtomicLongFieldUpdater<VolatileCounter> updater
= AtomicLongFieldUpdater.newUpdater(VolatileCounter.class, "value");
public AFUCounter() throws NoSuchFieldException {
Field field = VolatileCounter.class.getDeclaredField("value");
field.setAccessible(true);
}
public long get() {
return updater.get(counter);
}
public void increment() {
updater.addAndGet(counter, 1);
}
}
50
AtomicLongFieldUpdater
51
AtomicLongFieldUpdater
52
AtomicArrays
AtomicIntegerArray
AtomicLongArray
AtomicReferenceArray
• long addAndGet(int i, long delta)
• long getAndAdd(int i, long delta)
• boolean compareAndSet(
int i, long exp, long upd)
• long incrementAndGet(int i)
• …
53
Compound Variables
AtomicMarkableReference
V сompareAndSet( V expectedRef, V newRef, boolean expectedMark, boolean newMark)
AtomicStampedReference
boolean compareAndSet( V expectedRef, V newRef, int expectedStamp, int newStamp)
54
Accumulators
• DoubleAccumulator
• DoubleAdder
• LongAccumulator
• LongAdder
• (Striped64)
• void accumulate(long x)
• long get()
• long getThenReset()
• void reset()
55
Non-blocking Guarantees
Wait-Free Per-thread progress is guaranteed
Lock-Free Overall progress is guaranteed
Obstruction-Free Overall progress is guaranteed if threads
don’t interfere with each other
56
AtomicLong-based Counter
public interface Counter {
long get();
void increment();
}
public class CasCounter implements Counter {
private AtomicLong value = new AtomicLong();
public long get() {
return value.get();
}
public void increment() {
long v;
do {
v = value.get();
} while (value.compareAndSet(v, v + 1));
}
}
Any	guarantees?
A. Wait-Free
B. Lock-Free
C. Obstruction-Free
D. No	guarantees
57
AtomicLong-based Counter
public interface Counter {
long get();
void increment();
}
public class CasCounter implements Counter {
private AtomicLong value = new AtomicLong();
public long get() {
return value.get();
}
public void increment() {
long v;
do {
v = value.get();
} while (value.compareAndSet(v, v + 1));
}
}
Any	guarantees?
A. Wait-Free
B. Lock-Free
C. Obstruction-Free
D. No	guarantees
58
AtomicLong-based Counter
public interface Counter {
long get();
void increment();
}
public class CasCounter implements Counter {
private AtomicLong value = new AtomicLong();
public long get() {
return value.get();
}
public void increment() {
long v;
do {
v = value.get();
} while (value.compareAndSet(v, v + 1));
}
}
Any	guarantees	on	x64?
A. Wait-Free
B. Lock-Free
C. Obstruction-Free
D. No	guarantees
59
AtomicLong-based Counter
public interface Counter {
long get();
void increment();
}
public class CasCounter implements Counter {
private AtomicLong value = new AtomicLong();
public long get() {
return value.get();
}
public void increment() {
long v;
do {
v = value.get();
} while (value.compareAndSet(v, v + 1));
}
}
Any	guarantees	on	x64?
A. Wait-Free
B. Lock-Free
C. Obstruction-Free
D. No	guarantees
Non-blocking	Data	Structures
61
Non-blocking Stack
62
Non-blocking queue
Michael and Scott, 1996
https://www.research.ibm.com/people/m/michael/podc-1996.pdf
Threads help each other
References
64
Books
65
Concurrency-interest
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
Doug Lee and Co
66
Q & A
67
Thank you!

Contenu connexe

Tendances

Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor ConcurrencyAlex Miller
 
Java9を迎えた今こそ!Java本格(再)入門
Java9を迎えた今こそ!Java本格(再)入門Java9を迎えた今こそ!Java本格(再)入門
Java9を迎えた今こそ!Java本格(再)入門Takuya Okada
 
Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Roman Elizarov
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortStefan Marr
 
Facebook C++网络库Wangle调研
Facebook C++网络库Wangle调研Facebook C++网络库Wangle调研
Facebook C++网络库Wangle调研vorfeed chen
 
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Charles Nutter
 
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...Stefan Marr
 
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerabilityCsw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerabilityCanSecWest
 
Java Runtime: повседневные обязанности JVM
Java Runtime: повседневные обязанности JVMJava Runtime: повседневные обязанности JVM
Java Runtime: повседневные обязанности JVModnoklassniki.ru
 
Tools and Techniques for Understanding Threading Behavior in Android
Tools and Techniques for Understanding Threading Behavior in AndroidTools and Techniques for Understanding Threading Behavior in Android
Tools and Techniques for Understanding Threading Behavior in AndroidIntel® Software
 
Clojure concurrency
Clojure concurrencyClojure concurrency
Clojure concurrencyAlex Navis
 
.NET Multithreading and File I/O
.NET Multithreading and File I/O.NET Multithreading and File I/O
.NET Multithreading and File I/OJussi Pohjolainen
 
Threaded Programming
Threaded ProgrammingThreaded Programming
Threaded ProgrammingSri Prasanna
 
Grand Central Dispatch
Grand Central DispatchGrand Central Dispatch
Grand Central Dispatchcqtt191
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with nettyZauber
 
Java 5 concurrency
Java 5 concurrencyJava 5 concurrency
Java 5 concurrencypriyank09
 

Tendances (20)

bluespec talk
bluespec talkbluespec talk
bluespec talk
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor Concurrency
 
Java9を迎えた今こそ!Java本格(再)入門
Java9を迎えた今こそ!Java本格(再)入門Java9を迎えた今こそ!Java本格(再)入門
Java9を迎えた今こそ!Java本格(再)入門
 
Wait for your fortune without Blocking!
Wait for your fortune without Blocking!Wait for your fortune without Blocking!
Wait for your fortune without Blocking!
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
 
Facebook C++网络库Wangle调研
Facebook C++网络库Wangle调研Facebook C++网络库Wangle调研
Facebook C++网络库Wangle调研
 
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
Øredev 2011 - JVM JIT for Dummies (What the JVM Does With Your Bytecode When ...
 
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
 
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerabilityCsw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
Csw2016 gong pwn_a_nexus_device_with_a_single_vulnerability
 
无锁编程
无锁编程无锁编程
无锁编程
 
Java Runtime: повседневные обязанности JVM
Java Runtime: повседневные обязанности JVMJava Runtime: повседневные обязанности JVM
Java Runtime: повседневные обязанности JVM
 
Tools and Techniques for Understanding Threading Behavior in Android
Tools and Techniques for Understanding Threading Behavior in AndroidTools and Techniques for Understanding Threading Behavior in Android
Tools and Techniques for Understanding Threading Behavior in Android
 
Clojure concurrency
Clojure concurrencyClojure concurrency
Clojure concurrency
 
.NET Multithreading and File I/O
.NET Multithreading and File I/O.NET Multithreading and File I/O
.NET Multithreading and File I/O
 
Threaded Programming
Threaded ProgrammingThreaded Programming
Threaded Programming
 
Reactive server with netty
Reactive server with nettyReactive server with netty
Reactive server with netty
 
Grand Central Dispatch
Grand Central DispatchGrand Central Dispatch
Grand Central Dispatch
 
分散式系統
分散式系統分散式系統
分散式系統
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with netty
 
Java 5 concurrency
Java 5 concurrencyJava 5 concurrency
Java 5 concurrency
 

En vedette

RigaDevDay 2016 - Testing with Spock: The Logical Choice
RigaDevDay 2016 - Testing with Spock: The Logical ChoiceRigaDevDay 2016 - Testing with Spock: The Logical Choice
RigaDevDay 2016 - Testing with Spock: The Logical ChoiceIván López Martín
 
Why postgres SQL deserve noSQL fan respect - Riga dev day 2016
Why postgres SQL deserve noSQL fan respect - Riga dev day 2016Why postgres SQL deserve noSQL fan respect - Riga dev day 2016
Why postgres SQL deserve noSQL fan respect - Riga dev day 2016Quentin Adam
 
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesRiga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesClaus Ibsen
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...Robert Nyman
 
Riga dev day 2016 adding a data reservoir and oracle bdd to extend your ora...
Riga dev day 2016   adding a data reservoir and oracle bdd to extend your ora...Riga dev day 2016   adding a data reservoir and oracle bdd to extend your ora...
Riga dev day 2016 adding a data reservoir and oracle bdd to extend your ora...Mark Rittman
 
Big Data for Oracle Devs - Towards Spark, Real-Time and Predictive Analytics
Big Data for Oracle Devs - Towards Spark, Real-Time and Predictive AnalyticsBig Data for Oracle Devs - Towards Spark, Real-Time and Predictive Analytics
Big Data for Oracle Devs - Towards Spark, Real-Time and Predictive AnalyticsMark Rittman
 

En vedette (7)

RigaDevDay 2016 - Testing with Spock: The Logical Choice
RigaDevDay 2016 - Testing with Spock: The Logical ChoiceRigaDevDay 2016 - Testing with Spock: The Logical Choice
RigaDevDay 2016 - Testing with Spock: The Logical Choice
 
Why postgres SQL deserve noSQL fan respect - Riga dev day 2016
Why postgres SQL deserve noSQL fan respect - Riga dev day 2016Why postgres SQL deserve noSQL fan respect - Riga dev day 2016
Why postgres SQL deserve noSQL fan respect - Riga dev day 2016
 
What's New in WildFly 9?
What's New in WildFly 9?What's New in WildFly 9?
What's New in WildFly 9?
 
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesRiga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...
 
Riga dev day 2016 adding a data reservoir and oracle bdd to extend your ora...
Riga dev day 2016   adding a data reservoir and oracle bdd to extend your ora...Riga dev day 2016   adding a data reservoir and oracle bdd to extend your ora...
Riga dev day 2016 adding a data reservoir and oracle bdd to extend your ora...
 
Big Data for Oracle Devs - Towards Spark, Real-Time and Predictive Analytics
Big Data for Oracle Devs - Towards Spark, Real-Time and Predictive AnalyticsBig Data for Oracle Devs - Towards Spark, Real-Time and Predictive Analytics
Big Data for Oracle Devs - Towards Spark, Real-Time and Predictive Analytics
 

Similaire à Non-blocking synchronization — what is it and why we (don't?) need it

Counter Wars (JEEConf 2016)
Counter Wars (JEEConf 2016)Counter Wars (JEEConf 2016)
Counter Wars (JEEConf 2016)Alexey Fyodorov
 
Reactive Qt - Ivan Čukić (Qt World Summit 2015)
Reactive Qt - Ivan Čukić (Qt World Summit 2015)Reactive Qt - Ivan Čukić (Qt World Summit 2015)
Reactive Qt - Ivan Čukić (Qt World Summit 2015)Ivan Čukić
 
Finding bugs that matter with Findbugs
Finding bugs that matter with FindbugsFinding bugs that matter with Findbugs
Finding bugs that matter with FindbugsCarol McDonald
 
Introduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresIntroduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresDilum Bandara
 
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
 Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at... Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...Big Data Spain
 
Fork and join framework
Fork and join frameworkFork and join framework
Fork and join frameworkMinh Tran
 
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataGPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataCodemotion Tel Aviv
 
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Elixir Club
 
NVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA Japan
 
Vert.x - Reactive & Distributed [Devoxx version]
Vert.x - Reactive & Distributed [Devoxx version]Vert.x - Reactive & Distributed [Devoxx version]
Vert.x - Reactive & Distributed [Devoxx version]Orkhan Gasimov
 
Testing in android
Testing in androidTesting in android
Testing in androidjtrindade
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the wayOleg Podsechin
 
Adapting clean architecture in android apps
Adapting clean architecture in android appsAdapting clean architecture in android apps
Adapting clean architecture in android appsMatso Abgaryan
 
Java - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced conceptsJava - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced conceptsRiccardo Cardin
 
Boost delivery stream with code discipline engineering
Boost delivery stream with code discipline engineeringBoost delivery stream with code discipline engineering
Boost delivery stream with code discipline engineeringMiro Wengner
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuVMware Tanzu
 

Similaire à Non-blocking synchronization — what is it and why we (don't?) need it (20)

Counter Wars (JEEConf 2016)
Counter Wars (JEEConf 2016)Counter Wars (JEEConf 2016)
Counter Wars (JEEConf 2016)
 
Reactive Qt - Ivan Čukić (Qt World Summit 2015)
Reactive Qt - Ivan Čukić (Qt World Summit 2015)Reactive Qt - Ivan Čukić (Qt World Summit 2015)
Reactive Qt - Ivan Čukić (Qt World Summit 2015)
 
00_Introduction to Java.ppt
00_Introduction to Java.ppt00_Introduction to Java.ppt
00_Introduction to Java.ppt
 
Finding bugs that matter with Findbugs
Finding bugs that matter with FindbugsFinding bugs that matter with Findbugs
Finding bugs that matter with Findbugs
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
Introduction to Concurrent Data Structures
Introduction to Concurrent Data StructuresIntroduction to Concurrent Data Structures
Introduction to Concurrent Data Structures
 
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
 Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at... Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
 
Fork and join framework
Fork and join frameworkFork and join framework
Fork and join framework
 
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataGPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
 
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
 
NVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読みNVIDIA HPC ソフトウエア斜め読み
NVIDIA HPC ソフトウエア斜め読み
 
Vert.x - Reactive & Distributed [Devoxx version]
Vert.x - Reactive & Distributed [Devoxx version]Vert.x - Reactive & Distributed [Devoxx version]
Vert.x - Reactive & Distributed [Devoxx version]
 
Testing in android
Testing in androidTesting in android
Testing in android
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
 
Adapting clean architecture in android apps
Adapting clean architecture in android appsAdapting clean architecture in android apps
Adapting clean architecture in android apps
 
Java Concurrency
Java ConcurrencyJava Concurrency
Java Concurrency
 
Loom and concurrency latest
Loom and concurrency latestLoom and concurrency latest
Loom and concurrency latest
 
Java - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced conceptsJava - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced concepts
 
Boost delivery stream with code discipline engineering
Boost delivery stream with code discipline engineeringBoost delivery stream with code discipline engineering
Boost delivery stream with code discipline engineering
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFu
 

Plus de Alexey Fyodorov

How threads help each other
How threads help each otherHow threads help each other
How threads help each otherAlexey Fyodorov
 
Помоги ближнему, или Как потоки помогают друг другу
Помоги ближнему, или Как потоки помогают друг другуПомоги ближнему, или Как потоки помогают друг другу
Помоги ближнему, или Как потоки помогают друг другуAlexey Fyodorov
 
Синхронизация без блокировок и СМС
Синхронизация без блокировок и СМССинхронизация без блокировок и СМС
Синхронизация без блокировок и СМСAlexey Fyodorov
 
Unsafe: to be or to be removed?
Unsafe: to be or to be removed?Unsafe: to be or to be removed?
Unsafe: to be or to be removed?Alexey Fyodorov
 
Общество Мертвых Потоков
Общество Мертвых ПотоковОбщество Мертвых Потоков
Общество Мертвых ПотоковAlexey Fyodorov
 
JDK: CPU, PSU, LU, FR — WTF?!
JDK: CPU, PSU, LU, FR — WTF?!JDK: CPU, PSU, LU, FR — WTF?!
JDK: CPU, PSU, LU, FR — WTF?!Alexey Fyodorov
 
Atomics, CAS and Nonblocking algorithms
Atomics, CAS and Nonblocking algorithmsAtomics, CAS and Nonblocking algorithms
Atomics, CAS and Nonblocking algorithmsAlexey Fyodorov
 
Java Platform Tradeoffs (Riga 2013)
Java Platform Tradeoffs (Riga 2013)Java Platform Tradeoffs (Riga 2013)
Java Platform Tradeoffs (Riga 2013)Alexey Fyodorov
 
Java Platform Tradeoffs (CEE SECR 2013)
Java Platform Tradeoffs (CEE SECR 2013)Java Platform Tradeoffs (CEE SECR 2013)
Java Platform Tradeoffs (CEE SECR 2013)Alexey Fyodorov
 
Процесс изменения платформы Java
Процесс изменения платформы JavaПроцесс изменения платформы Java
Процесс изменения платформы JavaAlexey Fyodorov
 
Java: how to thrive in the changing world
Java: how to thrive in the changing worldJava: how to thrive in the changing world
Java: how to thrive in the changing worldAlexey Fyodorov
 

Plus de Alexey Fyodorov (13)

How threads help each other
How threads help each otherHow threads help each other
How threads help each other
 
Помоги ближнему, или Как потоки помогают друг другу
Помоги ближнему, или Как потоки помогают друг другуПомоги ближнему, или Как потоки помогают друг другу
Помоги ближнему, или Как потоки помогают друг другу
 
Синхронизация без блокировок и СМС
Синхронизация без блокировок и СМССинхронизация без блокировок и СМС
Синхронизация без блокировок и СМС
 
Unsafe: to be or to be removed?
Unsafe: to be or to be removed?Unsafe: to be or to be removed?
Unsafe: to be or to be removed?
 
Общество Мертвых Потоков
Общество Мертвых ПотоковОбщество Мертвых Потоков
Общество Мертвых Потоков
 
JDK: CPU, PSU, LU, FR — WTF?!
JDK: CPU, PSU, LU, FR — WTF?!JDK: CPU, PSU, LU, FR — WTF?!
JDK: CPU, PSU, LU, FR — WTF?!
 
Atomics, CAS and Nonblocking algorithms
Atomics, CAS and Nonblocking algorithmsAtomics, CAS and Nonblocking algorithms
Atomics, CAS and Nonblocking algorithms
 
Philosophers
PhilosophersPhilosophers
Philosophers
 
Java in Motion
Java in MotionJava in Motion
Java in Motion
 
Java Platform Tradeoffs (Riga 2013)
Java Platform Tradeoffs (Riga 2013)Java Platform Tradeoffs (Riga 2013)
Java Platform Tradeoffs (Riga 2013)
 
Java Platform Tradeoffs (CEE SECR 2013)
Java Platform Tradeoffs (CEE SECR 2013)Java Platform Tradeoffs (CEE SECR 2013)
Java Platform Tradeoffs (CEE SECR 2013)
 
Процесс изменения платформы Java
Процесс изменения платформы JavaПроцесс изменения платформы Java
Процесс изменения платформы Java
 
Java: how to thrive in the changing world
Java: how to thrive in the changing worldJava: how to thrive in the changing world
Java: how to thrive in the changing world
 

Dernier

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Dernier (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Non-blocking synchronization — what is it and why we (don't?) need it