Ics 2403 Distributed Systems

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

ICS 2403

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

Question One (30 Marks)

a) Outline any three (3) goals of a distributed system. (6 Marks)

Scalability: Distributed systems aim to handle increasing workloads by adding more


resources, such as servers or nodes, to the system. This allows the system to handle a
larger number of users or process more data without sacrificing performance.
Reliability: Distributed systems strive to provide high availability and fault tolerance. By
distributing data and computation across multiple nodes, the system can continue to
function even if some nodes fail. Redundancy and replication techniques are used to
ensure data integrity and minimize the impact of failures.
Performance: Distributed systems aim to 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.

b) Define a distributed system. (2 Marks)

A distributed system is a collection of independent computers or nodes that work together as a


single coherent system. These nodes communicate and coordinate with each other by
passing messages over a network. The goal of a distributed system is to provide a
unified view and access to resources, such as data or services, while hiding the
underlying complexity of the system's architecture.

c) Give any example of a distributed system. (2 Marks)

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.

e) Outline any three (3) distributed mutual exclusion algorithms. (6 Marks)

Lamport's Distributed Mutual Exclusion Algorithm: This algorithm is based on Lamport's


logical clocks and uses a token-based approach. Each process in the distributed system passes
a token to gain access to a critical section. The token is passed in a predetermined order,
ensuring that only one process can enter the critical section at a time.
Ricart-Agrawala Algorithm: This algorithm is a request-based approach where each process
sends a request to all other processes in the system when it wants to enter a critical section.
The process can enter the critical section only when it receives permission from all other
processes. This algorithm ensures mutual exclusion and prevents deadlock.
Maekawa's Algorithm: This algorithm is a voting-based approach that divides the processes
into mutually exclusive groups. Each process can request access to the critical section from
processes in other groups. A process can enter the critical section only when it receives votes
from a majority of the processes in its own group and at least one process from each other
group.

f) What is the goal of an election algorithm? (2 Marks)

The goal of an election algorithm in a distributed system is to elect a leader or coordinator


among a group of processes or nodes. The elected leader is responsible for coordinating and
managing the activities of the distributed system. Election algorithms ensure that only one
process becomes the leader at a time, even in the presence of failures or network partitions.
g) State any two (2) reasons for replicating data. (4 Marks)

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

h) Explain the meaning of availability as used in fault tolerance. (4 Marks)

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)

a) Describe the advantages of distributed systems. (10 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.

b) Describe the challenges of distributed systems. (10 Marks)

Network communication: Distributed systems rely on network communication for


coordination and data exchange. Network latency, bandwidth limitations, and network
failures can impact system performance and reliability.
Consistency and synchronization: Maintaining consistency and synchronization across
distributed nodes can be challenging. Ensuring that all nodes have the same view of
data and that updates are properly synchronized requires careful design and
coordination.
Fault tolerance and reliability: Dealing with failures and ensuring fault tolerance in a
distributed system is complex. Detecting failures, recovering from failures, and
maintaining data integrity in the presence of failures require robust mechanisms and
protocols.
Security: Distributed systems face security challenges such as unauthorized access, data
breaches, and attacks. Ensuring data confidentiality, integrity, and availability, as well

3
ICS 2403

as protecting against malicious activities, requires strong security measures and


protocols.
Complexity: Distributed systems are inherently complex due to the need for coordination,
communication, and synchronization among multiple nodes. Designing,
implementing, and managing distributed systems require expertise and careful
consideration of various factors.

Question Three (20 Marks)

a) List the basic transparencies that need to be supported by a distributed system.


(8
Marks)

Access transparency: Users should be able to access distributed resources, such as


files or services, without being aware of their physical location or distribution
across multiple nodes. The system should provide a unified and transparent view
of the resources.
Location transparency: The system should hide the physical location of resources
from users. Users should be able to access resources using a logical name or
identifier, regardless of where the resources are actually located.
Concurrency transparency: The system should handle concurrent access to shared
resources in a transparent manner. Users should not need to be aware of the
concurrent access or worry about synchronization issues.
Failure transparency: The system should hide the occurrence of failures from
users. Users should not be affected by failures of individual nodes or components,
and the system should continue to function properly.

b) Describe group communication and discuss any three (3) types. (4 Marks)

Multicast: In multicast communication, a message is sent from one process to a group of


processes. The message is delivered to all members of the group. Multicast allows for
efficient one-to-many communication and is often used for group coordination and
collaboration.
Broadcast: In broadcast communication, a message is sent from one process to all other
processes in the system. The message is delivered to every process, including the
sender. Broadcast is useful for disseminating information or updates to all processes in
a distributed system.
Anycast: In anycast communication, a message is sent from one process to the nearest or most
appropriate member of a group. The message is delivered to a single member of the
group, typically the one with the lowest cost or closest proximity. Anycast is used for
tasks that can be performed by any member of a group, such as load balancing or
distributed service discovery.

c) Why is global clock important in a distributed system? (8 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

Distributed algorithms: Many distributed algorithms, such as consensus protocols or


distributed mutual exclusion algorithms, rely on a global clock to coordinate actions
and ensure correct execution. The global clock provides a notion of time that can be
used for timeouts, scheduling, and coordination.
Performance analysis: A global clock enables performance analysis and monitoring of
a distributed system. It allows for measuring response times, latency, and other
performance metrics across different nodes. The global clock can help identify
bottlenecks, optimize resource allocation, and improve system performance.
Debugging and troubleshooting: A global clock can aid in debugging and troubleshooting
distributed systems. It provides a common time reference for logging and tracing events,
making it easier to analyze system behavior and identify the causes of issues or failures.

Question Four (20 Marks)

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.

b) Describe the purpose of a firewall? (8 Marks)

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.

c) Explain the four (4) main strategies of handling a deadlock. (8 Marks)

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.

Question Five (20 Marks)

a) How does a distributed denial of service work and what are the counter measures?
(8
Marks)

Distributed denial of service (DDoS) is an attack where multiple compromised


computers, known as botnets, flood a target system or network with a massive
amount of traffic or requests. This flood of traffic overwhelms the target system's
resources, causing it to become unresponsive or unavailable to legitimate users.
Countermeasures against DDoS attacks include:
Traffic filtering: Network administrators can implement traffic filtering
mechanisms to identify and block malicious traffic associated with DDoS attacks.
This can be done using firewalls, intrusion detection systems (IDS), or specialized
DDoS mitigation services.
Traffic diversion: By diverting traffic through a DDoS mitigation service or a
content delivery network (CDN), legitimate traffic can be separated from
malicious traffic. This allows the mitigation service to filter out the attack traffic
and only forward legitimate requests to the target system.
Rate limiting: Network devices can be configured to limit the rate of incoming
traffic to prevent overwhelming the target system. This can help mitigate the

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.

c) Briefly describe the following models with a diagram in each: (6 Marks)

(i) Mini computer model

The mini computer model is a centralized computing model that consists of a


few minicomputers interconnected by a communication network were each
minicomputer usually has multiple users simultaneously logged on to it. The
mainframe performs all the processing and storage tasks, while the terminals
are used only for input and output operations. The terminals are typically
connected to the mainframe through a network or serial connections.

7
ICS 2403

(ii) Work station model

The workstation model is a distributed computing model where each user or


client has their own powerful workstation or personal computer. Each
workstation is capable of performing its own processing and storage tasks.
Workstations are connected to each other through a network, allowing for
communication and resource sharing.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy