版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 File hasbeennopartial-write,buttheydifferincontent,thenwereplace2thecontentsoftherstblockwiththecontentsofthesecond,orviceversa.Thisrecoveryprocedureensuresthatawritetostablestorageeither succeeds completely (that is, updates both copies) or resultsin no change.The requirement of comparing every co
2、rresponding pair of blocksduringrecoveryisexpensivetomeet.Wecanreducethecostgreatlyby keeping track of block writes that are in progress, using a smallamount of nonvolatile RAM. On only blocks for whichwrites werein progressneed tobe compared.b. Theideaissimilarhere.Foranyblockwrite,theinformationbl
3、ockiswrittenrstfollowedbythecorrespondingparityblock.Atthetimeof each set consisting of the nthblock of each of the disksis considered. If none of the blocks in the set have been partially-written, and the parity block contents are consistent with the con-tentsoftheinformationblocks,thennofurtheract
4、ionneedbetaken.Ifanyblockhasbeenpartially-written,itscontentsarereconstructedusingtheotherblocks.Ifnoblockhasbeenpartially-written,buttheparity block contents do not agree with the information block con-tents, the parity blocks contents arereconstructed.10.4 Answer:a. Although moving record 6 to the
5、 space for 5, and moving record 7to the space for 6, is the most straightforward approach, it requiresmoving themost records,and involves the most accesses.b. Movingrecord7tothespacefor5movesfewerrecords,butdestroysany orderingin the le.c. Marking the space for 5 as deleted preserves ordering and mo
6、vesno records, but requires additional overhead to keep track of allof the free space in the le. This method may lead to too many“holes” in the le, which if not compacted from time to time, willaffect performance because of reduced availability of contiguousfreerecords.10.5 Answer: (Weuse “i” to den
7、ote a pointerto record“i”.)The originalle ofFigure10.7.Exercises3record0record1record2record3record4record5record6record7record8record9record10record1165000 44000095000 6Gold87000CalieriSinghCrickBrandtKim6200080000720009200080000a. The le after insert(24556, Turnamian,Finance, 98000).record0record1
8、record2record3record4record5record6record7record8record9record10record1165000980004000095000 687000CalieriSinghCrickBrandtKim6200080000720009200080000b. The le after delete record2. File 4record0record1record2record3record4record5record6record7record8record9record10record116500098000 495000 687000Ca
9、lieriSinghCrickBrandtKim6200080000720009200080000Thefreerecordchaincouldhavealternativelybeenfromtheheaderto 4,from 4 to 2,and nally from 2 to 6.c. The le after insert(34556, Thompson, Music,67000). 4record0record1record2record3record4record5record6record7record8record9record10record1165000980006700
10、095000 6Gold87000CalieriSinghCrickBrandtKim620008000072000920008000010.6 Answer:The relationsectionwith threetuples is as follows.coursesec1semesterFallbuildingPackardslot514H1Exercises5IDididyearCS-101CS-347CS-347CS-101FallFallFallFallAA-ACBIO-301CS-347CS-101CS-101CS-347BIO-301CS-101CS-347BIO-301BI
11、O-301BIO-301SummerFallFallFallFallSummerFallFallSummerSummerSummernullAFA-AnullAAnullnullnullThe multitable clusteringfor the above twoinstances can be taken as:BIO-301SummerPainterABIO-301BIO-301BIO-301BIO-301BIO-3011SummerSummerSummerSummerSummer2009nullnullnullnullnull1010012812345456785432176543
12、CS-34711111Fall20092009200920092009TaylorC10.7 Answer:a. Everytime a record is inserted/deleted, check if the usage of theblock has changed levels. In that case, update the corresponding File bits. Note that we dont need to access the bitmaps at all unless6the usage crosses a so in most of the cases
13、 there is nooverhead.b. When freespaceforalargerecordora setofrecordsissought,thenmultiple free list entries may have to be scanned before nding apropersized one,so overheadsaremuchhigher.Withbitmaps,onepage of bitmap can store free info for many pages, sospent forI/Onding free space is minimal. whe
14、n a whole block or alarge part of it is deleted, bitmap technique is more convenient forupdating freespace information.10.8 Answer: Hashtableisthecommonoptionforlargedatabasebuffers.Thehash function helps in locating the appropriate bucket, on which linearsearchis performed.10.9 Answer:a.is preferab
15、le towhere R 1 R is computed by using12a nested-loop processing strategy where each tuple in R must becomparedtoeachblockin R .Afterthersttupleof R isprocessed,the next needed block is the rst one in R . However, since it isthe least recently used, the2121buffermanagement strategy wouldreplacethat b
16、lock if a new block was needed bythe system.b.is preferable to where R 1 R is computed by sorting12the relations by join values and then comparing the values by pro-ceeding through the relations. Due to duplicate join values, it maybenecessaryto“back-up”inoneoftherelations.This “backing-up”could cross a block boundary into the most recently used block,wh
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 制造业能源消耗监测方案
- 临床检验标准操作流程指南
- 2026年县乡教师选调进城考试《教育心理学》题库及答案(历年真题)
- 吉林省吉林市舒兰市2023-2024学年九年级上学期第一次月考语文试题含参考答案
- 磨毛(绒)机挡车工岗前理论技能考核试卷含答案
- 手绣工安全教育模拟考核试卷含答案
- 2026年抖音考试题库及答案(基础+提升)
- 吉林省吉林市舒兰市2023-2024学年八年级上学期期末考试地理试题含参考答案
- 电影摄影设备装配调试工岗前技术理论考核试卷含答案
- 吉林省吉林市磐石市2024-2025学年九年级下学期中考第二次模拟考试化学题库及答案
- 新旧《预包装食品标签通则》对比(中文简体)
- DL∕T 1053-2017 电能质量技术监督规程
- NB-T20319-2014压水堆核电厂技术规格书编制准则
- 起重机维护保养记录表
- DB4409-T 48-2023 三叉苦种植技术规范
- 10千伏及以下线损管理题库附答案
- 关于食品专业实习报告(5篇)
- 蛋糕店充值卡合同范本
- 《美国和巴西》复习课
- 模切机个人工作总结
- 尿道损伤教学查房
评论
0/150
提交评论