Ics 2403 Distributed Systems
Ics 2403 Distributed Systems
Ics 2403 Distributed Systems
W1-2-60-1-6
JOMO KENYATTA UNIVERSITY
OF
AGRICULTURE AND TECHNOLO7GY
University Examinations 2018/2019
FOURTH YEAR FIRST SEMESTER EXAMINATION FOR THE DEGREE
OF BACHELOR OF SCIENCE IN INFORMATION TECHNOLOGY
ICS 2403: DISTRIBUTED SYSTEMS
DATE: APRIL 2019 TIME: 2 HOURS
INSTRUCTIONS: ANSWER QUESTION ONE AND ANY OTHER TWO
QUESTIONS
1
ICS 2403
An example of a distributed system is the World Wide Web (WWW). The WWW consists of
a vast network of interconnected servers and clients spread across the globe. Web
pages and resources are distributed across these servers, and users can access them
using web browsers. The distributed nature of the WWW allows for efficient content
delivery, fault tolerance, and scalability.
d) Distinguish between local procedure call and remote procedure call. (4 Marks)
Local Procedure Call (LPC): In an LPC, a program or process calls a procedure or function
within the same address space or process. The procedure is executed directly, without
any inter-process communication or network overhead. LPCs are typically used for
communication between different modules or components within a single application.
Remote Procedure Call (RPC): In an RPC, a program or process calls a procedure or function
that resides on a different machine or address space. The calling process sends a
request to the remote machine over a network, and the remote procedure is executed
on the remote machine. The result is then sent back to the calling process. RPCs
enable communication and interaction between distributed components or systems.
Improved Performance: Replicating data across multiple nodes allows for parallel processing
and faster access to data. By having multiple copies of data distributed geographically, the
system can serve requests from the nearest replica, reducing latency and improving response
times.
Increased Fault Tolerance: Replication provides redundancy, which helps in maintaining data
availability and reliability. If one replica fails or becomes unavailable, other replicas can still
serve requests and provide access to the data. Replication also helps in data recovery and
disaster resilience by ensuring that data is not lost in case of failures or disasters.
2
ICS 2403
Availability, in the context of fault tolerance, refers to the ability of a system or service to
remain operational and accessible to users even in the presence of faults or failures. It
means that the system continues to provide its intended functionality and services
without any significant downtime or disruption.
In fault tolerance, availability is achieved by designing the system to handle failures
gracefully, such as by using redundancy, replication, and failover mechanisms. These
techniques ensure that if one component or node fails, another can take over its
responsibilities and continue providing the required services. The goal is to minimize
the impact of failures on the overall system availability and ensure that users can
access the system and its services without interruption.
Question Two (20 Marks)
Scalability: Distributed systems can scale horizontally by adding more machines or nodes to
the system. This allows for handling increased workloads and accommodating a
growing number of users or data without sacrificing performance.
Fault tolerance: Distributed systems are designed to be resilient to failures. By distributing
data and computation across multiple nodes, the system can continue to function even
if some nodes fail. Redundancy and replication techniques ensure data availability and
minimize the impact of failures.
Performance: Distributed systems can improve performance by parallelizing tasks and
distributing them across multiple nodes. This allows for faster processing and response
times, as well as the ability to handle larger workloads by leveraging the resources of
multiple machines.
Resource sharing: Distributed systems enable efficient resource sharing. Resources such as
data, storage, and processing power can be shared among multiple users or
applications, leading to better utilization of resources and cost savings.
Flexibility: Distributed systems offer flexibility in terms of geographical distribution and
mobility. Users can access resources and services from anywhere, and the system can
adapt to changes in the network or user requirements.
3
ICS 2403
b) Describe group communication and discuss any three (3) types. (4 Marks)
Event ordering: A global clock provides a common time reference for events
occurring in different nodes of a distributed system. It allows for ordering events and
establishing causality between events, which is crucial for maintaining consistency
and synchronization.
4
ICS 2403
a) Distributed systems increase connectivity and sharing. Describe four (4) security
issues brought about by increased connectivity. (8 Marks)
Unauthorized access: With increased connectivity, there is a higher risk of unauthorized
access to sensitive data or resources. Attackers may exploit vulnerabilities in the
system to gain unauthorized access, leading to data breaches or unauthorized use of
resources.
Data breaches: Increased connectivity increases the potential for data breaches. If proper
security measures are not in place, attackers can intercept or manipulate data during
transmission, leading to the exposure of sensitive information.
Malware and viruses: Increased connectivity provides more avenues for the spread of
malware and viruses. Attackers can exploit vulnerabilities in the system to introduce
malicious software, which can disrupt the system, steal data, or gain unauthorized
control.
Distributed denial of service (DDoS) attacks: Increased connectivity makes distributed
systems more susceptible to DDoS attacks. Attackers can overwhelm the system with
a flood of requests, causing it to become unresponsive or unavailable to legitimate
users.
The purpose of a firewall is to enforce security policies and control the flow of network traffic
between different networks or network segments. Firewalls act as a barrier between
trusted internal networks and untrusted external networks, such as the internet. The
main purposes of a firewall are:
Network security: Firewalls monitor incoming and outgoing network traffic and apply
security rules to allow or block specific types of traffic based on predefined policies.
They protect the network from unauthorized access, malicious activities, and network-
based attacks.
Access control: Firewalls can restrict access to specific resources or services based on IP
addresses, ports, protocols, or other criteria. They can prevent unauthorized users or
external entities from accessing sensitive resources or services.
Traffic filtering: Firewalls can filter network traffic based on various criteria, such as source
or destination IP addresses, port numbers, or application protocols. They can block or
5
ICS 2403
allow specific types of traffic, helping to prevent the spread of malware, viruses, or
other malicious activities.
Network segmentation: Firewalls can be used to create separate network segments or zones
with different security levels. This helps to isolate sensitive or critical resources from
less secure areas, providing an additional layer of protection.
Deadlock avoidance: This strategy aims to prevent deadlocks from occurring by carefully
managing resource allocation and ensuring that the system remains in a safe state. It
involves using algorithms and techniques to predict and avoid potential deadlocks by
analyzing resource requests and resource availability.
Deadlock detection and recovery: This strategy involves periodically checking the system for
the presence of deadlocks. If a deadlock is detected, the system can take actions to
recover from the deadlock, such as aborting processes or rolling back transactions.
Deadlock detection algorithms, such as the banker's algorithm or resource allocation
graph, can be used to identify deadlocks.
Deadlock prevention: This strategy focuses on designing the system in a way that eliminates
the possibility of deadlocks. It involves using techniques such as resource ordering,
ensuring that resources are always requested and released in a specific order, or using
preemption to forcibly release resources from processes to avoid potential deadlocks.
Deadlock avoidance with resource allocation: This strategy combines elements of deadlock
avoidance and deadlock detection. It involves dynamically allocating resources to
processes based on resource availability and resource request patterns. By carefully
managing resource allocation, the system can avoid potential deadlocks while still
allowing for efficient resource utilization.
a) How does a distributed denial of service work and what are the counter measures?
(8
Marks)
6
ICS 2403
impact of a DDoS attack by reducing the volume of malicious traffic reaching the
target.
Redundancy and load balancing: By distributing the load across multiple servers or
data centers, the impact of a DDoS attack can be minimized. Redundancy and load
balancing techniques ensure that even if one server or data center is targeted, the
system can continue to function by redirecting traffic to other available resources.
b) Using appropriate examples, discuss the three (3) types of faults that are usually
encountered in a distributed system. (6 Marks)
Network faults: Network faults occur when there are issues with the communication
infrastructure, such as network outages, packet loss, or high latency. These faults can
disrupt communication between nodes, leading to delays, failures, or inconsistencies
in the system.
Example: A distributed system experiences network faults when a network link between two
nodes fails, causing a loss of communication and potential data inconsistency.
Node failures: Node failures occur when one or more nodes in a distributed system become
unresponsive or crash. This can be due to hardware failures, software errors, or power
outages. Node failures can lead to data loss, service disruptions, or inconsistencies in
the system.
Example: In a distributed database system, a node failure can result in the loss of data stored
on that node, affecting the availability and integrity of the database.
Software faults: Software faults occur when there are bugs, errors, or vulnerabilities in the
software running on the nodes of a distributed system. These faults can lead to
incorrect behavior, crashes, or security breaches.
Example: A distributed messaging system experiences software faults when a bug in the
messaging software causes messages to be delivered to the wrong recipients or results
in message loss.
7
ICS 2403