cs516 Unit II
cs516 Unit II
Reliability If one machine crashes, the system as a whole can still survive
Spread the workload over the available machines in the most cost
Flexibility
effective way
Switched Multiprocessor
To build a MP with more than 64 processors
Crossbar switch
Divide the memory up into modules and then connect them to the CPUs with a crossbar
switch
Many CPUs can be accessing memory at the same time
We need n x n crosspoint switches with n CPUs and n memories
Omega network
2x2 switches
Switches can be set in nano seconds or less
every CPU can access every memory
NUMA
Requires complex algorithm for good software placement
Switched Multicomputers
Each CPU has direct and exclusive access to its own, private memory
Grid Topology
Best suited for problems that have an inherent 2D nature like graph theory or vision (Ex: robot
eyes, analysing photograph)
Hypercube
n-dimensional cube
Each vertex is a CPU
Each edge is a connection between two CPUs
The corresponding vertices in each of the two cubes are connected
Distributed Multiprocessor
Item Network OS
OS OS
Dos file sharing have well defined semantics Usually No Yes Yes
Transparency: LMR-CP
how to achieve the single-system image
how do the system designers makes everyone into thinking that the collection of machines
is simply a timesharing system
Types of Transparency
Location transparency refers to the fact that in a true distributed system, users cannot tell
where hardware and software resources such as CPUs, printers, files, and data bases are located.
The name of the resource must not secretly encode the location of the resource, so names like
machine1:prog.c or /machine1/prog.care not acceptable
Migration transparency means that resources must be free to move from one location to
another without having their names change
Since a path like /work/news does not reveal the location of the server, it is location transparent.
With replication transparency, the operating system is free to make additional copies of files and
other resources on its own without the users noticing
Flexibility
Flexibility in a distributed operating system is enhanced through the modular and characteristics
of the distributed OS, and by providing a richer set of higher-level services.
Monolithic: Kernel that provides most services itself
Microkernel: Kernel should provide as little as possible, with the bulk of the operating system
services available from user-level servers.
Reliability
If a machine goes down, some other machine takes over the job
Availability
o Fraction of time that the system is usable
Security
o Files and other resources must be protected from unauthorized usage
Fault Tolerance
Performance
It should not be appreciably worse than running the same application on a single processor
Response time
Throughput
System utilization
Network capacity consumed
Grain size of all computations
o Fine-grained parallelism
Jobs that interact highly with one another
o Coarse-grained parallelism
Jobs that involve large computations, low interaction rates, and little data
Fault tolerance
Scalability
Potential bottlenecks that designers should try to avoid in very large distributed systems
Physical Layer
Concerned with transmitting the 0s and 1s.
How many volts to use for 0 and 1, how many bits per second can be sent, and whether
transmission can take place in both directions simultaneously
The size and shape of the network connector (plug), the number of pins and their
meaning
Deals with standardizing the electrical, mechanical, and signaling interfaces
Many physical layer standards like, the RS-232-C for serial communication lines.
ATM NETWORKS
The ATM model is that a sender first establishes a
connection (i.e., a virtual circuit) to the receiver or
receivers.
During connection establishment, a route is determined
from the sender to the receiver(s) and routing
information is stored in the switches along the way.
Using this connection, packets can be sent, but they are
chopped up by the hardware into small, fixed-sized units
called cells.
The cells for a given virtual circuit all follow the path
stored in the switches.
When the connection is no longer needed, it is released
and the routing information purged from the switches.
Cell switching is that it can handle both point-to-point and multicasting efficiently
Fixed-size cells allow rapid switching
REP Reply Server Client Reply from the server to the client
AYA Are You Alive? Client Server Probe to see if the server has crashed
Parameter Passing
Parameter marshaling
o Packing parameters into a message
o This model works fine as long as the client and server machines are identical and
all the parameters and results are scalar types such as integers, characters …
o In a large distributed system, multiple machine types are present. Each machine
has its own representation of numbers, characters and other data items like
EBCDIC code versus ASCII, representation of integers (1s complement vs 2s
complement), floating point numbers, byte order (little endian vs big endian)
o Solution is to use a network standard or canonical form for data types are defined
o All senders convert their internal types to this form while marshaling
o In-efficient due to two conversions needed
Alternative to marshaling is that the client uses its own native format and indicates in the
first byte of the message which format this is
o Ex: Little endian client builds a little endian message and server checks the 1st
byte for known messages
Dynamic Binding
The server performs registering with binder during initialize and exports its interface
A handle is used to locate the server
The client sends a message to the binder asking to import the server interface
If a suitable interface exists, the binder returns the server handle. Otherwise, the RPC fails
4) Server Crashes
At least once semantics
o Wait until the server reboots (or rebinds to a new server) and try the operation
again.
o Guarantees that the RPC has been carried out at least one time, but possibly more.
At most once semantics
o Gives up immediately and reports back failure.
o Guarantees that the RPC has been carried out at most one time,
but possibly none at all.
Exactly once semantics
o The client gets no help and no promises.
o Guarantee nothing
5) Client Crashes
Client sends a request to a server to do some work and crashes before the server replies
A computation which is active and no parent is waiting for the result is called an orphan
They waste CPU cycles
Solutions
Extermination
o A log is kept on a medium that could survive the crash
o The log is examined after a reboot to detect the orphans
o Orphan is explicitly killed off
Reincarnation
o When a client reboots, it broadcasts a message to all machines declaring the start
of a new epoch.
o When such a broadcast comes in, all remote computations are killed
Gentle reincarnation
o When an epoch broadcast comes in, each machine checks to see if it has any
remote computations
o If so, tries to locate their owner.
o Only if the owner cannot be found is the computation killed.
Expiration
o Each RPC is given a standard amount of time T to do the job
o If it can not finish, it must explicitly ask for another quantum
Critical Path
o The sequence of instructions that is executed on every RPC is called the critical
path
o Copying
o The number of times a message must be copied from kernel and user address
o Depends on hardware, software and type of call
Timer Management
o The amount of machine time that goes into managing the timers
o Algorithms that operate by periodically making a sequential pass through a table
are called sweep algorithms
Group Membership
creating and deleting groups, as well as for allowing processes to join and leave groups
Managing group membership can be done in two ways
Group server
o The group server can then maintain a complete data base of all the groups and their
exact membership.
o This method is straightforward, efficient, and easy to implement
o If the group server crashes, group management ceases to exist
Distributed
o an outsider can send a message to all group members announcing its presence.
o To leave a group, a member just sends a goodbye message to everyone.
o member crashes
no polite announcement
leaving and joining have to be synchronous with messages being sent
if so many machines go down that the group can no longer function at all
o Some protocol is needed to rebuild the group
Group Addressing
Three ways of addressing
Atomicity
when a message is sent to a group, it will either arrive correctly at all members of the group,
or at none of them.
all-or-nothing delivery is called atomicity or atomic broadcast
When any process sends a message to the group, it does not have to worry about what to do
if some of them do not get it.
every destination receives every message is to require them to send back an
acknowledgement upon message receipt.
The sender starts out by sending a message to all members of the group.
Timers are set and retransmissions sent where necessary.
When a process receives a message, if it has not yet seen this particular message, it, too,
sends the message to all members of the group, resulting in a reliable delivery
Message Ordering
Overlapping Groups
although there is a global time ordering within each group, there is not necessarily any
coordination among multiple groups
Scalability
Many algorithms work fine as long as all the groups only have a few members, but what
happens when there are tens, hundreds, or even thousands of members per group?
Or thousands of groups? Also, what happens when the system is so large that it no longer fits
on a single LAN, so multiple LANs and gateways are required?
And what happens when the groups are spread over several continents?
Thanks to my family members who supported me while I spent hours and hours to prepare this.
Your feedback is welcome at [email protected]