review操作系统基础.docx

上传人:b****8 文档编号:9378470 上传时间:2023-02-04 格式:DOCX 页数:78 大小:271.62KB
下载 相关 举报
review操作系统基础.docx_第1页
第1页 / 共78页
review操作系统基础.docx_第2页
第2页 / 共78页
review操作系统基础.docx_第3页
第3页 / 共78页
review操作系统基础.docx_第4页
第4页 / 共78页
review操作系统基础.docx_第5页
第5页 / 共78页
点击查看更多>>
下载资源
资源描述

review操作系统基础.docx

《review操作系统基础.docx》由会员分享,可在线阅读,更多相关《review操作系统基础.docx(78页珍藏版)》请在冰豆网上搜索。

review操作系统基础.docx

review操作系统基础

“A”representemphasesorchargecontent

“B”representfamiliarwithcontent

“C”representunderstandcontent

Chapter1:

Introduction

1.WhatisanOperatingSystem?

A

Aprogramthatactsasanintermediarybetweenauserofacomputerandthecomputerhardware.

Operatingsystemgoals:

Executeuserprogramsandmakesolvinguserproblemseasier.

Makethecomputersystemconvenienttouse.

Usethecomputerhardwareinanefficientmanner.

2.OperatingSystemDefinitionA

OSisaresourceallocator

Managesallresources

Decidesbetweenconflictingrequestsforefficientandfairresourceuse

OSisacontrolprogram

Controlsexecutionofprogramstopreventerrorsandimproperuseofthecomputer

“Everythingavendorshipswhenyouorderanoperatingsystem”isgoodapproximation

“Theoneprogramrunningatalltimesonthecomputer”isthekernel.Everythingelseiseitherasystemprogram(shipswiththeoperatingsystem)oranapplicationprogram

3.ComputerSystemStructureB

Computersystemcanbedividedintofourcomponents

Hardware–providesbasiccomputingresources

Operatingsystem:

Controlsandcoordinatesuseofhardwareamongvariousapplicationsandusers

Applicationprograms–definethewaysinwhichthesystemresourcesareusedtosolvethecomputingproblemsoftheusers

Users:

People,machines,othercomputers

4.ComputerSystemOrganizationB

Computer-systemoperation

OneormoreCPUs,devicecontrollersconnectthroughcommonbusprovidingaccesstosharedmemory

ConcurrentexecutionofCPUsanddevicescompetingformemorycycles

5.ComputerStartupA

bootstrapprogramisloadedatpower-uporreboot

TypicallystoredinROMorEPROM,generallyknownasfirmware

Initializatesallaspectsofsystem

Loadsoperatingsystemkernelandstartsexecution

6.CommonFunctionsofInterruptsA

Interrupttransferscontroltotheinterruptserviceroutinegenerally,throughtheinterruptvector,whichcontainstheaddressesofalltheserviceroutines.

Interruptarchitecturemustsavetheaddressoftheinterruptedinstruction.

Incominginterruptsaredisabledwhileanotherinterruptisbeingprocessedtopreventalostinterrupt.

Atrapisasoftware-generatedinterruptcausedeitherbyanerrororauserrequest.

Anoperatingsystemisinterruptdriven.

7.InterruptHandlingA

TheoperatingsystempreservesthestateoftheCPUbystoringregistersandtheprogramcounter.

Determineswhichtypeofinterrupthasoccurred:

polling

vectoredinterruptsystem

Separatesegmentsofcodedeterminewhatactionshouldbetakenforeachtypeofinterrupt

8.StorageHierarchyB

Storagesystemsorganizedinhierarchy.

Speed

Cost

Volatility

Caching–copyinginformationintofasterstoragesystem;mainmemorycanbeviewedasalastcacheforsecondarystorage.

9.DirectMemoryAccessStructureB

Usedforhigh-speedI/Odevicesabletotransmitinformationatclosetomemoryspeeds.

DevicecontrollertransfersblocksofdatafrombufferstoragedirectlytomainmemorywithoutCPUintervention.

Onlyoneinterruptisgeneratedperblock,ratherthantheoneinterruptperbyte.

10.OperatingSystemStructure(thedifferencebetweenmultiprogrammingandtimesharingmethods)B

Multiprogrammingneededforefficiency

SingleusercannotkeepCPUandI/Odevicesbusyatalltimes

Multiprogrammingorganizesjobs(codeanddata)soCPUalwayshasonetoexecute

Asubsetoftotaljobsinsystemiskeptinmemory

Onejobselectedandrunviajobscheduling

Whenithastowait(forI/Oforexample),OSswitchestoanotherjob

Timesharing(multitasking)islogicalextensioninwhichCPUswitchesjobssofrequentlythatuserscaninteractwitheachjobwhileitisrunning,creatinginteractivecomputing

Responsetimeshouldbe<1second

Eachuserhasatleastoneprogramexecutinginmemoryprocess

IfseveraljobsreadytorunatthesametimeCPUscheduling

Ifprocessesdon’tfitinmemory,swappingmovestheminandouttorun

Virtualmemoryallowsexecutionofprocessesnotcompletelyinmemory

11.Operating-SystemOperationsA

Interruptdrivenbyhardware

Softwareerrororrequestcreatesexceptionortrap

Divisionbyzero,requestforoperatingsystemservice

Otherprocessproblemsincludeinfiniteloop,processesmodifyingeachotherortheoperatingsystem

Dual-modeoperationallowsOStoprotectitselfandothersystemcomponents

Usermodeandkernelmode

Modebitprovidedbyhardware

Providesabilitytodistinguishwhensystemisrunningusercodeorkernelcode

Someinstructionsdesignatedasprivileged,onlyexecutableinkernelmode

Systemcallchangesmodetokernel,returnfromcallresetsittouser

12.TransitionfromUsertoKernelModeA

Timertopreventinfiniteloop/processhoggingresources

Setinterruptafterspecificperiod

Operatingsystemdecrementscounter

Whencounterzerogenerateaninterrupt

Setupbeforeschedulingprocesstoregaincontrolorterminateprogramthatexceedsallottedtime

Chapter2:

Operating-SystemStructures

1.OperatingSystemServicesA

Onesetofoperating-systemservicesprovidesfunctionsthatarehelpfultotheuser:

Userinterface-Almostalloperatingsystemshaveauserinterface(UI)

VariesbetweenCommand-LineInterface(CLI),GraphicsUserInterface(GUI),andBatch

Functionsthatarehelpfultotheuserandtoprocesses:

Programexecution-Loadaprogramintomemoryandrunit

File-systemmanipulation-Move,copy,anddeletefiles,createdirectories,changepermissions,etc.

Communications–Processesmayexchangeinformation,onthesamecomputerorbetweencomputersoveranetwork

Communicationsmaybeviasharedmemoryorthroughmessagepassing(packetsmovedbytheOS)

AnothersetofOSfunctionsexistsforensuringtheefficientoperationofthesystemitselfviaresourcesharing

Resourceallocation-Whenmultipleusersormultiplejobsrunningconcurrently,resourcesmustbeallocatedtoeachofthem

Manytypesofresources-Some(suchasCPUcycles,mainmemory,andfilestorage)mayhavespecialallocationcode,others(suchasI/Odevices)mayhavegeneralrequestandreleasecode.

Accounting-Tokeeptrackofwhichusersusehowmuchandwhatkindsofcomputerresources

Protectionandsecurity-Theownersofinformationstoredinamultiuserornetworkedcomputersystemmaywanttocontroluseofthatinformation,concurrentprocessesshouldnotinterferewitheachother

2.UserOperatingSystemInterface-CLIA

CLIallowsdirectcommandentry

Sometimesimplementedinkernel,sometimesbysystemsprogram

Sometimesmultipleflavorsimplemented–shells

3.UserOperatingSystemInterface-GUIA

User-friendlydesktopinterface

Iconsrepresentfiles,programs,actions,etc.

Variousmousebuttonsoverobjectsintheinterfacecausevariousactions

4.SystemCallsA

ProgramminginterfacetotheservicesprovidedbytheOS:

Processcontrol,filemanagement,devicemanagement,informationservices,communications

Typicallywritteninahigh-levellanguage(CorC++)

Mostlyaccessedbyprogramsviaahigh-levelApplicationProgramInterface(API)ratherthandirectsystemcalluse

5.SystemCallImplementationA

Typicallyusingsoftwareinterrupt(trap)

Registerissettoanumberassociatedwiththesystemcall

System-callinterfacemaintainsatableindexedaccordingtothesenumbers(cf.interruptvector)

ThesystemcallinterfaceinvokesintendedsystemcallinOSkernelandreturnsstatusofthesystemcallandanyreturnvalues

6.OperatingSystemDesignandImplementationA

Importantprincipletoseparate

Policy:

Whatwillbedone?

Mechanism:

Howtodoit?

Mechanismsdeterminehowtodosomething,policiesdecidewhatwillbedone

Theseparationofpolicyfrommechanismisaveryimportantprinciple,itallowsmaximumflexibilityifpolicydecisionsaretobechangedlater

7.VirtualMachinesB

Avirtualmachinetakesthelayeredapproachtoitslogicalconclusion

Ittreatshardwareandtheoperatingsystemkernelasthoughtheywereallhardware

Avirtualmachineprovidesaninterfaceidenticaltotheunderlyingbarehardware

8.OperatingSystemGenerationC

Operatingsystemsaredesignedtorunonanyofaclassofmachines;thesystemmustbeconfiguredforeachspecificcomputersite

SYSGENprogramobtainsinformationconcerningthespecificconfigurationofthehardwaresystem

Booting–startingacomputerbyloadingthekernel

Bootstrapprogram–codestoredinROMthatisabletolocatethekernel,loaditintomemory,andstartitsexecution

Chapter3:

Processes

1.ProcessConceptA

Anoperatingsystemexecutesavarietyofprograms:

Batchsystem–jobs

Time-sharedsystems–userprogramsortasks

Textbookusesthetermsjobandprocessalmostinterchangeably

Process–aprograminexecution;processexecutionmustprogressinsequentialfashion

Aprocessincludes:

programcounter

stack

datasection

2.ProcessStateA

Asaprocessexecutes,itchangesstate

new:

Theprocessisbeingcreated

running:

Instructionsarebeingexecuted

waiting:

Theprocessiswaitingforsomeeventtooccur

ready:

Theprocessiswaitingtobeassignedtoaprocessor

terminated:

Theprocesshasfinishedexecution

DiagramofProcessStateA

3.ProcessControlBlock(PCB)A

Informationassociatedwitheachprocess

Processstate

Programcounter

CPUregisters

CPUschedulinginformation

Memory-managementinformation

Accountinginformation

I/Ostatusinformation

ProcessControlBlock(PCB)

4.ProcessSchedulingQueuesA

Jobqu

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1