




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
OperatingSystemConcepts操作系統(tǒng)原理OperatingSystemConcepts課程概況(1/4)教學(xué)內(nèi)容教學(xué)要求Introduction掌握操作系統(tǒng)的一般情況,了解本課程的學(xué)習(xí)方法OperatingsystemStructures介紹操作系統(tǒng)的組成使學(xué)生樹(shù)立操作系統(tǒng)的整體概念ProcessManagement操作系統(tǒng)的最重要的部分,要求學(xué)生牢固掌握進(jìn)程概念,能夠借助進(jìn)程概念編寫(xiě)并發(fā)程序Threads要求學(xué)生掌握創(chuàng)建和管理線程的方法熟練使用多線程技術(shù)編程CPUScheduling要求學(xué)生理解并能編寫(xiě)一個(gè)進(jìn)程調(diào)度的程序ProcessSynchronization要求學(xué)生理解同步概念,掌握同步的編程方法Deadlocks要求學(xué)生理解死鎖現(xiàn)象,了解預(yù)防、避免、檢測(cè)、解除死鎖的方法OperatingSystemConcepts課程概況(2/4)教學(xué)內(nèi)容教學(xué)要求MemoryManagement掌握固定分區(qū),可變分區(qū),段式,頁(yè)式存儲(chǔ)管理原理與算法VirtualMemory虛擬存儲(chǔ)是操作系統(tǒng)另一個(gè)重要概念。要求學(xué)生正確的理解虛存的概念熟練掌握請(qǐng)求頁(yè)式的地址變換過(guò)程以及常用的頁(yè)面置換算法FileSystems掌握文件系統(tǒng)的基本概念,熟練使用文件系統(tǒng)的操作方法I/OSystems掌握I/O系統(tǒng)的基本概念,理解設(shè)備驅(qū)動(dòng)程序。弄清從用戶請(qǐng)求到設(shè)備完成用戶請(qǐng)求的全過(guò)程Mass-StorageStructure了解幾種磁盤(pán)調(diào)度算法OperatingSystemConcepts課程概況(3/4)學(xué)時(shí):64學(xué)時(shí)教材操作系統(tǒng)概念(第七版影印版)西爾伯莎茨編著高教社2007OperatingSystemConcepts課程概況(4/4)考核方式閉卷考試成績(jī)?cè)u(píng)定:由下述三部分組成期末考試成績(jī)期中考試成績(jī)平時(shí)成績(jī)(作業(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ī)部門(mén)1990,退伍後回到大學(xué),開(kāi)始接觸Unix。根據(jù)安德魯·斯圖爾特·塔能鮑姆所著的教科書(shū)及minix源碼,打造了自己的操作系統(tǒng)1991,在網(wǎng)絡(luò)上發(fā)布Linux內(nèi)核OperatingSystemConceptsLinusTorvalds
StoryOne
SelectedQuotesfromLinusTorvaldsOperatingSystemConcepts"MynameisLinusTorvaldsandIamyourgod."——在1998Linux大會(huì)上的自我介紹StoryOne
SelectedQuotesfromLinusTorvaldsOperatingSystemConcepts"那年夏天我做了兩件事。第一件事是什么都沒(méi)做。第二件事是讀完了719頁(yè)的《操作系統(tǒng):設(shè)計(jì)和執(zhí)行》。那本紅色的簡(jiǎn)裝本教科書(shū)差不多等于睡在了我的床上。"——關(guān)于暑假StoryOne
OperatingSystemConcepts"Linux不是靠犧牲寶貴的睡眠時(shí)間換來(lái)的。事實(shí)上,如果你想聽(tīng)真話,那我就要說(shuō),我更喜歡睡覺(jué)。"——關(guān)于超時(shí)工作SelectedQuotesfromLinusTorvaldsStoryOne
OperatingSystemConcepts"尋找樂(lè)趣,做一些有趣的事情,增加財(cái)富和提高名聲。"——關(guān)于生活哲學(xué)SelectedQuotesfromLinusTorvaldsStoryOne
OperatingSystemConceptsStoryTwo
AMS在奮進(jìn)號(hào)艙內(nèi)2011年5月19日5:15安裝完畢,9:35開(kāi)始接收數(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利用率大大提高用戶無(wú)控制權(quán),無(wú)交互性,延遲大引入多道程序設(shè)計(jì)技術(shù)的根本目的:
提高CPU的利用率,充分發(fā)揮并行性,
這包括:程序之間;設(shè)備之間;設(shè)備與CPU之間均并行工作。OperatingSystemConcepts例:有兩道程序A、B,按下圖以多道程序方式運(yùn)行,要求在右圖畫(huà)出它們的運(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請(qǐng)畫(huà)個(gè)示意圖。OperatingSystemConcepts解:BAI/OI/O1060t20304050253545若在單道程序系統(tǒng)中,CPU的利用率是多少?OperatingSystemConcepts為了說(shuō)明多道程序的優(yōu)點(diǎn),不妨參考RTurner提出的例子:某計(jì)算機(jī)系統(tǒng),有256KB的主存(不包含操作系統(tǒng)),一個(gè)磁盤(pán),一個(gè)終端和一臺(tái)打印機(jī)。同時(shí)提交的三個(gè)作業(yè)分別命名為JOB1、JOB2、JOB3。各作業(yè)運(yùn)行時(shí)間分別為5min、15min和10min。它們對(duì)資源的使用情況如下表所示:OperatingSystemConcepts作業(yè)名作業(yè)類型所需主存/KB所需磁盤(pán)所需終端所需打印機(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í)主要使用磁盤(pán)和打印機(jī),后兩作業(yè)都只需要較少的CPU時(shí)間。對(duì)于簡(jiǎn)單批處理情況,這些作業(yè)將按順序執(zhí)行。JOB1運(yùn)行5min完成,JOB2在等待5min后,運(yùn)行15min完成,JOB3在等待20min后開(kāi)始執(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在使用磁盤(pán)和打印機(jī)。因此,JOB1只需5min完成,JOB2需15min完成,JOB3需10min完成。這樣三個(gè)作業(yè)全部完成的時(shí)間只需15min,顯然系統(tǒng)處理效率明顯提高。OperatingSystemConceptsTime-SharingSystems–InteractiveComputing(1/2)Interactivecomputersystemprovidesdirectcommunicationbetwe
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年十八項(xiàng)醫(yī)療核心制度考試試題庫(kù)及參考答案
- 遼寧省沈陽(yáng)市康平縣2024-2025學(xué)年八年級(jí)下學(xué)期期末語(yǔ)文試題(解析版)
- 小學(xué)技術(shù)考試試題及答案
- 2025培訓(xùn)中心合作協(xié)議模板
- 2025授權(quán)代理協(xié)議書(shū)全新版
- 2025勞動(dòng)合同解除證明書(shū)電子版
- 搬運(yùn)作業(yè)培訓(xùn)課件
- 搜尋動(dòng)人事課件
- 2025執(zhí)業(yè)醫(yī)師合同范本
- 時(shí)政面試全攻略:如何應(yīng)對(duì)最近時(shí)政面試題
- 2025年甘肅省公職招錄考試(省情時(shí)政)歷年參考題庫(kù)含答案詳解(5套)
- 期末必考題檢測(cè)卷(三)(含答案)高一數(shù)學(xué)下學(xué)期人教A版必修第二冊(cè)
- 企業(yè)注銷考試題庫(kù)及答案
- 2025北京北投集團(tuán)“畢業(yè)季”校園招聘17人筆試參考題庫(kù)附帶答案詳解
- 工藝執(zhí)行管理辦法
- 高中特難英語(yǔ)題目及答案
- 體育機(jī)構(gòu)推廣方案模板(3篇)
- 園區(qū)改造運(yùn)營(yíng)方案(3篇)
- 2025年大學(xué)輔導(dǎo)員考試題庫(kù)真題及答案
- 腮紅畫(huà)法教學(xué)課件
- 二零二五版便利店員工勞動(dòng)合同模板
評(píng)論
0/150
提交評(píng)論