CSS434 Process Migration1 Textbook 7.4.2 and Non-Textbook Contents Professor: Munehiro Fukuda.

Slides:



Advertisements
Similar presentations
Agents & Mobile Agents.
Advertisements

Comparison Study of Three Mobile Agent Systems Aglets, Grasshopper and Voyager Qunhua Zhao, Hua Wang and Yi Zhang Department of Computer Science and Engineering.
Understanding Code Mobility
Mobile Agents Mouse House Creative Technologies Mike OBrien.
MPI Message Passing Interface
COS 461 Fall 1997 Network Objects u first good implementation: DEC SRC Network Objects for Modula-3 u recent implementation: Java RMI (Remote Method Invocation)
Distributed Systems Major Design Issues Presented by: Christopher Hector CS8320 – Advanced Operating Systems Spring 2007 – Section 2.6 Presentation Dr.
Winter, 2004CSS490 MPI1 CSS490 Group Communication and MPI Textbook Ch3 Instructor: Munehiro Fukuda These slides were compiled from the course textbook,
M. Muztaba Fuad Masters in Computer Science Department of Computer Science Adelaide University Supervised By Dr. Michael J. Oudshoorn Associate Professor.
RPC Robert Grimm New York University Remote Procedure Calls.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Remote Object Invocation Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Objektorienteret Middleware Presentation 2: Distributed Systems – A brush up, and relations to Middleware, Heterogeneity & Transparency.
Context-based Information Sharing and Authorization in Mobile Ad Hoc Networks Incorporating QoS Constraints Sanjay Madria, Missouri University of Science.
Winter, 2004CSS490 Process Migration1 Textbook Ch8 Instructor: Munehiro Fukuda These slides were compiled from the course textbook, the reference books,
Rheeve: A Plug-n-Play Peer- to-Peer Computing Platform Wang-kee Poon and Jiannong Cao Department of Computing, The Hong Kong Polytechnic University ICDCSW.
CS533 - Concepts of Operating Systems 1 Remote Procedure Calls - Alan West.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Processes: code migration
EEC-681/781 Distributed Computing Systems Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Processes: code migration. Process Concept An operating system executes a variety of programs: –Batch system – jobs –Time-shared systems – user programs.
CS 603 Threads, Processes, and Agents March 18, 2002.
AgentOS: The Agent-based Distributed Operating System for Mobile Networks Salimol Thomas Department of Computer Science Illinois Institute of Technology,
Tcl Agent : A flexible and secure mobile-agent system Paper by Robert S. Gray Dartmouth College Presented by Vipul Sawhney University of Pennsylvania.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
DISTRIBUTED PROCESS IMPLEMENTAION BHAVIN KANSARA.
Distributed Process Implementation Hima Mandava. OUTLINE Logical Model Of Local And Remote Processes Application scenarios Remote Service Remote Execution.
Distributed Process Implementation
Matthew Moccaro Chapter 10 – Deployment and Mobility PART II.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Chapter 5.4 DISTRIBUTED PROCESS IMPLEMENTAION Prepared by: Karthik V Puttaparthi
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Locating Mobile Agents in Distributed Computing Environment.
Cohesion and Coupling CS 4311
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
MOBILE AGENTS What is a software agent ? Definition of an Agent (End-User point of view): An agent is a program that assists people and acts on their behalf.
OS2- Sem ; R. Jalili Introduction Chapter 1.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
1 Process migration n why migrate processes n main concepts n PM design objectives n design issues n freezing and restarting a process n address space.
Transparent Mobility of Distributed Objects using.NET Cristóbal Costa, Nour Ali, Carlos Millan, Jose A. Carsí 4th International Conference in Central Europe.
DISTRIBUTED COMPUTING. Computing? Computing is usually defined as the activity of using and improving computer technology, computer hardware and software.
Mobile Agents Babak Esfandiari. Types of Applications Dynamic load balancing. Dynamic service deployment. Intermittently connected systems.
Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.
Mobile Agents For Mobile Computing Department Of Computer Science – Dartmouth College Robert Gray David Kotz Saurab Nog Daniela Rus George Cybenko.
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.
D’Agents 1 Presented by Haiying Tan May, 2002 D’Agents: Security in a multiple-language, mobile-agent system Robert S. Gary, David Kotz, George Cybenko,
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
DISTRIBUTED COMPUTING
Aglets Based on Mobile Agents with Java: The Aglet API by Danny B. Lange and Mitsuru Oshima.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Institute for Visualization and Perception Research 1 © Copyright 1999 Haim Levkowitz Java-based mobile agents.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Java Mobile Agents with Aglets End of studies report Responsible : M. Logothetis ERASMUS Exchange.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
EEL 5937 Mobile agents (2) EEL 5937 Multi Agent Systems Lotzi Bölöni.
Third International Workshop on Networked Appliance 2001 SONA: Applying Mobile Agent to Networked Appliance Control S.Aoki, S.Makino, T.Okoshi J.Nakazawa.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
C HAPTER 5.4 DISTRIBUTED PROCESS IMPLEMENTAION By: Nabina Pradhan 10/09/2013.
Definition of Distributed System
Processes Overview: Process Concept Process Scheduling
Advanced Operating Systems
Mobile Agents Technology - Programming with Aglet
Outline Midterm results summary Distributed file systems – continued
Mobile Agents.
Mobile Agents M. L. Liu.
Presentation transcript:

CSS434 Process Migration1 Textbook and Non-Textbook Contents Professor: Munehiro Fukuda

CSS434 Process Migration2 Outline Degree of mobility Implementation Issues in Process Migration State capturing Address transfer mechanisms Message forwarding mechanisms Mobile agents D ’ Agent IBM Aglets UWAgents

CSS434 Process Migration3 Degrees of Mobility DataControlCodeData State Execution State Navigational Autonomy Transfer Direction Message PassingMoveIn/Out RPCMove Out Remote ExecutionMove Out Code on DemandMove In Process MigrationMove In/Out Mobile Agents (weak)Move OwnIn/Out Mobile Agents (strong)Move OwnIn/Out

CSS434 Process Migration4 System Examples TypesSystems Message PassingSocket, PVM, MPI RPCXerox Courier, SunRPC, RMI Remote ExecutionServlets, Remote evaluation, Tacoma Code on DemandApplets, VB/Jscripts Process MigrationCondor, Sprite, Olden Mobile Agents (Weak Migration)IBM Aglets, Voyager, Mole Mobile Agents (Strong Migration)Telescript, D ’ Agent, Ara

CSS434 Process Migration5 Remote Execution Procedure code is sent together with arguments. Server behaves like a general cycle server. Server can evolve itself. Main Program Function Object Client Server Dispatcher Arguments Function Object f( ) Function/object transfer Argument transfer Remote execution Return value Control

CSS434 Process Migration6 Code on Demand Server behaves like a general remote object server. A remote function/object is sent back as a return value. Client executes the function/object locally. Client execution control stays in local while suspended upon a request to a server. Main Program func( ) Client Server Dispatcher Remote Function Object Request a remote function/object Function Object Function/object itself is returned. Control Locally executed

CSS434 Process Migration7 Process Migration Selecting a process to be migrated Selecting the destination node Suspending the process Capturing the process state Sending the state to the destination Resuming the process Forwarding future messages to the destination Process P1 : Execution suspended Source Site Destination Site Execution Resumed : Process P1 Transfer of control Time Freezing time

CSS434 Process Migration8 Process Migration Benefits Better response time and execution speed-up Dynamic load balancing among multiple nodes Using a faster CPU Higher throughput and Effective resource utilization Migrating I/O and CPU-bound processes to file and cycle servers. Reducing network traffic Migrating processes closer to the resources they are using most heavily. Improving system reliability Migrating processes from a site in failure to more reliable sites Replicating and migrating critical processes to a remote.

CSS434 Process Migration9 Process Migration State Capturing CPU registers Captured upon a freeze Address space Difficult to restore pointers I/O state: Fast I/O Operations Completed before a process migration Durable I/O Operations like files and user interactions Difficult to carry files in use and to freeze/restore system calls. Necessity to maintain a connection with I/O established at the source node. Some popular files available at the destination node

CSS434 Process Migration10 Process Migration Address Transfer Mechanisms Transfer of address space Source node Destination node Suspended Migration decision resumed Freezing time Transfer of address space Source node Destination node Suspended Migration decision resumed Freezing time On-demand transfer Source node Destination node Suspended Migration decision resumed Freezing time Total Freezing Pretransferring Transfer-on-reference Merits: easy implementation Demerits:long delay time Merits: freezing time reduce Demerits:total time extended Merits: quick migration Demerits:large memory latency

CSS434 Process Migration11 Process Migration Message Forwarding Mechanisms Sender Origin Dest 1 Dest 2 Receiver Migrate Migrate again Resend Resend again Sender Origin Dest 1 Dest 2 Receiver Migrate Migrate again Resending messages Ask origin site Send Forward

CSS434 Process Migration12 Process Migration Message Forwarding Mechanisms (Cont ’ d) Sender Origin Dest 1 Dest 2 Receiver Migrate Migrate again Link Update Send Sender Origin Dest 1 Dest 2 Receiver Migrate Migrate again Link traversal Link Send Forward Send New location Send New location Send Current location

CSS434 Process Migration13 Process Migration Heterogeneous Systems Using external data representation Floating-point data External data representation must have at least as much space as the longest floating-point data representation Process migration is restricted to only the machines that can avoid the over/underflow and the loss of precision. Architectural-dependent data representation Singed-infinity and singed-zero In general, process migration over heterogeneous systems are too expensive Conversion work Architectural-dependent representation handling Always interrupting external data representation Java

CSS434 Process Migration14 Mobile Agents Paradigm clientclient serverserver clientagentclientagentserverserverclientagentclientagent NetworkNetwork NetworkNetwork Conventional Approach Mobile Agent Approach

CSS434 Process Migration15 Mobile Agents Benefits Low network traffic and latency Agents-server communication takes place locally. Encapsulation All code and data are carried with an agent. Autonomous and asynchronous navigation Agent disconnect communication with their client and visits servers as their own. Run-time adaptability Agents can dynamically load new objects as they migrate over network. Robustness Agents are active to get out of faulty nodes.

CSS434 Process Migration16 HW/OSHW/OSHW/OS Mobile Agents Execution Model - OMG/MASIF - Region Communicationinfrastructure Agent System Place Place AgentAgent AgentAgent AgentAgent Communicationinfrastructure Place Place AgentAgent AgentAgent AgentAgent Communicationinfrastructure Place Place AgentAgent AgentAgent AgentAgent

CSS434 Process Migration17 Agents: 1. State: Execution state to be resumed upon a migration 2. Implementation: Architectural independent code 3. Interface: Facility to communicate with places and other agents 4. Identifier: Agent identifier 5. Authority/Principal: The owner of agent Places: 1. Engine: Place to execute agents 2. Resource: CPU, memory, database, etc. 3. Location: IP + logical location id 4. Principal: The owner of place Mobile Agents Definition of Agents and Places

CSS434 Process Migration18 Mobile Agents Process Migration v.s. Mobile Agents Process MigrationMobile Agents Navigational Autonomy Migration decision is made by system. Agents decide where and where to go by calling go( ) or hop( ) method. Code ExecutionPrograms are fully compiled and executed in native mode. Most agents are coded in Java and Tcl, and are interpreted by their execution engine. Strong/Weak Migration Execution is resumed where it has been suspended. Java-based agents resume their execution from the top of a given method. I/O StateLong-term I/Os are forwarded to processes migrated to the desination. Agents relinquish I/O connections every time they depart for their next destination.

CSS434 Process Migration19 Mobile Agents D ’ Agent: Strong Migration Example proc who machine { // agent spawned from its parent global agent set list “” foreach m $machines { if ( [catch {agent_jump $m} result] } { // jump to a remote machine append list “ $m: nunable to JUMP here ($result)nn ” // jump failed } else { set users [exec who] // jump in success, execute who append list “ $agent(local-server): n$usersnn ” } agent_send $agent( root ) 0 $list // send a list to its parent agent exit } The list of machines New line

CSS434 Process Migration20 Mobile Agents IBM Agelts: Weak Migration Example Public class DispatchingExample extends Aglet { boolean remoteAgent = false; public void onCreation( object init ) { addMobilityListener( new MobilityAdapter( ) { public void onDispatching( MobilityEvent e ) { System.out.println( “ The parent agent dispatched a child agent ” ); } public void onArrival( MobilityEvent e ) { remoteAgent = true; System.out.println( “ The child agent arrived at the destination ” ); } ); } public void run( ) { if ( !remoteAgent ) { try { URL destination = new URL( (String)getAgletContext( ).getProperty( “ uw1-320-lab ” ); dispatch( destination ); } catch ( Exception e ) { System.out.println( e.getMessage( ) ); } } else { System.out.println( “ The child starts run( ) at the destination ” ); } run dispatch onDispatching onArrival run Source Destination

CSS434 Process Migration21 Mobile Agents UW Messengers: What Former CSS499 Students Developed public class MyAgent extends UWAgent implements Serializable { MyAgent( ) { } MyAgent( String[] args ) { } void init( ) { String[] args = new String[2]; args[0] = Integer.toString( 10 ); args[1] = Integer.toString( 3 ); hop( “ uw ”, “ power ”, String[] funcArgs ); } void power( String[] args ) { base = Integer.parseInt( args[0] ); exp = Integer.parseInt( args[1] ); for ( int j = 0; j < exp; j++ ); pow += base; System.out.println( “ host = ” + getInetAddress( ) + “ power = ” + pow ); hop( “ uw ”, “ factorial ”, String[] args ); } void factorial( String[] arg ) { base = Integer.parseInt( args[0] ); fact = 1; for ( int j = base; j > 0; j== ) fact *= j; System.out.println( “ host = “ + getInetAddress( ) + “ fact = “ + fact ); } Uw Uw Uw MyAgent init( ) MyAgent power( ) MyAgent Factorial( ) hop( ) uw1-320-lab: ~css434/hw3/uwagent

CSS434 Process Migration22 System Comparison D ’ Agent IBM Aglets Ara Mole Discussions: Which systems use strong migration? How has strong migration been implemented? Which systems use weak migration? Why did they end up with weak migration? Which system uses the concept of agent proxy? What is the agent proxy? Which system uses allowance? What is it?

CSS434 Process Migration23 Exercises (No turn-in) 1. What are items to be taken into consider when migration decision is made? 2. Why is address space transfer so difficult when pointers are involved? What is necessary to transfer data structures on memory to the destination? 3. Why do mobile agents have more security concerns than process migration. 4. What made it possible to implement java-based mobile agents? 5. Why do java-based mobile agents need to take weak migration?