1 / 23

CSS434 Process Migration Textbook 7.4.2 and Non-Textbook Contents

CSS434 Process Migration Textbook 7.4.2 and Non-Textbook Contents. Professor: Munehiro Fukuda. Outline. Degree of mobility Implementation Issues in Process Migration State capturing Address transfer mechanisms Message forwarding mechanisms Mobile agents D ’ Agent IBM Aglets UWAgents.

herbst
Download Presentation

CSS434 Process Migration Textbook 7.4.2 and Non-Textbook Contents

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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 Migration

  3. Degrees of Mobility CSS434 Process Migration

  4. System Examples CSS434 Process Migration

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

  6. Control Request a remote function/object Function Object Function/object itself is returned. Locally executed 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. Client Server Main Program func( ) Dispatcher Remote Function Object CSS434 Process Migration

  7. Time Source Site Destination Site Process P1 : : : : Execution suspended Freezing time Transfer of control Execution Resumed : : : : Process P1 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 CSS434 Process Migration

  8. Process MigrationBenefits • 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 Migration

  9. Process MigrationState 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 Migration

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

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

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

  13. Process MigrationHeterogeneous 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 Migration

  14. Mobile AgentsParadigm Conventional Approach server client Network Mobile Agent Approach client agent client agent server Network CSS434 Process Migration

  15. Mobile AgentsBenefits • 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 Migration

  16. Mobile AgentsExecution Model - OMG/MASIF - HW/OS HW/OS HW/OS Region Agent System Agent System Agent System Place Place Place Agent Agent Agent Place Place Place Agent Agent Agent Agent Agent Agent Communication infrastructure Communication infrastructure Communication infrastructure CSS434 Process Migration

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

  18. Mobile AgentsProcess Migration v.s. Mobile Agents CSS434 Process Migration

  19. Mobile AgentsD’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 Migration

  20. run dispatch onDispatching onArrival run Mobile AgentsIBM 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” ); } } } Source Destination CSS434 Process Migration

  21. Mobile AgentsUW 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( “uw1-320-01”, “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( “uw1-320-02”, “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 ); } uw1-320-lab: ~css434/hw3/uwagent hop( ) hop( ) MyAgent power( ) MyAgent init( ) MyAgent Factorial( ) Uw1-320-02 Uw1-320-01 Uw1-320-00 CSS434 Process Migration

  22. 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 Migration

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

More Related