Archives: Questions
Answer & Solution
In distributed systems, election algorithms assume that a unique priority number is associated with each active process in the system.
Election algorithms are meant for electing a coordinator process from among the currently running processes in such a manner that at any instance of time there is a single coordinator for all processes in the system.
Election algorithms are based on the following assumptions
- Each process in the system has a unique priority number.
- Whenever an election is held, the process having the highest priority number among the currently active processes is elected as the coordinator.
- On recovery, a failed process can take appropriate actions to rejoin the set of active processes.
Answer & Solution
In case of failure, a new transaction coordinator can be elected by both the bully and ring algorithm.
The Ring Algorithm:- In this algorithm, we assume that the link between the process is unidirectional and every process can message to the process on its right only.
Bully algorithm:- In distributed computing, the bully algorithm is a method for dynamically electing a coordinator or leader from a group of distributed computer processes.
Answer & Solution
Transaction Coordinator:- The transaction coordinator at each site in a distributed system coordinates the execution of both local and global transactions initiated at that site. This component or module is not required in centralized DBMSs, as there is only one site in a centralized system. The transaction coordinator at each site performs the following tasks to coordinate the execution of transactions initiated at that local site.
- It starts the execution of the transactions initiated at that site.
- it breaks the transactions into a number of subtransactions and distributes these sub-transactions to the appropriate sites for execution.
- It coordinates the termination of the transactions, which may result in the transactions being. committed at all sites or aborted at all sites.
Answer & Solution
Another method of providing mutual exclusion is the token-passing approach. In the token passing approach of distributed systems, processes are organized in a ring structure logically.
Answer & Solution
Synchronization in distributed systems is achieved via clocks. The physical clocks are used to adjust the time of nodes. For proper synchronization in distributed systems prevention of deadlock & starvation is a must.
Answer & Solution
A process can enter into its critical section when it receives a reply message from all other processes in the system.
Mutual exclusion is ensured by this algorithm. If two processes entered their critical sections at the same time, it would mean that each process sent a request, received the other process’s request, compared the time stamps, and found that the other process’s request had a lower timestamp than its own. This is not possible; therefore, mutual exclusion is ensured.
Answer & Solution
If a process is executing in its critical section no other process can execute in its critical section.
A solution to the critical-section problem must satisfy the following three requirements:
Mutual Exclusion: If the process is executing in its critical section, then no other processes can be executing in their critical sections.
Progress: If no process is executing in its critical section and there exist some processes that wish to enter their critical sections, then only those processes that are not executing in their remainder section can participate in the decision of which will enter its critical section next, and this selection cannot be postponed indefinitely.
Bounded Waiting: There exists a bound on the number of times that other processes are allowed to enter their critical sections after a process has made a request to enter its critical section and before that request is granted.
Answer & Solution
A process advances its logical clock when it receives a message whose timestamp is greater than the current value of its logical clock. If timestamps of two events are same, then the events are concurrent. In this Case, we may use process identity numbers to break ties and to create a total ordering.
Answer & Solution
In distributed systems, a logical clock is associated with each process. Logical clocks are a powerful tool used as a basic mechanism in a lot of applications run on top of asynchronous distributed systems. A logical clock system is made of a set of logical clocks (own per process) plus a protocol that manages their progress. A logical clock allows a process to timestamp its events.
0 thoughts on “All Subject Comments” >> Read here