Mais conteúdo relacionado Semelhante a On Concurrency and Parallelism in the JVMverse (20) Mais de Russel Winder (20) On Concurrency and Parallelism in the JVMverse1. Copyright © 2018 Russel Winder 1
On Concurrency and Parallelism
in the JVMVerse
Russel Winder
@russel_winder
russel@winder.org.uk
https://www.russel.org.uk
2. Copyright © 2018 Russel Winder 2
The Presenter
● Ex theoretical physicist
● Ex UNIX systems programmer
●
Ex academic:
– Parallel programming
– Software development and programming
– HCI, UI, UX
● Ex Company director
● Ex Independent consultant
● Ex analyst
● Ex author
● Ex expert witness
● Ex trainer
Russel Winder
3. Copyright © 2018 Russel Winder 3
Me at Previous JAXLondons
● 2011
”Just Keep Passing the
Messages”
● 2012
”it’S All About Processes
Communicating”
Also many sessions at other conferences
4. Copyright © 2018 Russel Winder 4
Concurrency
●
dictionary.com – concurrence
– the act of concurring.
– accordance in opinion; agreement:
With the concurrence of several
specialists, our doctor
recommended surgery.
– cooperation, as of agents or
causes; combined action or effort.
● Wikipedia – concurrency
– In computer science,
concurrency refers to the ability
of different parts or units of a
program, algorithm, or problem to
be executed out-of-order or in
partial order, without affecting
the final outcome.
5. Copyright © 2018 Russel Winder 5
Parallelism
● dictionary.com – parallelism
– the position or relation of
parallels.
– agreement in direction, tendency,
or character; the state or
condition of being parallel.
– a parallel or comparison.
● Wikipedia – parallelism
– Parallel computing is a type
of computation in which
many calculations or the
execution of processes are
carried out simultaneously.
6. Copyright © 2018 Russel Winder 6
Original computing:
single CPU, single program
9. Copyright © 2018 Russel Winder 9
OS manages all the programs in one memory,
eventually get virtual memory, in the mean time locks,
semaphores, monitors, mutexes, and the theory of
concurrency get invented.
12. Copyright © 2018 Russel Winder 12
Moving from operating systems
to applications
17. Copyright © 2018 Russel Winder 17
Locks, mutexes, sempahores, monitors
are the enemy of parallelism
20. Copyright © 2018 Russel Winder 20
A Bit of Java History
● 1995 — Java introduces threads, multithreading, monitors,
synchronized, locks, etc.
● 1996 — People predict lots of tears and grief.
● 2002 —Doug Lea gets JSR166 moving.
● 2011 — Fork/Join framework in Java 7.
21. Copyright © 2018 Russel Winder 21
A Bit More Java History
● 2014 — Java 8 introduces:
– Lambda Expressions,
– Streams, and
– CompletableFuture.
22. Copyright © 2018 Russel Winder 22
Abstract code away from the details of
managing concurrency and parallelism.
29. Copyright © 2018 Russel Winder 29
Independent processes/tasks/programs
communicating by message passing
34. Copyright © 2018 Russel Winder 34
Summary
● Gpars (Groovy)
● Quasar
● Kotlin Coroutines
Can Java catch up (again).
35. Copyright © 2018 Russel Winder 35
On Concurrency and Parallelism
in the JVMVerse
Russel Winder
@russel_winder
russel@winder.org.uk
https://www.russel.org.uk