ppt project process migration

18
Project Title Load Balancing using Process Migration Presented By:- Jay Bhatt Vishwanath 7 th Sem ISE Srinivas Institute of Technology

Upload: jaya380

Post on 12-Jun-2015

2.181 views

Category:

Technology


1 download

DESCRIPTION

Hello

TRANSCRIPT

Page 1: Ppt project process migration

Project TitleLoad Balancing using

Process Migration

Presented By:- Jay Bhatt Vishwanath 7th Sem ISE Srinivas Institute of Technology

Page 2: Ppt project process migration

Introduction

Today in the real world while process is under execution it may happens so that the process gets stucked in between.

If this happens for more than one process then there should be some mechanism that helps process to proceed further.

Here comes the IDEA of LOAD BALANCING using PROCESS MIGRATION

Page 3: Ppt project process migration

Why Migrate?

Some animals migrate for survival.

A process might do the same if its environment becomes “hostile”(unfriendly)

-Power outage possible or imminent.

-The OS is angry?!

-System becoming overburdened

Page 4: Ppt project process migration

What is Process Migration

Process migration is the act of transferring an active

process between two machines and restoring the

process from the point it left off on the selected destination

node. The purpose of this is to provide for an

• enhanced degree of dynamic load distribution, fault

• resilience, eased system administration, and data access

• locality.

Page 5: Ppt project process migration
Page 6: Ppt project process migration
Page 7: Ppt project process migration

Implementation

While implementing this project we need to focus on two topics

• 1) kernel Modules

• 2) ELF Files

• 1) Kernel Modules The Linux kernel is a monolithic kernel i.e. it is one single large

program where all the functional components of the kernel have access to all of its internal data structures and routines.

A kernel module has to have at least two functions: init_module which is called when the module is inserted into the kernel, and cleanup_module which is called just before it is removed

Page 8: Ppt project process migration

A kernel module is not an independant executable, but an object file which will be linked into the kernel in runtime. As a result, they should be compiled with the -c flag.

Loading a module into the kernel involves four major tasks:

1) Preparing the module in user space. Read the object file from disk and resolve all undefined symbols.

2) Allocating memory in the kernel address space to hold the module text, data, and other relevant information.

3) Copying the module code into this newly allocated space and provide the kernel with any information necessary to maintain the module (such as the new module's own symbol table).

4) Executing the module initialization routine, init_module() (now in the kernel).

Page 9: Ppt project process migration

The Linux module loader, insmod, is responsible for reading an object file to be used as a module, obtaining the list of kernel symbols, resolving all references in the module with these symbols, and sending the module to the kernel for execution.

While insmod has many features, it is most commonly invoked as insmod module.o, where module.o is an object file corresponding to a module.

Page 10: Ppt project process migration

Sample for Kernel Module

• #include <linux/kernel.h>

• #include <linux/module.h>

• int init_module(void)

• {

• /* do something to initialize the module */

• return 0; /* on error, return -EERR */

• }

• void cleanup_module(void)

• {

• /* cleanup after the module */

• }

Page 11: Ppt project process migration

2) ELF Files

ELF (Executable and Linking Format) is file format that defines how an object file is composed and organized. With this information, your kernel and the binary loader know how to load the file, where to look for the code, where to look the initialized data, which shared library that needs to be loaded and so on.

Page 12: Ppt project process migration

An ELF header resides at the beginning and holds a road map'

• describing the file's organization. Sections hold the bulk of object file information for the linking view: instructions, data, symbol table, relocation information. 

A program header table, if present, tells the system how to create a process image. Files used to build a process image (execute a program) must have a program header table; relocatable files do not need one.

The segments contain information that is necessary for runtime execution of the file, while sections contain important data for linking and relocation. Each byte in the entire file is taken by no more than one section at a time.

•  

Page 13: Ppt project process migration

Types of ELF Files1) Relocatable :- Relocatable file is a foundation for creating

executables and libraries.

1)$ gcc -c test.c

That will produce test.o, which is a relocatable file.

2) Executable file: object file that holds a program suitable for execution.

$ gcc -o test test.c

3) Shared object file: This file holds code and data suitable for linking in two contexts:

The link editor may process it with other relocatable and shared shared object file to create another object file.

The dynamic linker combines it with an executable file and other shared objects to create a process image.

Suffix is .so

Page 14: Ppt project process migration

ELF HEADER # d e f i n e E I N I D E N T 1 6

• t y p e d e f s t r u c t {

• u n s i g n e d c h a r e_ i d e n t [ E I N I D E N T ] ;

• E l f 3 2_ H a l f e_ t y p e ;

• E l f 3 2_ H a l f e_ m a c h i n e ;

• E l f 3 2_ W o r d e_ v e r s i o n ;

• E l f 3 2 _A d d r e_ e n t r y ;

• E l f 3 2 _O f f e_ p h o f f ;

• E l f 3 2_ O f f e_ s h o f f ;

• E l f 3 2 _W o r d e_ f l a g s ;

• E l f 3 2 _H a l f e _e h s i z e ;

• E l f 3 2 _H a l f e_ p h e n t s i z e ;

• E l f 3 2 _H a l f e_ p h n u m ;

• E l f 3 2 _H a l f e_ s h e n t s i z e ;

• E l f 3 2_ H a l f e_ s h n u m ;

• E l f 3 2 _H a l f e_ s h s t r n d x ;

• }

• E l f 3 2 E h d r ;

user_regs_struct user_i387_struct user_fxsr_struct

Page 15: Ppt project process migration

Why Linux ??ore In Depth1) Low cost: You don’t need to spend time and money to obtain

licenses since Linux and much of its software come with the GNU General Public License.

2) Stability: Linux doesn’t need to be rebooted periodically to maintain performance levels.

3) Performance: Linux provides persistent high performance on workstations and on networks.

4) Full use of hard disk: Linux continues work well even when the hard disk is almost full.

5) Multitasking: Linux is designed to do many things at the same time.

7) Security: Linux is one of the most secure operating systems. “Walls” and flexible file access permission systems prevent access by unwanted visitors or viruses.

start_address (0x08049000)

permissions (rw-p)

end_address (0x0804a000)

Page 16: Ppt project process migration

Advantages

• Dynamic Load Distribution, by migrating processes from overloaded nodes to less loaded ones.

• Fault Resilience, by migrating processes from nodes that able to recover from difficulties

• Improved system administration, by migrating process

Page 17: Ppt project process migration

Application

Distributed applications can be started on certain nodes and can be migrated.

Long running applications, which can run for days or weeks on system can suffer various interruption.

Multiuser Applications, can benefit greatly from process migration. As users come and go, the load on individual nodes varies widely.

Page 18: Ppt project process migration

THANK YOU

Any Queries???