操作系統(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ù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

OperatingSystemConcepts操作系統(tǒng)原理OperatingSystemConcepts課程概況(1/4)教學(xué)內(nèi)容教學(xué)要求Introduction掌握操作系統(tǒng)的一般情況,了解本課程的學(xué)習(xí)方法OperatingsystemStructures介紹操作系統(tǒng)的組成使學(xué)生樹立操作系統(tǒng)的整體概念ProcessManagement操作系統(tǒng)的最重要的部分,要求學(xué)生牢固掌握進(jìn)程概念,能夠借助進(jìn)程概念編寫并發(fā)程序Threads要求學(xué)生掌握創(chuàng)建和管理線程的方法熟練使用多線程技術(shù)編程CPUScheduling要求學(xué)生理解并能編寫一個(gè)進(jìn)程調(diào)度的程序ProcessSynchronization要求學(xué)生理解同步概念,掌握同步的編程方法Deadlocks要求學(xué)生理解死鎖現(xiàn)象,了解預(yù)防、避免、檢測、解除死鎖的方法OperatingSystemConcepts課程概況(2/4)教學(xué)內(nèi)容教學(xué)要求MemoryManagement掌握固定分區(qū),可變分區(qū),段式,頁式存儲(chǔ)管理原理與算法VirtualMemory虛擬存儲(chǔ)是操作系統(tǒng)另一個(gè)重要概念。要求學(xué)生正確的理解虛存的概念熟練掌握請求頁式的地址變換過程以及常用的頁面置換算法FileSystems掌握文件系統(tǒng)的基本概念,熟練使用文件系統(tǒng)的操作方法I/OSystems掌握I/O系統(tǒng)的基本概念,理解設(shè)備驅(qū)動(dòng)程序。弄清從用戶請求到設(shè)備完成用戶請求的全過程Mass-StorageStructure了解幾種磁盤調(diào)度算法OperatingSystemConcepts課程概況(3/4)學(xué)時(shí):64學(xué)時(shí)教材操作系統(tǒng)概念(第七版影印版)西爾伯莎茨編著高教社2007OperatingSystemConcepts課程概況(4/4)考核方式閉卷考試成績評定:由下述三部分組成期末考試成績期中考試成績平時(shí)成績(作業(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,

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

StoryOne

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

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

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

OperatingSystemConcepts"尋找樂趣,做一些有趣的事情,增加財(cái)富和提高名聲。"——關(guān)于生活哲學(xué)SelectedQuotesfromLinusTorvaldsStoryOne

OperatingSystemConceptsStoryTwo

AMS在奮進(jìn)號(hào)艙內(nèi)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利用率大大提高用戶無控制權(quán),無交互性,延遲大引入多道程序設(shè)計(jì)技術(shù)的根本目的:

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

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

溫馨提示

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

最新文檔

評論

0/150

提交評論