SlideShare a Scribd company logo
Sly	
  and	
  the	
  RoarVM	
  
Exploring	
  the	
  Manycore	
  Future	
  of	
  Programming	
  
                                	
  
                       Renaissance	
  Project	
  
             h=p://so@.vub.ac.be/~smarr/renaissance/	
  



                                           	
  
                                      Stefan	
  Marr	
  
              So@ware	
  Languages	
  Lab,	
  Vrije	
  Universiteit	
  Brussel	
  
                 Smalltalk	
  Dev	
  Room,	
  FOSDEM,	
  2012-­‐02-­‐05	
  
Agenda	
  
•  Parallel	
  Smalltalk	
  and	
  the	
  RoarVM	
  
       –  [self	
  demo]	
  fork	
  
       –  Project	
  
•  Sly	
  and	
  the	
  Renaissance	
  Project	
  
       –  Demo	
  
       –  Context	
  
       –  Language	
  and	
  Use-­‐Cases	
  

05/02/12	
                                             2	
  
Disclaimer:	
  It	
  wasn’t	
  me!	
  

IBM	
  Research	
                     Vrije	
  Universiteit	
  Brussel:	
  
       –  David	
  Ungar	
            So@ware	
  Languages	
  Lab	
  
       –  Sam	
  S.	
  Adams	
  
                                          –  Pablo	
  Inostroza	
  Valdera	
  
       –  Doug	
  Kimelman	
  
Portland	
  State	
  University	
         –  Stefan	
  Marr	
  
       –  Andrew	
  P.	
  Black	
         –  Theo	
  D'Hondt	
  
       –  Max	
  OrHai	
  


05/02/12	
                                                            3	
  
RoarVM	
  and	
  Parallel	
  Smalltalk?	
  
               Get	
  the	
  RoarVM	
  
               Smalltalk,	
  Concurrency,	
  and	
  Parallelism	
  



05/02/12	
                                               Demo	
       4	
  
RoarVM	
  Smalltalk	
  
•  Process	
  class	
  addions	
  
       –  yieldIfFewerCoresThan:	
  anInt	
  
       –  coreMask,	
  coreMask:	
  anInt	
  
               •  onlyOnCore:	
  anInt	
  
       –  hostCore	
  
       –  thisProcess	
  instead	
  of	
  activeProcess	
  
•  Uses	
  standard	
  Smalltalk	
  facilies	
  
       –  [self	
  do]	
  fork	
  
       –  Semaphore	
  class	
  

05/02/12	
                                                    5	
  
RoarVM	
  Status	
  
•    VM:	
  rewri=en	
  Squeak,	
  20k	
  SLOC	
  C++	
  
•    MVC	
  images	
  run	
  fine	
  
•    Squeak/Pharo:	
  mulcore	
  instabilies	
  
•    Runs	
  on:	
  OSX,	
  Linux,	
  iOS,	
  Tilera,	
  up	
  to	
  59	
  cores	
  




05/02/12	
                                                                  6	
  
Project	
  Infrastructure	
  
•  Buildbot:	
  Automate	
  
   compilaon,	
  tesng	
  
       –  Linux,	
  OS	
  X,	
  Tilera	
  
•  Performance	
  Tracking	
  
       –  Codespeed	
  
       –  ReBench	
  
       –  SMark	
  
•  h=p://github.com/smarr/RoarVM	
  

05/02/12	
                                          7	
  
Avoid	
  the	
  Concurrency	
  Trap	
  by	
  Embracing	
  Non-­‐Determinism	
  

    SLY	
  AND	
  	
  
    THE	
  RENAISSANCE	
  PROJECT	
  
05/02/12	
                                                                            8	
  
Renaissance	
  Project	
  
•  Manycore:	
  >	
  100	
  cores	
  
       + non-­‐uniform	
  memory	
  access	
  
•  Problem	
  
       –  Parallel	
  systems	
  are	
  nondeterminisc	
  
       –  Communicaon	
  is	
  expensive	
  
       –  Synchronizaon	
  ==	
  bo=leneck	
  
•  The	
  vision	
  
       –  Embrace	
  nondeterminism	
  
       –  Harness	
  emergence	
  
       –  Confidence	
  →	
  Delay	
  

05/02/12	
                                                    9	
  
Non-­‐determinisUc	
  Boids	
  and	
  ParUcle	
  SorUng	
  	
  
               Flocking	
  behavior	
  of	
  birds	
  and	
  parUcle	
  bouncing	
  as	
  local-­‐only	
  
               synchronizaUon	
  strategies	
  for	
  scalability	
  



05/02/12	
                                                     Demo	
                                        10	
  
Sly	
  
•  Ensembles:	
  collecons	
  represenng	
  a	
  whole,	
  
   mul-­‐part	
  enes	
  
       –  e.g.	
  a	
  flock	
  of	
  birds	
  

•  Adverbs:	
  modifiers	
  to	
  operands	
  
       –  individualLY,	
  serialLY,	
  randomLY:	
  n	
  

•  Gerunds:	
  reducon	
  semancs	
  
       –  averagING,	
  selectINGpredicate,	
  ensemblING	
  


05/02/12	
                                                   11	
  
Examples	
  of	
  Boids	
  
•  Every	
  boid	
  is	
  its	
  own	
  thread,	
  no	
  synch.	
  
	
  


computeCentroid	
  
	
  	
  	
  	
  ^	
  self	
  flock	
  boids	
  averagINGserialLYposition	
  
	
  

computeNeighbors	
  
	
  	
  	
  	
  ^	
  self	
  flock	
  boids	
  selectINGisNear:	
  self	
  
	
  

matchVelocityWithNeighbors	
  
	
  	
  	
  	
  ^	
  self	
  neighbors	
  averagINGvelocity	
  /	
  8.0	
  
	
  
More	
  details:	
  h=p://so@.vub.ac.be/~smarr/renaissance/sly3-­‐overview/	
  

05/02/12	
                                                                    12	
  
Possible	
  Real	
  Life	
  Applicaon	
  




                                             Image:	
  
                                             h=p://blogs.technet.com/b/andrew/
                                             archive/2007/08/22/olap-­‐cubes-­‐and-­‐
                                             muldimensional-­‐analysis.aspx	
  


05/02/12	
                                                     13	
  
Possible	
  Real	
  Life	
  Applicaon	
  
•  Online	
  analycal	
  processing	
  (OLAP)	
  
       –  Business	
  intelligence,	
  data	
  mining	
  
       –  Query	
  muldimensional	
  data	
  sets	
  
       –  Calculated	
  data	
  dimensions	
  
•  Gesture	
  recognion	
  
       –  Many	
  rules,	
  low-­‐precision	
  input	
  
•  Race-­‐and-­‐repair:	
  how	
  to	
  bound	
  error?	
  
05/02/12	
                                                    14	
  
CONCLUSION	
  


05/02/12	
           15	
  
Conclusion	
  
•  Sly:	
  map/reduce-­‐like	
  programming	
  model	
  
       –  Based	
  on	
  ensembles,	
  adverbs	
  and	
  gerunds	
  


•  RoarVM	
  
       –  Research	
  arfact,	
  stable,	
  used	
  daily	
  
       –  No	
  opmizaon	
  of	
  sequenal	
  performance	
  
       –  Tested	
  up	
  to	
  59cores	
  
       –  Shows	
  weak	
  scalability	
  

05/02/12	
                                                             16	
  
Project,	
  Sly	
  Intro,	
  Community	
  




 h=p://so@.vub.ac.be/          h=p://so@.vub.ac.be/
  ~smarr/renaissance/	
         ~smarr/renaissance/
                                sly3-­‐overview/	
  

h=p://github.com/smarr/RoarVM	
  
@roarvm	
  
	
  
05/02/12	
         Conclusion	
               17	
  
Papers	
  
[1] 	
  J.	
  Pallas	
  and	
  D.	
  Ungar.	
  Mulprocessor	
  Smalltalk:	
  A	
  
        Case	
  Study	
  of	
  a	
  Mulprocessor-­‐based	
  Programming	
  
        Environment.	
  In	
  PLDI	
  ’88,	
  p.	
  268–277.	
  ACM,	
  1988.	
  
[2] 	
  D.	
  Ungar	
  and	
  S.	
  Adams.	
  Hosng	
  an	
  Object	
  Heap	
  on	
  
        Manycore	
  Hardware:	
  An	
  Exploraon.	
  In	
  DLS’09,	
  p.	
  
        99-­‐110.	
  ACM,	
  2009.	
  
[3] 	
  D.	
  Ungar,	
  D.	
  Kimelman,	
  and	
  S.	
  Adams.	
  Inconsistency	
  
        Robustness	
  for	
  Scalability	
  in	
  Interacve	
  
        Concurrent‑Update	
  In-­‐Memory	
  MOLAP	
  Cubes.	
  In	
  
        Inconsistency	
  Robustness	
  Symposium	
  2011.	
  


05/02/12	
                       Roundup	
  and	
  Conclusion	
                18	
  

More Related Content

PDF
Sly and the RoarVM: Exploring the Manycore Future of Programming
PDF
Simon Peyton Jones: Managing parallelism
PDF
Peyton jones-2011-parallel haskell-the_future
PDF
How to Build a High-Performance VM for Squeak/Smalltalk in Your Spare Time: A...
PDF
GoLightly: Building VM-based language runtimes in Go
PDF
A Java Fork_Join Framework
PDF
Haskell Symposium 2010: An LLVM backend for GHC
Sly and the RoarVM: Exploring the Manycore Future of Programming
Simon Peyton Jones: Managing parallelism
Peyton jones-2011-parallel haskell-the_future
How to Build a High-Performance VM for Squeak/Smalltalk in Your Spare Time: A...
GoLightly: Building VM-based language runtimes in Go
A Java Fork_Join Framework
Haskell Symposium 2010: An LLVM backend for GHC

Similar to Sly and the RoarVM: Parallel Programming with Smalltalk (20)

KEY
Erjang - A journey into Erlang-land
PPTX
Supporting Concurrency Abstractions in High-level Language Virtual Machines
PDF
L Fu - Dao: a novel programming language for bioinformatics
PDF
Smalltalk, the dynamic language
PDF
Scala in Model-Driven development for Apparel Cloud Platform
PPTX
JVM: A Platform for Multiple Languages
PDF
Rascal Devnology Code Fest
PDF
Martin Odersky: What's next for Scala
PDF
HPC lab projects
PDF
I know Java, why should I consider Clojure?
PDF
Keynote joearmstrong
PDF
Principles Of Programing Languages
PDF
SIGAda 2011 AdaLabs presentation slides : How make Ada go viral
PPTX
Lisp in the Cloud
PDF
The Rise of Dynamic Languages
PDF
groovy and concurrency
PDF
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
KEY
Polyglot Grails
KEY
The Return of the Living Datalog
PPT
Erjang - A journey into Erlang-land
Supporting Concurrency Abstractions in High-level Language Virtual Machines
L Fu - Dao: a novel programming language for bioinformatics
Smalltalk, the dynamic language
Scala in Model-Driven development for Apparel Cloud Platform
JVM: A Platform for Multiple Languages
Rascal Devnology Code Fest
Martin Odersky: What's next for Scala
HPC lab projects
I know Java, why should I consider Clojure?
Keynote joearmstrong
Principles Of Programing Languages
SIGAda 2011 AdaLabs presentation slides : How make Ada go viral
Lisp in the Cloud
The Rise of Dynamic Languages
groovy and concurrency
C++ Data-flow Parallelism sounds great! But how practical is it? Let’s see ho...
Polyglot Grails
The Return of the Living Datalog
Ad

More from Stefan Marr (20)

PPTX
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
PPTX
Seminar on Parallel and Concurrent Programming
PPTX
Optimizing Communicating Event-Loop Languages with Truffle
PPTX
Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...
PPTX
Why Is Concurrent Programming Hard? And What Can We Do about It?
PPTX
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
PPTX
Building High-Performance Language Implementations With Low Effort
PPTX
Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors
PDF
Identifying A Unifying Mechanism for the Implementation of Concurrency Abstra...
PDF
Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...
PDF
PHP.next: Traits
PDF
The Price of the Free Lunch: Programming in the Multicore Era
PDF
Locality and Encapsulation: A Foundation for Concurrency Support in Multi-Lan...
PPTX
Insertion Tree Phasers: Efficient and Scalable Barrier Synchronization for Fi...
PPTX
Encapsulation and Locality: A Foundation for Concurrency Support in Multi-Lan...
PPTX
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
PPTX
Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from...
PDF
VMADL: An Architecture Definition Language for Variability and Composition ...
PPT
Metaprogrammierung und Reflection
PPT
Traits: A New Language Feature for PHP?
Metaprogramming, Metaobject Protocols, Gradual Type Checks: Optimizing the "U...
Seminar on Parallel and Concurrent Programming
Optimizing Communicating Event-Loop Languages with Truffle
Tracing versus Partial Evaluation: Which Meta-Compilation Approach is Better ...
Why Is Concurrent Programming Hard? And What Can We Do about It?
Zero-Overhead Metaprogramming: Reflection and Metaobject Protocols Fast and w...
Building High-Performance Language Implementations With Low Effort
Cloud PARTE: Elastic Complex Event Processing based on Mobile Actors
Identifying A Unifying Mechanism for the Implementation of Concurrency Abstra...
Which Problems Does a Multi-Language Virtual Machine Need to Solve in the Mul...
PHP.next: Traits
The Price of the Free Lunch: Programming in the Multicore Era
Locality and Encapsulation: A Foundation for Concurrency Support in Multi-Lan...
Insertion Tree Phasers: Efficient and Scalable Barrier Synchronization for Fi...
Encapsulation and Locality: A Foundation for Concurrency Support in Multi-Lan...
Intermediate Language Design of High-level Language VMs: Towards Comprehensiv...
Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from...
VMADL: An Architecture Definition Language for Variability and Composition ...
Metaprogrammierung und Reflection
Traits: A New Language Feature for PHP?
Ad

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Approach and Philosophy of On baking technology
PPTX
A Presentation on Artificial Intelligence
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
Teaching material agriculture food technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Encapsulation theory and applications.pdf
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectroscopy.pptx food analysis technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A comparative analysis of optical character recognition models for extracting...
Approach and Philosophy of On baking technology
A Presentation on Artificial Intelligence
Mobile App Security Testing_ A Comprehensive Guide.pdf
Network Security Unit 5.pdf for BCA BBA.
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Advanced methodologies resolving dimensionality complications for autism neur...
Unlocking AI with Model Context Protocol (MCP)
Teaching material agriculture food technology
MIND Revenue Release Quarter 2 2025 Press Release
Encapsulation theory and applications.pdf

Sly and the RoarVM: Parallel Programming with Smalltalk

  • 1. Sly  and  the  RoarVM   Exploring  the  Manycore  Future  of  Programming     Renaissance  Project   h=p://so@.vub.ac.be/~smarr/renaissance/     Stefan  Marr   So@ware  Languages  Lab,  Vrije  Universiteit  Brussel   Smalltalk  Dev  Room,  FOSDEM,  2012-­‐02-­‐05  
  • 2. Agenda   •  Parallel  Smalltalk  and  the  RoarVM   –  [self  demo]  fork   –  Project   •  Sly  and  the  Renaissance  Project   –  Demo   –  Context   –  Language  and  Use-­‐Cases   05/02/12   2  
  • 3. Disclaimer:  It  wasn’t  me!   IBM  Research   Vrije  Universiteit  Brussel:   –  David  Ungar   So@ware  Languages  Lab   –  Sam  S.  Adams   –  Pablo  Inostroza  Valdera   –  Doug  Kimelman   Portland  State  University   –  Stefan  Marr   –  Andrew  P.  Black   –  Theo  D'Hondt   –  Max  OrHai   05/02/12   3  
  • 4. RoarVM  and  Parallel  Smalltalk?   Get  the  RoarVM   Smalltalk,  Concurrency,  and  Parallelism   05/02/12   Demo   4  
  • 5. RoarVM  Smalltalk   •  Process  class  addions   –  yieldIfFewerCoresThan:  anInt   –  coreMask,  coreMask:  anInt   •  onlyOnCore:  anInt   –  hostCore   –  thisProcess  instead  of  activeProcess   •  Uses  standard  Smalltalk  facilies   –  [self  do]  fork   –  Semaphore  class   05/02/12   5  
  • 6. RoarVM  Status   •  VM:  rewri=en  Squeak,  20k  SLOC  C++   •  MVC  images  run  fine   •  Squeak/Pharo:  mulcore  instabilies   •  Runs  on:  OSX,  Linux,  iOS,  Tilera,  up  to  59  cores   05/02/12   6  
  • 7. Project  Infrastructure   •  Buildbot:  Automate   compilaon,  tesng   –  Linux,  OS  X,  Tilera   •  Performance  Tracking   –  Codespeed   –  ReBench   –  SMark   •  h=p://github.com/smarr/RoarVM   05/02/12   7  
  • 8. Avoid  the  Concurrency  Trap  by  Embracing  Non-­‐Determinism   SLY  AND     THE  RENAISSANCE  PROJECT   05/02/12   8  
  • 9. Renaissance  Project   •  Manycore:  >  100  cores   + non-­‐uniform  memory  access   •  Problem   –  Parallel  systems  are  nondeterminisc   –  Communicaon  is  expensive   –  Synchronizaon  ==  bo=leneck   •  The  vision   –  Embrace  nondeterminism   –  Harness  emergence   –  Confidence  →  Delay   05/02/12   9  
  • 10. Non-­‐determinisUc  Boids  and  ParUcle  SorUng     Flocking  behavior  of  birds  and  parUcle  bouncing  as  local-­‐only   synchronizaUon  strategies  for  scalability   05/02/12   Demo   10  
  • 11. Sly   •  Ensembles:  collecons  represenng  a  whole,   mul-­‐part  enes   –  e.g.  a  flock  of  birds   •  Adverbs:  modifiers  to  operands   –  individualLY,  serialLY,  randomLY:  n   •  Gerunds:  reducon  semancs   –  averagING,  selectINGpredicate,  ensemblING   05/02/12   11  
  • 12. Examples  of  Boids   •  Every  boid  is  its  own  thread,  no  synch.     computeCentroid          ^  self  flock  boids  averagINGserialLYposition     computeNeighbors          ^  self  flock  boids  selectINGisNear:  self     matchVelocityWithNeighbors          ^  self  neighbors  averagINGvelocity  /  8.0     More  details:  h=p://so@.vub.ac.be/~smarr/renaissance/sly3-­‐overview/   05/02/12   12  
  • 13. Possible  Real  Life  Applicaon   Image:   h=p://blogs.technet.com/b/andrew/ archive/2007/08/22/olap-­‐cubes-­‐and-­‐ muldimensional-­‐analysis.aspx   05/02/12   13  
  • 14. Possible  Real  Life  Applicaon   •  Online  analycal  processing  (OLAP)   –  Business  intelligence,  data  mining   –  Query  muldimensional  data  sets   –  Calculated  data  dimensions   •  Gesture  recognion   –  Many  rules,  low-­‐precision  input   •  Race-­‐and-­‐repair:  how  to  bound  error?   05/02/12   14  
  • 16. Conclusion   •  Sly:  map/reduce-­‐like  programming  model   –  Based  on  ensembles,  adverbs  and  gerunds   •  RoarVM   –  Research  arfact,  stable,  used  daily   –  No  opmizaon  of  sequenal  performance   –  Tested  up  to  59cores   –  Shows  weak  scalability   05/02/12   16  
  • 17. Project,  Sly  Intro,  Community   h=p://so@.vub.ac.be/ h=p://so@.vub.ac.be/ ~smarr/renaissance/   ~smarr/renaissance/ sly3-­‐overview/   h=p://github.com/smarr/RoarVM   @roarvm     05/02/12   Conclusion   17  
  • 18. Papers   [1]  J.  Pallas  and  D.  Ungar.  Mulprocessor  Smalltalk:  A   Case  Study  of  a  Mulprocessor-­‐based  Programming   Environment.  In  PLDI  ’88,  p.  268–277.  ACM,  1988.   [2]  D.  Ungar  and  S.  Adams.  Hosng  an  Object  Heap  on   Manycore  Hardware:  An  Exploraon.  In  DLS’09,  p.   99-­‐110.  ACM,  2009.   [3]  D.  Ungar,  D.  Kimelman,  and  S.  Adams.  Inconsistency   Robustness  for  Scalability  in  Interacve   Concurrent‑Update  In-­‐Memory  MOLAP  Cubes.  In   Inconsistency  Robustness  Symposium  2011.   05/02/12   Roundup  and  Conclusion   18