操作系统课件:Chapter-11 Case Study 2 Windows Vista_第1页
操作系统课件:Chapter-11 Case Study 2 Windows Vista_第2页
操作系统课件:Chapter-11 Case Study 2 Windows Vista_第3页
操作系统课件:Chapter-11 Case Study 2 Windows Vista_第4页
操作系统课件:Chapter-11 Case Study 2 Windows Vista_第5页
已阅读5页,还剩54页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论