Title: A Pragmatic View of Model of Computation
1A Pragmatic View of Model of Computation
- Xinping Zhu, Wei Qin
- Princeton University
- 11/1/2000
2What is a model of computation?
- What is computation?
- Java Applet running on a web browser
- Baseball Game
- state players on base, score, count
- action pitch, swing
- Protein Synthesis
- input DNA
- output protein transcribed from gene in
DNA - Human Perception
- input 3D object
- output internal representation of object
3What is a model of computation? (continued)
- What is computation formal way ?
- A computation is a specification for
transformation of one instance set of data
structures or objects to some other instance set
of data structures or objects. - A computation is a process which leads to
satisfaction of a set of constraint specification
. - A computation is an ordered sequence of execution
of a (possibly dynamic) set of primitive units of
computation. - Computation is a recursive and hierarchical
concept. A computation may be primitive in one
view and composed in another view.
4What is a model of computation?(continued)
- What is model of computation (MOC)?
- A formal, abstract definition of a computer.
- Law of physics of concurrent components
- Ontology what they are
- Protocols how they communicate
- Epistemology what information they share
- A formal representation of concurrency Edward.
Lee - E.g.
- DE,CT,CSP,PN,DDE,S/R,SDF,FSM,PS
- References
- Edward A. Lee, Embedded Software An Agenda
for Research, UCB ERL Memorandum M99/63. -
5The Actor Model of Computation
- An actor is a reactive entity. In response to a
message, - an actor can
- Create a new actor,
- Send a message to an acquaintance actor, or
- Change its internal behaviour.
- Actors have unique mail addresses.
- Messages (potential method invocations) are
buffered in a mailbox. - Actors communicate only via asynchronous message
passing. - In the actor model, there is guaranteed message
delivery.
Ref. Gul A. Agha. Concurrent Object-Oriented
Programming''. Communications of the ACM,
33(9)125-141, Sep 1990.
6Actor
The actor model or paradigm was created by Carl
Hewitt of MIT in the early 1970s, but the
work on the Actor concurrency model is largely
due to Agha.
Extension of the concept of objects to concurrent
computation.
Problem Hierarchy
7MOC in Parallel Computation
- Parallel Random Access Machine (PRAM)
- If there is one model of parallel computation
which stands out from the rest as being
reasonably widely accepted, it is PRAM. - It merely consists of a number of processes
sharing a global random access memory, reading
data from it, writing data to it and performing
local computations. All processors perform one of
these operations at a time in lock-step
synchrony. - Difficulty
- Inherently unrealistic model Synchronize every
step - Performance penalty
- Alternative Hierarchical PRAM, Bulk-Synchronous
Parallel(BSP)
8More Models of Computation
- Domain of Embedded Software
- Using special domain specific knowledge. E.g. air
flight control,DSP - Considering time in a model of computation is
always cumbersome which tends to be ignored. - Real-time system put a more serious challenge on
current software development. - More efforts are put on the exploitation of
inherent parallelism both in computer
architecture and software which means more
understanding of the model of concurrency.
9Continuous Time (CT)
- Components communicate via time continuous
functions. Used for analog circuitry,
interactions with sensors and actuators and other
physical systems
10Synchronous/Reactive Models (S/R)
- Global clock defines discrete points at which
signals may have values - Components respond to inputs
- Esterel an example implementation
- Example specification Emit output Received both
as soon as signals A and B have occurred. Reset
when there is a reset signal. - example from ftp//ftp.esterel.org/esterel/pub/pap
ers/primer.pdf
11Discrete Event Models
- Events communicate the value of a variable with a
time stamp - No global clock, but globally consistent concept
of time - Distributed DE model
- Events communicate the value of a variable with a
connection-specific time stamp - The local time of an actor is the minimum of the
time on input connections
x 0 at t 0 x 1 at t 5 x y/x at t 12
y 0 at t 0 y 1 z at t 4 y x z at t
9 y x z at t 15
z 0 at t 0 z 1 at t 3 z 8 - x at t
14
12MoC Cycle Driven Models
- A simplified case of DE
- Each component has a clock
- Computations occur in a component at each clock
cycle (i.e. like discrete events, but
computations occur at regular intervals)
13Synchronous Message Passing
- Components are processes (a process is a series
of operations) - Processes communicate with instantaneous
transactions - When two processes communicate, the first to be
ready will stall until the other is ready - E.g. resource sharing of hardware functional
units, such as a multiplier
14Asynchronous Message Passing
- Components are processes
- Processes communicate via channels that can
buffer the messages - Sender doesnt have to wait for receiver to be
ready - MoC Process Networks(PN) asynchronous message
passing where input sequences are mapped into
outputs by processes - Dataflow models processes constructed out of
process networks - Adding time in PN using timestamp in messages
15Questions
- Where is our stand in Model of Computation?
- Is it always better to think more formally than
more Ad-hoc? - Do we need a new model of computation?
- Where is the pragmatic point of view in model of
computation? -