Classification distributed mutual exclusion pdf




















Computers generally obtain logical time using interrupts to update a software clock. The more interrupts the more frequently time is updated , the higher the overhead. Process Synchroniztion Process synchronization is the set of techniques that are used to coordinate execution among processes. For example, a process may need to run to a certain point, at which point it will stop and wait for another process to finish certain actions. A shared resource, such as a file or fields in a database, may require exclusive access and processes have to coordinate among themselves to ensure that access to the resource is fair and exclusive.

Distributed processes often need to coordinate their activities. If a collection of processes share a resource or collection of resources, then often mutual exclusion is required to prevent interference and ensure consistency when accessing the resources. Critical Section CS enter : enter a critical section - block if necessary. In computer science, mutual exclusion MUTEX refers to a way of making sure that if one process is using shared modifiable data or resources then the other processes will be excluded from doing the same thing at the same time.

A number of mutual exclusion algorithms are available in the literature, with different performance metrics and with different techniques.

These mutual exclusion algorithms can be broadly classified into token and non-token based algorithm. Distributed Mutual Exclusion Any viable mutual exclusion algorithm must satisfy three properties: Safety At any instant, only one process may hold the resource. Liveness Processes should not wait forever for messages that will never arrive. Ordering If one request to enter the CS happened-before another, then entry to the CS is granted in that order.

When any process wants to enter a critical section, it sends a request message to the coordinator stating which critical section it wants to access. If no other process is currently in that critical section, the coordinator sends back a reply granting permission. When the reply arrives, the requesting process enters the critical section. If another process requests access to the same critical section, it is ignored or blocked until the first process exits the critical section and sends a message to the coordinator stating that it has exited.

Ring Based Algorithms Another approach is to create a logical or physical ring. Each process knows the identity of the process succeeding it. When the ring is initialized, Process 0 is given a token. When a process receives the token from its neighbor, it checks to see if it is attempting to enter a critical section. If so, the process enters the critical section and does its work, keeping the token the whole time.

After the process exits the critical section, it passes the token to the next process in the ring. No Starvation: Every site who wants to execute critical section should get an opportunity to execute it in finite time. Any site should not wait indefinitely to execute critical section while other site are repeatedly executing critical section Fairness: Each site should get a fair chance to execute critical section.

Any request to execute critical section must be executed in the order they are made i. Fault Tolerance: In case of failure, it should be able to recognize it by itself in order to continue functioning without any disruption.

Solution to distributed mutual exclusion: As we know shared variables or a local kernel can not be used to implement mutual exclusion in distributed systems. Message passing is a way to implement mutual exclusion. Below are the three approaches based on message passing to implement mutual exclusion in distributed systems: Token Based Algorithm: A unique token is shared among all the sites.

If a site possesses the unique token, it is allowed to enter its critical section This approach uses sequence number to order requests for the critical section. Each requests for critical section contains a sequence number. This sequence number is used to distinguish old and current requests. Token-ring algorithm is one of these algorithms. When a process holding the leader is called a surrogate-leader.

Ricart Agrawala Algorithm This algorithm [1], [3], [7] is an efficient way of achieving mutual exclusion in distributed systems. When a process want to access the shared resource it sends a message containing a unique identifier, name of the resource and timestamp.

When a process receives a request message it compares timestamp and the earliest wins. A algorithm are 1 It is very simple to understand and www. To simplify, assume there is only into critical section get equal chance, no processes one non-token-holding process, say process Pi in row will starve. Along with the advantages there are some m and column n, which is attempting to invoke its CS. The request message ReqMsg of regenerate it.

If number of processes in the system who the token-holding node is, it sends ReqMsg of increases, the waiting time per process will also process Pi to the next node below.

This action increase. Information based token passing algorithm that knows process Pk is the token-holding node, e. In information based token asking method [3], process Ph in Fig. Now, ReqMsg of process Pi is the processes are structured in a wrap around 2- sent directly to process Pk. There may be three type entering its CS has arrived to the token-holding node. Process Pi, after receiving the the row of token holding process, 3 token requesting token, informs all the nodes in its row that Pi is the process- sends request to the process below it.

Hence, all nodes in row m know that Pi is the token-holding process. To do this, process Pk after receiving the RelMsg message, multicasts RowRel messages to all nodes in its row, except itself. Process Pk waits until receiving Ack messages from all these nodes.

By arriving each Ack message from any process say process Pf , process Pk knows for certain that it has received all ReqMsgs sent through process Pf already. When process Pk receives the Ack messages from all these nodes i. Therefore, the responsibility of process Pk in managing the token and CS entering requests is finished. By info-based it is meant that from total nodes in This algorithm runs in worst case in terms of a distributed system, some nodes know the current message in the case of heavy load.

When all the nodes location of the token and forward CS entry requests to attempt to enter CS, there will not be any downward the token-holding node, directly. Therefore, in our forwarding of request. Table 1 shows the comparison info-based algorithm, CS entering requests are led to of token ring and info-based token asking algorithms the token-holding process directly through informed- nodes and the token is also sent from the token- G.

Multiple Tokens Algorithm holding process to the requesting process directly. As It is based on token ring algorithm. Every process a result, knowing that some nodes have requests to is associated with a unique identifier.

In this technique each channel is provided to user for a specific time interval Read this topic. Thread Tools Show Printable Version. Gender: : Female City : Mumbai. Distributed Mutual Exclusion: Classification of distributed mutual exclusion, requirement of mutual exclusion theorem, Token based and non token based algorithms, performance metric for distributed mutual exclusion algorithms.

Distributed Transactions: Flat and nested distributed transactions, Atomic Commit protocols, Concurrency control in distributed transactions, Distributed deadlocks, Transaction recovery.

Replication: System model and group communication, Fault - tolerant services, highly available services, Transactions with replicated data. Please download the ebooks attached with this.



0コメント

  • 1000 / 1000