Orca A language for parallel programming of distributed systems.

Slides:



Advertisements
Similar presentations
Multiple Processor Systems
Advertisements

Symbol Table.
Chapter 6 Structures By C. Shing ITEC Dept Radford University.
Programming Languages and Paradigms
1 Compiler Construction Intermediate Code Generation.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Chapter 1 OO using C++. Abstract Data Types Before we begin we should know how to accomplish the goal of the program We should know all the input and.
Distributed Shared Memory
Cache Coherent Distributed Shared Memory. Motivations Small processor count –SMP machines –Single shared memory with multiple processors interconnected.
Computer Architecture Introduction to MIMD architectures Ola Flygt Växjö University
Introduction in algorithms and applications Introduction in algorithms and applications Parallel machines and architectures Parallel machines and architectures.
Multiple Processor Systems Chapter Multiprocessors 8.2 Multicomputers 8.3 Distributed systems.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
Note The “Scientific Visualization” class starts this Tuesday (2 November) 11 am, S1.11 See
Multiple Processor Systems 8.1 Multiprocessors 8.2 Multicomputers 8.3 Distributed systems.
Communication in Distributed Systems –Part 2
Communication Models for Parallel Computer Architectures 4 Two distinct models have been proposed for how CPUs in a parallel computer system should communicate.
The Mach System "Operating Systems Concepts, Sixth Edition" by Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presentation by Jonathan Walpole.
C++ for Java Programmers Chapter 1 Basic Philosophical Differences.
Advances in Language Design
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
Comparative Programming Languages hussein suleman uct csc304s 2003.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Distributed Shared Memory Systems and Programming
Data Structures Winter What is a Data Structure? A data structure is a method of organizing data. The study of data structures is particularly important.
Object-Oriented Implementation of Reconciliations M.Sc. Seminar Talk by Costa Shapiro under supervision of Prof. Shmuel Katz Computer Science – Technion.
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster and powerful computers –shared memory model ( access nsec) –message passing.
Distributed Shared Memory: A Survey of Issues and Algorithms B,. Nitzberg and V. Lo University of Oregon.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Names Variables Type Checking Strong Typing Type Compatibility 1.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Programming Language C++ Xulong Peng CSC415 Programming Languages.
Overloading Binary Operators Two ways to overload –As a member function of a class –As a friend function As member functions –General syntax Data Structures.
Computer Science Department Data Structure & Algorithms Lecture 8 Recursion.
Chapter 3 Parallel Programming Models. Abstraction Machine Level – Looks at hardware, OS, buffers Architectural models – Looks at interconnection network,
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Interpretation Environments and Evaluation. CS 354 Spring Translation Stages Lexical analysis (scanning) Parsing –Recognizing –Building parse tree.
Distributed Shared Memory Based on Reference paper: Distributed Shared Memory, Concepts and Systems.
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
Cache Coherence Protocols 1 Cache Coherence Protocols in Shared Memory Multiprocessors Mehmet Şenvar.
BİL 744 Derleyici Gerçekleştirimi (Compiler Design)1 Run-Time Environments How do we allocate the space for the generated target code and the data object.
Introduction to OpenMP Eric Aubanel Advanced Computational Research Laboratory Faculty of Computer Science, UNB Fredericton, New Brunswick.
The Mach System Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presented by: Jee Vang.
Basic Memory Management 1. Readings r Silbershatz et al: chapters
1 Chapter 9 Distributed Shared Memory. 2 Making the main memory of a cluster of computers look as though it is a single memory with a single address space.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
1 Structure of Compilers Lexical Analyzer (scanner) Modified Source Program Parser Tokens Semantic Analysis Syntactic Structure Optimizer Code Generator.
Wide-Area Parallel Computing in Java Henri Bal Vrije Universiteit Amsterdam Faculty of Sciences vrije Universiteit.
Distributed shared memory u motivation and the main idea u consistency models F strict and sequential F causal F PRAM and processor F weak and release.
What is a Process ? A program in execution.
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,
Distributed Computing Systems CSCI 6900/4900. Review Definition & characteristics of distributed systems Distributed system organization Design goals.
Copyright © 2012 Pearson Education, Inc. Chapter 10 Advanced Topics.
Orca A language for parallel programming of distributed systems.
Dr. M. Al-Mulhem Introduction 1 Chapter 6 Type Systems.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Run-Time Environments Presented By: Seema Gupta 09MCA102.
Object-Based Distributed Shared Memory
Distributed Shared Memory
Computer Engg, IIT(BHU)
CMSC 611: Advanced Computer Architecture
Multiple Processor Systems
Background and Motivation
Subject : T0152 – Programming Language Concept
Prof. Leonardo Mostarda University of Camerino
Presentation transcript:

Orca A language for parallel programming of distributed systems

2 Orca Parallel language designed at VU Design and first implementation (‘88-’92): –Bal, Kaashoek, Tanenbaum Portable Orca system (‘93-’97): –Bal, Bhoedjang, Langendoen, Rühl, Jacobs, Hofman Used by ~30 M.Sc. Students

3 Overview Distributed shared memory Orca –Shared data-object model –Processes –Condition synchronization –Language aspects Examples: TSP and ASP Implementation

4 Orca’s Programming Model Explicit parallelism (processes) Communication model: –Shared memory: hard to build –Distributed memory: hard to program Idea: shared memory programming model on distributed memory machine Distributed shared memory (DSM)

5 Distributed Shared Memory(1) Hardware (CC-NUMA): –Cache-coherent Non Uniform Memory Access –Processor can copy remote cache line –Hardware keeps caches coherent –Examples: DASH, Alewife, SGI Origin CPU cache/ memory remote read local read

6 Distributed Shared Memory(2) Operating system: –Shared virtual memory –Processor can fetch remote pages –OS keeps copies of pages coherent User-level system –Treadmarks –Uses OS-like techniques –Implemented with mmap and signals

7 Distributed Shared Memory(3) Languages and libraries –Do not provide flat address space –Examples: Linda: tuple spaces CRL: shared regions Orca: shared data-objects

8 Shared Data-object Model Shared data encapsulated in objects Object = variable of abstract data type Shared data accessed by user-defined, high- level operations Object Local data Enqueue( ) Dequeue( )

9 Semantics Each operation is executed atomically –As if operations were executed 1 at a time –Mutual exclusion synchronization –Similar to monitors Each operation applies to single object –Allows efficient implementation –Atomic operations on multiple objects are seldom needed and hard to implement

10 Implementation System determines object distribution It may replicate objects (transparently) Single-copy object Network CPU 1CPU 2 Replicated object Network CPU 1CPU 2

11 Object Types Abstract data type Two parts: 1Specification part ADT operations 2Implementation part Local data Code for operations Optional initialization code

12 Example: Intobject Specification part object specification IntObject; operation Value(): integer; operation Assign(Val: integer); operation Min(Val: integer); end; object specification IntObject; operation Value(): integer; operation Assign(Val: integer); operation Min(Val: integer); end;

13 Intobject Implementation Part object implementation IntObject; X: integer; # internal data of the object operation Value(): integer; begin return X; end; operation Assign(Val: integer); begin X := Val; end operation Min(Val: integer); begin if Val < X then X := Val; fi; end; object implementation IntObject; X: integer; # internal data of the object operation Value(): integer; begin return X; end; operation Assign(Val: integer); begin X := Val; end operation Min(Val: integer); begin if Val < X then X := Val; fi; end;

14 Usage of Objects # declare (create) object MyInt: IntObject; # apply operations to the object MyInt$Assign(5); tmp := MyInt$Value(); # atomic operation MyInt$Min(4); # multiple operations (not atomic) if MyInt$Value() > 4 then MyInt$Assign(4); fi; # declare (create) object MyInt: IntObject; # apply operations to the object MyInt$Assign(5); tmp := MyInt$Value(); # atomic operation MyInt$Min(4); # multiple operations (not atomic) if MyInt$Value() > 4 then MyInt$Assign(4); fi;

15 Parallelism Expressed through processes –Process declaration: defines behavior –Fork statement: creates new process Object made accessible by passing it as shared parameter (call-by-reference) Any other data structure can be passed by value (copied)

16 Example (Processes) # declare a process type process worker(n: integer; x: shared IntObject); begin #do work... x$Assign(result); end; # declare an object min: IntObject; # create a process on CPU 2 fork worker(100, min) on (2); # declare a process type process worker(n: integer; x: shared IntObject); begin #do work... x$Assign(result); end; # declare an object min: IntObject; # create a process on CPU 2 fork worker(100, min) on (2);

17 Structure of Orca Programs Initially there is one process (OrcaMain) A process can create child processes and share objects with them Hierarchy of processes communicating through objects No lightweight treads

18 Condition Synchronization Operation is allowed to block initially –Using one or more guarded statements Semantics: –Block until 1 or more guards are true –Select a true guard, execute is statements operation name(parameters); guard expr-1 do statements-1; od;.... guard expr-N do statements-N od; end; operation name(parameters); guard expr-1 do statements-1; od;.... guard expr-N do statements-N od; end;

19 Example: Job Queue object implementation JobQueue; Q: “queue of jobs”; operation addjob(j: job); begin enqueue(Q,j); end; operation getjob(): job; begin guard NotEmpty(Q) do return dequeue(Q); od; end; object implementation JobQueue; Q: “queue of jobs”; operation addjob(j: job); begin enqueue(Q,j); end; operation getjob(): job; begin guard NotEmpty(Q) do return dequeue(Q); od; end;

20 Traveling Salesman Problem Structure of the Orca TSP program JobQueue and Minimum are objects Master Slave JobQueueMinimum

21 Language Aspects (1) Syntax somewhat similar to Modula-2 Standard types: –Scalar (integer, real) –Dynamic arrays –Records, unions, sets, bags –Graphs Generic types (as in Ada) User-defined abstract data types

22 Language Aspects (2) No global variables No pointers Type-secure –Every error against the language rules will be detected by the compiler or runtime system Not object-oriented –No inheritance, dynamic binding, polymorphism

23 Example Graph Type: Binary Tree type node = nodename of BinTree; type BinTree = graph root: node; # global field nodes # fields of each node data: integer; LeftSon, RightSon: node; end; type node = nodename of BinTree; type BinTree = graph root: node; # global field nodes # fields of each node data: integer; LeftSon, RightSon: node; end; t: BinTree; # create tree n: node; # nodename variable n := addnode(t); # add a node to t t.root := n; # access global field t[n].data := 12; # fill in data on node n t[n].LeftSon := addnode(t); # create left son deletenode(t,n); # delete node n t[n].data := 11; # runtime error t: BinTree; # create tree n: node; # nodename variable n := addnode(t); # add a node to t t.root := n; # access global field t[n].data := 12; # fill in data on node n t[n].LeftSon := addnode(t); # create left son deletenode(t,n); # delete node n t[n].data := 11; # runtime error

24 Performance Issues Orca provides high level of abstraction  easy to program  hard to understand performance behavior Example: X$foo() can either result in: –function call (if X is not shared) –monitor call (if X is shared and stored locally) –remote procedure call (if X is stored remotely) –broadcast (if X is replicated)

25 Performance model The Orca system will: –replicate objects with a high read/write-ratio –store nonreplicated object on ``best’’ location Communication is generated for: –writing replicated object (broadcast) –accessing remote nonreplicated object (RPC) Programmer must think about locality

26 Summary of Orca Object-based distributed shared memory –Hides the underlying network from the user –Applications can use shared data Language is especially designed for distributed systems User-defined, high-level operations