Loading in 2 Seconds...
Loading in 2 Seconds...
Distributed Shared Memory Presentation by Deepthi Reddy. What is DSM?. DSM is an abstraction used for sharing data between computers that do not share physical memory. . DSM Involved shared memory directly no marshalling necessary. Can alter erroneously causing one another to fail.
DSM is an abstraction used for sharing data between computers that do not share physical memory.
Involved shared memory directly no marshalling necessary.
Can alter erroneously causing one another to fail.
Synchronization is achieved through normal constructs shared memory programming such as locks and semaphores.
Process can leave data in an agreed memory location for the other to examine when it runs.
Underlying run-time ensures the transparency.
Variables have to be marshalled and unmarshalled.
Protected one another by having private address space.
Synchronization is achieved through message passing primitives such as lock server.
Process communicating must execute at the same time.
All remote data access is explicit.Differences between DSM andMessage Passing
Structure of data held in DSM:
DSM is a replication system in which each application process is presented some abstraction of a collection of objects (but in this case collection looks more or less like memory). Different approaches to DSM vary in what they consider to be and ‘object’ and how the objects are addressed.
Byte-Oriented: Accessed as ordinary virtual memory – a contiguous array of bytes. Operations allowed on Objects are : read or LOAD and write or Store.
Example: Mether system, IVY.
Object-oriented: Structured as a collection of language-level objects with higher-level semantics such as stacks and dictionaries. Example: Orca
Immutable data: Viewed as collection of immutable data items that process can read, add and remove form.
Examples: Agora, Linda, Tspaces and JavaSpaces.
Example: Mether system, IVY.
Examples: Agora, Linda, Tspaces and JavaSpaces
If a and b are 2 variables stored in DSM, the a constraint might be that a=b always. If 2 or more process execute the following code:
then an inconsistency arise.
A Distributed synchronization need to be provided, which includes familiar constructs such as locks and semaphores.
process 1 process 2
The interleaved sequence of operations meets the specification of a correct copy of the objects
The order of operations in the interleaving is consistent with the real times at which the operations occurred in the actual execution.
Weak Consistency: Dubois, et al define this model, called weak consistency, by saying that it has three properties:
Accesses to synchronization variables are sequentially consistent.
No access to a synchronization variable is allowed to be performed until all previous writes have completed everywhere.
No data access ( read or write ) is allowed to be performed until all previous accesses to synchronization variables have been performed.
Two implementation Choices:
accessed in read-only mode by one or more processes
read and written by a single process
Granularity refers to the size of the shared memory unit. A page size of that is a multiple of the size provided by the underlying hardware or the memory management system allows for the integration of DSM and the memory management systems. By integrating DSM with the underlying memory management system, a DSM system can take advantage of the built in protection mechanism to detect incoherent memory references, and use built in fault handlers to prevent and recover from inappropriate references.
When one or more process are reading the page, they have read-only permissions.
When one process is updating a page, all other process have no access permissions to the page.
A process with most up-to-date version of a page p is designated as its owner – owner(p).
The set of processes that have a copy of a page p is called its copy set – copyset(p)
Centralized manager algorithm: A single server called manager stores the location of owner(p) for every page p and the set copyset(p) is stored at owner(p)
Using Multicast: When a process faults, it multicasts its page request to all the other process and only the owner of the page replies.
divides the overhead of locating pages between those computers that access them.
Every process keeps, for every page p, a hint as to the page’s current owner – the probable owner of p or probOwner(p).
Hints are updates and requests are forwarded.
Thrashing: Mirage extends the coherence protocol of the IVY system to control thrashing. memory page is transferred to a processor, the processor is allowed to keep the page for a duration d. If a processor receives an invalidation message or has to relinquish the page to some other writer, it checks to see whether d has expired. If not, the processor informs the control manager of the amount of time it must wait before the processor can honor the request. The control manager waits until d expires and then requests the page again.
Competing access: 2 types
All modifications to shared data made within a critical section must be made visible to other processors that might access the data prior to completion of the critical section.
A shared memory system is release consistent if it obeys the following rules
1. Before any ordinary read or write access to shared data may be performed, all previous acquires done by the process must have completed successfully.
2. Before a release operation may be performed, all previous ordinary reads and writes done by the process must have been performed.
3. Acquire and release operations must be performed in "processor consistency" order.
Munin sends upadte or invalidation information as soon as lock is released.
programmers can take annotations that associate a lock with particular data items.