操作系統(tǒng)原理英文版課件:Chapter 1 Introduction_第1頁
操作系統(tǒng)原理英文版課件:Chapter 1 Introduction_第2頁
操作系統(tǒng)原理英文版課件:Chapter 1 Introduction_第3頁
操作系統(tǒng)原理英文版課件:Chapter 1 Introduction_第4頁
操作系統(tǒng)原理英文版課件:Chapter 1 Introduction_第5頁
已閱讀5頁,還剩57頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

OperatingSystemConcepts操作系統(tǒng)原理OperatingSystemConcepts課程概況(1/4)教學內容教學要求Introduction掌握操作系統(tǒng)的一般情況,了解本課程的學習方法OperatingsystemStructures介紹操作系統(tǒng)的組成使學生樹立操作系統(tǒng)的整體概念ProcessManagement操作系統(tǒng)的最重要的部分,要求學生牢固掌握進程概念,能夠借助進程概念編寫并發(fā)程序Threads要求學生掌握創(chuàng)建和管理線程的方法熟練使用多線程技術編程CPUScheduling要求學生理解并能編寫一個進程調度的程序ProcessSynchronization要求學生理解同步概念,掌握同步的編程方法Deadlocks要求學生理解死鎖現(xiàn)象,了解預防、避免、檢測、解除死鎖的方法OperatingSystemConcepts課程概況(2/4)教學內容教學要求MemoryManagement掌握固定分區(qū),可變分區(qū),段式,頁式存儲管理原理與算法VirtualMemory虛擬存儲是操作系統(tǒng)另一個重要概念。要求學生正確的理解虛存的概念熟練掌握請求頁式的地址變換過程以及常用的頁面置換算法FileSystems掌握文件系統(tǒng)的基本概念,熟練使用文件系統(tǒng)的操作方法I/OSystems掌握I/O系統(tǒng)的基本概念,理解設備驅動程序。弄清從用戶請求到設備完成用戶請求的全過程Mass-StorageStructure了解幾種磁盤調度算法OperatingSystemConcepts課程概況(3/4)學時:64學時教材操作系統(tǒng)概念(第七版影印版)西爾伯莎茨編著高教社2007OperatingSystemConcepts課程概況(4/4)考核方式閉卷考試成績評定:由下述三部分組成期末考試成績期中考試成績平時成績(作業(yè)、出勤等)OfficeHours:Monday:14:00~17:00(E-maildiscussionsarewelcome)Chapter1IntroductionWhatOperatingSystemsDoComputer-SystemOrganizationComputer-SystemArchitectureOperating-SystemStructureOperating-SystemOperationsProcessManagementMemoryManagementStorageManagementProtectionandSecurityDistributedSystemsSpecial-PurposeSystemsComputingEnvironmentsOperatingSystemConceptsChapter1:Introduction(6thEd.)WhatisanOperatingSystem?MainframeSystemsDesktopSystemsMultiprocessorSystemsDistributedSystemsClusteredSystemReal-TimeSystemsHandheldSystemsComputingEnvironmentsOperatingSystemConceptsChapter2:Computer-SystemStructures(6thEd.)ComputerSystemOperationI/OStructureStorageStructureStorageHierarchyHardwareProtectionNetworkStructureOperatingSystemConceptsTwoShortStoriesaboutOSStoryOne

OperatingSystemConcepts1988,

進入赫爾辛基大學計算機系1989,進入芬蘭陸軍,服11個月的兵役,主要服務于計算機部門1990,退伍後回到大學,開始接觸Unix。根據(jù)安德魯·斯圖爾特·塔能鮑姆所著的教科書及minix源碼,打造了自己的操作系統(tǒng)1991,在網絡上發(fā)布Linux內核OperatingSystemConceptsLinusTorvalds

StoryOne

SelectedQuotesfromLinusTorvaldsOperatingSystemConcepts"MynameisLinusTorvaldsandIamyourgod."——在1998Linux大會上的自我介紹StoryOne

SelectedQuotesfromLinusTorvaldsOperatingSystemConcepts"那年夏天我做了兩件事。第一件事是什么都沒做。第二件事是讀完了719頁的《操作系統(tǒng):設計和執(zhí)行》。那本紅色的簡裝本教科書差不多等于睡在了我的床上。"——關于暑假StoryOne

OperatingSystemConcepts"Linux不是靠犧牲寶貴的睡眠時間換來的。事實上,如果你想聽真話,那我就要說,我更喜歡睡覺。"——關于超時工作SelectedQuotesfromLinusTorvaldsStoryOne

OperatingSystemConcepts"尋找樂趣,做一些有趣的事情,增加財富和提高名聲。"——關于生活哲學SelectedQuotesfromLinusTorvaldsStoryOne

OperatingSystemConceptsStoryTwo

AMS在奮進號艙內2011年5月19日5:15安裝完畢,9:35開始接收數(shù)據(jù)77AMSPayloadandOperationControlCenterGeneva,SwitzerlandAMSDataFlow約翰遜航天中心(北航)SEUSupercomputingCenterInfiniband

cablesOperatingSystemConceptsFCcablesOperatingSystemConceptsOperatingSystemConceptsComputerSystemComponents1. Hardware–providesbasiccomputingresources(CPU,memory,I/Odevices).2. Operatingsystem–controlsandcoordinatestheuseofthehardwareamongthevariousapplicationprogramsforthevarioususers.3. Applicationsprograms–(compilers,databasesystems,videogames,businessprograms)areusedtosolveuserproblems.4. Users(people,machines,othercomputers).OperatingSystemConceptsAbstractViewofSystemComponentsOperatingSystemConceptsUserViewPCUsers:anoperatingsystemisaprogramthatprovidesaneasy-to-useinterfaceforusingthehardwareWorkstationUsers:anoperatingsystemisaprogramdesignedtocompromisebetweenindividualusabilityandresourceutilizationExperienceasaremoteuser?OperatingSystemConceptsSystemView(1/2)AResourceallocator:theoperatingsystemallocatesandreclaimsthesystemhardwareresourcestoandfromuserprogramsAControlProgram:theoperatingsystemcontrolstheexecutionofuserprogramstopreventerrorsandimproperuseofthecomputerOperatingSystemConceptsSystemView(2/2)Thereisno

universaldefinitionofwhatisanoperatingsystem.Acommondefinitionisthattheoperatingsystemistheoneprogramrunningatalltimesonthecomputer(i.e.,thekernel).AllotherprogramsareapplicationprogramsOperatingSystemConceptsTheGoalsofanOperatingSystemPrimaryGoal:efficient

operationofthecomputersystem.

Insomesystems,itisconvenience.

Inthepast,efficiencyisfarmoreimportantthanconvenience.OperatingSystemConceptsWhatisanOperatingSystem?Aprogramthatactsasanintermediarybetweentheapplicationprogramsandthecomputerhardware.Executeuserprogramsandmakesolvinguserproblemseasier.Makethecomputersystemconvenienttouse.Usethecomputerhardwareinanefficientmanner.Fromthecomputer’spointofview:Aresourceallocator,acontrolprogram,akernelOperatingSystemConceptsDesktopSystems(1/2)Personalcomputers–computersystemdedicatedtoasingleuser.I/Odevices–keyboards,mouse,displayscreens,smallprinters.Userconvenienceandresponsiveness.OperatingSystemConceptsDesktopSystems(2/2)CanadopttechnologydevelopedforlargeroperatingsystemindividualshavesoleuseofcomputeranddonotneedadvancedCPUutilizationofprotectionfeatures.Mayrunseveraldifferenttypesofoperatingsystems(Windows,MacOS,UNIX,Linux)OperatingSystemConceptsParallelSystemsMultiprocessorsystemswithmorethanoneCPUinclosecommunication.Tightlycoupledsystem–processorssharememoryandaclock;communicationusuallytakesplacethroughthesharedmemory.OperatingSystemConceptsParallelSystems(Cont.)Advantagesofparallelsystem:Increasedthroughput:GetsmorejobsdoneEconomyofscale:Becauseofresourcesharing,multiprocessorsystemsischeaperthanmultiplesingleprocessorsystems

Increasedreliability:thefailureofoneprocessorwillnothaltthewholesystemgracefuldegradationFault-tolerantsystemsOperatingSystemConceptsParallelSystems(Cont.)Symmetricmultiprocessing(SMP)Eachprocessorrunsanidenticalcopyoftheoperatingsystem.Manyprocessescanrunatoncewithoutperformancedeterioration.MustcarefullycontrolI/OtoensurethatthedatareachtheappropriateprocessorMayresultininefficienciesMostmodernoperatingsystemssupportSMPOperatingSystemConceptsSymmetricMultiprocessingArchitectureOperatingSystemConceptsParallelSystems(Cont.)AsymmetricmultiprocessingEachprocessorisassignedaspecifictask.Amasterprocessorcontrolsthesystem.Theotherprocessorseitherlooktothemasterforinstructionsorhavepredefinedtasks.Thus,thisdefinesamaster-slaverelationshipmasterprocessorschedulesandallocatedworktoslaveprocessors.MorecommoninextremelylargesystemsOperatingSystemConceptsDistributedSystemsDistributethecomputationamongseveralphysicalprocessors.Looselycoupledsystem–eachprocessorhasitsownlocalmemory;processorscommunicatewithoneanotherthroughvariouscommunicationslines,suchashigh-speedbusesortelephonelines.OperatingSystemConceptsDistributedSystems(cont)Adistributedsystemisacollectionofphysicallyseparate,possibleheterogeneouscomputersystemsthatarenetworked

toprovidetheuserswithaccesstothevariousresourcesthatthesystemmaintainsAdvantagesofdistributedsystems.ResourcesSharingComputationspeedup–loadsharingReliabilityCommunicationsOperatingSystemConceptsDistributedSystems(cont)Requiresnetworkinginfrastructure.Localareanetworks(LAN)orWideareanetworks(WAN)Maybeeitherclient-serverorpeer-to-peersystems.OperatingSystemConceptsGeneralStructureofClient-ServerOperatingSystemConceptsClusteredSystemsAclusteredsystemhastwoormoreindividualsystemssharedstorageandcloselylinkedviaLANnetworkingThekeyofclusteredsystemishighavailability.AsymmetricClustering:Onemachineisinhot-standbymodewhileothersarerunningapplications.Thehot-standbymachine(i.e.,doesnothingbut)monitorsothermachinesandbecomesactiveifoneserverfails.SymmetricClustering:Twoormorehostsarerunningapplicationsandmonitoreachother.ThisismoreefficientasitusesallavailablehardwareDemoLinuxBasiccommands:ls,mv,vi,cp,scp,hostname,ssh,xserver….gccClusterJobscheduler:LoadSharingFacility(LSF)BsubexampleFileSystem:GPFSOperatingSystemConceptsHomework1OperatingSystemConceptsReal-TimeSystemsOftenusedasacontroldeviceinadedicatedapplicationsuchascontrollingscientificexperiments,medicalimagingsystems,industrialcontrolsystems,andsomedisplaysystems.OperatingSystemConceptsReal-TimeSystems(Cont.)Areal-timeoperatingsystemhaswell-defined,fixedtimeconstraints.Processingmust

bedonewithinthedefinedconstraints,orthesystemwillfail.Real-Timesystemsmaybeeitherhard

orsoftreal-time.HardReal-TimeSystemsguaranteethatcriticaltasksbecompletedontime.SoftReal-TimeSystemsprioritizecriticaltasks.Thatis,acriticaltaskgetpriorityoverothertasks,andretainsthatpriorityuntilitcompletes.Embeddedsystemsalmostalwaysrunreal-timeoperatingsystemsOperatingSystemConceptsHandheldSystemsPersonalDigitalAssistants(PDAs)CellulartelephonesIssues:LimitedmemorySlowprocessorsSmalldisplayscreens.OperatingSystemConceptsMultiprogrammedBatchSystemsSeveraljobsarekeptinmainmemoryatthesametime,andtheCPUismultiplexedamongthem.KeepsservaljobsinmemorysimultaneouslyPicksandbeginstoexecuteoneIfthatjobneedstowait,CPUisswitchedtoanotheroneIt’sthefirstinstancewheretheoperatingsystemmustmakedecisionsfortheusersOperatingSystemConceptsOSFeaturesNeededforMultiprogrammingI/Oroutinesuppliedbythesystem.Memorymanagement–thesystemmustallocatethememorytoseveraljobs.CPUscheduling–thesystemmustchooseamongseveraljobsreadytorun.Allocationofdevices.Jobscheduling–thesystemmustchooseamongjobsreadytobebroughtintomemoryOperatingSystemConceptsAdvantagesanddisadvantagesofmultiprogramming:CPU利用率大大提高用戶無控制權,無交互性,延遲大引入多道程序設計技術的根本目的:

提高CPU的利用率,充分發(fā)揮并行性,

這包括:程序之間;設備之間;設備與CPU之間均并行工作。OperatingSystemConcepts例:有兩道程序A、B,按下圖以多道程序方式運行,要求在右圖畫出它們的運行軌跡,并計算在60ms內,CPU的利用率,假設起始時首先運行B,并允許忽略監(jiān)督程序切換A、B的時間。OperatingSystemConcepts運行15msI/O20ms運行10msI/O10msABBAI/OI/O10ms60mstBA請畫個示意圖。OperatingSystemConcepts解:BAI/OI/O1060t20304050253545若在單道程序系統(tǒng)中,CPU的利用率是多少?OperatingSystemConcepts為了說明多道程序的優(yōu)點,不妨參考RTurner提出的例子:某計算機系統(tǒng),有256KB的主存(不包含操作系統(tǒng)),一個磁盤,一個終端和一臺打印機。同時提交的三個作業(yè)分別命名為JOB1、JOB2、JOB3。各作業(yè)運行時間分別為5min、15min和10min。它們對資源的使用情況如下表所示:OperatingSystemConcepts作業(yè)名作業(yè)類型所需主存/KB所需磁盤所需終端所需打印機運行時間/minJOB1CPU型50不用不用不用5JOB2I/O型100不用需要不用15JOB3I/O型80需要不用需要10三個作業(yè)的執(zhí)行要求OperatingSystemConcepts假定JOB1主要使用CPU處理數(shù)據(jù),JOB2主要使用終端進行作業(yè)的輸入,JOB3運行時主要使用磁盤和打印機,后兩作業(yè)都只需要較少的CPU時間。對于簡單批處理情況,這些作業(yè)將按順序執(zhí)行。JOB1運行5min完成,JOB2在等待5min后,運行15min完成,JOB3在等待20min后開始執(zhí)行。三個作業(yè)全部完成需要30min(這三個作業(yè)是一批)。OperatingSystemConcepts采用多道程序設計技術,可讓這三個作業(yè)并行運行。由于它們運行中幾乎不同時使用同一資源,所以三個作業(yè)可同時運行。JOB1在進行數(shù)據(jù)處理的同時,JOB2在終端上進行作業(yè)輸入,JOB3在使用磁盤和打印機。因此,JOB1只需5min完成,JOB2需15min完成,JOB3需10min完成。這樣三個作業(yè)全部完成的時間只需15min,顯然系統(tǒng)處理效率明顯提高。OperatingSystemConceptsTime-SharingSystems–InteractiveComputing(1/2)Interactivecomputersystemprovidesdirectcommunicationbetwe

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論