Unit 3
Unit 3
Process: An system
operating an instance
representing abstraction
of a running
computer program
Consists of data, stack, register the
contents, and specific to the state
underlying OS
Can have of
Consists one or own
their more threads
stack of
and register
control
contents, but share a process’s address
space and signals.
Process management
Two types:
Preemptive process migration
Process may be migrated during the course of its
execution
Non preemptive process migration
Process may be migrated before it starts executing on
its source node
Total Freezing
Execution is
whstoppedits
ile address
sp
transferredis being
acProcess is
foresuspended
a long time
during migration
Simple and
easy to
implement
Not suitable
for interactive
process
Process Migration Mechanisms
Pretransferring
(precopying)
Address space is
transferred while the
process is still running on
the source
Initial node of the
transfer
complete
address space
followed transfers
repeated by of
the pagesduring previous
modified
transfer
Remainingmodified
pages are
retransferred after the
process is frozen for
transferring its state
information
freezing time is reduced
Pretransfer operation is executed at a higher priority than
all other programs
on the source node
Total time of migration is increased due to the possibility of
redundant page transfers
Process Migration Mechanisms
Transfer on
reference
Based on the
assumption that the
process tends to use
only a relatively small
part of their from
transferred address
space whiledestination
its source
node to executing.
Anode
page of when
only the address
space is driven copy on
referenced
Demand
reference approach
Switching time is very short and independent of the size of
the address space
Not efficient in terms of cost
Imposes continued load on process’s source node
Results in failure if source node fails or reboots
Process Migration Mechanisms
Message forwarding mechanisms
Ensures that all pending, en-route and future messages arrive at
the process’s new location
Classification of the messages to be forwarded
Type 1: Messages received at the source node after the process’s
execution has been stopped on its source node and process’s
execution has not yet been started on its destination node
Type 2: Message received at the source node after the process’s
execution has started on its destination node
Type 3: Messages that are to be sent to the migrant process from any
other node after it
has started executing on the destination node
Mechanism of Resending the Message
Messages of type 1 and 2 are returned to the sender as not
deliverable or are simply dropped
Locating a process is required upon the receipt of the nonnegative
reply (messages of type 3)
Drawback: nontransparent to the processes interacting with the
migrant process
Process Migration Mechanisms
Message forwarding mechanisms: Origin Site
Mechanism
Process
Each siteidentifier has the
is responsible forprocess’s
keeping origin site(orhome
information node) of
current location
embedded
about in it
the processes created on it all the
Messages are sent to the origin site first and
from there
they are forwarded
Drawbacks:1. to the
not good from current location
reliability point of view
2. continuous load on migrant process’s original site
Link Traversal mechanism
Uses message queue for storing messages of type 1
Use of link (a forwarding address) for messages of type 2 and 3
Link has two components: process identifier and last known location
of the process
Migrated process is located by traversing a series of links
Drawbacks: 1. poor efficiency 2. poor reliability
Link Update mechanism
Processes communicate via location independent links
During the transfer phase, the source node sends link update
kern
Process Migration Mechanisms
Mechanisms for handling coprocesses
Communication between a process and its subprocesses
Two different mechanisms
Disallowing separation of Coprocesses
By disallowing the migration of processes that wait for one
or more of their children to complete.
By ensuring that when a parent process migrates, its
children processes will be migrated along with it
Concept of logical host
Process id is structured as {logical host-id, local-index} pair
Drawback :1. Does not allow parallelism within jobs 2. Overhead is large
when logical host contains several processes
home node or origin site concept
Complete freedom of migrating a process or its subprocesses
independently and executing them on different nodes
Drawback:Message traffic and communication cost is significant
Advantages of process migration
Reducing average response time of processes
Speeding up individual jobs
Execute tasks of a job concurrently
To migrate a job to a node having faster CPU
Gaining higher throughput
Using suitable load balancing policy
Utilizing resources effectively
Depending on the nature of the process, it can be migrated to the
most suitable node
Reducing network traffic
Migrate the process closer to the resources it is using most
heavily
To migrate and cluster two or more processes which frequently
communicate with each other, on the same node
improving system reliability
Migrating critical process to more reliable node
Improving system security
A sensitive process may be migrated and run on the secure node
Resource Management
in Distributed Systems
Introduction
Load-balancing
algorithms
St Dyna
ati mic
c
Cooperative Noncooperative
A Taxonomy of Load-Balancing
Algorithms
Load-balancing approach
Type of load-balancing algorithms
High
Thres mark
Underloade
hold Low
d
mark
Single-threshold Double-threshold
policy policy
Process transfer policy III.
for Load-balancing algorithms
Pairing
Contrary to the former methods the pairing
policy is to reduce the variance of load only
between pairs
Each node asks some randomly chosen
node to form a pair with it
If it receives a rejection it randomly selects
another node and tries to pair again
Two nodes that differ greatly in load are
temporarily paired with each other and
migration starts
The pair is broken as soon as the migration is
over
A node only tries to find a partner if it
State information exchange policy I
for Load-balancing algorithms
Dynamic policies require frequent
exchange of state information, but these
extra messages arise two opposite
impacts:
Increasing the number of messages gives more
accurate scheduling decision
Increasing the number of messages raises the
queuing time of messages
State information policies can be the
following:
Periodic broadcast
Broadcast when state changes
On-demand exchange
Exchange by polling
State information exchange policy II.
for Load-balancing algorithms
Periodic broadcast
Each node broadcasts its state information
after the elapse of every T units of time
Problem: heavy traffic, fruitless messages,
poor scalability since information exchange is
too large for networks having many nodes
Broadcast when state changes
Avoids fruitless messages by broadcasting the
state only when a process arrives or
departures
Further improvement is to broadcast only
when state switches to another region
(double-threshold policy)
State information exchange policy III.
for Load-balancing algorithms
On-demand exchange
In this method a node broadcast a State-
Information-Request message when its state
switches from normal to either underloaded or
overloaded region.
On receiving this message other nodes reply
with their own state information to the
requesting node
Further improvement can be that only those
nodes reply which are useful to the requesting
node
Exchange by polling
To avoid poor scalability (coming from broadcast
messages) the partner node is searched by
Priority assignment policy
for Load-balancing algorithms
Selfish
Local processes are given higher priority than remote
processes. Worst
response time performance of the three policies.
Altruistic
Remote processes are given higher priority than local
processes. Best response time performance of the three
policies.
Intermediate
When the number of local processes is greater or equal to
the number of remote processes, local processes are
given higher priority than remote processes. Otherwise,
remote processes are given higher priority than local
processes.
Migration limiting policy
for Load-balancing algorithms