UNIT-III
1. Explain the term mutual exclusion.
Asynchronous programming provides opportunities for a program running other code
while waiting for a long-running task to complete.
2. What is deadlock?
Deadlock is the problem of multiprogramming system. Deadlock can be defined as the
permanent blocking of a set of processes that either complete for system resources.
3. Name the two types of messages used in Ricart-Agrawala's algorithm.
Two type of messages used by Ricart-Agrawala are REQUEST and REPLY and
communication channels are assumed to follow FIFO order. Site send a REQUEST message
to all other site to get their permission to enter critical section. A site send a REPLY message
to other site to give its permission to enter the critical section.
4. What are the conditions for deadlock?
Conditions should hold simultaneously for deadlock to occurare:
a) Mutual exclusion c)Hold and wait
b) No preemption d)Circular wait.
5. What is mutual exclusion?
Mutual exclusion in a distributed system states that only one process is allowed to
execute the critical section (CS) at any given time. In a distributed system, shared variables
or a local kernel cannot be used to implement mutual exclusion.
6. Which are the three basic approaches for implementing distributed mutual
exclusion? There are three basic approaches for implementing distributed
mutual exclusion
1.Token based approach 2.Non-token based approach
3.Quorum based approach
7. What are the requirements of mutual exclusion algorithms?
Requirements of mutual exclusion algorithms are
a. Freedom from deadlocks
b. Freedom from starvation
c. Strict fairness
d.Fault tolerance
8. What are the performance metric of mutual exclusion algorithm?
Performances metric are message complexity, synchronization delay, response time and
system throughput.
9. What is response time?
The time interval a request waits for its CS execution to be over after its request messages
have been sent out.
10. Which are the criteria for evaluating performance of algorithms for mutual exclusion?
Criteria for evaluating performance of algorithms for mutual exclusion are:
a. Band width consumed which is proportional to the number of messages sent in
each entry and exit operation.
b. Client delay incurred by a process at each entry and exit operation.
c. Throughput of the system.
11. What is the advantage if your server side processing uses threads instead of a single
process?
An important property of threads is that they can provide a convenient means of
allowing blocking system calls without blocking the entire process in which the thread is
running. This property makes threads particularly attractive to use in distributed systems as it
makes it much easier to express communication in the form of maintaining multiple logical
connections at the same time.
12. What is a phantom deadlock?
A deadlock that is detected 'but is not really a deadlock is called a phantom deadlock.
13. What is wait for graph?
The state of process-resource interaction in distributed systems can be modeled by a
bi- partite directed graph called a resource allocation graph. The nodes of this graph are
processes and resources of a system, and the edges of the graph depict assignments or
pending requests. A pending request is represented by a request edge directed from the node
of a requesting process to the node of the requested resource.
14. Explain Wait-die" method.
A non-preemptive approach. If a younger process is using the resource, then the older
process waits. If an older process is holding the resource, the younger process kills itself.
This forces the resource utilization graph to be directed from older to younger processes,
making cycles impossible. This algorithm is known as the wait-die algorithm.
15. List the deadlock handling strategies in distributed system.
There are three strategies for handling deadlocks, viz, deadlock prevention, deadlock
avoidance, and deadlock detection.
16. What do you mean by deadlock avoidance?
Deadlock avoidance depends on additional information about the long term resource
needs of each process. The system must be able to decide whether granting a resource is safe
or not and only make the allocation when it is safe. When a process is created, it must declare
its maximum claim, i.e. the maximum number of unit resource The resource manager can
grant the request if the resources are available.
17. Define dead lock detection in distributed systems.
Deadlock detection requires examination of process-resource interaction for the
presence of cyclic wait.
18. What is Chandy-Misra-Haas Algorithm?
A blocked process determines if it is deadlocked by initiating a diffusion
computation. processes in its dependent set. If an active process receives a query or reply
message, it discards it. all the query messages it has sent out.
19. What is OR Model?
Set of Deadlocked processes, where each process waits to receive messages from
other processes in the set.
20. What is AND Model?
Set of deadlocked processes, where each process waits for resource held by another
process.
Use AND condition.
The condition for deadlock in a system using the AND condition is the existence of a cycle.
21. Define Deadlock Avoidance.
Decision made dynamically, before allocating are source, the resulting global system
state is checked, if it is safe state then allow for allocation.
Because of the following drawback, deadlock avoidance can be impractical in distributed
system.