150 likes | 185 Views
Learn about the significance of code migration, different models, handling resources, security measures, and its application in heterogeneous systems. Explore the process, benefits, and security aspects of code migration.
E N D
Russell T. Potee, III Code Migration
Overview • Why Code Migration? • Code Migration Models • Migration and Handling Resources • Heterogeneous Systems • Migration Security
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
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
Code Migration Models • 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 • 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
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
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
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
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
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
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
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.
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.