can either obtain the shared data state as a new data item or upgrade its local

Can either obtain the shared data state as a new data

This preview shows page 162 - 165 out of 252 pages.

can either obtain the shared data state as a new data item or upgrade its local cached data (see Figure 6.10). If the shared data item is not cached in the local workspace, the delegatee transaction will import it as a newly cached data. On the other hand, if the shared data item is already being cached in the local workspace, the delegatee transaction can use this opportunity to upgrade the value of the shared data item to the most up-to-date value.
Image of page 162
163 Figure 6.10: Sharing data states Figure 6.11 illustrates an example for mobile data sharing states among mobile transactions at two mobile hosts MH 1 and MH 2 . The example will be used to illustrate our analysis in the rest of this section. The anchor transaction T 1 A of the mobile host MH 1 holds a non-conflict read lock on the shared data item X , and an active read-write conflict Y RW (T 2 A ,T 1 A ) A on shared data item Y (i.e., with a write lock on Y ) with the anchor transaction T 2 A of the mobile host MH 2 . At the same time, the anchor transaction T 2 A of the mobile host MH 2 holds a passive read-write conflict Y RW (T 2 A ,T 1 A ) P on shared data item Y (i.e., with a read lock on Y ) and a write lock on the shared data item Z . During the mobile data sharing stage, delegator transactions at the mobile host MH 1 share both the original value of X , i.e., V X , and the modified value of Y , i.e., V Y’ , into the mobile sharing workspace. Delegator transactions at the mobile host MH 2 share both the original and updated value of data item Z , i.e., V Z and V Z’ . A delegatee transaction at the mobile host MH 1 will sequentially obtain both the shared data values of the shared data item Z . And, a delegatee transaction at the mobile host MH 2 will import the shared data value of X as a new cached data, and upgrade its local cache on the shared data item Y to the most up-to- date value V Y’ . Figure 6.11: Shared data states in the export-import sharing space The locks and conflict awareness records held by the anchor transactions at the database servers and in the local workspaces at the disconnected mobile hosts, as well as the mobile data sharing states are summarized in Table 6.9.
Image of page 163
164 Table 6.9: Locks and data conflict awareness of sharing data state scenarios MH 1 MH 2 Anchor transaction X R ;Y W Y R ;Z W Locks Local workspace X R ;Y W Y R ;Z W Anchor transaction Y RW (T 2 A ,T 1 A ) A Y RW (T 2 A ,T 1 A ) P Conflict awareness Local workspace Y RW (T 2 A ,T 1 A ) A None Exported data states V X , V Y’ V Z , V Z’ Mobile data sharing Imported data states V Z , V Z’ V X , V Y’ Conditions of sharing data states As we have discussed in Section 5.5.4, in order to be able to share the data state of the shared data item X , which is either an original state or an updated state, a delegator transaction T i Dor at mobile host MH i must hold the appropriate lock on the shared data item X . This means that the following conditions must be met: (1) For sharing of an original data state of the data item X : the data item X is cached (with read lock or write lock) in the local workspace at the mobile host MH i , and
Image of page 164
Image of page 165

You've reached the end of your free preview.

Want to read all 252 pages?

  • Spring '14
  • Hooks
  • ........., Database transaction

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture