SPC 2401-DISTRIBUTED SYSTEM GROUP ASSIGNMENT
BSC INFORMATION TECHNOLOGY.
YEAR FOUR SEMESTER ONE
1. CT100/G/8763/20 GACHOKI PERMINUS.
2. CT100/G/7226/19 KIPSANG EVANS.
3. CT100/G/11774/20 MUNENE IAN.
4. CT100/G/8923/20 KINYANJUI DAVID.
Questions
1) Please choose ONE of the following activities and describe the activities associated with it,
detailing the process of distribution. [6 Marks]
a) Distributing tasks
b) Performing scalable concurrent operations
c) Remote Method Invocation
(2) What is a Middleware? What is its key role in Distributed Systems? [2 Marks]
(3) In reference to Client-Server Architecture:
a) Distinguish between the blocking and non-blocking message passing semantics.
b) State and explain the three semantics for reliable IPC protocol.
(4) Explain how File Tracking is achieved in non-Distributed file systems
(5) State the four generalized types of failures that can occur when an RPC call is made.
ANSWERS
1) Performing Scalable Concurrent Operations:
This involves executing multiple operations concurrently while maintaining scalability.
Here’s a detailed description of the associated activities and the process of distribution:
Activities:
Task Identification: Identify tasks suitable for concurrent execution, ensuring they can be divided
into smaller units that can run independently.
Concurrency Control: Implement mechanisms to control access to shared resources and prevent
conflicts among concurrently executing tasks.
Task Distribution: Distribute tasks across multiple processing units or nodes to maximize
parallelism.
Synchronization: Use synchronization techniques, such as locks or semaphores, to coordinate the
execution of concurrent tasks and manage shared data.
Scalability Optimization: Employ strategies to ensure that the system scales efficiently as the
number of tasks and processing units increases.
Fault Tolerance: Implement mechanisms to handle failures gracefully, ensuring that the system can
recover from faults without compromising overall performance.
Process of Distribution:
Task Decomposition: Break down the overall task into smaller subtasks that can be performed
concurrently.
Distribution Strategy: Choose an appropriate strategy for distributing tasks, considering factors like
load balancing and minimizing communication overhead.
Communication Protocol: Define a communication protocol for exchanging data and
synchronization information among the concurrently executing tasks.
Resource Allocation: Distribute tasks to available processing units based on factors like workload,
resource availability, and system topology.
Execution Monitoring: Monitor the execution of concurrent tasks to identify bottlenecks, optimize
resource utilization, and ensure overall system efficiency.
Dynamic Adaptation: Implement mechanisms for dynamically adjusting the distribution of tasks
based on changing system conditions, ensuring adaptability to varying workloads.
2) What is a Middleware? What is its key role in Distributed Systems?
Middleware: Middleware is software that acts as an intermediary between different applications,
services, or components in a distributed computing environment.
:It facilitates communication, coordination, and integration among distributed entities.
Key Role in Distributed Systems:
Communication Abstraction: Middleware provides a layer of abstraction, allowing applications to
communicate without being concerned about the underlying network details.
Interoperability: It enables interoperability between heterogeneous systems, allowing components
developed in different programming languages or running on different platforms to work together
seamlessly.
Distribution Transparency: Middleware abstracts the complexities of distributed systems, providing
transparency to developers and users regarding the location and distribution of resources.
Fault Tolerance: Middleware often includes mechanisms for handling faults and errors, enhancing
the reliability of distributed systems.
Concurrency Control: Middleware can provide tools for managing concurrent access to shared
resources in a distributed environment.
Security: Middleware can incorporate security features to ensure the confidentiality, integrity, and
availability of data and communications in distributed systems.
2) In reference to Client-Server Architecture:
a) Distinguish between blocking and non-blocking message passing semantics:
Blocking: In blocking message passing, the sender is blocked until the receiver acknowledges the
message.
Non-blocking: In non-blocking message passing, the sender continues its operation without
waiting for the receiver’s acknowledgment.
b) State and explain the three semantics for a reliable IPC protocol:
At-most-once: The message is delivered at most once. If a failure occurs before the
acknowledgment, the message may be lost.
At-least-once: The message is guaranteed to be delivered at least once. It may result in duplicate
messages due to failures and retries.
Exactly-once: Ensures that the message is delivered exactly once, without duplication. It requires
additional mechanisms to handle failures and deduplicate messages.
4) Explain how File Tracking is achieved in non-Distributed file systems:
File tracking in non-distributed file systems is typically achieved through metadata and file control
structures within the file system.
Each file is associated with metadata that includes information such as creation time, modification
time, file size, and ownership.
The file control structures maintain a directory hierarchy and relationships between files.
Metadata:
Metadata contains information about each file, including its location on the disk, permissions,
timestamps, and other attributes.
Changes to the file, such as modifications or updates, are reflected in the metadata to track the file’s
state.
Directory Structure:
The file system maintains a directory structure to organize files hierarchically.
Directories contain entries that map file names to their corresponding metadata and data locations.
Inodes:
Many file systems use inodes (index nodes) to store metadata associated with files.
Inodes include pointers to data blocks on disk, facilitating efficient file access.
File Control Blocks (FCBs):
FCBs are data structures associated with each file that store information needed
for file management.
They maintain links to the file’s metadata, facilitating operations such as opening,
closing, and updating files.
Access Control Lists (ACLs) and Permissions:
Non-distributed file systems often use access control lists and permissions to track and control file
access.
5) State the four generalized types of failures that can occur when an RPC call is made:
Sender Failure:
The client invoking the RPC call may fail before or after making the call.
If the client fails before making the call, the server may never receive the request.
Network Failure:
Communication issues or network failures can result in the loss of the RPC request or response.
Messages may be delayed, lost, or corrupted during transmission.
Server Failure:
The server may fail before or after processing the RPC request.
If the server fails before processing, the request may not be executed. If it fails after processing, the
response may not reach the client.
Partial Failure (Skewed Failure):
Some operations in an RPC call may succeed while others fail.
It introduces complexity in handling partial failures and requires mechanisms to maintain consistency.