Distributed Computing Unit 1 & 2
Distributed Computing Unit 1 & 2
Distributed Computing Unit 1 & 2
PART-A
PART - B
Checkpoints : {𝐶𝑖,0, 𝐶𝑖,1}, {𝐶𝑗,0, 𝐶𝑗,1, 𝐶𝑗,2}, and {𝐶𝑘,0, 𝐶𝑘,1, 𝐶𝑘,2} • Messages : A - J • The restored global consistent state :
{𝐶𝑖,1, 𝐶𝑗,1, 𝐶𝑘,1}
restored state for 𝑃𝑗 , but the receive event has been undone at process 𝑃𝑖 . – Lost
delayed message – Message D: a lost message since the send event for D is recorded in the
messages can be handled by having processes keep a message log of all the sent messages –
Messages E, F: delayed orphan messages. After resuming execution from their
checkpoints, processes will generate both of these messages
9.b. Name and explain the different types of deadlock models with neat diagram
MODELS OF DEADLOCKS.
AND model, a process can request more than one resource simultaneously and the request is satisfied only after all the requested
resources are granted to the process. The requested resources may exist at different locations The out degree of a node in the WFG
for AND model can be more than 1. The presence of a cycle in the WFG indicates a deadlock in the AND model. Each node of the
WFG in such a model is called an AND node. In the AND model, if a cycle is detected in the WFG, it implies a deadlock but not
vice versa. That is, a process may not be a part of a cycle, it can still be deadlocked.
OR Model A process can make a request for numerous resources simultaneously and the request is satisfied if any one of the
requested resources is granted. Presence of a cycle in the WFG of an OR model does not imply a deadlock in the OR model. In the
OR model, the presence of a knot indicates a deadlock.
Each of the process is the set S is blocked. The dependent set for each process in S is a subset of S. 3. No grant message is in transit
between any two processes in set S. A blocked process P is the set S becomes active only after receiving a grant message from a
process in its dependent set, which is a subset of S.
XOR Model This is a variation of AND-OR model. This allows a request to obtain any k available resources from a pool of n
resources. Both the models are the same in expressive power. This favors more compact formation of a request. Every request in
this model can be expressed in the AND-OR model and vice-versa. Note that AND requests for p resources can be stated as and OR
requests for p resources can be stated
10.b. Illustrate the different types of failures in distributed systems and explain how to prevent it.
Types of failure
1. System failure : The primary reason for a system failure is a software or hardware failure. It is a suitable assumption that a
system failure always results in the loss of the contents of the primary memory, while the secondary storage remains safe.
Whenever there is a system failure, the processor fails to perform the execution. During a system failure, the system may reboot or
freeze.
2. Communication medium failure : The main reason for a communication medium failure is the failure of the communication
link or the shifting of nodes. A possible scenario can be a website within a network that is trying to communicate with another
operational website within the network, but is unable to establish the connection.
3. Secondary storage failure : If the information stored on the secondary storage device is inaccessible, it is called a secondary
storage failure. Secondary storage failure can be caused by several reasons. Some of the common reasons are listed as follows:
Node crash
Dirt on the medium
Parity error
4. Method failure : most often halts the distributed system. Moreover, it makes the system result in incorrect execution, or unable
to perform any execution at all. A system may enter a deadlock state or do protection violations during a method failure.