Mt101 Dos Ppt
Mt101 Dos Ppt
Mt101 Dos Ppt
DISTRIBUTED
OPERATING SYSTEMS
ANJALI JADHAV
MT101
INTRODUCTION TO DISTRIBUTED
OPERATING SYSTEM
• Definition of (DOS):
A distributed OS manages a collection of
independent computers (nodes) that work
together to appear as a single system to users.
• Examples:
1. Google’s Android OS
2. Microsoft’s Windows Cluster
3. Hadoop
• Threads:
A thread is the smallest unit of execution within a
process.
Threads allow concurrent execution within a program,
making better use of CPU resources.
THREADS: BASICS
•Definition of a Thread
•A thread is a sequence of instructions that
can be scheduled to run independently.
•A process can have multiple threads, sharing
resources like memory and I/O.
•Thread Types
•User Threads: Managed by user-level
thread libraries.
•Kernel Threads: Managed by the operating
system kernel.
•Why Threads?
•Improve resource utilization.
•Enhance responsiveness and scalability.
MULTI-THREADING
MODELS
• Many-to-One
In the many-to-one model, many user-level threads
are all mapped onto a single kernel thread. Thread
management is handled by the thread library in
user space, which is efficient in nature.
• Many-to-Many
The many-to-many model multiplexes any number
of user threads onto an equal or smaller number of
kernel threads, combining the best features of the
one-to-one and many-to-one models.
• One-to-One
Each user thread maps to one kernel thread.
provides more concurrency, if one thread makes a
blocking call another thread is allowed to run.
Creating user thread requires creating
corresponding kernel thread.
THREADS IN DISTRIBUTED SYSTEMS
• Importance of Threads in DOS:
• Distributed systems often involve multiple tasks running
on different machines, making threads essential for
managing concurrency and communication.
• Threads can be distributed across different nodes of a
system, performing parallel tasks and enhancing system
performance.
• Thread Synchronization
• Mechanisms to ensure threads work correctly together without
conflicting.
• Challenges in distributed environments: clock synchronization,
distributed locks, and consistency protocols.
• Concurrency Issues:
• Handling race conditions, deadlocks, and thread starvation.
• Fault Tolerance:
• Dealing with thread failures, node crashes, and network partitioning in
distributed systems.
• Scalability:
• Efficient management of threads when the number of nodes or threads
increases.
• Latency:
• Communication delays and synchronization overhead can affect thread
performance.
EXAMPLES
• MapReduce (Hadoop):
• Use of threads to divide data processing tasks across nodes.
• Distributed Databases:
• Threads in systems like Google Spanner or Apache Cassandra, where multi-
threading is essential for handling high concurrency and large data volumes.
• Google Spanner:
• A globally distributed database system with a multi-threaded architecture that
coordinates threads for replication, consistency, and query processing.
• Web Servers:
• Each request can be handled by a separate thread running on different
machines.
• Threads communicate to access resources like databases, caching servers, etc.
EXAMPLE: MULTI-THREADED WEB SERVER
IN DISTRIBUTED SYSTEM
• Scenario: A distributed web server handling multiple client requests.
• Thread Role: Each incoming client request is handled by a separate
thread.
• Process:
• Client sends a request to the server.
• The server creates a thread to handle the request.
• The thread processes the request, retrieves data from distributed storage, and
sends a response.
• Key Takeaways:
• Threads are essential for efficient multitasking and parallelism in
distributed systems.
• Proper thread management ensures better system performance,
scalability, and fault tolerance.
• Future Trends:
• Evolution of thread management in cloud environments, edge
computing, and microservices architecture.
Thank You…