操作系統(tǒng)英文教學課件Chapter1Introduction_第1頁
操作系統(tǒng)英文教學課件Chapter1Introduction_第2頁
操作系統(tǒng)英文教學課件Chapter1Introduction_第3頁
操作系統(tǒng)英文教學課件Chapter1Introduction_第4頁
操作系統(tǒng)英文教學課件Chapter1Introduction_第5頁
已閱讀5頁,還剩41頁未讀, 繼續(xù)免費閱讀

付費下載

下載本文檔

版權(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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論