Logo Studenta

3 4 Transacciones distribuídas

¡Estudia con miles de materiales!

Vista previa del material en texto

Nombre del alumno: Antony Arturo García Pérez
Matrícula: 2020690020
Carrera: Licenciatura en Ciencia de Datos
Nombre de la materia: Computo de alto desempeño
Nombre del docente: Gerardo Altamirano
3.4. Transacciones distribuídas
Sabinas, Coahuila							04/11/2021
7.1 In a decentralized variant of the two-phase commit protocol the participants communicate directly with one another instead of indirectly via a coordinator. In phase 1, the coordinator sends its vote to all the participants. In phase 2, if the coordinator’s vote is No, the participants just abort the transaction; if it is Yes, each participant sends its vote to the coordinator and the other participants, each of which decides on the outcome according to the vote and carries it out. Calculate the number of messages and the number of rounds it takes. What are its advantages and disadvantages in comparison with the centralized variant? page 732
simple protocolo de confirmación atómica de una fase es inadecuado porque no permite que un servidor tome una decisión unilateral de abortar una transacción cuando el cliente solicita una confirmación. Razones que impiden que un servidor pueda comprometer su parte de una transacción generalmente se relaciona con cuestiones de control de concurrencia. es posible que el coordinador no sepa si un servidor ha se bloqueó y fue reemplazado durante el progreso de una transacción distribuida, como un servidor deberá abortar la transacción.
El protocolo de compromiso de dos fases está diseñado para permitir que cualquier participante aborte su parte de una transacción. Debido al requisito de atomicidad, si una parte de una transacción es abortada, entonces toda la transacción debe ser abortada. En la primera fase del protocolo, cada participante vota para que la transacción sea confirmada o cancelada. En la segunda fase del protocolo, cada participante de la transacción lleva a cabo la decisión conjunta. Si alguno de los participantes vota para abortar, entonces la decisión debe ser abortar. la transacción. Si todos los participantes votan para comprometerse, entonces la decisión es comprometer la transacción.
7.2 A three-phase commit protocol has the following parts:
Phase 1: Is the same as for two-phase commit.
Phase 2: The coordinator collects the votes and makes a decision. If it is No, it aborts and informs participants that voted Yes; if the decision is Yes, it sends a preCommit request to all the participants. Participants that voted Yes wait for a preCommit or doAbort request. They acknowledge preCommit requests and carry out doAbort requests.
Phase 3: The coordinator collects the acknowledgements. When all are received, it commits and sends doCommit requests to the participants. Participants wait for a doCommit request. When it arrives, they commit. 
Explain how this protocol avoids delay to participants during their ‘uncertain’ period due to the failure of the coordinator or other participants. Assume that communication does not fail. page 735
Se han diseñado protocolos de compromiso de tres fases para aliviar dichos retrasos, pero son más caros en cuanto a la cantidad de mensajes y la cantidad de rondas requerido para el caso normal (libre de fallas).
7.5 The getDecision procedure defined in Figure 17.4 is provided only by coordinators. Define a new version of getDecision to be provided by participants for use by other participants that need to obtain a decision when the coordinator is unavailable.
Assume that any active participant can make a getDecision request to any other active participant. Does this solve the problem of delay during the ‘uncertain’ period? Explain your answer. At what point in the two-phase commit protocol would the coordinator inform the participants of the other participants’ identities (to enable this communication)? page 732
Considero que le coordinador debería de aparecer primeramente como fuera de línea, así los demás participantes se darán cuenta desde antes de la ocasión, además de esto, considero que sería oportuno que cada uno de los participantes puedan decidir en función de a como el coordinador lo haga por medio de una votación para así no perder el tiempo durante la ejecución
7.12 A server manages the objects a1, a2 , ... an. It provides two operations for its clients:
read(i) returns the value of ai
write(i, Value) assigns Value to ai
The transactions T, U and V are defined as follows:
T: x = read(i); write(j, 44);
U: write(i, 55); write(j, 66);
V: write(k, 77); write(k, 88);
Describe the information written to the log file on behalf of these three transactions if strict two-phase locking is in use and U acquires ai and aj before T. Describe how the recovery manager would use this information to recover the effects of T, U and V when the server is replaced after a crash. What is the significance of the order of the commit entries in the log file? pages 753–754
En caso de que se Adquieran primero los valores de U que los de T, los valores de ai y aj cambiarán y tendrán un valor final diferente, pienso que debería de correr las órdenes de acuerdo a el orden que se haya tenido a la hora de recibir las tareas. El orden es importante a la hora de realizar cualquier tipo de operación debido a que es en algunos casos los valores pueden cambiar debido a este cambio de órdenes 
7.14 The transactions T, U and V of Exercise 17.12 use strict two-phase locking and their requests are interleaved as follows:
Assuming that the recovery manager appends the data entry corresponding to each write operation to the log file immediately instead of waiting until the end of the transaction, describe the information written to the log file on behalf of the transactions T, U and V. 
Does early writing affect the correctness of the recovery procedure? What are the advantages and disadvantages of early writing? pages 753–754
Utilizando la escritura temprana se deberían de obtener unos resultados distintos respecto a los resultados que se podrían esperar, por lo que, pienso que dependiendo de los datos que se busquen obtener es como se va a buscar leer los distintos ordenes de las acciones

Continuar navegando

Materiales relacionados