Question

In: Computer Science

presedence graph

presedence graph

Solutions

Expert Solution

`Hey,

Note: If you have any queries related to the answer please do comment. I would be very happy to resolve all your queries.

Precedence Graph or Serialization Graph is used commonly to test Conflict Serializability of a schedule.
It is a directed Graph (V, E) consisting of a set of nodes V = {T1, T2, T3……….Tn} and a set of directed edges E = {e1, e2, e3………………em}.
The graph contains one node for each Transaction Ti. An edge ei is of the form Tj –> Tk where Tj is the starting node of ei and Tk is the ending node of ei. An edge ei is constructed between nodes Tj to Tk if one of the operations in Tj appears in the schedule before some conflicting operation in Tk .

The Algorithm can be written as:

  1. Create a node T in the graph for each participating transaction in the schedule.
  2. For the conflicting operation read_item(X) and write_item(X) – If a Transaction Tj executes a read_item (X) after Ti executes a write_item (X), draw an edge from Ti to Tj in the graph.
  3. For the conflicting operation write_item(X) and read_item(X) – If a Transaction Tj executes a write_item (X) after Ti executes a read_item (X), draw an edge from Ti to Tj in the graph.
  4. For the conflicting operation write_item(X) and write_item(X) – If a Transaction Tj executes a write_item (X) after Ti executes a write_item (X), draw an edge from Ti to Tj in the graph.
  5. The Schedule S is serializable if there is no cycle in the precedence graph.

If there is no cycle in the precedence graph, it means we can construct a serial schedule S’ which is conflict equivalent to the schedule S.

Kindly revert for any queries

Thanks.


Related Solutions

Using a stacked graph (forex market in the upper graph, money market in the lower graph),...
Using a stacked graph (forex market in the upper graph, money market in the lower graph), explain what happens when there is a large influx of capital into a country which wants to maintain a fixed exchange rate, assuming that the inflow is precipitated by an event which leads to a change in expectations. Label all axes, and all curves.
Draw a 1). position graph, 2). velocity graph, and 3). acceleration graph of a person standing...
Draw a 1). position graph, 2). velocity graph, and 3). acceleration graph of a person standing one second, then goes down into a squat for three seconds, back up for one second and then a one second stand for the first rep. 2nd rep- this person goes back down for three seconds, and then has a one second pause at the bottom of the squat, and then back up for one second.
With respect to the risk / return graph: why is the shape of the graph a...
With respect to the risk / return graph: why is the shape of the graph a curve when the correlation is between -1 and 1? Why is it a straight line in the other two cases? What happens to portfolio risk as you invest in more than one asset? What happens to portfolio risk as the number of assets increase?
Illustrate the graph for a natural monopoly. Where is output regulation on the graph?
Illustrate the graph for a natural monopoly. Where is output regulation on the graph?
A chorded cycle in a graph is a cycle in the graph with one additional edge...
A chorded cycle in a graph is a cycle in the graph with one additional edge connecting two of the cycle vertices. Prove that every graph with minimum degree 3 contains a chorded cycle as a subgraph. (Hint: Consider a longest path in the graph. What does it tell you when a vertex is the end of a longest path? )
The graph shows the market for tutoring in economics at a university. A graph plots demand...
The graph shows the market for tutoring in economics at a university. A graph plots demand and supply curves with Quantity (hours of tutoring per week) along the horizontal axis and Price (per hour of tutoring) along the vertical axis. The supply curve starts at 2.50 dollars on price and has a positive slope. The demand curve starts at 25 dollars on price and has a steep negative slope. The curves intersect at 300 hours on quantity, 10 dollars on...
The graph shows the market for tutoring at a university. A graph plots demand and supply...
The graph shows the market for tutoring at a university. A graph plots demand and supply curves with Quantity (hours of tutoring per week) along the horizontal axis and Price (per hour of tutoring) along the vertical axis. The supply curve starts at 2.50 dollars on price and has a positive slope. The demand curve starts at 25 dollars on price and has a steep negative slope. The curves intersect at 300 hours on quantity, 10 dollars on price. The...
If graph of given function is shifted 6 units to the left, the new graph will...
If graph of given function is shifted 6 units to the left, the new graph will represent the function ___________. If the graph of the given (first) function is shifted upwards by 6 units, the graph will represent the function ___________. Choose answers for the first two blanks from these answers: a. y = f(x + 6) = {x + 6)^ b. y = f(x - 6) = (x - 6)^ c. y = fx + 6 = x^ +...
Graph the value of your portfolio as a function of the relevant stock price. Graph for...
Graph the value of your portfolio as a function of the relevant stock price. Graph for stock prices between 50 and 100. You own (are long) a call with an exercise price of 70 and a put at 64. You are short a call at 90, and long a put at 75. Short a call at 85, long a put at 89, and long one share of the stock. Long a call at 75, short a put at 75, short...
Which graph search method will be better for finding a cycle in an undirected graph: a...
Which graph search method will be better for finding a cycle in an undirected graph: a BTS or a DFS? In detail, describe (create) an algorithm for finding a cycle in any undirected graph, explaining why the algorithm assures to find a cycle if there exists one.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT