近未来的並列 LL

Motohiro Takayama
Motohiro TakayamaIndividual at Home
LL
@mootoh
@mootoh

    5
            :         = 7:3


http://deadbeaf.org
Molatomium   CELL REGZA
近未来的並列 LL
http://bit.ly/namikan
mootoh

                  wraith13

                  goyoki

   STM            hayamiz

HPU       MUDA     syoyo

      Lock-free   yamasa

Haskell           shelarcy

                    ???
•
•
•
•

    100   !
•
•

    100   !

      LL tiger
LL
近未来的並列 LL
(^o^)


 (^o^)


   (^o^)


    (^o^)


        (^o^)


         (^o^)


           (^o^)


                   CC by-nc-sa : http://www.flickr.com/photos/carrapatoso/3467673411/
“The Free Lunch is Over”, by Herb Sutter
http://www.gotw.ca/publications/concurrency-ddj.htm
“The Free Lunch is Over”, by Herb Sutter
http://www.gotw.ca/publications/concurrency-ddj.htm
•
•   CPU


•    (     )

•         (^o^)

•
http://edry.jp/a/2009/02/21_210347.xhtml
?
CC by-nc : http://www.flickr.com/photos/b-tal/407402521/
近未来的並列 LL
•   : Eclipse.app
• on iMac Core 2 Duo 3GHz 4GB RAM
• : 33s, 2          : 7s
•   : Eclipse.app
• on iMac Core 2 Duo 3GHz 4GB RAM
• : 33s, 2          : 7s
•    : Eclipse.app
• on iMac Core 2 Duo 3GHz 4GB RAM
• : 33s, 2          : 7s




    (628,702   * 33s * 365   ) / (60 * 60 * 24 * 30)

                =>   2,921        /
• 21   :

•
 •         (GNH)


•
• 21   :

•
 •         (GNH)


•
•        :    →

•
•   →   GNH
LL
Timeline




2010   2015   2020
近未来的並列 LL
2010   2015   2020
•
 •≠
 • Native thread
•
• Native thread
 • 5.6            ithread

   •    thread        VM

   •    default    shared nothing


• 6.0             STM

•
 • POE, AnyEvent, Coro, ...
• Native & green thread (                    )

 • ruby1.8: green
 • ruby1.9: native, GIL
 • JRuby, MacRuby: native, GIL      o/


•
 • Revactor, EventMachine, NeverBlock, ...
• Thread
 • CPython: GVL
 • Jython, IronPython :
   •   Jython: system 216% cpu 12.285 total
• no threads, fork it
Haskell
•              Haskell

•
 • Parallel Haskell
 • Concurrent Haskell
 • STM
• Native thread?
• Actor
• Native thread
 •   beam.smp 193.2%


•                /
•
• JVM
 • Native thread
• Actor
• goroutine
 • Native thread
   • runtime.GOMAXPROCS(NCPU)
• Channel
 •
Javascript
• HTML5 WebWorkers   !

 •
 • Native thread ?

    • WebKit
•
Perl      Ruby     Python    PHP      Haskell   Erlang     Scala       go       Javascript

 Native
 thread                                   ×           ?                                          ?

                                                                      Thread,
           Thread,   Thread,                       STM
 Model,                                                     Message             Message     Message
                               Thread   Process
Paradigm                                                    Passing   Message   Passing     Passing
            STM       Fiber
                                                                      Passing



           shared-
           nothing
                                                                                             Web
                                                                                goroutine
                                                                                            Workers
             by
           default
2010-2015
Timeline




2010     2015     2020
↓
JVM

• Native thread,
•
• :
 • JRuby, Jython, Scala, Clojure, ...
http://www.flickr.com/photos/johnkay/3331613033/
•
•   ,   ,   , ...


•
•
•
•   I/O

•
•
•
•
I/O

• C10k
• Event
 • AnyEvent (Perl)
 • EventMachine (Ruby)
•
• :)
                                          http://images.apple.com/macosx/technology/docs/
                                                  GrandCentral_TB_brief_20090903.pdf




• :(                ...?

•   :
•   Grand Central Dispatch → Mac   http://en.wikipedia.org/wiki/File:Gcd_icon20090608.jpg




• Java 7 → JVM
• OpenCL                                      http://www.khronos.org/opencl/
•
•
• Out of Order
• Future
 •
 •
 •               : value resolved

                 : value not resolved yet

                 : executable Atom

                 : pending Atom
Molatomium
DSL                C



      Mol   Atom


       Runtime
Mol
•
    •
    •   Atom (   )


•C
                     main() {
                       frame(frame_no, input) {
                          local loop;
                          local edge[-1..9] outside(0);
    Haskell               local pocs[-1..9] outside(0);
                          local ccr [-1..9] outside(0);

        DSL                  loop     = loop_count();
                             edge[i] := edge_atom(input, i);
                             ccr [i] := ccr_atom(edge[i-1], edge[i], edge[i+1], i);
                             pocs[i] := i % 2 == 0
                               ? pocs_even_atom(ccr [i-1], ccr[i], ccr [i+1], loop, i)
                               : pocs_odd_atom (pocs[i-1], ccr[i], pocs[i+1], loop, i);
                             return &pocs;
                         }

                         sync for (i in [0..30])
                            put_frame_atom(frame(i, get_frame_atom()));
                     }
Runtime
                   Atom                                                  Waiting

                      arguments,                                 waiting for runtime lock
                      return value            Shared



•
                                              Memory

    VM      update runtime context
                                           Global
                                            Lock
                                                       Runtime
                                                       Context




•
                 Runtime                                                  Atom




                                     Mol        Atom             Wait
Runtime
                   Atom                                                  Waiting

                      arguments,                                 waiting for runtime lock
                      return value            Shared



•
                                              Memory

    VM      update runtime context
                                           Global
                                            Lock
                                                       Runtime
                                                       Context




•
                 Runtime                                                  Atom




                                     Mol        Atom             Wait
2010-2015
•
• JVM
•
•       (   I/O,
                   )
2015-2020
Timeline




2010     2015     2020
近未来的並列 LL
|



8
FAQ
•         ?
FAQ
•                                                       ?




      http://www.speedia.co.jp/~namisato/2008_05.html
FAQ
•                                                                   ?




                  http://www.speedia.co.jp/~namisato/2008_05.html




            P = f V^2
1MHz   1000      → 1GHz                                                 !
Memory
Wall




         CC-by : http://www.flickr.com/photos/afagen/4145629623/
Memory Wall
•
•
•
• 100
    •   by “Can Manycores Support the Memory Requirements of Scientific Applications?” /
        A4MMC 2010
Memory Wall
•            →

•   : Intel SCC

•
•                 HW


                       http://techresearch.intel.com/articles/Tera-Scale/1826.htm
• Actor
 • Erlang, Scala, go, Javascript   (HTML5, WebWorkers)


 •      LL




                                           CC-by : http://www.flickr.com/photos/punkscrapper/4276443469/
...?
•

•

•
↓




    !

        http://dragon-quest.jp/five/monster/11kingusuraimu.html
↓




    !

        http://dragon-quest.jp/five/monster/11kingusuraimu.html
2015-2020

•
•     →

•
2020 ->
Timeline




2010     2015     2020
http://karlnordstrom.ca/ideas/?p=6   http://www.fastcursor.com/computers/quantum-computer-photo-gallery.asp
近未来的並列 LL
Timeline



         Message passing
   JVM


2010          2015         2020
LL
LL
                     P
•              OK (Portable)

•
•                          (Performance)

•   (Productivity)

•                OK
近未来的並列 LL
LL
•              OK (Portable)

•
•                          (Performance)

•   (Productivity)

•                OK
LL        ?

•          Light

•
•
•    DSL
:               DSL
•                            LL

 •         : C, Ruby, Perl, PHP, ...

 • Communicating Sequential Process
• LL
 •
• Glue            LL,       LL
?

•
•
•                                       (                     )


•
•               40%
    (by Harvard Business Review
    http://blogs.hbr.org/bregman/2010/05/how-and-why-to-stop-multitaski.html   )
•
•
•
•
•
    http://dragon-quest.jp/five/
•
•
•   C   ...
•
•   (   )


•
Re-Discover

•
•   :

• GC
• Javascript
•
•
•   LL

•
•
•
Application
Application


•
•
?
1.




: Ray Tracing




                http://lucille.sourceforge.net/gallery/0_1_3/index.html
•
•   :

•
•
    •
2.
“
                                                       ”




    http://blogs.itmedia.co.jp/yasusasaki/2010/07/ipad-ab70.html
2.
• try-error
                ...?

•
 • Pixelmator
 •
3.



http://commons.wikimedia.org/wiki/File:Box2d-screenshot.png




                                                              http://www.flickr.com/photos/nh567/1406671607/
     http://www.flickr.com/photos/overig/4639331740/
4.

•
•
• AI
•
•3
•2   →3
近未来的並列 LL
LL
•
•   LL

•
•
•
•
•        ?
近未来的並列 LL
1 of 101

Recommended

Fiber in the 10th year by
Fiber in the 10th yearFiber in the 10th year
Fiber in the 10th yearKoichi Sasada
26.4K views55 slides
淺談 Java GC 原理、調教和 新發展 by
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展Leon Chen
12.2K views80 slides
Fight with Metaspace OOM by
Fight with Metaspace OOMFight with Metaspace OOM
Fight with Metaspace OOMLeon Chen
1.3K views96 slides
Ruby 2.4 Internals by
Ruby 2.4 InternalsRuby 2.4 Internals
Ruby 2.4 InternalsKoichi Sasada
1.6K views35 slides
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago... by
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...srisatish ambati
2.3K views52 slides
DataMapper on Infinispan by
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on InfinispanLance Ball
2.4K views62 slides

More Related Content

What's hot

Jvm Performance Tunning by
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunningguest1f2740
941 views71 slides
无锁编程 by
无锁编程无锁编程
无锁编程vorfeed chen
237 views43 slides
Java Performance Monitoring & Tuning by
Java Performance Monitoring & TuningJava Performance Monitoring & Tuning
Java Performance Monitoring & TuningMuhammed Shakir
15.4K views83 slides
자바 성능 강의 by
자바 성능 강의자바 성능 강의
자바 성능 강의Terry Cho
4K views72 slides
State of the art: Server-Side JavaScript - dejeuner fulljs by
State of the art: Server-Side JavaScript - dejeuner fulljsState of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljsAlexandre Morgaut
1.6K views40 slides
Tomcatx troubleshooting-production by
Tomcatx troubleshooting-productionTomcatx troubleshooting-production
Tomcatx troubleshooting-productionVladimir Khokhryakov
305 views55 slides

What's hot(20)

Jvm Performance Tunning by guest1f2740
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
guest1f2740941 views
Java Performance Monitoring & Tuning by Muhammed Shakir
Java Performance Monitoring & TuningJava Performance Monitoring & Tuning
Java Performance Monitoring & Tuning
Muhammed Shakir15.4K views
자바 성능 강의 by Terry Cho
자바 성능 강의자바 성능 강의
자바 성능 강의
Terry Cho4K views
State of the art: Server-Side JavaScript - dejeuner fulljs by Alexandre Morgaut
State of the art: Server-Side JavaScript - dejeuner fulljsState of the art: Server-Side JavaScript - dejeuner fulljs
State of the art: Server-Side JavaScript - dejeuner fulljs
Alexandre Morgaut1.6K views
JVM @ Taobao - QCon Hangzhou 2011 by Kris Mok
JVM @ Taobao - QCon Hangzhou 2011JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011
Kris Mok5.8K views
Find bottleneck and tuning in Java Application by guest1f2740
Find bottleneck and tuning in Java ApplicationFind bottleneck and tuning in Java Application
Find bottleneck and tuning in Java Application
guest1f27404.3K views
Hong Qiangning in QConBeijing by shen liu
Hong Qiangning in QConBeijingHong Qiangning in QConBeijing
Hong Qiangning in QConBeijing
shen liu530 views
Gemification for Ruby 2.5/3.0 by Hiroshi SHIBATA
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA1.3K views
Apache camel overview dec 2011 by Marcelo Jabali
Apache camel overview dec 2011Apache camel overview dec 2011
Apache camel overview dec 2011
Marcelo Jabali2.6K views
Java performance tuning by Jerry Kurian
Java performance tuningJava performance tuning
Java performance tuning
Jerry Kurian3.2K views
How to distribute Ruby to the world by Hiroshi SHIBATA
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
Hiroshi SHIBATA3.8K views
TorqueBox - Ruby Hoedown 2011 by Lance Ball
TorqueBox - Ruby Hoedown 2011TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011
Lance Ball696 views
Session 49 - Semantic metadata management practical by ISSGC Summer School
Session 49 - Semantic metadata management practical Session 49 - Semantic metadata management practical
Session 49 - Semantic metadata management practical

Viewers also liked

Rurimaphone by
RurimaphoneRurimaphone
RurimaphoneMotohiro Takayama
905 views21 slides
pureprofile - PR capabilities by
pureprofile - PR capabilitiespureprofile - PR capabilities
pureprofile - PR capabilitiespureprofile
542 views17 slides
Productive conference t onoda by
Productive conference t onodaProductive conference t onoda
Productive conference t onodat onoda
441 views13 slides
Prezentarea proiectului DIS (Descoperă Industria Sportivă din Moldova) by
Prezentarea proiectului DIS (Descoperă Industria Sportivă din Moldova)Prezentarea proiectului DIS (Descoperă Industria Sportivă din Moldova)
Prezentarea proiectului DIS (Descoperă Industria Sportivă din Moldova)Domnul Eugen
362 views10 slides
Company profile il.ma by
Company profile il.maCompany profile il.ma
Company profile il.marosa vaia
615 views10 slides
本の読み方 T Onoda by
本の読み方 T Onoda本の読み方 T Onoda
本の読み方 T Onodat onoda
405 views16 slides

Viewers also liked(17)

pureprofile - PR capabilities by pureprofile
pureprofile - PR capabilitiespureprofile - PR capabilities
pureprofile - PR capabilities
pureprofile542 views
Productive conference t onoda by t onoda
Productive conference t onodaProductive conference t onoda
Productive conference t onoda
t onoda441 views
Prezentarea proiectului DIS (Descoperă Industria Sportivă din Moldova) by Domnul Eugen
Prezentarea proiectului DIS (Descoperă Industria Sportivă din Moldova)Prezentarea proiectului DIS (Descoperă Industria Sportivă din Moldova)
Prezentarea proiectului DIS (Descoperă Industria Sportivă din Moldova)
Domnul Eugen362 views
Company profile il.ma by rosa vaia
Company profile il.maCompany profile il.ma
Company profile il.ma
rosa vaia615 views
本の読み方 T Onoda by t onoda
本の読み方 T Onoda本の読み方 T Onoda
本の読み方 T Onoda
t onoda405 views
Elearning at NWIC by ravenwood
Elearning at NWICElearning at NWIC
Elearning at NWIC
ravenwood274 views
Tecnalia apd logroño 2016 by Ruben Otero
Tecnalia apd logroño 2016Tecnalia apd logroño 2016
Tecnalia apd logroño 2016
Ruben Otero231 views
Galabnik by El40
GalabnikGalabnik
Galabnik
El40340 views
12.05.2009 Olv Climic by Anton Kraev
12.05.2009   Olv Climic12.05.2009   Olv Climic
12.05.2009 Olv Climic
Anton Kraev249 views
Soc 02 Betz Katelyn by Betzk1
Soc 02 Betz KatelynSoc 02 Betz Katelyn
Soc 02 Betz Katelyn
Betzk1265 views

Similar to 近未来的並列 LL

Devignition 2011 by
Devignition 2011Devignition 2011
Devignition 2011tobiascrawley
1.4K views58 slides
Geek out 2014-lagergren-final by
Geek out 2014-lagergren-finalGeek out 2014-lagergren-final
Geek out 2014-lagergren-finalMarcus Lagergren
3K views91 slides
Micronaut: Evolving Java for the Microservices and Serverless Era by
Micronaut: Evolving Java for the Microservices and Serverless EraMicronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless Eragraemerocher
236 views36 slides
Ruby and Distributed Storage Systems by
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage SystemsSATOSHI TAGOMORI
13.3K views43 slides
T4T Training day - NodeJS by
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJSTim Sommer
764 views39 slides
Microservices with Micronaut by
Microservices with MicronautMicroservices with Micronaut
Microservices with MicronautQAware GmbH
513 views86 slides

Similar to 近未来的並列 LL(20)

Micronaut: Evolving Java for the Microservices and Serverless Era by graemerocher
Micronaut: Evolving Java for the Microservices and Serverless EraMicronaut: Evolving Java for the Microservices and Serverless Era
Micronaut: Evolving Java for the Microservices and Serverless Era
graemerocher236 views
Ruby and Distributed Storage Systems by SATOSHI TAGOMORI
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
SATOSHI TAGOMORI13.3K views
T4T Training day - NodeJS by Tim Sommer
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
Tim Sommer764 views
Microservices with Micronaut by QAware GmbH
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
QAware GmbH513 views
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ... by Flink Forward
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Flink Forward150 views
Microservices with Micronaut by QAware GmbH
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
QAware GmbH2.8K views
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat) by OpenBlend society
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)
Byteman and The Jokre, Sanne Grinovero (JBoss by RedHat)
Multithreading and Parallelism on iOS [MobOS 2013] by Kuba Břečka
 Multithreading and Parallelism on iOS [MobOS 2013] Multithreading and Parallelism on iOS [MobOS 2013]
Multithreading and Parallelism on iOS [MobOS 2013]
Kuba Břečka8.1K views
Introduction to Micronaut - JBCNConf 2019 by graemerocher
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
graemerocher1.4K views
Java-light-speed NebraskaCode.pdf by RichHagarty
Java-light-speed NebraskaCode.pdfJava-light-speed NebraskaCode.pdf
Java-light-speed NebraskaCode.pdf
RichHagarty26 views
How the HotSpot and Graal JVMs execute Java Code by Jim Gough
How the HotSpot and Graal JVMs execute Java CodeHow the HotSpot and Graal JVMs execute Java Code
How the HotSpot and Graal JVMs execute Java Code
Jim Gough55 views
Building Ruby in Smalltalk by ESUG
Building Ruby in SmalltalkBuilding Ruby in Smalltalk
Building Ruby in Smalltalk
ESUG432 views
Oracle Fuson Middleware Diagnostics, Performance and Troubleshoot by Michel Schildmeijer
Oracle Fuson Middleware Diagnostics, Performance and TroubleshootOracle Fuson Middleware Diagnostics, Performance and Troubleshoot
Oracle Fuson Middleware Diagnostics, Performance and Troubleshoot
Application Profiling for Memory and Performance by pradeepfn
Application Profiling for Memory and PerformanceApplication Profiling for Memory and Performance
Application Profiling for Memory and Performance
pradeepfn1.7K views
Common Pitfalls of Functional Programming and How to Avoid Them: A Mobile Gam... by gree_tech
Common Pitfalls of Functional Programming and How to Avoid Them: A Mobile Gam...Common Pitfalls of Functional Programming and How to Avoid Them: A Mobile Gam...
Common Pitfalls of Functional Programming and How to Avoid Them: A Mobile Gam...
gree_tech3.3K views
Microservices with Micronaut by QAware GmbH
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
QAware GmbH878 views

Recently uploaded

TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
15 views15 slides
Voice Logger - Telephony Integration Solution at Aegis by
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at AegisNirmal Sharma
17 views1 slide
Empathic Computing: Delivering the Potential of the Metaverse by
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the MetaverseMark Billinghurst
470 views80 slides
Transcript: The Details of Description Techniques tips and tangents on altern... by
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...BookNet Canada
130 views15 slides
HTTP headers that make your website go faster - devs.gent November 2023 by
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023Thijs Feryn
19 views151 slides
1st parposal presentation.pptx by
1st parposal presentation.pptx1st parposal presentation.pptx
1st parposal presentation.pptxi238212
9 views3 slides

Recently uploaded(20)

TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab15 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma17 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst470 views
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada130 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn19 views
1st parposal presentation.pptx by i238212
1st parposal presentation.pptx1st parposal presentation.pptx
1st parposal presentation.pptx
i2382129 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software225 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana12 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 views
AMAZON PRODUCT RESEARCH.pdf by JerikkLaureta
AMAZON PRODUCT RESEARCH.pdfAMAZON PRODUCT RESEARCH.pdf
AMAZON PRODUCT RESEARCH.pdf
JerikkLaureta15 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex9 views
Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman27 views
Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec11 views
Web Dev - 1 PPT.pdf by gdsczhcet
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet55 views

近未来的並列 LL

  • 2. @mootoh 5 : = 7:3 http://deadbeaf.org
  • 3. Molatomium CELL REGZA
  • 6. mootoh wraith13 goyoki STM hayamiz HPU MUDA syoyo Lock-free yamasa Haskell shelarcy ???
  • 8. • • 100 !
  • 9. • • 100 ! LL tiger
  • 10. LL
  • 12. (^o^) (^o^) (^o^) (^o^) (^o^) (^o^) (^o^) CC by-nc-sa : http://www.flickr.com/photos/carrapatoso/3467673411/
  • 13. “The Free Lunch is Over”, by Herb Sutter http://www.gotw.ca/publications/concurrency-ddj.htm
  • 14. “The Free Lunch is Over”, by Herb Sutter http://www.gotw.ca/publications/concurrency-ddj.htm
  • 15. • • CPU • ( ) • (^o^) •
  • 17. ?
  • 18. CC by-nc : http://www.flickr.com/photos/b-tal/407402521/
  • 20. : Eclipse.app • on iMac Core 2 Duo 3GHz 4GB RAM • : 33s, 2 : 7s
  • 21. : Eclipse.app • on iMac Core 2 Duo 3GHz 4GB RAM • : 33s, 2 : 7s
  • 22. : Eclipse.app • on iMac Core 2 Duo 3GHz 4GB RAM • : 33s, 2 : 7s (628,702 * 33s * 365 ) / (60 * 60 * 24 * 30) => 2,921 /
  • 23. • 21 : • • (GNH) •
  • 24. • 21 : • • (GNH) •
  • 25. : → • • → GNH
  • 26. LL
  • 27. Timeline 2010 2015 2020
  • 29. 2010 2015 2020
  • 30. • •≠ • Native thread •
  • 31. • Native thread • 5.6 ithread • thread VM • default shared nothing • 6.0 STM • • POE, AnyEvent, Coro, ...
  • 32. • Native & green thread ( ) • ruby1.8: green • ruby1.9: native, GIL • JRuby, MacRuby: native, GIL o/ • • Revactor, EventMachine, NeverBlock, ...
  • 33. • Thread • CPython: GVL • Jython, IronPython : • Jython: system 216% cpu 12.285 total
  • 34. • no threads, fork it
  • 35. Haskell • Haskell • • Parallel Haskell • Concurrent Haskell • STM • Native thread?
  • 36. • Actor • Native thread • beam.smp 193.2% • /
  • 37. • • JVM • Native thread • Actor
  • 38. • goroutine • Native thread • runtime.GOMAXPROCS(NCPU) • Channel •
  • 39. Javascript • HTML5 WebWorkers ! • • Native thread ? • WebKit •
  • 40. Perl Ruby Python PHP Haskell Erlang Scala go Javascript Native thread × ? ? Thread, Thread, Thread, STM Model, Message Message Message Thread Process Paradigm Passing Message Passing Passing STM Fiber Passing shared- nothing Web goroutine Workers by default
  • 42. Timeline 2010 2015 2020
  • 43.
  • 44. JVM • Native thread, • • : • JRuby, Jython, Scala, Clojure, ...
  • 46. • • , , , ... • • •
  • 47. I/O • • • •
  • 48. I/O • C10k • Event • AnyEvent (Perl) • EventMachine (Ruby)
  • 49. • • :) http://images.apple.com/macosx/technology/docs/ GrandCentral_TB_brief_20090903.pdf • :( ...? • : • Grand Central Dispatch → Mac http://en.wikipedia.org/wiki/File:Gcd_icon20090608.jpg • Java 7 → JVM • OpenCL http://www.khronos.org/opencl/
  • 50. • • • Out of Order • Future • • • : value resolved : value not resolved yet : executable Atom : pending Atom
  • 52. DSL C Mol Atom Runtime
  • 53. Mol • • • Atom ( ) •C main() { frame(frame_no, input) { local loop; local edge[-1..9] outside(0); Haskell local pocs[-1..9] outside(0); local ccr [-1..9] outside(0); DSL loop = loop_count(); edge[i] := edge_atom(input, i); ccr [i] := ccr_atom(edge[i-1], edge[i], edge[i+1], i); pocs[i] := i % 2 == 0 ? pocs_even_atom(ccr [i-1], ccr[i], ccr [i+1], loop, i) : pocs_odd_atom (pocs[i-1], ccr[i], pocs[i+1], loop, i); return &pocs; } sync for (i in [0..30]) put_frame_atom(frame(i, get_frame_atom())); }
  • 54. Runtime Atom Waiting arguments, waiting for runtime lock return value Shared • Memory VM update runtime context Global Lock Runtime Context • Runtime Atom Mol Atom Wait
  • 55. Runtime Atom Waiting arguments, waiting for runtime lock return value Shared • Memory VM update runtime context Global Lock Runtime Context • Runtime Atom Mol Atom Wait
  • 58. Timeline 2010 2015 2020
  • 60. | 8
  • 61. FAQ • ?
  • 62. FAQ • ? http://www.speedia.co.jp/~namisato/2008_05.html
  • 63. FAQ • ? http://www.speedia.co.jp/~namisato/2008_05.html P = f V^2 1MHz 1000 → 1GHz !
  • 64. Memory Wall CC-by : http://www.flickr.com/photos/afagen/4145629623/
  • 65. Memory Wall • • • • 100 • by “Can Manycores Support the Memory Requirements of Scientific Applications?” / A4MMC 2010
  • 66. Memory Wall • → • : Intel SCC • • HW http://techresearch.intel.com/articles/Tera-Scale/1826.htm
  • 67. • Actor • Erlang, Scala, go, Javascript (HTML5, WebWorkers) • LL CC-by : http://www.flickr.com/photos/punkscrapper/4276443469/
  • 69. ! http://dragon-quest.jp/five/monster/11kingusuraimu.html
  • 70. ! http://dragon-quest.jp/five/monster/11kingusuraimu.html
  • 71. 2015-2020 • • → •
  • 73. Timeline 2010 2015 2020
  • 74. http://karlnordstrom.ca/ideas/?p=6 http://www.fastcursor.com/computers/quantum-computer-photo-gallery.asp
  • 76. Timeline Message passing JVM 2010 2015 2020
  • 77. LL
  • 78. LL P • OK (Portable) • • (Performance) • (Productivity) • OK
  • 80. LL • OK (Portable) • • (Performance) • (Productivity) • OK
  • 81. LL ? • Light • • • DSL
  • 82. : DSL • LL • : C, Ruby, Perl, PHP, ... • Communicating Sequential Process • LL • • Glue LL, LL
  • 83. ? • • • ( ) • • 40% (by Harvard Business Review http://blogs.hbr.org/bregman/2010/05/how-and-why-to-stop-multitaski.html )
  • 84. • • • • • http://dragon-quest.jp/five/
  • 85. • • • C ...
  • 86. • • ( ) •
  • 87. Re-Discover • • : • GC • Javascript • •
  • 88. LL • • •
  • 91. ?
  • 92. 1. : Ray Tracing http://lucille.sourceforge.net/gallery/0_1_3/index.html
  • 93. • • : • • •
  • 94. 2. “ ” http://blogs.itmedia.co.jp/yasusasaki/2010/07/ipad-ab70.html
  • 95. 2. • try-error ...? • • Pixelmator •
  • 96. 3. http://commons.wikimedia.org/wiki/File:Box2d-screenshot.png http://www.flickr.com/photos/nh567/1406671607/ http://www.flickr.com/photos/overig/4639331740/
  • 98. •3 •2 →3
  • 100. LL • • LL • • • • • ?