0% found this document useful (0 votes)
48 views5 pages

Overview of Distributed Operating Systems

This document provides an overview of distributed operating systems, highlighting their key features, system architectures, design issues, communication models, clock synchronization, mutual exclusion, election algorithms, and deadlock detection techniques. It discusses various models such as client-server, peer-to-peer, and middleware-based systems, along with algorithms for synchronization and mutual exclusion. Additionally, it covers methods for detecting and managing deadlocks in distributed environments.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views5 pages

Overview of Distributed Operating Systems

This document provides an overview of distributed operating systems, highlighting their key features, system architectures, design issues, communication models, clock synchronization, mutual exclusion, election algorithms, and deadlock detection techniques. It discusses various models such as client-server, peer-to-peer, and middleware-based systems, along with algorithms for synchronization and mutual exclusion. Additionally, it covers methods for detecting and managing deadlocks in distributed environments.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MODULE 2: Distributed Operating Systems

2.1 Introduction to Distributed Systems

 A distributed system is a collection of independent computers that appear to the


users as a single coherent system.

 Each node has its own memory and CPU.

Key Features:

 Resource sharing

 Transparency (location, access, concurrency, fault, replication, etc.)

 Openness and scalability

 Fault tolerance and reliability

2.2 System Architectures in Distributed OS

1. Client-Server Model

o Centralized server provides services to multiple clients.

o Simple, but has single point of failure.

o Example: NFS.

2. Peer-to-Peer Model

o All nodes are equal; share resources without centralized coordination.

o More robust and scalable.

3. Middleware-Based Systems

o Middleware acts as glue to connect different distributed applications.

o Examples: CORBA, RMI.

4. Hybrid Architectures

o Combines client-server and peer-to-peer features.

o Used in modern cloud and IoT systems.

2.3 Design Issues in Distributed OS


1. Transparency:

o Location Transparency: Users need not know where resources are located.

o Access Transparency: Uniform access regardless of resource location.

o Concurrency Transparency: Several users/processes can use resources


concurrently.

o Failure Transparency: System should handle failures gracefully.

2. Resource Management:

o Load balancing

o Process migration

o Global scheduling

3. Fault Tolerance:

o Redundancy and replication

o Failure detection and recovery

4. Scalability:

o Efficient algorithms for thousands of nodes

2.4 Communication Models in Distributed OS

1. Message Passing:

o Send/receive primitives

o Blocking and Non-blocking calls

o Socket Programming, MPI

2. Remote Procedure Calls (RPC):

o Allows a process to call a procedure on a remote system

o Hides communication details

o Examples: Sun RPC, Java RMI

3. Remote Method Invocation (RMI):

o Object-oriented variant of RPC

o Used in Java-based distributed apps


4. Group Communication:

o Multicast messages to a group of nodes

o Used in collaborative applications

2.5 Clock Synchronization

In distributed systems, there’s no global clock, so synchronization is critical.

2.5.1 Problems:

 Events can happen concurrently on different machines.

 Ordering events becomes difficult without synchronized clocks.

2.5.2 Algorithms:

a) Cristian's Algorithm

 One machine acts as a time server.

 Client sends request, server replies with current time.

 Client sets its clock using server time and adjusts for round-trip delay.

Formula:
Client Time = Server Time + (RTT / 2)

b) Berkeley Algorithm

 Master polls slaves to get their time.

 Calculates average time and asks all nodes to adjust their clocks.

c) Network Time Protocol (NTP)

 Internet protocol that synchronizes clocks to a few milliseconds accuracy.

2.6 Mutual Exclusion in Distributed Systems

Problem:

Ensure only one process accesses the critical section (shared resource) at a time across
nodes.

Algorithms:

a) Centralized Algorithm

 A coordinator grants permission.


 Simple, but single point of failure.

b) Ricart-Agrawala Algorithm

 Based on timestamped messages.

 Node requests permission from all other nodes before entering CS.

 Nodes reply based on timestamps.

c) Token Ring Algorithm

 Logical ring; token circulates.

 Node can enter CS when it holds the token.

 Efficient but failure of one node breaks the ring.

2.7 Election Algorithms

Used to choose a coordinator among distributed nodes.

Common Algorithms:

a) Bully Algorithm (by Garcia-Molina):

 All processes have unique IDs.

 Any process can initiate an election.

 Process with highest ID wins and becomes the coordinator.

Steps:

1. Process P detects failure of coordinator.

2. Sends election message to higher-ID processes.

3. If no response, P becomes coordinator.

4. If any higher-ID responds, P waits for new coordinator message.

b) Ring Algorithm:

 All nodes arranged in logical ring.

 Election message circulates around ring collecting IDs.

 Node with highest ID becomes coordinator.

2.8 Distributed Deadlock Detection


Deadlock: A set of processes are blocked waiting for each other’s resources.

Detection Techniques:

1. Centralized Deadlock Detection:

o One site maintains global Wait-For Graph (WFG).

o Checks for cycles = deadlock.

2. Distributed Deadlock Detection:

o Each site keeps local WFG.

o Messages passed between sites to detect cycles.

o Example: Path-pushing algorithm

3. Hierarchical Detection:

o Sites organized in a hierarchy.

o Deadlock detection escalated up the hierarchy.

Common questions

Powered by AI

Mutual exclusion algorithms like the Token Ring and Ricart-Agrawala employ different mechanisms to ensure exclusive access to critical sections. The Token Ring algorithm organizes nodes in a logical ring, circulating a token that grants the holder permission to enter the critical section. A node can access the critical section only when it possesses the token, ensuring only one process has access at any time. The Ricart-Agrawala Algorithm uses timestamped messages, where a node sends a request to all other nodes and waits for replies. Other nodes grant access based on the timestamps, ensuring ordered access and eliminating conflicts from concurrent requests .

RPC and RMI simplify communication by abstracting the communication details between processes on remote systems. RPC allows a process on one machine to execute a procedure on another, hiding the complexities of network communication. RMI, an object-oriented variant of RPC, extends this concept by allowing Java-based applications to invoke methods on remote objects seamlessly. Both models provide a framework that developers can use to make remote interactions appear as if they occur locally, thus facilitating distributed application development .

Designing for transparency in distributed systems involves ensuring users do not need to understand the complexities behind resource locations, access processes, concurrency, and failure handling. Location transparency allows users to access resources without knowing their physical locations, while access transparency ensures uniform operation regardless of resource placement. Concurrency transparency allows multiple users to interact with resources simultaneously without conflicts. Failure transparency enables systems to recover from failures without user involvement. These considerations enhance user experience by making the system intuitive and reliable, providing a seamless, efficient interaction with distributed resources .

Distributed systems employ mechanisms such as load balancing, process migration, and global scheduling for resource management. Load balancing distributes workload evenly across nodes to prevent bottlenecks. Process migration moves processes between nodes to optimize resource use and performance. Global scheduling oversees resource allocation on a system-wide scale, ensuring efficiency and workload management. These mechanisms are crucial as they prevent resource contention, optimize resource utilization, and maintain system stability and performance in distributed environments .

Election algorithms like Bully and Ring Algorithm are effective in selecting a coordinator by ensuring fairness and redundancy. The Bully Algorithm operates by allowing any process to initiate an election, with the highest-ID process becoming the coordinator. This method provides robustness and allows for quick adaptation to failures. The Ring Algorithm cycles messages through a logical ring, collecting IDs where the highest becomes the coordinator, balancing load amongst nodes. These algorithms enhance system reliability by ensuring coordination even in the face of node failures, although they introduce complexity and potential for delays during elections .

Middleware-based system architecture acts as a 'glue' to connect different distributed applications, providing a unified interface and communication framework. Middleware such as CORBA and RMI facilitates interoperability between diverse applications by abstracting underlying networking complexities. This approach allows seamless integration of heterogeneous systems, supports uniform service access, and simplifies application development and deployment, improving communication efficiency within distributed systems. Middleware thus bridges diverse components, enhancing system flexibility and reducing the burden on application developers .

A distributed operating system's key features are resource sharing, transparency, openness, scalability, fault tolerance, and reliability. Resource sharing allows users to access resources across various nodes efficiently. Transparency, including location, access, concurrency, and failure transparency, ensures that system intricacies are hidden from users, providing seamless interaction and handling failures gracefully. Openness refers to the use of standard protocols and interfaces for better compatibility and scalability allows the system to efficiently handle increases in workload by adding more resources. Fault tolerance and reliability involve techniques such as redundancy and replication to maintain performance despite failures, making distributed operating systems robust and efficient .

The client-server model features a centralized server providing services to multiple clients, which simplifies service provision but introduces a single point of failure, potentially limiting scalability and robustness. In contrast, the peer-to-peer model treats all nodes as equals, sharing resources without centralized coordination, resulting in enhanced robustness and scalability due to its distributed nature. This model avoids single points of failure, as the load is distributed across multiple nodes, improving the system's capacity to handle larger scales and recover from node failures more gracefully .

Centralized deadlock detection maintains a global Wait-For Graph (WFG) at one site, identifying deadlocks by detecting cycles—this central point can become a bottleneck. Distributed deadlock detection disperses the WFG across sites, with each site maintaining local graphs and communicating to detect cycles. This approach reduces bottlenecks but adds complexity in coordination. Hierarchical detection organizes sites into a hierarchy, detecting deadlocks through escalation, balancing the load and complexity between centralized and distributed approaches. Each method has trade-offs between speed, reliability, and complexity, impacting system performance .

Clock synchronization is critical in distributed systems because it ensures a consistent temporal order of events, which is essential for coordination, debugging, and maintaining data consistency. Without a global clock, different nodes may have varied interpretations of the time, leading to challenges in event ordering and coordination. This could result in race conditions or inconsistent data states. Synchronization solutions like Cristian's Algorithm, Berkeley Algorithm, and NTP address these by providing methods to adjust and synchronize time across various nodes, thus mitigating the issues arising from asynchronous clocks .

You might also like