6th Unit Answers
6th Unit Answers
6th Unit Answers
A Parallel Virtual Machine (PVM) is a software development tool that enables multiple computing
systems to work together in parallel in order to execute a single application.
The PVM model is based on a virtual machine concept wherein all computers that are part of a
parallel computing configuration are treated as a single entity or “virtual” machine. This enables the
computing resources to be efficiently utilized as a single, unified computing machine rather than as
individual, separate systems.
One of the key features of PVM is its ability to support heterogeneous computing resources.
Different types of hardware, operating systems, and programming languages can be used in a PVM
environment, allowing for more flexibility in system design and integration.
The PVM system comprises of two main components: a master node that controls and coordinates
the parallel processing and the slave nodes that execute the processing tasks. The master node is
responsible for dividing the workload into small, independent sections and distributing them to the
slave nodes for processing. The slave nodes, in turn, run the processing tasks assigned to them and
send the results back to the master node for further analysis or processing.
PVM can be used in various applications, such as scientific computing, computer graphics, data
mining, and artificial intelligence. It can also be used for parallelizing existing applications without a
need to re-write the entire application.
In summary, PVM is a powerful tool in parallel computing that allows multiple computers with
different architectures and operating systems to work together as a single computing entity. Its
ability to scale so effectively makes it a valuable tool in many application domains, especially when
large, complex systems need to be analyzed or processed.
So message passing means how a message can be sent from one end to the other end. Either it may
be a client-server model or it may be from one node to another node. The formal model for distributed
message passing has two timing models one is synchronous and the other is asynchronous.
In message-passing systems, processes communicate with one another by sending and receiving
messages over a communication channel. So how the arrangement should be done?
The pattern of the connection provided by the channel is described by some topology systems.
So by the definition of distributed systems, we know that they are geographically set of computers. So
it is not possible for one computer to directly connect with some other node.
The sender decides what data has to be sent over the network. An example is, making a phone call.
The data is only fully communicated after the destination worker decides to receive the data. Example
when another person receives your call and starts to reply to you.
There is no time barrier. It is in the hand of a receiver after how many rings he receives your call. He
can make you wait forever by not picking up the call.
3) Hybrids
1. Synchronous Message Passing
3. Hybrids
Hybrid message passing combines elements of both synchronous and asynchronous message ends. It
provides flexibility to the sender to choose whether to block and hold on for a response or continue
execution asynchronously. The choice between synchronous or asynchronous actions can be made
based on the specific requirements of the system or the nature of the communication. Hybrid message
passing allows for optimization and customization based on different scenarios, enabling a balance
between synchronous and asynchronous paradigms.
Q4) Basic Features of Message Passing
Message passing allows processes to share data, coordinate their activities, and respond to changes
in system. A well-designed message passing system can improve performance, reliability, and
scalability of a distributed system.
1)Reliability
Reliability is one of most important features of message passing in distributed systems. Messages
should be delivered to intended recipient, even in presence of failures, network delays, and other
issues. A reliable message passing system should provide guarantees that messages will be delivered
in a timely manner, without being lost, duplicated, or reordered.
2) Scalability
3) Flexibility
Flexibility is another feature of good message passing in distributed systems. A flexible message
passing system should allow for different types of messages, data formats, and protocols, to
accommodate needs of different applications and users.
4) Security
Security is a critical feature of message passing in distributed systems. A secure message passing
system should protect messages from unauthorized access, interception, or modification.
5) Performance
In the message passing paradigm, the functionality revolves around the communication between
processes or entities through explicit messages. Here's a detailed breakdown of its key aspects:
1. *Processes/Entities:*
- In a system, there are multiple independent processes or entities that need to communicate or
coordinate with each other.
- These processes can be running on the same machine or distributed across a network.
2. *Message:*
3. *Communication:*
- *Synchronous:* Processes communicate in a lockstep fashion, waiting for each other's response.
4. *Explicit Communication:*
- Unlike shared-memory systems where processes interact through a shared data space, message
passing requires explicit communication.
- Message passing facilitates coordination between processes, allowing them to work together on a
task.
- Synchronization mechanisms, such as message queues or channels, help control the order and
timing of message delivery.
- Each process can encapsulate its functionality and expose a well-defined interface for
communication, enhancing system maintainability.
8. *Fault Tolerance:*
- If one process fails, others can continue to operate, and mechanisms like message
acknowledgments can be used to handle failures gracefully.
9. *Scalability:*
- Message passing systems can scale well, as they allow for the distribution of tasks among multiple
processes or machines.
- This scalability is essential for handling large and complex computational tasks.
In summary, the message passing paradigm provides a structured way for processes to exchange
information, promoting modularity, scalability, and fault tolerance in various computing environments.
It's a fundamental concept in concurrent and distributed systems design.
*Blocking Communication:*
1. *Definition:*
- In blocking communication, a process that sends a message is blocked until the message is
received by the intended recipient.
- The sending process cannot proceed until confirmation of successful delivery or reception is
received.
2. *Synchronization:*
- Blocking communication enforces a form of synchronization between the sender and receiver.
- It ensures that the sender does not continue its execution until the receiver has received and
processed the message.
3. *Advantages:*
- Simplifies program logic, as the sender assumes that the message is successfully delivered before
moving on.
- Easier to reason about the state of the system at different points in time.
4. *Disadvantages:*
- May lead to inefficient resource utilization if processes spend a significant amount of time waiting
for communication to complete.
- Potential for deadlock if processes are waiting indefinitely for each other.
*Non-blocking Communication:*
1. *Definition:*
- In non-blocking communication, a process that sends a message does not wait for the message to
be received before continuing its execution.
2. *Asynchronous Operation:*
- Non-blocking communication allows for asynchronous operation, where processes can continue
their execution independently.
3. *Advantages:*
- Improved resource utilization as processes can perform other tasks while waiting for
communication to complete.
4. *Disadvantages:*
- Requires more complex program logic to handle situations where the sender and receiver are not
synchronized.
- Care must be taken to avoid race conditions and ensure data consistency.