Bounds for Certain Multiprocessing Anomalies

Load Balancing using Mobile
Agent Approach
Prepared by: Wong Tsz Yeung,Ah Mole
Supervisor : Prof. Michael Lyu
18 December 2000
Introduction (1)
 Autonomous Agents
2
kinds of research going on :
Multi-Agent System; and
 Mobile Agent

 How
do they different??
 What are the advantages and
disadvantages of using them??
Introduction (2)
 Parallel
 Load
Computing
Balancing
In the past - Super Computer with multiprocessor
 Nowadays - Cluster of Single of multi-processor
machines

 Can
we build a system that combine the
advantages of agent and load
balancing??
Multi-Agent System (MAS) (1)
 The
goal of MAS :
 Creating
a system that interconnects
separately developed agents, thus
enabling the ensemble to function beyond
the capabilities of any singular agent in the
system.
 Implication:
Specialization on agents.
Multi-Agent System (MAS) (2)
 Every Agent
is specialized to perform
particular task.
 To
perform a task, an agent that is on
behalf of the user need to communicate
with one or more agents in order to
complete a task.
Multi-Agent System (MAS) (3)
 All
the agents in a MAS can be provided
by one by more venders given that:
 Agents
are using the same language in
communication.
 Agents are having the same kind of
knowledge.
Multi-Agent System (MAS) (4)
 For
Example:
A
business from US wants to arrange a trip
from New York to Hong Kong.
 He has to plan:
Which airline will he take??
 Which hotel will he stay??

Multi-Agent System (MAS) (5)
 Fortunately,
the business man has a
personal agent.

i.e. his secretary
 Then,
the secretary phones the airline
companies and hotels for information.
Multi-Agent System (MAS) (6)
 She
can make a final decision based on
the criteria given by her boss.
 E.g.
Choose the cheapest airline.
 Choose the most comfortable hotel.

 The
above case shows how human
agents work.
Multi-Agent System (MAS) (7)
 We
can treat the above case as:
Airline Agent 1
Airline Agent 2
Agent
Hotel Agent 1
user
Hotel Agent 2
Multi-Agent System (MAS) (8)
 Advantages
 Technically
speaking

It is autonomous in the sense that the agent
can find a service provider, query for suitable
information and determine the final result.

Every service provider has its own
implementation. However, it is transparent to
the user agent.
Multi-Agent System (MAS) (9)
 Economically

speaking
Every agent is specialized, so it can sell the
service. User can buy the service which meets
he/she criteria.
Challenges in MAS (1)
 Information
 Human
Discovery Problem
Agent : Go to Yahoo! to search for
the related information.
 How can software agent locate other
agents??
Challenges in MAS (2)
Return a list of name of
service provider.
Service-seeking
agent
Searching for service provider.
Successfully
locate a service
provider.
service
provider
Lookup the address of
a service provider.
Lookup
server
Discovery
server
Challenges in MAS (3)
 The
Discover server provides yellow
page service.
 The Lookup server provides white page
service.
 Jini also has such discovery-and-lookup
mechanism.
Challenges in MAS (4)
 Communication
 It
Problem
is the communication language problem.
 E.g. On the Internet, we have HTML which
is widely used.
 An agent-to-agent language is more
preferable.
 KQML - Knowledge Query Markup
Language.
 ACL - Agent Communication Language
from FIPA.
Challenges in MAS (5)
 Ontology
 It
Problem
is problem dealing with the context of the
communication language.
 E.g. Bus has a meaning in the
transportation field while it is different in
computer field.
 The agents involved in a MAS must agree
on and share a common definition of
concepts.
Challenges in MAS (6)
 This
problem hinders the development of
agent interoperability.
 Systems tend to use their own knowledge
database.
 we cannot plug another agent into the
current existing MAS, unless we are using
the same knowledge base.
Mobile Agent (MA) (1)
 The
goal of Mobile Agent
 You
delegate tasks to an agent. The agent
will do the tasks for you.
 Instead
of passing message among
agents, mobile agent can migrate
across the network (hence mobile)
representing users in various tasks
(hence agents).
Mobile Agent (MA) (2)
 Potential
application domains of MA
 Data-intensive
application.
 Disconnected computing.
 However,
 there
the sad fact is
is no application that would not exist
without mobile agents.
 Every mobile agent application will have its
client-server counterpart such as RPC or
sockets.
Mobile Agent (MA) (3)
 The
difference between MA and MAS
 They
have similar properties.
 Mobile agent can migrate itself to other
hosts.
Load Balancing (1)
 Imagine
that you are inside a factory :
? ?
?
Machine A
Machine B
Machine C
 Our
Goal : to minimize the total length
of time needed to process a fixed set of
tasks.
Load Balancing (2)
 Our
approach is a greedy approach.
 Whenever
a new job comes in the system,
we search for the machine that has the
minimum load.
 We assign the new job to the minimumload machine.
Description of the System (1)
 Suppose
we are given:
n
identical processing units, namely Pi
where 1 <= i <= n
A
set of tasks: T = {T1, T2, …, Tm}
A
partial-order < on T and a function
where

 is mapping that maps T to real number >= 0
Description of the System (2)
 Once
a processor Pi begins a task Tj, It
works without interruption on Tj until
completion
 The
 If
time that is taken :
 (Tj).
Ti < Tj, Tj cannot be started until Ti is
completed.
Description of the System (3)
 Pi
executes the task Tj in the following
way:
 We
are given a linear ordering
L : (Tk1, …, Tkm)
L
 In
is called a task list.
any time t, a Pi completes a task, it
immediately scans the list L.
Description of the System (4)
 Pi
scans from the beginning of L until it
comes to the first task Tj which has not
yet begun to be executed.
 If
Ti < Tj and Ti has been finished, Pi
begins to executes Tj.
 Otherwise,
Pi proceeds to the next task
in L which has not begun executing.
Description of the System (5)
 If
Pi proceeds through the entire list L
without finding a task to execute, then
Pi becomes idle.
 Idle
means Pi is executing an empty
task.
 Pi
remains idle until some other Pj
completes a task.
Description of the System (6)
 At
that time, Pi immediately scans the
list L as before for possible tasks to
execute.
 If
Pi and Pj, i < j, simultaneously attempt
to begin the same task Tk, the
processor with the smaller index will
execute Tk, i.e. Pi.
Description of the System (7)
 The
processors all start scanning L at
time t = 0 and proceed in the abovementioned fashion until some time w.
 Our
aim is to minimize w.
Description of the System (8)
 E.g.
1.
n
=3
 L : (T3, T1, T2, T4, T6, T5, T7, T8)
 Partial relation :
T1/4
T2/3
T4/5
T3/1
T5/3
T6/2
T7/2
T8/3
Description of the System (9)
 E.g
1 (continued)
T1
4
P1
P2
P3
T1/4
T4/5
T6
2
T2
3
T4
5
T3
1
T7
2
T8
3
E1
2
T6/2
T5
3
E2
2
L : (T3, T1, T2, T4, T6, T5, T7, T8)
T2/3
T3/1
T7/2
T5/3
T8/3
Description of the System (13)
 E.g.
3
Description of the System (14)
 From
the above observations, we can
conclude that w is a function of :
 Task
list L
 Partial order <
 Time function 
 Number of processors n
Description of the System (14)
 It
seems that we can improve w by:
 Change
the task list L
 Decrease the function 
 Relax the partial-order <
 Change the number of processors from n
to n'
Description of the System (15)
 However,
there are counter-examples
show that is not always the case!!
 The
bound is:
Description of the System (16)
 Back
 We
to our greedy approach
know that no matter how bad our
design is, there is still a bound that governs
the maximum time needed.
 It can be proved that the bound for such a
system is:
Load Balancing using Mobile
Agent Approach (1)
 Currently,
load balancing decision is
centralized.
 There is a switch which gathers load
information of all servers.
 Then, it decides which machine should
be chosen to assign an incoming task.
 The switch may collect loading status
from all machines periodically, say
every 1 second.
Load Balancing using Mobile
Agent Approach (2)
 Our
approach for load-balancing
decision is a decentralized one.
 The computations of load balancing
decision making are not performed on
the switch, but on the back-end servers.
Load Balancing using Mobile
Agent Approach (3)
 When
a customer arrives, it will
encapsulate the customer's request into
an mobile agent
 The agent will go to find a server that
has the minimum load autonomously.
Load Balancing using Mobile
Agent Approach (4)
 Multiple-Hop
Mobile Agent Approach
switch
server
server
server
Load Balancing using Mobile
Agent Approach (5)
 Advantage
We distribute the load of the switch to the
server, this can increase the efficiency of the
switch in creating agents.
 We can have a platform-independent load
balancing scheme since the dispatched agent
can run on the different machines given that a
unique agent execution environment is
provided.

Load Balancing using Mobile
Agent Approach (5)
 Disadvantage
our scheme will be a failure if the number of
servers is too large.
 As we have to travel all server once, the load
information will be out-of-date or incorrect at
the time when decision is made.
 If the number of servers is small and the agents
are migrating fast enough, this will be a very
efficient scheme.

Load Balancing using Mobile
Agent Approach (6)
 Multi-Multi-Hop
 Since
Mobile Agent Approach
the efficiency of the multi-hop
approach is restricted by the number of
servers, we are now sending multiple
agents in this new scheme.
 After all the agents finished calculating the
sub-minimal, they will gather together to
calculate global minimum load.
Load Balancing using Mobile
Agent Approach (7)
 Advantage
 By
using mobile agent, we can calculate
the load status with respect to the nature of
the service.
 For example, if the task is a memory
intensive process, we have no reason to
treat the CPU load as the load information.
 Therefore, we can plug a suitable
instruction to the mobile agent in order to
calculate the load status.
Load Balancing using Mobile
Agent Approach (8)
 Disadvantage
 The
mobile agent approach introduces
undesirable load to servers as the agents
calculate the load information before the
execution by incoming tasks.
 Mobile agent is typically written by script
language or Java. They are much slower
than currently adopted approaches.
Conclusion (1)
 Two
kinds of agents are examined:
Multi-agent system and Mobile agent.
 Their advantages as well as
disadvantages are discussed.
 Load Balancing is an old research topic,
however, many domains are adopting
this issues such as clusters of
computers.
Conclusion (2)
 The
possibilities of combining mobile
agent and load balancing are illustrated.
 This shows that with the autonomous
characteristics of agents, we can
improve the current load balancing
decision schemes.
Future Works
 Continue
to investigate more about
agent.
 Continue to think of the possibilities of
combining mobile agent and load
balancing techniques.
~~ END ~~