Distributed Computing
Distributed Computing
QUESTION ONE
a) Describe.
i) Distributed OS (2marks).
- It is a software over a collection of independent, networked, communicating, and physically
separate computational nodes.
Distributed computing - there was a need for a communication mechanism that would
enable efficient and reliable interaction between distributed components.
Productivity and efficiency - enhances developer productivity and code maintainability by
abstracting the complexities of network programming.
Authentication - used to verify the claimed identity of a user, client, server, host, or other entity.
Authorization - check whether that client is authorized to perform the action requested.
Auditing - auditing tools are used to trace which clients accessed what, and which way.
g) Describe.
i) Role of a distributed OS designer (2marks).
h) Define.
i) Bully algorithm (2marks).
- processes have unique IDs, and the process with the highest ID is elected as the leader.
When a process detects the absence of a leader, it initiates an election by sending an election
message to all processes with higher IDs.
i) Explain how you can ensure your web service remains active even if there is a hardware or
software issue (4marks).
Recovery - process of restoring a system or data to a consistent and usable state after a
failure or disruption.
Redundancy - replicating critical hardware and software components, so that if one of them
fails, the others can be used to continue.
Distributed control - to avoid single points of failure.
Authentication - used to verify the claimed identity of a user, client, server, host, or other entity.
Authorization - check whether that client is authorized to perform the action requested.
Auditing - auditing tools are used to trace which clients accessed what, and which way.
QUESTION TWO
b)
i) Define deadlock (2marks).
- Deadlock is a situation in a concurrent system where two or more processes are unable to
proceed because each is waiting for another to release a resource.
d) A process runs in one node and accesses data from another node, for load balancing, it
relocates to a different node. Describe transparencies for this process (6marks).
Access - hides differences in data representation and how a resource is accessed by a user.
Location - hides where exactly the resource is located physically.
Scaling - allows the system and applications to expand in scale without change to the system
structure or the application algorithms.d
e)
i) Major threats facing distributed systems (4marks).
Interception - situation that an unauthorized party has gained access to a service or data.
Interruption - situation in which services or data become unavailable, unusable, destroyed,
and so on.
Modification - involve unauthorized changing of data.
Fabrication - additional data or activity are generated that would normally not exist.
ii) Security mechanisms (4marks).
Encryption - transforms data into something an attacker cannot understand.
Authentication - used to verify the claimed identity of a user, client, server, host, or other entity.
Authorization - check whether that client is authorized to perform the action requested.
Auditing - auditing tools are used to trace which clients accessed what, and which way.
iii) Discuss the CIA triad with regards to distributed systems (6marks).
Integrity - refers to maintaining the accuracy, consistency, and trustworthiness of data and
resources throughout their lifecycle, even in the presence of malicious attacks, errors, or
failures.
Availability - refers to ensuring that resources, services, and applications are accessible and
operational when needed, despite failures, disruptions, or attacks.
QUESTION THREE
a)
Bully - processes have unique IDs, and the process with the highest ID is elected as the
leader. When a process detects the absence of a leader, it initiates an election by sending an
election message to all processes with higher IDs.
Ring - processes are organized in a logical ring structure. When a process detects the
absence of a leader, it initiates an election by sending an election message along the ring.
Centralized - a single process is responsible for coordinating the election process. When a
failure occurs or a new coordinator needs to be elected, processes send their candidacy
requests to the centralized coordinator.
Distributed - distribute the election process among multiple processes without relying on a
centralized coordinator. Involve processes exchanging messages and reaching a consensus to
elect a new coordinator.
Token ring - processes pass a token around the ring. The process holding the token acts as
the coordinator. When a process detects the failure of the current coordinator, it initiates an
election by circulating the election token around the ring.
c)
i) Define distributed shared memory (2marks).
- Is a type of service that manages the memory across multiple nodes so that applications
that are running will have the illusion that they are running on shared memory.
Memory Model.
Shared Memory System - in a shared memory system, all processors or cores access a single,
global address space.
Distributed Memory System - in a distributed memory system, each processor or node has
its own local memory.
Communication.
Shared Memory System - communication and data sharing occur implicitly through shared
memory.
Distributed Memory System - communication and data sharing occur explicitly through
message passing.
Programming Model.
Shared Memory System - Programming models for shared memory systems often use
threading APIs.
Distributed Memory System - programming models for distributed memory systems often
use message passing libraries.
Shared Memory System - scalability is limited by the number of processors or cores sharing
the global memory.
Distributed Memory System - can scale to a larger number of nodes and processors by
adding more nodes to the network.
- Can handle large and `complex databases without sending data to the processor.
QUESTION FOUR
a)
Bully - processes have unique IDs, and the process with the highest ID is elected as the
leader. When a process detects the absence of a leader, it initiates an election by sending an
election message to all processes with higher IDs.
Ring - processes are organized in a logical ring structure. When a process detects the
absence of a leader, it initiates an election by sending an election message along the ring.
Centralized - a single process is responsible for coordinating the election process. When a
failure occurs or a new coordinator needs to be elected, processes send their candidacy
requests to the centralized coordinator.
Distributed - distribute the election process among multiple processes without relying on a
centralized coordinator. Involve processes exchanging messages and reaching a consensus to
elect a new coordinator.
Token ring - processes pass a token around the ring. The process holding the token acts as
the coordinator. When a process detects the failure of the current coordinator, it initiates an
election by circulating the election token around the ring.
- Amazon Dynamo.
c)
- Can handle large and `complex databases without sending data to the processor.
Behaviour.
Memory Usage.
Call-by-Value - suitable for passing primitive data types such as integers, floating-point
numbers, and characters.
Call-by-Reference - suitable for passing large data structures, arrays, or objects where
copying the entire value is inefficient.
Modification Visibility.
Call-by-Value - changes made to the parameter within the function are not visible outside
the function.
Call-by-Reference - changes made to the parameter within the function are immediately
visible outside the function.
Infrastructure as a Service (IaaS) - Google Compute Engine (GCE) provides virtual machines
(VMs) running on Google's infrastructure.
Platform as a Service (PaaS) - Google App Engine (GAE) is a fully managed platform for
building and deploying web applications and services.
Software as a Service (SaaS) - Google Workspace (formerly G Suite) offers a suite of cloud-
based productivity and collaboration tools for businesses.
Database as a Service (DBaaS) - Google Cloud SQL provides managed database services for
MySQL, PostgreSQL, and SQL Server.
Function as a Service (FaaS) - Google Cloud Functions allows developers to deploy and run
event-driven serverless functions.