DC Notes 👍
Q.1 What are various issues in distributed system?
Various Issues in Distributed System (according to Distributed Computing
concepts/PDF)
1. Heterogeneity (Different Hardware & Software)
○ Distributed systems may use different computers, operating systems,
networks, and programming languages.
○ It is difficult to make all components work together smoothly.
2. Transparency
○ The system should appear as a single system to users, even though
many computers are involved.
○ Hides complexity like location, access, migration, and replication of
resources.
3. Scalability
○ The system should handle growth in users, resources, and
geographical area without reducing performance.
○ Includes:
■ Size scalability
■ Geographical scalability
■ Administrative scalability
4. Concurrency
○ Multiple users/processes may access shared resources at the same
time.
○ Proper synchronization is needed to avoid conflicts.
5. Fault Tolerance / Failure Handling
○ Nodes, network links, or software may fail.
○ The system should continue working properly even if some
components fail.
6. Security
○ Protecting data and resources from unauthorized access.
○ Includes authentication, confidentiality, and integrity.
7. Communication Delay / Network Latency
○ Data transfer between distributed nodes may be slow.
○ Delay can affect system performance.
8. Data Consistency
○ Same data stored on multiple nodes must remain updated and
consistent.
○ Difficult when many users modify data simultaneously.
9. Resource Sharing and Management
○ Efficient sharing of hardware, software, and data across the system is
necessary.
10.Openness
● The system should allow extensions and integration of new components
easily.
● Supports standard protocols and interfaces.
Q.2 Distributed Computing (Simple & Easy)
Definition:
Distributed computing means many computers connected through a network
work together to do a task as one system.
Easy Explanation:
Instead of one computer doing all the work, the work is shared among multiple
computers. These computers communicate with each other and help complete the
task faster. To the user, it looks like one single system.
Key Points:
● Many computers work together
● Connected through a network
● Share data and resources
● Complete tasks faster
● User sees it as one system
Examples:
● Google Search
● Online Banking
● Cloud Computing (Google Drive, AWS)
● Online Shopping (Amazon, Flipkart)
Short Exam Definition:
Distributed computing is a system where multiple computers work together
through a network to perform tasks and appear as one system to the user.
Q. 3 Various System Models of Distributed Computing (according to your PDF,
simple & easy)
System models are the different ways a distributed system can be organized based
on computers and how they share resources.
1. Minicomputer Model
● A few minicomputers are connected through a network.
● Each minicomputer can have multiple users at the same time.
● Users can access resources from other computers remotely.
● Used when resource sharing is needed.
Example: Early ARPANET
2. Workstation Model
● Many workstations (personal computers) are connected by a network.
● Each workstation has its own disk and works as a single-user system.
● Idle computers can help process tasks from busy computers.
● Improves CPU utilization.
Example: Sprite System, Xerox PARC
3. Workstation–Server Model
● Users work on their own workstation (home workstation).
● Special tasks are sent to dedicated servers.
● Server processes the request and sends back the result.
● User processes do not need to move to the server.
Example: V-System
4. Processor-Pool Model
● A pool of processors is shared by users when needed.
● No fixed computer is assigned to any user.
● Good for tasks needing high computing power for a short time.
● Gives better use of processing power and flexibility.
Example: Amoeba System
5. Hybrid Model
● Combination of Workstation–Server Model and Processor-Pool Model.
● Simple tasks run on local workstations.
● Large tasks use processors from the shared pool.
● Gives fast response and better performance.
Short Exam Answer:
System models of distributed computing are: Minicomputer model,
Workstation model, Workstation–Server model, Processor-Pool model, and
Hybrid model. These models define how computers are connected and how
resources are shared in a distributed system.
Q.4 1. Goals of Distributed Computing
The main goals of distributed systems are:
a) Resource Sharing
● Share hardware, software, and data between multiple computers.
● Users can access resources from anywhere.
b) Openness
● System should allow easy extension and improvement.
● Supports different hardware and software.
c) Concurrency
● Many users can work on the system at the same time.
d) Scalability
● System should handle more users and resources without reducing
performance.
e) Fault Tolerance
● If one computer fails, the system should continue working.
f) Transparency
● The system should look like one single computer to the user, hiding all
complexity.
Q. 5 Client-Server Model (simple & easy, according to distributed computing)
The Client-Server Model is a system where clients (users/computers) send
requests for services, and servers provide the requested services.
How it works:
● Client: Sends request (asks for data or service)
● Server: Receives request, processes it, and sends back the response
Example:
● In web browsing, your browser (client) requests a webpage, and the web
server sends the webpage back.
● Example: Opening Google, Amazon, or Online Banking
Diagram:
Client 1 ──┐
Client 2 ──┼──> Server ──> Response
Client 3 ──┘
Advantages:
● Easy to manage and maintain
● Resources and data are centralized
● Better security and backup
Disadvantages:
● If server fails, clients cannot access services
● Heavy load on server can slow performance
Short Exam Definition:
Client-Server Model is a distributed system model in which clients request
services or resources, and servers provide and manage those services.
Q.6 Middleware (simple & easy, according to distributed computing)
What is Middleware?
Middleware is a software layer between the operating system/network and the
applications in a distributed system.
It helps different computers and applications communicate and work together
smoothly, even if they use different hardware or operating systems.
Simple Definition:
Middleware is software that connects different parts of a distributed system
and hides the complexity from users and developers.
Services Offered by Middleware
1. Communication Services
● Helps computers exchange messages and data.
● Supports remote communication between systems.
2. Naming Services
● Helps find resources like files, servers, or devices by name.
3. Security Services
● Provides authentication, authorization, and data protection.
● Prevents unauthorized access.
4. Transaction Services
● Ensures operations are completed correctly.
● Maintains data consistency.
5. Directory Services
● Stores and manages information about users, resources, and services.
6. Synchronization Services
● Coordinates multiple processes working at the same time.
7. Resource Management
● Helps share and manage system resources efficiently.
8. Fault Tolerance
● Handles failures and helps the system continue working.
Q. 7 Types of Distributed Systems (simple & easy, according to distributed
computing)
Distributed systems can be classified into different types based on their purpose and
how they work.
1. Distributed Computing Systems
● Multiple computers work together to solve large computational problems.
● Tasks are divided among different machines.
Examples: Cloud computing, supercomputers, grid computing
2. Distributed Information Systems
● Used to share and manage data/information across multiple systems.
● Helps different applications communicate and exchange data.
Examples: Online banking systems, airline reservation systems, distributed
databases
3. Distributed Pervasive Systems
● Small devices connected through networks and working together.
● Designed for everyday environments and often work automatically.
Examples: Smart homes, IoT devices, sensor networks, wearable devices
4. Client-Server Systems
● Clients request services, and servers provide those services.
Examples: Web browsing, email services, online shopping
5. Peer-to-Peer (P2P) Systems
● All computers (peers) can act as both client and server.
● Resources are shared directly between users.
Examples: BitTorrent, file-sharing applications
Q.8 Hardware Concepts (simple & easy, according to distributed computing)
Hardware concepts describe how the physical computers and devices in a
distributed system are connected and organized.
1. Multiprocessors
● A single computer with multiple CPUs sharing the same memory.
● Processors work together to perform tasks faster.
Example: Multi-core computers
2. Multicomputers
● Multiple independent computers connected through a network.
● Each computer has its own memory and communicates by message passing.
Example: Cluster systems
3. Workstations
● Personal computers connected in a network.
● Can share resources and processing power.
4. Client-Server Hardware
● Clients request services and servers provide them.
● Common hardware model in distributed systems.
Software Concepts (simple & easy)
Software concepts describe how software helps computers communicate and work
together in a distributed system.
1. Operating System
● Manages hardware and system resources.
● Provides basic services to applications.
2. Middleware
● Software layer between OS and applications.
● Helps different systems communicate smoothly.
3. Distributed File System
● Allows users to access files stored on different computers as if they are local.
4. Communication Software
● Handles message passing and data exchange between computers.
5. Security Software
● Protects data and resources from unauthorized access.
Q. 8 Characteristics of Distributed Systems (simple & easy, according to
distributed computing)
1. Resource Sharing
● Different computers can share hardware, software, and data.
● Users can access resources from any connected system.
2. Openness
● The system supports different hardware and software.
● Easy to add new components or services.
3. Transparency
● The distributed system appears as one single system to the user.
● User does not see the internal complexity.
4. Scalability
● The system can grow easily by adding more computers or users.
● Performance should remain efficient.
5. Concurrency
● Multiple users can access and use resources at the same time.
6. Fault Tolerance
● If one computer fails, the system continues to work.
● Improves reliability.
7. Heterogeneity
● Different types of computers, operating systems, and networks can work
together.
8. Security
● Protects data and resources from unauthorized access.
● Includes authentication and data protection.
9. Communication
● Computers communicate through a network to exchange data and coordinate
tasks.
Short Exam Answer:
The main characteristics of distributed systems are resource sharing,
openness, transparency, scalability, concurrency, fault tolerance,
heterogeneity, security, and communication.
Module 2 👏
Q. 1 Message Communication Models (according to your PDF, simple & easy)
Message communication models are the different ways computers in a
distributed system communicate and exchange data.
1. Remote Procedure Call (RPC)
● Used in client-server applications.
● A client can call a function/procedure on a remote server as if it were a
local function.
● Hides communication details from the user.
Example: Client requesting data from a server.
2. Remote Method Invocation (RMI)
● Used for distributed objects.
● A program can call a method of an object located on another machine.
● Similar to RPC, but works with objects and methods.
Example: Java RMI.
3. Message-Oriented Middleware (MOM)
● Communication happens through message queues.
● Sender and receiver do not need to interact at the same time.
● Messages are stored until the receiver reads them.
Example: Email system, message queue systems.
4. Streams
● Used for continuous data communication.
● Suitable for data with timing constraints.
Example: Video streaming, audio calls, live broadcasts.
Short Exam Answer:
The message communication models in distributed systems are RPC, RMI,
Message-Oriented Middleware (MOM), and Streams. These models help
computers communicate and exchange data efficiently.
Q.2
Q. 3 * Differentiate message-oriented and stream-oriented communication.
Q.4 Explain group communication.
Group communication is a method in distributed systems where one process sends
a message to multiple processes (group members) at the same time.
It allows different computers or processes to communicate and coordinate together
as a group. This is often done using reliable multicasting, which is supported by
middleware.
Features of Group Communication:
1. One-to-Many Communication
○ One sender sends a message to many receivers at once.
2. Efficient Communication
○ Saves time and network resources by sending one message to the
whole group.
3. Coordination Between Processes
○ Helps multiple systems work together and stay synchronized.
4. Reliable Delivery
○ Ensures all group members receive the message correctly.
5. Dynamic Membership
○ Processes can join or leave the group when needed.
Types:
● Multicast: Message sent to selected group members.
● Broadcast: Message sent to all systems in the network.
Examples:
● Video conferencing
● Online multiplayer games
● Distributed databases
● Chat applications
Short Exam Answer:
Group communication is a communication method in distributed systems where one
process sends messages to multiple group members simultaneously. It helps in
efficient, reliable, and coordinated communication among distributed processes.
Q.5 MPI (Message Passing Interface) (according to distributed computing,
simple & easy)
MPI (Message Passing Interface) is a standard communication method used in
distributed systems where multiple computers/processes exchange messages to
work together.
It helps different processes communicate by sending and receiving messages.
Features of MPI:
1. Message Passing
○ Processes communicate by sending and receiving messages.
2. Parallel Processing
○ Multiple processes can work at the same time.
3. Portable
○ Works on different computers and operating systems.
4. Scalable
○ Can support a small or large number of computers.
5. Efficient Communication
○ Fast data exchange between processes.
Basic MPI Operations:
● MPI_Send() → Sends message to another process.
● MPI_Recv() → Receives message from another process.
● MPI_Bcast() → Sends same message to all processes.
● MPI_Barrier() → Synchronizes all processes.
Example:
A large calculation is divided among many computers, and each computer sends its
result back using MPI.
Short Exam Answer:
MPI (Message Passing Interface) is a standard communication protocol used in
distributed systems for exchanging messages between multiple processes to
perform parallel computing efficiently.
Q.6 Layered Protocols
Layered protocols organize communication into different layers, where each
layer performs a specific function and communicates with the layer above and
below it.
OSI Layers in Layered Protocols
1. Physical Layer
○ Handles transmission of bits/signals between sender and receiver.
○ Defines electrical and mechanical connections.
2. Data Link Layer
○ Transfers data in the form of frames.
○ Provides error correction and flow control.
3. Network Layer
○ Responsible for routing packets from source to destination.
○ Example: IP (Internet Protocol).
4. Transport Layer
○ Provides reliable communication and delivers messages without loss.
○ Breaks messages into smaller pieces and retransmits if needed.
○ Example: TCP, UDP.
5. Session Layer
○ Manages and controls communication sessions between applications.
6. Presentation Layer
○ Handles data formatting, encoding, and translation.
7. Application Layer
○ Provides services directly to user applications.
○ Example: HTTP, FTP, Email.
How it works
● Each layer adds its own header to the message before sending.
● At the receiver side, each layer removes its header and processes the data.
Short Exam Answer:
Layered protocols divide communication into different layers such as Physical, Data
Link, Network, Transport, Session, Presentation, and Application. Each layer
performs a specific task to ensure proper data communication in distributed systems.
Q. 7
Message-Oriented Communication
Stream-Oriented Communication
1. Message-Oriented Communication (5 Marks, according to PDF)
Message-Oriented Communication is a communication model in which data is sent
as separate messages between processes or computers. It is also called
Message-Oriented Middleware (MOM) and uses high-level message queuing.
Features:
1. Data is sent in the form of individual messages.
2. Sender and receiver do not need to communicate at the same time.
3. Messages can be stored in a queue until the receiver reads them.
4. It provides reliable communication between distributed systems.
5. Suitable for requests, commands, and text data.
Advantages:
● Easy and reliable communication
● Supports asynchronous communication
● Messages can be processed later
Examples:
● Email systems
● Chat applications
● Message queues (MOM)
Short Answer:
Message-oriented communication sends data as separate messages using message
queues, allowing reliable and asynchronous communication between distributed
systems.
2. Stream-Oriented Communication (5 Marks, according to PDF)
Stream-Oriented Communication is used for continuous data transfer where data
flows like a stream. It is mainly used for continuous media having timing constraints.
Features:
1. Data is sent as a continuous stream.
2. No clear separation between individual messages.
3. Requires real-time delivery and synchronization.
4. Sensitive to timing delays.
5. Suitable for audio, video, and live data.
Advantages:
● Supports real-time communication
● Smooth continuous data transfer
● Best for multimedia applications
Examples:
● Video streaming (YouTube)
● Audio calls / VoIP
● Live broadcasting
Short Answer:
Stream-oriented communication sends data continuously as a stream and is mainly
used for real-time applications like audio and video streaming.
Q.8 ASM and SSM Group Communication (according to PDF, simple & easy, 5
marks)
1. ASM (Any-Source Multicast)
ASM (Any-Source Multicast) is a group communication model where any
member of the group can send messages to all other members.
In this model, multiple senders and multiple receivers can communicate within
the same group.
Features:
1. Any group member can send messages.
2. Supports many-to-many communication.
3. All members can receive the messages.
4. Used when all participants need to communicate.
5. Suitable for collaborative applications.
Examples:
● Video conferencing
● Online group chats
● Multiplayer online games
2. SSM (Source-Specific Multicast)
SSM (Source-Specific Multicast) is a group communication model where only
one specific sender (source) sends messages, and many receivers receive
them.
In this model, receivers subscribe to a particular source.
Features:
1. Only one source sends data.
2. Supports one-to-many communication.
3. Receivers choose the specific source they want.
4. Better security and control.
5. Efficient for content distribution.
Examples:
● Live video streaming
● Online lectures/webinars
● TV broadcasting
Q. 9 * Discuss role of group communication.
Role of Group Communication
Group communication plays an important role in distributed systems by
allowing multiple processes or computers to communicate and coordinate as
a group.
Roles of Group Communication:
1. Efficient Message Delivery
● One message can be sent to multiple group members at the same time.
● Saves network bandwidth and time.
2. Coordination Among Processes
● Helps different processes work together and stay synchronized.
3. Supports Fault Tolerance
● If one system fails, other group members can continue the work.
● Improves system reliability.
4. Reliable Information Sharing
● Ensures all group members receive the same information correctly.
5. Scalability
● Easy to add or remove members from the group.
● Suitable for large distributed systems.
6. Supports Collaborative Applications
● Useful in applications where many users/processes need to interact.
Examples:
● Video conferencing
● Distributed databases
● Online multiplayer games
● Chat applications
Short Answer:
The role of group communication is to enable efficient, reliable, and
coordinated communication among multiple processes in a distributed
system, improving performance, scalability, and fault tolerance.
Module 6 😀
Q.1 * Explain DFS features and architecture.
DFS (Distributed File System) – Features and Architecture (according to your PDF,
simple & easy)
DFS Features (Requirements)
A Distributed File System (DFS) allows users to store and access files from multiple
computers over a network as if they are local files.
1. Transparency
● User can access files without knowing their actual location.
● Types:
○ Access transparency → Same way to access local and remote files
○ Location transparency → File location is hidden
○ Mobility transparency → Files can move without affecting users
○ Performance transparency → Performance remains good
○ Scaling transparency → System can grow easily
2. Concurrency
● Multiple users can access and update the same file at the same time without
conflict.
3. File Replication
● Multiple copies of files are stored at different locations.
● Improves availability and fault tolerance.
4. Heterogeneity
● Works on different computers and operating systems.
5. Fault Tolerance
● System continues working even if one server fails.
6. Security
● Protects files using authentication and access control.
7. Efficiency
● Provides good performance and fast file access.
8. Consistency
● If one copy of a file changes, all replicated copies must be updated.
DFS Architecture
DFS architecture has 3 main components:
1. Flat File Service
● Handles actual file contents.
● Performs operations like read, write, create, delete.
● Uses UFID (Unique File Identifier) to identify files.
2. Directory Service
● Maps file names to UFIDs.
● Helps users find files using file names.
3. Client Module
● Runs on client computers.
● Connects user applications with file services.
● Provides a simple interface for accessing files.
Architecture Diagram
User/Application
|
v
Client Module
/ \
v v
Directory Flat File
Service Service
DFS (Distributed File System) allows users to access files over a network like local
files. Its main features are transparency, concurrency, replication, fault tolerance,
security, efficiency, and consistency. Its architecture includes Flat File Service,
Directory Service, and Client Module.
Q.3 Andrew File System (AFS) (according to your PDF, simple & easy)
Andrew File System (AFS) is a location-independent distributed file system
that uses a local cache to improve performance and reduce server workload.
Characteristics of AFS
1. Files are small
○ Entire file can be cached locally.
2. More read operations than write operations
○ Reading happens more frequently than updating.
3. Sequential access is common
○ Files are usually accessed in order.
4. Files are usually not shared for writing
○ Shared files are mostly read-only.
5. Large disk space available
○ Enough space for local file caching.
Main Components of AFS
1. Vice (Server Side)
● Server process running on top of UNIX kernel.
● Provides shared file services to clients.
2. Venus (Client Side)
● Client-side cache manager.
● Acts as interface between user application and Vice server.
Working of AFS
1. Client requests a file from the Vice server.
2. Server sends the file and stores a copy in the client’s local cache.
3. Next time, the same file is accessed directly from the local cache.
4. If the file changes, the server sends a callback to notify the client.
Callback Mechanism
● Server gives a callback promise when sending a file.
● If another client modifies the file, server sends a callback notification.
● Client marks cached file as invalid (cancelled) and fetches updated copy.
AFS Diagram
User/Application
Venus (Client Cache Manager)
Local Cache
Vice (Server)
Shared Files
Andrew File System (AFS) is a distributed file system that uses local caching to
improve performance. Its main components are Vice (server) and Venus (client
cache manager). It uses callback mechanisms to maintain file consistency.
Q. 3 NFS (Network File System / Sun NFS)
NFS (Network File System) is a distributed file system that allows users to access
remote files over a network as if they were local files.
Features of NFS
1. Client-Server Architecture
○ Client requests files, server provides files.
2. RPC Communication
○ Client and server communicate using Remote Procedure Calls
(RPC).
3. Virtual File System (VFS)
○ Helps distinguish between local and remote files.
4. File Handle
○ Unique identifier used to access remote files.
5. Mount Service
○ Used to connect remote file systems to local directories.
6. Caching
○ Client and server use cache to improve performance.
7. Security
○ Uses authentication (Kerberos can be used for stronger security).
Working of NFS
● Client sends request to NFS server.
● Server processes the request and sends file data.
● Client can access the remote file like a local file.
Short Answer:
NFS is a distributed file system that allows users to access remote files over a
network as local files using RPC, mounting, and caching.
Q. 4 HDFS (Hadoop Distributed File System) – Architecture and Features
What is HDFS?
HDFS (Hadoop Distributed File System) is a distributed file system designed to
store very large files across multiple computers (nodes) and provide high
reliability and fault tolerance.
It is mainly used for Big Data storage and processing.
HDFS Architecture
HDFS follows Master–Slave Architecture.
1. NameNode (Master)
● Manages the entire file system.
● Stores metadata (file names, block locations, permissions).
● Keeps track of where data blocks are stored.
2. DataNode (Slave)
● Stores the actual data blocks.
● Sends block information to NameNode.
● Performs read/write operations.
3. Secondary NameNode
● Creates backup of NameNode metadata.
● Helps in recovery.
Architecture Diagram
Client
NameNode
(Metadata)
/ | \
/ | \
DataNode DataNode DataNode
(Block1) (Block2) (Block3)
Features of HDFS
1. Distributed Storage
● Files are split into blocks and stored on different machines.
2. Fault Tolerance
● Multiple copies (replication) of each block are stored.
● If one node fails, data can be recovered.
3. Scalability
● Easy to add more nodes for more storage.
4. High Throughput
● Fast processing of large data files.
5. Reliability
● Data is safely stored with replication.
6. Large File Support
● Designed for storing very large files (GBs to TBs).
Q. 5 1. File Caching Schemes (5 Marks, according to PDF)
File caching is used to store frequently accessed file data in local
memory/cache to improve performance and reduce network requests.
Types of File Caching Schemes
1. Server Caching
● Server stores recently accessed file blocks in its memory cache.
● Improves speed of file access.
Two methods:
● Write-through caching → Data is written to cache and disk before reply is
sent.
● Commit-based caching → Data is first stored in cache, then written to disk
after commit.
2. Client Caching
● Client stores results of read, write, lookup operations locally.
● Reduces number of requests sent to server.
● Uses timestamps (Tc and Tm) to validate cached data.
Advantages
● Faster file access
● Reduced network traffic
● Better system performance
Short Answer:
File caching schemes store file data temporarily in client or server cache to
improve performance and reduce access time.
2. File Replication (5 Marks, according to PDF)
File replication means storing multiple copies of the same file at different
locations/servers in a distributed system.
Benefits of File Replication
1. Fault Tolerance
○ If one server fails, another copy can be used.
2. Improved Availability
○ Files can be accessed from different servers.
3. Better Performance
○ Users can access the nearest copy faster.
4. Load Sharing
○ Multiple servers share file requests.
Consistency Requirement
● If one file copy is changed, all other copies must also be updated.
Short Answer:
File replication stores multiple copies of files on different servers to improve
availability, performance, and fault tolerance.
3. File Accessing Models (5 Marks, according to PDF)
File accessing models define how clients access files in a distributed file
system.
1. Remote Access Model
● Every file operation is sent directly to the remote server.
● Client does not store the file locally.
2. Upload/Download Model
● File is downloaded to the client machine.
● User works on the local copy.
● Updated file is uploaded back to server.
3. Caching Model
● Frequently used files are stored in local cache.
● Future access happens from cache, improving speed.
Advantages
● Easy file sharing
● Faster access
● Better performance
Short Answer:
File accessing models define how files are accessed in DFS, such as remote
access, upload/download, and caching models.
Q.6
MODULE 5:
Q. 1 * Data-centric consistency models.
Data-Centric Consistency Models
Data-centric consistency models define the rules to keep multiple copies
(replicas) of shared data consistent in a distributed system.
They ensure that users get correct and updated data from any replica.
Types of Data-Centric Consistency Models
1. Strict Consistency
● Any read always returns the latest updated value.
● All users see the same data instantly.
● Very difficult to achieve in real distributed systems.
2. Sequential Consistency
● All processes see all operations in the same order.
● Operations appear as if executed one after another.
● Maintains a common global order.
3. Causal Consistency
● Related (causal) writes must be seen in the same order by all.
● Independent writes can be seen in different orders.
● Maintains cause-effect relationship.
4. FIFO (PRAM) Consistency
● Writes from the same process are seen in correct order.
● Different processes may see writes in different orders.
● Easier to implement than sequential consistency.
5. Weak Consistency
● Data updates become visible only after synchronization.
● Reduces communication overhead.
● Better performance.
6. Release Consistency
● Shared data is updated when a process releases a lock.
● Uses two operations:
○ Acquire → before accessing data
○ Release → after updating data
● Improves efficiency.
7. Entry Consistency
● Each shared data item has its own synchronization lock.
● Only required data is updated.
● More efficient than release consistency.
Advantages
● Maintains data correctness
● Supports multiple replicas
● Improves system reliability
● Helps in synchronization
● Balances consistency and performance
Q. 2 Client-Centric Consistency Models (according to your PDF, simple & easy,
5 marks)
Client-centric consistency models ensure consistency from the client’s point of
view when accessing replicated data in a distributed system.
They guarantee that a client gets a consistent view of its own operations.
1. Monotonic Read Consistency
● If a client reads a data item, all future reads will return the same or newer
value.
● Client will never see older data after seeing newer data.
Example:
If user reads version x2, next read should show x2 or newer, not x1.
2. Monotonic Write Consistency
● A write by a client is completed before any next write by the same client.
● Ensures writes happen in correct order.
Example:
Update 1 must happen before Update 2.
3. Read-Your-Writes Consistency
● After a client writes data, it will always see its own updated value in future
reads.
Example:
If you change your profile name, next time you read it, you should see the new
name.
4. Writes-Follow-Reads Consistency
● If a client reads a value and then writes, the write is done on the same or
newer version of that data.
● Prevents updates based on old data.
Example:
Read latest file → then update that latest file.
Advantages
● Gives consistent user experience
● Easy to understand from client view
● Useful in mobile and distributed applications
● Improves reliability of replicated systems
Q. 3* Fault tolerance and process resilience.
Fault Tolerance and Process Resilience (according to your PDF, simple & easy,
5 marks)
1. Fault Tolerance
Fault tolerance is the ability of a distributed system to continue working properly
even when some components fail.
It helps the system recover automatically from partial failures.
Features of Fault Tolerance
1. Continues operation during failures
○ System keeps running even if one part fails.
2. Automatic recovery
○ Can recover from errors without stopping.
3. Partial failure handling
○ Only failed part is affected, not the whole system.
4. Reliability and Availability
○ System remains dependable and available.
5. Uses Redundancy
○ Extra hardware/software or duplicate data is used to tolerate failures.
Example:
● If one server crashes, another backup server continues the service.
2. Process Resilience
Process resilience means the ability of a process to recover and continue
execution after a failure.
It ensures that important processes do not permanently stop.
Methods for Process Resilience
1. Checkpointing
● Process periodically saves its current state (checkpoint).
● After failure, it restarts from the last saved checkpoint.
2. Message Logging
● Messages received by a process are recorded.
● After recovery, messages are replayed to restore the process state.
3. Recovery
● Forward Recovery → Correct errors and continue.
● Backward Recovery → Roll back to previous safe state.
Q. 4 Explain Failure Models (according to your PDF, simple & easy, 5 marks)
Failure models describe the different types of failures that can occur in a
distributed system.
They help in designing fault-tolerant systems.
Types of Failure Models
1. Crash Failure
● A server/process stops working completely.
● It was working correctly before it stopped.
Example: Server suddenly shuts down.
2. Omission Failure
The server fails to perform an action.
Types:
● Receive Omission Failure → Server fails to receive incoming messages.
● Send Omission Failure → Server fails to send messages.
3. Timing Failure
● Server’s response comes too early or too late.
● Response is outside the specified time limit.
Example: Delay in online transaction response.
4. Response Failure
● Server gives an incorrect response.
Types:
● Value Failure → Response value is wrong.
● State Transition Failure → Server behaves in the wrong sequence.
5. Arbitrary (Byzantine) Failure
● Server produces random or unpredictable responses at any time.
● Most difficult failure to handle.
Example: Sending incorrect or conflicting data.
Q. 5
Q.6 Maekawa Algorithm and Quorum Set (according to distributed systems,
simple & easy, 5 marks)
1. Maekawa Algorithm
Maekawa Algorithm is a distributed mutual exclusion algorithm used to control
access to a shared resource in distributed systems.
It allows only one process at a time to enter the critical section (CS).
Working of Maekawa Algorithm
● Each process must get permission from a selected group of processes
before entering the critical section.
● This selected group is called a quorum set.
● If permission is granted, the process enters the critical section.
● After finishing, it releases the permission.
Messages used
1. REQUEST → Sent to ask permission
2. REPLY (GRANT) → Permission granted
3. RELEASE → Sent after leaving critical section
Advantages
● Fewer messages than Lamport’s algorithm
● Efficient for large distributed systems
● Reduces communication overhead
2. Quorum Set
A quorum set is a subset (group) of processes from which a process must obtain
permission before entering the critical section.
Properties of Quorum Set
1. Every process has its own quorum set.
2. Any two quorum sets must overlap (have at least one common process).
3. This overlap ensures mutual exclusion (only one process can enter CS).
Example
If there are processes P1, P2, P3, P4, quorum sets can be:
● Q1 = {P1, P2, P3}
● Q2 = {P2, P3, P4}
Here, P2 and P3 are common, so both processes cannot enter critical section at the
same time.
Short Answer:
Maekawa algorithm is a distributed mutual exclusion algorithm that uses
quorum sets to control access to the critical section. A quorum set is a group
of processes whose permission is required before entering the critical section.
Q.7 1. Recovery (IMP – according to your PDF, simple & easy, 5 marks)
Recovery is the process of bringing a distributed system back to an error-free state
after a failure.
Types of Recovery
1. Forward Recovery
● Removes errors and allows the system to continue normally.
● Tries to correct the current faulty state.
2. Backward Recovery
● Rolls back the system to a previous safe state.
● Most commonly used in distributed systems.
Recovery Techniques
● Checkpointing → Process saves its state periodically.
● Message Logging → Stores received messages for replay after failure.
Short Answer:
Recovery is the process of restoring a distributed system after failure using
forward recovery, backward recovery, checkpointing, and message logging.
2. Reliable Communication (IMP – according to your PDF, simple & easy, 5
marks)
Reliable communication ensures that messages are delivered correctly and
completely between client and server.
Techniques for Reliable Communication
1. Error Detection
○ Uses redundant bits to detect bit errors.
2. Sequence Numbers
○ Detects lost or duplicate packets.
3. Acknowledgements (ACK)
○ Receiver confirms message delivery.
4. Retransmission
○ Lost or corrupted packets are sent again.
Short Answer:
Reliable communication ensures correct message delivery using error
detection, sequence numbers, acknowledgements, and retransmission.
3. Replication (Normal – according to your PDF, 5 marks)
Replication means storing multiple copies of data on different servers or nodes
in a distributed system.
Types of Replication
1. Permanent Replicas
○ Main copies created by the data owner.
2. Server-Initiated Replicas
○ Created by servers to improve performance.
3. Client-Initiated Replicas
○ Temporary copies created by clients (cache).
Advantages
● Improves availability
● Better performance
● Fault tolerance
● Load sharing
Short Answer:
Replication stores multiple copies of data to improve availability, performance,
and fault tolerance.
4. Group Communication Recovery (Normal – simple & easy, 5 marks)
Group communication recovery is the process of recovering communication
among group members after a failure in distributed systems.
Purpose
● Restore group communication after member or network failure.
● Ensure all members receive consistent messages.
Methods
1. Failure Detection
○ Detect failed group members.
2. Rejoining
○ Failed members can rejoin the group after recovery.
3. Message Retransmission
○ Lost messages are sent again.
4. State Synchronization
○ Recovered member updates its state with the group.
Short Answer:
Group communication recovery restores communication after failures using
failure detection, message retransmission, rejoining, and state
synchronization.
Module 4
Q.1 Desirable Features of Global Scheduling Algorithm
1. No A Priori Knowledge about Processes
The algorithm should work without needing advance information about the
processes.
Users should not have to provide process details before execution.
2. Dynamic Scheduling Decisions
The algorithm should make decisions based on the current system load.
It should also move processes when system conditions change.
3. Flexible
The algorithm should quickly assign processes to processors.
It should also allow process migration whenever needed.
4. Stability
The algorithm should avoid unnecessary process transfers.
It should keep the system stable and reduce overhead.
5. Balanced Performance and Low Overhead
The algorithm should improve system performance while keeping scheduling cost
low.
Too much information exchange increases overhead.
6. Unaffected by System Failures
The algorithm should continue working even if some nodes or links fail.
It should provide fault tolerance.
7. Scalability
The algorithm should work efficiently even when the number of nodes increases.
It should avoid excessive network traffic and delays.
Q,2
Q.3
Q.4 Code Migration and Its Issues (according to distributed systems, simple &
easy, 5 marks)
What is Code Migration?
Code migration is the process of moving a program (code) from one machine to
another machine in a distributed system for execution.
It helps move computation closer to data or resources, improving performance.
Techniques of Code Migration
1. Weak Mobility
● Only the program code is transferred.
● Execution starts from the beginning on the new machine.
● Execution state is not transferred.
Example: Java applets.
2. Strong Mobility
● Both program code and current execution state are transferred.
● Program continues execution from the same point on the new machine.
Example: Mobile agents.
Code Migration Issues
1. Process to Start Migration
● Deciding when and where to move the code.
2. Transfer of Code
● Program code must be safely moved to another machine.
3. Transfer of Execution State
● In strong mobility, the current state of execution must also be transferred.
4. Resource Binding
● Access to files, devices, or network resources must still work after migration.
5. Security
● Protect the host machine from malicious code.
● Protect the migrating code from attacks.
6. Heterogeneity
● Different machines may have different operating systems or hardware.
7. Performance Overhead
● Migration itself takes time and network resources.
Advantages of Code Migration
● Reduces network communication
● Improves performance
● Supports load balancing
● Better resource utilization
Short Answer:
Code migration is the movement of program code from one machine to
another for execution. Techniques include weak mobility and strong mobility.
Main issues include code transfer, state transfer, resource binding, security,
and heterogeneity.
Q.5 Task Assignment Approach in Global Scheduling
In the Task Assignment Approach, a process is divided into multiple small
tasks.
These tasks are assigned to suitable processors or nodes to improve system
performance.
Goals of Task Assignment Approach
● Minimize Interprocess Communication (IPC) cost
● Reduce process completion time
● Increase parallelism
● Utilize system resources efficiently
Assumptions
● Process is already divided into tasks
● Computation cost of each task is known
● Processor speed is known
● Communication cost between tasks is known
Advantages
● Improves performance
● Better utilization of processors
● Supports parallel execution
Disadvantages
● Requires advance knowledge about tasks
● Does not handle dynamic system changes properly
Algorithms Used
1. Graph Theoretic Deterministic Algorithm
2. Centralized Heuristic Algorithm
3. Hierarchical Algorithm
Q.6 Load Balancing
Load balancing is the process of distributing workload equally among
processors or nodes in a distributed system.
Its main goal is to ensure that no processor is overloaded or idle. This
improves system performance and reduces execution time.
Features of Load Balancing
● Distributes jobs among processors
● Improves resource utilization
● Reduces execution time
● Supports workload migration from overloaded to lightly loaded nodes
Types of Load Balancing
1. Static Load Balancing
2. Dynamic Load Balancing
Load Sharing
Load sharing is a scheduling approach in which the system ensures that no
node remains idle while others are heavily loaded.
It does not try to equally balance the load on all nodes.
Features of Load Sharing
● Shares work among nodes
● Avoids idle processors
● Simpler than load balancing
● Improves system utilization
Types of Load Sharing Policies
1. Sender Initiated Policy
2. Receiver Initiated Policy
Process Migration
Process migration is the movement of a process from one node to another
node in a distributed system for better resource utilization and load balancing.
Steps in Process Migration
1. Freeze the process on source node
2. Transfer process information and address space
3. Restart process on destination node
4. Forward messages to new node
Types of Process Migration
1. Non-preemptive Migration – process is moved before execution starts
2. Preemptive Migration – process is moved during execution
Advantages of Process Migration
● Better resource utilization
● Reduces response time
● Improves reliability
● Balances system load
Q. 7 Load Balancing Techniques
Load balancing techniques are used to distribute workload among processors or
nodes so that no node becomes overloaded or idle.
1. Static Load Balancing
In static load balancing, processes are assigned to processors before execution
starts.
Once assigned, they cannot be changed during runtime.
This technique does not collect current system load information.
Types of Static Load Balancing
● Deterministic (Optimal) – Uses complete information about processes and
resources.
● Probabilistic (Sub-optimal) – Used when workload is unpredictable.
2. Dynamic Load Balancing
In dynamic load balancing, process assignment is done during runtime.
Processes can be moved from heavily loaded nodes to lightly loaded nodes
depending on system conditions.
Features
● Uses current system information
● Supports process migration
● Gives better performance in changing environments
3. Centralized Load Balancing
In this technique, one central node makes all scheduling decisions.
It is simple and efficient for small systems but may become a bottleneck in large
systems.
4. Distributed Load Balancing
In distributed load balancing, each node makes its own scheduling decisions.
This improves scalability and avoids a single point of failure.
Q.8 Virtualization
Virtualization in distributed systems means creating virtual versions of computers,
networks, and storage.
These virtual resources work like real physical hardware but are easier to manage
and move.
Advantages of Virtualization
● Better resource sharing
● Improved security and isolation
● Easy backup and recovery
● Flexible and scalable system
● Supports testing and development
Clients and Servers
Client
A client is a computer or program that requests services or resources from a server.
Example: A web browser requesting a webpage.
Server
A server is a computer or program that provides services, data, or resources to
clients.
Example: A web server providing webpages to users.
Client-Server Model
In the client-server model:
● Client sends request
● Server processes request
● Server sends response back to client
Advantages
● Centralized data management
● Easy resource sharing
● Better security and maintenance
● Supports multiple clients at the same time
Task Assignment
Task Assignment is a scheduling approach in distributed systems where a process is
divided into multiple tasks.
These tasks are assigned to suitable processors or nodes to improve system
performance.
Goals of Task Assignment
● Minimize communication cost between tasks
● Reduce process completion time
● Increase parallel processing
● Utilize system resources efficiently
Assumptions
● Process is already divided into tasks
● Computation cost of tasks is known
● Processor speed is known
● Communication cost between tasks is known
Advantages
● Improves system performance
● Better utilization of processors
● Supports parallel execution
Disadvantages
● Requires advance knowledge of tasks
● Does not handle dynamic changes effectively
Algorithms Used
1. Graph Theoretic Deterministic Algorithm
2. Centralized Heuristic Algorithm
3. Hierarchical Algorithm