Ashutosh Chaudhary

Freelance web, apps developer

Process Migration

28 Sep 2015 » M.Tech, Mobile Computing

A general block diagram of process in an OS looks something like this figure:

Process Control Block diagram

Process Control Block diagram

Main things to consider regarding a process are:

  • Process state
  • Data being used by a process
  • Pointers and stuff in the Program counter

To move a process to another machine, above things have to be created in the destination machine. This is what process migration is all about.

Remember, process is just a program in execution. so, basically, we have to create new process with set of thread that are executing in source machine.

Steps in process migration

  1. Source machine request destination machine if migration can happen. Known as _migration request. _After some kind of negotiation, it is granted.
  2. The source machine then halt the process. communication is also temporarily queued so that it can later to sent to the new copy of current process in destination machine.
  3. System then analyze and collect process’s state, which includes memory state(memory content owned by process), processor state(content in CPU registers) as well as open files or any kernel context codes(if any). Some files and kernel code are OS dependent which is not allowed for transfer.
  4. A new process instance on destination machine is then created. The state saved in previous step is now transferred to this new instance. Sometimes, not all the states are required immediately, so they gets transferred later.
  5. Once the sufficient amount of state transfer is done, process gets activated on destination machine.
  6. The communication, which was being queues(in step 2), is now redirected to this new process. The queuing process runs parallel wrt STEP 3,4,5.
  7. Sometimes, OS makes reference of migrated process, in order to control or communicate the process in future.

 

Related Posts