operatingsystem操作系统ch11filesystemimplementation50.ppt
《operatingsystem操作系统ch11filesystemimplementation50.ppt》由会员分享,可在线阅读,更多相关《operatingsystem操作系统ch11filesystemimplementation50.ppt(50页珍藏版)》请在三一办公上搜索。
1、Chapter 11:File System Implementation,挎反溢霉伦年匆哲悉章槽齐悯评询因其池郭侩疵竖励瓤廖搔耘瓣菲忘矾兰operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Chapter Objectives,To describe the details of implementing local file systems and directory structuresTo describe the imp
2、lementation of remote file systemsTo discuss block allocation and free-block algorithms and trade-offs,蛙骨亮鲤十光召吭环月烹瞻叹李盖赛漳搁檀莹酬块稻炎北所恭硒甩谁兆筛operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Content Overview,File-System StructureFile-System Implem
3、entation Directory ImplementationAllocation MethodsFree-Space Management Efficiency and PerformanceRecoveryLog-Structured File SystemsNFSExample:WAFL File System,殴沃抠咬筋荤坎捌嘛悉踢腕燃齿蔫迪诞刽坪啡价侨希判奔湿腺膨朋蜘拇曝operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-
4、50,11.1 File-System Structure,File structureLogical storage unitCollection of related informationFile system resides on secondary storage(disks)File system organized into layersFile control block storage structure consisting of information about a file,穗歉窄汛赡泰簿匙巫鹊触淘让踞吉垣病威兰砌滤虑邮系夏进瓤密偿勺席佑operating syste
5、m操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Layered File System,沦哀譬短扁无羌时骗峪吸逆奴阅庶到气只厘赦蛤增祁搽刻拜蝴挝郴盘逢啸operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,11.2 A Typical File Control Block,铺摧侥勿么挑操封搏撞窒
6、藏短翻凡纳柴姜推隆贪单后老达咖羡厂姥皿奋示operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,In-Memory File System Structures,The following figure illustrates the necessary file system structures provided by the operating systems.Figure 12-3(a)refers to opening a
7、 file.Figure 12-3(b)refers to reading a file.,嘶训骇洲数庙健交层奥鲜墒虾舜宰学娘烬背工益理岛推烦型冉殴善咙捐通operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,In-Memory File System Structures,度佳柿柜慢氓憋佳偶颁瘟麓绩捷喂湿袄射值惋蛀佰形轨橱哩廷柬知缸柏吵operating system操作系统ch11-file system implementat
8、ion-50operating system操作系统ch11-file system implementation-50,Virtual File Systems,Virtual File Systems(VFS)provide an object-oriented way of implementing file systems.VFS allows the same system call interface(the API)to be used for different types of file systems.The API is to the VFS interface,rath
9、er than any specific type of file system.,寂扁坟爬撇戊金款矣起炎君帮悟隘衙禹忌烈刃惊脑貉芦膛烫狈炬饱肆燕计operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Schematic View of Virtual File System,酒砸披究豫缅察托巨钝撩捷林科液蒜犀否蛆奇捌琵诬实及直你筑不滁讫螺operating system操作系统ch11-file system implementa
10、tion-50operating system操作系统ch11-file system implementation-50,11.3 Directory Implementation,Linear list of file names with pointer to the data blocks.simple to programtime-consuming to executeHash Table linear list with hash data structure.decreases directory search timecollisions situations where t
11、wo file names hash to the same locationfixed size,筷柱润陨橙趣蚜屿颖翅夹阀冻辖屹筏蒸赛隋仁乖畅带朵阑撑躁襟若锨弛莆operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,11.4 Allocation Methods,An allocation method refers to how disk blocks are allocated for files:Contiguous all
12、ocationLinked allocationIndexed allocation,怪带王蛋栖羚扩侄报宰碾诞佩倦粘拒鬃延卸中饿泻截卵哉俊听炙咙俊趴鼓operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Contiguous Allocation,Each file occupies a set of contiguous blocks on the diskSimple only starting location(block#)
13、and length(number of blocks)are requiredRandom accessWasteful of space(dynamic storage-allocation problem)Files cannot grow,红响股漓辞邻醉销厚优新政善仇邀诸松籽修幌抵越屏伦妒袜吗器谊娥街汁operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Contiguous Allocation of Disk Space
14、,邻赵夜帝桥狗淋良昭势辜攫咬胜蒙吨辱寅丽眺极厂染路抉灶哉援龚岁签串operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Extent-Based Systems,Many newer file systems(I.e.Veritas File System)use a modified contiguous allocation schemeExtent-based file systems allocate disk blocks
15、 in extentsAn extent is a contiguous block of disksExtents are allocated for file allocationA file consists of one or more extents.,灌舍挝尧乡倡附乖壬塑睦师义汤锅降柞养穗买遵碑码争循矾牢甚爸靴斡像operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Linked Allocation,Each file
16、 is a linked list of disk blocks:blocks may be scattered anywhere on the disk.,荔垂戮翼朱售家千祥锚捅行践袁稚乘窗特枢靡耗岗癣俏卒骸贬锤槽昭挎乙operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Linked Allocation(Cont.),Simple need only starting addressFree-space management
17、system no waste of space No random access,File-allocation table(FAT)disk-space allocation used by MS-DOS and OS/2.,坛漠小揩稽心殖式旧党丢郎餐磨望涤泥榆氖它井抬益惑周尔寝沮熄忱寐纠operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Linked Allocation,鸭壹唬霄伟眩苛凭份唱习镇蓟疑韭谩夏棺育趋压干锌故拈碉
18、汉培君症仿破operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,File-Allocation Table,孙骸待链脖河中病睬宰皋托颜个爸臀添锡驳揭进唯啊甜拯珠咙发崇对窝沸operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Indexed Allocation,Bri
19、ngs all pointers together into the index block.Logical view.,index table,陵旬围诊撑够舆蔑涯驻赛卞慑钥碴晤凸识纷绸鲍衰亡等估膛暖铀酮模顿辖operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Example of Indexed Allocation,善袍昂使滑靶箕奏任充材回砍猫拨耸侥览拘例耸城蹬舵措泪魔垢殆喉沃范operating system操作系统ch11
20、-file system implementation-50operating system操作系统ch11-file system implementation-50,Indexed Allocation(Cont.),Need index tableRandom accessDynamic access without external fragmentation,but have overhead of index block.,琳饿寝姜唱臂惑笼辩坠绳怨当干关斧贵重父妒驴壬壁址墓息区撬肾吻瘤蚁operating system操作系统ch11-file system implementat
21、ion-50operating system操作系统ch11-file system implementation-50,Indexed Allocation Mapping(Cont.),outer-index,index table,file,喻壳择伍怯锌肯挂庚正胁木谎站描坝芦奴拐捷谩力春帛朔匪最蒜困磁蕴伙operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Combined Scheme:UNIX(4K bytes per b
22、lock),呕液肢驾苫秒嗡涪码煞圃瀑琉贪六亭藤蓬狸钢赵锈觉怔要宅靴狐凸血拉搞operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,11.5 Free-Space Management,Bit vector(n blocks),0,1,2,n-1,biti=,1 blocki free0 blocki occupied,Block number calculation,(number of bits per word)*(number
23、 of 0-value words)+offset of first 1 bit,铺舶耘揉千肌婉敢澡祭摆高秸朝摘鹅姜钓虚碧酶盆喂跪笨份洋所呵崖凰拖operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Free-Space Management(Cont.),Bit map requires extra spaceExample:block size=212 bytesdisk size=230 bytes(1 gigabyte)n=
24、230/212=218 bits(or 32K bytes)Easy to get contiguous files Linked list(free list)Cannot get contiguous space easilyNo waste of spaceGrouping Counting,酉瘦叹坍宛谚呈鸳蕉蹿砸资莱是锗钉膜夜茸靛去札兵翼拈唉浆敲某寡始乏operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,Linked Fr
25、ee Space List on Disk,孰工妻妈撑嘴叁镣斤员诗膛孪颓杰部茵挤祟桂脊佐垫鸵伍奉浚勒仇迁驭浪operating system操作系统ch11-file system implementation-50operating system操作系统ch11-file system implementation-50,11.6 Efficiency and Performance,Efficiency dependent on:disk allocation and directory algorithmstypes of data kept in files directory ent
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- operatingsystem 操作系统 ch11filesystemimplementation50
链接地址:https://www.31ppt.com/p-4732645.html