Presentation is loading. Please wait.

Presentation is loading. Please wait.

Process/Code Migration and Cloning

Similar presentations


Presentation on theme: "Process/Code Migration and Cloning"— Presentation transcript:

1 Process/Code Migration and Cloning
CS 314 Operating Systems Process/Code Migration and Cloning Department of Computer Science Southern Illinois University Edwardsville Fall, 2018 Dr. Hiroshi Fujinoki Migration/001

2 CS 314 Operating Systems Migration & Cloning Migration
Only one active copy can exist at a time Process/Code Segment Transferred Migration/002

3 CS 314 Operating Systems Migration & Cloning Cloning
Multiple active copies can exist at a time Process/Code Segment Transferred The same portions of a process can be executed in parallel Migration/003

4 CS 314 Operating Systems Why Code/Process Migration and Cloning
To distribute processor usage (jobs at a processor (or a “computer host”) can be moved to another processor) To reduce data transmission delay (Example: networked graphic-based applications) Data Process Migration/004

5 CS 314 Operating Systems Why Code/Process Migration or Cloning
To distribute processor usage (jobs at a processor (or a “computer host”) can be moved to another processor) To reduce data transmission delay (Example: networked graphic-based applications) Process Process Data Migration/005

6 Metrics for Code/Process Migration and Cloning
CS 314 Operating Systems Decision-making Factors  When to transfer code?  Which code to transfer?  Where to transfer code? “Transfer Policy” deal with this “Selection Policy” deals with this “Location Policy” deals with this Metrics for Code/Process Migration and Cloning Short-Term Scheduler Queue Processor Processor Processor Process/Code (a) Processor Utilization (b) Degree of Multitasking (c) Scheduler Queue Length Migration/006

7 CS 314 Operating Systems Code and Process Migration Remote Host
Local Host Remote Host Process Migration Transmission (Migration) Delay () Local Execution Time () Remote Process () Transferring results Transmission (Migration) Delay () Migrated Execution Time =  +  + Migration/007

8 Each process consists of:
CS 314 Operating Systems Code and Process Migration What can be migrated ()? What can not be migrated ()? Each process consists of:  Program codes (machine instruction codes)  Program data and data structures (heap and stack memory areas)  Local resources reserved and being used by this process  - Depends on types of process/code migration Migration/008

9 Total Time using Process Migration ()
CS 314 Operating Systems Code and Process Migration Process Code Migration: Only a portion of a process is migrated Code Migration Local Host Remote Host Code Code Migration Total Time using Process Migration () Remote Process () Transferring results Local Execution Time () Transferring results Advantages (1) Migration delay can be improved (2) Less processor resource needed in a remote host (3) Execution time using migration () takes less time Migration/009

10 CS 314 Operating Systems Models for Process/Code Migration Weak
Internal Execution (as Target Process) Models for Process/Code Migration Sender-Initiated (PUSH Model) External Execute (as Separate Process) Weak Mobility Strong Receiver-Initiated (PULL Model) Internal Execute (as Target Process) External Execution (as Separate Process) Code Migration Migrate Process Sender-Initiated (PUSH Model) Clone Process Migrate Process Clone Process Receiver-Initiated (PULL Model) Migration/010

11 CS 314 Operating Systems Weak Mobility
Process/code migration where only the program codes are transferred Code Migration: Process Migration: Segments of code must be started from its initial state (from the state it has not been started) Whole processes must be started from its initial state (e.g., only a function in a program is remotely executed) Process/Code Segment Transferred Any pre-generated parameter value can not be migrated (must start with initialization) It’s not necessary where to start Any migrated code or process must start with its initial state Migration/011

12 CS 314 Operating Systems Strong Mobility
Process/code migration where both program codes and data structures are transferred Process/Code Migration: A migrated segment of code can be: Started at any point Stopped at any point Resumed at any point Process/Code Segment Migrated Migrated Migration/012

13 CS 314 Operating Systems Summary: Code/Process Mobility Weak Mobility
Strong Mobility  Only program codes  Program codes What are migrated?  Data to be processed When to migrate?  Before execution only  Any time (after a program starts running, it can be migrated any time) Migration/012

14 CS 314 Operating Systems Internal & External Execution
Migrated code/process are executed w/in the remote-host software’s address space Internal Execution Example: Java-Script Remote Host Software Local Host Remote Host Process/Code Segment Transferred Migration/013

15 CS 314 Operating Systems Internal & External Execution
The new process/code is executed as a new independent process Example: various “plug-ins” (e.g., Adobe Flash Player) External Execution Remote Host Software Request Transferred (the name of the program) Data to be processed transferred Process/Code Segment Local Host Remote Host  A local (origin) host requests a program to start at a remote host.  A local (origin) host sends data to be processed at a remote host after the program starts at a remote host. New process is created Migration/014

16 CS 314 Operating Systems Push and Pull Models Push Model
When the current processor’s utilization or waiting queue length exceeds some threshold, the current busy processor requests another processor to adopt some code or processes Push Pull When a processor’s utilization or waiting queue length goes below some threshold, the idle processor requests other processors to migrate some code or processes Migration/015


Download ppt "Process/Code Migration and Cloning"

Similar presentations


Ads by Google