Transactifying Apache's cache module Apache is a large-scale industrial multi-process and multithreaded application, which uses lock-based synchronization. We report on our experience in modifying Apache's cache module to employ transactional memory instead of locks, a process we refer to as transactification; we are not aware of any previous efforts to transactify legacy software of such a large scale. Along the way, we learned some valuable lessons about which tools one should use, which parts of the code one should transactify and which are better left untouched, as well as on the intricacy of commit handlers. We also stumbled across weaknesses of existing software transactional memory (STM) toolkits, leading us to identify desirable features they are currently lacking. Finally, we present performance results from running Apache on a 32-core machine, showing that, there are scenarios where the performance of the STM-based version is close to that of the lock-based version. These results suggest that there are applications for which the overhead of using a software-only implementation of transactional memory is insignificant. The vast shift to multi-core machines in recent years creates a major challenge for software developers, who must learn how to exploit the parallelism that such architectures can offer. In this context, Transactional Memory (TM) is one of the leading paradigms targeted at allowing programmers to easily harness the parallelism of future multi-core machines and to extract the performance promise these systems can offer. Since hardware transactional memory implementations are not yet in the market, Software Transactional Memory (STM) tools offer a viable alternative in the interim.. One of the principal challenges that TM systems confront, (besides delivering performance), is the ability to handle large-scale commercial applications. Developers that wish to employ TM, face the challenge of applying it to large legacy code. As TM systems are maturing, these aspects of convertibility and completeness are becoming critical in order to allow TM to shift from a promising concept to a full-fledged commercial tool. In this work, we try, via a design example, to answer how far we are from achieving these goals.. To date, TM was mostly employed within the niche of complex concurrent data structures, such as red-black trees and skip lists [9, 7] , and isolated scientific algorithms (such as STAMP [3] ); it was additionally used for benchmarks such as STMBench7 [8] , which measures operations on a complex yet still artificial object graph. Moreover, Transactional Memory was mostly used thus far in benchmarks that were implemented explicitly with TM from the outset.. In this paper, we use Transactional Memory for the first time in the context of large-scale industrial software, which, moreover, does not pertain to any of the typical niches of transactional memory benchmarks. Furthermore, we convert legacy code, which used lock-based synchronization, to work with transactional memory, rather than write the benchmark from scratch. We refer to this conversion process as transactification. Specifically, we transactify the cache module of Apache web server.. When approaching a transactifyication process of such magnitude (Apache is comprised of about 340,000 lines of code), one must focus the effort, in order to complete the transactifyication in smaller and modular changes, where the majority of the code base is left untouched. Therefore our first step in the process was a top level analysis of Apache's code base, looking for transactional memory opportunities. We identified Apache's cache module as an interesting target for transactifycation, that was compatible with our goals.. Since Apache is written in C, we needed to employ Cbased STM toolkits. We next recognized that it would not be feasible to use library-based STM tools, as this would entail changing all reads and writes to global variables in the code. Instead, we opted for compiler-based STMs. We experimented with two such tools, Tanger [5] and Intel's STM Compiler [15] . Section 2 provides background on Apache and the two STM tools we attempted to use in this endeavor.. Our goal in this exercise is twofold. First, we wanted to examine whether the transactional memory paradigm is broadly applicable, outside its traditional niches, in contexts where a high level of parallelism is already obtained using lock-based synchronization. Second, as transactional memory is being touted as the panacea for the limited parallelism of coarse-grained locks, and since coarse-grained locks that limit parallelism are widely used in legacy code, one can anticipate a growing need for transactification of legacy software. We sought to learn how painful such a process can be, and what can be done in order to facilitate it.. In the course of this project, we learned some valuable lessons. For example, we have seen that tools vary in the features they are able to support, which has significant impact on their usability in such large-scale projects. We have further learned that in such a large system, it is more realistic to transactify only pertinent parts of the code, while most of the code is better left untouched. Finally, we have found that there is a vital need to sometimes defer irrevocable actions to the end of a transaction; this feature is provided by a language construct called commit handlers. In Section 3, we describe in detail our transactification process, including the hurdles we have encountered and the means used to overcome them.. Though we finally managed to overcome the hurdles and create working transactified code, the process left us somewhat unsatisfied with the current state of the art. In Section 4, we compile a wish list of features that would have been very helpful in this process, had they been provided by TM toolkits; we hope that developers of future STM versions will take these into consideration.. In Section 5 we study the performance of the transactified version of Apache on a 32-core machine. Note that since the legacy Apache code is already tuned to work well with multiple threads and multiple processes, and since we use software-only TM solutions, which were not optimized for this application, one could expect the transactified version to be significantly slower than the original. Somewhat surprisingly, we show that this is not the case, and the transactified version's performance is competitive to that of the lock-based legacy code. As future TMs are expected to incorporate hardware support, and also to be better optimized for a range of application, our results suggests that in the future, porting applications to TM may be valuable.. Section 6 summarizes the lesson we learned in the transactification process. We have reported on our experience in converting the Apache web server to use the TM paradigm instead of lockbased synchronization, and the lessons we learned along the way. Our conclusions include:. • In order to cope with the scale of the software, we had to restrict our attention to a small part of it. Out of 340,000 lines of code in the Apache web server, the cache module is comprised of only 6651 lines of code, of which we modified only 273. This highlights the importance of being able to modify only encapsulated sections of the code, and inter-operating with legacy software, which might still use locks. Moreover, legacy systems often interact with software libraries whose source code is unavailable.. • Having commit handlers in the STM system is not only needed for creating efficient open transactions, but can also aid the process of transactifying legacy code.. • It is important to work on real-world applications, as they may reveal challenges resulting from engineering problems and not only algorithmic and theoretical problems.. We next indicate two future directions that may follow on our work. First, there are many STM systems currently available, and one immediate direction would be to compare them using this new TM benchmark. Doing so would require writing plugins for existing TM system to match Intel's TM ABI. A second direction is to transactify additional legacy applications, following the methods we used. We compare the average latency and request throughput when running on different numbers of cores, and with different values of s. Each graph presents results from three experiments, comparing the performance of an Apache server running without a cache, a cached version without our transactional modifications, and the transactified version.. As expected, with low locality (s = 0.1), the cache yields almost no benefit. Moreover, the penalty of the STM increases with the number of processors, causing it to be less practical, as we see in Figures 5(a) and 5(b) . This degradation of the STM-based version occurs since almost all of the requests result in cache misses, thus causing more work to be done within transactions, and increasing contention. However, this workload is not representative; typical Apache workloads exhibit more locality, and hence benefit from the cache.. With more representative locality, such as s = 1, (Figures 6 (a) and 6(b)), caching is beneficial. The overhead of STM is still significant, but its performance is better than when not using a cache at all.. With even higher locality (s = 2), the contention on the cache is high even with small number of cores. The results of the high locality experiments are shown in Figures 7(a) and 7(b) . In this case, caching provides major performance benefits, increasing throughput by a factor of four. Here, the two cache-based versions exhibit close results, with a small yet consistent advantage to the STM version.. In all the experiments described above, performance be- gins to decrease beyond a certain number of cores. This number becomes smaller as the locality increases, albeit it occurs at a higher throughput when there is more locality. This occurs due to the increased competition among the cores over the shared resources. In particular, in the transactified version, the abort rate rises with the number of cores, as we show below. We further note that in all workloads, there is a number of cores for which the transactified version performs better than the original version. This might be due to the advantage STM has over coarse-grained locking -the fact that transactions only collide when they access the same memory, while the non-transactified version requires the same lock for all requests.. In order to investigate this decrease in throughput, we wanted to show the transaction abort rate for these experiments. Unfortunately, as noted in Section 4.2, Intel STM's statistics mechanism is unable to work with multiple processes. We therefore ran an additional experiment, with Apache in a single process debugging mode, in order to collect internal data about the transactions.. We ran this single-process experiment with the medium locality workload, that is, with s = 1. Surprisingly, we see in Figure 8 (a) that the throughput of both the original and the STM version improve in this mode. We assume that this is caused by the fact that the cache is not shared between processes, so by running apache with multiple processes the cache capacity is virtually reduced. Nevertheless, as before, neither the transactified version nor the original version was able to benefit from the maximum allowed parallelism of the machine. Figure 8(b) shows the average number of aborts per transaction for the experiment with the transactified version. The increase in the abort rate explains the decrease in the request throughput. At first, the abort rate increases gradually, and the benefit of having more cores available outweighs it. But after about eight cores, the increase in the abort rate dominates, so that there is little benefit in using more cores. We evaluate the transactified web server using Siege [11] , an HTTP load testing tool. The server is loaded with the set of UNIX man-pages -a set of small textual files typical of some web sites. Each page is served using the man2html program, uncompressed and converted into HTML. Thus, the serving of files requires enough computational resources to make the use of caching worthwhile.. The man2html program is a Common Gateway Interface (CGI) program that serves unix manual (man) pages on Internet sites. The pages are usually stored compressed in gzip format, and formatted using the troff format. The program receives a request for a man page from the web server, uncompresses the required file, and converts it to HTML. As every CGI program, it outputs the result with relevant HTTP headers.. The default caching policy of Apache forbids caching dynamically generated pages such as those of man2html, unless the HTTP headers of the resulting page clearly specify otherwise. To make caching of the man2html pages possible, we modified man2html to output such headers, specifying the output can be cached for one hour.. In each experiment, the pages are requested randomly according to a Zipf distribution with some parameter s, which determines how frequently the most popular pages are visited, thus controlling the level of locality in the requests. The higher the value of s is, the more locality there is in the workload.. The experiments run on two computers connected by Gigabit Ethernet. Each of the machines is an 8-processors SMP, with quad core 2.3GHz AMD Opteron processors (for a total of 32 cores), and 126GB of RAM. One of the machines was used as a server running Apache, and the other served as a client, running Siege.

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Interactivity-Constrained

Server

Provisioning

in

Large-Scale

Distributed

Virtual

Environments

Abstract-Maintaining

interactivity

is

one

of

the

key

challenges

in

distributed

virtual

environments

(DVEs).

In

this

paper,

we

consider

a

new

problem,

termed

the

interactivity-constrained

server

provisioning

problem,

whose

goal

is

to

minimize

the

number

of

distributed

servers

needed

to

achieve

a

prespecified

level

of

interactivity.

We

identify

and

formulate

two

variants

of

this

new

problem

and

show

that

they

are

both

NP-hard

via

reductions

to

the

set

covering

problem.

We

then

propose

several

computationally

efficient

approximation

algorithms

for

solving

the

problem.

The

main

algorithms

exploit

dependencies

among

distributed

servers

to

make

provisioning

decisions.

We

conduct

extensive

experiments

to

evaluate

the

performance

of

the

proposed

algorithms.

Specifically,

we

use

both

static

Internet

latency

data

available

from

prior

measurements

and

topology

generators,

as

well

as

the

most

recent,

dynamic

latency

data

collected

via

our

own

large-scale

deployment

of

a

DVE

performance

monitoring

system

over

PlanetLab.

The

results

show

that

the

newly

proposed

algorithms

that

take

into

account

interserver

dependencies

significantly

outperform

the

well-established

set

covering

algorithm

for

both

problem

variants.

M

ULTIPLAYER

online

games,

distributed

military

simulations,

collaborative

design,

virtual

shopping

malls,

etc.,

are

typical

examples

of

distributed

virtual

environments

(DVEs).

Essentially,

DVEs

are

distributed

systems

that

enable

multiple

geographically

separated

clients

to

interact

with

each

other

in

real

time

within

a

shared,

computer-generated

virtual

world,

where

each

client

is

represented

by

an

avatar.

A

client

controls

the

behavior

of

his/her

avatar

by

various

inputs,

and

the

updates

of

an

avatar's

state

need

to

be

sent

to

other

clients

in

the

same

part

of

the

virtual

world.

In

this

way,

each

client

can

be

aware

of

and

interact

with

other

nearby

clients..

Large-scale

DVEs

with

thousands

of

geographically

separated

clients

interacting

concurrently

often

require

a

distributed

server

architecture

which

involve

multiple

servers

located

in

different

data

centers

across

the

Internet.

In

such

architecture,

each

client

interacts

with

others

through

these

servers.

For

better

scalability,

the

common

"divide-and-conquer"

practice

spatially

partitions

the

large

virtual

world

into

distinct

zones,

with

each

zone

managed

by

only

one

server.

Interactions

only

happen

among

clients

in

the

same

zone,

and

clients

may

move

from

one

zone

to

another..

Maintaining

good

interactivity

for

DVEs

has

been

very

challenging

due

to

the

heterogeneous

nature

of

the

Internet

and

the

fact

that

clients

in

a

DVE

are

usually

geographically

distributed.

It

is

likely

that

a

large

number

of

clients

in

a

zone

may

be

far

away

(in

terms

of

round-trip

network

latency)

to

the

server

hosting

that

zone;

thus,

the

interactivity

of

the

DVE

for

those

clients

may

be

greatly

degraded.

Previous

works

have

focused

on

the

problem

of

maximizing

interactivity

given

limited

server

resource.

This

problem,

referred

to

as

the

zone

mapping

problem

in

and

assumes

that

the

underlying

infrastructure

is

given

(in

terms

of

the

number

of

distributed

servers

as

well

as

their

locations),

which

may

cause

over-or

underprovisioning..

For

the

deployment

of

any

DVEs,

an

important

consideration

is

how

much

server

resource

is

needed

to

meet

certain

interactivity

requirement.

In

this

paper,

we

consider

a

new

problem,

referred

to

as

the

interactivity-constrained

server

provisioning

problem.

Essentially,

this

problem

looks

at

how

to

achieve

a

prespecified

level

of

interactivity

for

a

certain

DVE

configuration

with

minimum

number

of

servers.

Solutions

to

such

problem

would

allow

DVE

administrators

to

specify

or

fine-tune

the

desired

interactivity

level

of

the

DVE

based

on

their

organizations'

financial

constraints

or

other

business

objectives..

Below,

we

summarize

the

main

contributions

of

this

paper:.

Related

work

is

summarized

in

Section

of

the

supplementary

file,

which

can

be

found

on

the

Computer

Society

Digital

Library

at

We

consider

a

new

problem

named

interactivityconstrained

server

provisioning.

We

investigate

and

formulate

two

variants

of

this

problem.

We

also

show

that

both

of

these

two

variants

are

NP-hard,

by

reducing

each

of

them

to

the

set

covering

problem,

which

is

NP-hard.

We

propose

several

computationally

efficient

approximation

algorithms

for

the

two

variants

mentioned

above.

The

main

algorithms

take

into

account

the

unique

characteristics

of

the

new

problem's

context

and

formulation,

such

as

the

dependencies

among

distributed

servers.

We

develop

and

deploy

a

distributed

software

framework

named

DVE

INteractivity

Evaluation

(DINE)

for

enabling

more

realistic

evaluations

of

the

proposed

algorithms

under

dynamic

Internet

conditions.

The

framework

can

be

used

as

either

an

evaluation

platform

for

the

development

of

new

interactivity

enhancement

algorithms,

or

a

realworld

performance

monitoring

and

management

suite

for

existing

DVEs.

We

conduct

extensive

experiments

with

realistic

models

and

settings

to

evaluate

the

effectiveness

of

the

proposed

algorithms.

In

particular,

we

use

both

static

Internet

latency

models

generated

by

the

tool

DS

and

BRITE,

as

well

as

dynamic

latency

data

gathered

over

a

two-week

period

from

PlanetLab

using

DINE.

We

also

use

iPlane

an

Internet

performance

estimation

system,

to

collect

input

data

for

the

algorithms.

The

main

goal

of

employing

iPlane

is

to

evaluate

the

sensitivity

of

the

proposed

algorithms

with

regard

to

inaccurate

input

data.

The

key

results

show

that

two

of

our

proposed

algorithms,

namely,

Greedy-Z

and

Greedy-C,

work

best

for

the

two

variants,

respectively.

These

algorithms

also

significantly

outperform

the

well-known

set

covering

algorithm

in

most

cases,

especially

when

the

interactivity

requirement

is

high.

In

this

paper,

we

have

studied

a

new

problem,

referred

to

as

the

interactivity-constrained

server

provisioning

problem.

The

main

goal

is

to

the

minimize

resource

needed,

i.e.,

the

number

of

servers

that

need

to

be

provisioned,

to

achieve

a

prespecified

QoS

requirement

in

large-scale,

highly

interactive

DVEs.

To

this

end,

we

have

proposed

two

different

formulations

for

the

problem,

namely,

QoSZ

and

QoSC,

and

have

shown

that

both

are

NP-hard.

These

two

formulations

would

offer

DVE

administrators

more

flexibility

in

selecting

the

right

QoS

requirements

for

their

DVEs,

considering

various

business

constraints

they

may

face

in

the

real

world..

A

number

of

computationally

efficient

heuristics

have

also

been

developed

for

the

problem.

Extensive

simulation

study

on

realistic

network

models

and

dynamic

latency

data

collected

from

large-scale

Internet

latency

measurements

have

shown

that

two

proposed

greedy

algorithms,

taking

into

account

interserver

dependency,

work

best

for

the

QoSZ

and

QoSC

variants,

respectively.

The

experiments

with

dynamic

Internet

latency

data

also

suggest

some

important

considerations,

e.g.,

overprovisioning

sometimes

is

necessary

for

real-world

deployments

of

the

provisioning

algorithms,

in

light

of

fluctuations

in

Internet

performance.

Last

but

not

least,

the

best

algorithms,

namely,

Greedy-Z

and

Greedy-C,

appear

to

be

quite

resilient

to

inaccurate

input

data

such

as

the

round-trip

latency

obtained

from

iPlane.

This

further

confirms

the

practicality

of

these

algorithms

for

real-world

DVE

server

provisioning..

For

future

work,

we

might

consider

scenarios

in

which

reprovisioning

might

be

required

more

frequently

if

clients

tend

to

change

zones

more

often.

With

the

help

of

emerging

technologies

such

as

cloud

computing,

on-demand

provisioning

of

geographically

distributed

DVE

servers

becomes

more

feasible.

We

intend

to

explore

the

overhead

of

such

dynamic

and

frequent

DVE

server

provisioning

using

popular

cloud

platforms

such

as

Amazon's

Another

possible

direction

is

to

combine

network

and

processing

latencies

into

one

objective

metric

for

server

provisioning

in

the

cases

where

server

capacity

becomes

a

real

constraint.

Thang

Nguyen

received

the

BEng

degree

in

computer

science

from

Nanyang

Technological

University,

Singapore,

in

He

is

currently

working

as

a

research

engineer

at

Nanyang

Technological

University.

His

research

interests

include

distributed

and

cloud

computing..

Suiping

Zhou

received

the

BEng,

MEng,

and

PhD

degrees

in

electrical

engineering

from

Beijing

University

of

Aeronautics

and

Astronautics,

P.R.

China.

He

is

currently

a

reader

in

the

School

of

Computing

at

Teesside

University,

United

Kingdom.

Previously,

he

was

an

assistant

professor

in

the

School

of

Computer

Engineering

at

Nanyang

Technological

University,

Singapore.

His

current

research

interests

include:

large-scale

distributed

interactive

applications

(e.g.,

MMOGs),

parallel/distributed

systems,

and

human

behavior

representation

in

modeling

and

simulation.

He

has

published

more

than

peer

reviewed

articles

in

these

areas.

He

is

currently

an

associate

editor

of

the

International

Journal

of

Computer

Games

Technology.

He

has

served

as

technical

program

committee

member

of

many

international

conferences

and

workshops

in

computer

games

and

virtual

environments.

He

is

a

member

of

the

IEEE..

Xueyan

Tang

He

has

been

working

on

parallel

and

distributed

systems

for

the

past

years.

During

his

research

was

focused

mainly

on

parallel

and

distributed

simulation

(PADS).

In

the

recent

years,

he

has

focused

on

semantic

interoperability

and

composability

of

model

components,

symbiotic

simulations,

optimization

of

business

process

models,

service

discovery,

and

service

composition.

He

has

served

as

an

area/associate

editor

for

seven

international

journals,

including

the

ACM

Transactions

on

Modeling

and

Computer

Simulation

(TOMACS).

He

is

currently

a

panel

member

of

the

European

Research

Council

For

more

information

on

this

or

any

other

computing

topic,

please

visit

our

Digital

Library

at

O B I O O B I I O B O O O O O O O B I I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O B I O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Using mini-flash crowds to infer resource constraints in remote web servers Unexpected surges in request traffic (e.g., flash crowds) can exercise server-side resources such as access bandwidth, CPU, and disks in unanticipated ways. Administrators today do not have the requisite tools to fully understand the effect that flash crowds can have on server-side resources. As a result, most Web-servers today rely on significant over-provisioning, strict admission control, or alternatively use potentially expensive solutions like CDNs to provide high availability under load. A more fine-grained understanding of the performance of servers under emulated but controlled flash crowd like conditions can guide administrators to make more efficient provisioning and resource management decisions.We present the initial design of Mini-Flash Crowds (MFC) -a light-weight wide-area profiling service that reveals resource bottlenecks in a Web-server infrastructure, including access bandwidth, processing resources, and back-end data management. The MFC approach is based on a set of controlled measurements in which an increasing number of distributed clients make synchronized requests to exercise specific resources of a remote server. Using a number of wide-area experiments and controlled lab tests, we show that our approach can faithfully track the impact of request loads on different server resources. Our approach is non-intrusive and thus we can use it to actively probe numerous live Web servers. We present the results from a preliminary measurement study of resource provisioning on public Web servers. Providers of Web-based applications have to provision resources (processing and memory capacity, access bandwidth, database and storage) to ensure good response time. Providing this consistently under a broad range of operating conditions requires an ability to predict the volume and mix of requests. Large providers typically resort to over-provisioning, distributed content delivery, or dynamic resource provisioning. Smaller providers provision for the common case by trading off robustness to large variations in workload for a cheaper infrastructure. Yet, operators are left without a sense of how their application infrastructure will handle large increases in traffic due to planned events or unexpected surges due to attacks or flash crowds. Such events can lead to significant loss of revenue and dissatisfied users if the infrastructure is unable to maintain reasonably good service or at least degrade gracefully.. We introduce a profiling service to help operators better understand the ability of their Internet applications to withstand increased request load. We propose Mini-Flash Crowds (MFC) -a mechanism that reveals constraints in the application infrastructure by quantifying the number and type of simultaneous requests that are likely to tax specific resources and affect response time. Using MFC, an application provider can compare the impact of an increase in database-intensive requests versus an increase in bandwidthintensive requests. Armed with other information (say, through controlled lab testing), the operator can make better decisions on provisioning additional resources or introducing request shaping.. A MFC is a phased set of controlled measurements in which an increasing number of distributed clients make synchronized requests to a remote application server. These requests attempt to exercise a particular part of the infrastructure such as network bandwidth, local disk, or back-end database. As the number of synchronized clients increases, one or more resources may become stressed, leading to a small but discernible rise in the response time. At this point, inferences can be made about the resource profile of the application. The number of clients making simultaneous requests is increased only up to a pre-set maximum -if there is no change in the response time, we label the application infrastructure as unconstrained. This somewhat conservative approach allows MFC to reveal resource limitations for many applications while limiting its intrusiveness on the tested sites.. The MFC technique can be thought of as a "black-box" approach for determining the resource limitations of an Internet application, or for uncovering performance glitches, vulnerabilities, and configuration errors that were not apparent from internal testing in a lab or data center. The key advantages of the MFC approach are: i) lightweight and non-intrusive measurements that have minimal impact on, and involvement from, production servers; ii) use of real, distributed clients that test the deployed application infrastructure, and accurately reflect the effects of wide-area network conditions; and iii) ability to work with a broad range of Web applications with little or no modification, while at the same time providing some tunability to run more application-specific tests.. We conducted many wide-area and controlled lab experiments using synthetic workloads to validate MFC's ability to track server response times and reveal resource constraints. We also conducted preliminary experiments over live Web servers and known Phishing servers. Early results indicate that the MFC approach is an important contribution to the set of tools and services for profiling the performance and availability of Web servers. We presented the initial design of MFC -a light-weight widearea profiling service that reveals resource bottlenecks in a Webserver infrastructure. Using controlled measurements with an increasing number of distributed clients making synchronized requests to exercise specific resources of a remote server, we are able to faithfully track the impact on different server resources. Through a number of wide-area experiments and controlled lab tests, we show that our approach is non-intrusive and usable for actively probing live servers. We presented the results from a preliminary measurement study of resource provisioning on live public Web servers and known phishing servers. We are currently running extensive experiments with other MFC stages over a much larger set of Web servers. We are also running more targeted measurements at interesting special categories of Websites such as phishers, blogs, typosquatters, and startup company Websites. Differences with real flash-crowds. One of the key emphasis of our work is that we use a mini-flash crowd that differs significantly from a real flash crowd. The key difference is that we run the measurements under a controlled setup. Thus, the requests from the MFC experiment appear like normal requests, except that they have ability to measure performance tipping points. We explicitly ensure that the target does not face a sudden surge in load unlike a real flash crowd. This implies that the target Website does not enter a panic mode of operation and thus skew the experiment results.. Multi-server Websites. Our current infrastructure assumes that a single IP address corresponds to a single physical host and the response times are measured under this assumption. This assumption does not hold for Websites that use certain load balancing techniques (e.g., using DNS redirects or IP anycast) in the server backend, or use a distributed deployment of servers (e.g., CDNs). The MFC approach can still be used to identify how such servers react to realistic flash-crowd scenarios; however identifying specific hardware bottlenecks becomes harder when the Websites use reactive load balancing techniques.. Security Implications. The presence of a public MFC infrastructure raises a concern that the approach can be exploited to launch targeted attacks with maliciously crafted request patterns to servers. However, we note that the MFC service will be applied in a restricted manner with access controls and the experimental parameters chosen to ensure the non-intrusiveness of the experiments.. Implementation inefficiencies vs. Performance prediction. At a high-level, we would like the MFC setup to achieve two goals. First, we want to identify (to some approximation) implementation inefficiencies and resource bottlenecks in a Web server infrastructure. Second, we want to provide a framework for Web site administrators to predict the performance under heavy load. While our initial design, measurement and validation experiments confirm the former goal, the latter goal requires that the setup be able to provide a full load-response curve. We plan to explore performance prediction in future work.. Implications for Administrators. Ultimately, the MFC measurements have to be translated into meaningful suggestions for network operators. For example, if a few small queries cause problems then they need to fix query lookups; if large objects are causing early keel-over they need to either break them up or pre-cache etc. We are currently working on providing a systematic framework for operators to debug Website performance. Web server benchmarking tools [6, 11, 3, 10] range in sophistication. Some emulate multiple user sessions, create client requests for dynamic content and emulate several "standardized" workloads for e-commerce and regular Web browsing scenarios. Controlled emulation is done in a laboratory setting using average inter-arrival times, number of clients, and rate of requests derived from measurements taken at real Web servers. Benchmarks are used to stress test a server by running multiple clients in parallel where both clients and server are on the same LAN. MFCs use clients across the wide-area Internet generating more representative results. MFC's targeted requests exercise specific server resources in a controlled way yielding detailed and fine-grained observations.. Early work on flash crowds [9] proposed server-side heuristics to distinguish flash crowds and DDoS attacks. Chen et. al identify flash crowds by examining performance degradation in responses from a Website [7] . These techniques are useful to identify when a server is experiencing extreme load but MFCs accurately pin-point the request volume at which the server's response time begins to show perceptible degradation.

O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O B I O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Embedding finite automata within regular expressions Abstract. Regular expressions and their extensions have become a major component of industry-standard specification languages such as PSL/Sugar ([2]). The model checking procedure of regular expression based formulas, as well as of many LTL and CTL formulas, involves constructing an automaton which runs in parallel with the model. In this paper we re-examine this construction. Instead of directly translating a regular expression into an automaton, as traditionally done, we propose an algorithm which allows an intermediate representation mixing both regular expressions and automata. This representation can be thought of as plugging an automaton inside a regular expression, to replace an existing sub-expression. In order to be verified, the intermediate representation is then translated into another automaton, resulting in a set of automata running in parallel. A key feature of this algorithm is that the plug-in automaton is independent of the regular expression from which it originated, and thus can be used in several different properties. The contribution of our work is manyfold, as demonstrated in the paper. It allows modularity and flexibility of the automata construction, and can increase expressiveness when SEREs are mixed with CTL. In many cases it significantly reduces the size of the automata built for formulas, thus reducing the overall run time of verification. Symbolic model checking has been found extremely efficient in the verification of hardware designs, and has been widely adopted in industry in recent years. While traditional model checkers ( [13] ) used the temporal logics CTL or LTL as their specification language, contemporary industrial languages, have sought ways to make the specification language easier to learn and use. The industry-standard language PSL/Sugar [2], as well as other industry oriented languages (e.g. ForSpec [4] ), augment the logic with the use of Extended Regular Expressions (EREs or SEREs, using the formulation of [2]). 1 SEREs are a convenient means to describe a sequence of Boolean events which may constitute a behavior of the model. For example, the formula ϕ = {req·¬ack * ·ack}! asserts that on all execution paths of the model, req is active on the first cycle, ack is then inactive for zero or more cycles, and then ack becomes active. Similarly, regular expressions can be used to describe an undesireable behavior of the model. The formula not {req·¬ack * ·ack}! asserts that there does not exist an execution path on which We have revisited the translation of extended regular expressions (SEREs) into an automaton, a translation the vast majority of the specifications verified using the IBM model checking tool-set RuleBase [5] go through. We have presented an embedding algorithm, which allows an automaton to be embedded into a SERE. Thus, instead of producing one automaton per formula, the translation using embedding may consist of several automata, running in parallel with the model. An important feature of this algorithm is that the auxiliary automata built are independent of the original SERE, and thus can be used more than ones. Various applications of the embedding algorithm were given, each of which benefits from it in a different way. For named sequences, the embedding algorithm allows reuse of the automata code. For intersection, the use of embedding allows us to enjoy the same NFA construction, avoiding the need to unwrap at the SERE level or to intersect at the automata level. For counters we manage to reduce the size of the automata built for the formula, and for CTL translation we extend the expressive power of the language. The variability of these applications demonstrates its potential, and suggests, we believe, that more applications may be found for it.. Automata for SERE formulas are sometimes used as checkers for simulation [1] . For that purpose, the automaton must be deterministic. Since the embedding algorithm relies strongly on the non-deterministic nature of the side-NFA (the side-NFA can start at any cycle), it should be carefully examined whether the embedding algorithm performs well for simulation checkers, as it does for model checking.

B B I O O O O O O O O O O O O O O O O O O O O O O O B I O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B I


Hybrid state approach for modelling electrical and mechanical systems Abstract--Many engineering systems contain discrete components or decision makers as well as continuous dynamical components. The variables in these systems can be quantitatively represented by discrete and continuous states. These states affect each other in the system. These types of complex systems can be modelled by hybrid state systems. In this study, a hybrid state approach is presented to model electrical and mechanical systems. Two representative examples, which can not be directly modelled by the nonlinear system approach, are provided to demonstrate the effectiveness of the hybrid state approach in modelling. (~) Classical modelling of physical systems relies on differential-difference type equations. However, often systems have both discrete and continuous quantities in them or contain logical quantities or discrete decision makers. These discrete and continuous parts affect each other and work together. A realistic model of physical systems involves the combination of systems with continuous variables and variables which assume values in a finite set. These combined systems are called hybrid systems.. In this paper, modelling and analysis of electrical and mechanical systems possibly including gates, flip-flops, relays, dynamic or static components and mechanical parts, hysteretic effects, and sensors are considered based on hybrid state approach. In modelling and analysis, classical methods become insufficient because they only treat discrete or continuous parts separately. In the hybrid state system formulation, on the other hand, discrete and continuous dynamics are considered together, and analysis methods are developed especially for this composite system.. In literature, many hybrid system models have been introduced (see [1] [2] [3] [4] [5] [6] [7] [8] [9] and references therein). The main objective for the study of hybrid systems is to understand, analyze, design, and control such a mixed structure of dynamics with discrete and continuous values or states. Many researchers model hybrid systems as a combination of continuous state and discrete event systems with interfaces between the continuous and discrete parts. Although such models can represent a very broad range of systems, the analysis and design produce many difficulties. In hybrid state approach, similar to classical modelling of nonlinear systems in the state space, we consider a (mixed) state variables approach for hybrid systems. This type of formulation is helpful in the analysis and design, and, does not limit the modelling power.. We call systems where the state variables can assume only a finite, discrete set of values discrete state systems (DSS) and systems with only continuous states continuous state systems (CSS). We study a model of hybrid state systems (HSS) as a combination of discrete state and continuous state systems ( [2] [3] [4] [5] [6] ).. The following exposition is planned for the present paper. In Section 2, models of hybrid state systems are introduced. In Section 3, analysing the hybrid state systems is explained. In Section 4, two representative examples in the field of electrical and mechanical systems are handled using the hybrid state approach. Concluding remarks are given in Section 5. A systematic way is presented to model dynamical systems which have both discrete and continuous states using the hybrid state modelling approach. A method of analysis in the hybrid state space is provided. By partitioning the continuous state space into proper regions, effective dynamics for each region is defined. In this way, the analysis is carried out in a much simpler way, and one can properly understand and analyze the behaviours of the hybrid state systems. Therefore this helps in the design and validation of those systems. Two distinctive examples are presented to demonstrate the systematic modelling and analysis of electrical and mechanical systems with this approach. In the first example, both discrete and continuous circuit components function together. In the second example, which is a mechanical system, proximity sensors are used as discrete decision makers. As observed from these examples, a regular nonlinear system modelling is not sufficient for some dynamical systems, especially, if these systems have discrete components, decision makers, memory or hysteretic effects. For such systems, hybrid state modelling is very beneficial.

O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O


Axial and off-axial dynamic transitions in uniaxially anisotropic Heisenberg ferromagnet: A comparison Uniaxially anisotropic Heisenberg ferromagnet, in presence of a magnetic field varying sinusoidally in time, is studied by Monte Carlo simulation. The axial (field applied only along the direction of anisotropy) and off-axial (field applied only along the direction which is perpendicular to the direction of anisotropy) dynamic transitions are studied. By studying the distribution of dynamic order parameter component it is observed that the axial transition is discontinuous for low anisotropy and becomes continuous in high anisotropy. The off-axial transition is found to be continuous for all values of anisotropy. In the infinite anisotropy limit, both types of transitions are compared with that observed in an Ising ferromagnet for the same value of the field and frequency. The infinitely anisotropic axial transition and the dynamic transition in the Ising ferromagnet occur at different temperatures whereas the infinitely anisotropic off-axial transition and the equilibrium ferro-para transition in the Ising model occur at same temperature. The nonequilibrium dynamical phase transition in magnetic model systems has become an interesting field of research in last decades [1, 2] . Extensive Monte Carlo simulation yields some interesting new results in the Ising model [1] . These studies [1, 2, 3] were able to establish the significant features of nonequilibrium phase transitions having similarities with well known equilibrium phase transitions.. However, the Ising model is a special case of general magnetic model, for example, the Heisenberg model. The Heisenberg model (with ferromagnetic interactions) having uniaxial anisotropy has some general properties which cannot be found in Ising model. But in the limit of infinite anisotropy, the Heisenberg model can be mapped into Ising model [4] . So, the natural expectation is, the Heisenberg model with uniaxial anisotropy can be studied to have the detailed and general microscopic view and the results can be checked in the limit of infinite anisotropy (which will give the results in Ising model). In this case of dynamic transitions, mainly in the magnetic model system in presence of a magnetic field oscillating sinusoidally in time, the Heisenberg model can serve a better role than an Ising model. It would be quite interesting to know the dynamic response of uniaxially anisotropic Heisenberg model in presence of a magnetic field applied in different directions. On the other hand, there is another advantage. The results obtained in the Ising model is well established [1] . These results can be used to check the results obtained in Heisenberg model by approaching the limit of infinite anisotropy. This prompted to study the dynamic transition in Heisenberg model with uniaxial and single-site anisotropy. Recently, the dynamic transition was studied [5] in the uniaxially anisotropic ferromagnetic Heisenberg model and very interestingly it was observed that the dynamic symmetry of the order parameter component (along the anisotropy direction) can be broken in presence of a magnetic field applied along the direction which is perpendicular to the direction of anisotropy. This transition was named as off-axial transition. The transition is found to be continuous and the transition temperature increases as the strength of anisotropy increases.. So, the questions naturally arise what would be the difference in the dynamic transitions in presence of a field applied only along the direction of anisotropy ? How the symmetry breaking takes place ? What would be the nature (continuous or discontinuous) of the transition ? More interestingly, what would happen in infinite anisotropic case and in the Ising case ? To get the answers of these questions, the dynamic transitions in presence of the axial field (i.e., the magnetic field applied only along the direction of anisotropy) and the off-axial field (i.e., the magnetic field applied only along the direction which is perpendicular to the direction of anisotropy) are studied in this paper by Monte Carlo simulation using Metropolis rate. Also, a comparison between axial and off-axial transitions has been made and the results (in the limit of infinite anisotropy) for both cases are compared with that observed in the Ising model.. The uniaxially anisotropic Heisenberg model (with ferromagnetic interaction) is introduced and explained in section 2. The Monte Carlo simulation technique is discussed in the section 3. The numerical results are reported in the next section and the paper ends with a concluding remarks in section 5.

O O O O O O O O B I O O O O B I O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O


Scientific collaboration dynamics in a national scientific system Abstract This paper examines the collaboration structures and dynamics of the coauthorship network of all Slovenian researchers. Its goal is to identify the key factors driving collaboration and the main differences in collaboration behavior across scientific fields and disciplines. Two approaches to modelling network dynamics are combined in this paper: the small-world model and the mechanism of preferential attachment, also known as the process of cumulative advantage. Stochastic-actor-based modelling of coauthorship network dynamics uses data for the complete longitudinal co-authorship networks for the entire Slovenian scientific community from 1996 to 2010. We confirmed the presence of clustering in all fields and disciplines. Preferential attachment is far more complex than a single global mechanism. There were two clear distinctions regarding collaboration within scientific fields and disciplines. One was that some fields had an internal national saturation inhibiting further collaboration. The second concerned the differential impact of collaboration with scientists from abroad on domestic collaboration. Scientific collaboration in modern science appears to be one of the key factors for increasing publication productivity and quality. Ziman (1994, p. 218) wrote: ''… the traditional parochial individualism of science is rapidly being transformed in what might be described as transnational collectivism''. In recent decades, structural changes appearing in science have encouraged scientific collaboration. Specialization at the individual level and the development of very sophisticated and expensive research equipment support collaboration. The development of information and communication technology and increased possibilities for the mobility of researchers also have positive effects on scientific collaboration. Another very important driver of such collaboration is research financing policy. For example, since the EU Framework Programmes (FP) were established in 1984, intra-European collaboration has increased significantly. In addition, the FP Horizon 2020 initiative for research and innovation strongly encourages scientific collaboration.. Scientific collaboration has been studied systematically since the 1960s. Different qualitative and quantitative approaches have been used to study scientific collaboration including interviews, observations, surveys, bibliometric analyses, social network analysis and simulations (e.g., Shrum and Mullins 1988; Shrum et al. 2007 ). The most commonly used approach is the bibliometric analysis of scientific co-authorship networks as the data can be easily and accurately extracted from publication databases (Pike 2010) , albeit after considerable cleaning.. Co-authorship networks and citation networks are very useful instruments for studying collaboration in science. Both have positive impacts on scientific productivity. In earlier bibliometric approaches, several studies focused on co-authorship in the social or natural sciences, but very few included comparisons between different scientific disciplines (De Stefano et al. 2011) . Scientific disciplines still represent a crucial institutional and organizational framework within which scientific activities take place. They are seen as distinct intellectual and social organizational contexts having their own norms and values forming disciplinary cultures which have evolved over time to create an ever more complicated scientific domain ). There are several international, national, and informal classifications of scientific disciplines. Since we analyzed the co-authorship networks of the Slovenian scientific system, we started with the classification into scientific fields and scientific disciplines used by the Slovenian Research Agency (henceforth: ARRS), the main policy authority in Slovenian science. It is presented in Table 1 together with the number of scientific disciplines assigned to each scientific field. The seventh scientific field (Interdisciplinary studies) never gained full recognition as a separate field in the research and development (R&D) policy context in Slovenia because R&D policy remained conservative concerning interdisciplinary-oriented research despite it having increased dramatically around the world. As a result, we ignored it in our analyses of coauthorship network dynamics.. According to analyses of the collaboration styles of researchers belonging to different scientific disciplines and fields, co-authorship represents an important differentiating indicator between them. The differences in the percentages of co-authored publications among the seven scientific fields in Slovenia are shown in Fig. 1 . There is a large gap between the average levels of co-authorship in the natural, technical, medical and biotechnical sciences, and the average co-authorship levels in the humanities and the social sciences. While six trajectories show a steady rise during 1996-2010, the trajectory for Interdisciplinary studies had considerable instability. The humanities and the social sciences had the smallest shares of co-authored publications throughout this period. However, the trend for the social sciences shows that it is slowly approaching the natural, technical, medical, and biotechnical sciences.. Slovenian researchers have studied scientific collaboration using a qualitative approach, survey analysis and bibliometric analysis of co-authorship networks using longitudinal data on the Slovenian science system in order to explore and explain their dynamics across four scientific disciplines (Ferligoj and Kronegger 2009; Mali et al. 2010 ; Kronegger et al. 2011, 2012; Groboljšek et al. 2014; Iglič et al. 2015) . The rationale for their selection of four disciplines was: (1) mathematics is an old discipline where research takes place primarily in offices; (2) physics is an old discipline where the research occurs mostly in research groups within laboratories; (3) sociology is an old discipline where research also occurs mostly in offices; and (4) biotechnology is a new laboratory discipline. The bibliometric analysis of co-authorship networks for the period from 1986 to 2005 revealed: (1) a high proportion of single-author publications within sociology and within mathematics with lower but slightly increasing levels of co-authored publications and (2) high and relatively steady levels of collaboration by physicists and biotechnologists within their disciplines and/or with authors from abroad. The high degree of scientific collaboration in laboratory sciences is coupled to a more formal division of labor. Biotechnologists in Slovenia were characterized by collaboration with researchers from other disciplines within the country, although with much greater fluctuations than in the other disciplines (Kronegger et al. 2012) . A web survey of researchers from the four scientific disciplines was designed to understand which kinds of incentives, perceptions, and personal strategies help account for collaboration from the perspectives of individual scientists (Iglič et al. 2015) . The results of the analysis showed that the differences between disciplines in the proportion of researchers active work time spent collaborating with others were much smaller when assessed through interviews compared to results from co-authorship data. Researchers in the social sciences do not necessarily collaborate less as the attributions of authorship are different in the social and natural sciences. Disciplines vary according to the nature of collaboration partners. Physicists and mathematicians from the basic sciences have much wider and far-reaching collaboration networks than sociologists or biotechnologists from applied sciences. The extensive collaboration networks of biotechnologists seem to be more limited and focused on local partners.. Disciplines differ also in their overall styles of collaboration, ranging from very informal to formal. For the former, this is due to an established division of labor within an organizational setup with clearly defined roles. Such formal arrangements are far less prevalent in the latter disciplines. Informal collaboration occurs outside an explicit organizational division of labor. The extreme form is when researchers collaborate on their own volition (see Shrum et al. 2007 ). Iglič et al. (2015) also identified the main factors driving collaboration at two levels: research-policy-related external factors and internal factors affecting the motivations of scientists regarding compatibility, cultural proximity, academic excellence, position and status. Scientists are more likely to collaborate when there are more opportunities to obtain research money, when they easily overcome status differences between senior and junior colleagues, and have a high level of agreement about what constitutes good quality research. They also collaborate more when they have a positive experience with earlier collaborations when they experience benefits from collaboration including good research results and faster individual promotion. Also, they pay attention to professional complementarity when choosing research partners.. For an even more detailed analysis of collaboration practices, a qualitative investigation among key representatives of the four scientific disciplines and research policymakers was conducted to gain an insight into their views on the importance of scientific collaboration (Groboljšek et al. 2014) . While the policy mechanisms aiming to encourage scientific collaboration are important, the interviewed scientists and policymakers believed that longterm and successful collaborations derive from researcher's efforts and their individual engagements-but only where suitable conditions have been created by policy mechanisms which encourage international mobility, along with interdisciplinary and interinstitutional/ intersectoral collaboration. Kronegger et al. (2012) combined two approaches for modelling co-authorship network dynamics. They used the small-world model (Watts and Strogatz 1998) and the mechanism of preferential attachment, also known as the process of cumulative advantage (Price 1963 (Price , 1965 Garfield and Merton 1979) . One dimension of the small world was measured by its clustering level, and preferential attachment was operationalized through the collaboration of researchers within and across disciplines. They used stochastic-actor-based modelling (SAOM) of co-authorship network dynamics implemented in the SIENA program (Snijders 2005; Snijders et al. 2010) . While the presence of clustering was confirmed in all four scientific disciplines, preferential attachment was more complex than one single global mechanism. The principle of preferential attachment was only partly confirmed in the coauthorship network of physicists: researchers had fewer possibilities to establish new connections with other physicists within the Slovenian scientific community. This can be the consequence of the saturation of the network where scientific work is organized within the formalized environments around expensive and complicated technical research equipment (e.g., in laboratories). The co-authorship network of mathematicians indicated different characteristics: those scientists who collaborated with scientists outside the Slovenian community and had a higher number of articles published in journals with an impact factor had greater opportunities to establish new connections within the Slovenian mathematical community. In the case of the co-authorship networks of sociologists, collaboration with foreign scientists brought negative effects for collaboration within the national research community. At the same time, the number of articles with an impact factor had a positive effect on the formation of new co-authorship relationships within the discipline. The dynamics of biotechnologists co-authorship networks did not follow the principle of preferential attachment.. Here, based on the modelling of co-authorship network dynamics in four scientific disciplines (Kronegger et al. 2012) we specify the SAOM in a more appropriate fashion and use higher quality bibliometric data for the complete longitudinal co-authorship networks for all scientific fields and most scientific disciplines for 1996-2010 in the Slovenian system of science. The first hypothesis about the presence of clustering as a dimension of a small-world structure was confirmed emphatically. The evidence regarding the second hypothesis concerning preferential attachment as the driving mechanism of co-authorship was decidedly mixed. Yet, in the main, our results contradict the hypothesis of a single preferential attachment mechanism for the formation of collaborative ties. The current number of co-authorships inside the field or discipline has a negative effect on new tie formation in all scientific fields and nearly all scientific disciplines. Our results show the distance between researchers who collaborate matters also. Regarding this, the social sciences and humanities differ from the other four fields. Alters higher degree of collaboration outside of Slovenia has a negative effect on new tie formation in the social sciences and humanities but a positive effect in the other fields. A high degree of collaboration outside the national disciplinary field, a revised notion of preferential attachment, has a positive impact on tie formation for the natural, technical, medical and biotechnical sciences. Clearly, preferential attachment mechanisms are more subtle than can be summarized by stating that researchers who currently have a large number of co-authors will see an increase in their number of collaborators, at least for the science dynamics in smaller national scientific systems.. Another difference between the social sciences and the humanities compared with the other four fields is that publication excellence had a positive effect on the formation of collaborative ties in the social sciences and humanities but a negative effect in the other fields. However, the standard hypothesis that young researchers form new co-authorship ties with scientifically excellent older scientists was not confirmed. Researchers from all fields but the humanities were more likely to form new ties with younger colleagues. The third hypothesis was confirmed and the evidence demonstrates that the scientific fields and disciplines are affected by the organization of local institutions and publishing cultures. Overall, most of the results of Kronegger et al. (2012) were confirmed with the differences attributable to using better data containing more scientists, considering many disciplines and using a more complex and realistic SAOM specification. We note that our findings regarding the effects of small-world phenomena, preferential attachment, institutional arrangements hold for virtually all disciplines as well as for broad fields.. The differences between the two basic pools of scientific knowledge (i.e., between the natural and technical sciences, and the social sciences and humanities) according to the mechanism of preferential attachment are also the result of contextual (research policy) factors operating in Slovenia. In the former socialist era, due to ideological pressure on the social sciences and the humanities, these disciplines were less internationalized and much less oriented to publishing in highranking international journals. After the dramatic changes starting at the beginning of the 1990s, Slovenian R&D policy gradually began to introduce the criteria of (international) excellence into R&D evaluation procedures. In the first years after Slovenia's independence, governmental institutions created many initiatives, including legislation, to establish the new country including those relating to science. It seems that in adapting to the more demanding R&D evaluation criteria there were different impacts on the social sciences and humanities compared to the other fields. In part, this helps account for some of the differences between the two groups of fields. Yet, those social scientists and humanists who already engaged in excellent publication activity can be very attracted to research collaboration with their disciplinary colleagues. Generally speaking, the results of our bibliometric analysis showed that we cannot solely explain the differences in forming co-authorship ties in different parts of sciences with internal (epistemological) factors, but that also external (R&D policy) factors are involved. No single approach, be it sociological, social network analytic or based on conceptions drawn from physics, can be useful by itself. Multiple approaches are needed to account for the complex phenomenon of scientific collaboration, especially for national scientific systems. While science can be viewed as a general phenomenon it is also conditioned by local institutional contexts. Table 6 Estimated parameters for scientific disciplines according to the importance coefficients The preferential mechanism described by Barabási and Albert (1999) focuses on the formation of co-authorship ties as new nodes enter the network. It appears that, in their analyses, such ties remain in the network, which may be problematic in the case of coauthorship networks.Yet, scientists collaborating at one point in time can maintain or dissolve their co-authorship tie at a later time. Consequently, we considered the possibility that ties can be created, maintained or deleted since this is a feature that characterizes coauthorship networks. This was a major reason for our use of Stochastic Actor-Oriented Model (SAOM; /citealtsnijders2001, snijders2008), a micro-level model assuming that ties can be created and deleted in a network with an actor set that may be constant or changing. The probabilities of tie creation and deletion depend on so-called effects (explanatory variables that may depend on the network or be exogenously given), with their associated coefficients as parameters. The set of effects chosen as the model specification followed from the hypotheses as elaborated in the preceding section. 5 The clustering level was operationalized by the parameter for transitive triads to capture the tendency of actors to form ties by closing the triangles, and by the parameters 'working in the same research organizational group' and 'working in the same scientific discipline'. The last two are a better operationalization of the institutional feature of the clustering level than the one used in the study by Kronegger et al. (2012) . Preferential attachment was operationalized by five effects: degree of alter inside the co-authorship network, degree of alter with respect to collaboration with researchers outside the co-authorship network, scientific excellence, scientific age, and age similarity. Gender (male = 1) and having a PhD (having PhD = 1) were also included in the model as controls. The network was defined in three consecutive observations corresponding to the periods mentioned in Sect. 4, and a tie was defined if two researchers appeared together as authors in at least one publication. Table 6 ) . The first three parameters in the tables are standard as they a technical requirements of the stochastic-actor-based model: the rate parameter for the first transition; the rate parameter for the second transition, and the density parameter. The two rate parameters estimate the average frequency of the number of proposals for collaboration, which then may be accepted or rejected by the proposed partner within the co-authorship networks. In all scientific fields, the average number of proposals for collaboration for the second transition is higher than for the first transition. This is not the case in all scientific disciplines considered (see Table 6 ): 12 out of 49 considered disciplines had declines in their averages in the second transition compared to the first one. Using SAOM includes also an estimate of the cost of adding one more tie to the personal network of each researcher is obtained, an important characteristic seldom considered by scholars studying preferential attachment. This value is given by the third basic parameter (degree). 6 Estimates of the parameters for the degree effect are negative for all six scientific fields and all scientific disciplines. This makes sense because tie formation incurs costs in terms of time, effort, and resources. Researchers can co-author with only a limited number of different authors as each new tie represents an additional time and cost burden.

B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O B I O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B I O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O B I O O O O O O O O O O O O O O O O O O B I O O O B O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O B I O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O