233
Similarly, no issues are reported by Persistence Inspector in Listing 12-26.
Listing 12-26. Generating report with Intel Inspector – Persistence Inspector for
code Listing 12-24
$ pmeminsp cb -pmem-file /mnt/pmem/pool -- ./listing_12-24
++ Analysis starts
++ Analysis completes
++ Data is stored in folder "/data/.pmeminspdata/data/listing_12-24"
$
$ pmeminsp rp -- ./listing_12-24
Analysis complete. No problems detected.
After properly adding all the memory that will be modified to the transaction, both
tools report that no problems were found.
Memory Added to Two Different Transactions
In the case where one program can work with multiple transactions simultaneously,
adding the same memory object to multiple transactions can potentially corrupt data.
This can occur in PMDK, for example, where the library maintains a different transaction
per thread. If two threads write to the same object within different transactions, after an
application crash, a thread might overwrite modifications made by another thread in a
different transaction. In database systems, this problem is known as dirty reads. Dirty
reads violate the isolation requirement of the ACID (atomicity, consistency, isolation,
durability) properties, as shown in Figure 12-5.
Chapter 12 Debugging persistent MeMory appliCations
Précédent

- 257/457

Suivant