版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
MODERNOPERATINGSYSTEMS
ThirdEdition
ANDREWS.TANENBAUM
Chapter11
CaseStudy2:WindowsVistaTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-1.MajorreleasesinthehistoryofMicrosoftoperatingsystemsfordesktopPCs.HistoryofVistaTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-2.DECOperatingSystemsdevelopedbyDaveCutler.2000s:NT-basedWindows(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-3.TheWin32APIallowsprogramstorun
onalmostallversionsofWindows.2000s:NT-basedWindows(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-4.SplitclientandserverreleasesofWindows.2000s:NT-basedWindows(3)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-5.Comparisonoflinesofcodeforselected
kernel-modemodulesinLinuxandWindows(fromMarkRussinovich,co-authorofMicrosoftWindowsInternals).WindowsVistaTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-6.TheprogramminglayersinWindows.ProgrammingWindowsVistaTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-7.ThecomponentsusedtobuildNTsubsystems.ProgrammingWindowsVista(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-8.Commoncategoriesofkernel-modeobjecttypes.TheNativeNTApplication
ProgrammingInterface(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-9.ExamplesofnativeNTAPIcallsthatusehandlestomanipulateobjectsacrossprocessboundaries.TheNativeNTApplication
ProgrammingInterface(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-10.ExamplesofWin32APIcallsandthe
nativeNTAPIcallsthattheywrap.TheWin32Application
ProgrammingInterfaceTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-11.TheregistryhivesinWindowsVista.HKLMisashort-handfor
HKEY_LOCAL_MACHINE.TheWindowsRegistry(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-12.SomeoftheWin32APIcallsforusingtheregistryTheWindowsRegistry(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-13.Windowskernel-modeorganization.OperatingSystemStructureTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-14.SomeofthehardwarefunctionstheHALmanages.TheKernelLayerTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-15.dispatcher_headerdatastructureembeddedinmanyexecutiveobjects(dispatcherobjects).DispatcherObjectsTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-16.SimplifieddepictionofdevicestacksfortwoNTFSfilevolumes.I/Orequestpacketpassedfromdownthestack.TheDeviceDriversTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-17.Thestructureofanexecutiveobjectmanagedbytheobjectmanager.ImplementationoftheObjectManagerTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-18.Handletabledatastructuresforaminimaltableusingasinglepageforupto512handles.Handles(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-19.Handletabledatastructuresfora
maximaltableofupto16millionhandles.Handles(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-20.Theobjectproceduressupplied
whenspecifyinganewobjecttype.TheObjectNameSpace(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-21.Sometypicaldirectoriesintheobjectnamespace.TheObjectNameSpace(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-22.I/Oandobjectmanagerstepsfor
creating/openingafileandgettingbackafilehandle.TheObjectNameSpace(3)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-23.Somecommonexecutiveobjecttypes
managedbyobjectmanager.TheObjectNameSpace(4)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-24.Therelationshipbetweenjobs,processes,threadsandfibers.Jobsandfibersareoptional;notallprocessesareinjobsorcontainfibers.ProcessesandThreadsinWindowsVista(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-25.BasicconceptsusedforCPU
andresourcemanagement.ProcessesandThreadsinWindowsVista(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Job,Process,Thread,andFiberManagementAPICalls(1)ActualsearchpathforfindingprogramtoexecuteburiedinlibrarycodeforWin32,butmanagedmoreexplicitlyinUNIX.Currentworkingdirectoryiskernel-modeconceptinUNIXbutuser-modestringinWindows.UNIXparsescommandlineandpassesanarrayofparameters,Win32leavesargumentparsinguptoindividualprogram.WhetherfiledescriptorscanbeinheritedinUNIXispropertyofhandle.InWindowsitispropertyofbothhandleandparametertoprocesscreation.Win32isGUI-oriented,newprocessesdirectlypassedinformationabouttheirprimarywindowTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Job,Process,Thread,andFiberManagementAPICalls(2)WindowshasnoSETUIDbitaspropertyofexecutable,oneprocesscancreateaprocessthatrunsasadifferentuser,aslongasitcanobtainatokenwiththatuser’scredentials.ProcessandthreadhandlereturnedfromWindowscanbeusedtomodifythenewprocess/threadinmanysubstantiveways.UNIXjustmakesmodificationstonewprocessbetweenforkandexeccalls.Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-26.SomeoftheWin32callsfor
managingprocesses,threads,andfibers.SynchronizationTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Scheduling(1)Thefollowingconditionscausethecurrentlyrunningthreadtoexecutetheschedulercode:Thecurrentlyrunningthreadblocksonasemaphore,mutex,event,I/O,etc.Thethreadsignalsanobject(e.g.,doesanuponasemaphoreorcausesaneventtobesignaled).Thequantumexpires.Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Scheduling(2)Theschedulerisalsocalledundertwootherconditions:AnI/Ooperationcompletes.Atimedwaitexpires.Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-27.MappingofWin32prioritiestoWindowspriorities.Scheduling(3)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-28.WindowsVistasupports32prioritiesforthreads.Scheduling(4)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-29.Anexampleofpriorityinversion.Scheduling(5)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639MemoryManagement(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-30.Virtualaddressspacelayoutforthreeuserprocessesonthex86.Thewhiteareasareprivateperprocess.Theshadedareasaresharedamongallprocesses.Figure11-30.Virtualaddressspacelayoutforthreeuserprocessesonthex86.Thewhiteareasareprivateperprocess.Theshadedareasaresharedamongallprocesses.MemoryManagement(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-30.Virtualaddressspacelayoutforthreeuserprocessesonthex86.Thewhiteareasareprivateperprocess.Theshadedareasaresharedamongallprocesses.MemoryManagement(3)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-31.TheprincipalWin32APIfunctions
formanagingvirtualmemoryinWindows.AddressingLargePhysicalMemoriesTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-32.Mappedregionswiththeirshadowpagesondisk.Thelib.dllfilemappedintotwoaddressspacesatsametime.ImplementationofMemoryManagementTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-33.Apagetableentry(PTE)foramappedpageonthe(a)Intelx86and(b)AMDx64architectures.PageFaultHandling(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639PageFaultHandling(2)Eachpagefaultcanbeconsideredasbeinginoneoffivecategories:Thepagereferencedisnotcommitted.Attemptedaccesstoapageinviolationofthepermissions.Asharedcopy-on-writepagewasabouttobemodified.Thestackneedstogrow.Thepagereferencediscommittedbutnotcurrentlymappedin.Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-34.Windowsself-mapentryusedtomapthephysicalpagesofpagetablesandpagedirectoryintokernelvirtualaddresses,forthex86.PageFaultHandling(3)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639ThePageReplacementAlgorithmThreelevelsofactivitybytheworking-setmanagerPeriodicbasedonatimerNewactivityisaddedateachlevel:LotsofmemoryavailableMemorygettingtightMemoryistightTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-35.Someofthemajorfieldsinthe
pageframedatabaseforavalidpage.PhysicalMemoryManagement(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-36.Thevariouspagelistsandthe
transitionsbetweenthem.PhysicalMemoryManagement(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-37.NativeNTAPIcallsforperformingI/O.Input/OutputAPICallsTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-38.Asinglelevelinadevicestack.DeviceDriversTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-39.ThemajorfieldsofanI/ORequestPacket.I/ORequestPacketsTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-40.Windowsallowsdriverstobestackedtoworkwithaspecificinstanceofadevice.Thestackingisrepresentedbydeviceobjects.DeviceStacksTanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-41.TheNTFSmasterfiletable.FileSystemStructure(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-42.TheattributesusedinMFTrecords.FileSystemStructure(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-43.AnMFTrecordforathree-run,nine-blockstream.StorageAllocation(1)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.Allrightsreserved.0-13-6006639Figure11-44.AfilethatrequiresthreeMFT
recordstostoreallitsruns.StorageAllocation(2)Tanenbaum,ModernOperatingSystems3e,(c)2008Prentice-Hall,Inc.A
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 漯河食品职业学院《机械工程材料与成形技术》2023-2024学年第一学期期末试卷
- 2024年版:版权许可及发行外包合同2篇
- 2025签订房屋租赁合同要审查哪些要点
- 2024年标准个人汽车短期租赁协议范本版
- 单位人事管理制度范例合集
- 旅游挑战之旅服务合同
- 外墙修复工程安全协议
- 娱乐产业合同工管理方案
- 2024年标准化园林材料采购合同版B版
- 2024双方智能电网建设与运营合作承诺书3篇
- 江苏开放大学中国政府与政治课程总结与课程大作业江苏开放大学中国政府与政治大作业答案
- 医学影像学论文5000
- 地下泉眼封堵施工方案
- 口腔诊所医师技术操作规范流程
- 人教版小学语文二年级上册期末试卷
- 众辰变频器z2400t-15gy-1说明书
- 二年级数学上册解决问题专项复习课件
- 小学信息技术校本教材
- 微型计算机原理与接口技术-南京邮电大学中国大学mooc课后章节答案期末考试题库2023年
- 简易租房合同下载word
- 共点力的平衡条件
评论
0/150
提交评论