0% found this document useful (0 votes)
5 views

Distributed Systems Overview

The document provides an overview of distributed systems, defining them as collections of independent computers that function as a single system. It discusses advantages such as scalability and fault tolerance, as well as disadvantages like complexity and security risks. Additionally, it covers design issues, types of distributed systems, naming systems, security threats, and various algorithms related to synchronization and mutual exclusion.

Uploaded by

somyajiit07
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Distributed Systems Overview

The document provides an overview of distributed systems, defining them as collections of independent computers that function as a single system. It discusses advantages such as scalability and fault tolerance, as well as disadvantages like complexity and security risks. Additionally, it covers design issues, types of distributed systems, naming systems, security threats, and various algorithms related to synchronization and mutual exclusion.

Uploaded by

somyajiit07
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Distributed Systems Overview

Uploaded image
give detailed answers to each questions

Here are detailed answers to each question:

Q.1 (a) Define distributed system. List advantages and disadvantages of distributed
system.

Definition of Distributed System

A distributed system is a collection of independent computers that appear to the users of the system
as a single coherent system. These systems communicate and coordinate their actions by passing
messages.

Advantages

1. Scalability: Distributed systems can easily scale horizontally by adding more nodes.
2. Fault Tolerance: If one node fails, others can take over, ensuring reliability.
3. Resource Sharing: Resources like hardware, software, and data can be shared.
4. Performance: Tasks can be executed in parallel, improving overall performance.
5. Cost Efficiency: Use of low-cost hardware instead of expensive mainframes.

Disadvantages

1. Complexity: Managing distributed systems is more complex than centralized systems.


2. Security Risks: Data is distributed across nodes, making it more vulnerable to attacks.
3. Network Dependency: Performance heavily relies on the underlying network.
4. Concurrency Issues: Synchronization between processes is challenging.
5. Data Consistency: Maintaining consistency across nodes is difficult.

Q.1 (b) Explain various designing issues in distributed systems.

1. Transparency:
Access Transparency: Hides differences in data representation.
Location Transparency: Users don’t need to know where resources are located.
Replication Transparency: Hides replication details.
2. Scalability:
Systems must scale up efficiently without performance degradation.
3. Concurrency:

Printed using Save ChatGPT as PDF, powered by PDFCrowd HTML to PDF API. 1/8
Managing multiple users accessing shared resources simultaneously.
4. Fault Tolerance:
Ensuring the system continues working even when a component fails.
5. Resource Management:
Allocation and scheduling of resources across the system.
6. Security:
Protecting data and resources from unauthorized access.
7. Performance:
Optimizing communication and resource access to ensure efficiency.

Q.1 (c) Explain different types of distributed systems.

1. Client-Server Systems:
Clients request services, and servers provide responses. Example: Web servers.
2. Peer-to-Peer Systems:
All nodes act as both clients and servers. Example: BitTorrent.
3. Clustered Systems:
Multiple servers work together as a single system. Example: High-performance computing.
4. Grid Computing:
Resources are shared across multiple systems over a network.
5. Cloud Computing:
Provides on-demand computing resources via the internet. Example: AWS, Azure.
6. Distributed Databases:
Data is stored across multiple nodes. Example: Google Bigtable.

Q.2 (a) Discuss desirable features of a good naming system.

1. Uniqueness: Each name must uniquely identify an entity.


2. Human-Readable: Names should be easy to understand.
3. Scalability: Naming system should handle a large number of names efficiently.
4. Location Independence: Names should not depend on the location of the resource.
5. Performance: Lookup operations should be fast.
6. Fault Tolerance: Naming system should be robust against failures.
7. Consistency: Names should not change unexpectedly.

Q.2 (b) Discuss flat name space and hierarchical names with examples.

1. Flat Name Space:


Names are unique but not structured.
Example: MAC addresses (unique for devices).
2. Hierarchical Name Space:
Names are structured in a tree-like hierarchy.
Example: DNS (Domain Name System):

Printed using Save ChatGPT as PDF, powered by PDFCrowd HTML to PDF API. 2/8
`www.google.com` → Top-level domain: `.com`, Subdomain: `google`, Host: `www`.

Q.2 (c) Briefly explain different architectural styles of distributed systems.

1. Layered Architecture: Divides the system into layers (e.g., application, transport, network).

2. Object-Based Architecture: Components interact via objects (e.g., CORBA).


3. Data-Centric Architecture: Focuses on data sharing (e.g., distributed databases).

4. Event-Based Architecture: Components communicate through events (e.g., publish-subscribe


systems).

5. Client-Server Architecture: Clients request services, and servers respond.

6. Peer-to-Peer Architecture: All nodes have equal roles.

Q.3 (a) The TCP/IP connection between client and server is stateful. State True or
False. Justify your answer.

False.
TCP/IP itself is a stateless protocol. However, the TCP connection maintains a stateful connection
for the duration of communication.
Stateful means TCP keeps track of session states like connection establishment, data transmission,
and termination.

Q.3 (b) Discuss different types of security threats in distributed systems.

1. Unauthorized Access: Accessing data without permission.


2. Data Interception: Eavesdropping on network communication.
3. Denial of Service (DoS): Overloading the system to make it unavailable.
4. Man-in-the-Middle Attacks: Intercepting and altering communication.
5. Replication Attacks: Replicating data without authorization.
6. Data Tampering: Modifying data during transmission.

Q.3 (c) Explain how Lamport’s logical clock is implemented in distributed systems.

Lamport’s logical clock provides a way to order events in a distributed system.


Steps:

1. Each process maintains a local counter.


2. When an event occurs, the counter is incremented.
3. When sending a message, the timestamp (counter value) is included.
4. On receiving a message:
Update the local counter to the maximum of its value and the received timestamp, then
increment it.

Q.4 (a) Differentiate Authorization and Authentication.

Printed using Save ChatGPT as PDF, powered by PDFCrowd HTML to PDF API. 3/8
Aspect Authentication Authorization

Definition Verifying the user’s identity. Granting access to resources.


Process User provides credentials (e.g., password). System checks permissions.
Purpose Ensures the user is who they claim. Ensures user has access rights.
Example Login with username/password. Access files based on roles.

Q.4 (b) Explain Bully Election algorithm in brief.

The Bully Election Algorithm is used to elect a coordinator in a distributed system.

Steps:

1. The process with the highest ID becomes the coordinator.


2. If a process detects a failure, it starts an election.
3. It sends election messages to higher-ID processes.
4. If no response, it declares itself the coordinator.
5. Other processes acknowledge the new coordinator.

Q.5 (c) Explain Diffie-Hellman key exchange algorithm with a suitable example.

The Diffie-Hellman algorithm allows two parties to securely exchange cryptographic keys over a public
channel.
Steps:

1. Alice and Bob agree on public values:


Prime number `p` and base `g`.
2. Alice selects a private key `a` and computes:
A = g a mod p.
3. Bob selects a private key `b` and computes:
B = g b mod p.
4. They exchange `A` and `B`.
5. Alice computes the shared key:
K = B a mod p.
6. Bob computes the shared key:
K = Ab mod p.

Both derive the same shared key `K`.

Example:

Public: p = 23, g = 5.
Alice’s private key: a = 6, Bob’s private key: b = 15.
Alice sends A = 56 mod 23 = 8.
Bob sends B = 515 mod 23 = 19.
Shared key: K = 196 mod 23 = 2.

Printed using Save ChatGPT as PDF, powered by PDFCrowd HTML to PDF API. 4/8
Let me know if you need answers for other questions or additional clarifications!

continue giving answers of rest

Here are the detailed answers for the remaining questions:

Q.2 (c) What is flat naming? Explain broadcasting, multicasting, and forward pointer
techniques to resolve flat naming.

Flat Naming

In a flat name space, names are unique identifiers without any hierarchical structure.
It is simple but inefficient for large systems since searching for a name requires checking all
entities.

Techniques to Resolve Flat Naming

1. Broadcasting:
A message is sent to all nodes in the system.
If the intended recipient identifies the message, it responds.
Advantages: Simple to implement.
Disadvantages: High network overhead.
2. Multicasting:
A message is sent to a group of nodes instead of all nodes.
Only relevant nodes respond.
Advantages: Reduces overhead compared to broadcasting.
Disadvantages: Group management can be complex.
3. Forward Pointers:
When an object moves, a pointer is left at the old location pointing to the new location.
Subsequent requests follow the chain of pointers to find the object.
Advantages: Ensures the object can be located.
Disadvantages: Long pointer chains can increase latency.

Q.3 (a) Explain the architecture of a traditional web-based system.

The traditional web-based system architecture follows a client-server model:

1. Client Tier:
The front-end interface (web browsers) where users interact.
Handles input, displays content, and sends HTTP requests.
2. Web Server Tier:
Processes client requests and forwards them to the application server.
Example: Apache, Nginx.

Printed using Save ChatGPT as PDF, powered by PDFCrowd HTML to PDF API. 5/8
3. Application Server Tier:
Contains the business logic of the system.
Processes data and handles dynamic content generation.
4. Database Tier:
Stores and retrieves data for the application.
Example: MySQL, Oracle.

Flow:

Client → HTTP Request → Web Server → Application Server → Database → Response back to
Client.

Q.3 (b) Discuss different alternatives of client-server organization.

1. Two-Tier Architecture:
The client interacts directly with the server.
Example: Database applications where the client directly queries the database.
2. Three-Tier Architecture:
Separates presentation, application logic, and data storage into three layers:
Client Tier → Application Server → Database.
Example: Web applications.
3. Multi-Tier Architecture:
Extends three-tier by adding more layers (e.g., caching, load balancing).
Improves scalability and fault tolerance.
4. Peer-to-Peer (P2P):
All nodes act as both clients and servers.
Example: File sharing applications like BitTorrent.

Q.3 (c) Discuss various mutual exclusion algorithms in detail.

1. Centralized Algorithm:
A central coordinator grants access to the critical section.
Advantages: Simple to implement.
Disadvantages: Single point of failure, bottleneck.
2. Token-Based Algorithm:
A token circulates among nodes, and only the node holding the token can enter the critical
section.
Advantages: No contention.
Disadvantages: Token loss requires recovery mechanisms.
3. Ricart-Agrawala Algorithm:
A node sends requests to all other nodes for permission to enter the critical section.
Other nodes reply with a timestamp-based decision.
Advantages: Fair and efficient.
Disadvantages: High message overhead.
4. Lamport’s Algorithm:

Printed using Save ChatGPT as PDF, powered by PDFCrowd HTML to PDF API. 6/8
Uses logical clocks to order requests.
Similar to Ricart-Agrawala but ensures ordering using timestamps.

Q.4 (a) Define Privacy, Authenticity, Integrity.

1. Privacy:
Ensuring that sensitive information is not accessed by unauthorized entities.
Example: Encrypting data.
2. Authenticity:
Verifying that the sender of the message is who they claim to be.
Example: Digital signatures.
3. Integrity:
Ensuring that data is not altered during transmission.
Example: Hashing techniques (MD5, SHA).

Q.4 (b) Discuss persistent and non-persistent HTTP connection.

1. Persistent HTTP Connection:


The connection between the client and server remains open for multiple requests/responses.
Advantages: Reduces connection setup time, improves performance.
Example: HTTP/1.1 (default persistent connection).
2. Non-Persistent HTTP Connection:
The connection closes after each request/response cycle.
Advantages: Simpler to implement.
Disadvantages: Increases overhead due to frequent connection setup.
Example: HTTP/1.0 (default non-persistent).

Q.4 (c) Write short note on data-centric consistency models.

Data-centric consistency models define the rules for maintaining consistency in distributed systems:

1. Strict Consistency:
A read returns the most recent write.
Hard to achieve in distributed systems.
2. Sequential Consistency:
All processes see the same order of updates, but not necessarily in real-time.
3. Causal Consistency:
If one event causally affects another, the order is preserved.
4. Eventual Consistency:
All nodes will eventually converge to the same state.
Example: DNS systems.

Q.5 (a) Enumerate various issues in clock synchronization.

Printed using Save ChatGPT as PDF, powered by PDFCrowd HTML to PDF API. 7/8
1. Clock Drift:
Physical clocks run at slightly different speeds, causing drift.
2. Latency:
Delays in message transmission affect synchronization.
3. Network Delays:
Variable network delays make accurate time synchronization difficult.
4. Fault Tolerance:
Handling node failures while maintaining synchronization.
5. Accuracy:
Ensuring minimal deviation between clocks.

Q.5 (b) Explain Backward and Forward recovery strategies.

1. Backward Recovery:
The system rolls back to a previous consistent state after a failure.
Example: Database transactions using checkpoints.
2. Forward Recovery:
The system moves forward by applying recovery procedures to reach a consistent state.
Example: Error-correcting codes in data transmission.

Q.5 (c) Write a short note on Distributed Object-Based System.

A Distributed Object-Based System allows objects located on different machines to communicate as if


they were local.

Features:

1. Remote Method Invocation (RMI): Objects can invoke methods on remote objects.
2. Object Transparency: Location and access to objects are transparent to the user.
3. Middleware: Systems like CORBA and Java RMI facilitate communication.

Example:

A banking application where customer objects are distributed across servers but accessed
seamlessly.

Let me know if you need further elaboration on any of these topics! 😊


Is this conversation helpful so far?

Printed using Save ChatGPT as PDF, powered by PDFCrowd HTML to PDF API. 8/8

You might also like