Modelling and Analysis of Parallel/ Distributed Time-dependent - - PowerPoint PPT Presentation

modelling and analysis of parallel distributed time
SMART_READER_LITE
LIVE PREVIEW

Modelling and Analysis of Parallel/ Distributed Time-dependent - - PowerPoint PPT Presentation

Modelling and Analysis of Parallel/ Distributed Time-dependent Systems: An Approach based on JADE Franco Cicirelli and Libero Nigro Laboratorio di Ingegneria del Software www.lis.deis.unical.it Universit della Calabria, DIMES 87036 Rende


slide-1
SLIDE 1

Modelling and Analysis of Parallel/ Distributed Time-dependent Systems: An Approach based on JADE

Franco Cicirelli and Libero Nigro

Laboratorio di Ingegneria del Software www.lis.deis.unical.it Università della Calabria, DIMES 87036 Rende (CS) - Italy

7th IDCS 2014 - Calabria - 22-24 Sep 1

slide-2
SLIDE 2

Motivations

The control structure of a MAS normally rests on

multi-threading and asynchronous message-passing

Each agent typically hosts a mailbox for storing

incoming messages, and one thread which picks-up

  • ne message at time and processes it.

The agent thread captures agent behavior Multi-threading is deemed sufficient to realize basic

abilities of agents: autonomy, proactivity, adaptivity to the surrounding (perceived/acted-upon) environment, sociality, mobility, etc

This work, though, argues that specific application

domains can require a particular control structure for regulating the evolution of a MAS: e.g. discrete-event simulation, real-time, mechanism design etc.

7th IDCS 2014 - Calabria - 22-24 Sep 2

slide-3
SLIDE 3

Goals

Developing a flexible control framework using JADE for

M&S&I of ParDis-TimeDependent systems

Addressing model continuity (a challenging issue) Realizing control strategies as crosscutting concerns

which are plugged-in to a MAS and transparently affect its evolution

JADE was chosen because it

  • (a) is Java based open source middleware for programming

distributed MAS

  • (b) adhers to FIPA (Foundations for Intelligent Physical

Agents) standards for application interoperability

The approach purposely depends on a minimal

computational actor model which simplifies agent programming by hiding, e.g., the JADE built-in behavioural infrastructure

7th IDCS 2014 - Calabria - 22-24 Sep 3

slide-4
SLIDE 4

Talk outline

Summarizing the control framework (CF)

and the basic actors and actions modelling concepts

Highlighting CF prototyping in JADE Showing a developed library of control

forms

Discussing methodological guidelines Demonstrating the practical application of

the CF through two modelling examples and their thorough properties analysis.

7th IDCS 2014 - Calabria - 22-24 Sep 4

slide-5
SLIDE 5

Modelling with Actors & Actions

7th IDCS 2014 - Calabria - 22-24 Sep 5 m1 m2 m3

message interface

Actor

state variables behaviour (message handler)

submitted actions sent messages

processing units (PUs) e.g. cores

message queues

application (MAS) business logic control strategy

time notion

slide-6
SLIDE 6

MAS view in-the-large

7th IDCS 2014 - Calabria - 22-24 Sep 6

LP#i (Jade container) Control machine (Jade agent) + collection of PUs Subsystem of actors (Jade agents) LP#j (Jade container) Control machine (Jade agent) + collection of PUs Subsystem of actors (Jade agents) a Internet … … MAS distributed system – Jade platform Logical Process (LP) – Jade container hosting a collection of local agents and a control machine, also managing a group of computing resources (PUs) Platform agent services – yellow pages, migration support, RMA GUI … About Jade API: Global naming – Agent unique IDentifier – AID Messaging – ACLMessage Agents and behaviours – Agent and Behaviour classes

Time Server

slide-7
SLIDE 7

Messages vs. actions

Messages serve to trigger actor behaviour (actor

evolution) and to ensure sociality (communication) in a MAS

Actions model computing activities requested by actors.

They have a duration and their effect may be reflected

  • n the actor status at action termination

Messages are always processed in a non preemptive way

(handler methods are interleaved, i.e. cooperative concurrency)

Action execution naturally exploits maximal parallelism

  • f a multi-core architecture

Action execution can be non preemptive or preemptive

  • n the basis of the modelling needs (e.g. a priority driven

real-time tasking set may require preemptive actions)

7th IDCS 2014 - Calabria - 22-24 Sep 7

slide-8
SLIDE 8

Model continuity

The approach favours model continuity by allowing a

given model to be used both for analysis (through simulation) and for final implementation

Passing from analysis to real-execution implies only

  • a reification of actions (turning them real actions from

simulated version) and a

  • a replacement of the control machine and associated

action scheduler

Any other aspects (agent behaviour, message

exchange, communication patterns etc.) of the model remains unchanged.

7th IDCS 2014 - Calabria - 22-24 Sep 8

slide-9
SLIDE 9

Control framework in JADE

7th IDCS 2014 - Calabria - 22-24 Sep 9

ProcessingUnit ActionScheduler

Serializable Serializable

slide-10
SLIDE 10

Library of prototyped control forms

7th IDCS 2014 - Calabria - 22-24 Sep 10

TimeServer

slide-11
SLIDE 11

Action schedulers

7th IDCS 2014 - Calabria - 22-24 Sep 11

FirstComeFirstServedAS EPreemptivePU

slide-12
SLIDE 12

Development lifecycle

Supported phases:

  • modelling (based on actors/actions)
  • property analysis (based on distributed simulation)
  • preliminary execution (intermediate between simulation and real-time

execution, for estimating if timing constraints can be fulfilled in real execution)

  • implementation and real execution.

Property analysis (PA) can help estimating the parallelism degree of

components/agents, by varying the number of admitted PUs per container (LPs). PUs can also be shared among agents

Preliminary execution (PE) uses a real-time control structure with

simulated actions (not real actions) "really" executed (pure time consuming resources)

PE tries to assess if the computational overhead of message passing is

effectively negligible, i.e., it does not forbid actions/time constrained messages to be completed in their due time, also considering an admitted time tolerance EPS: if a message should be completed at time t, it is considered to be still in time if it is completed within t+EPS

7th IDCS 2014 - Calabria - 22-24 Sep 12

slide-13
SLIDE 13

Modelling a company HelpDesk system

7th IDCS 2014 - Calabria - 22-24 Sep 13

Router q0 q2 q3 q4 PStation S1 Quietness Station S0 Help Desk System PStation S2 PStation S3 PStation S4

Closed queue network of service stations, with a fixed population of re-circulating customers Call Center Products/services description T echnical problems resolution Billing problems resolution 1st line support (general) 2nd line support (more specific)

  • Comm. delay
slide-14
SLIDE 14

HD simulation parameters

7th IDCS 2014 - Calabria - 22-24 Sep 14

Stations average service times: S0: 24h (on average, one customer asks for a service one time per 24h) Call center (S1): 5min, S2,S3: 8min, S4: 15min

slide-15
SLIDE 15

HD agent model

7th IDCS 2014 - Calabria - 22-24 Sep 15

Quietness Station

0..* 0..* 0..*

Customer PStation

slide-16
SLIDE 16

Property analysis

Experimental frame

  • Win 7, 12GB, Intel Core i7, 3.50GHz, 4 cores with

hyper-threading

  • DSimulation, with tEnd=2*106TU
  • Model partitioned in two containers: one for the call

center, the second one for all the remaining stations

Preliminary simulation was directed to estimating

the parallelism degree

Using an unbounded number of operators in all

the operating stations, only the call center (S1) exhibited an utilization greater than 1, with a counted parallel degree of 9. As a consequence, subsequent experiments were carried out using in S1 a variable number of PUs in 1..9 and adopting 1 PU in each other station (S2, S3, S4)

7th IDCS 2014 - Calabria - 22-24 Sep 16

slide-17
SLIDE 17

HD overall system behaviour

7th IDCS 2014 - Calabria - 22-24 Sep 17

1000 2000 3000 4000 5000 6000 7000 8000 1 2 3 4 5 6 7 8 9

HD processed customers Number of processing units on S1

5000 10000 15000 20000 25000 30000 35000 40000 45000 1 2 3 4 5 6 7 8 9

HD response me [s] Number of processing units on S1

1 operator for each S2, S3, S4 Varying number from 1..9 per S1 Easy management of model configuration, by adapting a configuration file Each station/agent can work with a specific collection of PUs Configuration is transparent to model which remains unchanged

slide-18
SLIDE 18

Processed customers x station

7th IDCS 2014 - Calabria - 22-24 Sep 18

2000 4000 6000 8000 10000 12000 1 2 3 4 5 6 7 8 9

Processed customers

Number of processing units on S1

S1 S2 S3 S4

slide-19
SLIDE 19

Utilization x station

7th IDCS 2014 - Calabria - 22-24 Sep 19

slide-20
SLIDE 20

Response time x station

7th IDCS 2014 - Calabria - 22-24 Sep 20

5000 10000 15000 20000 25000 30000 1 2 3 4 5 6 7 8 9

Response Time [s] Number of processing units on S1

S1 S2 S3 S4

slide-21
SLIDE 21

Waiting time x station

7th IDCS 2014 - Calabria - 22-24 Sep 21

100 200 300 400 500 600 700 800 2 3 4 5 6 7 8 9

Waing Time [s] Number of processing units on S1

S1 S2 S3 S4

Emerging property: 4 is the number of call center operators able to optimize system performance

slide-22
SLIDE 22

PUs configurations for checking specifically the performance of the second line of support

7th IDCS 2014 - Calabria - 22-24 Sep 22

slide-23
SLIDE 23

Performance of second line of support

7th IDCS 2014 - Calabria - 22-24 Sep 23

2000 4000 6000 8000 10000 a b c d

Processed customers Configuraon

HD S1 S2 S3 S4 50 100 150 200 250 300 350 400 450 500 a b c d

Waing Time [s] Configuraon

S1 S2 S3 S4

Emergent property: the a configuration 4PUxS1,3sharedPUx(S2,S3,S4)

  • ptimizes SLS performance (WT)

without imparing the processing load capacity of SLS stations

slide-24
SLIDE 24

Preliminary execution of the HD system (a config) on a multi-core machine

7th IDCS 2014 - Calabria - 22-24 Sep 24

Assumed time tolerance: EPS=500 ms disp of 187ms occurred just once and at the beginning of execution

slide-25
SLIDE 25

Schedulability analysis of an RT tasking set

7th IDCS 2014 - Calabria - 22-24 Sep 25

Hypothesis: a) FP scheduling of preemptive tasks under general timing assumptions b) Task precedence constraints for shared data c) Task steps allocated to different processors

slide-26
SLIDE 26

Task set agent model

7th IDCS 2014 - Calabria - 22-24 Sep 26

slide-27
SLIDE 27

Agent modelling

Generator – creates task instances according to

task periods

SubTask – models sub-task steps. Agent

acquaintances mirror the task structure. A Next message is used to trigger next sub-task when the current one is completed

Semaphore – Admits Acquire/Release messages SubTaskWithAcquire/SubTaskWithRelease - Are

specializations of the SubTask agent, which resp. acquire/release a semaphore

Observer – Monitors task instance

start/completion events/times toward an estimation of the response times.

7th IDCS 2014 - Calabria - 22-24 Sep 27

slide-28
SLIDE 28

Timing analysis (tEnd=106 TU)

DSimulation, FixedPriorityAS, SPremptivePU Priority inversion problem between P1 and P2,

worsen by intermediate priority of P3s, makes the task set not schedulable (response time of P1 greater than the period of 10 tu)

By emulating a priority-ceiling protocol, i.e.

making the priority of subtask t22 equal to the priority of P1 (3), the task set becomes schedulable and the response times of the three tasks are estimated (after 5 runs) to be:

P1: [2.002,9.907], P2: [4.006,9.875], P3s: [10.014,16.815]

7th IDCS 2014 - Calabria - 22-24 Sep 28

slide-29
SLIDE 29

Excerpt of SubTaskWithRelease handler() Java code

7th IDCS 2014 - Calabria - 22-24 Sep 29

public void handler(Message m) { if (m instanceof Next) { double subTaskDuration = random.nextSample(minDuration,maxDuration); MyAction subTask = new MyAction(subTaskDuration, cpu, priority); do(subTask, true); } else if (m instanceof ActionCompletion) { Observer.End end = new Observer.End(observerAID, subTaskName); end.setTimestamp(now()); send(end); Mutex.Release release = new Mutex.Release(semaphoreAID); release.setTimestamp(now()); send(release); if (nextAgentExists){ Next next = new Next(nextAgentAID); next.setTimestamp(now()); send(next); } } }//handler

slide-30
SLIDE 30

Conclusions and out-look

The control framework is actually used in a

undergraduate course of Software Engineering for Real-Time and Agent-based Systems

On-going and future work is directed to:

modelling actions through Java 8 lambda expressions

  • ptimizing/extending the prototyped library of control

forms experimenting with the use of the control structures in the analysis and implementation of complex agent-based models, e.g. time-constrained workflow modelling, analysis and enactment, virtual environments etc. realizing the control framework directly onto actors and Java (without JADE) to improve performance porting the approach to Real Time Java.

7th IDCS 2014 - Calabria - 22-24 Sep 30