Distributed 1
Distributed 1
School Of Informatics
CS Department
Assignment-1
ID : cs/we/133/12
Threads: Threads are the smallest unit of execution within a process. They
allow a program to perform multiple tasks concurrently by dividing the
processing workload into smaller units that can be executed independently.
Threads within the same process share resources such as memory and file
handles, but each thread has its own stack and program counter.
Process: A process is an instance of a running program on a computer
system. It consists of the program code, data, and resources required for
execution. Each process has its own memory space, file descriptors, and other
system resources. Processes are isolated from each other and communicate
through inter-process communication mechanisms.
Stateful Servers:
· Stateful servers maintain the state or context of client interactions
throughout the duration of a session. This means that the server keeps
track of client-specific information, such as session data, user
preferences, transaction history, etc.
Stateless Servers:
· Stateless servers do not store any client-specific state information
between requests. Each client request is treated as an independent and
self-contained transaction, with no dependency on previous requests.
Load Balancing:
· Code migration can be used for load balancing purposes in a distributed
system. When a particular node or server becomes overloaded with
requests, the system can dynamically migrate code (or processes) to
other nodes that have available resources to handle the workload more
efficiently.
Fault Tolerance:
· Code migration can also be used for fault tolerance in distributed
systems. If a node or server fails or becomes unresponsive, the system
can migrate the code running on that node to another healthy node to
ensure continuous operation and prevent service disruptions.
Performance Optimization:
· Code migration can help optimize performance in distributed systems
by moving code closer to the data it operates on or reducing network
latency between components. For example, if a particular computation
requires access to a specific dataset stored on a different node, the
system can migrate the code to that node to minimize data transfer
overhead.
Software Updates:
· Code migration is often used for deploying software updates or patches
in distributed systems. Instead of taking the entire system offline for
maintenance, the system can migrate code to different nodes
sequentially, ensuring that the service remains available during the
update process.
· By migrating code in a controlled manner, the system can minimize
downtime and disruptions caused by software updates while
maintaining continuous service availability