2Chapter10Storage and File Structure
has been no partial-write,but they differ in content,then we replace
the contents of thefirst block with the contents of the cond,or vice
versa.This recovery procedure ensures that a write to stable storage
either succeeds completely(that is,updates both copies)or results
in no change.
The requirement of comparing every corresponding pair of blocks
during recovery is expensive to meet.We can reduce the cost greatly
by keeping track of block writes that are in progress,using a small
amount of nonvolatile RAM.On recovery,only blocks for which
writes were in progress need to be compared.
b.The idea is similar here.For any block write,the information block is
writtenfirst followed by the corresponding parity block.At the time
of recovery,each t consisting of the n th block of each of the disks
is considered.If none of the blocks in the t have been partially-
written,and the parity block contents are consistent with the con-
tents of the information blocks,then no further action need be taken.
If any block has been partially-written,it’s contents are reconstructed
using the other blocks.If no block has been partially-written,but the
parity block contents do not agree with the information block con-
tents,the parity block’s contents are reconstructed.
10.4Answer:
a.Although moving record6to the space for5,and moving record7
to the space for6,is the most straightforward approach,it requires
moving the most records,and involves the most access.
b.Moving record7to the space for5moves fewer records,but destroys
any ordering in thefile.
c.Marking the space for5as deleted prerves ordering and moves
no records,but requires additional overhead to keep track of all
of the free space in thefile.This method may lead to too many
“holes”in thefile,which if not compacted from time to time,will
affect performance becau of reduced availability of contiguous
小学四年级英语课件free records.
10.5Answer:(We u“↑i”to denote a pointer to record“i”.)
The originalfile of Figure10.7.
Exercis3
↑1
record0Srinivasan65000
record1↑4
record2Mozart40000
record3Einstein95000
record4↑6
record5Gold87000
record6
adg
record7Califieri62000
record8Singh80000
record9Crick72000
record10Brandt92000
record11Kim80000
a.Thefile after inrt(24556,Turnamian,Finance,98000).
↑4
record0Srinivasan65000
趣味英语record1Turnamian98000
record2Mozart40000
record3Einstein95000
广州营养师培训
record4↑6
record5Gold87000
record6
record7Califieri62000
record8Singh80000
record9Crick72000
record10Brandt92000
record11Kim80000
b.Thefile after delete record2.
英语家教
4Chapter10Storage and File Structure
↑2
record0Srinivasan65000
record1Turnamian98000
record2↑4
招聘技巧record3Einstein95000
record4↑6
record5Gold87000
record6
record7Califieri62000
record8Singh80000
record9Crick72000
record10Brandt92000
record11Kim80000
The free record chain could have alternatively been from the header
to4,from4to2,andfinally from2to6.
c.Thefile after inrt(34556,Thompson,Music,67000).
↑4
record0Srinivasan65000
record1Turnamian98000
record2Thompson67000
record3Einstein95000
record4↑6
record5Gold87000actual是什么意思
record6
record7Califieri62000
record8Singh80000
record9Crick72000
record10Brandt92000
record11Kim80000
10.6Answer:
The relation ction with three tuples is as follows.
cour c mester building number slot
12010514
CS-101Fall Packard H
好英文名
120093128英语6级查询
Exercis5 ID id id year
CS-101Fall A
CS-347Fall A-
CS-347Fall A
CS-101Fall C
BIO-301Summer null
CS-347Fall A
CS-101Fall F
CS-101Fall A-
CS-347Fall A
BIO-301Summer null
CS-101Fall A
CS-347Fall A
BIO-301Summer null
BIO-301Summer null
BIO-301Summer null The multitable clustering for the above two instances can be taken as: BIO-301Summer Painter A
BIO-301Summer null
BIO-301Summer null
BIO-301Summer null
BIO-301Summer null
BIO-301Summer null
12009101 0012812009
1234512009
4567812009
会计原则5432112009
7654312009
CS-347Fall Taylor C
CS-347Fall A-
CS-347Fall A
CS-347Fall A
CS-347Fall A
CS-347Fall A
10.7Answer:
a.Everytime a record is inrted/deleted,check if the usage of the
block has changed levels.In that ca,update the corresponding