+ All Categories
Home > Science > A Distributed Simulation of P-Systems

A Distributed Simulation of P-Systems

Date post: 02-Aug-2015
Category:
Upload: apostolos-syropoulos
View: 37 times
Download: 3 times
Share this document with a friend
Popular Tags:
43
A Distributed Simulation of P-Systems A Syropoulos, EG Mamatas, PC Allilomes and KT Sotiriades Research Division Araneous Internet Services Xanthi, Greece E-mail: [email protected] – p. 1/14
Transcript
Page 1: A Distributed Simulation of P-Systems

A Distributed Simulation of P-Systems

A Syropoulos, EG Mamatas, PC Allilomes and KT Sotiriades

Research Division

Araneous Internet Services

Xanthi, Greece

E-mail: [email protected]

– p. 1/14

Page 2: A Distributed Simulation of P-Systems

The core of our work

A simulation of P-systems.

– p. 2/14

Page 3: A Distributed Simulation of P-Systems

The core of our work

A simulation of P-systems.

Simulation: Representation of the operation or featuresof one process or system through the use of another.

– p. 2/14

Page 4: A Distributed Simulation of P-Systems

The core of our work

A simulation of P-systems.

Simulation: Representation of the operation or featuresof one process or system through the use of another.

We represent only P-systems that are members of thefamily NOP2(coo, tar).

– p. 2/14

Page 5: A Distributed Simulation of P-Systems

The core of our work

A simulation of P-systems.

Simulation: Representation of the operation or featuresof one process or system through the use of another.

We represent only P-systems that are members of thefamily NOP2(coo, tar).

And we used Java’s Remote Method Invocation for therepresentation.

– p. 2/14

Page 6: A Distributed Simulation of P-Systems

What are P-Systems?

An abstract model of computation that is inherentlyparallel.

– p. 3/14

Page 7: A Distributed Simulation of P-Systems

What are P-Systems?

An abstract model of computation that is inherentlyparallel.

A foundation for distributed computing.

– p. 3/14

Page 8: A Distributed Simulation of P-Systems

Tools for Distributed Programming

Two basic ways to implement a distributed algorithms:

A purely distributed platform or

Some network protocol to connect a number ofnodes that interchange data.

– p. 4/14

Page 9: A Distributed Simulation of P-Systems

Tools for Distributed Programming

Two basic ways to implement a distributed algorithms:

A purely distributed platform or

Some network protocol to connect a number ofnodes that interchange data.

But. . . distributed operating systems (e.g., Plan-9) arenot widely available, in general.

– p. 4/14

Page 10: A Distributed Simulation of P-Systems

Tools for Distributed Programming

Two basic ways to implement a distributed algorithms:

A purely distributed platform or

Some network protocol to connect a number ofnodes that interchange data.

But. . . distributed operating systems (e.g., Plan-9) arenot widely available, in general.

Fortunately, all modern general purpose operatingsystems provide the necessary network capabilitiesthat can be utilized to create distributed applications.

– p. 4/14

Page 11: A Distributed Simulation of P-Systems

Tools for Distributed Programming

Two basic ways to implement a distributed algorithms:

A purely distributed platform or

Some network protocol to connect a number ofnodes that interchange data.

But. . . distributed operating systems (e.g., Plan-9) arenot widely available, in general.

Fortunately, all modern general purpose operatingsystems provide the necessary network capabilitiesthat can be utilized to create distributed applications.

– p. 4/14

Page 12: A Distributed Simulation of P-Systems

Tools for Distributed Programming

Two basic ways to implement a distributed algorithms:

A purely distributed platform or

Some network protocol to connect a number ofnodes that interchange data.

But. . . distributed operating systems (e.g., Plan-9) arenot widely available, in general.

Fortunately, all modern general purpose operatingsystems provide the necessary network capabilitiesthat can be utilized to create distributed applications.

– p. 4/14

Page 13: A Distributed Simulation of P-Systems

Network Protocols

Distributed algorithms are implemented:

As a peer-to-peer or

A client-server architecture.

– p. 5/14

Page 14: A Distributed Simulation of P-Systems

Network Protocols

Distributed algorithms are implemented:

As a peer-to-peer or

A client-server architecture.

Sockets: pros and cons

The fundamental tool for the implementation ofTCP/IP networking applications.

Peer-to-peer applications require a (new) networkprotocol for data exchange.

– p. 5/14

Page 15: A Distributed Simulation of P-Systems

Network Protocols

Distributed algorithms are implemented:

As a peer-to-peer or

A client-server architecture.

Sockets: pros and cons

The fundamental tool for the implementation ofTCP/IP networking applications.

Peer-to-peer applications require a (new) networkprotocol for data exchange.

Java’s Remote Method Invocation: A solution to ourproblem!

– p. 5/14

Page 16: A Distributed Simulation of P-Systems

Network Protocols

Distributed algorithms are implemented:

As a peer-to-peer or

A client-server architecture.

Sockets: pros and cons

The fundamental tool for the implementation ofTCP/IP networking applications.

Peer-to-peer applications require a (new) networkprotocol for data exchange.

Java’s Remote Method Invocation: A solution to ourproblem!

– p. 5/14

Page 17: A Distributed Simulation of P-Systems

Network Protocols

Distributed algorithms are implemented:

As a peer-to-peer or

A client-server architecture.

Sockets: pros and cons

The fundamental tool for the implementation ofTCP/IP networking applications.

Peer-to-peer applications require a (new) networkprotocol for data exchange.

Java’s Remote Method Invocation: A solution to ourproblem!

– p. 5/14

Page 18: A Distributed Simulation of P-Systems

Network Protocols

Distributed algorithms are implemented:

As a peer-to-peer or

A client-server architecture.

Sockets: pros and cons

The fundamental tool for the implementation ofTCP/IP networking applications.

Peer-to-peer applications require a (new) networkprotocol for data exchange.

Java’s Remote Method Invocation: A solution to ourproblem!

– p. 5/14

Page 19: A Distributed Simulation of P-Systems

Network Protocols

Distributed algorithms are implemented:

As a peer-to-peer or

A client-server architecture.

Sockets: pros and cons

The fundamental tool for the implementation ofTCP/IP networking applications.

Peer-to-peer applications require a (new) networkprotocol for data exchange.

Java’s Remote Method Invocation: A solution to ourproblem!

– p. 5/14

Page 20: A Distributed Simulation of P-Systems

Java’s RMI in. . . detail

An object on one JVM can invoke methods on anobject in another JVM.

– p. 6/14

Page 21: A Distributed Simulation of P-Systems

Java’s RMI in. . . detail

An object on one JVM can invoke methods on anobject in another JVM.

The arguments of the remote method are “marshalled”and sent from the local JVM to the remote one, wherethey are are “unmarshalled.”

– p. 6/14

Page 22: A Distributed Simulation of P-Systems

Java’s RMI in. . . detail

An object on one JVM can invoke methods on anobject in another JVM.

The arguments of the remote method are “marshalled”and sent from the local JVM to the remote one, wherethey are are “unmarshalled.”

When the method terminates, the results aremarshalled from the remote machine and sent to thecaller’s JVM.

– p. 6/14

Page 23: A Distributed Simulation of P-Systems

Java’s RMI in. . . detail

An object on one JVM can invoke methods on anobject in another JVM.

The arguments of the remote method are “marshalled”and sent from the local JVM to the remote one, wherethey are are “unmarshalled.”

When the method terminates, the results aremarshalled from the remote machine and sent to thecaller’s JVM.

If for some reasons an exception is raised, theexception is indicated to the caller.

– p. 6/14

Page 24: A Distributed Simulation of P-Systems

The simulation

It is implemented in Java and makes heavy use of theJava’s RMI.

– p. 7/14

Page 25: A Distributed Simulation of P-Systems

The simulation

It is implemented in Java and makes heavy use of theJava’s RMI.

The system accepts an input file that describes aP-system.

– p. 7/14

Page 26: A Distributed Simulation of P-Systems

The simulation

It is implemented in Java and makes heavy use of theJava’s RMI.

The system accepts an input file that describes aP-system.

The simulation is distributed in the sense that anumber of objects execute code on different machineswhile they communicate.

– p. 7/14

Page 27: A Distributed Simulation of P-Systems

The simulation

It is implemented in Java and makes heavy use of theJava’s RMI.

The system accepts an input file that describes aP-system.

The simulation is distributed in the sense that anumber of objects execute code on different machineswhile they communicate.

One object pretends to be the basic compartment,while the others play the rôle of the internalcompartments.

– p. 7/14

Page 28: A Distributed Simulation of P-Systems

The syntax of the language

system = “system” “is”

alphabet “and”

structure “and”

rules “and”

data “and”

output “and”

maximum “and”

“end”

alphabet = “[” letter { “,” letter } “]”

structure = “[” { “[” “]” } “]”

rules = “{” setOfRules { “,” setOfRules } “}”

– p. 8/14

Page 29: A Distributed Simulation of P-Systems

The syntax of the language, cont.

setOfRules = “[” singleRule { “,” singleRule } “]”

singleRule = left “->” right

left = letter { letter }

right = replacement { replacement }

replacement = “(” letter [ “,” destination ] “)”

destination = “here” | “out” | in

in = “in” possitive-integer

data = “{” Mset { “,” Mset } “}”

– p. 9/14

Page 30: A Distributed Simulation of P-Systems

The syntax of the language, cont.

Mset = “(” { occurance } “)”

occurance = “[” letter “,” possitive-integer “]”

output = “output” possitive-integer

maximum = “maximum” possitive-integer

– p. 10/14

Page 31: A Distributed Simulation of P-Systems

Upon startup, all objects start sending multicast UDPpackets to a well-known multicast address.

– p. 11/14

Page 32: A Distributed Simulation of P-Systems

Details of the simulation

Upon startup, all objects start sending multicast UDPpackets to a well-known multicast address.

Each packet contains the IP address of each sender.

– p. 11/14

Page 33: A Distributed Simulation of P-Systems

Details of the simulation

Upon startup, all objects start sending multicast UDPpackets to a well-known multicast address.

Each packet contains the IP address of each sender.

Multicast packets are received by every objectparticipating in the “network.”

– p. 11/14

Page 34: A Distributed Simulation of P-Systems

Details of the simulation

Upon startup, all objects start sending multicast UDPpackets to a well-known multicast address.

Each packet contains the IP address of each sender.

Multicast packets are received by every objectparticipating in the “network.”

The main object knows which objects are alive, so itcan decide whether the computation can start.

– p. 11/14

Page 35: A Distributed Simulation of P-Systems

Details of the simulation, cont.

A universal clock is owned by the object that has therôle of the basic compartment.

– p. 12/14

Page 36: A Distributed Simulation of P-Systems

Details of the simulation, cont.

A universal clock is owned by the object that has therôle of the basic compartment.

Communication breakdowns are considered asexceptional situations and are treated accordingly.

– p. 12/14

Page 37: A Distributed Simulation of P-Systems

Details of the simulation, cont.

A universal clock is owned by the object that has therôle of the basic compartment.

Communication breakdowns are considered asexceptional situations and are treated accordingly.

Objects operate in parallel implementing the maximalparallelism requirement for this “simple” case.

– p. 12/14

Page 38: A Distributed Simulation of P-Systems

Gaining maximal parallelism

Initially, the simulator checks which rules are applicableand selects them.

– p. 13/14

Page 39: A Distributed Simulation of P-Systems

Gaining maximal parallelism

Initially, the simulator checks which rules are applicableand selects them.

Applicable rules with common elements on theirleft-hand side, are checked for the changes they causeto the system.

The “weight” of each side of a rule isequal to the number of elements, or 1 ifthere are no elements. The total “weight”of a rule is equal to the product of its two“weights.”

Only one rule is selected!

– p. 13/14

Page 40: A Distributed Simulation of P-Systems

Gaining maximal parallelism

Initially, the simulator checks which rules are applicableand selects them.

Applicable rules with common elements on theirleft-hand side, are checked for the changes they causeto the system.

The “weight” of each side of a rule isequal to the number of elements, or 1 ifthere are no elements. The total “weight”of a rule is equal to the product of its two“weights.”

Only one rule is selected!

The remaining rules are used in the actualcomputation.

– p. 13/14

Page 41: A Distributed Simulation of P-Systems

Future work

Reimplement the system using the SOAP protocol.

– p. 14/14

Page 42: A Distributed Simulation of P-Systems

Future work

Reimplement the system using the SOAP protocol.

Explore the foundational part of P-system.

– p. 14/14

Page 43: A Distributed Simulation of P-Systems

Future work

Reimplement the system using the SOAP protocol.

Explore the foundational part of P-system.

Design and implementation of a distributedprogramming language. . .

– p. 14/14


Recommended