50 likes | 187 Views
Sheet 6. Transparencies. Q4. Consider the following actions in a distributed database system. Q4. Assume the following: Initially empty local and global wait-for graphs. Site 3 contains the deadlock coordinator. It takes 3 time units to send a message from Site 1 to Site 3.
E N D
Sheet 6 Transparencies
Q4 • Consider the following actions in a distributed database system.
Q4 • Assume the following: • Initially empty local and global wait-for graphs. • Site 3 contains the deadlock coordinator. • It takes 3 time units to send a message from Site 1 to Site 3. • It takes 1 time unit to send a message from Site 2 to Site 3. • Sites send updates to the local wait-for graph immediately to the deadlock coordinator. • When a lock is requested, it is immediately granted if it is not held by some other transaction (no delay between requesting a lock and granting it – they happen on the same time unit). • Decide the following: • Whether or not a cycle would occur and at what time unit. • If there is a cycle, is it false or real?
Extra Question (WFG) • Consider the following situation: We have 3 sites: S1, S2, and S3. S1 is the deadlock-detection coordinator. Information needs 1 time unit to travel from S2 to S1 and 2 time units to travel from S3 to S1. Show the global wait-for-graph at each time from t0 to t3 and indicate whether or not there is a cycle. And if there is a cycle indicate whether it is real or not. Initial Global graph at S1: T1 T2 T3