Submit Search
Upload
GPars Workshop
•
2 likes
•
1,571 views
Russel Winder
Follow
Material for the GPars Workshop held at Greach 2013, Madrid 2012-01-26T11:45+01:00
Read less
Read more
Technology
Report
Share
Report
Share
1 of 90
Download now
Download to read offline
Recommended
Why Go is an important programming language
Why Go is an important programming language
Russel Winder
Just Keep Sending The Messages
Just Keep Sending The Messages
Russel Winder
It's all about processes communicating - Russel Winder
It's all about processes communicating - Russel Winder
JAX London
It's All About Processes Communicating
It's All About Processes Communicating
Russel Winder
Just Keep Passing the Messages from Groovy and Grails eXchange 2011
Just Keep Passing the Messages from Groovy and Grails eXchange 2011
Russel Winder
Just Keep Sending The Messages
Just Keep Sending The Messages
Russel Winder
Java Tech & Tools | Just Keep Passing the Message | Russel Winder
Java Tech & Tools | Just Keep Passing the Message | Russel Winder
JAX London
Just Keep Passing The Messages
Just Keep Passing The Messages
Russel Winder
Recommended
Why Go is an important programming language
Why Go is an important programming language
Russel Winder
Just Keep Sending The Messages
Just Keep Sending The Messages
Russel Winder
It's all about processes communicating - Russel Winder
It's all about processes communicating - Russel Winder
JAX London
It's All About Processes Communicating
It's All About Processes Communicating
Russel Winder
Just Keep Passing the Messages from Groovy and Grails eXchange 2011
Just Keep Passing the Messages from Groovy and Grails eXchange 2011
Russel Winder
Just Keep Sending The Messages
Just Keep Sending The Messages
Russel Winder
Java Tech & Tools | Just Keep Passing the Message | Russel Winder
Java Tech & Tools | Just Keep Passing the Message | Russel Winder
JAX London
Just Keep Passing The Messages
Just Keep Passing The Messages
Russel Winder
ACCU 2012: Go, D, C++ and The Multicore Revolution
ACCU 2012: Go, D, C++ and The Multicore Revolution
Russel Winder
On Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverse
Russel Winder
Testing: Python, Java, Groovy, etc.
Testing: Python, Java, Groovy, etc.
Russel Winder
Switch to Python 3…now…immediately
Switch to Python 3…now…immediately
Russel Winder
GPars: Parallelism the Right Way
GPars: Parallelism the Right Way
Russel Winder
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you need
Russel Winder
GPars 2014
GPars 2014
Russel Winder
Gant, the lightweight and Groovy targeted scripting framework
Gant, the lightweight and Groovy targeted scripting framework
Skills Matter
CAP and the Architectural Consequences by martin Schönert
CAP and the Architectural Consequences by martin Schönert
ArangoDB Database
Security & Compliance in the Cloud - Hadoop Magazine Column Version 1.2 by Ja...
Security & Compliance in the Cloud - Hadoop Magazine Column Version 1.2 by Ja...
Jarrett Neil Ridlinghafer
Federated Learning
Federated Learning
DataWorks Summit
Scaling Small App
Scaling Small App
Sabbir Ahmmed
Omg dds berlin 2013
Omg dds berlin 2013
José Ramón Martínez Salio
GPars Remoting
GPars Remoting
Russel Winder
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
ploibl
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
JAXLondon2014
SOLVING LVC INTEROPERABILITY PROBLEMS WITH SIMWARE
SOLVING LVC INTEROPERABILITY PROBLEMS WITH SIMWARE
Simware
Cloud expo 10 myths rex wang oracle ss
Cloud expo 10 myths rex wang oracle ss
Rex Wang
DDS Made Simple
DDS Made Simple
Angelo Corsaro
OWD2011 - 7 - Uw datacentrum naar de cloud - Rogier Spoor
OWD2011 - 7 - Uw datacentrum naar de cloud - Rogier Spoor
SURF Events
The Case for Kotlin and Ceylon
The Case for Kotlin and Ceylon
Russel Winder
On the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layer
Russel Winder
More Related Content
Similar to GPars Workshop
ACCU 2012: Go, D, C++ and The Multicore Revolution
ACCU 2012: Go, D, C++ and The Multicore Revolution
Russel Winder
On Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverse
Russel Winder
Testing: Python, Java, Groovy, etc.
Testing: Python, Java, Groovy, etc.
Russel Winder
Switch to Python 3…now…immediately
Switch to Python 3…now…immediately
Russel Winder
GPars: Parallelism the Right Way
GPars: Parallelism the Right Way
Russel Winder
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you need
Russel Winder
GPars 2014
GPars 2014
Russel Winder
Gant, the lightweight and Groovy targeted scripting framework
Gant, the lightweight and Groovy targeted scripting framework
Skills Matter
CAP and the Architectural Consequences by martin Schönert
CAP and the Architectural Consequences by martin Schönert
ArangoDB Database
Security & Compliance in the Cloud - Hadoop Magazine Column Version 1.2 by Ja...
Security & Compliance in the Cloud - Hadoop Magazine Column Version 1.2 by Ja...
Jarrett Neil Ridlinghafer
Federated Learning
Federated Learning
DataWorks Summit
Scaling Small App
Scaling Small App
Sabbir Ahmmed
Omg dds berlin 2013
Omg dds berlin 2013
José Ramón Martínez Salio
GPars Remoting
GPars Remoting
Russel Winder
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
ploibl
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
JAXLondon2014
SOLVING LVC INTEROPERABILITY PROBLEMS WITH SIMWARE
SOLVING LVC INTEROPERABILITY PROBLEMS WITH SIMWARE
Simware
Cloud expo 10 myths rex wang oracle ss
Cloud expo 10 myths rex wang oracle ss
Rex Wang
DDS Made Simple
DDS Made Simple
Angelo Corsaro
OWD2011 - 7 - Uw datacentrum naar de cloud - Rogier Spoor
OWD2011 - 7 - Uw datacentrum naar de cloud - Rogier Spoor
SURF Events
Similar to GPars Workshop
(20)
ACCU 2012: Go, D, C++ and The Multicore Revolution
ACCU 2012: Go, D, C++ and The Multicore Revolution
On Concurrency and Parallelism in the JVMverse
On Concurrency and Parallelism in the JVMverse
Testing: Python, Java, Groovy, etc.
Testing: Python, Java, Groovy, etc.
Switch to Python 3…now…immediately
Switch to Python 3…now…immediately
GPars: Parallelism the Right Way
GPars: Parallelism the Right Way
Dataflow: the concurrency/parallelism architecture you need
Dataflow: the concurrency/parallelism architecture you need
GPars 2014
GPars 2014
Gant, the lightweight and Groovy targeted scripting framework
Gant, the lightweight and Groovy targeted scripting framework
CAP and the Architectural Consequences by martin Schönert
CAP and the Architectural Consequences by martin Schönert
Security & Compliance in the Cloud - Hadoop Magazine Column Version 1.2 by Ja...
Security & Compliance in the Cloud - Hadoop Magazine Column Version 1.2 by Ja...
Federated Learning
Federated Learning
Scaling Small App
Scaling Small App
Omg dds berlin 2013
Omg dds berlin 2013
GPars Remoting
GPars Remoting
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
SOLVING LVC INTEROPERABILITY PROBLEMS WITH SIMWARE
SOLVING LVC INTEROPERABILITY PROBLEMS WITH SIMWARE
Cloud expo 10 myths rex wang oracle ss
Cloud expo 10 myths rex wang oracle ss
DDS Made Simple
DDS Made Simple
OWD2011 - 7 - Uw datacentrum naar de cloud - Rogier Spoor
OWD2011 - 7 - Uw datacentrum naar de cloud - Rogier Spoor
More from Russel Winder
The Case for Kotlin and Ceylon
The Case for Kotlin and Ceylon
Russel Winder
On the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layer
Russel Winder
Fast Python? Don't Bother
Fast Python? Don't Bother
Russel Winder
Making Python computations fast
Making Python computations fast
Russel Winder
Tales from the Workshops
Tales from the Workshops
Russel Winder
Making Computations Execute Very Quickly
Making Computations Execute Very Quickly
Russel Winder
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is Dead, Long Live Ceylon, Kotlin, etc
Russel Winder
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Russel Winder
Spocktacular testing
Spocktacular testing
Russel Winder
Spocktacular Testing
Spocktacular Testing
Russel Winder
Is Groovy static or dynamic
Is Groovy static or dynamic
Russel Winder
Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.
Russel Winder
Are Go and D threats to Python
Are Go and D threats to Python
Russel Winder
Is Groovy as fast as Java
Is Groovy as fast as Java
Russel Winder
Who needs C++ when you have D and Go
Who needs C++ when you have D and Go
Russel Winder
Java 8: a New Beginning
Java 8: a New Beginning
Russel Winder
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for Java
Russel Winder
GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily
Russel Winder
Given Groovy Who Needs Java
Given Groovy Who Needs Java
Russel Winder
Why Groovy When Java 8 or Scala, or…
Why Groovy When Java 8 or Scala, or…
Russel Winder
More from Russel Winder
(20)
The Case for Kotlin and Ceylon
The Case for Kotlin and Ceylon
On the Architectures of Microservices: the next layer
On the Architectures of Microservices: the next layer
Fast Python? Don't Bother
Fast Python? Don't Bother
Making Python computations fast
Making Python computations fast
Tales from the Workshops
Tales from the Workshops
Making Computations Execute Very Quickly
Making Computations Execute Very Quickly
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is Dead, Long Live Ceylon, Kotlin, etc
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Java is dead, long live Scala, Kotlin, Ceylon, etc.
Spocktacular testing
Spocktacular testing
Spocktacular Testing
Spocktacular Testing
Is Groovy static or dynamic
Is Groovy static or dynamic
Java is dead, long live Scala Kotlin Ceylon etc.
Java is dead, long live Scala Kotlin Ceylon etc.
Are Go and D threats to Python
Are Go and D threats to Python
Is Groovy as fast as Java
Is Groovy as fast as Java
Who needs C++ when you have D and Go
Who needs C++ when you have D and Go
Java 8: a New Beginning
Java 8: a New Beginning
GPars: Groovy Parallelism for Java
GPars: Groovy Parallelism for Java
GroovyFX: or how to program JavaFX easily
GroovyFX: or how to program JavaFX easily
Given Groovy Who Needs Java
Given Groovy Who Needs Java
Why Groovy When Java 8 or Scala, or…
Why Groovy When Java 8 or Scala, or…
Recently uploaded
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Recently uploaded
(20)
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Slack Application Development 101 Slides
Slack Application Development 101 Slides
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
GPars Workshop
1.
GPars Workshop
Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder http://www.russel.org.uk Copyright © 2013 Russel Winder 1
2.
Aims, Goals and
Objectives ● Gain practical experience of the various models of concurrent and parallel behaviour available in GPars; actors, dataflow, data parallelism, etc. ● Have some fun. Copyright © 2013 Russel Winder 2
3.
Subsidiary Aims, Goals
and Objects ● Show that shared mutable memory multi-threading should return to being an operating systems development technique and not continue to be pushed as an applications programming technique – remember… Copyright © 2013 Russel Winder 3
4.
…people should tremble
in fear at the prospect of using Shared mutable memory multi-threading. Copyright © 2013 Russel Winder 4
5.
Structure
Introduction. Actors. Dataflow. Data Parallelism. Analysis. Closing. Copyright © 2013 Russel Winder 5
6.
Protocol
Short presentation. 3 (Short presentation → Practical period) Interaction. Short presentation. Questions or comments welcome at any time. Copyright © 2013 Russel Winder 6
7.
Interstitial Advertisement Copyright ©
2013 Russel Winder 7
8.
Introduction Copyright © 2013
Russel Winder 8
9.
It is no
longer contentious that The Multicore Revolution is well underway. Copyright © 2013 Russel Winder 9
10.
Quad core laptops
and phones. Eight and twelve core workstations. Servers with “zillions” of cores. Copyright © 2013 Russel Winder 10
11.
Parallel capable hardware
is the norm. Copyright © 2013 Russel Winder 11
12.
Software technology in
use is now lagging hardware technology by decades. Copyright © 2013 Russel Winder 12
13.
Operating systems manage
cores with kernel threads. Operating systems are fundamentally shared mutable memory multi-threaded systems. Operating systems rightly use all the lock, semaphore, monitor, etc. technologies. Copyright © 2013 Russel Winder 13
14.
Computationally intensive systems
or subsystems definitely have to be parallel. Other systems likely use concurrency but not parallelism. Copyright © 2013 Russel Winder 14
15.
Concurrency
Execution as co-routines: Sequences of code give up the execution to pass it to another coroutine. Copyright © 2013 Russel Winder 15
16.
More Concurrency
Concurrency is a technique founded in a uniprocessor view of the world. Time-division multiplexing. Copyright © 2013 Russel Winder 16
17.
Parallelism
Having multiple executions active at the same time. Copyright © 2013 Russel Winder 17
18.
Concurrency is a
tool for structuring execution where a single processor is used by multiple computations. Parallelism is about making a computation complete faster than using a single processor. Copyright © 2013 Russel Winder 18
19.
Copyright © 2013
Russel Winder 19
20.
Copyright © 2013
Russel Winder 20
21.
Copyright © 2013
Russel Winder 21
22.
Copyright © 2013
Russel Winder 22
23.
Copyright © 2013
Russel Winder 23
24.
Copyright © 2013
Russel Winder 24
25.
Copyright © 2013
Russel Winder 25
26.
Squirrel behaviour emulates
synchronized software behaviour. Copyright © 2013 Russel Winder 26
27.
Locks deny parallelism. Copyright
© 2013 Russel Winder 27
28.
The whole purpose
of a lock is to prevent parallelism. Copyright © 2013 Russel Winder 28
29.
Parallelism is performance
improvement. Performance improvement requires parallelism. Copyright © 2013 Russel Winder 29
30.
Locks deny performance
improvement. Copyright © 2013 Russel Winder 30
31.
Locks are needed
only if there is mutable shared state. Copyright © 2013 Russel Winder 31
32.
Avoid mutable shared
state. Copyright © 2013 Russel Winder 32
33.
…but how… Copyright ©
2013 Russel Winder 33
34.
Use appropriate architectural
models. Copyright © 2013 Russel Winder 34
35.
It's all about
controlling concurrency and parallelism with tools that applications programmers find usable. Copyright © 2013 Russel Winder 35
36.
Shared mutable memory
multi-threading is an operating system technique. Copyright © 2013 Russel Winder 36
37.
Applications and tools
programmers need computational models with integrated synchronization. Copyright © 2013 Russel Winder 37
38.
Use processes and
message passing. Copyright © 2013 Russel Winder 38
39.
It's all easier
if processes are single threaded. Copyright © 2013 Russel Winder 39
40.
Dataflow
Operators connected by Actors channels with activity Independent processes triggered by arrival of communicating via data on the channels. asynchronous exchange of messages. Data Parallelism Transform a sequence to another sequence where all individual actions happen at the same time. Copyright © 2013 Russel Winder 40
41.
Agents
A wrapper for some Active Objects shared mutable state. An object that is actually an actor but looks like a full service object. Fork/Join An toolkit for tree structured concurrency and parallelism. Software Transactional Memory Wrappers for mutable values that uses transactions rather than locks. Copyright © 2013 Russel Winder 41
42.
Actors Copyright © 2013
Russel Winder 42
43.
Actors
Independent processes communicating via asynchronous exchange of messages Copyright © 2013 Russel Winder 43
44.
Need an example. Copyright
© 2013 Russel Winder 44
45.
The Sleeping Barber
Problem Copyright © 2013 Russel Winder 45
46.
The Sleeping Barber
Problem ● The barber's shop has a ● If the barber is cutting, a new single cutting chair and a row customer checks to see if of waiting seats. there is a free waiting seat. ● The barber sleeps in the ● If there is join the queue cutting chair unless trimming to be trimmed. a customer. ● If there isn't leave ● Customers arrive at the shop disgruntled. at intervals. ● If the barber is asleep, the customer wakes the barber Problem originally due takes the cutting chair and to Edsgar Dijkstra. gets a trim. Copyright © 2013 Russel Winder 46
47.
The cutting chair.
The waiting chairs The barber's shop. A new customer enters the shop, check to see if they can go straight to the cutting chair, if not can they take a waiting chair, if not leave. Copyright © 2013 Russel Winder 47
48.
Wikipedia article presents
the classic operating systems approach using locks and semaphores. http://en.wikipedia.org/wiki/Sleeping_barber_problem Copyright © 2013 Russel Winder 48
49.
Code! Copyright © 2013
Russel Winder 49
50.
Dataflow Copyright © 2013
Russel Winder 50
51.
Dataflow
Operators connected by channels with activity triggered by arrival of data on the channels. Copyright © 2013 Russel Winder 51
52.
Code! Copyright © 2013
Russel Winder 52
53.
If you want
the code, clone the Git repository: http://www.russel.org.uk/Git/SleepingBarber.git Copyright © 2013 Russel Winder 53
54.
Or if you
just want to browse: http://www.russel.org.uk/gitweb Copyright © 2013 Russel Winder 54
55.
Data Parallelism Copyright ©
2013 Russel Winder 55
56.
Data Parallelism
Transform a sequence to another sequence where all individual actions happen at the same time. Copyright © 2013 Russel Winder 56
57.
Need an example. Copyright
© 2013 Russel Winder 57
58.
Copyright © 2013
Russel Winder 58
59.
What is the
Value of ? Easy, it's known exactly. It's . Obviously. Copyright © 2013 Russel Winder 59
60.
It's simples
Александр Орлов 2009 Copyright © 2013 Russel Winder 60
61.
Approximating
● What is it's value represented as a floating point number? ● We can only obtain an approximation. ● A plethora of possible algorithms to choose from, a popular one is to employ the following integral equation. 1 1 =∫0 dx 4 1x 2 Copyright © 2013 Russel Winder 61
62.
One Possible Algorithm
● Use quadrature to estimate the value of the integral – which is the area under the curve. 4 n 1 = ∑i=1 n i−0.5 2 Embarrassingly 1 parallel. n With n = 3 not much to do, but potentially lots of error. Use n = 107 or n = 109? Copyright © 2013 Russel Winder 62
63.
Because addition is
commutative and associative, expression can be decomposed into sums of partial sums. Copyright © 2013 Russel Winder 63
64.
a+b+c+d+e+f
= (a+b)+(c+d)+(e+f) Copyright © 2013 Russel Winder 64
65.
Scatter – Gather
map reduce Copyright © 2013 Russel Winder 65
66.
Code! Copyright © 2013
Russel Winder 66
67.
If you want
the code, clone the Git repository: http://www.russel.org.uk/Git/Pi_Quadrature.git Copyright © 2013 Russel Winder 67
68.
Or if you
just want to browse: http://www.russel.org.uk/gitweb Copyright © 2013 Russel Winder 68
69.
An End Copyright ©
2013 Russel Winder 69
70.
Multicore and multiprocessor
are now the norm, not the exception. Copyright © 2013 Russel Winder 70
71.
Parallelism only matters
if computational performance matters. Copyright © 2013 Russel Winder 71
72.
Unstructured synchronization
of concurrent systems is not a feasible approach. Copyright © 2013 Russel Winder 72
73.
Actors, dataflow, and
data parallelism (and CSP, agents, fork/join,…) are the future of applications structure. Copyright © 2013 Russel Winder 73
74.
Passing messages between
processes is the way forward. Copyright © 2013 Russel Winder 74
75.
Shared memory concurrency
is a dead end for applications. Copyright © 2013 Russel Winder 75
76.
Copyright © 2013
Russel Winder 76
77.
Copyright © 2013
Russel Winder 77
78.
Copyright © 2013
Russel Winder 78
79.
Copyright © 2013
Russel Winder 79
80.
Copyright © 2013
Russel Winder 80
81.
Copyright © 2013
Russel Winder 81
82.
Squirrels deny parallelism. Copyright
© 2013 Russel Winder 82
83.
Squirrels deny performance
enhancement. Copyright © 2013 Russel Winder 83
84.
Don't be a
squirrel. Copyright © 2013 Russel Winder 84
85.
Do not use
explicit locking algorithms. Copyright © 2013 Russel Winder 85
86.
Use computational architectures
that promote parallelism and hence performance improvement: Actors Dataflow Data Parallelism Copyright © 2013 Russel Winder 86
87.
Use
Go on, you know you want to… Copyright © 2013 Russel Winder 87
88.
Interstitial Advertisement Copyright ©
2013 Russel Winder 88
89.
The End Copyright ©
2013 Russel Winder 89
90.
GPars Workshop
Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder website: http://www.russel.org.uk Copyright © 2013 Russel Winder 90
Download now