SlideShare uma empresa Scribd logo
1 de 94
Baixar para ler offline
Distributed Process
1
Contents
• Distributed process
• Process Management
– Processor allocation
– Process migration
– Threads
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
2
References:
• Pradeep K. Sinha “Distributed Operation
Systems : Concepts and Design” PHI.
• “Process Migration” Dejan S. Milojicic, Fred
Douglis, Yves Paindaveine, Richard Wheeler
and Songnian Zhou
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
3
Concept of Process
• Process: An operating system abstraction
representing an instance of a running
computer program
– Consists of data, stack, register contents, and the
state specific to the underlying OS
– Can have one or more threads of control
• Consists of their own stack and register contents, but
share a process’s address space and signals.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
4
Process management
• Conventional OS:
– deals with the mechanisms and policies for
sharing the processor of the system among all
processes
• Distributed operating system:
– To make best possible use of the processing
resources of the entire system by sharing them
among all processes
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
5
Process management contd…
• Three concepts to achieve this goal:
– Processor allocation
• Deals with the process of deciding which process
should be assigned to which processor
– Process migration
• Deals with the movement of a process from its current
location to the processor to which it has been assigned
– Threads
• Deals with fine-grained parallelism for better utilization
of the processing capability of the system
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
6
Process Migration
• Process Migration:
– The act of transferring a process between two machines
during its execution
– Relocation of a process from its current location (the
source node) to another node(the destination node)
• Goals of Process Migration:
– Dynamic load distribution
– Fault resilience
– Improved system administration
– Data access locality
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
7
Process Migration contd…
• Problems with Process Migration:
– Complexity of adding transparent migration
– Lack of compelling commercial argument for OS
venders to support process migration
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
8
Process Migration contd…
• The flow of execution of a migrating process:
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
9
Source node destination node
Process P1 in
execution
Execution
suspended
Transfer of
control
Execution resumed
Process P1 in
execution
Time
Freezing
Time
Process Migration contd…
• 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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
10
Process Migration contd…
• Involves three steps:
– Selection of a process that should be migrated
– Selection of the destination node to which the
selected process should be migrated
– Actual transfer of the selected process to the
destination node
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
11
Desirable features
• Transperency
– Object class level
– System call and interprocess communication level
• Minimal interference
– Can be done by minimizing freezing time
– Freezing time: a time for which the execution o the
process is stopped for transferring its information to the
destination node
• Minimal residual dependencies
– Migrated process should not continue to depend on its
previous node once it has started executing on new node
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
12
Desirable features contd…
• Effiency
– Time required of migrating a process
– The cost of locating an object
– The cost of supporting remote execution once the process
is migrated
• Robustness
– The failure of a node other than the one on which a
process is currently running should not affect the
execution of that process
• Communication between Coprocesses of a job
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
13
Process migration mechanisms
• Four major subactivities
– Freezing and restarting the process
– Transfer of process’s address space
– Forwarding messages meant for the migrant
process
– Handling communication between cooperating
processes
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
14
Process migration mechanisms
• Mechanisms for freezing and restarting a
process
– Immediate and Delayed blocking of the process
• may be blocked immediately or delayed
• if the process is not executing a system call
• if the process is executing a system call but is sleeping
at an interruptible priority waiting for a kernel event to
occur, it can be immediately blocked from further
execution
• -Do- and sleeping at noninterruptible priority waiting
for a kernel event to occur, it can not be blocked
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
15
Process migration mechanisms
• Fast and Slow I/O operation
– frozen after the completion of all fast I/O operations
– What about slow I/O operations???
• Information about the open files
– No problem for network transparent execution
environment
– What about UNIX like systems???
• creation of link
• Reconstruction of file’s path when required
– What about frequently used files like commands???
– What about temporary files?
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
16
Mechanisms for freezing and
restarting a process contd…
• Reinstating the process on its destination
node
– Creation of a new process
– Process identifier
– What about the process which was blocked while
executing a slow system call????
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
17
UPTO THIS FOR MIDSEMESTER
EXAM
13/04/2012
Distributed Systems, B. Tech I, SVNIT,
Surat
18
Process migration mechanisms
contd…
• Address Space Transfer Mechanisms
– Information to be transferred from source node to
destination node:
• Process’s state information
• Process’s address space
– Difference between the size of process’s state information
and address space
– Possible to transfer the address space without stopping its
execution
– Not possible to resume execution until the state
information is fully transferred
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
19
Address Space Transfer
Mechanisms
• Three methods for address space transfer
– Total Freezing
– Pretransferring
– Transfer on reference
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
20
Address Space Transfer
Mechanisms (cont.)
• Total Freezing:
– Execution is stopped while its address space is
being transferred
– Simple and easy to implement
– Process is suspended for a long time during
migration
– Not suitable for interactive process
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
21
Address Space Transfer
Mechanisms(cont.)
• Total Freezing:
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
22
Source node destination node
Migration decision
made
Execution
suspended
Transfer of
address space
Execution resumed
Time
Freezing
Time
Address Space Transfer
Mechanisms (cont.)
• Pretransferring (precopying):
– Address space is transferred while the process is still
running on the source node
– Initial transfer of the complete address space followed by
repeated transfers of the pages modified during previous
transfer
– Remaining modified pages are retransferred after the
process is frozen for transferring its state information
– Pretransfer operation is executed at a higher priority than
all other programs on the source node
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
23
Pretransferring (precopying) (cont.)
– freezing time is reduced
– Total time of migration is increased due to the
possibility of redundant page transfers
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
24
Pretransferring(cont.)
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
25
Source node destination node
Migration decision
made
Execution
suspended
Transfer of
address space
Execution resumed
Time
Freezing
Time
Address Space Transfer
Mechanisms (cont.)
• Transfer on reference
– Based on the assumption that the process tends to use only a
relatively small part of their address space while executing.
– A page of the address space is transferred from its source node to
destination node only when referenced
– Demand-driven copy-on-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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
26
Transfer-on-reference
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
27
Source node destination node
Migration decision
made
Execution
suspended
On demand
Transfer of
address space
Execution resumed
Time
Freezing
Time
Process migration mechanisms
(cont.)
• 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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
28
Message forwarding mechanisms
contd…
• 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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
29
Message forwarding mechanisms
(cont.)
• 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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
30
Message forwarding mechanisms
(cont.)
• Origin Site Mechanism
– Process identifier has the process’s origin site(or home
node) embedded in it
– Each site is responsible for keeping information about the
current location of all the processes created on it
– Messages are sent to the origin site first and from there
they are forwarded to the current location
– Drawbacks:
• not good from reliability point of view
• continuous load on migrant process’s original site
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
31
Message forwarding mechanisms
(cont.)
• 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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
32
Message forwarding mechanisms
(cont.)
• Link Traversal mechanism:
– Drawbacks:
• poor efficiency
• poor reliability
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
33
Message forwarding mechanisms
(cont.)
• Link Update mechanism:
– Processes communicate via location independent
links
– During the transfer phase, the source node sends
link update message to all relevant kernels
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
34
Process migration mechanisms
(cont.)
• Mechanisms for handling coprocesses
– Communication between a process and its
subprocesses
– Two different mechanisms
• Disallowing separation of Coprocesses
• home node or origin site concept
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
35
Mechanisms for handling
coprocesses
• 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 :
• Does not allow parallelism within jobs
• Overhead is large when logical host contains several processes
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
36
Mechanisms for handling
coprocesses
• 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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
37
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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
38
Advantages of process
migration(cont.)
• 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
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
39
Distributed Scheduling
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
40
Contents
• Distributed Scheduler
• Motivation
• Issues in load distributing
• Load distributing algorithms
• Load sharing policies
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
41
References:
• Mukesh Singhal, Niranjan Shivaratri.
“Advanced concepts in operating systems”.
Tata McGraw Hill publication
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
42
Introduction
• Need for good resource allocation scheme for
DS
• Distributed scheduler:
A resource management component of a
distributed operating system that focuses on
judiciously and transparently redistributing the
load of the system among the computers such
that the overall performance of a system is
maximized.
• More suitable for LANs than WANs
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
43
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
44
Motivation
• Need for load distributing because of
– Random arrival of tasks
– Random CPU service requirements
• Needed both for heterogeneous and homogeneous systems
• E.g. system of N identical and independent servers
Let p be the utilization for each server
P0 = 1 – p; the probability that a server is idle
P be the probability that the system is in a state in which at least one
task is waiting for service and at least one server is idle
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
45
Motivation contd…
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
46
Motivation contd…
• Some Observations:
– For moderate system utilization the value of P is
high i.e. higher potential for load distribution
– At high system utilization the value of P is low i.e.
lower potential for load distribution
– At low system utilization the value of P is again
low
– As the number of the server in the system
increases, P remains high even at high system
utilization
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
47
Issues in Load Distributing
• Some terminology
– Performance of a system
• one of the metric is average response time of task
which is the length of the time interval between its
origination and completion
– Defining proper load index
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
48
Issues in Load Distributing contd…
• Load
– CPU queue length as a load indicator
– CPU utilization as a load indicator
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
49
Classification of load distributing
algorithms
• Goal of Load distributing algorithm
– To transfer load from heavily loaded computers to
idle or lightly loaded computers
• broadly characterized as
– Static
• Decision is hard wired in the algorithm using a priory
knowledge of the system
– Dynamic
• Make use of system state information to make load
distributing decisions
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
50
Classification of load distributing
algorithms contd…
– Adaptive
• Special class of dynamic algorithm
• they adapt their activities by dynamically changing the
parameters of the algorithm to suit the changing
system state
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
51
Load balancing vs. Load sharing
• unshared state :
– A state in which one computer lies idle while at the same
time tasks contend for service at another computer
• to reduce the likelihood of unshared state
• Load balancing algo:
– Attempt to equalize the loads at all computers
– Higher overhead than load sharing algo
• anticipatory task transfer
– To reduce the duration of unshared state
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
52
Preemptive vs. Nonpreemptive
transfers
• Preemptive:
– Transfer of a task that is partially executed
• Non preemptive:
– Transfer of a task that has not yet started
execution
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
53
Components of Load Distributing
algorithm
• Four components
– Transfer policy
• Determines whether a node is in a suitable state to participate in a
task transfer
– Selection policy
• determines which task should be transferred
– Location policy
• determines to which node a task selected for transfer should be
sent
– Information policy
• responsible for triggering the collection of system state
information
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
54
Transfer Policy
• Threshold policy
– Thresholds are expressed in terms of units of load
– Decided upon the origination of new task
– Concept of sender and receiver
• On detecting imbalance in load amongst
nodes in system
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
55
Selection Policy
• Selects a task for transfer
• Simplest approach: to select the newly originated
task
• Overhead incurred in task transfer should be
compensated by the reduction in the response time
realized by the task
• Factors to consider:
– Overhead incurred by transfer should be minimal
– Number of location dependent system calls made by the
selected task should be minimal
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
56
Location Policy
• To find suitable nodes to share load(sender or
receiver)
• Widely used method : polling
– Either serially or in parallel
– Either randomly or on a nearest-neighbor basis
• Alternative to polling
– Broadcast a query to find out if any node is
available for load sharing
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
57
Information Policy
• To decide when, where and what information
about the states of other nodes on the system
should be collected
• One of three types:
– Demand driven
• Node collects the state of the other nodes only when it
becomes either a sender or a receiver
• dynamic policy
• can be sender-initiated, receiver-initiated or
symmetrically initiated
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
58
Information Policy contd…
– Periodic
• Nodes exchange load information periodically
• Do not adapt their activity to the system state
• Benefits are minimal at high system loads ???
– State change driven
• Nodes disseminate state information whenever their
state changes by a certain degree
• Centralized and decentralized policy
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
59
Load distributing algorithms
• Sender initiated algorithms
• Receiver initiated algorithms
• Symmetrically initiated algorithms
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
60
Sender-Initiated algorithms
• Initiative by overloaded node (sender) to send a task
to an underloaded node(receiver)
• Transfer policy :
– Threshold policy based on CPU queue length
• Selection Policy:
– Consider only newly arrived tasks for transfer
• Location policy:
– Random :
• no remote state information
• task is transferred to a node selected at random
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
61
Sender-Initiated algorithms
– Random :
• Useless task transfer can occur
• Treating a transferred task
• Thrashing problem :
– Solution : limit the number of times a task can be transferred
• Substantial performance improvement over no load
sharing at all
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
62
Sender-Initiated algorithms
– Threshold
• Polling a node to determine whether it is receiver or
not
• PollLimit , limit on no. of nodes to poll
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
63
Sender-Initiated algorithms
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
64
Sender-Initiated algorithms
– Shortest
• Choose best receiver for a task
• Make use of CPU queue length
• Information policy
– Demand driven
• Stability
– Instability at high system load
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
65
Receiver-Initiated Algorithms
• Initiation by an underloaded node (receiver)
• Transfer policy
– Threshold policy based on CPU queue length.
– Triggered when the task departs
• Selection policy
– Any
• Location policy
– Threshold policy
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
66
Receiver-Initiated Algorithms
(cont.)
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
67
Receiver-Initiated Algorithms
(cont.)
• Information policy
– Demand-driven type.
• Stability
– Do not cause system instability at high load. Why????
– Do not cause system instability at low load. Why????
• Drawback
– Most transfers are preemptive.
– What about sender-initiated algorithms????
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
68
Comparison of Sender-Initiated and
Receiver-Initiated Algorithms
• Stability
• Robustness
– Has an edge over the sender-initiated policies.
• Performs acceptably with a single value of threshold
over entire load spectrum while sender-initiated
policies requires adaptive location policy
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
69
Comparison of Sender-Initiated and
Receiver-Initiated Algorithms contd…
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
70
Symmetrically Initiated Algorithms
• Both senders and receivers search for
receivers and senders respectively
• Advantages and disadvantages of both sender
and receiver initiated algorithms.
• Above average algorithm.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
71
The above average algorithm
• Proposed by Krueger and Finkel
• Tries to maintain the load at each node within
an acceptable range of system average
• Why not exact system average ????
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
72
Transfer Policy
• Use two adaptive thresholds:
– Equidistant from the node’s estimate of the average load
across all nodes
– E.g. average load is 2  the lower threshold = 1 and the
upper threshold = 3
• A node whose load is greater than upper threshold
 a sender
• A node whose load is less than lower threshold  a
receiver.
• Nodes that have loads between these thresholds lie
within the acceptable range, so they are neither
senders nor receivers.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
73
Location Policy
• The location policy has the following two
components:
– Sender-initiated component
– Receiver-initiated component
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
74
Sender-initiated component
• Sender node:
– TooHigh message
– TooHigh timeout alarm
• Receiver node
– TooLow timeout alarm
– accept message
– AwaitingTask timeout alarm
– Increases load before accepting a task. Why????
• What if sender receives TooLow message
while waiting for Accept message??
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
75
Sender-initiated component
contd…
• On expiration of TooHigh timeout, if no Accept
message is received,
– Sender infers that its estimate of the average
system load is too low
– Hence, it broadcasts a ChangeAverage message to
increase the average load estimate at the other
nodes.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
76
Receiver-initiated component
• A node, on becoming a receiver, broadcasts a TooLow
message, set a TooLow timeout, and starts listening
for a TooHigh message.
• If a TooHigh message is received, the receiver
performs the same actions that it does under
sender-initiated negotiation
• If the TooLow timeout expires before receiving any
TooHigh message, the receiver broadcasts a
ChangeAverage message to decrease the average
load estimate at the other nodes
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
77
Selection and Information Policy
• Selection policy
– This algorithm can make use of any of the
approaches discussed earlier.
• Information policy
– Demand-driven.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
78
Symmetrically initiated algorithm
• average system load is determined individually
at each node
• load balancing actions adapts to the state of
the communication network as well
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
79
Adaptive Algorithms
• A stable symmetrically initiated algorithm
• A stable sender initiated algorithm
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
80
A stable symmetrically initiated
algorithm
• Instability in previous algorithms is due to
indiscriminate polling by sender’s negotiation
component.
• Utilize the information gathered during polling to
classify the nodes in the system as either
Sender/overloaded, Receiver/underloaded, or OK.
• The knowledge concerning the state of node is
maintained by a data structure at each node: a
sender list, a receiver list, and an OK list.
• Initially, each node assumes that every other node is
a receiver.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
81
Transfer policy
• A threshold policy where decisions are based on CPU
queue length.
• Trigger when a new task originates or when a task
departs.
• Two threshold values: a lower threshold (LT), an
upper threshold (UT).
• A node is said to be a sender if its queue length > UT,
a receiver if its queue length < LT, and OK if LT ≤
node’s queue length ≤ UT.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
82
Location policy
• Sender initiated component
• Receiver initiated component
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
83
Sender initiated component
• Triggered when node becomes sender
• Sender polls a node at the head of the receiver lists to
determine whether it is receiver or not
• Processing at the polled node:
• Processing when the response arrives from the polled node:
• Polling stops if,
– A suitable receiver is found
– The number of polls reaches a PollLimit
– The receiver list at the sender node becomes empty
– And the task is processed locally
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
84
Receiver initiated component
• Nodes polled are selected in following order,
– Head to tail in senders list
– Tail to head in OK list
– Tail to head in receivers list
• Receiver polls the selected node to determine whether it is
sender
• Processing if polled node is sender
• Processing if polled node is not a sender
• Polling process stops if,
– A sender is found
– If the receiver is no longer a receiver
– No. of polls reaches a PollLimit
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
85
Selection and Information Policy
• Selection policy:
– The sender initiated component considers only
newly arrived tasks for transfer.
– The receiver initiated component can make use of
any of the approaches discussed earlier.
• Information policy: demand-driven.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
86
Discussion
• Future sender initiated polls at high system
loads are prevented. How???
• What about Receiver initiated component at
low system load ???
• Positive effect of updating the receiver list
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
87
A stable sender initiated algorithm
• Two desirable properties:
– It does not cause instability
– Load sharing is due to non-preemptive transfer only.
• Uses the sender initiated load sharing component of
the stable symmetrically initiated algorithm
• Has a modified receiver initiated component to
attract the future non-preemptive task transfers from
sender nodes.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
88
A stable sender initiated algorithm
• The data structure (at each node) of the stable
symmetrically initiated algorithm is augmented by a
array called statevector.
• The statevector is used by each node to keep track of
which list (senders, receivers, or OK) it belongs to at
all the other nodes in the system.
• When a sender polls a selected node, the sender’s
statevector is updated to reflect that the sender now
belongs the senders list at the selected node, the
polled node update its statevector based on the
reply it sent to the sender node to reflect which list it
will belong to at the sender
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
89
A stable sender initiated algorithm
• The receiver initiated component is replaced
by the following protocol:
– When a node becomes a receiver, it informs all the nodes that are are
misinformed about its current state. The misinformed node are those
nodes whose receivers lists do not contain the receiver’s ID.
– The statevector at the receiver is then updated to reflect that it now
belongs to the receivers list at all those nodes that were informed of
its current state.
– By this technique, this algorithm avoids the receivers sending
broadcast messages to inform other nodes that they are receivers.
• No preemptive transfers of partly executed
tasks here.
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
90
Performance comparision
• Symmetrically initiated load sharing
• Stable load sharing algorithms
• Performance under heterogeneous workloads
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
91
Symmetrically initiated load sharing
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
92
Stable load sharing algorithms
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
93
Selecting a suitable load sharing
algorithm
1. System under consideration never attains high loads
2. Systems that can reach high loads
3. Systems that experiences a wide range of load
fluctuations
4. Systems that experiences a wide range of
fluctuations in load and has a high cost of the
migration of partly executed tasks
5. Systems that experiences heterogeneous work
arrival
13/04/2012
Distributed Systems, B.Tech.IV,
SVNIT,Surat
94

Mais conteúdo relacionado

Mais procurados

Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency ControlDilum Bandara
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentationusmankiyani1
 
process management
 process management process management
process managementAshish Kumar
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
Design issues of dos
Design issues of dosDesign issues of dos
Design issues of dosvanamali_vanu
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmBushra M
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating SystemsRitu Ranjan Shrivastwa
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocolsFabMinds
 
Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed SystemsDr Sandeep Kumar Poonia
 
Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance SHIKHA GAUTAM
 
Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2DigiGurukul
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
Software estimation
Software estimationSoftware estimation
Software estimationMd Shakir
 

Mais procurados (20)

Process Management-Process Migration
Process Management-Process MigrationProcess Management-Process Migration
Process Management-Process Migration
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency Control
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
process management
 process management process management
process management
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Design issues of dos
Design issues of dosDesign issues of dos
Design issues of dos
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Processes and Processors in Distributed Systems
Processes and Processors in Distributed SystemsProcesses and Processors in Distributed Systems
Processes and Processors in Distributed Systems
 
Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance
 
And or graph
And or graphAnd or graph
And or graph
 
Transport layer
Transport layerTransport layer
Transport layer
 
Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Software estimation
Software estimationSoftware estimation
Software estimation
 

Destaque

Load balancing in Distributed Systems
Load balancing in Distributed SystemsLoad balancing in Distributed Systems
Load balancing in Distributed SystemsRicha Singh
 
Time Triggered Protocol
Time Triggered ProtocolTime Triggered Protocol
Time Triggered ProtocolDhruv Goel
 
Load Balancing In Distributed Computing
Load Balancing In Distributed ComputingLoad Balancing In Distributed Computing
Load Balancing In Distributed ComputingRicha Singh
 
Scheduling in distributed systems - Andrii Vozniuk
Scheduling in distributed systems - Andrii VozniukScheduling in distributed systems - Andrii Vozniuk
Scheduling in distributed systems - Andrii VozniukAndrii Vozniuk
 
Distributed Multimedia Systems(DMMS)
Distributed Multimedia Systems(DMMS)Distributed Multimedia Systems(DMMS)
Distributed Multimedia Systems(DMMS)Nidhi Baranwal
 
Aggrement protocols
Aggrement protocolsAggrement protocols
Aggrement protocolsMayank Jain
 

Destaque (9)

Load balancing in Distributed Systems
Load balancing in Distributed SystemsLoad balancing in Distributed Systems
Load balancing in Distributed Systems
 
Time Triggered Protocol
Time Triggered ProtocolTime Triggered Protocol
Time Triggered Protocol
 
Load Balancing In Distributed Computing
Load Balancing In Distributed ComputingLoad Balancing In Distributed Computing
Load Balancing In Distributed Computing
 
Scheduling in distributed systems - Andrii Vozniuk
Scheduling in distributed systems - Andrii VozniukScheduling in distributed systems - Andrii Vozniuk
Scheduling in distributed systems - Andrii Vozniuk
 
Load balancing
Load balancingLoad balancing
Load balancing
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Distributed Multimedia Systems(DMMS)
Distributed Multimedia Systems(DMMS)Distributed Multimedia Systems(DMMS)
Distributed Multimedia Systems(DMMS)
 
Distributed systems
Distributed systemsDistributed systems
Distributed systems
 
Aggrement protocols
Aggrement protocolsAggrement protocols
Aggrement protocols
 

Semelhante a Distributed process and scheduling

Stakeholder update 4 14 data center outage
Stakeholder update 4 14 data center outageStakeholder update 4 14 data center outage
Stakeholder update 4 14 data center outagekevin_donovan
 
Cs 704 d aos-resource&processmanagement
Cs 704 d aos-resource&processmanagementCs 704 d aos-resource&processmanagement
Cs 704 d aos-resource&processmanagementDebasis Das
 
Weeks [01 02] 20100921
Weeks [01 02] 20100921Weeks [01 02] 20100921
Weeks [01 02] 20100921Mohamed Kamel
 
Implementation evaluation and maintenance of the mis
Implementation evaluation and maintenance of the misImplementation evaluation and maintenance of the mis
Implementation evaluation and maintenance of the misSneha Autade
 
Lecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfLecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfAmanuelmergia
 
Common Design Elements for Data Movement Eli Dart
Common Design Elements for Data Movement Eli DartCommon Design Elements for Data Movement Eli Dart
Common Design Elements for Data Movement Eli DartEd Dodds
 
Data processing cycle , stages of data processing cycle.
Data processing cycle , stages of data processing cycle.Data processing cycle , stages of data processing cycle.
Data processing cycle , stages of data processing cycle.samina khan
 
Proposal dms for dwf v2
Proposal   dms for dwf v2Proposal   dms for dwf v2
Proposal dms for dwf v2Media-Mosaic
 
Unit 2 part 2(Process)
Unit 2 part 2(Process)Unit 2 part 2(Process)
Unit 2 part 2(Process)WajeehaBaig
 
IT Service Transformations
IT Service TransformationsIT Service Transformations
IT Service TransformationsTCM Solutions
 
Operating system 18 process creation and termination
Operating system 18 process creation and terminationOperating system 18 process creation and termination
Operating system 18 process creation and terminationVaibhav Khanna
 
Slide management project
Slide management projectSlide management project
Slide management projecttheogrouptech
 

Semelhante a Distributed process and scheduling (20)

CS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMSCS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMS
 
Task migration in os
Task migration in osTask migration in os
Task migration in os
 
Stakeholder update 4 14 data center outage
Stakeholder update 4 14 data center outageStakeholder update 4 14 data center outage
Stakeholder update 4 14 data center outage
 
Cs 704 d aos-resource&processmanagement
Cs 704 d aos-resource&processmanagementCs 704 d aos-resource&processmanagement
Cs 704 d aos-resource&processmanagement
 
Processes
ProcessesProcesses
Processes
 
Weeks [01 02] 20100921
Weeks [01 02] 20100921Weeks [01 02] 20100921
Weeks [01 02] 20100921
 
Ch03 processes
Ch03 processesCh03 processes
Ch03 processes
 
UNIT I-Processes.pptx
UNIT I-Processes.pptxUNIT I-Processes.pptx
UNIT I-Processes.pptx
 
Chapter00000000
Chapter00000000Chapter00000000
Chapter00000000
 
Implementation evaluation and maintenance of the mis
Implementation evaluation and maintenance of the misImplementation evaluation and maintenance of the mis
Implementation evaluation and maintenance of the mis
 
Lecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdfLecture 5- Process Synchonization_revised.pdf
Lecture 5- Process Synchonization_revised.pdf
 
Common Design Elements for Data Movement Eli Dart
Common Design Elements for Data Movement Eli DartCommon Design Elements for Data Movement Eli Dart
Common Design Elements for Data Movement Eli Dart
 
Data processing cycle , stages of data processing cycle.
Data processing cycle , stages of data processing cycle.Data processing cycle , stages of data processing cycle.
Data processing cycle , stages of data processing cycle.
 
Proposal dms for dwf v2
Proposal   dms for dwf v2Proposal   dms for dwf v2
Proposal dms for dwf v2
 
Unit 2 part 2(Process)
Unit 2 part 2(Process)Unit 2 part 2(Process)
Unit 2 part 2(Process)
 
Io (2)
Io (2)Io (2)
Io (2)
 
Ch3 processes
Ch3   processesCh3   processes
Ch3 processes
 
IT Service Transformations
IT Service TransformationsIT Service Transformations
IT Service Transformations
 
Operating system 18 process creation and termination
Operating system 18 process creation and terminationOperating system 18 process creation and termination
Operating system 18 process creation and termination
 
Slide management project
Slide management projectSlide management project
Slide management project
 

Último

SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunicationnovrain7111
 
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...KrishnaveniKrishnara1
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTSneha Padhiar
 
A brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProA brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProRay Yuan Liu
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHbirinder2
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
Theory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfTheory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfShreyas Pandit
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHSneha Padhiar
 
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...gerogepatton
 
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...arifengg7
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 

Último (20)

SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 
The Satellite applications in telecommunication
The Satellite applications in telecommunicationThe Satellite applications in telecommunication
The Satellite applications in telecommunication
 
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
22CYT12 & Chemistry for Computer Systems_Unit-II-Corrosion & its Control Meth...
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
 
A brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProA brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision Pro
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRH
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
Theory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfTheory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdf
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
ASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductosASME-B31.4-2019-estandar para diseño de ductos
ASME-B31.4-2019-estandar para diseño de ductos
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
 
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
March 2024 - Top 10 Read Articles in Artificial Intelligence and Applications...
 
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
Analysis and Evaluation of Dal Lake Biomass for Conversion to Fuel/Green fert...
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 

Distributed process and scheduling

  • 2. Contents • Distributed process • Process Management – Processor allocation – Process migration – Threads 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 2
  • 3. References: • Pradeep K. Sinha “Distributed Operation Systems : Concepts and Design” PHI. • “Process Migration” Dejan S. Milojicic, Fred Douglis, Yves Paindaveine, Richard Wheeler and Songnian Zhou 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 3
  • 4. Concept of Process • Process: An operating system abstraction representing an instance of a running computer program – Consists of data, stack, register contents, and the state specific to the underlying OS – Can have one or more threads of control • Consists of their own stack and register contents, but share a process’s address space and signals. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 4
  • 5. Process management • Conventional OS: – deals with the mechanisms and policies for sharing the processor of the system among all processes • Distributed operating system: – To make best possible use of the processing resources of the entire system by sharing them among all processes 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 5
  • 6. Process management contd… • Three concepts to achieve this goal: – Processor allocation • Deals with the process of deciding which process should be assigned to which processor – Process migration • Deals with the movement of a process from its current location to the processor to which it has been assigned – Threads • Deals with fine-grained parallelism for better utilization of the processing capability of the system 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 6
  • 7. Process Migration • Process Migration: – The act of transferring a process between two machines during its execution – Relocation of a process from its current location (the source node) to another node(the destination node) • Goals of Process Migration: – Dynamic load distribution – Fault resilience – Improved system administration – Data access locality 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 7
  • 8. Process Migration contd… • Problems with Process Migration: – Complexity of adding transparent migration – Lack of compelling commercial argument for OS venders to support process migration 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 8
  • 9. Process Migration contd… • The flow of execution of a migrating process: 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 9 Source node destination node Process P1 in execution Execution suspended Transfer of control Execution resumed Process P1 in execution Time Freezing Time
  • 10. Process Migration contd… • 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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 10
  • 11. Process Migration contd… • Involves three steps: – Selection of a process that should be migrated – Selection of the destination node to which the selected process should be migrated – Actual transfer of the selected process to the destination node 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 11
  • 12. Desirable features • Transperency – Object class level – System call and interprocess communication level • Minimal interference – Can be done by minimizing freezing time – Freezing time: a time for which the execution o the process is stopped for transferring its information to the destination node • Minimal residual dependencies – Migrated process should not continue to depend on its previous node once it has started executing on new node 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 12
  • 13. Desirable features contd… • Effiency – Time required of migrating a process – The cost of locating an object – The cost of supporting remote execution once the process is migrated • Robustness – The failure of a node other than the one on which a process is currently running should not affect the execution of that process • Communication between Coprocesses of a job 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 13
  • 14. Process migration mechanisms • Four major subactivities – Freezing and restarting the process – Transfer of process’s address space – Forwarding messages meant for the migrant process – Handling communication between cooperating processes 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 14
  • 15. Process migration mechanisms • Mechanisms for freezing and restarting a process – Immediate and Delayed blocking of the process • may be blocked immediately or delayed • if the process is not executing a system call • if the process is executing a system call but is sleeping at an interruptible priority waiting for a kernel event to occur, it can be immediately blocked from further execution • -Do- and sleeping at noninterruptible priority waiting for a kernel event to occur, it can not be blocked 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 15
  • 16. Process migration mechanisms • Fast and Slow I/O operation – frozen after the completion of all fast I/O operations – What about slow I/O operations??? • Information about the open files – No problem for network transparent execution environment – What about UNIX like systems??? • creation of link • Reconstruction of file’s path when required – What about frequently used files like commands??? – What about temporary files? 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 16
  • 17. Mechanisms for freezing and restarting a process contd… • Reinstating the process on its destination node – Creation of a new process – Process identifier – What about the process which was blocked while executing a slow system call???? 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 17
  • 18. UPTO THIS FOR MIDSEMESTER EXAM 13/04/2012 Distributed Systems, B. Tech I, SVNIT, Surat 18
  • 19. Process migration mechanisms contd… • Address Space Transfer Mechanisms – Information to be transferred from source node to destination node: • Process’s state information • Process’s address space – Difference between the size of process’s state information and address space – Possible to transfer the address space without stopping its execution – Not possible to resume execution until the state information is fully transferred 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 19
  • 20. Address Space Transfer Mechanisms • Three methods for address space transfer – Total Freezing – Pretransferring – Transfer on reference 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 20
  • 21. Address Space Transfer Mechanisms (cont.) • Total Freezing: – Execution is stopped while its address space is being transferred – Simple and easy to implement – Process is suspended for a long time during migration – Not suitable for interactive process 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 21
  • 22. Address Space Transfer Mechanisms(cont.) • Total Freezing: 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 22 Source node destination node Migration decision made Execution suspended Transfer of address space Execution resumed Time Freezing Time
  • 23. Address Space Transfer Mechanisms (cont.) • Pretransferring (precopying): – Address space is transferred while the process is still running on the source node – Initial transfer of the complete address space followed by repeated transfers of the pages modified during previous transfer – Remaining modified pages are retransferred after the process is frozen for transferring its state information – Pretransfer operation is executed at a higher priority than all other programs on the source node 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 23
  • 24. Pretransferring (precopying) (cont.) – freezing time is reduced – Total time of migration is increased due to the possibility of redundant page transfers 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 24
  • 25. Pretransferring(cont.) 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 25 Source node destination node Migration decision made Execution suspended Transfer of address space Execution resumed Time Freezing Time
  • 26. Address Space Transfer Mechanisms (cont.) • Transfer on reference – Based on the assumption that the process tends to use only a relatively small part of their address space while executing. – A page of the address space is transferred from its source node to destination node only when referenced – Demand-driven copy-on-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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 26
  • 27. Transfer-on-reference 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 27 Source node destination node Migration decision made Execution suspended On demand Transfer of address space Execution resumed Time Freezing Time
  • 28. Process migration mechanisms (cont.) • 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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 28
  • 29. Message forwarding mechanisms contd… • 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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 29
  • 30. Message forwarding mechanisms (cont.) • 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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 30
  • 31. Message forwarding mechanisms (cont.) • Origin Site Mechanism – Process identifier has the process’s origin site(or home node) embedded in it – Each site is responsible for keeping information about the current location of all the processes created on it – Messages are sent to the origin site first and from there they are forwarded to the current location – Drawbacks: • not good from reliability point of view • continuous load on migrant process’s original site 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 31
  • 32. Message forwarding mechanisms (cont.) • 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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 32
  • 33. Message forwarding mechanisms (cont.) • Link Traversal mechanism: – Drawbacks: • poor efficiency • poor reliability 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 33
  • 34. Message forwarding mechanisms (cont.) • Link Update mechanism: – Processes communicate via location independent links – During the transfer phase, the source node sends link update message to all relevant kernels 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 34
  • 35. Process migration mechanisms (cont.) • Mechanisms for handling coprocesses – Communication between a process and its subprocesses – Two different mechanisms • Disallowing separation of Coprocesses • home node or origin site concept 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 35
  • 36. Mechanisms for handling coprocesses • 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 : • Does not allow parallelism within jobs • Overhead is large when logical host contains several processes 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 36
  • 37. Mechanisms for handling coprocesses • 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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 37
  • 38. 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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 38
  • 39. Advantages of process migration(cont.) • 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 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 39
  • 41. Contents • Distributed Scheduler • Motivation • Issues in load distributing • Load distributing algorithms • Load sharing policies 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 41
  • 42. References: • Mukesh Singhal, Niranjan Shivaratri. “Advanced concepts in operating systems”. Tata McGraw Hill publication 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 42
  • 43. Introduction • Need for good resource allocation scheme for DS • Distributed scheduler: A resource management component of a distributed operating system that focuses on judiciously and transparently redistributing the load of the system among the computers such that the overall performance of a system is maximized. • More suitable for LANs than WANs 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 43
  • 45. Motivation • Need for load distributing because of – Random arrival of tasks – Random CPU service requirements • Needed both for heterogeneous and homogeneous systems • E.g. system of N identical and independent servers Let p be the utilization for each server P0 = 1 – p; the probability that a server is idle P be the probability that the system is in a state in which at least one task is waiting for service and at least one server is idle 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 45
  • 47. Motivation contd… • Some Observations: – For moderate system utilization the value of P is high i.e. higher potential for load distribution – At high system utilization the value of P is low i.e. lower potential for load distribution – At low system utilization the value of P is again low – As the number of the server in the system increases, P remains high even at high system utilization 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 47
  • 48. Issues in Load Distributing • Some terminology – Performance of a system • one of the metric is average response time of task which is the length of the time interval between its origination and completion – Defining proper load index 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 48
  • 49. Issues in Load Distributing contd… • Load – CPU queue length as a load indicator – CPU utilization as a load indicator 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 49
  • 50. Classification of load distributing algorithms • Goal of Load distributing algorithm – To transfer load from heavily loaded computers to idle or lightly loaded computers • broadly characterized as – Static • Decision is hard wired in the algorithm using a priory knowledge of the system – Dynamic • Make use of system state information to make load distributing decisions 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 50
  • 51. Classification of load distributing algorithms contd… – Adaptive • Special class of dynamic algorithm • they adapt their activities by dynamically changing the parameters of the algorithm to suit the changing system state 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 51
  • 52. Load balancing vs. Load sharing • unshared state : – A state in which one computer lies idle while at the same time tasks contend for service at another computer • to reduce the likelihood of unshared state • Load balancing algo: – Attempt to equalize the loads at all computers – Higher overhead than load sharing algo • anticipatory task transfer – To reduce the duration of unshared state 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 52
  • 53. Preemptive vs. Nonpreemptive transfers • Preemptive: – Transfer of a task that is partially executed • Non preemptive: – Transfer of a task that has not yet started execution 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 53
  • 54. Components of Load Distributing algorithm • Four components – Transfer policy • Determines whether a node is in a suitable state to participate in a task transfer – Selection policy • determines which task should be transferred – Location policy • determines to which node a task selected for transfer should be sent – Information policy • responsible for triggering the collection of system state information 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 54
  • 55. Transfer Policy • Threshold policy – Thresholds are expressed in terms of units of load – Decided upon the origination of new task – Concept of sender and receiver • On detecting imbalance in load amongst nodes in system 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 55
  • 56. Selection Policy • Selects a task for transfer • Simplest approach: to select the newly originated task • Overhead incurred in task transfer should be compensated by the reduction in the response time realized by the task • Factors to consider: – Overhead incurred by transfer should be minimal – Number of location dependent system calls made by the selected task should be minimal 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 56
  • 57. Location Policy • To find suitable nodes to share load(sender or receiver) • Widely used method : polling – Either serially or in parallel – Either randomly or on a nearest-neighbor basis • Alternative to polling – Broadcast a query to find out if any node is available for load sharing 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 57
  • 58. Information Policy • To decide when, where and what information about the states of other nodes on the system should be collected • One of three types: – Demand driven • Node collects the state of the other nodes only when it becomes either a sender or a receiver • dynamic policy • can be sender-initiated, receiver-initiated or symmetrically initiated 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 58
  • 59. Information Policy contd… – Periodic • Nodes exchange load information periodically • Do not adapt their activity to the system state • Benefits are minimal at high system loads ??? – State change driven • Nodes disseminate state information whenever their state changes by a certain degree • Centralized and decentralized policy 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 59
  • 60. Load distributing algorithms • Sender initiated algorithms • Receiver initiated algorithms • Symmetrically initiated algorithms 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 60
  • 61. Sender-Initiated algorithms • Initiative by overloaded node (sender) to send a task to an underloaded node(receiver) • Transfer policy : – Threshold policy based on CPU queue length • Selection Policy: – Consider only newly arrived tasks for transfer • Location policy: – Random : • no remote state information • task is transferred to a node selected at random 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 61
  • 62. Sender-Initiated algorithms – Random : • Useless task transfer can occur • Treating a transferred task • Thrashing problem : – Solution : limit the number of times a task can be transferred • Substantial performance improvement over no load sharing at all 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 62
  • 63. Sender-Initiated algorithms – Threshold • Polling a node to determine whether it is receiver or not • PollLimit , limit on no. of nodes to poll 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 63
  • 65. Sender-Initiated algorithms – Shortest • Choose best receiver for a task • Make use of CPU queue length • Information policy – Demand driven • Stability – Instability at high system load 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 65
  • 66. Receiver-Initiated Algorithms • Initiation by an underloaded node (receiver) • Transfer policy – Threshold policy based on CPU queue length. – Triggered when the task departs • Selection policy – Any • Location policy – Threshold policy 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 66
  • 68. Receiver-Initiated Algorithms (cont.) • Information policy – Demand-driven type. • Stability – Do not cause system instability at high load. Why???? – Do not cause system instability at low load. Why???? • Drawback – Most transfers are preemptive. – What about sender-initiated algorithms???? 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 68
  • 69. Comparison of Sender-Initiated and Receiver-Initiated Algorithms • Stability • Robustness – Has an edge over the sender-initiated policies. • Performs acceptably with a single value of threshold over entire load spectrum while sender-initiated policies requires adaptive location policy 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 69
  • 70. Comparison of Sender-Initiated and Receiver-Initiated Algorithms contd… 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 70
  • 71. Symmetrically Initiated Algorithms • Both senders and receivers search for receivers and senders respectively • Advantages and disadvantages of both sender and receiver initiated algorithms. • Above average algorithm. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 71
  • 72. The above average algorithm • Proposed by Krueger and Finkel • Tries to maintain the load at each node within an acceptable range of system average • Why not exact system average ???? 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 72
  • 73. Transfer Policy • Use two adaptive thresholds: – Equidistant from the node’s estimate of the average load across all nodes – E.g. average load is 2  the lower threshold = 1 and the upper threshold = 3 • A node whose load is greater than upper threshold  a sender • A node whose load is less than lower threshold  a receiver. • Nodes that have loads between these thresholds lie within the acceptable range, so they are neither senders nor receivers. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 73
  • 74. Location Policy • The location policy has the following two components: – Sender-initiated component – Receiver-initiated component 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 74
  • 75. Sender-initiated component • Sender node: – TooHigh message – TooHigh timeout alarm • Receiver node – TooLow timeout alarm – accept message – AwaitingTask timeout alarm – Increases load before accepting a task. Why???? • What if sender receives TooLow message while waiting for Accept message?? 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 75
  • 76. Sender-initiated component contd… • On expiration of TooHigh timeout, if no Accept message is received, – Sender infers that its estimate of the average system load is too low – Hence, it broadcasts a ChangeAverage message to increase the average load estimate at the other nodes. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 76
  • 77. Receiver-initiated component • A node, on becoming a receiver, broadcasts a TooLow message, set a TooLow timeout, and starts listening for a TooHigh message. • If a TooHigh message is received, the receiver performs the same actions that it does under sender-initiated negotiation • If the TooLow timeout expires before receiving any TooHigh message, the receiver broadcasts a ChangeAverage message to decrease the average load estimate at the other nodes 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 77
  • 78. Selection and Information Policy • Selection policy – This algorithm can make use of any of the approaches discussed earlier. • Information policy – Demand-driven. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 78
  • 79. Symmetrically initiated algorithm • average system load is determined individually at each node • load balancing actions adapts to the state of the communication network as well 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 79
  • 80. Adaptive Algorithms • A stable symmetrically initiated algorithm • A stable sender initiated algorithm 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 80
  • 81. A stable symmetrically initiated algorithm • Instability in previous algorithms is due to indiscriminate polling by sender’s negotiation component. • Utilize the information gathered during polling to classify the nodes in the system as either Sender/overloaded, Receiver/underloaded, or OK. • The knowledge concerning the state of node is maintained by a data structure at each node: a sender list, a receiver list, and an OK list. • Initially, each node assumes that every other node is a receiver. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 81
  • 82. Transfer policy • A threshold policy where decisions are based on CPU queue length. • Trigger when a new task originates or when a task departs. • Two threshold values: a lower threshold (LT), an upper threshold (UT). • A node is said to be a sender if its queue length > UT, a receiver if its queue length < LT, and OK if LT ≤ node’s queue length ≤ UT. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 82
  • 83. Location policy • Sender initiated component • Receiver initiated component 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 83
  • 84. Sender initiated component • Triggered when node becomes sender • Sender polls a node at the head of the receiver lists to determine whether it is receiver or not • Processing at the polled node: • Processing when the response arrives from the polled node: • Polling stops if, – A suitable receiver is found – The number of polls reaches a PollLimit – The receiver list at the sender node becomes empty – And the task is processed locally 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 84
  • 85. Receiver initiated component • Nodes polled are selected in following order, – Head to tail in senders list – Tail to head in OK list – Tail to head in receivers list • Receiver polls the selected node to determine whether it is sender • Processing if polled node is sender • Processing if polled node is not a sender • Polling process stops if, – A sender is found – If the receiver is no longer a receiver – No. of polls reaches a PollLimit 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 85
  • 86. Selection and Information Policy • Selection policy: – The sender initiated component considers only newly arrived tasks for transfer. – The receiver initiated component can make use of any of the approaches discussed earlier. • Information policy: demand-driven. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 86
  • 87. Discussion • Future sender initiated polls at high system loads are prevented. How??? • What about Receiver initiated component at low system load ??? • Positive effect of updating the receiver list 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 87
  • 88. A stable sender initiated algorithm • Two desirable properties: – It does not cause instability – Load sharing is due to non-preemptive transfer only. • Uses the sender initiated load sharing component of the stable symmetrically initiated algorithm • Has a modified receiver initiated component to attract the future non-preemptive task transfers from sender nodes. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 88
  • 89. A stable sender initiated algorithm • The data structure (at each node) of the stable symmetrically initiated algorithm is augmented by a array called statevector. • The statevector is used by each node to keep track of which list (senders, receivers, or OK) it belongs to at all the other nodes in the system. • When a sender polls a selected node, the sender’s statevector is updated to reflect that the sender now belongs the senders list at the selected node, the polled node update its statevector based on the reply it sent to the sender node to reflect which list it will belong to at the sender 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 89
  • 90. A stable sender initiated algorithm • The receiver initiated component is replaced by the following protocol: – When a node becomes a receiver, it informs all the nodes that are are misinformed about its current state. The misinformed node are those nodes whose receivers lists do not contain the receiver’s ID. – The statevector at the receiver is then updated to reflect that it now belongs to the receivers list at all those nodes that were informed of its current state. – By this technique, this algorithm avoids the receivers sending broadcast messages to inform other nodes that they are receivers. • No preemptive transfers of partly executed tasks here. 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 90
  • 91. Performance comparision • Symmetrically initiated load sharing • Stable load sharing algorithms • Performance under heterogeneous workloads 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 91
  • 92. Symmetrically initiated load sharing 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 92
  • 93. Stable load sharing algorithms 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 93
  • 94. Selecting a suitable load sharing algorithm 1. System under consideration never attains high loads 2. Systems that can reach high loads 3. Systems that experiences a wide range of load fluctuations 4. Systems that experiences a wide range of fluctuations in load and has a high cost of the migration of partly executed tasks 5. Systems that experiences heterogeneous work arrival 13/04/2012 Distributed Systems, B.Tech.IV, SVNIT,Surat 94