Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.

Slides:



Advertisements
Similar presentations
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
Advertisements

RPC Robert Grimm New York University Remote Procedure Calls.
©2009 Operačné systémy Procesy. 3.2 ©2009 Operačné systémy Process in Memory.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Remote Object Invocation
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
Chapter 3: Processes.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
Learning Objectives Understanding the difference between processes and threads. Understanding process migration and load distribution. Understanding Process.
Middleware Technologies compiled by: Thomas M. Cosley.
Chapter 3: Processes. Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server.
Advanced Java Class Serialization. Serialization – what and why? What? –Translating the contents of an Object to a series of bytes that represent it,
02/02/2004CSCI 315 Operating Systems Design1 Interprocesses Communication Notice: The slides for this lecture have been largely based on those accompanying.
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 1 Let’s get started. Let’s start by selecting an architecture from among.
Communication in Distributed Systems –Part 2
Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Operations on Processes Cooperating.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
02/01/2010CSCI 315 Operating Systems Design1 Interprocess Communication Notice: The slides for this lecture have been largely based on those accompanying.
Interprocess Communication. Process Concepts Last class.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 12 Communicating over.
Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server Systems.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Other Topics RPC & Middleware.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Interprocess Communication: ( ) CPE Operating Systems.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
Distributed Programming CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Silberschatz, Galvin, and Gagne  1999 Applied Operating System Concepts Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
Chapter 3: Processes. 3.2CSCI 380 Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication.
1 11/1/2015 Chapter 4: Processes l Process Concept l Process Scheduling l Operations on Processes l Cooperating Processes l Interprocess Communication.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
Distributed Computing A Programmer’s Perspective.
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 3 Operating Systems.
Remote Procedure Call Andy Wang Operating Systems COP 4610 / CGS 5765.
Remote Procedure Call RPC
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
Remote Method Invocation by James Hunt, Joel Dominic, and Adam Mcculloch.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
 Process Concept  Process Scheduling  Operations on Processes  Cooperating Processes  Interprocess Communication  Communication in Client-Server.
Remote Method Invocation A Client Server Approach.
1 RMI Russell Johnston Communications II. 2 What is RMI? Remote Method Invocation.
Distributed programming in Java Faculty:Nguyen Ngoc Tu Session 5 - RMI.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 29 Remote Method.
Lecture 5: RPC (exercises/questions). 26-Jun-16COMP28112 Lecture 52 First Six Steps of RPC TvS: Figure 4-7.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
RMI (Java RMI) P 460 in text UUIDs / system wide references Transparent: all objects either by ref. or by value. Not efficient, especially int, bool, etc.
Operating Systems {week 11a}
What is RMI? Remote Method Invocation
Client server programming
Chapter 4: Processes Process Concept Process Scheduling
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Sarah Diesburg Operating Systems COP 4610
Chapter 40 Remote Method Invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
Presentation transcript:

Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.

 Why is it beneficial for an operating system to enable processes to communicate with one another?  Share information  Cooperation  Computational speed-up via parallel programming  Modularity of program design  Convenience

Message Passing Shared Memory both IPC mechanisms require a protocol and synchronization

 Processes may communicate on the same machine or across multiple machines  Use sockets for interprocess client-server communication  Use remote procedure calls (RPCs) to call procedures across a network  In Java, use remote method invocation (RMI) to call a method on an object in a different virtual machine

 Using RPC, heterogeneous operating systems can interact with one another

 RPCs can be made across a mix of machines and operating systems  All parameters must be marshaled to ensure proper interpretation  Consider date representations ▪ YYYY-MM-DD or MM-DD-YYYY or DD-MM-YYYY  Also consider big endian versus little endian integer representations ▪ (see

 RMI is a Java mechanism similar to RPCs  RMI enables a running Java program to call a method on a remote object running on a separate Java Virtual Machine this requires object serialization

 A socket is an endpoint for communication  Communication takes place over a pair of sockets : client server :8123 socket :80 listener socket :9500 socket

 Pitfalls of socket-based communication between client and server include:  Once a server binds to a port, no other program may listen on that port  If client and server do not obey the rules of the protocol, errors occur

 In Java, we transmit primitive data types (e.g. int, double) using DataInputStream and DataOutputStream  To transmit objects, use ObjectInputStream and ObjectOutputStream instead client server this requires object serialization

 Objects exist in a JVM’s memory space  To transmit an object over a socket, we must first serialize the object  For an object to be serializable, its class definition must implement the java.io.Serializable interface  Also useful for saving runtime objects to a file

 The Serializable interface has no methods  Simply identifies a class as being serializable  And enables the use of readObject() and writeObject() methods of ObjectInputStream and ObjectOutputStream Student object Student object serialized object Student object Student object network writeObject() readObject()

 Classes that are not serializable include:  java.lang.Thread  java.io.OutputStream  java.net.Socket  etc.  Such classes refer to operating system resources, which are not serializable

 Serialized objects are assigned a unique identifier as a means to version control  If you write object X to a socket or file, then modify the source code of class X and recompile the.class file, loading object X results in an InvalidClassException runtime exception  All processes must be using the same version