Distributed Systems
Definition
• Two aspects:
• Hardware
• Software
Examples
• Banking
• Manufacturing company having Robots at various stations
Centralized Systems
• Client/server architecture
• Components of Centralized System:
• Node (Computer, Mobile, etc.).
• Server.
• Communication link (Cables, Wi-Fi,
etc.).
• Client sends a request to a company
server and receives the response.
• Server receives requests and
respond
• Example?
https://www.geeksforgeeks.org/comparison-centralized-decentralized-and-distributed-systems/
Centralized System contd…
• Characteristics of Centralized System
• Presence of a global clock
• One single central unit
• Dependent failure of components
• Scaling
• Only vertical scaling on central server is possible
Centralized System contd…
• Advantages • Limitations
• Easy to physically secure • Can’t scale up vertically after a
• Smooth and elegant personal certain limit
experience • Highly dependent on the network
• Dedicated resources connectivity
• More cost efficient for small • Bottlenecks can appear when the
systems upto a certain limit traffic spikes
Decentralized Systems
• Every node makes its own decision.
• The final behavior of the system is
the aggregate of the decisions of the
individual nodes.
• There is no single entity that
receives and responds to the request.
• Components of Decentralized
System are,
• Node (Computer, Mobile, etc.)
• Communication link (Cables, Wi-Fi,
etc.)
Characteristics of Decentralized System
• Lack of a global clock
• Multiple central units
(Computers/Nodes/Servers)
• Dependent failure of components
Decentralized System contd…
• Advantages • Limitations
• High availability • Coordination issues
• More autonomy and control over • No way to regulate a node on the
resources system
Advantages over Centralized OS
Advantages over PCs
Disadvantages
Hardware concepts
Loosely vs tightly coupled systems
Loosely Coupled Tightly Coupled
Distributed memory in loosely coupled multiprocessor
Memory Shared memory, in tightly coupled multiprocessor system
system
Data rate Low data rate high data rate
Cost Less costly More costly
Memory While tightly coupled multiprocessor system have memory
Memory conflicts don’t take place.
conflicts conflicts.
Low degree of interaction between tasks. High degree of interaction between tasks.
Direct connection between processor and I/O devices. IOPIN helps connection between processor and I/O devices.
Applications of loosely coupled multiprocessor are in Applications of tightly coupled multiprocessor are in parallel
Application
distributed computing systems. processing systems.
Bus-based multiprocessor
Problem: Overburden on Bus Issue with Cache
Solution? write-through cache
Snoopy Cache
Hierarchical systems,
Switched multiprocessor
NUMA (NonUniform Memory Access)
if n increases?
Bus-based Multicomputers
Switched Multicomputer
Software concepts
• Sharing of a printer on networking
• Loosely coupled
• Running a chess programme in parallel
• Tightly coupled
• In total 8 combinations of hardware (4) and software (2)
Network Operating systems
• Workstations connected with LAN
• To copy data from one machine to another
Network Operating System
shared, global file system accessibility
Network Operating System
Mounting of files
Network Operating System
• Should all machines run the same OS?
• Not required!
• If running on different, they must agree on the format and meaning of
all messages that they may potentially exchange.
• High degree of autonomy and a few system-wide requirements
Distributed Operating Systems
• Illusion: single-system image
• Entire network of computer is a single timesharing system, rather than a
collection of distinct machines.
• Single, global inter-process communication mechanism
• Don’t have different mechanisms on different machines or different
mechanisms on local communication and remote communication.
• Global protection scheme
• Same process management
• Same file system
Loosely Loosely Network
coupled coupled ??
Operating
software Hardware Systems
Tightly Loosely Distributed
coupled
software
coupled
Hardware
??
Operating
Systems
Multiprocessor
Tightly coupled
software
Tightly coupled
Hardware ??
Timesharing
Operating
Systems
Differences
Design issues
• Transparency
• How to achieve a single-system image
Design issues contd…
• Flexibility
Design issues contd…
• Reliability
• With four file servers, each with a 0.95 chance of being up at any instant, the
prob of all four being down simultaneously is ____
• Availability
• Security
• Performance
• Scalability
Potential bottlenecks
Communication in DS
Typical message on network
Clients and Servers
• The Client-server model is a distributed application structure that partitions task
or workload between the providers of a resource or service, called servers, and
service requesters called clients.
• In the client-server architecture, when the client computer sends a request for data
to the server through the internet, the server accepts the requested process and
deliver the data packets requested back to the client.
Clients and Servers (contd…)
• To avoid the considerable overhead of the connection-oriented protocols such as
OSI or TCP/IP , the client server model is usually based on a simple
connectionless request/reply protocol.
• The client sends a request message to the server asking for some service.
• The server does the work and returns the data requested or an error code
indicating why the work could not be performed.
• The primary advantage of the model is the simplicity because the client sends a
request and gets an answer. No connection has to be established before use or torn
down afterward. The reply message serves as the acknowledgement to the request.
• From the simplicity comes another advantage : efficiency the protocol stack is
shorter and thus more efficient.
Clients and Servers
• Use request/reply protocol
Clients and Servers (contd…)
• Assuming that all the machines are identical , only three levels of protocols are
needed as shown in fig 2.7(b).
• The physical and data link protocols take care of getting the packets from client to
server and back. These are handles by the hardware for example, an Ethernet
• No routing is needed and no connections are established, so layer 3 and 4 are not
required.
• Layer 5 is the request/reply protocol. It defines the set of legal requests and the set
of legal replies to these requests.
• There is no session management because there are no sessions.
• The upper layer are not needed either.
Clients and Servers (contd…)
• Due to this simple structure, the communication services provided by the
(micro)kernel can be reduced to two system calls , one for sending messages and
one for receiving them.
• Theses system calls can be invoked through library procedures, say
send(dest, &mptr) and receive(addr, &mptr).
• The former sends the message pointed to by mptr to a process identified by dest
and causes the caller to be blocked until the message has been sent.
• The latter causes the caller to be blocked until a message arrives.
• When one does, the message is copied to the buffer pointed to by mptr and the
caller is unblocked.
• The addr parameter specifies the address to which the receiver is listening.
Clients and Servers (contd…)
Clients and Servers (contd…)
Clients and Servers (contd…)
Clients and Servers (contd…)
Clients and Servers (contd…)
Issues related to Client-Server Model
• Addressing
• Blocking and non-blocking
• Buffering
• Reliability
Issues related to Client-Server Model-(contd…)
Addressing
• If there is only one process running on the destination machine, the kernel will
know what to do with the incoming message — give it to the one and only process
running there. However, what happens if there are several processes running on
the destination machine? Which one gets the message? The kernel has no way of
knowing.
• So, for that purpose an addressing system sends messages to processes rather than
to machines.
• How to identified the processes ?
Issues related to Client-Server Model-(contd…)
• Case 1:
• One common scheme is to use two part names, specifying both a machine and a
process number.
• For example, 243.4 or 4@243 designates process 4 on machine 243. The machine
number is used by the kernel to get the message correctly delivered to the proper
machine, and the process number is used by the kernel on that machine to
determine which process the message is intended for.
Issues related to Client-Server Model-(contd…)
• Case 2:
• Another approach is that on a LAN that supports broadcasting
• The sender can broadcast a special locate packet containing the address of the
destination process. Because it is a broadcast packet, it will be received by all
machines on the network.
• All the kernels check to see if the address is theirs, and if so, send back a here I
am message giving their network address (machine number).
• The sending kernel then uses this address, and furthermore, caches it, to avoid
broadcasting the next time the server is needed.
Issues related to Client-Server Model-(contd…)
• Case 3:
• The broadcasting puts extra load on the system. This extra load can be avoided by
providing an extra machine to map high-level (i.e., ASCII) service names to
machine addresses, as shown in Fig. 2-10(c).
• When this system is employed, processes such as servers are referred to by ASCII
strings, and it is these strings that are embedded in programs, not binary machine
or process numbers.
• Every time a client runs, on the first attempt to use a server, the client sends a
query message to a special mapping server, often called a name server, asking it
for the machine number where the server is currently located. Once this address
has been obtained, the request can be sent directly.
Issues related to Client-Server Model-(contd…)
Issues related to Client-Server Model-(contd…)
Blocking
• While the message is being sent,
the sending process is blocked
(i.e., suspended). The instruction
following the call to send is not
executed until the message has
been completely sent, as shown in
Fig. 2-1l(a) Similarly, the process
remains suspended in receive until
a message arrives
Issues related to Client-Server Model-(contd…)
Nonblocking
• If send is nonblocking, it returns
control to the caller immediately,
before the message is sent. The
advantage of this scheme is that
the sending process can continue
computing in parallel with the
message transmission, instead of
(b) A non blocking send having the
CPU go idle primitive.
• Challenges?
Issues related to Client-Server Model-
(contd…)
• Solutions:
• Blocking send (CPU idle during message transmission)
• Nonblocking send with copy (CPU time wasted for extra copy)
• Nonblocking send with interrupt (prog difficult)
Issues related to Client-Server Model-(contd…)
• Buffered vs unbuffered • Challenges?
primitives • Client sends before server initiate
receive
• Server not aware about the process
and where to save incoming message
• Solutions:
• Time-out
• Client may have to attempt several times
• Server may keep incoming messages
for a little while
• Problem of storing incoming messages
Issues related to Client-Server Model-(contd…)
• Buffered vs unbuffered • Mail box
• Problem:
• Mailbox is full
Issues related to Client-Server Model-(contd…)
• Reliable versus Unreliable primitives
• Problem:
• In case of blocking primitive, when a system resumes/restarted, there is no guarantee that
the message has been delivered
• Solutions
• Redefine the semantics of send to be unreliable
• E.g. post office
• Receiving kernel sends an acknowledgement back to the kernel of sending machine
• Advantage of request and response model
• No ACK is sent, Kernel sends response and that itself is an ACK
• But no ACK for reply
Issues related to Client-Server Model-(contd…)
• Reliable versus Unreliable
Issues related to Client-Server Model-
(contd…)
Client-Server Model-(contd…)
References
• A S Tanenbaum, Maarten Van Steen, Distributed Operating systems, Pearson,
2014