report Research 90 A

advertisement
Research report
CASSANDRA-II:
A
90
DISTRIBUTED
BLACKBOARD SYSTEM
lain D Craig
(RReo)
Abstract
The blackboard problem solving architecture has been used in a number of real-time
and near real-time domains with some success. The architecture is usually employed
when control becomes complex. The control component of a blackboard system is
centralised and combines both local and global control. ln this paper, a system is
described which distributes control across the blackboard. The system,
CASSANDRA-ll, has been used in the controlled airspace monitoring domain.
CASSANDRA-ll is a distributed system in which the usual abstraction levels of the
blackboard are replaced by level managers. Level managers contain schedulers
which make control decisions only for their own level manager. Global control is
achieved by a separate scheduler.
Department of Computer Science
University of Warwick
Coventry
CV4 7AL, UK
Jan 1987
I NTRODUCT I
ON
( Erman.
Hayes-Roth,
1 975;
The blackboard architecture
near real
or
real
time
of
1983) has been used for a variety
problem
distributed
used
in
problems.
also
been
has
It
time
plausibly
(Lesser.
has
been
.
It
1983
I
experiments
solving
might be a general
argued that the blackboard architecture
(Hayes-Roth.
1983)
probJ.em
solving
of
modeJ.
and
Despite considerable interest in the architecture,
it
of
domains,
number
in
a
application
successful
its
particularly
where
problems,
of
number
a
from
suffers
are concerned. The core of a
and organisation
control
globaI
database (the blackboard)
a
blackboard system is
this
hierarchy:
abstraction
as an
which
is organised
problem
plan
solving
the
for
hierarchy serves as an outline
problem domains can
process ( Feigenbaum, 1 97S I . Not aII
(e.g.,
hierarchy
strict
easily be structured according to a
somewhat
a
(Hayes-Roth,
cases,
fn
some
19?9)1.
comments in
in
unnatural and highly abstract hierarchy must be invented
abstraction
the
to
Coupled
order to fit the architecture.
levels
problem: abstraction
problem is the micro-Ievel
a
within
faII
which
gloss
abstractions
over many
frequently
called
are
(these
abstractions
given level
finer-grained
in (Lesser, 19??)). These problems suggest that
micro-IeveIs
the imposition of hierarchy may be unwarranted in some cases
and, thereby, complicate the architecture.
The second
is
a rchitecture
bJ.ackboard
problem
the
with
major
BJ.ackboard sYstems are
scheduling.
frequently used to solve problems which require complex
control regimes. As BaJ.zer et a1. note (Balzer, 1980),
a
aspect of building
scheduling is the most difficult
aII
architecture.
blackboard
the
In
application.
blackboard
decisions are made by a central scheduler: loca1 and globaI
mixed. Hayes-Roth ( Hayes-Roth, 1 984 ) has
are
control
The
based upon planning.
developed a theory of control
of
representation
explicit
requires
theory
Hayes-Roth
controJ- decisions within the system-
In this paper. a system calJ-ed CASSANDRA-II (Craig.
ft was designed to monitor air traffic
19861 is described.
time.
real
approximately
in
airspace
in controlled
but
architecture,
the
blackboard
on
CASSANDRA-II is based
graceful
degradation
and
the requirements of retiability
The major
architecture.
suggested changes to the traditional
system
The
and
abstraction.
changes concern control
also
it
usual:
than
hierarchies
abstraction
fewer
contains
global
a
control.
and
local
between
makes a distinction
schedulers
of
construction
the
makes
which
distinction
somewhat easier than is usually the case.
domain is briefly
In the next section, the application
system is
cASSANDRA-II
the
three,
In
section
outlined.
in
to
control
approach
the
four
discusses
Section
described.
and
reliability
with
concerned
five
is
Section
the system.
problem soIving.
to distributed
the system's contribution
--tt-
Section six summarises the main poJ-nts
2.
TASK
DOMAIN
of
the monitorrng
I is concerned with
warns
system
The
airspace.
movements in controlled
airt:raft
( conflicts
or confl-ictions ) of
the user of any violations
controllecl relative
are
Aircraft
control rules.
traffic
air
specific kinds of
to
to a set of rufes, some of which apply
j-t:h
(sector
apply to any
wh
of
rules ) , sorne
alrspace
is
rules
airspace . One a spect of the Iatter
controlled
f
reasons,
ef
it:iency
ancl
for saf ety
aircraf t,
separatirrn:
and the vertical.
must be separated in both the hqrizontal
to the altitucle at
in adclition, rules relating
There are,
must ffY.
which aircraft
CASSANDRA- I
perform
knowleclge sources to
The system contains
and to
checks
separation
longitudinaland
Iateral
vertical,
altitude
correct
at
the
is flying
check that each aircraft
heacling. When any qf these r:hecks f arIs, a message
f or its
the
the type of violation,
is sent to the user stating
information.
other
useful
ancl
caIJ.-sign of the aircraft
knowledge sources to
sources remove from
knowleclge
perform other checks. These
the sector
inside
not
which are
consicleration atl" aircraft
(radar
produce
aII visible
for
returns
will
being monitored
remove
just
ancl
sector
)
the
those within
not
aircraft,
1n any
engage
to
which are too far separated
airt:raft
cletectrng
f9r
Clne knowledge source is responsible
conflict.
have crashed, the user
if aircraft
crashes tretween aircraft.
emergency
should be informed immediately in order to direct
services to the site.
I n aclclition , cASSANDRA- I I contains
It
structural-1y.
The task domain is quite interesting
Is
there
knowledge:
of
types
separated
completety
contains
does
separation
and
between separation types
no interaction
allocation ' The only
IeveI
with cruise
not
interact
the monitored
outside
aircraft
an
is that
requirement
and that
consideration
from
be
removecl
should
airspace
applied.
are
checks
any
other
crashes be detected before
Eeyr:nd these requirements, the separation and cruise Ievel
led
checks may be performed in paral-1e1. These observations
architecture.
I
i
CASSANDRAof
the
to the clevelopment
3.
SYSTEM STRUCTURE
i is structured as a set of nine i-ntermanagers. Communication between level
communir:ating level
managers
Level
uni-directional.
is
always
managers
conventional
more
in
IeveIs
to abstraction
corresponcl
relationships
b.Lackboard systems. There are no hierarchical
and cruise
separation
the
although
managers
between IeveI
l-eve1
two
with
processes
are
associated
1eve1 allocation
pruning
away
for
is
responsible
which
of
managers, one
cASSANDRA- I
-2
the
which cannot possj-bIy engage in conflicts,
aircraft
between
refationship
The
other of which performs tfre checks.
t9
the IeveI managers in eat:h of these pairs is far closer
j-s
leveI
Each
abstraction.
to
pr:oclucer-Consumer than it
manager in the system operates inclependently of aIl- others:
to this is when a .l-eveI manager has no
the only exception
process
ancl waits for input from another
more infr:rmation to
raclar system[ 1 ].
level. manager or the surveillance
The gross structure
of the system is shown in frg
Level
The core of system is the Ievel manager concept.
relatecl
for
collecting
a
deVice
be
to
managers are designecl
knowledge
know.leclge items (blackboard entries ) ancl relevant
( called
a
clatabase
contain
managers
Level
together.
sources
the l-evel by analogy with the trlackboard mociel) which holds
or hypotheses. The entries in the Ievel are usecl to
entries
the local knowledge sources. The knowledge sclurces
trigger
knowleclge and
manager represent
a level
within
held
manager: a
leve1
the
purely
to
local
expertise which is
j-nstance
only
one level
and
to
one
belongs
knowleclge source
and
create
update,
acld,
may
manager. A knowledge squrce
belongs
it
which
to
i
manager
Ievel
in the
entries
delete
leve.I
other
to
post
entries
knowleclge sources can also
managers by sencling messages ( knowlecl ge s.Jurces cannot
levels other than th6se tq which they
sicle-effect
directly
trelong ) .
levef
the system into
of divj-ding
The intention
of
each
components,
autonomous
permit
Iargely
managers is to
leveI
Each
needs.
its
to
which has a scheduler tailored
a scheduler and scheduling dataIase ' The
manager contains
decisions
scheduler is concerned with purely loca1 control
manager.
a
level
by
made
are
der:isions
global
control
no
each
database,
its
ancl
scheduler
In acldition to a lq1cal
precondition
ancl
source
knowleclge
a
contains
manager
level
interpreter:
action
source
knowledge
a
and
condj-tion matcher
Ievel
in different
representations
different
these permit
managers.
that each
The provision of these components entails
Level
others'
of
aII
independent
tevel manager is completely
passrng
messages
by
another
each
'
managers communicate with
The result ls that CASSANDRA- I I exhibits greater modularity
system. I n traditional
blackboard
than a more traditional
of modularity is the
primary
source
systems, the
blackboard
of
the existance
(each
of
is
ignorant
KS
knowleclge source
in
the
:
I
I
)
cASSANDRAto
applies
also
this
others
atl
present system, level managers can be added or remoVed with
difficultY.
very littIe
Ill In the current implementation of the
input is replaced bY input from a simulator.
-3
system,
radar
Po."lo"r
(ginqlator)
InpuF
Lev4 Mavtagel
Verhc*l
lq',
bn.
Sef
huy'ix)
l*v, Mgt.
Prnntn5
L<v.141r.
Vattr'cal Sge.
chechr
bry,5"+
tav. Aqr.
Le,v. ,tYtt,
lnfr.r{ar<
(useR)
fi1.
1
c\qh,
Laf.
Jep.
Ptr+*ty
l-e.v.
toQr
fhe structure
1.
of a IeveI manager
-l-s
shown in frg
CONTROL ISSUES
Ls
contro].
systems,
blackboard
I n conventional.
in a gtobal schecluler ' The gIobaI scheduler is
centralised
from
responsible for seLecting knowledge source activations
a set of cand j-dates ancl for for:ussinS the system's attention
Scheduling has been
on various regions 6rf the Ilackboard.
regarded for a long time as one of the more diffrcult
Scheuduler clesi-gns
aspects of the blackboard architecture.
(Hayes-Roth,
1977)' The
complex
very
been
frequently
have
local
both
with
concerned
also
is
schedul-er
centralised
(which KS to execute witliin a region of the blackboard) ancl
on
to concentrate
global (whi-ch regi,rn of the bfackboard
next ) control Problems.
approach was aclopted. The
In CASSANDRA-II, a different
parts
that different
showed
problem
domain
of
the
analysis
independently
(the 1evel managers) could operate refatively
could 'be
control
suggested that
thrs
each other:
of
The
extent.
managers to a large
within leveI
localised
strategres
contrnl
different
are
there
was
that
seconcl issue
domain: some leveI
which apply to the airspace monitoring
information,
clistance
using
control
their
et'fect
managers
have this
not
does
manager
atlocation
1eve1
but the cruise
ace to
interf
the
dition,
act
In
availat:le.
r:f
ormation
inf
kind
qf
pruning
the
some
and
(
manager
)
leveI
the
input
radar
sequences of knowledge source
require
managers
Ievel
could be met by a central-rsed
regulrements
These
eXecutions.
there be, at
that
requirement
but the final
scheduler,
s ome
over
clistributron
possibility
of
the
1east,
shoulcl
cgntr(]I
that
indicated
strongly
network
communication
not be centralised.
These observations are supported in the current version
of the system. Each Ievel manager has a Iocal schecluler. The
local scheduler is charged with the contrcll- of only the
GloEraI schedulrng
resides.
manager in which it
level
schedul-er. LocaI
j_saons
1ocal
a
by
made
be
cannot
dec
to other level
messages
send
however,
can,
schedulers
behaviour.
of
form
some
request
to
managers in order
an
monitorj-ng domain,
airspace
In the controlled
controf
non-local
passing
to
effect
message
using
example 9f
has been detected to be ()n an
is as foIIows. If an aircraft
leve1 given its heading, it is possible
f.l-ight
incorrect
other aircraft '
with
engage in conflicts
wiII
that it
Messages can be sent to the Separatj-on level managers ( in
manager -- vertical
separation
the vertical
particular,
be the most probable ) so that
wiII
conflicts
separation
attentLon can be focussed on any events concerning that
particul-ar
aircraf t.
to
blackboard system, the decision
I n a more conventional
focus on the offencl in9 ai-rcraft would be taken t:y the
-4
E.rtriar
I o cof S"latAuler
Sc,heal*tq Dahlare
f(now leASe Scu(c2!
Ks
nt rtt-crtarr
KS
Lc{etl
Er,vef o
Ae*.ron h.rlergte{<r
llrlq6c, qQ.r
oe (
--
Sr' 2
the schecluler must
central scheduler. That suggests that
of
(or
have representatrons
violations
for
moni-tor
tasks
rlf
the
violations ) or must be aware of the intentions
sel-ects for execution. In CASSANDRA-II, the methodology
rt
which emerged was one of cloing what is necessary where rt ls
control
erttailecl coflecting
this
for control,
necessary:
one
facet of the airspace into
clecisions about a particular
place - the Ievel manager responsible for that facet.
The methodology outlinecl above has a number of effects.
effect is that the schedulers associated with each
The first
are quite simple. They are concernecl only wrth
manager
IeveI
of tasks within the level manager anc'l are
the schedulrng
where
f ocus cl ecisit:ns.
of any glotral
ent
indepencl
totally
f ocus clecisions have to be made, a global schedul-er is used.
The system (rperates on a dual-schecluling system' Tltis second
scheduler makes decisj'ons
the global
that
point
entails
which determine how the Ievel managers a s incl ivicl uals are to
between IocaL and gIobal control
The division
operate.
the design of the system's
rntroduces a seconcl benefit;
mechanisms can be divided into two cctmplementary
scheduling
the tw(l
cJi-vision is that
components. The result of this
component become smaller than usual ancl '
types of control
because Iocal scheclulers are simpler, they tencl to tre f aster
than the comparab].e monolithic scheduler [ 2 ] '
In the t:urrent implementation of the system, the gIobal
is concernecl only with selectins the next Ievel
scheduler
system is to
The aim of the present
manager to activate.
perform as fast as possible. A version of the system without
a gJ-obaI scheduler is under construction ' The new version is
across the Departmental network ' In the
to be distributed
be applied '
the same methodology will
version,
dirstitrutecl
with what
concernecl
be
wil-I
schedul-ers
experiment
,
I n this
1n any
permitted
tr:
direct,
lre
not
will
good
and
at
they are
be
only
will
but
managers,
level
other
of
actions
way, the
motivated
able to make suggestions. This decision is partly
version
vy the fact that the g1obal schedul-er in the current
manager
level
of the system is respon.sible for serialising
I t is expected that some
on a uni-processor.
activations
component will be required to monitor control messages from
other level managers: this entails an extension to the level
Iogically
but
interacting,
manager in which another,
separate scheduler wilI lre provj-cled.
5.
DI STRIBUTION AND RELIABILITY
over
allow clistribution
been seen, this fact impacted cln
cAssANDRA- I I was clesigned to
many processers.
As has
t2J CASSANDRA-II's predecessor, cASSANDRA-I had a cenAn eXperiment was performed to compare
schecluler.
tralisecl
in
performances:
cASSANDRA- I I performed better
the relative
terms of response time and accuracy of detectron '
-5
many of the design decisir:ns,
concernecl .
partir:ularly
where (:ontrol
is
the system in a variety of
It is possibrl-e to clistribute
is to allocate a
one way to perform distribution
ways.
separate processor to each 1evel manager. This methocl of
was the one we hacl in mind when designing the
clistribution
to each leveI
system. By a.llocating a separate processor
the system's
tretween
mapping
manager, there is a natural
ancl conventional hardware.
architecture
of a Ievel manager to a single processor
The allocation
it is
control,
In air traffic
implications.
has rel-iability
possible.
one
I
f
as
r:r
as
reliatrle
systems to Ie
essential f
processors
managers
level
than
there are mQre
assumes that
the
or else that a IeveI manager does not consume aIl
becomes
processor
1t
network,
the
in
of each
resources
possible for IeveI managers to migrate from one processor to
obvious fashion. This kind of migration
another in a fairly
might occur when there is either a hardware or a software
f a i-]-ure .
of the failed
a new instance
processor
: the new
new
on the
manager is started
level
( that
processing
scratch
from
level manager instance begins
informatl-on
of
the
any
n() attempt is macl e to recover
is,
manager ) . I n practise , this
level
stored in the faited
causes no problems when the time requirecl to migrate and
start a l-evel manager on a new processor is less than the
radar sweep time ( on average, six seconcls ) .
When migrat:-on occurs,
The facts
uni-processor
that the kind
possible
for
modest power.
6
.
that the system has been cleveloped on a smalI
and that its performan(:e is adequate suggest
describecl here shoulcl be
of clistribution
nodes in a communication network with only
CONCLLIS IONS
of the blackboard architecture,
a system designed for high
is
It
has been descrllred.
time Ftrolllem solvlng
real
in a clistributed,
reliability
moclular ancl Iends
highly
is
The architet:ture
environment.
parall-eI
evaJ-uation.
to
itseJ-f naturally
cAssANDRA- I I , a variant
control within the system is based upon the principle
in the p-tace
knowledge scturce activation
of controlling
r:f
cASSANDRA- I I
Ttre
architecture
.
is requirecl
where it
component.
system
each
in
mechanism
provides
a control
llasis,
purely
IocaI
a
on
schedulecl
are
sources
Knowleclge
tailored
easily
more
be
can
schecluler
each
This entails that
tfl
trr the task in hand. There is a methocl11logical corollary
and
local
intq)
divided
be
control
that
required
it
is
this:
to clesign
global components, each r:f whir:h is f ar simpler
more
traclitiona-I
a
in
analogue
the
than
and construct
blackboard syst,em.
-6
The system was clesrgned to be as simple as possrlrle.
reasons ( it
This approaclr was adqptecl partly f9r reliability
is easier to rnaintain srmple systems ) and partly because of
Many of the clata structures are
consict erations.
runtime
that re-coding in ADA or C w6ruld
suggests
which
length
fixed
better runtime
er to extrat:t
orcl
possibte
in
easily
be
performance.
A rough
uni-processor
CASSANDRA-I I
current claily
west Drayton,
conclude that
0n a
performance evaluation ha s been clone.
system (a vAX 11/750 uncler 1' 2BSD IJNIX)
is abfe tcr handle between 2 '2 and 3 times the
Ioacl at the Lt1nclon Air Traf f ic Control Centre,
we
Middlesex, Englancl. From these results,
the experiment was a success '
,
REFERENCES
19801 Ealzer, R', Erman, L , I London, P,
lBalzer,
and Wifliams, C. HEARSAY- I I I :
A Domain Incl epenclent Framework for Expert Systems
Proc. First AnnuaI
pp' 'l 08 - 110'
Intel-Iigence,
Conference on Artificial
lCraig, 19861
Decentra]-isecl
Ph. D. Thesis,
UniversitY of
1S80
Craig, I. D.
Contro]- in ; BJ-ackboard System,
Department of Computing,
Lancaster, Lancaster, UK
IErman, 1975] Erman, L'0, and Lesser, V'R',
Ctrganisation for Problem Solving Using
A Multi-1eveI
Sources of KnowJ-edge '
Cooperating
Diverse,
pp. 483 - 490, 19?5
2,
VoI.
4,
Proc. IJCAI
Many
tF-eigenbaum, 19781 Feigenbaum, E. and Nii, H'P"
RuJ.e-based Understanding of Signa1.s '
Pattern -0irected Inference Systems, D'A' Waterman
and F. Hayes-Roth (Eds.), Academic Press, 1978
tHayes-Roth, 19771 Hayes-Roth, F' ancl Lesser, V'R',
Focus of Attention in the Hearsay- I I speech understancling system
Proc. IJCAI 5, PP. 27 - 35, 1977
IHayes-Roth, 1979] Hayes-Rcrth, 8. ancl HaYes-Roth,
A Cognitive ModeI of Planning, Cognitive Sc:-ence,
310, 1979
VoI. 3., PP. 275
-7
F
IHayes-Roth, 1983] Hayes-Roth, I' The Blackboard Architecture:
A (ieneral Framework for Problem Solving?
Report No. HPP..83-30, Heuristic Programming
(lomPuter Science DePt '
Prt: ject,
Pa]-o Al-to, CA, May 1983
Stanf ord Un j-versity,
,
IHayes-Rr:th, 1984 ] Hayes-Roth, B. A Blacktroard Moclel of control
Report Ncr. HPP-83-38, Heuristic Programming Project,
(lomputer Science DePartment,
Palo A].to, CA'
Stanf orcl Ll niversity,
.June 1983 (Revisecl December, 1984 )
,
ILesser, 19?7] Lesser, V. R. and Erman, L'D"
A Retrospective View r:f the Hearsay- I I Architecture,
Proc. 5th IJCAI, Cambriclge, Mass. , pp' 790 - 800'
1977
lLesser, 19831 Lesser, V., CorkhiIf , D',
Vehicle Monitoring Testbecl:
The Distributed
problem
distributed
a tool for investigatinS
solving networks,
AI Magazine, Vol. 3, no. 1, PP. 15 - 33,
Fall, 1983
-8
'
Download