Middleware. Peter Marwedel TU Dortmund, Informatik 12 Germany. Graphics: Alexandra Nolte, Gesine

Similar documents
Embedded & Real-time Operating Systems Communication Libraries

Questions from last time

Hardware/ Software Partitioning

Specifications and Modeling

Using a Real-time, QoS-based ORB to Intelligently Manage Communications Bandwidth in a Multi-Protocol Environment

Concurrency, Thread. Dongkun Shin, SKKU

Standard Optimization Techniques

Mapping of Applications to Multi-Processor Systems

Evaluation and Validation

Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5

CSE 237A Middleware and Operating Systems. Tajana Simunic Rosing Department of Computer Science and Engineering University of California, San Diego.

Evaluation and Validation

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

Chapter 4: Threads. Operating System Concepts 9 th Edit9on

Distributed Objects. Object-Oriented Application Development

DS 2009: middleware. David Evans

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

CS370 Operating Systems

Agent and Object Technology Lab Dipartimento di Ingegneria dell Informazione Università degli Studi di Parma. Distributed and Agent Systems

Designing High Performance IEC61499 Applications on Top of DDS

The MPI Message-passing Standard Practical use and implementation (I) SPD Course 2/03/2010 Massimo Coppola

Warm-up question (CS 261 review) What is the primary difference between processes and threads from a developer s perspective?

CS 261 Fall Mike Lam, Professor. Threads

A unified multicore programming model

Chapter 4: Threads. Chapter 4: Threads. Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

Distributed Systems Principles and Paradigms. Chapter 01: Introduction

Chapter 4: Threads. Chapter 4: Threads

Applying UML Modeling and MDA to Real-Time Software Development

Distributed Systems Principles and Paradigms. Chapter 01: Introduction. Contents. Distributed System: Definition.

Verteilte Systeme (Distributed Systems)

Distributed Information Processing

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR (ODD SEMESTER) QUESTION BANK

Discussion CSE 224. Week 4

Message-Passing Shared Address Space

CA464 Distributed Programming

Imperative model of computation

DISTRIBUTED COMPUTER SYSTEMS

PROGRAMOVÁNÍ V C++ CVIČENÍ. Michal Brabec

HPC Workshop University of Kentucky May 9, 2007 May 10, 2007

Advanced Lectures on knowledge Engineering

Overview. Distributed Systems. Distributed Software Architecture Using Middleware. Components of a system are not always held on the same host

Distributed Systems Principles and Paradigms

Chapter 4: Multi-Threaded Programming

Multicore and Multiprocessor Systems: Part I

Chip Multiprocessors COMP Lecture 9 - OpenMP & MPI

Vulkan: Scaling to Multiple Threads. Kevin sun Lead Developer Support Engineer, APAC PowerVR Graphics

Verteilte Systeme (Distributed Systems)

Threads. Threads (continued)

CS A331 Programming Language Concepts

Chapter 4: Threads. Operating System Concepts 9 th Edition

Contents. Preface xvii Acknowledgments. CHAPTER 1 Introduction to Parallel Computing 1. CHAPTER 2 Parallel Programming Platforms 11

Multiprocessors 2007/2008

OPERATING SYSTEM. Chapter 4: Threads

Specifications and Modeling

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 1. Introduction

Chapter 16. Layering a computing infrastructure

Chapter 4: Threads. Operating System Concepts 9 th Edition

Model-Driven QoS Provisioning Techniques for CCM DRE Systems

CORBA Object Transaction Service

Today: Distributed Middleware. Middleware

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

Chapter 1: Distributed Systems: What is a distributed system? Fall 2013

Parallel Programming Models. Parallel Programming Models. Threads Model. Implementations 3/24/2014. Shared Memory Model (without threads)

CSE 4/521 Introduction to Operating Systems. Lecture 29 Windows 7 (History, Design Principles, System Components, Programmer Interface) Summer 2018

Model Based Development of Embedded Control Software

ECE 574 Cluster Computing Lecture 8

Web Services - Concepts, Architecture and Applications Part 3: Asynchronous middleware

POSIX Threads and OpenMP tasks

IPC. Communication. Layered Protocols. Layered Protocols (1) Data Link Layer. Layered Protocols (2)

Chapter 4: Multithreaded Programming

Operating Systems : Overview

Introduction to PThreads and Basic Synchronization

CS333 Intro to Operating Systems. Jonathan Walpole

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

WCET-Aware C Compiler: WCC

MCAP: Multiple Client Access Protocol Ravindra Singh Rathore SML College Jhunjhunu, Rajasthan India

Dr Markus Hagenbuchner CSCI319 SIM. Distributed Systems Chapter 4 - Communication

Distributed Systems Middleware

Imperative model of computation

fakultät für informatik informatik 12 technische universität dortmund Specifications Peter Marwedel TU Dortmund, Informatik /11/15

An Introduction to Parallel Systems

Page 1. CS 194: Distributed Systems Distributed Coordination-based Systems. Coordination Systems. Taxonomy of Coordination Models

02 - Distributed Systems

CSE 333 SECTION 9. Threads

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs

Report. Middleware Proxy: A Request-Driven Messaging Broker For High Volume Data Distribution

PCAP Assignment I. 1. A. Why is there a large performance gap between many-core GPUs and generalpurpose multicore CPUs. Discuss in detail.

Achieving Predictable Multicore Execution of Automotive Applications Using the LET Paradigm

Multi-core Architecture and Programming

Concurrent and Distributed Systems Introduction

Concurrency, Mutual Exclusion and Synchronization C H A P T E R 5

Application Servers in E-Commerce Applications

Operating System Support

High Performance Computing Lecture 21. Matthew Jacob Indian Institute of Science

PThreads in a Nutshell

Processes and Threads

A Tutorial on The Jini Technology

CSE 4/521 Introduction to Operating Systems

Transcription:

Universität Dortmund Middleware Peter Marwedel TU Dortmund, Informatik 12 Germany Marwedel, 2003 Graphics: Alexandra Nolte, Gesine 2011 年 06 月 17 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply.

Structure of this course Application Knowledge 2: Specification Design repository Design 3: 8: ES-hardware 6: Application Test mapping 4: system software (RTOS, middleware, ) 7: Optimization 5: Evaluation & validation (energy, cost, performance, ) Numbers denote sequence of chapters - 2 -

Reuse of standard software components Knowledge from previous designs to be made available in the form of intellectual property (IP, for SW & HW). Operating systems Middleware. - 3 -

OSEK/VDX COM OSEK/VDX COM is a special communication standard for the OSEK automotive OS Std. OSEK/VDX COM provides an Interaction Layer as an application programming interface (API) through which internal and external communication can be performed. OSEK/VDX COM specifies just the functionality of the Interaction layer. Conforming implementations must be developed separately. The Interaction layer communicates with other ECUs via a Network Layer and a Data Link layer. Some requirements for these layers are specified, but these layers themselves are not part of OSEK/VDX COM. - 4 -

Impact of Priority Inversion on Access Methods for Remote Objects Software packages for access to remote objects; Example: CORBA (Common Object Request Broker Architecture). Information sent to Object Request Broker (ORB) via local stub. ORB determines location to be accessed and sends information via the IIOP I/O protocol. Access times not predictable. - 5 -

Real-time (RT-) CORBA A very essential feature of RT-CORBA is to provide end-to-end predictability of timeliness in a fixed priority system. This involves respecting thread priorities between client and server for resolving resource contention, and bounding the latencies of operation invocations. Thread priorities might not be respected when threads obtain mutually exclusive access to resources (priority inversion). RT-CORBA includes provisions for bounding the time during which such priority inversion can happen. - 6 -

Real-time CORBA - Thread priority management - RT-CORBA includes facilities for thread priority management. Priority independent of the priorities of the underlying OS, even though it is compatible with the RT-extensions of the POSIX standard for OSs [Harbour, 1993]. The thread priority of clients can be propagated to the server side. Priority management for primitives for mutually exclusive access to resources. Priority inheritance protocol must be available in implementations of RT-CORBA. Pools of preexisting threads avoid the overhead of thread creation and thread-construction. - 7 -

Message passing interface (MPI) Library designed for high-performance computing (hpc) Based on asynchronous/synchronous message passing Comprehensive, popular library Available on a variety of platforms Considered also for multiple processor system-on-a-chip (MPSoC) programming for embedded systems; MPI includes many copy operations to memory (memory speed ~ communication speed for MPSoCs); Appropriate MPSoC programming tools missing. Mostly for homogeneous multiprocessing http://www.mhpcc.edu/training/workshop/mpi/main.html#getting_started - 8 -

MPI (1) Sample blocking library call (for C): MPI_Send(buffer,count,type,dest,tag,comm) where - buffer: Address of data to be sent - count: number of data elements to be sent - type: data type of data to be sent (e.g. MPI_CHAR, MPI_SHORT, MPI_INT, ) - dest: process id of target process - tag: message id (for sorting incoming messages) - comm: communication context = set of processes for which destination field is valid - function result indicates success http://www.mhpcc.edu/training/workshop/mpi/main.html#getting_started - 9 -

MPI (2) Sample non-blocking library call (for C): MPI_Isend(buffer,count,type,dest,tag,comm,request) where - buffer comm: same as above - request: the system issues a unique "request number". The programmer uses this system assigned "handle" later (in a WAIT type routine) to determine completion of the non-blocking operation. http://www.mhpcc.edu/training/workshop/mpi/main.html#getting_started - 10 -

RT-issues for MPI MPI/RT: a real-time version of MPI [MPI/RT forum, 2001]. MPI-RT does not cover issues such as thread creation and termination. MPI/RT is conceived as a potential layer between the operating system and standard (non real-time) MPI. - 11 -

Evaluation Explicit Computation partitioning Communication Data distribution Implicit Synchronization (implied by communic., explicit possible) Expression of parallelism (implied) Communication mapping Properties Most things are explicit Based on Wilfried Verachtert (IMEC): Introduction to Parallelism, tutorial, DATE 2008 Lots of work for the user ( assembly lang. for parallel prog. ) doesn t scale well when # of processors is changed heavily - 12 -

Pthreads Shared memory model - Completely explicit synchronization - Originally used for single processor - Exact semantics depends on the memory consistency model - Synchronization is very hard to program correctly Consists of standard API - Locks ( mutex, read-write locks) - Condition variables - Typically supported by a mixture of hardware (shared memory) and software (thread management) Support for efficient producer/consumer parallelism relies on murky parts of the model Pthreads can be used as back-end for other programming models (e.g. OpenMP) Based on Wilfried Verachtert (IMEC): Introduction to Parallelism, tutorial, DATE 2008-13 -

PThreads Example threads = (pthread_t *) malloc(n*sizeof(pthread_t)); pthread_attr_init(&pthread_custom_attr); for (i=0;i<n; i++) pthread_create(&threads[i], &pthread_custom_attr, task, ) for (i=0;i<n; i++) { pthread_mutex_lock(&mutex); <receive message> pthread_mutex_unlock(&mutex); } for (i=0;i<n; i++) pthread_join(threads[i], NULL) void* task(void *arg) { pthread_mutex_lock(&mutex); <send message> pthread_mutex_unlock(&mutex); return NULL } Based on Wilfried Verachtert (IMEC): Introduction to Parallelism, tutorial, DATE 2008-14 -

OpenMP Explicit Expression of parallelism (mostly explicit) Implicit Computation partitioning Communication Synchronization Data distribution Parallelism expressed using pragmas Parallel loops (essentially data parallelism) Parallel sections Based on Wilfried Verachtert (IMEC): Introduction to Parallelism, tutorial, DATE 2008 Reductions Implementations target shared memory hardware Lack of control over partitioning can cause problems - 15 -

Universal Plug-and-Play (UPnP) Extension of the plug-and-play concept Goal: Enable the emergence of easily connected devices and to simplify the implementation of networks in the home and corporate environments Examples: Discover printers, storage space easily, control switches in homes and offices Exchanging data, no code (reduces security hazards) Agreement on data formats and protocols Classes of predefined devices (printer, mediaserver etc.) http://upnp.org - 16 -

Devices Profile for Web Services (DPWS) More general than UPnP The Devices Profile for Web Services (DPWS) defines a minimal set of implementation constraints to enable secure Web Service messaging, discovery, description, and eventing on resource-constrained devices. DPWS specifies a set of built-in services: - Discovery services: used by a device connected to a network to advertise itself and to discover other devices. - Metadata exchange services: provide dynamic access to a device s hosted services and to their metadata. - Publish/subscribe eventing services: allowing other devices to subscribe to asynchronous event messages Lightweight protocol, supporting dynamic discovery, its application to automation environments is clear. http://en.wikipedia.org/wiki/devices_ Profile_for_Web_Services - 17 -

Network Communication Protocols - e.g. JXTA - Open source peer-to-peer protocol specification. Defined as a set of XML messages that allow any device connected to a network to exchange messages and collaborate independently of the network topology. Designed to allow a range of devices to communicate. Can be implemented in any modern computer language. JXTA peers create a virtual overlay network, allowing a peer to interact with other peers even when some of the peers and resources are behind firewalls and NATs or use different network transports. Each resource is identified by a unique ID, so that a peer can change its localization address while keeping a constant identification number. http://en.wikipedia.org/wiki/jxta - 18 -

Real-time data bases (1) Goal: store and retrieve persistent information Transaction= sequence of read and write operations Changes not final until they are committed Requested ( ACID ) properties of transactions 1. Atomic: state information as if transaction is either completed or had no effect at all. 2. Consistent: Set of values retrieved from several accesses to the data base must be possible in the world modeled. 3. Isolation: No user should see intermediate states of transactions 4. Durability: results of transactions should be persistent. - 19 -

Real-time data bases (2) Problems with implementing real-time data bases: 1. transactions may be aborted various times before they are finally committed. 2. For hard discs, the access times to discs are hardly predictable. Possible solutions: 1. Main memory data bases 2. Relax ACID requirements - 20 -

Summary Communication middleware OSEK/VDX COM CORBA MPI Pthreads OpenMP JXTA DPWS RT-Data bases - 21 -