0% found this document useful (0 votes)
51 views15 pages

Distributed Object Based Systems, Case Study

This document discusses distributed object-based systems and provides examples of Linda and Orca. Linda provides processes with a highly structured distributed shared memory using a tuple space that allows matching tuples. Orca is a parallel programming system that allows processes on different machines to communicate through shared data objects and forking. It guarantees atomic method calls and condition synchronization through guard evaluation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views15 pages

Distributed Object Based Systems, Case Study

This document discusses distributed object-based systems and provides examples of Linda and Orca. Linda provides processes with a highly structured distributed shared memory using a tuple space that allows matching tuples. Orca is a parallel programming system that allows processes on different machines to communicate through shared data objects and forking. It guarantees atomic method calls and condition synchronization through guard evaluation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

DISTRIBUTED OBJECT BASED

SYSTEMS, CASE STUDY


Distributed object based systems
• In many programming languages, data are organized into
• objects,
• packages,
• modules,
• other data structures
• each of which has an existence independent of the others.
• If a process references part of an object,
– in many cases the entire object will be needed,
– so it makes sense to transport data over the network in units of
objects
– not in units of pages.
To implement OBDSM shared memory is used.
For high-level programming model, DSM
systems can be made
1.easier,
2.Less error
3.Provide proper synchronization 
Object????
• It’s a programmer-defined encapsulated data structure.
• It consists of
– internal data,
– the object state, 
– procedures,
• called methods or operations, that operate on the object
state.
• To access or operate on the internal state, the program
must invoke one of the methods.
• The method can change the internal state,
• Direct access to the internal state is not allowed.
• This property, called information hiding.
Linda
• It provides processes on multiple machines
with a highly structured distributed shared
memory.
• Advantages :
– users do not have to learn a new language.
– Simplicity
– highly portable across operating systems.
Tuple Space

•  unifying concept behind Linda is that of an


abstract tuple space.
• A tuple is like a structure in C.
Three tuples examples.
("abc", 2, 5)
("matrix-1", 1,6,3.14)
("family", "is-sister", "Carolyn", "Elinor")
Fig. 6-36. Three Linda tuples.

A match occurs if the following three conditions are all met:


1. The template and the tuple have the same number of fields.
2. The types of the corresponding fields are equal.
3. Each constant or variable in the template matches its tuple field.
Implementation
• Provides processes (possibly on multiple machines) with
highly structured distributed shared memory (DSM).
• Access to DSM only possible through a small set of primitives
that must be incorporated into the programming language.
– Includes small syntax extension.
• Linda libraries, pre-compiler and runtime environment
constitute entire DSM system.
– Pre-compiler necessary to convert syntax extension into library calls
useable by native language.
• Linda’s small number of primitives simplifies incorporation of
Linda into any existing programming language.
– Reduces learning curve for programmers.
Partial broadcasting of tuples and templates.
Orca
• parallel programming system that allows
processes on different machines.
The Orca Language:
• type secure language with no pointers and no
aliasing.
• Two important features:
– shared data-objects (or just objects)
– and the fork statement.
• Each operation consists of a list of (guard,
block-of-statements) pairs.
• A guard
1.Boolean expression that does not contain
any side effects.
2.When an operation is invoked, all of its
guards are evaluated in an unspecified order.
3.If all of them are false, the invoking process
is delayed until one becomes true. 
Management of Shared Objects in Orca

• a copy will always be available locally, but now it matters if the


operation is a read or a write.

• Writes on replicated objects are provides reliable, totally-ordered


broadcasting, the runtime system broadcasts the name of the object, the
operation, and the parameters and blocks until the broadcast has
completed. All the machines, including itself, then compute the new
value.
– If broadcasting is unreliable, or broadcasting is unavailable, a two-phase
commit protocol is used:
• A lock on the primary copy is obtained.
• The primary copy is updated.
• The primary copy locks each remaining copy.
• When all remaining copies are locked, the primary copy sends the update.
• The primary copy unlocks the remaining copies.
• The primary copy acknowledges the update and unlocks the primary copy.
• NOTE: These locks are exclusive: reads and writes block until the locks
are released.
Orca: Synchronization
• Orca guarantees that each object method call is atomic.
– Each method call is effectively a critical region the execution of which
can only be undertaken by a single process at a time.
• Multiple simultaneous calls to the same method are
processed as if each were executed one after another in
sequence.
• The evaluation of guards in Orca provides condition
synchronization
• Decision to replicate an object based on compiler
estimate of read to write ratio:
– Higher read to write ratio increases likelihood of
replication.
– The estimate is updated by the runtime on each fork()
operation

You might also like