You are on page 1of 11

1.

distributed program
 A distributed program is composed of a set of asynchronous processes
that communicate by message passing over the communication
network. Each process may run on different processor.
 The processes do not share a global memory and communicate by
passing messages. These processes do not share a global clock that is
instantaneously accessible to these processes.
 Process execution and message transfer are asynchronous – a process
may execute an action spontaneously and a process sending a message
does not wait for the delivery of the message to be complete.

2. Synchronous and asynchronous execution


Synchronous execution means the first task in a program must finish processing before
moving on to executing the next task whereas asynchronous execution means a second task
can begin executing in parallel, without waiting for an earlier task to finish.

Examples:

3. distributed system
Characteristics of Distributed System:

 Resource Sharing: It is the ability to use any Hardware, Software, or Data


anywhere in the System.
 Openness: It is concerned with Extensions and improvements in the system (i.e.,
How openly the software is developed and shared with others)
 Concurrency: It is naturally present in Distributed Systems, that deal with the
same activity or functionality that can be performed by separate users who are in
remote locations. Every local system has its independent Operating Systems and
Resources.
 Scalability: It increases the scale of the system as a number of processors
communicate with more users by accommodating to improve the responsiveness
of the system.
 Fault tolerance: It cares about the reliability of the system if there is a failure in
Hardware or Software, the system continues to operate properly without degrading
the performance the system.
 Transparency: It hides the complexity of the Distributed Systems to the Users
and Application programs as there should be privacy in every system.
 Heterogeneity: Networks, computer hardware, operating systems, programming
languages, and developer implementations can all vary and differ among dispersed
system components.
//

Advantages of Distributed Systems


 Better Performance: By using the resources of numerous computers to tackle the
workload, distributed systems can perform at higher levels than centralized systems.
 Cost Effectivity: Although distributed systems consist of high implementation costs,
they are relatively cost-effective in the long run. Compared to a mainframe computer,
where a single system is composed of several processors, the distributed system is made
up of several computers together. This type of infrastructure is far more cost-effective
than a mainframe system.
 Efficiency: Distributed systems are made to be efficient in every aspect since they
possess multiple computers. Each of these computers could work independently to solve
problems. This is not only considered to be efficient, but also it significantly saves time
for the user.
 Scalability: Distributed systems are made on default to be scalable. Whenever there is
an increase in workload, users can add more workstations. There is no need to upgrade
a single system. Moreover, no restrictions are placed on the number of machines. This
means that these machines will be able to handle high-demand workloads easily.
 Reliability: Distributed systems are far more reliable than single systems in terms of
failures. Even in the case of a single node malfunctioning, it does not pose problems to
the remaining servers. Other nodes can continue to function fine.
 Geographic Distribution: Geographic distribution is a feature of distributed systems
that enables them to offer services to users in various areas.
 Reduced Cost: Because distributed systems can make use of existing resources rather
than needing to buy new gear, they can be less expensive than centralized systems.
 Flexibility: Distributed systems are adaptable and can be tailored to fit a variety of
needs, making them suitable for a wide range of applications.
 Fault Tolerance: The ability to continue operating even when one or more nodes fail is
known as fault tolerance, and distributed systems can be built to be fault-tolerant.
 Reduced Latency: Distributed systems result in low latency. If a particular node is
located closer to the user, the distributed system makes sure that the system receives
traffic from that node. Thus, the user could notice much less time it takes to serve them.
 Security: Data breaches and illegal access can be prevented by including security
safeguards in distributed systems.
Disadvantages of Distributed Systems:
 Compatibility: In a distributed system, compatibility across multiple nodes and
software systems can be a problem since they may employ various hardware, software,
or protocols.
 Startup Cost: Compared to a single system, the implementation cost of a distributed
system is significantly higher. The infrastructure used in a distributed system makes it
expensive. In addition to that, the constant transmission of information and processing
overhead further increases the cost.
 Security: Distributed systems always come with security risks since it contains open
system characteristics. The data of the user is stored in different workstations. Thus, the
user needs to make sure that their data is secured in each of these computers. Moreover,
unlike in a centralized computing system, it is not an easy task to manage data access in
a distributed system.
 Overheads: Overheating is a common problem faced by a distributed system. This
happens when all the workstations try to operate at once. Even though this essentially
brings desired results, eventually there will be an increase in computing time. This
ultimately impacts the system’s response time.
 Testing and Debugging: Because of the complexity of the system or the interactions
between many nodes, testing and debugging distributed systems can be difficult.
 Network Dependency: Distributed systems are prone to network errors which result in
communication breakdown. The information may fail to be delivered or not in the
correct sequence. And also, troubleshooting errors is a difficult task since the data is
distributed across various nodes.
 Consistency: Data consistency can be difficult to ensure across several nodes and may
call for the deployment of intricate algorithms and protocols.
 Complexity: The difficulty involved in implementation, maintenance, and
troubleshooting makes the distributed system a complex strategy. Besides hardware
complexity, distributed systems possess difficulty in software too. The software used in
distributed systems needs to be well-attentive when handling communication and
security.

4. parallel system versus distributed system

Parallel computing is a type of computation in which many calculations or the


execution of processes are carried out simultaneously. The idea behind parallel
computing is to perform multiple tasks simultaneously, dividing the work between
multiple processors, to get a solution faster.
In a distributed computing system, each computer works on a portion of the problem,
and the results from each computer are combined to obtain the final solution.

5. Features of distributed system (refer Qno: 3)

6. Models of communication network

The three main types of communication models in distributed systems are:

 FIFO,
 Non-FIFO
 causal ordering.

 In the FIFO (first-in, first-out) model, each channel acts as a first-in first-out message
queue and thus, message ordering is preserved by a channel.
 In the non-FIFO (N-FIFO)model, a channel acts like a set in which the
sender process adds messages and the receiver process removes
messages from it in a random order.

 The “causal ordering” model is based on Lamport’s “happens before”


relation.

The relation between the three models is given by CO  FIFO  N-FIFO.

7. NTP (Network Time Protocol )

Network Time Protocol (NTP) is a protocol that helps the


computers clock times to be synchronized in a network. This protocol is
an application protocol that is responsible for the synchronization of hosts
on a TCP/IP network.
This is required in a communication mechanism so that a seamless
connection is present between the computers.
Goals:

Features of NTP :
Some features of NTP are –
 NTP servers have access to highly precise atomic clocks and GPU clocks
 It uses Coordinated Universal Time (UTC) to synchronize CPU clock time.
 Avoids even having a fraction of vulnerabilities in information exchange
communication.
 Provides consistent timekeeping for file servers

Advantages of NTP :
 It provides internet synchronization between the devices.
 It provides enhanced security within the premises.
 It is used in the authentication systems like Kerberos.
 It provides network acceleration which helps in troubleshooting problems.
 Used in file systems that are difficult in network synchronization.
Disadvantages of NTP :
 When the servers are down the sync time is affected across a running
communication.
 Servers are prone to error due to various time zones and conflict may occur.
 Minimal reduction of time accuracy.
 When NTP packets are increased synchronization is conflicted.
 Manipulation can be done in synchronization.

8. Global State of a Distributed System


 The global state of a distributed system is a collection of the local states of its
components, namely, the processes and the communication channels.

 The state of a process at any time is defined by the contents of processor registers, stacks,
local memory, etc. and depends on the local context of the distributed application.
Distributed Garbage Collection

Objects are identified as garbage when there are no longer any references to them
in the system.
Garbage collection reclaims memory used by those objects.
In figure a, process p2 has two objects that do not have any references to other
objects, but one object does have a reference to a message in transit. It is not
garbage, but the other p2 object is.
Thus we must consider communication channels as well as object references to
determine unreferenced objects.
Deadlock Detection
A distributed deadlock occurs when each of a collection of processes waits for
another process to send it a message, and there is a cycle in the graph of the waits-
for relationship.
In figure b, both p1 and p2 wait for a message from the other, so both are blocked
and the system cannot continue
Termination Detection
It is difficult to tell whether a distributed algorithm has terminated. It is not
enough to detect whether each process has halted.
In figure c, both processes are in passive mode, but there is an activation request
in the network.
Termination detection examines multiple states like deadlock detection, except
that a deadlock may affect only a portion of the processes involved,
while termination detection must ensure that all of the processes have completed.
Distributed Debugging
Distributed processes are complex to debug. One of many possible problems is
that consistency restraints must be evaluated for simultaneous attribute values in
multiple processes at different instants of time.
9. Causal ordering in distributed system

10. Happens –before relation ( refer Qno.9)

You might also like