{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

B the following schedule involves two sites and four

Info iconThis preview shows pages 7–8. Sign up to view the full content.

View Full Document Right Arrow Icon
b. The following schedule involves two sites and four transactions. T 1 and T 2 are local transactions, running at site 1 and site 2 respectively. T G 1 and T G 2 are global transactions running at both sites. X 1 , Y 1 are data items at site 1, and X 2 , Y 2 are at site 2. T 1 T 2 T G1 T G2 write ( Y 1 ) read ( Y 1 ) write ( X 2 ) read ( X 2 ) write ( Y 2 ) read ( Y 2 ) write ( X 1 ) read ( X 1 ) In this schedule, T G 2 starts only after T G 1 finishes. Within each site, there is local serializability. In site 1, T G 2 T 1 T G 1 is a serializ- ability order. In site 2, T G 1 T 2 T G 2 is a serializability order. Yet the global schedule schedule is non-serializable. 19.15 Consider a multidatabase system in which every local site ensures local serializability, and all global transactions are read only.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
8 Chapter 19 Distributed Databases a. Show by example that nonserializable executions may result in such a system. b. Show how you could use a ticket scheme to ensure global serializ- ability. Answer: a. The same system as in the answer to Exercise 19.14 is assumed, except that now both the global transactions are read-only. Consider the schedule given below. T 1 T 2 T G 1 T G2 read( X 1 ) write( X 1 ) read( X 1 ) read( X 2 ) write( X 2 ) read( X 2 ) Though there is local serializability in both sites, the global schedule is not serializable. b. Since local serializability is guaranteed, any cycle in the system wide precedence graph must involve at least two different sites, and two different global transactions. The ticket scheme ensures that when- ever two global transactions access data at a site, they conflict on a data item (the ticket) at that site. The global transaction manager controls ticket access in such a manner that the global transactions execute with the same serializability order in all the sites. Thus the chance of their participating in a cycle in the system wide precedence graph is eliminated.
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}