1第3章SoftwareKnowledge3.1OperatingSystem3.2DataStructures3.3ProgrammingLanguage3.4专业英语应用模块23.1OperatingSystem●Whatexactlydoesanoperatingsystemdo?Basically,itperformsanumberofsupportfunctions.●Allmodernoperatingsystemsaremultitaskingandcanrunseveralprocessessimultaneously.InmostcomputersthereisonlyoneCPU,soamultitaskingoperatingsystemcreatestheillusionofseveralprocessesrunningsimultaneouslyontheCPU.●Operatingsystemscanusevirtualmemorytorunprocessesthatrequiremoremainmemorythanisactuallyavailable.Withthistechnique,spaceontheharddriveisusedtomimictheextramemoryneeded.3MainContentsoftheText●Introduction●Resourceallocationandrelatedfunctions●ControlofI/OOperations●OSstructureResourceallocationcriteriadependonwhetheraresourceisasystemresourceorauser-createdresource.Twopopularstrategiesforresourceallocationare:Partitioningofresources;Allocationfromapool.45TofacilitateexecutionofI/Ooperations,mostoperatingsystemshaveastandardsetofcontrolinstructionstohandletheprocessingofallinputandoutputinstructions.Thesestandardinstructions,referredtoastheInput/OutputControlSystem(IOCS),areanintegralpartofmostoperatingsystems.TheysimplifythemeansbywhichallprogramsbeingprocessedmayundertakeI/Ooperations.6OSdesignstronglydependsontwofactors:architecturalfeaturesofthecomputeronwhichitoperates,andfeaturesofitsapplicationdomain.ThedependenceonthesetwofactorsposesobviousdifficultiesinusinganOSoncomputerswithdifferentarchitecturesanddifferentapplicationdomains.7Inearlyoperatingsystems,thisapproachfacedseveraldifficultiesduetothemonolithicstructureoftheOS.Thus,operatingsystemsdidnotprovidecleaninterfacesbetweenthearchitecturespecificandarchitectureindependentpartsoftheircode.HencethetotalportingeffortwasdeterminedbythetotalsizeofOScode,ratherthanbythesizeofitsarchitecturespecificpart.8KeyWordsallot分配concurrently同时发生地considerable相当的,重要的constraint强制,约束criteria标准critical批评的,临界的domain领域,范围embody使具体化entrust信托,委托illusion幻影,幻想integral整体的mechanism机制,机理9KeyWordsmimic模拟,模仿monolithic整体的,完全统一的partition分割perceive感知,认知perceptible可察觉的,感觉得到的primitive原始的,基本的privilege特权suspend暂停,挂起undergo经历utilization利用10Notes[1]Themostcommonmechanismusedtocreatethisillusionistimeslicemultitasking,wherebyeachprocessisrunindividuallyforafixedperiodoftime.译文:产生这种错觉的最常用机制是时间分割多任务处理,以每个过程各自运行固定的一段时间的方式来实现的。过去分词短语usedtocreatethisillusion作定语,修饰mechanism;由whereby引导的是非限制性定语从句。whereby:bymeansofwhich,以…方式;凭借。11Notes[2]Theprocessesappeartorunsimultaneouslybecausetheuser’ssenseoftimeismuchslowerthantheprocessingspeedofthecomputer.译文:由于用户的时间感觉比计算机的处理速度要慢得多,所以几个程序看起来是同时执行的。本句中由“because”引导原因状语从句,“…muchslowerthan…”是比较结构。12Notes[3]Operatingsystemscanusevirtualmemorytorunprocessesthatrequiremoremainmemorythanisactuallyavailable.译文:实际可用空间不够时,为了运行那些需要更多主存储空间的程序,操作系统可以利用虚拟存储器。本句中,torunprocesses…到句末为目的状语;由that引导的定语从句修饰和限定processes;than后面省略了主语that(that意指mainmemory)。13Notes[4]Boththepartitioningandthepool-basedallocationapproachescanbeusedtomanagethememoryresource.译文:资源分区和基于资源池的分配方式都适用于存储器资源管理。本句的主语是由并列的两部分组成,即“Boththepartitioningandthepool-basedallocationapproaches”,并且用被动态表示客观性。14Notes[5]Takingadvantageofthisfacility,datareadfromonelocationmaybedistributedthroughoutcomputerizedsystem.译文:利用这一功能,读自某一设备的数据可以分布贯穿整个计算机处理系统。现在分词短语Taking…做伴随状语;过去分词短语readfromonelocation作定语,修饰主语data。15ReadingMaterial——LinuxOperatingSystemLinuxisanoperatingsystemthatwasinitiallycreatedasahobbybyayoungstudent,LinusTorvaids,attheUniversityofHelsinkiinFinland.LinuxisanimplementationoftheUnixdesignphilosophy,whichmeansthatitisamulti-usersystem.Linuxisopen.Thismeansthatallprogrammersanduserscanhaveaccesstothesourcecodeaswellastherighttomodifyit.16ReadingMaterial——LinuxOperatingSystemLinuxisavailableinseveralformats.InordertogetabetterunderstandingofthewayyourLinuxsystemworks,orhowtocustomizeittosuityourneeds,youshouldreadtheHOWTOdocuments.Linuxisoneofthemorestableoperatingsystemsavailabletoday.173.2DataStructures●Datastructuresorganizedatainwaysthatmakealgorithmsmoreefficient.Forexample,considersomeofthewayswecanorganizedataforsearchingit.●Datastructuresprovideamoreunderstandablewaytolookatdata;thus,theyofferalevelofabstractioninsolvingproblems.●Datastructuresarereusablebecausetheytendtobemodularandcontext-free.Theyaremodularbecauseeachhasaprescribedinterfacethroughwhichaccesstodatastoredinthedatastructureisrestricted.18MainContentsoftheText●Anintroductiontodatastructures●Datastructuresandalgorithms●Datatype19Anydatastructureisdesignedtoorganizedatatosuitaspecificpurposesothatitcanbeaccessedandworkedwithinappropriateways.Incomputerprogramming,adatastructuremaybeselectedordesignedtostoredataforthepurposeofworkingonitwithvariousalgorithms.20Algorithmsanddatastructurescanbespecifiedinanyadequatelypreciselanguage.Englishandothernaturallanguagesaresatisfactoryifusedwithcaretoavoidambiguitybutmoreprecisemathematicallanguagesandprogramminglanguagesaregenerallypreferred.21Ifweprovideasetofpossibledatavaluesandasetofoperationsthatactonthevalues,wecanthinkofthecombinationasadatatype.Letuslookattwoclassesofdatatype