Information Technology Reference
In-Depth Information
doc.txt always refers to either the old or new file, (ii) the new file
is never lost { it is always available as at least one of doc.txt or
#doc.txt# , and (iii) there is some window where the new file may
be accessed as both doc.txt and #doc.txt# .
d. Section 14.1.1 discusses three reasons that few modern file systems
use the \ad-hoc" approach. However, many text editors still do some-
thing like this. Why have the three issues had less effect on applica-
tions like text editors than on file systems?
2. Above, we defined two-phase locking for basic mutual exclusion locks.
Extend the definition of two-phase locking for systems that use readers-
writers locks.
3. Suppose that x and y represent the number of hours two managers have
assigned you to work on each of two tasks with a constraint that x + y
40. On page 414, we showed that snapshot isolation could allow one
transaction to update x and another concurrent transaction to update y
in a way that would violate the constraint x+y 40. Is such an anomoly
possible under serializability? Why or why not?
4. Suppose you have transactional storage system tStore that allows you to
read and write fixed-sized 2048-byte blocks of data within transactions,
and you run the following code.
...
byteb1[2048]; byteb2[2048];
byteb3[2048]; byteb4[2048];
TransIDt1=tStore.beginTransaction();
TransIDt2=tStore.beginTransaction();
TransIDt3=tStore.beginTransaction();
TransIDt4=tStore.beginTransaction();
//Interfaceis
// writeBlock(TransIDtid,intblockNum,bytebuffer[]);
tStore.writeBlock(t1,1,ALL_ONES);
tStore.writeBlock(t1,2,ALL_TWOS);
tStore.writeBlock(t2,3,ALL_THREES);
tStore.writeBlock(t1,3,ALL_FOURS);
tStore.writeBlock(t1,2,ALL_FIVES);
tStore.writeBlock(t3,2,ALL_SIXES);
tStore.writeBlock(t4,4,ALL_SEVENS);
tStore.readBlock(t2,1, b1);
tStore.commit(t3);
tStore.readBlock(t2,3, b2);
tStore.commit(t2);
tStore.readBlock(t1,3, b3);
tStore.readBlock(t4,3, b4);
tStore.commit(t1);
//Atthispoint,thesystemcrashes
The system crashes at the point indicated above.
 
Search WWH ::




Custom Search