Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration...

14
Code Migration Russell T. Potee, III

Transcript of Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration...

Page 1: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Code Migration

Russell T. Potee, III

Page 2: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Overview

Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration Security

Page 3: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Why Code Migration?

Process Migration - definition Transfer an entire running process from one machine

to another Load distribution

Measured by CPU queue length or utilization Good for computational systems

Reduce Network Bandwidth Migrate part of client application to server

Migrate part of client application to database server to perform many database operations

Send only result across network

Page 4: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Why Code Migration?

Reduce Network Bandwidth Migrate part of server application to client

Migrate part of database server to client to process forms on client side

Reduces database operations over the network XSS - Javascript

Parallelism Mobile Agent

Dynamic Configuration of Distributed Systems Download and Initialize Code

Page 5: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Code Migration Framework Code Segment

Set of instructions being executed Resource Segment

References to external resources Files, printers, devices, et cetera

Execution Segment Process state Private data Stack Instruction pointer

Code Migration Models

Page 6: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Code Migration Models

Weak Mobility Transfer code segment and initialized data Portable code Predefined starting positions

Java Applets Strong Mobility

Transfer includes execution segment Process can be stopped, moved to another machine,

and resumed

Page 7: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Code Migration Models

Sender-initiated Code transfer is initiated by machine currently

executing the code Example

Uploading programs to a computational server Receiver-initiated

Transfer is initiated by machine that will execute code Example

Java applets

Page 8: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Handling Resources

Process-to-resource binding Binding by identifier (strong)

Process refers to resources by their identifiers Example

URL Binding by value (weaker)

Process refers to another resource with the same value Binding by type (weakest)

Process refers to local devices

Page 9: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Handling Resources

Resource-to-machine binding Unattached resources

Can be moved easily Data Files

Fastened resources Can be moved at high cost

Database Fixed resources

Cannot be moved Local devices

Page 10: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Heterogeneous Systems

Heterogeneous systems are platforms with different operating systems and/or different machine architectures

Problems with heterogeneous systems is similar to those of portability

Solutions Highly portable languages

Scripting languages, interpreted languages (Java) Migrating computing environments Migrating virtual machines

Page 11: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Migration Security

Protecting mobile agents need to protect sensitive data

Three mechanisms for securing mobile agents Read-only state

Data items are signed by agent's owner Append-only state

Data can only be appended to logs Selective reading

Each data entry can only be updated by selected servers

Page 12: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Migration Security

Protecting hosts against malicious mobile code Sandbox

Monitor specific instructions, registers, memory regions Easier to do with interpreted languages

Java sandbox Playground

Separate machines exist to execute mobile code Code-signing Stack introspection Name space management

Page 13: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Sources

Tanenbaum, A., Van Steen, M.: Distributed Systems: Principles and Paradigms, Upper Saddle River, NJ: Prentice Hall, 2007

Fuggetta, A., Picco, G.P., and Vigna, G: “Understanding Code Mobility.” IEEE Trans. Soft. Eng., May 1998.

Milojicic, D., Douglis, F., Paindeveine, Y., Wheeler, R., Zhou, S.: “Process Migration.” ACM Computing Surv., Sept 2000.

Page 14: Code Migration Russell T. Potee, III. Overview Why Code Migration? Code Migration Models Migration and Handling Resources Heterogeneous Systems Migration.

Sources

Clark, C., Fraser K., Hand, S., Hansen, J.G., Jul, E., Limpoch, C., Pratt, I., Warfield, A.: “Live Migration of Virtual Machines.” Proc. Second Symp. Network Systems and Design Impl., (Boston, MA). Berkley, CA: USENIX, 2005.