Distributed Systems
Distributed Systems
Notes
1. Introduction to Distributed Systems
A distributed system is a collection of autonomous computing elements (nodes) that appear
to users as a single coherent system.
Key Characteristics:
Independent Failures: Nodes can fail independently → need for fault tolerance.
Shared Resource Access: Users access distributed resources as if they were local.
Access Transparency Users should not know how they A file appears the same on
access a resource (local or different computers.
remote).
Location Transparency Users should not know where the Google Docs allows access from
resource is physically located. any location.
Replication Transparency Users should not know if multiple Content Delivery Networks
copies of a resource exist. (CDNs) store copies of a website
worldwide.
Failure Transparency Users should not notice if a failure Automatic failover in cloud
occurs. services.
Concurrency Transparency Multiple users can access Online banking systems handling
resources simultaneously without multiple transactions.
conflicts.
3. Openness
Example: Web browsers can access different websites due to HTTP standardization.
4. Scalability
Types of Scalability
3. Scaling Techniques
To make a system scalable, the following techniques are used:
3. Replication
3. Pervasive Computing
o Smart devices and IoT systems that integrate into daily life.
Types of Clusters
Example:
Example:
Key Features:
Virtualized resources.
Pay-as-you-go model.
Scalability.
IaaS (Infrastructure as a Service) Provides computing resources like AWS EC2, Google
VMs, storage. Compute Engine
Challenges:
Middleware Solutions
1. Transaction Processing Monitors → Coordinate distributed database transactions.
Example:
Examples:
10. Summary
Concept Key Points
Cluster Computing Parallel computing using homogenous machines connected via LAN.
Components of a Process
Thread Components
3. Stack: Each thread has its own stack for function calls.
Memory Shares memory with other threads Has its own memory space
in the same process
Execution Faster, since it does not require Slower due to memory allocation
memory allocation and OS involvement
Types of Contexts
1. Processor Context:
2. Thread Context:
Observations
Thread switching is cheaper than process switching (no need to involve the OS).
4. Multi-Threading Benefits
1. Avoid Blocking: A blocked thread does not block the entire process.
1. User-Level Threads
Pros:
Cons:
Pros:
Cons:
Pros:
Cons:
2. Hides Network Latency: The server can handle requests while waiting for data.
3. Better Use of Resources: Threads are more efficient than multiple processes.
Dispatcher/Worker Model
Example: A web server uses multiple threads to handle different HTTP requests
simultaneously.
7. Virtualization in Distributed Systems
Virtualization allows the creation of virtual versions of hardware, operating systems, or
network resources.
1. Resource Efficiency: Multiple virtual machines (VMs) can run on one physical
machine.
3. Isolation: VMs are independent and do not interfere with each other.
Types of Virtualization
5. Storage Virtualization: Combines multiple storage devices into one logical unit.
4. Minimized Communication Costs: Instead of sending large data sets, send code to
process data remotely.
1. Weak Mobility: Moves only the code segment (e.g., Java Applets).
Sending Client Code to Server: A client sends code to execute database operations
on the server.
Sending Server Code to Client: A web form validation script is executed on the
client instead of the server.
Types of IPC
1. Message Passing: