• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Parallel computing with GPars
 

Parallel computing with GPars

on

  • 1,198 views

This slides are for the Parallel Computing talk. You can read the repo samples of the talk @ https://github.com/pablomolnar/gpars_samples

This slides are for the Parallel Computing talk. You can read the repo samples of the talk @ https://github.com/pablomolnar/gpars_samples

@pmolnar

Statistics

Views

Total Views
1,198
Views on SlideShare
1,189
Embed Views
9

Actions

Likes
0
Downloads
11
Comments
0

2 Embeds 9

http://www.linkedin.com 6
https://www.linkedin.com 3

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Parallel computing with GPars Parallel computing with GPars Presentation Transcript

    • Parallel Computing (with GPars) NOV 2011
    • Evolution● Old Days ○ threads ○ synchronize ○ locks ○ wait-notify
    • Evolution● Recent enhancements ○ java.util.concurrent.* ○ Future task ○ Executor Pools ○ Blocking Queues ○ ConcurrentMap
    • Evolution● Emerging Technologies ○ Map-Reduce ○ APIs (Google Collections, JSR-166) ○ Non-blocking I/O ○ Parallel Friendly Languages (Scala, Clojure, Groovy)
    • Groovy Parallel SystemsHigh level abstractions for writing concurrent code! ● Code-level Helpers ○ Parallel Collections ○ Asynchronous Processing ○ Fork/Join - Map/Reduce ● Architecture-level Concepts ○ Dataflows ○ Actors ● Protecting Shared Mutable State ○ Agents
    • Groovy Parallel SystemsHigh level abstractions for writing concurrent code! ● Code-level Helpers ○ Parallel Collections ○ Asynchronous Processing ○ Fork/Join - Map/Reduce ● Architecture-level Concepts ○ Dataflows ○ Actors (For next time...) ● Protecting Shared Mutable State ○ Agents (For next time...)
    • DEMO 1 (Parallel encryption)
    • Optimal Thread Pool Size Pool size = ???
    • Optimal Thread Pool Size Pool size = Ncores
    • Optimal Thread Pool Size Pool size = Ncores + 1
    • Optimal Thread Pool Size Pool size = Ncores + Block. Op. Ratio
    • Optimal Thread Pool Size Pool size = Ncores + wait time cpu time
    • DEMO 2"Dado un rango obtener la cantidad denr. primos agrupados por él ultimo digito"
    • Danger Dont mess up with mutable shared data!
    • DEMO 3 (Facebook Search)
    • Collections ● eachParallel() ● eachWithIndexParallel() ● collectParallel() ● findAllParallel() ● findAnyParallel ● findParallel() ● everyParallel() ● anyParallel() ● grepParallel() ● groupByParallel() ● foldParallel() ● minParallel() ● maxParallel() ● sumParallel() ● splitParallel() ● countParallel() ● foldParallel()
    • DEMO 4 (Facebook Singles)
    • Fork-JoinMap-Reduce
    • DEMO 5 (API Calls)
    • DEMO 6 (Multiget)
    • Multiget
    • + Info ● http://gpars.org/0.12/guide/guide/single.html ● http://www.slideshare.net/paulk_asert/concurrency-with- gpars ● http://gee.cs.oswego.edu/dl/papers/fj.pdf ● http://static.googleusercontent. com/external_content/untrusted_dlcp/labs.google. com/en/us/papers/mapreduce-osdi04.pdf ● Java Concurrency in Practice (ISBN-0321349601)Pics Credits ● Stone age: http://tinyurl.com/bvnlv74 ● Steam train: http://tinyurl.com/6lp3krq ● Speed train: http://tinyurl.com/7jjc3v5 ● CPU: http://www.flickr.com/photos/olivander/149865626/
    • https://github.com/pablomolnar/gpars_samples @pmolnar