版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
Chapter1:IntroductionTheBookOperatingSystemConcepts–7thEdition,Jan12,20051.2Silberschatz,GalvinandGagne?2005Gradingpolicy
期中考核成績(10%)課程項目成績(10%)課后作業(yè)成績(10%)考勤成績(10%)實驗成績(20%)期末考試成績(40%)OperatingSystemConcepts–7thEdition,Jan12,20051.3Silberschatz,GalvinandGagne?2005Objectives
Toprovideagrandtourofthemajoroperatingsystemscomponents
ToinfluenceComputationalThinkingOperatingSystemConcepts–7thEdition,Jan12,20051.4Silberschatz,GalvinandGagne?2005WhatisanOperatingSystem?
Aprogramthatactsasanintermediarybetweenauserofacomputerandthecomputerhardware.
Operatingsystemgoals:
Executeuserprogramsandmakesolvinguserproblemseasier.
Makethecomputersystemconvenienttouse.
Usethecomputerhardwareinanefficientmanner.OperatingSystemConcepts–7thEdition,Jan12,20051.5Silberschatz,GalvinandGagne?2005ComputerSystemStructure
Computersystemcanbedividedintofourcomponents
Hardware–providesbasiccomputingresources
CPU,memory,I/Odevices
Operatingsystem
Controlsandcoordinatesuseofhardwareamongvariousapplicationsandusers
Applicationprograms–definethewaysinwhichthesystemresourcesareusedtosolvethecomputingproblemsoftheusers
Wordprocessors,compilers,webbrowsers,databasesystems,videogames
Users
People,machines,othercomputersOperatingSystemConcepts–7thEdition,Jan12,20051.6Silberschatz,GalvinandGagne?2005FourComponentsofaComputerSystemOperatingSystemConcepts–7thEdition,Jan12,20051.7Silberschatz,GalvinandGagne?2005OperatingSystemDefinition
OSisaresourceallocator
ManagesallresourcesDecidesbetweenconflictingrequestsforefficientandfairresourceuse
OSisacontrolprogram
ControlsexecutionofprogramstopreventerrorsandimproperuseofthecomputerOperatingSystemConcepts–7thEdition,Jan12,20051.8Silberschatz,GalvinandGagne?2005OperatingSystemDefinition(Cont.)
Nouniversallyaccepteddefinition
“Everythingavendorshipswhenyouorderanoperatingsystem”isgoodapproximation
Butvarieswildly
“Theoneprogramrunningatalltimesonthecomputer”isthekernel.Everythingelseiseitherasystemprogram(shipswiththeoperatingsystem)oranapplicationprogramOperatingSystemConcepts–7thEdition,Jan12,20051.9Silberschatz,GalvinandGagne?2005ComputerSystemOrganization
Computer-systemoperation
OneormoreCPUs,devicecontrollersconnectthroughcommonbusprovidingaccesstosharedmemoryConcurrentexecutionofCPUsanddevicescompetingformemorycycles
OperatingSystemConcepts–7thEdition,Jan12,20051.10Silberschatz,GalvinandGagne?2005ComputerStartup
bootstrapprogramisloadedatpower-uporreboot
TypicallystoredinROMorEEPROM,generallyknownasfirmware
Initializatesallaspectsofsystem
LoadsoperatingsystemkernelandstartsexecutionOperatingSystemConcepts–7thEdition,Jan12,20051.11Silberschatz,GalvinandGagne?2005Computer-SystemI/OOperation
I/OdevicesandtheCPUcanexecuteconcurrently.
Eachdevicecontrollerisinchargeofaparticulardevicetype.
Eachdevicecontrollerhasalocalbuffer.
CPUmovesdatafrom/tomainmemoryto/fromlocalbuffers
DevicecontrollerinformsCPUthatithasfinisheditsoperationbycausinganinterrupt.OperatingSystemConcepts–7thEdition,Jan12,20051.12Silberschatz,GalvinandGagne?2005CommonFunctionsofInterrupts
Interrupttransferscontroltotheinterruptserviceroutinegenerally,throughtheinterruptvector,whichcontainstheaddressesofalltheserviceroutines.
Interruptarchitecturemustsavetheaddressoftheinterruptedinstruction.
Incominginterruptsaredisabledwhileanotherinterruptisbeingprocessedtopreventalostinterrupt.
Atrapisasoftware-generatedinterruptcausedeitherbyanerrororauserrequest.
Anoperatingsystemisinterruptdriven.OperatingSystemConcepts–7thEdition,Jan12,20051.13Silberschatz,GalvinandGagne?2005InterruptHandling
TheoperatingsystempreservesthestateoftheCPUbystoringregistersandtheprogramcounter.
Determineswhichtypeofinterrupthasoccurred:
polling
vectoredinterruptsystem
SeparatesegmentsofcodedeterminewhatactionshouldbetakenforeachtypeofinterruptOperatingSystemConcepts–7thEdition,Jan12,20051.14Silberschatz,GalvinandGagne?2005InterruptTimelineOperatingSystemConcepts–7thEdition,Jan12,20051.15Silberschatz,GalvinandGagne?2005StorageStructure
Mainmemory–onlylargestoragemediathattheCPUcanaccessdirectly.Secondarystorage–extensionofmainmemorythatprovideslargenonvolatilestoragecapacity.Magneticdisks–rigidmetalorglassplatterscoveredwithmagneticrecordingmaterial
Disksurfaceislogicallydividedintotracks,whicharesubdividedintosectors.Thediskcontrollerdeterminesthelogicalinteractionbetweenthedeviceandthecomputer.
OperatingSystemConcepts–7thEdition,Jan12,20051.16Silberschatz,GalvinandGagne?2005StorageHierarchy
Storagesystemsorganizedinhierarchy.
SpeedCostVolatility
OperatingSystemConcepts–7thEdition,Jan12,20051.17Silberschatz,GalvinandGagne?2005Storage-DeviceHierarchyOperatingSystemConcepts–7thEdition,Jan12,20051.18Silberschatz,GalvinandGagne?2005RegisterOperatingSystemConcepts–7thEdition,Jan12,20051.19Silberschatz,GalvinandGagne?2005Caching
Importantprinciple,performedatmanylevelsinacomputer(inhardware,operatingsystem,software)InformationinusecopiedfromslowertofasterstoragetemporarilyFasterstorage(cache)checkedfirsttodetermineifinformationisthere
Ifitis,informationuseddirectlyfromthecache(fast)Ifnot,datacopiedtocacheandusedthere
Cachesmallerthanstoragebeingcached
CachemanagementimportantdesignproblemCachesizeandreplacementpolicyMainmemorycanbeviewedasalastcacheforsecondarystorage.
OperatingSystemConcepts–7thEdition,Jan12,20051.20Silberschatz,GalvinandGagne?2005PerformanceofVariousLevelsofStorage
MovementbetweenlevelsofstoragehierarchycanbeexplicitorimplicitOperatingSystemConcepts–7thEdition,Jan12,20051.21Silberschatz,GalvinandGagne?2005MigrationofIntegerAfromDisktoRegister
Multitaskingenvironmentsmustbecarefultousemostrecentvalue,notmatterwhereitisstoredinthestoragehierarchy
MultiprocessorenvironmentmustprovidecachecoherencyinhardwaresuchthatallCPUshavethemostrecentvalueintheircacheDistributedenvironmentsituationevenmorecomplex
SeveralcopiesofadatumcanexistVarioussolutionscoveredinChapter17
OperatingSystemConcepts–7thEdition,Jan12,20051.22Silberschatz,GalvinandGagne?2005I/OStructure
AlargeportionofoperatingsystemcodeisdedicatedtomanagingI/O.Ageneral-purposecomputersystemconsistsofCPUsandmultipledevicecontrollersthatareconnectedthroughacommonbus.Eachdevicecontrollerisinchargeofaspecifictypeofdevice.Dependingonthecontroller,theremaybemorethanoneattacheddevice.Adevicecontrollermaintainssomelocalbufferstorageandasetofspecial-purposeregisters.
OperatingSystemConcepts–7thEdition,Jan12,20051.23Silberschatz,GalvinandGagne?2005I/OStructure
Thedevicecontrollerisresponsibleformovingthedatabetweentheperipheraldevicesthatitcontrolsanditslocalbufferstorage.Typically,operatingsystemshaveadevicedriverforeachdevicecontroller.Thisdevicedriverunderstandsthedevicecontrollerandpresentsauniforminterfacetohedevicetotherestoftheoperatingsystem.
OperatingSystemConcepts–7thEdition,Jan12,20051.24Silberschatz,GalvinandGagne?2005Interrupt
Thecontrollerstartsthetransferofdatafromthedevicetoitslocalbuffer.Oncethetransferofdataiscomplete,thedevicecontrollerinformsthedevicedriverviaaninterruptthatithasfinisheditsoperation.OperatingSystemConcepts–7thEdition,Jan12,20051.25Silberschatz,GalvinandGagne?2005DirectMemoryAccess(DMA)
Aftersettingupbuffers,pointers,andcountersfortheI/Odevice,thedevicecontrollertransfersanentireblockofdatadirectlytoorfromitsownbufferstoragetomemory,withnointerventionbytheCPU.
Onlyoneinterruptisgeneratedperblock,totellthedevicedriverthattheoperationhascompleted.OperatingSystemConcepts–7thEdition,Jan12,20051.26Silberschatz,GalvinandGagne?2005Computer-SystemArchitecture
Single-ProcessorSystemsMultiprocessorSystems
threemainadvantages:
Increasedthroughput.
Economyofscale.
Increasedreliability
asymmetricmultiprocessingandsymmetricmultiprocessing(SMP)
ClusteredSystemsOperatingSystemConcepts–7thEdition,Jan12,20051.27Silberschatz,GalvinandGagne?2005OperatingSystemStructure
Multiprogrammingneededforefficiency
SingleusercannotkeepCPUandI/OdevicesbusyatalltimesMultiprogrammingorganizesjobs(codeanddata)soCPUalwayshasonetoexecuteAsubsetoftotaljobsinsystemiskeptinmemoryOnejobselectedandrunviajobschedulingWhenithastowait(forI/Oforexample),OSswitchestoanotherjob
Timesharing(multitasking)islogicalextensioninwhichCPUswitchesjobssofrequentlythatuserscaninteractwitheachjobwhileitisrunning,creatinginteractivecomputing
Responsetimeshouldbe<1secondEachuserhasatleastoneprogramexecutinginmemoryprocessIfseveraljobsreadytorunatthesametimeCPUschedulingIfprocessesdon’tfitinmemory,swappingmovestheminandouttorunVirtualmemoryallowsexecutionofprocessesnotcompletelyinmemory
OperatingSystemConcepts–7thEdition,Jan12,20051.28Silberschatz,GalvinandGagne?2005MemoryLayoutforMultiprogrammedSystemOperatingSystemConcepts–7thEdition,Jan12,20051.29Silberschatz,GalvinandGagne?2005Operating-SystemOperations
InterruptdrivenbyhardwareSoftwareerrororrequestcreatesexceptionortrap
Divisionbyzero,requestforoperatingsystemservice
Otherprocessproblemsincludeinfiniteloop,processesmodifyingeachotherortheoperatingsystemDual-modeoperationallowsOStoprotectitselfandothersystemcomponents
UsermodeandkernelmodeModebitprovidedbyhardware
Providesabilitytodistinguishwhensystemisrunningusercodeorkernelcode
Someinstructionsdesignatedasprivileged,onlyexecutableinkernelmode
Systemcallchangesmodetokernel,returnfromcallresetsittouserOperatingSystemConcepts–7thEdition,Jan12,20051.30Silberschatz,GalvinandGagne?2005TransitionfromUsertoKernelModeOperatingSystemConcepts–7thEdition,Jan12,20051.31Silberschatz,GalvinandGagne?2005Timer
Timertopreventinfiniteloop/processhoggingresources
SetinterruptafterspecificperiodOperatingsystemdecrementscounterWhencounterzerogenerateaninterruptSetupbeforeschedulingprocesstoregaincontrolorterminateprogramthatexceedsallottedtime
OperatingSystemConcepts–7thEdition,Jan12,20051.32Silberschatz,GalvinandGagne?2005ProcessManagement
Aprocessisaprograminexecution.Itisaunitofworkwithinthesystem.Programisapassiveentity,processisanactiveentity.Processneedsresourcestoaccomplishitstask
CPU,memory,I/O,filesInitializationdata
ProcessterminationrequiresreclaimofanyreusableresourcesSingle-threadedprocesshasoneprogramcounterspecifyinglocationofnextinstructiontoexecute
Processexecutesinstructionssequentially,oneatatime,untilcompletion
Multi-threadedprocesshasoneprogramcounterperthreadTypicallysystemhasmanyprocesses,someuser,someoperatingsystemrunningconcurrentlyononeormoreCPUs
ConcurrencybymultiplexingtheCPUsamongtheprocesses/threadsOperatingSystemConcepts–7thEdition,Jan12,20051.33Silberschatz,GalvinandGagne?2005ProcessManagementActivitiesTheoperatingsystemisresponsibleforthefollowingactivitiesinconnectionwithprocessmanagement:CreatinganddeletingbothuserandsystemprocessesSuspendingandresumingprocessesProvidingmechanismsforprocesssynchronizationProvidingmechanismsforprocesscommunicationProvidingmechanismsfordeadlockhandling
OperatingSystemConcepts–7thEdition,Jan12,20051.34Silberschatz,GalvinandGagne?2005MemoryManagement
AlldatainmemorybeforeandafterprocessingAllinstructionsinmemoryinordertoexecuteMemorymanagementdetermineswhatisinmemorywhen
OptimizingCPUutilizationandcomputerresponsetousers
Memorymanagementactivities
KeepingtrackofwhichpartsofmemoryarecurrentlybeingusedandbywhomDecidingwhichprocesses(orpartsthereof)anddatatomoveintoandoutofmemoryAllocatinganddeallocatingmemoryspaceasneeded
OperatingSystemConcepts–7thEdition,Jan12,20051.35Silberschatz,GalvinandGagne?2005File-SystemManagement
OSprovidesuniform,logicalviewofinformationstorage
Abstractsphysicalpropertiestologicalstorageunit-fileEachmediumiscontrolledbydevice(i.e.,diskdrive,tapedrive)
Varyingpropertiesincludeaccessspeed,capacity,data-transferrate,accessmethod(sequentialorrandom)
File-Systemmanagement
FilesusuallyorganizedintodirectoriesAccesscontrolonmostsystemstodeterminewhocanaccesswhatOSactivitiesinclude
Creatinganddeletingfilesanddirectories
Primitivestomanipulatefilesanddirs
Mappingfilesontosecondarystorage
Backupfilesontostable(non-volatile)storagemediaOperatingSystemConcepts–7thEdition,Jan12,20051.36Silberschatz,GalvinandGagne?2005Mass-StorageManagement
Usuallydisksusedtostoredatathatdoesnotfitinmainmemoryordatathatmustbekeptfora“l(fā)ong”periodoftime.PropermanagementisofcentralimportanceEntirespeedofcomputeroperationhingesondisksubsystemanditsalgorithmsOSactivities
Free-spacemanagementStorageallocationDiskscheduling
Somestorageneednotbefast
Tertiarystorageincludesopticalstorage,magnetictapeStillmustbemanagedVariesbetweenWORM(write-once,read-many-times)andRW(read-write)
OperatingSystemConcepts–7thEdition,Jan12,20051.37Silberschatz,GalvinandGagne?2005I/OSubsystem
OnepurposeofOSistohidepeculiaritiesofhardwaredevicesfromtheuserI/Osubsystemresponsiblefor
MemorymanagementofI/Oincludingbuffering(storingdatatemporarilywhileitisbeingtransferred),caching(storingpartsofdatainfasterstorageforperformance),spooling(theoverlappingofoutputofonejobwithinputofotherjobs)Generaldevice-driverinterfaceDriversforspecifichardwaredevices
OperatingSystemConcepts–7thEdition,Jan12,20051.38Silberschatz,GalvinandGagne?2005ProtectionandSecurity
Protection–anymechanismforcontrollingaccessofprocessesoruserstoresourcesdefinedbytheOSSecurity–defenseofthesystemagainstinternalandexternalattacks
Hugerange,includingdenial-of-service,worms,viruses,identitytheft,theftofservice
Systemsgenerallyfirstdistinguishamongusers,todeterminewhocandowhat
Useridentities(userIDs,securityIDs)includenameandassociatednumber,oneperuserUserIDthenassociatedwithallfiles,processesofthatusertodetermineaccesscontrolGroupidentifier(groupID)allowssetofuserstobedefinedandcontrolsmanaged,thenalsoassociatedwitheachprocess,filePrivilegeescalationallowsusertochangetoeffectiveIDwithmorerights
OperatingSystemConcepts–7thEdition,Jan12,20051.39Silberschatz,GalvinandGagne?2005DistributedSystems
Adistributedsystemisacollectionofphysicallyseparate,possiblyheterogeneouscomputersystemsthatarenetworkedtoprovidetheuserswithaccesstothevariousresourcesthatthesystemmaintains.OperatingSystemConcepts–7thEdition,Jan12,20051.40Silberschatz,GalvinandGagne?2005Special-PurposeSystems
Real-TimeEmbeddedSystems
MultimediaSystems
HandheldSystemsOperatingSystemConcepts–7thEdition,Jan12,20051.41Silberschatz,GalvinandGagne?2005Summary
Anoperatingsystemissoftwarethatmanagesthecomputerhardwareaswellasprovidinganenvironmentforapplicationprogramstorun.MainmemoryistheonlylargestorageareathattheprocessorcanaccessdirectlyMostcomputersystemsprovidesecondarystorageasanextensionofmainmemory.Secondarystorageprovidesaformofnonvolatilestoragethatiscapableofholdinglargequantitiesofdatapermanently.Thewidevarietyofstoragesystemsinacomputersystemcanbeorganizedinahierarchyaccordingtospeedandcost.Whereastheaccesstimegenerallyincreases.
OperatingSystemConcepts–7thEdition,Jan12,20051.42Silberschatz,GalvinandGagne?2005Summary
Thereareseveraldifferentstrategiesfordesigningacomputersystem.Uniprocessorsystemshaveonlyasingleprocessorwhilemultiprocessorsystemscontaintwoormoreprocessorsthatsharephysicalmemoryandperipheraldevices.Themostcommonmultiprocessordesignissymmetricmultiprocessing(orSMP),whereallprocessorsareconsideredpeersandrunindependentlyofoneanother.Clusteredsystemsareaspecializedformofmultiprocessorsystemsandconsistof
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026年及未來5年市場數(shù)據(jù)中國武漢市寫字樓行業(yè)市場競爭格局及發(fā)展趨勢預測報告
- 2025年高職(財務(wù)分析實務(wù))案例解讀測試試題及答案
- 2025年大學大一(人力資源規(guī)劃)人力配置期中測試試題及答案
- 2025年高職經(jīng)濟林培育與利用(果樹栽培技術(shù))試題及答案
- 2025年高職(機電一體化技術(shù))機電設(shè)備綜合技能測試試題及答案
- 2025年大學土壤肥料(施用技術(shù))試題及答案
- 2025年高職軟件技術(shù)(軟件技術(shù))試題及答案
- 2025年高職藥物使用(急救護理)試題及答案
- 2025年高職礦山機電技術(shù)(礦山設(shè)備運維)試題及答案
- 2026年質(zhì)量管理教學(質(zhì)量管理方法)試題及答案
- 2026貴州省省、市兩級機關(guān)遴選公務(wù)員357人考試備考題庫及答案解析
- 兒童心律失常診療指南(2025年版)
- 北京通州產(chǎn)業(yè)服務(wù)有限公司招聘備考題庫必考題
- 2026南水北調(diào)東線山東干線有限責任公司人才招聘8人筆試模擬試題及答案解析
- 伊利實業(yè)集團招聘筆試題庫2026
- 2026年基金從業(yè)資格證考試題庫500道含答案(完整版)
- 動量守恒定律(教學設(shè)計)-2025-2026學年高二物理上冊人教版選擇性必修第一冊
- 網(wǎng)絡(luò)素養(yǎng)與自律主題班會
- 波形護欄工程施工組織設(shè)計方案
- 非靜脈曲張性上消化道出血管理指南解讀課件
- GB/T 10922-202555°非密封管螺紋量規(guī)
評論
0/150
提交評論