MODULE 1: INTRODUCTION TO DISTRIBUTED
SYSTEMS
Ultra‑High‑Quality Exam‑Oriented Notes (30–45 Minute Mastery)
(Structured • Conceptual • Algorithmic • Answer‑Ready)
1. Distributed Systems – Core Idea
Definition (Standard Exam Definition)
A distributed system is a collection of independent computers that communicate over a network and
appear to users as a single coherent system.
Key Observations
• Computers are autonomous (no shared memory)
• Communication occurs via message passing
• Users are unaware of distribution
Real‑Life Examples
• Google Search Engine
• Online Banking Systems
• Cloud platforms (AWS, Azure)
2. Characteristics of Distributed Systems
2.1 Resource Sharing
Meaning: Sharing of hardware, software, and data across multiple machines.
Examples: - Shared printers - Distributed file systems (Google File System) - Cloud computing resources
2.2 Openness
Meaning: Ability to extend, modify, and interoperate using standard interfaces.
Key Aspects: - Interoperability - Portability - Extensibility
1
Examples: HTTP, POSIX, REST APIs
2.3 Concurrency
Meaning: Multiple processes execute simultaneously.
Advantages: - Better performance - Efficient resource utilization
Problems: - Race conditions - Deadlocks - Data inconsistency
2.4 Scalability
Meaning: Ability to grow without performance degradation.
Types of Scalability: - Size scalability (users/nodes) - Geographic scalability (distance) - Administrative
scalability (domains)
Examples: DNS, CDNs
2.5 Fault Tolerance
Meaning: Ability to continue functioning despite failures.
Techniques: - Replication - Redundancy - Recovery mechanisms
Examples: RAID, Web server clusters
3. Transparency in Distributed Systems
Transparency hides the complexity of distribution from users.
Types of Transparency (Very Important for Exams)
Type Meaning Example
Access Same access method Local vs remote file
Location Hides location URLs
Concurrency Hides simultaneous access Databases
Replication Hides copies CDNs
2
Type Meaning Example
Failure Hides failures Automatic failover
4. Hardware Concepts
• Multiprocessor systems
• Computer networks
• LAN
• WAN
• Networking devices: routers, switches
• Distributed storage systems
5. Software Concepts
• Distributed Operating Systems
• Middleware
• Distributed file systems
• Distributed databases
• Distributed algorithms
• Communication protocols
6. Distributed Operating Systems (DOS)
Definition
A Distributed OS manages multiple independent machines and presents them as one unified system.
Features
• Global resource management
• Load balancing
• Process migration
• Distributed file system
Distributed OS vs Traditional OS
Feature Traditional OS Distributed OS
Resource Management Local Global
Scalability Low High
3
Feature Traditional OS Distributed OS
Fault Tolerance Limited High
Examples of Distributed OS
• Amoeba
• Sprite
• Plan 9
7. Network Operating System (NOS)
Definition
An OS that provides network services, but users are aware of multiple machines.
Network OS vs Distributed OS
Feature Network OS Distributed OS
Transparency Low High
System Image Multiple Single
Communication Explicit Transparent
Examples: Windows Server, Linux + Samba
8. Communication in Distributed Systems
8.1 Layered Protocols
OSI Model (7 Layers): Physical → Application
8.2 TCP/IP Model
Layer Examples
Application HTTP, FTP
Transport TCP, UDP
Network IP
4
9. Client–Server Model
Definition
Clients request services; servers provide services.
TCP Communication Steps (Algorithm Form)
1. Server creates socket and listens
2. Client connects
3. Data exchange
4. Connection termination
Advantages
• Centralized management
• Easy updates
Disadvantages
• Bottleneck
• Single point of failure
10. Remote Procedure Call (RPC)
Definition
Allows a program to call a procedure on a remote machine as if it were local.
Components
• Client stub
• Server stub
• RPC runtime
RPC Working (Algorithm)
1. Client calls stub
2. Parameters marshalled
3. Message sent
4. Server executes procedure
5. Result returned
5
11. Processes in Distributed Systems
Definition
A process is a program in execution.
Process States
New → Ready → Running → Waiting → Terminated
Challenges
• Load balancing
• Process migration
• Global identification
12. Threads
Definition
A thread is a lightweight process.
Advantages
• Faster context switching
• Better CPU utilization
Thread Types
Type Managed By Note
User‑level Application Fast, no parallelism
Kernel‑level OS True parallelism
Threads vs Processes
Feature Threads Processes
Overhead Low High
Fault Isolation Poor Good
6
13. Synchronization in Distributed Systems
Need for Synchronization
• Data consistency
• Correct execution order
Challenges
• No global clock
• Message delays
• Partial failures
14. Clock Synchronization
Physical Clocks
• NTP
• GPS
Logical Clocks
• Lamport timestamps
• Vector clocks
15. Distributed Mutual Exclusion
15.1 Centralized Algorithm
• Single coordinator
• Simple but failure‑prone
15.2 Lamport’s Algorithm
Concept: Logical timestamp ordering
Algorithm Steps: 1. Broadcast request 2. Receive replies 3. Enter critical section 4. Send deferred replies
Message Complexity: 2(N−1)
7
15.3 Ricart–Agrawala Algorithm
Improvement: No release messages
Steps: 1. Broadcast request 2. Receive replies 3. Enter critical section
Message Complexity: (N−1)
15.4 Maekawa’s Algorithm
Concept: Voting (Quorums)
Steps: 1. Request votes 2. Enter CS when all votes received 3. Release votes
Message Complexity: O(√N)
Issue: Deadlock possible
16. Deadlock in Distributed Systems
Definition
A condition where processes wait indefinitely for resources.
Handling Techniques
• Prevention
• Avoidance
• Detection & recovery
17. High‑Yield Exam Answers (One‑Liners)
• Distributed system: Many computers, one system
• Transparency: Hiding distribution
• RPC: Remote function call
• Thread: Lightweight process
• Scalability: Growth without degradation
8
18. Final 10‑Minute Revision Checklist
✔ Definition & characteristics ✔ Transparency types ✔ DOS vs NOS ✔ Client–Server & RPC ✔ Threads vs
Processes ✔ Mutual exclusion algorithms
These notes are designed to score full marks in theory exams.