Introduction to Interprocess Communication. Introduction to Interprocess Communication

Similar documents
A gentle introduction to. Saverio Giallorenzo

Distributed Systems [Fall 2013]

Decompression Method For Massive Compressed Files In Mobile Rich Media Applications

Shearwater Cloud Desktop Release Notes

MPCS: Develop and Test As You Fly for MSL

Configuring Bidirectional Forwarding Detection for BGP

LT GasAnalyzer. LT GasAnalyzer Page 1 of 6

CT PET-2018 Part - B Phd COMPUTER APPLICATION Sample Question Paper

International olympiads in Informatics in Kazakhstan. A. Iglikov Z. Gamezardashvili B. Matkarimov

Final Report. Remote Fencing Scoreboard Gator FenceBox

Playing with Agent_SimpleSoccer. 1. Start the server 2. Start the agent(s) in NetBeans 3. Start the game: press k and b in the monitor window

Courseware Sample F0

Horse Farm Management s Report Writer. User Guide Version 1.1.xx

Master s Project in Computer Science April Development of a High Level Language Based on Rules for the RoboCup Soccer Simulator

Virtual Breadboarding. John Vangelov Ford Motor Company

Using MATLAB with CANoe

Adaptation of Formation According to Opponent Analysis

VMware Inc., NSX Edge SSL VPN-Plus

LT GasAnalyzer beyond standards

Felix and Herbert. Level. Introduction:

Williams, Justin à Player name (last name, first name) CAR

Bidirectional Forwarding Detection Routing

Cloud real-time single-elimination tournament chart system

- 2 - Companion Web Site. Back Cover. Synopsis

Spacecraft Simulation Tool. Debbie Clancy JHU/APL

Felix and Herbert. Level

DDT and Totalview. HRSK Practical on Debugging,

Inspection User Manual

Scoreboard Operator s Instructions MPC Control

5) Match timer: Hanged on the court, display the match time synchronous with scoring system.

Time and synchronization

Time and synchronization. ( There s never enough time )

Swing Labs Training Guide

Mastering the Mechanical E6B in 20 minutes!

The MQ Console and REST API

RoboCup German Open D Simulation League Rules

Core Components Structure

4-3 Rate of Change and Slope. Warm Up Lesson Presentation. Lesson Quiz

[XACT INTEGRATION] The Race Director. Xact Integration

MIKE NET AND RELNET: WHICH APPROACH TO RELIABILITY ANALYSIS IS BETTER?

The Cooperative Cleaners Case Study: Modelling and Analysis in Real-Time ABS

Lecturers. Multi-Agent Systems. Exercises: Dates. Lectures. Prof. Dr. Bernhard Nebel Room Dr. Felix Lindner Room

PRODUCT MANUAL. Diver-MOD

OBJECT-ORIENTED ANALYSIS AND DESIGN

A General, Flexible Approach to Certificate Revocation Dr. Carlisle Adams & Dr. Robert Zuccherato Entrust, Inc.

Preparation for Salinity Control ME 121

C. Mokkapati 1 A PRACTICAL RISK AND SAFETY ASSESSMENT METHODOLOGY FOR SAFETY- CRITICAL SYSTEMS

Training Fees 3,400 US$ per participant for Public Training includes Materials/Handouts, tea/coffee breaks, refreshments & Buffet Lunch.

Efficient I/O for Computational Grid Applications

Internal Arc Simulation in MV/LV Substations. Charles BESNARD 8 11 June 2009

Module 13 Trigonometry (Today you need your notes)

Using DDT. Debugging programs with DDT. Peter Towers. HPC Systems Section. ECMWF January 28, 2016

Integrating Best of Breed Outage Management Systems with Mobile Data Systems. Abstract

MEMBER TRAINING PLAN. Shadowing a review

Reconfigurable Computing Lab 01: Traffic Light Controller

Versatile Test Rig. Industrial Electrical Engineering and Automation. Further development of a test rig for pneumatic brake valves.

Mixed Reality Competition Rules

INSTRUCTIONAL MANUAL

ebxml Core Components Structure v1.04

Net$ync II. Net$ync II. System Controllers

M-BUS communication protocol

Tecniche di Progettazione: Design Patterns

Drag racing system HL190 User Manual and installation guide

Introduction to Roadway Design

Inspection User Manual This application allows you to easily inspect equipment located in Onix Work.

Module 3 Developing Timing Plans for Efficient Intersection Operations During Moderate Traffic Volume Conditions

TAKING IT TO THE EXTREME The WAGO-I/O-SYSTEM for extreme Applications

Trekker Breeze 2.0: Trialled by Clients

Italian Olympiad in Informatics: 10 Years of the Selection and Education Process

Strategy, Developments & Outlook SESP September 2010 ESTEC, Noordwijk, The Netherlands

SIDRA INTERSECTION 6.1 UPDATE HISTORY

Precision level sensing with low-pressure module MS

Porting LibreOffice To GTK3

American made since 1954

BAROMETER PRESSURE STANDARD PRESSURE CONTROLLER

Cm15a Protocol. Setting the Clock

Hierarchical ORAM Revisited, and Applications to Asymptotically Efficient ORAM and OPRAM. Hubert Chan, Yue Guo, Wei-Kai Lin, Elaine Shi 2017/12/5

DESKTOP SKILLS COURSEWARE

Inserta Products, Inc.

ORF 201 Computer Methods in Problem Solving. Final Project: Dynamic Programming Optimal Sailing Strategies

The Race Director. Race Director Go [RACE DIRECTOR GO] This document describes the implementation of Race Director Go with a beginning to end example.

TANK MANAGER FOR TWO TANKS OPERATING MANUAL. 10/31/11 C-More T6C L color touch panel

Global Information System of Fencing Competitions (Standard SEMI 1.0) Introduction

Session Objectives. At the end of the session, the participants should: Understand advantages of BFD implementation on S9700

Urban OR: Quiz 2 Solutions (2003) ( 1 ρ 1 )( 1 ρ 1 ρ 2 ) ( 1 12 )( ) σ S ] 24 [ 2 = 60, 2 2 ] ( 2 ) 3

uemis CONNECT: Synchronisation of the SDA with myuemis

Pneumatic high-pressure controller Model CPC7000

SHIMADZU LC-10/20 PUMP

Using the Lego NXT with Labview.

Deep dive SSL. Created for CUSTOMER

Predicting Horse Racing Results with Machine Learning

Unisys. Imagine it. Done. c Consulting. c Systems Integration. c Outsourcing. c Infrastructure. c Server Technology. Unisys NDP 30 and NDP 110

Analysis and realization of synchronized swimming in URWPGSim2D

Fraglets: Chemical Programming with a Packet Prefix Language

Previous Release Notes

High usability and simple configuration or extensive additional functions the choice between Airlock Login or Airlock IAM is yours!

Control of Salinity in the Fish Tank ME 121. Tank Pump Sensor. Figure 1 Schematic of flow loop and salinity control scheme for the fish tank.

Robot Activity: Programming the NXT 2.0

Tournament Wizard: Simple and Lightweight Software for Running Fencing Tournaments. A Senior Project. Presented to

WEST POINT GOLF CLUB USING THE GOLFSOFTWARE PROGRAM FOR THE DRAW AND SCORING

Transcription:

Introduction to Interprocess Communication Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 1

The rocess Text Data Heap Stack C AddNumbers: std clc pushf.top i = 3,14 e = 2,71 y = hi x = 5 SUB1 MAIN rocess Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 2

rocess Control Block Text Data Heap Stack C AddNumbers: std clc pushf.top i = 3,14 e = 2,71 y = hi x = 5 SUB1 MAIN rocess process state process number process counter REGISTERS memory limits pointers Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 3

Interprocess Communication rocess 2 sort (4,5,2,7) merge (2,4,5,7) rocess 1 sort (11,9,14) merge (9,11,14) rocess 3 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 4

Interprocess Communication rocess 2 Why do processes sort (4,5,2,7) rocess 1 communicate? Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 5

Interprocess Communication rocess 2 sort (4,5,2,7) rocess 1 Why do processes communicate? Information sharing - e.g., concurrent access to files; Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 5

Interprocess Communication rocess 2 sort (4,5,2,7) rocess 1 Why do processes communicate? Information sharing - e.g., concurrent access to files; Computation speed - same aim divided in multiple tasks; Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 5

Interprocess Communication rocess 2 sort (4,5,2,7) rocess 1 Why do processes communicate? Information sharing - e.g., concurrent access to files; Computation speed - same aim divided in multiple tasks; Modularity - reuse processes; Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 5

Interprocess Communication rocess 2 sort (4,5,2,7) rocess 1 Why do processes communicate? Information sharing - e.g., concurrent access to files; Computation speed - same aim divided in multiple tasks; Modularity - reuse processes; Convenience - multitasking. Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 5

Interprocess Communication rocess 2 How do processes sort (4,5,2,7) rocess 1 communicate? Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 6

Interprocess Communication rocess 2 sort (4,5,2,7) rocess 1 How do processes communicate? Shared Memory V Message assing Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 6

Shared Memory v Message assing Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 7

Shared Memory quick (and dirty); shared segment of memory; hack-ish, processes bypass memory protections of the OS. Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 8

Message assing model scales from local to remote processes; needs a communication link Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 9

Message assing: the communication link Two concerns of implementation: hysical Logical Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 10

Message assing: the communication link Two concerns of implementation: hysical Logical Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 10

Logical Implementation Direct communication send(, msg) receive(, msg) Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 11

Logical Implementation Direct communication send(, msg) receive(id, msg) (asymmetric) Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 12

Logical Implementation Indirect communication send(a, msg) A receive(a, msg) Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 13

Logical Implementation Indirect communication send(a, msg) receive(a, msg) R A receive(a, msg) send(a, msg) S Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 14

Logical Implementation Synchronous communication Blocking send 1 request 2 ack receive 3 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 15

Logical Implementation Synchronous communication Nonblocking send 1 send 2 2 receive Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 16

Logical Implementation Synchronous communication Blocking receive 1 send receive 2 3 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 17

Logical Implementation Synchronous communication Nonblocking receive 1 send receive 2 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 18

Logical Implementation Buffering Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 19

Logical Implementation Zero Capacity Buffering 0 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 19

Logical Implementation Zero Capacity Buffering Blocking 0 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 19

Logical Implementation Buffering Zero Capacity Bounded Capacity Blocking 0 0 1 2 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 19

Logical Implementation Buffering Zero Capacity Bounded Capacity Blocking Blocking 0 0 1 2 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 19

Logical Implementation Buffering Zero Capacity Bounded Capacity Unbounded Capacity Blocking Blocking 0 0 1 2 0 1 Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 19

Remote Invocation Request-reply protocols send( sum,x=17,y=25 ); // wait receive( res ); Low-level e.g., sockets receive( req ); switch ( req[0, 3] ){ case sum : res = sum( req ); break; case sub : } res = sub( req ); break; send( res ); Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 20

Remote Invocation Sockets try { /* make connection to server socket */ Socket toserver = new Socket( 127.0.0.1, 6013 ); rintwriter pout = new rintwriter( toserver.getoutputstream(), true ); /* write the request to the server */ pout.println( sum,x=17,y=25 ); toserver.close(); /* accept response connection from server */ tome = new ServerSocket( 6012 ); tome.accept(); InputStream in = tome.getinputstream(); BufferedReader bin = new BufferedReader( new InputStreamReader( in ) ); /* read the data from the socket */ String response = bin.readline() /* close the socket connection */ tome.close(); } catch (IOException ioe) { System.err.println(ioe) }; Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 21

Remote Invocation Request-reply protocols low-level support for requesting the execution of a remote operation; support for RC and RMI, discussed below Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 22

Remote Invocation Request-reply protocols low-level support for requesting the execution of a remote operation (HTT, FT, etc. are Request-reply protocols); support for RC and RMI (next); Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 23

Remote Invocation Remote rocedure Calls Communication library Client Stub rocedure Server Stub rocedure res = sum@( 17, 25 ); Low-level e.g., Sockets ossibly over App. level rotocol sum( int x, int y ){ return x + y; } Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 24

Remote Invocation Remote rocedure Calls programming with interfaces (recall, an interface specifies the procedures and the variables available to others); Separation of concerns: interfaces remain the same but their implementation may change; High degree of heterogeneity. Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 25

Remote Invocation Remote Method Invocation Communication module Remote Reference Module Remote Reference Module proxy res =.sum( 17, 25 ); sum( int x, int y ){ return x + y; } Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 26

Remote Invocation Remote Method Invocation Full object-oriented paradigm for programming distributed systems; Strictly Java. Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 27

Remote Invocation Remote rocedure Calls Remote Method Invocation Request-reply rotocols Saverio Giallorenzo sgiallor@cs.unibo.it DISI@Unibo 28