SlideShare uma empresa Scribd logo
1 de 62
Java Memory Consistency Model
@LAFK_pl
Consultant @
Tomasz Borek
GeeCON 2015 Kraków!
@LAFK_pl
Consultant @
http://2015.geecon.org/register/
I'll take ALL feedback I can get.
@LAFK_pl, #JMCM
@LAFK_pl
Consultant @
Symentis
@LAFK_pl
Symentis
@LAFK_pl
Jarosław Pałka Kuba Marchwicki
Today...
● A little bragging
● Fallacy correction
● Memory model
● The Java one mostly
● Short advice what about it
● Lot of links for later reading
● Yeah, 45 minutes only :P
@LAFK_pl
Consultant @
Who knows (heard of)?
● Gene Amdahl?
● Gordon Moore?
● Leslie Lamporte?
● Bill Pugh?
● Sarita Adve?
● Hans Boehm?
● Martin Thompson?
● Aleksey Shipilev?
@LAFK_pl
Hands up, who...
● Doesn't program
● Knows Moore's law?
● Knows Amdahl's law?
● Can explain concurrency vs parallelism?
● Codes with mechanical sympathy?
● Tries to?
● Knows what mechanical sympathy is?
@LAFK_pl
Fallacy #0
@LAFK_pl
Java Memory Model is about GC, memory
management, Eden, Survivors etc.
Not true at all!
@LAFK_pl
Java Memory Model is about GC, memory
management, Eden, Survivors, etc.
@LAFK_pl
MANAGEMENT!!
@LAFK_pl
Written in 2012...
@LAFK_pl
… and still there
@LAFK_pl
Correction!
@LAFK_pl
Consultant @
JLS, section 17.4:
A memory model describes, given a program and
an execution trace of that program, whether the
execution trace is a legal execution of the
program. The Java programming language
memory model works by examining each read in
an execution trace and checking that the write
observed by that read is valid according to certain
rules.
@LAFK_pl
Consultant @
JLS, section 17.4:
A memory model describes, given a program and
an execution trace of that program, whether the
execution trace is a legal execution of the
program. The Java programming language
memory model works by examining each read in
an execution trace and checking that the write
observed by that read is valid according to
certain rules.
@LAFK_pl
Consultant @
Sarita Adve: memory consistency
model
@LAFK_pl
Consultant @
Aleksey Shipilev:
@LAFK_pl
Consultant @
Memory model answers one simple question:
What values can a particular read in a program
return?
Bill Pugh, Jeremy Manson
● Most cores have many cache layers
● What if 2 cores look at same value?
● Memory model defines when and who sees
what
● There're strong and weak models
● Strong guarantee seeing same things across whole
system
● Weak only sometimes, via barriers / fences
@LAFK_pl
Consultant @
Bill Pugh, Jeremy Manson:
What is a memory model, anyway?
At the processor level, a memory model defines
necessary and sufficient conditions for knowing
that writes to memory by other processors are
visible to the current processor, and writes by the
current processor are visible to other processors.
@LAFK_pl
Consultant @
So?
● Memory CONSISTENCY
● Allowed optimisations
● Possible executions of a (possibly
multithreaded!) program
● Which cores / threads see which values
● How to make it consistent for programmers
● What you're allowed to assume
@LAFK_pl
Consultant @
Fallacy #1
I don't need to worry about JMCM since
REALLY smart engineers crafted it.
@LAFK_pl
Consultant @
Half-true
I don't need to worry about JMCM since
REALLY smart engineers crafted it
@LAFK_pl
Consultant @
Smart, sure! But still:
● Smart people are still people
● JMCM is damn hard! Yeah, they botched it.
● Java <> JVM
● JMCM is for JVM... but with Java in mind
● NO tech is a talisman of functionality!
@LAFK_pl
Consultant @
JSR-133?
● Messed up final
● Spec not for humans
● Messed up double-locking
● Messed up volatile
● Each implementation on it's own
@LAFK_pl
Consultant @
More?
@LAFK_pl
Consultant @
JEPS-188 and JMM9?
Fallacy #2
JMCM is irrelevant for me.
@LAFK_pl
Consultant @
Depends!
● What you write and with what
● Java? Not?
● Need performance?
● What platforms?
● Multicore era...
@LAFK_pl
Consultant @
Fallacy #3
JMCM is for fanatics. I have frameworks for that.
@LAFK_pl
Consultant @
Moore's ”law”?
Consultant @Consultant @
@LAFK_pl
Moore's ”law”
I see Moore’s law dying here in the next decade
or so.
– Gordon Moore, 2015
Consultant @
@LAFK_pl
Consultant @
Amdahl's law?
@LAFK_pl
Consultant @
Amdahl's law
@LAFK_pl
The speedup of a program using multiple
processors in parallel computing is limited by the
sequential fraction of the program. For example, if
95% of the program can be parallelized, the
theoretical maximum speedup using parallel
computing would be 20× as shown in the
diagram, no matter how many processors are
used.
Consultant @
Rok 1967, Gene Amdahl states:
@LAFK_pl
For over a decade prophets have voiced the
contention that the organization of a single
computer has reached its limits and that truly
significant advances can be made only by
interconnection of a multiplicity of computers in
such a manner as to permit cooperative solution.
Consultant @
Rok 1967, Gene Amdahl states:
@LAFK_pl
For over a decade prophets have voiced the
contention that the organization of a single
computer has reached its limits and that truly
significant advances can be made only by
interconnection of a multiplicity of computers
in such a manner as to permit cooperative
solution.
Consultant @
Cores... MOAR!!
@LAFK_pl
Consultant @
Data distance
● http://i.imgur.com/k0t1e.png
So, data distance varies
@LAFK_pl
Know thyne cache lines!
Consultant @
@LAFK_pl
Consultant @
So if it matters, what then?
Where it matters
● Javac / Jython / ...
● JIT
● Hardware, duh!
● Each time: another
team
@LAFK_pl
Consultant @
Hardware
● Various ISA CPUs
● Number of registers
● Caches size or type, buses implementations
● Cache protocols (MESI, AMD's MOESI, Intel's...)
● How many functional units per CPU
● How many CPUs
● Pipeline:
● Instruction decode > address decode > memory fetch
> register fetch > compute ...
@LAFK_pl
Consultant @
Program / code optimizations?
● Reorder
● (e.g. prescient store)
● Remove what's unnecessary
● (e.g. synchronize)
● Replace instructions / shorten machine code
● Function optimizations
● (e.g. Inlining)
● ...
@LAFK_pl
Consultant @
Exemplary CPU
@LAFK_pl
Consultant @
Barriers / fences
„once memory has been pushed to the cache
then a protocol of messages will occur to
ensure all caches are coherent for any shared
data. The techniques for making memory
visible from a processor core are known as
memory barriers or fences.
– Martin Thompson, Mechanical Sympathy
differs per architecture / CPU / cache type!
@LAFK_pl
Consultant @
Barriers / Fences
● CPU instruction
● Means ”flush BUFFER now!”
● CMPXCHG (may be
lacking!)
● Forces update
● Starts cache coherency
protocols
● Read / Write / Full
@LAFK_pl
Consultant @
@LAFK_pl
Consultant @
Words of summary and gratitude
Doug Lea says:
@LAFK_pl
Consultant @
The best way is to build up a small repertoire of
constructions that you know the answers for and
then never think about the JMM rules again
unless you are forced to do so! Literally nobody
likes figuring things out of JMM rules as stated, or
can even routinely do so correctly. This is one of
the many reasons we need to overhaul JMM
someday.
Doug Lea advice:
@LAFK_pl
Consultant @
The best way is to build up a small repertoire
of constructions that you know the answers
for and then never think about the JMM rules
again unless you are forced to do so! Literally
nobody likes figuring things out of JMM rules as
stated, or can even routinely do so correctly. This
is one of the many reasons we need to overhaul
JMM someday.
Mechanical sympathy:
@LAFK_pl
Consultant @
● Cache lines misses hurt
● Going to main memory hurts
● Cycles are important
● L1, L2 caches are cheap but require cache
coherency protocols and memory barriers
● Not every hardware has all barriers
●
Gordon Moore
● Fairchild Semi-
conductors co-
founder
● ”Law author”
● Intel co-founder
@LAFK_pl
Gene Amdahl
● IBM fellow
● IBM & Amdahl
mainframes
● Coined law in 1967
@LAFK_pl
Leslie Lamport
● Distributed system
clocks
● Happens before
● Sequential
consistency
@LAFK_pl
Bill Pugh
● FindBugs
● Java Memory Model
is broken
● Final - Volatile
● Double-checked
locking
● ”New” JMM
@LAFK_pl
Sarita Adve
● Java Memory Model
is broken
● Great many MCM
papers
● Best MCM def I found
@LAFK_pl
Martin Thompson
● Mechanical sympathy
blog & mailing list
● Aeron protocol
● Mechanical sympathy
proponent
@LAFK_pl
This wouldn't have happened if not
● Jarek Pałka, who kicked me out here some
time ago
● Those folks, who said ”make more” after the
lightning talk I've done
● Java Day Kiev 2014
@LAFK_pl
Consultant @
Not possible without:
● Leslie Lamport's works on distributed sistems
● Bill Pugh's work on JSR-133!
http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html
● Sarita Adve's paperts, especially shared MCM
tutorial:
http://www.hpl.hp.com/techreports/Compaq-DEC/WRL-95-7.pdf
@LAFK_pl
Consultant @
Terrific – and tough - reading
● Martin Thompson: Mechanical Sympathy (mailing list & blog)
● JEPS 188: http://openjdk.java.net/jeps/188
● Goetz et al: "Java Concurrency in Practice"
● Herilhy, Shavit, "The Art of Multiprocessor Programming"
● Adve, "Shared Memory Consistency Models: A Tutorial"
● Manson, "Special PoPL Issue: The Java Memory Model"
● Huisman, Petri, "JMM: A Formal Explanation"
● Aleksey Shipilev blog post: http://shipilev.net/blog/2014/jmm-pragmatics/
@LAFK_pl
Consultant @
Laws and related:
● Moore's ”law”:
http://www.cs.utexas.edu/~fussell/courses/cs352h/papers/moore.pdf
● Rock's law: http://en.wikipedia.org/wiki/Rock's_law
● Amdahl's law:
● http://en.wikipedia.org/wiki/Amdahl%27s_law
● Validity of the Single-Processor Approach to Achieving Large-Scale Computing
Capabilities AFIPS Press, 1967
●
J.L. Gustafson, “Reevaluating Amdahl’s Law,” Comm. ACM, May 1988
● Pleasantly parallel problems:
http://en.wikipedia.org/wiki/Embarrassingly_parallel
@LAFK_pl
Consultant @
Special thanks
● Konrad Malawski and Tomek Kowalczewski,
these guys really dig that stuff
● Bartosz Milewski who helped me rediscover
Hans Boehm
@LAFK_pl
Consultant @
YOU! You persevered through!
@LAFK_pl
Consultant @

Mais conteúdo relacionado

Destaque

Java gc
Java gcJava gc
Java gcNiit
 
Java GC - Pause tuning
Java GC - Pause tuningJava GC - Pause tuning
Java GC - Pause tuningekino
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
 
Java Garbage Collection(GC)- Study
Java Garbage Collection(GC)- StudyJava Garbage Collection(GC)- Study
Java Garbage Collection(GC)- StudyDhanu Gupta
 
Николай Папирный Тема: "Java memory model для простых смертных"
Николай Папирный Тема: "Java memory model для простых смертных"Николай Папирный Тема: "Java memory model для простых смертных"
Николай Папирный Тема: "Java memory model для простых смертных"Ciklum Minsk
 
Java gc and JVM optimization
Java gc  and JVM optimizationJava gc  and JVM optimization
Java gc and JVM optimizationRajan Jethva
 
What you need to know about GC
What you need to know about GCWhat you need to know about GC
What you need to know about GCKelum Senanayake
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesSergey Podolsky
 
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationGC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationLudovic Poitou
 

Destaque (20)

[BGOUG] Java GC - Friend or Foe
[BGOUG] Java GC - Friend or Foe[BGOUG] Java GC - Friend or Foe
[BGOUG] Java GC - Friend or Foe
 
Java gc
Java gcJava gc
Java gc
 
Java GC - Pause tuning
Java GC - Pause tuningJava GC - Pause tuning
Java GC - Pause tuning
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Java Garbage Collection(GC)- Study
Java Garbage Collection(GC)- StudyJava Garbage Collection(GC)- Study
Java Garbage Collection(GC)- Study
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Николай Папирный Тема: "Java memory model для простых смертных"
Николай Папирный Тема: "Java memory model для простых смертных"Николай Папирный Тема: "Java memory model для простых смертных"
Николай Папирный Тема: "Java memory model для простых смертных"
 
Java Memory Model
Java Memory ModelJava Memory Model
Java Memory Model
 
Java gc and JVM optimization
Java gc  and JVM optimizationJava gc  and JVM optimization
Java gc and JVM optimization
 
What you need to know about GC
What you need to know about GCWhat you need to know about GC
What you need to know about GC
 
Java memory model
Java memory modelJava memory model
Java memory model
 
The Java Memory Model
The Java Memory ModelThe Java Memory Model
The Java Memory Model
 
Java GC, Off-heap workshop
Java GC, Off-heap workshopJava GC, Off-heap workshop
Java GC, Off-heap workshop
 
How long can you afford to Stop The World?
How long can you afford to Stop The World?How long can you afford to Stop The World?
How long can you afford to Stop The World?
 
JVM及其调优
JVM及其调优JVM及其调优
JVM及其调优
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issues
 
The Java memory model made easy
The Java memory model made easyThe Java memory model made easy
The Java memory model made easy
 
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationGC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
 

Semelhante a Java Memory Consistency Model - concepts and context

Automate your Job and Business with ChatGPT #3 - Fundamentals of LLM/GPT
Automate your Job and Business with ChatGPT #3 - Fundamentals of LLM/GPTAutomate your Job and Business with ChatGPT #3 - Fundamentals of LLM/GPT
Automate your Job and Business with ChatGPT #3 - Fundamentals of LLM/GPTAnant Corporation
 
Java Memory (Consistency) Model - Polish JUG One Beer Talk #2
Java Memory (Consistency) Model - Polish JUG One Beer Talk #2Java Memory (Consistency) Model - Polish JUG One Beer Talk #2
Java Memory (Consistency) Model - Polish JUG One Beer Talk #2Tomek Borek
 
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014Tomek Borek
 
Episode 2: The LLM / GPT / AI Prompt / Data Engineer Roadmap
Episode 2: The LLM / GPT / AI Prompt / Data Engineer RoadmapEpisode 2: The LLM / GPT / AI Prompt / Data Engineer Roadmap
Episode 2: The LLM / GPT / AI Prompt / Data Engineer RoadmapAnant Corporation
 
It is difficult
It is difficultIt is difficult
It is difficultPVS-Studio
 
LangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AILangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AIOzgurOscarOzkan
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN FrameworkKeymate.AI
 
What drives Innovation? Innovations And Technological Solutions for the Distr...
What drives Innovation? Innovations And Technological Solutions for the Distr...What drives Innovation? Innovations And Technological Solutions for the Distr...
What drives Innovation? Innovations And Technological Solutions for the Distr...Stefano Fago
 
Enterprise Blockchain Developer Experience
Enterprise Blockchain Developer ExperienceEnterprise Blockchain Developer Experience
Enterprise Blockchain Developer ExperienceMofizur Rahman
 
Introducing Pair Programming
Introducing Pair ProgrammingIntroducing Pair Programming
Introducing Pair ProgrammingSteven Smith
 
Parallelization using open mp
Parallelization using open mpParallelization using open mp
Parallelization using open mpranjit banshpal
 
Getting started contributing to Apache Spark
Getting started contributing to Apache SparkGetting started contributing to Apache Spark
Getting started contributing to Apache SparkHolden Karau
 
Voxxed Athens 2018 - Methods and Practices for Guaranteed Failure in Big Data
Voxxed Athens 2018 - Methods and Practices for Guaranteed Failure in Big DataVoxxed Athens 2018 - Methods and Practices for Guaranteed Failure in Big Data
Voxxed Athens 2018 - Methods and Practices for Guaranteed Failure in Big DataVoxxed Athens
 
Instant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and PuppetInstant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and PuppetPatrick Lee
 
DevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesDevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesAlex Cruise
 
Effective cplusplus
Effective cplusplusEffective cplusplus
Effective cplusplusMark Veltzer
 

Semelhante a Java Memory Consistency Model - concepts and context (20)

Automate your Job and Business with ChatGPT #3 - Fundamentals of LLM/GPT
Automate your Job and Business with ChatGPT #3 - Fundamentals of LLM/GPTAutomate your Job and Business with ChatGPT #3 - Fundamentals of LLM/GPT
Automate your Job and Business with ChatGPT #3 - Fundamentals of LLM/GPT
 
Java Memory (Consistency) Model - Polish JUG One Beer Talk #2
Java Memory (Consistency) Model - Polish JUG One Beer Talk #2Java Memory (Consistency) Model - Polish JUG One Beer Talk #2
Java Memory (Consistency) Model - Polish JUG One Beer Talk #2
 
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
Lightning talk on Java Memory Consistency Model Java Day Kiev 2014
 
Caveats
CaveatsCaveats
Caveats
 
Thinking Functionally
Thinking FunctionallyThinking Functionally
Thinking Functionally
 
Episode 2: The LLM / GPT / AI Prompt / Data Engineer Roadmap
Episode 2: The LLM / GPT / AI Prompt / Data Engineer RoadmapEpisode 2: The LLM / GPT / AI Prompt / Data Engineer Roadmap
Episode 2: The LLM / GPT / AI Prompt / Data Engineer Roadmap
 
It is difficult
It is difficultIt is difficult
It is difficult
 
LangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AILangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AI
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN Framework
 
What drives Innovation? Innovations And Technological Solutions for the Distr...
What drives Innovation? Innovations And Technological Solutions for the Distr...What drives Innovation? Innovations And Technological Solutions for the Distr...
What drives Innovation? Innovations And Technological Solutions for the Distr...
 
Enterprise Blockchain Developer Experience
Enterprise Blockchain Developer ExperienceEnterprise Blockchain Developer Experience
Enterprise Blockchain Developer Experience
 
Introducing Pair Programming
Introducing Pair ProgrammingIntroducing Pair Programming
Introducing Pair Programming
 
Parallelization using open mp
Parallelization using open mpParallelization using open mp
Parallelization using open mp
 
Getting started contributing to Apache Spark
Getting started contributing to Apache SparkGetting started contributing to Apache Spark
Getting started contributing to Apache Spark
 
Presentation
PresentationPresentation
Presentation
 
Voxxed Athens 2018 - Methods and Practices for Guaranteed Failure in Big Data
Voxxed Athens 2018 - Methods and Practices for Guaranteed Failure in Big DataVoxxed Athens 2018 - Methods and Practices for Guaranteed Failure in Big Data
Voxxed Athens 2018 - Methods and Practices for Guaranteed Failure in Big Data
 
Instant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and PuppetInstant LAMP Stack with Vagrant and Puppet
Instant LAMP Stack with Vagrant and Puppet
 
DevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesDevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 Slides
 
Skillswap - Back To Basics
Skillswap - Back To BasicsSkillswap - Back To Basics
Skillswap - Back To Basics
 
Effective cplusplus
Effective cplusplusEffective cplusplus
Effective cplusplus
 

Mais de Tomek Borek

Noc informatyka - co ja wiem o testowaniu
Noc informatyka - co ja wiem  o testowaniuNoc informatyka - co ja wiem  o testowaniu
Noc informatyka - co ja wiem o testowaniuTomek Borek
 
Teaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTeaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTomek Borek
 
Nowoczesne architektury
Nowoczesne architekturyNowoczesne architektury
Nowoczesne architekturyTomek Borek
 
Java tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy devJava tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy devTomek Borek
 
Jvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGJvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGTomek Borek
 
Seeing through the smoke
Seeing through the smokeSeeing through the smoke
Seeing through the smokeTomek Borek
 
AR drone - Polish JUG short demo
AR drone - Polish JUG short demoAR drone - Polish JUG short demo
AR drone - Polish JUG short demoTomek Borek
 
Testing SAAS, how to go about it?
Testing SAAS, how to go about it?Testing SAAS, how to go about it?
Testing SAAS, how to go about it?Tomek Borek
 
Spróbujmy szczęścia bo zaciskanie pięści nie działa
Spróbujmy szczęścia bo zaciskanie pięści nie działaSpróbujmy szczęścia bo zaciskanie pięści nie działa
Spróbujmy szczęścia bo zaciskanie pięści nie działaTomek Borek
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Tomek Borek
 
Few words about happiness (Polish talk) / O szczęściu słów kilka
Few words about happiness (Polish talk) / O szczęściu słów kilkaFew words about happiness (Polish talk) / O szczęściu słów kilka
Few words about happiness (Polish talk) / O szczęściu słów kilkaTomek Borek
 
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"Tomek Borek
 
It's not always the application's fault
It's not always the application's faultIt's not always the application's fault
It's not always the application's faultTomek Borek
 
To nie zawsze wina aplikacji!
To nie zawsze wina aplikacji!To nie zawsze wina aplikacji!
To nie zawsze wina aplikacji!Tomek Borek
 
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...Tomek Borek
 
Git nie dla początkujących
Git nie dla początkującychGit nie dla początkujących
Git nie dla początkującychTomek Borek
 
Architecture visualizers - tools usability study
Architecture visualizers - tools usability studyArchitecture visualizers - tools usability study
Architecture visualizers - tools usability studyTomek Borek
 
Meta on HCI - keyword analysis and trends
Meta on HCI - keyword analysis and trendsMeta on HCI - keyword analysis and trends
Meta on HCI - keyword analysis and trendsTomek Borek
 
"Narco" emotions - description of study on whether Twitter can be used to gle...
"Narco" emotions - description of study on whether Twitter can be used to gle..."Narco" emotions - description of study on whether Twitter can be used to gle...
"Narco" emotions - description of study on whether Twitter can be used to gle...Tomek Borek
 
Polish Java User Group - One Beer Talks - Ubung macht den Meister
Polish Java User Group - One Beer Talks -  Ubung macht den MeisterPolish Java User Group - One Beer Talks -  Ubung macht den Meister
Polish Java User Group - One Beer Talks - Ubung macht den MeisterTomek Borek
 

Mais de Tomek Borek (20)

Noc informatyka - co ja wiem o testowaniu
Noc informatyka - co ja wiem  o testowaniuNoc informatyka - co ja wiem  o testowaniu
Noc informatyka - co ja wiem o testowaniu
 
Teaching PostgreSQL to new people
Teaching PostgreSQL to new peopleTeaching PostgreSQL to new people
Teaching PostgreSQL to new people
 
Nowoczesne architektury
Nowoczesne architekturyNowoczesne architektury
Nowoczesne architektury
 
Java tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy devJava tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy dev
 
Jvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGJvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUG
 
Seeing through the smoke
Seeing through the smokeSeeing through the smoke
Seeing through the smoke
 
AR drone - Polish JUG short demo
AR drone - Polish JUG short demoAR drone - Polish JUG short demo
AR drone - Polish JUG short demo
 
Testing SAAS, how to go about it?
Testing SAAS, how to go about it?Testing SAAS, how to go about it?
Testing SAAS, how to go about it?
 
Spróbujmy szczęścia bo zaciskanie pięści nie działa
Spróbujmy szczęścia bo zaciskanie pięści nie działaSpróbujmy szczęścia bo zaciskanie pięści nie działa
Spróbujmy szczęścia bo zaciskanie pięści nie działa
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
 
Few words about happiness (Polish talk) / O szczęściu słów kilka
Few words about happiness (Polish talk) / O szczęściu słów kilkaFew words about happiness (Polish talk) / O szczęściu słów kilka
Few words about happiness (Polish talk) / O szczęściu słów kilka
 
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
Jak użytecznie, prawdziwie i solidnie odpowiedzieć na pytanie "jak było"
 
It's not always the application's fault
It's not always the application's faultIt's not always the application's fault
It's not always the application's fault
 
To nie zawsze wina aplikacji!
To nie zawsze wina aplikacji!To nie zawsze wina aplikacji!
To nie zawsze wina aplikacji!
 
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
Wprowadzenie do optymalizacji wielokryterialnej / Intro to multicriteria opti...
 
Git nie dla początkujących
Git nie dla początkującychGit nie dla początkujących
Git nie dla początkujących
 
Architecture visualizers - tools usability study
Architecture visualizers - tools usability studyArchitecture visualizers - tools usability study
Architecture visualizers - tools usability study
 
Meta on HCI - keyword analysis and trends
Meta on HCI - keyword analysis and trendsMeta on HCI - keyword analysis and trends
Meta on HCI - keyword analysis and trends
 
"Narco" emotions - description of study on whether Twitter can be used to gle...
"Narco" emotions - description of study on whether Twitter can be used to gle..."Narco" emotions - description of study on whether Twitter can be used to gle...
"Narco" emotions - description of study on whether Twitter can be used to gle...
 
Polish Java User Group - One Beer Talks - Ubung macht den Meister
Polish Java User Group - One Beer Talks -  Ubung macht den MeisterPolish Java User Group - One Beer Talks -  Ubung macht den Meister
Polish Java User Group - One Beer Talks - Ubung macht den Meister
 

Último

Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersMairaAshraf6
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 

Último (20)

Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 

Java Memory Consistency Model - concepts and context

  • 1. Java Memory Consistency Model @LAFK_pl Consultant @ Tomasz Borek
  • 2. GeeCON 2015 Kraków! @LAFK_pl Consultant @ http://2015.geecon.org/register/
  • 3. I'll take ALL feedback I can get. @LAFK_pl, #JMCM @LAFK_pl Consultant @
  • 6. Today... ● A little bragging ● Fallacy correction ● Memory model ● The Java one mostly ● Short advice what about it ● Lot of links for later reading ● Yeah, 45 minutes only :P @LAFK_pl Consultant @
  • 7. Who knows (heard of)? ● Gene Amdahl? ● Gordon Moore? ● Leslie Lamporte? ● Bill Pugh? ● Sarita Adve? ● Hans Boehm? ● Martin Thompson? ● Aleksey Shipilev? @LAFK_pl
  • 8. Hands up, who... ● Doesn't program ● Knows Moore's law? ● Knows Amdahl's law? ● Can explain concurrency vs parallelism? ● Codes with mechanical sympathy? ● Tries to? ● Knows what mechanical sympathy is? @LAFK_pl
  • 9. Fallacy #0 @LAFK_pl Java Memory Model is about GC, memory management, Eden, Survivors etc.
  • 10. Not true at all! @LAFK_pl Java Memory Model is about GC, memory management, Eden, Survivors, etc.
  • 14. … and still there @LAFK_pl
  • 16. JLS, section 17.4: A memory model describes, given a program and an execution trace of that program, whether the execution trace is a legal execution of the program. The Java programming language memory model works by examining each read in an execution trace and checking that the write observed by that read is valid according to certain rules. @LAFK_pl Consultant @
  • 17. JLS, section 17.4: A memory model describes, given a program and an execution trace of that program, whether the execution trace is a legal execution of the program. The Java programming language memory model works by examining each read in an execution trace and checking that the write observed by that read is valid according to certain rules. @LAFK_pl Consultant @
  • 18. Sarita Adve: memory consistency model @LAFK_pl Consultant @
  • 19. Aleksey Shipilev: @LAFK_pl Consultant @ Memory model answers one simple question: What values can a particular read in a program return?
  • 20. Bill Pugh, Jeremy Manson ● Most cores have many cache layers ● What if 2 cores look at same value? ● Memory model defines when and who sees what ● There're strong and weak models ● Strong guarantee seeing same things across whole system ● Weak only sometimes, via barriers / fences @LAFK_pl Consultant @
  • 21. Bill Pugh, Jeremy Manson: What is a memory model, anyway? At the processor level, a memory model defines necessary and sufficient conditions for knowing that writes to memory by other processors are visible to the current processor, and writes by the current processor are visible to other processors. @LAFK_pl Consultant @
  • 22. So? ● Memory CONSISTENCY ● Allowed optimisations ● Possible executions of a (possibly multithreaded!) program ● Which cores / threads see which values ● How to make it consistent for programmers ● What you're allowed to assume @LAFK_pl Consultant @
  • 23. Fallacy #1 I don't need to worry about JMCM since REALLY smart engineers crafted it. @LAFK_pl Consultant @
  • 24. Half-true I don't need to worry about JMCM since REALLY smart engineers crafted it @LAFK_pl Consultant @
  • 25. Smart, sure! But still: ● Smart people are still people ● JMCM is damn hard! Yeah, they botched it. ● Java <> JVM ● JMCM is for JVM... but with Java in mind ● NO tech is a talisman of functionality! @LAFK_pl Consultant @
  • 26. JSR-133? ● Messed up final ● Spec not for humans ● Messed up double-locking ● Messed up volatile ● Each implementation on it's own @LAFK_pl Consultant @
  • 28. Fallacy #2 JMCM is irrelevant for me. @LAFK_pl Consultant @
  • 29. Depends! ● What you write and with what ● Java? Not? ● Need performance? ● What platforms? ● Multicore era... @LAFK_pl Consultant @
  • 30. Fallacy #3 JMCM is for fanatics. I have frameworks for that. @LAFK_pl Consultant @
  • 32. Moore's ”law” I see Moore’s law dying here in the next decade or so. – Gordon Moore, 2015 Consultant @ @LAFK_pl Consultant @
  • 34. Amdahl's law @LAFK_pl The speedup of a program using multiple processors in parallel computing is limited by the sequential fraction of the program. For example, if 95% of the program can be parallelized, the theoretical maximum speedup using parallel computing would be 20× as shown in the diagram, no matter how many processors are used. Consultant @
  • 35. Rok 1967, Gene Amdahl states: @LAFK_pl For over a decade prophets have voiced the contention that the organization of a single computer has reached its limits and that truly significant advances can be made only by interconnection of a multiplicity of computers in such a manner as to permit cooperative solution. Consultant @
  • 36. Rok 1967, Gene Amdahl states: @LAFK_pl For over a decade prophets have voiced the contention that the organization of a single computer has reached its limits and that truly significant advances can be made only by interconnection of a multiplicity of computers in such a manner as to permit cooperative solution. Consultant @
  • 39. So, data distance varies @LAFK_pl Know thyne cache lines! Consultant @
  • 40. @LAFK_pl Consultant @ So if it matters, what then?
  • 41. Where it matters ● Javac / Jython / ... ● JIT ● Hardware, duh! ● Each time: another team @LAFK_pl Consultant @
  • 42. Hardware ● Various ISA CPUs ● Number of registers ● Caches size or type, buses implementations ● Cache protocols (MESI, AMD's MOESI, Intel's...) ● How many functional units per CPU ● How many CPUs ● Pipeline: ● Instruction decode > address decode > memory fetch > register fetch > compute ... @LAFK_pl Consultant @
  • 43. Program / code optimizations? ● Reorder ● (e.g. prescient store) ● Remove what's unnecessary ● (e.g. synchronize) ● Replace instructions / shorten machine code ● Function optimizations ● (e.g. Inlining) ● ... @LAFK_pl Consultant @
  • 45. Barriers / fences „once memory has been pushed to the cache then a protocol of messages will occur to ensure all caches are coherent for any shared data. The techniques for making memory visible from a processor core are known as memory barriers or fences. – Martin Thompson, Mechanical Sympathy differs per architecture / CPU / cache type! @LAFK_pl Consultant @
  • 46. Barriers / Fences ● CPU instruction ● Means ”flush BUFFER now!” ● CMPXCHG (may be lacking!) ● Forces update ● Starts cache coherency protocols ● Read / Write / Full @LAFK_pl Consultant @
  • 47. @LAFK_pl Consultant @ Words of summary and gratitude
  • 48. Doug Lea says: @LAFK_pl Consultant @ The best way is to build up a small repertoire of constructions that you know the answers for and then never think about the JMM rules again unless you are forced to do so! Literally nobody likes figuring things out of JMM rules as stated, or can even routinely do so correctly. This is one of the many reasons we need to overhaul JMM someday.
  • 49. Doug Lea advice: @LAFK_pl Consultant @ The best way is to build up a small repertoire of constructions that you know the answers for and then never think about the JMM rules again unless you are forced to do so! Literally nobody likes figuring things out of JMM rules as stated, or can even routinely do so correctly. This is one of the many reasons we need to overhaul JMM someday.
  • 50. Mechanical sympathy: @LAFK_pl Consultant @ ● Cache lines misses hurt ● Going to main memory hurts ● Cycles are important ● L1, L2 caches are cheap but require cache coherency protocols and memory barriers ● Not every hardware has all barriers ●
  • 51. Gordon Moore ● Fairchild Semi- conductors co- founder ● ”Law author” ● Intel co-founder @LAFK_pl
  • 52. Gene Amdahl ● IBM fellow ● IBM & Amdahl mainframes ● Coined law in 1967 @LAFK_pl
  • 53. Leslie Lamport ● Distributed system clocks ● Happens before ● Sequential consistency @LAFK_pl
  • 54. Bill Pugh ● FindBugs ● Java Memory Model is broken ● Final - Volatile ● Double-checked locking ● ”New” JMM @LAFK_pl
  • 55. Sarita Adve ● Java Memory Model is broken ● Great many MCM papers ● Best MCM def I found @LAFK_pl
  • 56. Martin Thompson ● Mechanical sympathy blog & mailing list ● Aeron protocol ● Mechanical sympathy proponent @LAFK_pl
  • 57. This wouldn't have happened if not ● Jarek Pałka, who kicked me out here some time ago ● Those folks, who said ”make more” after the lightning talk I've done ● Java Day Kiev 2014 @LAFK_pl Consultant @
  • 58. Not possible without: ● Leslie Lamport's works on distributed sistems ● Bill Pugh's work on JSR-133! http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html ● Sarita Adve's paperts, especially shared MCM tutorial: http://www.hpl.hp.com/techreports/Compaq-DEC/WRL-95-7.pdf @LAFK_pl Consultant @
  • 59. Terrific – and tough - reading ● Martin Thompson: Mechanical Sympathy (mailing list & blog) ● JEPS 188: http://openjdk.java.net/jeps/188 ● Goetz et al: "Java Concurrency in Practice" ● Herilhy, Shavit, "The Art of Multiprocessor Programming" ● Adve, "Shared Memory Consistency Models: A Tutorial" ● Manson, "Special PoPL Issue: The Java Memory Model" ● Huisman, Petri, "JMM: A Formal Explanation" ● Aleksey Shipilev blog post: http://shipilev.net/blog/2014/jmm-pragmatics/ @LAFK_pl Consultant @
  • 60. Laws and related: ● Moore's ”law”: http://www.cs.utexas.edu/~fussell/courses/cs352h/papers/moore.pdf ● Rock's law: http://en.wikipedia.org/wiki/Rock's_law ● Amdahl's law: ● http://en.wikipedia.org/wiki/Amdahl%27s_law ● Validity of the Single-Processor Approach to Achieving Large-Scale Computing Capabilities AFIPS Press, 1967 ● J.L. Gustafson, “Reevaluating Amdahl’s Law,” Comm. ACM, May 1988 ● Pleasantly parallel problems: http://en.wikipedia.org/wiki/Embarrassingly_parallel @LAFK_pl Consultant @
  • 61. Special thanks ● Konrad Malawski and Tomek Kowalczewski, these guys really dig that stuff ● Bartosz Milewski who helped me rediscover Hans Boehm @LAFK_pl Consultant @
  • 62. YOU! You persevered through! @LAFK_pl Consultant @