Slide 18-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18.

Slides:



Advertisements
Similar presentations
Building Distributed Applications using JAVA - RMI
Advertisements

What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
RPC Robert Grimm New York University Remote Procedure Calls.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong.
INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 9 Prof. Crista Lopes.
Java Remote Method Invocation (RMI) In Java we implement object systems: O1O2 O3 thread 1thread 2 execution scheme JVM 1JVM 2 distribution scheme.
Remote Object Invocation Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Company LOGO Remote Method Invocation Georgi Cholakov, Emil Doychev, University of Plovdiv “Paisii.
FONG CHAN SING (143334) WONG YEW JOON (143388). JAVA RMI is a distributive system programming interface introduced in JDK 1.1. A library that allows an.
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
DISTRIBUTED FILE SYSTEM USING RMI
Application Server Lecture Paulo Barroso Kris Carver Todd Kitterman Eric Silva.
Communication in Distributed Systems –Part 2
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3 Operating System Organization.
Database Application Security Models
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Java RMI Essentials Based on Mastering RMI Rickard Oberg.
1 Java Programming II Java Network II (Distributed Objects in Java)
PVM. PVM - What Is It? F Stands for: Parallel Virtual Machine F A software tool used to create and execute concurrent or parallel applications. F Operates.
1 IEEE LAN/ MAN Banf 1998 Open Java-Based Intelligent Agent Architecture for Adaptive Networking Devices Tal Lavian, Bay Architecture Lab
+ A Short Java RMI Tutorial Usman Saleem
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
11 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors.
MACIASZEK, L.A. (2001): Requirements Analysis and System Design. Developing Information Systems with UML, Addison Wesley Chapter 6 - Tutorial Guided Tutorial.
1 Java RMI G53ACC Chris Greenhalgh. 2 Contents l Java RMI overview l A Java RMI example –Overview –Walk-through l Implementation notes –Argument passing.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
RMI RMI is the java API that facilitate distributed computing by allowing remote method calls. A remote method call represents a method invocation between.
RMI Continued IS Outline  Review of RMI  Programming example.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Remote Procedure Calls CS587x Lecture Department of Computer Science Iowa State University.
Java Remote Method Invocation (RMI) Overview of RMI Java RMI allowed programmer to execute remote function class using the same semantics as local functions.
Networking Implementations (part 1) CPS210 Spring 2006.
Institute for Visualization and Perception Research 1 © Copyright 1999 Haim Levkowitz Java-based mobile agents.
1 Distributed Systems Distributed Object-Based Systems Chapter 10.
Proxy Pattern. What’s a Proxy? A remote proxy acts as a local representative of a remote object Remote Object: instantiated in a different JVM heap (a.
Remote Method Invocation A Client Server Approach.
February 1999T. Haupt, DATORR meeting1 Gateway System New Generation of WebFlow.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
Java RMI. RMI Any object whose methods can be invoked from another Java VM is called a remote object.
1 RMI Russell Johnston Communications II. 2 What is RMI? Remote Method Invocation.
Java Distributed Object Model A remote object is one whose methods can be invoked from another JVM on a different host. It implements one or more remote.
Distributed programming in Java Faculty:Nguyen Ngoc Tu Session 5 - RMI.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Linux Systems Administration 101 National Computer Institute Sep
Java Distributed Computing
Java Distributed Object System
Java Distributed Computing
Java Remote Method Invocation (RMI)
Remote Method Invocation
What is RMI? Remote Method Invocation
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Java Remote Method Invocation
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
System Models Bina Ramamurthy 9/7/2019 B.Ramamurthy.
Presentation transcript:

Slide 18-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18

Slide 18-2 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter Distributed Programming Runtime Systems

Slide 18-3 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 PVM Architecture OS 1 OS 2 OS 1 OS 2 PVM Implementation PVM 1 PVM 2 Implement 1 Implement 2

Slide 18-4 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 The SPMD Computation in the PVM Main Program #define NPROC 4 #include #include “pvm3.h” main() { int mytid; /* my task id */ int tids[NPROC]; /* array of task id */ int me; /* my process number */ int i; mytid = pvm_mytid(); /* enroll in pvm */ /* Join a group; if first in the group, create other tasks */ me = pvm_joingroup(“foo”); if(me == 0) pvm_spawn(“spmd”, (char**)0, 0, “”, NPROC–1, &tids[1]); /* Wait for everyone to startup before proceeding. */ pvm_barrier(“foo”, NPROC); /*–––––––––––––––––– –-*/ dowork(me, NPROC); /* program finished leave group and exit pvm */ pvm_lvgroup(“foo”); pvm_exit(); exit(1); }

Slide 18-5 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 The SPMD dowork Function in PVM dowork(int me, int nproc) { int token, src, dest;; int count = 1, stride = 1, msgtag = 4; /* Determine neighbors in the ring */ src = pvm_gettid(“foo”, me-1); dest= pvm_gettid(“foo”, me+1); if(me == 0) src = pvm_gettid(“foo”, NPROC-1); if(me == NPROC-1) dest = pvm_gettid(“foo”, 0); if(me == 0) { token = dest; pvm_initsend(PvmDataDefault); pvm_pkint(&token, count, stride); pvm_send(dest, msgtag); pvm_recv(src, msgtag); printf(“token ring done\n”); } else { pvm_recv(src, msgtag); pvm_upkint(&token, count, stride); pvm_initsend(PvmDataDefault); pvm_pkint(&token, count, stride); pvm_send(dest, msgtag); }

Slide 18-6 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 The DCE Distributed File System File Exporter Applications File Storage Cache Manager Client Stubs Client Token Manager VFS+ Network Layer Other User Space Services Local File System Server

Slide 18-7 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 DCE Security Components ClientApplication Server Administrator Security Server ApplicationsApp Service Login Admin Interface Authentication Privilege Registry ACL Security DB Session Authentication Client-server information DCE Security information User Authentication Authorization

Slide 18-8 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 Mobile Java Code Server Service Client JVM Web Runner Java Applet 1 Process 2

Slide 18-9 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 Java Thread Class public class MyThread extends Thread { public MyThread(…) { // The constructor } public void run() { // Insert the thread code here }

Slide Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 Remote Objects – Servers inside Clients ClientServer Web Browser 1. Load Applet Service Applet/Object 2. RMI 3. RMI resultClient Behavior Server Behavior

Slide Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 Security in the Java Environment Server Service Client Web Browser Applet/Object JVM 1 23 Process

Slide Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 Address Spaces, Application Domains, Assemblies, and Modules OS Process Address Space CLI Address Space App Domain Module Assembly App Domain App Domain

Slide Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 The Virtual Execution System (VES) JIT Compiler JIT Compiler Native Code Class Info Call within class Call across classes Call across assembly Assembly Storage Install Assembly in App Domain Install and Bind Classes App Domain

Slide Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 18 Remoting Transparent Proxy Transparent Proxy Real Proxy Real Proxy Channel Remoting call Marshaling (Serialization) Unmarshaling (Deserialization) (Local call) Result Or Exception RMI App Domain Assembly Address Space