資源描述:
《期末復(fù)習(xí)題題目2_語(yǔ)文_小學(xué)教育_教育專(zhuān)區(qū)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、Afilesystemuses256-bytephysicalblocks.Eachfilehasadirectoryentrygivingthefilename,locationofthefirstblock,lengthoffile,andlastblockposition.Assumingthelastphysicalblockreadis100,block100andthedirectoryentryarealreadyinmainmemory.Forthefollowingtwofileallocationalgorithms,howmanyphysicalblocksm
2、ustbereadtoaccessthespecificblock600(includingthereadingofblock600itself),andwhy?(1)contiguousallocation(2)linkedallocation(1)1Contiguousallocationsupportsdirectaccessonarbitrtaryphysicalblocksinafile.Toaccessphysicalblock600,thebolck600canbedirectoryreadintomemory.(2)500Linkedallocationisused
3、onlyforsequential-accessfiles,filesystemcanonlyreadblocksonebyone,directedbyfilepointers.Tofindthephyicalblock600inthefile,filesystemlocatesonthe101thblockfollowingthe100thblockjustread,andreadsblock101,block102,…,untilblock600.?Inthefilesystemonadiskwithphysicalblocksizesof512bytes,afileismad
4、eupof128-bytelogicalrecords,andeachlogicalrecordcannotbeseparatelystoredintwodifferentblocks.Thediskspaceofthefileisorganizedonthebasisofindexedallocation,andablockaddressisstoredin4bytes.Supposethat2-levelindexblocksbeusedtomanagethedatablocksofthefile,answerthefollowingquestions:1)Whatisthel
5、argestsizeofthefile?2)Given2000,thenumberofalogicalrecordinthefile,howtofindoutthephysicaladdressoftherecord2000inaccordancewiththe2-levelindexblocks.