Professional Documents
Culture Documents
11
1
Support for multiple processors having access to a
shared memory
An important goal: make the number of CPUs
transparent to the application
• All communication is done by manipulating data at shared
memory locations
• Protection against simultaneous access is done through
synchronization primitives (semaphores and monitors)
• A semaphore can be thought of as an integer with two
operations – down and up
• Library support for monitors is generally given by means of
simple semaphores that can only take on the values 0 and
1, commonly referred as mutex variables, with associated
lock and unlock operations
2
Data structures for systemwide
resource management can no longer
be easily shared by placing them in
physically shared memory
The only means of communication is
through message passing
3
General structure of a multicomputer operating
system
1.14
4
Programming multicomputers is much harder
than programming multiprocessors(!)
• Expressing communication in terms of processes
accessing shared data and using simple primitives
(semaphores and monitors) is much easier than
having only message-passing facilities available
Emulate shared memory on multicomputers(!)
• Provide a virtual shared memory machine, running
on a multicomputer, for which applications can be
written using the shared memory model
Page-based distributed shared memory (DSM)
5
a) Pages of
address space
distributed
among four
machines
b) Situation after
CPU 1
references page
10
c) Situation if page
10 is read only
and replication
is used
6
False sharing of a page between two independent
processes.
1.18
7
Network operating systems DO NOT assume
that the underlying hardware is
homogeneous and that it should be
managed as if it were a single system
The machines and their operating systems
may be different, but they are all connected
to each other in a computer network
NOSs provide facilities to allow users to
make use of the services available on a
specific machine
8
General structure of a network operating system.
9
Two clients and a server in a network operating
system.
1-20
10
A distributed operating system is NOT INTENDED to
handle a collection of independent computers(!)
A network operating system DOES NOT provide a
view of a single coherent system(!)
Is it possible to develop a distributed system that has
the best of both worlds(?)
• Scalability and openness of network operating systems
• Transparency and ease of use of distributed operating
systems
Solution - additional layer of software (middleware)
that is used in network operating systems:
• To more or less hide the heterogeneity of the collection of
underlying platforms
• To improve distribution transparency
11
General structure of a distributed system as
middleware.
1-22
12
Treat everything as a file (including I/O devices)
Distributed file systems
• Distribution transparency is supported only for
traditional files
Remote Procedure Calls (RPCs)
• The emphasis is on hiding network communication by
allowing a process to call a procedure of which an
implementation is located on a remote machine
Distributed objects
• Each object itself is located on a single machine,
additionally making its interface available on many other
machines
Distributed documents
• Each document resides at a machine transparently
located somewhere in the world (World Wide Web)
13
1.23
14
Distributed OS
Network Middleware-
Item
OS based OS
Multiproc. Multicomp.
Number of copies of OS 1 N N N
Basis for Shared
Messages Files Model specific
communication memory
Global, Global,
Resource management Per node Per node
central distributed
Scalability No Moderately Yes Varies
1.25
16
1-28
1-29
18
An example of a server acting as a client.
1-30
19
An example of horizontal distribution of a Web service.
1-31
20
Chapter 2
21
Goal: examine the ways that processes on different
machines can exchange information
Communication in distributed systems is always
based on low-level message passing as offered by
the underlying network (i.e. transport layer)
◦ Note: it is harder than using primitives based on shared
memory!
Important issue – to offer a higher level of abstraction
that will make it easier to express communication
between processes than the support offered by the
interface to the transport layer
◦ Remote Procedure Call (RPC)
◦ Remote Method Invocation (RMI)
◦ Message-Oriented Middleware (MOM)
◦ Streams
22
Layers, interfaces, and protocols in the OSI model.
2-1
23
A typical message as it appears on the network.
2-2
24
2-3