Objectoriented approach to parallel programming on the 'NET platform - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Objectoriented approach to parallel programming on the 'NET platform

Description:

Polyphonic C# : an extension of the C# with new asynchronous ... Mandelbrot set. Configuration: All nodes. Pentium III 600 MHz x 2, 512 Mb. Results. Life game ... – PowerPoint PPT presentation

Number of Views:102
Avg rating:3.0/5.0
Slides: 18
Provided by: chud150
Category:

less

Transcript and Presenter's Notes

Title: Objectoriented approach to parallel programming on the 'NET platform


1
Object-oriented approach toparallel programming
on the .NET platform
  • Polyphonic C an extension of the C with new
    asynchronous concurrency model
  • MC a distributed variant of the Polyphonic C
  • Examples of programming in MC
  • Implementation issues
  • Results and problems

2
Polyphonic C an extension of the C with new
asynchronous concurrency constructs
  • Nick Benton, Luca Cardelli, Cedric Fournet
    (Microsoft Research Laboratory, Cambridge)
  • "Modern Concurrency Abstractions for C" - to
    appear in ACM Transactions on Programming
    Languages and Systems
  • http//research.microsoft.com/nick/polyphony

3
Some history
  • p - calculus ( R. Milner, 1992 )
  • Join-calculus ( C. Fournet, G,Gonthier, 1996 )
  • Polyphonic C ( N.Benton, L.Cardelli, C.Fournet,
    2002 )
  • Polyphonic C C
  • asynchronous methods chords

C
4
Asynchronous model of Polyphonic C
  • Asynchronous methods
  • async Compute( int n )
  • // method body
  • Chords
  • int Get() async c( int x )
  • return ( x )

5
MC a distributed variant of the Polyphonic C
  • Movable methods
  • movable Compute( int n )
  • // method body
  • Channels
  • int Get() Channel c( int x )
  • return ( x )

6
MC a distributed variant of the Polyphonic C
  • New modifiers for movable methods
  • functional
  • non-functional
  • global
  • Channel types
  • movable Compute( int n,
  • Channel( int ) c )
  • movable Compute( int n,
  • Channel( Channel( int ) ) c )

7
Examples of programming in MCn - th Fibonacci
number
  • class Fib
  • public movable Compute( int n, Channel( int ) c
    )
  • if ( n lt 2 ) c( 1 )
  • else
  • Fib f new Fib()
  • Compute( n - 1, f.c1 )
  • Compute( n - 2, f.c2 )
  • c( f.Get2() )
  • int Get2() Channel c1( int x )
  • Channel c2( int y )
  • return x y

8
Examples of programming in MCn - th Fibonacci
number
  • class ComputeFib
  • public static void Main( string args )
  • int n System.Convert.ToInt32( args 0 )
  • ComputeFib cf new ComputeFib()
  • Fib fib new Fib()
  • fib.Compute( n, cf.c )
  • Console.WriteLine( n "-th Fibonacci number
    is
  • cf.Get() )
  • public int Get() Channel c( int x )
  • return x

9
Examples of programming in MCEratosthenes sieve
  • Bi-directional channels
  • public class BDChannel
  • public BDChannel()
  • public void Send( params object o )
  • public int Receive()

10
Examples of programming in MCEratosthenes sieve
  • movable Sieve( BDChannel cin, BDChannel cout )
  • int head (int) cin.Receive()
  • if ( head -1 )
  • cout.Send( -1 )
  • else
  • cout.Send( head )
  • BDChannel inter new BDChannel()
  • Sieve( inter, cout )
  • filter( head, cin, inter )

11
Implementations issues
  • MC - implementation Compiler
    Runtime-system
  • Compiler
  • translates a program from MC to C
  • preparing it for execution under the
    Runtime-system
  • Runtime-system
  • ResourceManager
  • - distributes movable methods over the nodes
  • WorkNode
  • - starts and controls execution of movable
    methods
  • Communicator
  • - transfers the channel messages to objects
    located on given node

12
ResultsFibonacci (granule 40)
Configuration All nodes Pentium III 600 MHz x
2, 512 Mb
13
ResultsMandelbrot set
Configuration All nodes Pentium III 600 MHz x
2, 512 Mb
14
ResultsLife game
Configuration All nodes Pentium III 600 MHz x
2, 512 Mb
Fragments 3 100 width 33 height 100 frames
15
Zhukovsky problem
16
Zhukovsky problem
17
Problems
  • Memory management in Windows
  • Performance of C-programs vs C and
    Fortran-programs
  • Serialization performance
  • Generics for C
  • Maximal number of threads
Write a Comment
User Comments (0)
About PowerShow.com