Hardware Reference
In-Depth Information
Machine 1
Machine 2
Machine 1
Machine 2
Machine 1
Machine 2
Application
Application
Application
Application
Application
Application
Language
run-time
system
Language
run-time
system
Language
run-time
system
Language
run-time
system
Language
run-time
system
Language
run-time
system
Operating
system
Operating
system
Operating
system
Operating
system
Operating
system
Operating
system
Hardware
Hardware
Hardware
Hardware
Hardware
Hardware
Shared memory
Shared memory
Shared memory
(a)
(b)
(c)
Figure 8-21. Various layers where shared memory can be implemented. (a) The
hardware. (b) The operating system. (c) The language run-time system.
instruction restarted. In effect, the operating system is just satisfying page faults
from remote memory instead of from disk. To the user, the machine looks as if it
has shared memory. We will examine DSM later in this chapter.
A third possibility is to have a user-level run-time system implement a (possib-
ly language-specific) form of shared memory. In this approach, the programming
language provides some kind of shared-memory abstraction, which is then imple-
mented by the compiler and run-time system. For example, the Linda model is
based on the abstraction of a shared space of tuples (data records containing a col-
lection of fields). Processes on any machine can input a tuple from the shared
tuple space or output a tuple to the shared tuple space. Because access to the tuple
space is controlled entirely in software (by the Linda run-time system), no special
hardware or operating system support is needed.
Another example of a language-specific shared memory implemented by the
run-time system is the Orca model of shared data objects. In Orca, processes share
generic objects rather than just tuples and can execute object-specific methods on
them. When a method call changes the internal state of an object, it is up to the
run-time system to make sure all copies of the object on all machines are updated
 
Search WWH ::




Custom Search