COMP 4126 STUDY NOTES
COMP 4126 STUDY NOTES
COMP 4126
DISTRIBUTED AND CONCURRENT SYSTEMS
Q1a. The concept of having autonomous systems linked by a common computer
network equipped with distributed systems software which forms the basis of
distributed computing.
Discuss what makes a distributed computing system unique.
ANSWER
Distributed computing is like teamwork for computers. Imagine a group of computers working
together on a task, connected through a network like a big virtual team. What makes distributed
computing special is how these computers share the workload and talk to each other.
In a regular computer setup, one powerful machine does all the work. In distributed computing,
tasks get divided among multiple computers. Each computer in the team works on its part of the
job, and they share information through the network.
One unique aspect is the independence of these computers. They can be far away from each
other, yet they collaborate seamlessly. This makes the system resilient – if one computer has a
problem, the others can keep going. It's like having a backup plan in case something goes wrong.
Communication is key in distributed systems. The computers need to talk to each other efficiently.
They share data and updates about the task they're working on. This communication ensures
everyone is on the same page, even if they are physically distant.
Another standout feature is scalability. If the workload increases, more computers can join the
team easily. It's like adding more players to a sports team when the game gets tougher. This
flexibility allows distributed systems to handle both small and large tasks effectively.
Security is a big concern in distributed computing. Since information travels through a network,
there's a need to make sure it's safe from unauthorized access. Special measures are taken to
protect data as it moves between computers, ensuring the system's integrity.
In summary, distributed computing stands out for its teamwork approach, independence of
computers, efficient communication, scalability, and attention to security. It's a smart
way for computers to collaborate, making tasks more manageable and resilient.
Q1b. In setting up distributed systems, the network engineer is tasked with setting
up a working model for the system to run on.
Write a comparative analysis on the distributed computing models you have
researched on.
ANSWER
In the realm of distributed computing, models play a crucial role in shaping system design and
functionality. The Fundamental Model and Architectural Model are the two distributed
computing models I have researched on.
Fundamental Model
The Fundamental Model encompasses the Iterative Model, the Failure Model, and the Security
Model. These fundamental models form the bedrock of understanding and structuring distributed
systems.
A. Iterative Model
The Iterative Model in distributed computing adopts a progressive approach, breaking down tasks
into manageable steps and accommodating changes as needed. It acknowledges communication
delays within the system, which may arise from factors like network latency. Despite these delays,
the model's iterative nature ensures adaptability and incremental progress, allowing developers
to identify and address issues gradually. The strength lies in its flexibility, resilience, and the
ability to handle the inherent complexities associated with timing in distributed environments.
B. Failure Model
The Failure Model in distributed computing deals with understanding and managing the various
types of failures that can occur in a distributed system. This includes
1. Failure Stop: A process halts and remains halted. Other processes can detect that the process
has failed.
2. Crash: A process halts and remain halted. Other processes may not be able to detect this state.
3. Omission: A message inserted in an outgoing message buffer never arrives at the other ends
incoming message buffer.
C. Security Model
The Security Model focuses on safeguarding the integrity, confidentiality, and availability of data
and services in a distributed system. It involves and requires designers to be aware of several
potential threats and implementing measures such as encryption, authentication, and access
control to protect against unauthorized access and malicious activities.
Architectural Model
A. Client-Server Model
It's like having a boss (the server) and workers (the clients). The boss has all the important
information and resources, while the workers ask for what they need. The boss manages
everything and responds to the workers' requests. This model makes it easy to organize tasks
and share resources. It's like teamwork with one central leader and multiple team members. But,
if the boss has a problem, it can affect everyone, so it's important to think about how to handle
such situations. Overall, the Client-Server Model is a simple and effective way for computers to
work together in a network.
B. Peer-Peer Model
In the Peer-to-Peer Model, all computers are like equal friends working together. Each computer
can both ask for things and share its own resources. There's no central leader like in the Client-
Server Model – it's more like everyone is on the same level. This setup is great for sharing and
collaborating, as each computer can contribute to the group. However, decisions might take a bit
longer because everyone has a say. It's like a group discussion where everyone has a voice, and
no one is in charge. This Peer-to-Peer Model is flexible and works well for tasks where
collaboration and sharing are essential, but it might need more coordination compared to the
clear structure of the Client-Server Model.
Q1c. State only, any four requirements needed with regards the establishment of
distributed system.
ANSWER
1) Concurrent Transaction
2) Fault Tolerance
3) Consistency of replicate data
4) Security and Reliability
Q2. One of the software components that complement the functionality of a
distributed system is the fundamental operating system which provides resource
support and a communication gateway for interlinked systems such as the
Network Operating System
(a) With the aid of a diagram discuss on Distributed Operating System
ANSWER
A Distributed Operating System (DOS) is like the manager of a team of computers working
together. It makes sure each computer uses its resources (like memory and processing power)
effectively and fairly. The DOS also helps these computers talk to each other smoothly, allowing
them to share information and work collaboratively. One important feature is its ability to handle
problems – if one computer has an issue, the DOS ensures the others keep working. It also takes
care of security, making sure data stays safe and private. As more computers join the team, the
DOS can handle the increased workload, making it a flexible and reliable system for distributed
computing. In simple terms, the DOS is the captain that ensures all the computers in a team work
well together, share resources, communicate effectively, stay secure, and can handle growth.
DOS: Manages the entire operating system environment, including resource allocation,
communication, and coordination across interconnected systems.
NOS: Primarily focuses on managing network-related functionalities such as file sharing, user
authentication, and network access, rather than overseeing the entire operating system.
2. Resource Management
DOS: Controls and allocates computing resources like CPU, memory, and storage across all
connected nodes, ensuring optimal performance.
NOS: Primarily concentrates on managing shared network resources and user access permissions
rather than directly controlling system resources.
3. Communication Handling
NOS: Emphasizes communication related to network activities, such as file sharing and user
access permissions.
4. Fault Tolerance
DOS: Incorporates mechanisms for fault tolerance, allowing the system to continue functioning
even if individual nodes experience failures.
NOS: Typically relies on the underlying operating systems of individual nodes for fault tolerance
within their specific domains.
5. Security Management
DOS: Ensures the confidentiality and integrity of data exchanged between nodes, implementing
security features at the operating system level.
NOS: Focuses on securing network-related activities, controlling access to shared resources and
ensuring data security during transmission.
DOS manages computer resources smartly, making sure they are used efficiently.
2. Easy to Grow
It's easy to add more computers to the system as it grows, handling more work without problems.
DOS can keep things running even if one computer has a problem, making the system more
reliable.
4. Smooth Communication
Acts like a good messenger, helping computers talk to each other easily and work together.
5. Central Management
DISADVANTAGES
1. Can be Complicated
Setting up and managing DOS can be a bit tricky and needs special knowledge.
2. Security Challenges
Keeping information safe in a big network is hard, and DOS needs to work extra to make sure
everything stays secure.
Managing lots of computers might slow things down a bit, affecting how fast the system works.
DOS relies a lot on computers talking to each other, so if the network has issues, it can cause
problems.
5. Risk of Breakdowns
Depending on how it's set up, if the main computer (server) has a problem, the whole system
might have issues.
Distributed systems can face issues if the connections between computers have problems, like
delays or failures. This can disrupt communication and cause parts of the system to stop working
correctly.
2. Mixed-Up Information
Keeping all computers in sync with the latest and correct information can be tricky. Sometimes,
due to network issues or delays, different computers might have different versions of the same
data, causing confusion and errors.
3. Security Worries
Because data travels between computers, there's a risk of someone unauthorized accessing or
tampering with it. Ensuring data is safe and only accessible to the right people becomes a
significant concern.
While distributed systems aim to keep working even if one part has a problem, managing these
breakdowns can be tough. If not set up carefully, a problem in one area might spread and affect
the whole system.
Q3. The Sierra Leone Commercial Bank (SLCB) operates on a strict top –
management structure having branches in almost all the districts in the country,
the core system the bank is using operates on a single communication gateway
and in recent years as the bank is opening more and more branches nationwide,
the single gateway portal is bound to having congestion, overflow of users and
slow revenue generation for the bank.
Thus, it is imperative for the IT Team to implement an alternative to better to
solve this issue and the solution of implementing a distributed system comes to
mind.
Using the extract above, explain on:
I. How distributed system works
ANSWER
A distributed system is a computing paradigm that involves multiple interconnected and
independent computers working together to achieve a common goal.
In the context of the Sierra Leone Commercial Bank (SLCB), implementing a distributed system
can help address the issues related to congestion, overflow of users, and slow revenue generation
by distributing the workload across multiple servers or nodes.
Instead of relying on one main computer, a distributed system uses several computers that talk
to each other.
2. No Single Boss
The computers communicate and coordinate their tasks. This helps them work smoothly without
conflicting with each other.
If one computer has a problem, the others can keep working. This makes the system more
reliable.
The workload is shared among the computers, preventing one from getting overloaded. This is
like dividing tasks among a group of people to get things done faster.
As the bank expands, more computers can be added to handle the increased work. It's like hiring
more employees when a company gets busier.
Important data is copied to different computers. This ensures that even if one computer has an
issue, the data is safe elsewhere.
Computers can work on different parts of a task at the same time, speeding up the overall process.
It's like a team where everyone contributes to finish a project quickly.
For the Sierra Leone Commercial Bank, this means setting up multiple communication gateways,
each handling a specific area. This way, they can serve customers better, avoid slowdowns, and
make their operations more efficient. The IT team will organize how these computers talk, share
information, and make sure everything runs smoothly.
II. The benefits of switching to a distributed system using the case study
above.
ANSWER
Switching to a distributed system for the Sierra Leone Commercial Bank (SLCB) promises a range
of compelling benefits, directly addressing the operational challenges outlined in the case study.
Firstly, the move is poised to significantly enhance overall performance. By distributing the
workload across multiple servers or nodes, the risk of congestion is drastically reduced. This not
only results in a smoother user experience but also ensures that the system operates at optimal
efficiency, mitigating issues associated with a single communication gateway becoming
overwhelmed.
Moreover, the adoption of a distributed system offers a strategic solution for accommodating the
bank's growth trajectory. As new branches are established nationwide, the system can seamlessly
scale by incorporating additional nodes. This scalability ensures that the infrastructure can
effortlessly handle the escalating demands in terms of user transactions and service provision.
The distributed nature of the system brings with it heightened reliability and fault tolerance. In
the event of a server failure or issue, others continue to function, safeguarding the uninterrupted
delivery of banking services. Faster response times for customer transactions are a direct result
of the distributed system's capacity for parallel processing. The distributed system also stands
out for its cost efficiency, geographical reach, enhanced data security, and adaptability to future
technologies, promising a more resilient, scalable, and efficient operational framework for the
SLCB.
Q3b. The communication in Distributed System uses one or more of the standard
communication protocols, there are certain issues that arise from using such
protocol.
Discuss the following issues with typical examples for each:
(a) Remote Procedure Calls (RPC)
ANSWER
RPC is a protocol that one program can use to request a service from another program on a
network without having to understand the network details.
1. Network Delays
Issue: RPCs might take longer because of network delays, causing a delay in getting information.
Example: Imagine checking your bank balance online – sometimes, it takes a bit longer to show
the balance due to delays in the network.
2. Reliability Hiccups
Issue: Ensuring that all parts of an RPC either work completely or fail together can be tricky.
Sometimes, things might partially work, leading to confusion.
Example: If you're sending a big file using RPC and something goes wrong halfway through, it's
hard to make sure either the whole file gets there or none of it does.
3. Security Worries
Issue: RPCs going over networks might be at risk of being spied on or tampered with, posing a
security threat.
Example: When making an online purchase, if someone manages to peek at or mess with the
RPC messages handling your payment, it could be a problem.
Issue: When a lot of RPCs are happening at the same time, it can be tough for the system to
keep up.
Example: If many people try to log in to a website all at once, the system might struggle to
process all the login requests quickly.
Issue: If the RPC system gets updated, older versions might not work well with the new one.
Example: Picture a messaging app – if you update it, your friend might have trouble if they're
using an older version because the RPC language has changed.
ANSWER
Remote Method Invocation (RMI) is a Java-based application programming interface (API) that
enables computer programs to talk to each other over the internet. It lets one Java program ask
another Java program, even if they're on different machines, to do something for it, like
performing a task or providing information. It's like making a request from one program to
another as if they were in the same place, even if they're far apart.
1. Slow Communication
Issue: Sometimes, talking between programs using RMI can be slow due to delays in the
network.
Example: Imagine using RMI to get real-time updates in a game, and there's a lag in the
communication, making the updates slower.
Issue: Making sure RMI calls always work and can handle errors can be tough, leading to
potential issues in distributed systems.
Example: If you're buying something online and an RMI call fails during the purchase, it might
leave the transaction incomplete.
3. Security Risks
Issue: RMI communication might have security risks, like someone trying to sneak in and access
information.
Example: Using RMI to send sensitive data, like personal details, could be risky if someone
intercepts the communication.
Issue: Dealing with errors in RMI calls and explaining what went wrong can be complicated.
Example: If an RMI call to update a database faces an issue, telling exactly what the problem is
to the user might be hard.
Issue: When a lot of people are making RMI requests at the same time, it can be tough for the
system to manage them all efficiently.
Example: In an online game where many players are using RMI for interactions, a sudden
increase in activity might slow things down.
6. Version Compatibility
Issue: Changes in how programs talk to each other using RMI can cause problems when different
versions are involved.
Example: If you update a messaging app using RMI, older versions of the app might not work
well with the updated version.
In simple terms, PVM is like a teamwork coordinator for computers. It creates a make-believe
world where they can share messages and work on tasks together. It's good at dividing big jobs,
smart enough to keep going even if one computer has a hiccup, and it helps computers
collaborate like a well-organized team. PVM makes sure the work is split well and that the team
can handle changes smoothly. It's a helpful tool for making computers team up and get things
done faster.
Q4. The application of distributed system is not only limited to the field of
technology rather it is a key player immense contribution in other disciplines as
well;
State and discuss 5 areas of which distributed systems are applicable.
ANSWER
Distributed systems have wide-ranging applications beyond technology, contributing significantly
to various disciplines. Let's discuss five areas where distributed systems play a crucial role:
Application: Distributed systems are extensively used in the financial and commercial sectors
for tasks such as online banking, electronic transactions, and stock trading. They enable secure
and efficient communication between various components of financial networks, ensuring real-
time processing of transactions, managing large-scale databases, and supporting electronic
payment systems.
Application: Distributed systems are fundamental to the functioning of the information society,
supporting services like social media platforms, search engines, and content delivery networks.
These systems enable users worldwide to access, share, and retrieve information seamlessly.
Content distribution, cloud computing, and collaborative platforms are examples of how
distributed systems shape the modern information landscape.
3. Healthcare
4. Education
Application: In the transportation and logistics industry, distributed systems are employed for
route optimization, tracking and monitoring shipments, and managing inventory. They enable
real-time communication between vehicles, warehouses, and distribution centers, ensuring
efficient logistics operations. Distributed systems also contribute to traffic management systems,
enhancing transportation efficiency in smart cities.
In each of these areas, the application of distributed systems enhances efficiency, scalability, and
collaboration, leading to improved services and outcomes.
b. This is the situation when two or more processes sharing the same resources
are effectively preventing each other from accessing these resources.
Discuss the following:
(a) Deadlock avoidance
ANSWER
(b) Prevention
ANSWER
Deadlock prevention involves taking measures to ensure that at least one of the necessary
conditions for deadlock cannot occur. This may include defining a protocol for how resources can
be requested and released or using various strategies to break the circular wait condition. For
example, if resources are numbered and processes are only allowed to request resources in
increasing order, circular waits can be avoided. Prevention strategies are implemented at the
design and coding stage to eliminate the possibility of deadlock occurrence.
ANSWER
Deadlock detection involves periodically checking the system state to determine whether a
deadlock has occurred. If a deadlock is detected, recovery mechanisms are initiated to break the
deadlock. Recovery can be achieved by preempting resources from some processes, killing
processes, or rolling back transactions. While detection and recovery mechanisms add some
overhead to the system, they allow it to continue functioning even if deadlocks occur, minimizing
the impact on system performance.
2. Hold and Wait: A process holding at least one resource is waiting to acquire additional
resources held by other processes.
4. Circular Wait: There must exist a circular chain of processes, each waiting for a resource
held by the next process in the chain.
To ascertain the possible occurrence of deadlock, these conditions need to be checked in the
system. If all four conditions hold simultaneously, there is a possibility of deadlock.
EXTRAS
Threads in Distributed Systems
What are Threads? Threads are small units of execution within a program.
In Distributed Systems: Threads can work across different machines, allowing tasks to be
done at the same time.
Benefits: They help in doing multiple things simultaneously and communicating between tasks.
In Distributed Systems: Processes can run on different machines, providing scalability and
handling failures.
Why They Matter: Processes work together, communicating to share information and balance
the load.
Relationship
Threads and Processes: Threads can be part of a process, and processes can run on different
machines in a distributed system.
Working Together: They cooperate to make sure tasks are done efficiently and the system is
robust.
Key Considerations
Communication: They need ways to talk to each other, like passing messages or sharing
information.
Scalability: Using threads and processes across machines helps the system handle more work.
In a nutshell, threads and processes in distributed systems let computers work together
efficiently, do many things at the same time, and handle problems gracefully.
Advantages
2. Dynamic Loading: RMI allows dynamic class loading, facilitating updates to classes without
system restarts.
4. Integration with Java: RMI seamlessly integrates with Java language features, libraries,
and tools.
Disadvantages
1. Java Dependency: RMI is tied to Java, limiting interoperability with systems implemented in
other languages.
3. Limited Platform Support: Primarily designed for Java, RMI may have limited use in
heterogeneous environments.
4. Performance Overhead: RMI can have higher overhead compared to more lightweight
communication protocols.
Remote Procedure Call (RPC)
Advantages
2. Widespread Protocol Support: Many RPC frameworks support multiple protocols like HTTP,
making them versatile.
3. Simplicity: RPC is often simpler to understand and use compared to more complex distributed
computing models.
4. Efficiency: Some RPC implementations can be lightweight and have lower overhead than
other communication models.
Disadvantages
1. Procedural Paradigm: RPC follows a procedural paradigm, which may be less intuitive for
developers accustomed to object-oriented programming.
2. Limited Object Support: RPC might not handle complex object-oriented structures as
elegantly as other distributed computing models.
3. Error Handling: Error handling in RPC can sometimes be less sophisticated than in more
advanced communication models.
4. Security Concerns: Depending on the implementation, RPC may have security vulnerabilities
if not configured properly
1. Physical Layer
Function: Transmits raw bits over a physical medium (e.g., cables, fibers).
Function: Frames data for reliable transmission over a link and handles error detection and
correction.
3. Network Layer
Function: Manages routing and forwarding of data packets between devices across different
networks.
4. Transport Layer
Function: Provides end-to-end communication, ensuring data integrity, flow control, and error
correction.
5. Session Layer
6. Presentation Layer
Function: Translates data between the application layer and the lower layers, handling data
format and encryption.
The OSI model serves as a conceptual framework to understand the different aspects of network
communication, and each layer has specific responsibilities to ensure a standardized and efficient
communication process.