H IGH - LEVEL M ULTITHREADED P ROGRAMMING [P ART III] Primož Gabrijelčič.

Slides:



Advertisements
Similar presentations
Developer Knowledge Sharing Eric Sun Dec, What programming language did you learn in school and since then? Now, its time to refresh …
Advertisements

Shared-Memory Model and Threads Intel Software College Introduction to Parallel Programming – Part 2.
Module 6: Process Synchronization
Chapter 4 Computation Bjarne Stroustrup
Freedom – MuniciPAY Credit Card Interface 1Freedom Systems – MuniciPAY Credit Card Interface Webinar WELCOME TO THE FREEDOM – MUNICIPAY CREDIT CARD INTERFACE.
2011 MegaChurch Compensation Survey
DDD Using and Extending Excel with Visual Studio A high level discussion of the main options Simon Murphy Developer – Codematic.
IBM Research: Software Technology © 2006 IBM Corporation 1 Programming Language X10 Christoph von Praun IBM Research HPC WPL Sandia National Labs December.
Samenwerking Win32 en.NET met Delphi en Hydra 3 Bob Swart Bob Swart Training & Consultancy (& Reseller) –
H IGH - LEVEL M ULTITHREADED P ROGRAMMING [P ART I] Primož Gabrijelčič.
Developing for Windows and OS X Primož Gabrijelčič.
(c) Anne Dwyer 2007 Academic Reports and Exam Qs.1 Identify the purpose Brainstorm the scope Decide on your main messages PLAN.
H IGH - LEVEL M ULTITHREADED P ROGRAMMING [P ART II] Primož Gabrijelčič.
Smart Mobile Studio today
Execute Blocks of Code Multiple Times Telerik Software Academy C# Fundamentals – Part 1.
Optimizing single thread performance Dependence Loop transformations.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Potential Languages of the Future Chapel,
Parallel Programming with OmniThreadLibrary
Fast programs for modern computers
Multithreading Made Simple with OmniThreadLibrary
Parallel Programming Made Easy Primož Gabrijelčič,
UML Activity Diagrams In UML an activity diagram is used to display the sequence of actions They show the workflow from start to finish Detail the many.
1 Tuesday, November 07, 2006 “If anything can go wrong, it will.” -Murphy’s Law.
Trey Mack James Moore Osa Osar-Emokpae
G ETTING F ULL S PEED WITH D ELPHI Primož Gabrijelčič otl.17slon.com [W HY S INGLE -T HREADING I S N OT E.
What is Concurrent Programming? Maram Bani Younes.
SEC(R) 2008 Intel® Concurrent Collections for C++ - a model for parallel programming Nikolay Kurtov Software and Services.
How do developers use parallel Libraries? Semih Okur & Danny Dig University of Illinois at Urbana- Champaign.
Building Multithreaded Solutions with OmniThreadLibrary
Reactive Extensions Ye olde introduction and walk-through, with plenty o’ code.
Genetic Programming with ECJ University of Extremadura Francisco Fernández de Vega Daniel Lombraña González.
Threaded Applications Introducing additional threads in a Delphi application is easy.
{ Concordia University Texas Philip Schielke.  Small Liberal Arts college in NW Austin  Founded in 1926  Part of Concordia University System of the.
Consuming REST Services from C# SoftUni Team Technical Trainers Software University
Loops Repeating Code Multiple Times SoftUni Team Technical Trainers Software University
Chapter 3 Parallel Programming Models. Abstraction Machine Level – Looks at hardware, OS, buffers Architectural models – Looks at interconnection network,
SIMPLE PARALLEL PROGRAMMING WITH PATTERNS AND OMNITHREADLIBRARY PRIMOŽ GABRIJELČIČ SKYPE: GABR42
FastMM in Depth Primož Gabrijelčič,
Performance of mathematical software Agner Fog Technical University of Denmark
Robert Vitolo CS474.  Branched off of ML (metalanguage)  Developed at Microsoft, available as part of the Visual Studio 2010 software package, integrated.
Expressing Parallel Patterns in Modern C++ Rahul V. Patil Microsoft C++ Parallel Computing Team Note: this is a simplified version of the deck used in.
Developing TCP/IP-based Server Applications using Indy Components  Christian Wilkerson.
1 Integration Services in SQL Server 2008 Allan Mitchell – SQLBits – Oct 2007.
Asynchronous Web Services Writing Asynchronous Web Services SoftUni Team Technical Trainers Software University
Data Parallelism Task Parallel Library (TPL) The use of lambdas Map-Reduce Pattern FEN 20141UCN Teknologi/act2learn.
Simplify Parallel Programming with Patterns Primož Gabrijelčič R&D Manager, FAB.
Function Level Parallelism Driven by Data Dependencies By Sean Rul, Hans Vandierendonck, Koen De Bosschere dasCMP 2006, December 10.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Martin Kruliš by Martin Kruliš (v1.0)1.
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
Asynchronous Programming Writing Concurrent Code in C# SoftUni Team Technical Trainers Software University
Parallel Computing Chapter 3 - Patterns R. HALVERSON MIDWESTERN STATE UNIVERSITY 1.
T-SQL Power! Windows That Open Doors Adam
CTOption Review. CTOption Review | Has an Auto Trading Bot | Panda systems  CTOption is one of the older brokers, having been around since the year 2010.
Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2017
Faster parallel programs with improved FastMM
Writing a Simple DSL Compiler with Delphi
Data Structure and Algorithms
Async or Parallel? No they aren’t the same thing!
Critical sections, locking, monitors, etc.
SHARED MEMORY PROGRAMMING WITH OpenMP
Dynamic Parallelism Martin Kruliš by Martin Kruliš (v1.0)
Unleash the power of Delphi debugger
Creating Windows Store Apps Using Visual Basic
Parallel Programming Done Right with OTL and PPL
Writing High Performance Delphi Application
Loops CIS 40 – Introduction to Programming in Python
Shared Memory Programming
Iteration Implemented through loop constructs (e.g., in C++)
EE 4xx: Computer Architecture and Performance Programming
Presentation transcript:

H IGH - LEVEL M ULTITHREADED P ROGRAMMING [P ART III] Primož Gabrijelčič

B ACKGROUND I NFORMATION

About Me Primož Gabrijelčič Programmer, consultant, writer, speaker – thedelphigeek.com – Hacking multithreaded code since 1999

About OmniThreadLibrary „VCL for multithreading“ Delphi 2007 – XE3[4] Open source – OpenBSD license – – omnithreadlibrary.googlecode.com Win32/Win64

About the Webinars Code and video: Code = free, video = $10 20 free books, courtesy of the De Novo Software,

High-Level Abstractions Async [/Await] Future Join ForEach ParallelTask BackgroundWorker Pipeline ForkJoin

Which abstraction to use? Consider data flow!

High-Level Abstractions Async [/Await] Future Join ForEach ParallelTask BackgroundWorker ForkJoin Pipeline Parallel iteration over data

ForEach

Iterate over … Integer range Enumerable collection (TStringList …) Thread-safe enumerable collection (OTL) Blocking collection (IOmniBlockingCollection) Anything – Custom enumerator function – Main program writing into a blocking collection

Special features Synchronized access to data Data prefetching Work stealing Optional output ordering Aggregation

aggregate := initial value for each value in source Execute(value, result) if not result.IsEmpty then Agreggator(aggregate, value)

Demos 35_ParallelFor 36_ParallelAggregate 38_OrderedFor

High-Level Abstractions Async [/Await] Future Join ForEach ParallelTask BackgroundWorker ForkJoin Pipeline Parallelization of multistage operations

Pipeline

Example

Web Spider

P ARTING N OTES

Keep in Mind Don’t parallelize everything Rethink the algorithm Data flow dictates the abstraction Measure the improvements Test, test and test

Code Will be available shortly at