CodeMigration (Mod 1)

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 17

Code Migration

Russell T. Potee, III


4 December 2007
Overview

 What is Code Migration?


 Code Migration Terminology
What is Code Migration?

 Code migration is when programs are moved from one machine to


another, often moving parts of its execution environment along with it.
 The intent is for the transferred program to continue execution on the
target machine.
What is Code Migration

 Code migration is often used for load distribution, reducing network


bandwidth, dynamic customization, and mobile agents.
 Code migration increases scalability, improves performance, and
provides flexibility.
 We will gain a more tangible understanding of code migration when we
get to the paradigms section.
Code Migration Terminology

 Code migration has been around for sometime, but traditionally code
migration technologies could not agree on terms.
 To understand code migration properly, we will go over some
standardized terms for code migration as defined by Fuggetta et al.
Code Migration Terminology

 Many code migration technologies provide Computational Environments


to support code mobility.
 Computational environments give applications the ability to move
components from one host to another.
Code Migration Terminology

 Code migration components consist of execution


units and resources.
 Execution units can be divided into the following:
 Code Segment
 Set of instructions being executed
 Data Segment
 References to external resources
 Files, printers, devices, et cetera
 Execution Segment
 Process state, private data, stack pointer, and instruction pointer
Code Migration Terminology

 Strong Mobility
 Described as the ability to transfer both the code segment and execution
state of the execution unit from one computational environment to another.
 Weak Mobility
 Described as the ability to transfer the code segment, but not the execution
state.
 Typically, weak mobility applications have predefined starting positions
 For example - Java Applets
Code Migration Terminology

 Strong code mobility is best characterized by two terms:


 Migration
 is when an execution unit is suspended, transferred from one computational
environment to another, and resumes execution.

 Remote Cloning
 is when a copy of the running execution unit is copied to another computational
environment while continuing execution on the original executional environment.
Code Migration Terminology

 Sender-initiated (proactive) migration


 Transfer is initiated autonomously by the migrating execution unit
 Example
 Uploading programs to a computational server

 Receiver-initiated (reactive) migration


 Transfer is initiated by an execution unit different from the migrating
execution unit
 Example
 Java applets are downloaded from a web server to the client browser at the
request of the browser.
Resource Relocation and Binding
Reconfiguration
 When an execution unit migrates, the data space needs to be
reconfigured. This could involve re-binding or moving resources
depending on the type of resource.
Resource Relocation and Binding
Reconfiguration

 Types of resources:
 Transferable
 This type of resources can be transferred from one machine to another
 Free or Fixed
 Free resources can be easily moved from one machine to another. For example, data
files.

 Fixed resources can be moved, but not easily. For example, moving a database can be
moved, but could slow performance.

 Non-transferable
 It is not possible to move this resource
 For example, a local device such as a printer.
Resource Relocation and Binding
Reconfiguration
 3 types of binding
 Binding by identifier (strongest)
 Execution units refer to resources by unique identifiers

 Binding by value (weaker)


 Execution units refer to resources based on the value/content of the resources and
want local access to this type of resource

 Binding by type (weakest)


 Execution units refer a resource of a given type, often local devices
Resource Relocation and Binding
Reconfiguration

 Binding by identifier
 Free transferable resource
 It is best to move this type of resource with the execution unit. Otherwise, the
resource stays in the original computational environment, and the execution unit
will refer to the resource by a network reference. Network references are the
least desirable because the execution unit will be slowed due to network
problems.

 Fixed transferable and non-transferable resources will need to use a


network reference.
Resource Relocation and Binding
Reconfiguration
 Binding by value
 Free transferable resource
 Can copy or move the resource from one computational environment to another.
Moving the resource may cause problems if other execution units are accessing the
resource. Network references can be used, but again, this is least desirable.

 Fixed transferable resource


 Can be copied or use network reference.

 Non-transferable
 Can use network reference.
Resource Relocation and Binding
Reconfiguration
 Binding by type
 Best to use re-binding. Re-binding involves the execution unit removing the
original binding, moving to a new computational environment, and binding
to the same type of resource in the new computational environment.
Resource Relocation and Binding
Reconfiguration
Fre e Tra n sfe ra b le Fixe d Tra n sfe ra b le N on -t ra n sfe ra b le
By Id e n t ifie r By m oving (or by By netw ork reference By netw ork
netw ork reference) reference

By V a lu e By copying (or by By copying (or by By netw ork


m oving, netw ork netw ork reference) reference
reference)

By Typ e By re-binding (or by By re-binding (or by By re-binding (or


copying, m oving, copying, netw ork netw ork reference)
netw ork reference) reference)

You might also like