欢迎来到天天文库
浏览记录
ID:39326389
大小:3.50 MB
页数:91页
时间:2019-06-30
《政企大客户营销技巧培训》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、ModernOperatingSystemsChapter2–Process&ThreadZhangYangSpring20132.1Processes2.2ThreadsContentofthislecture2.1Processes2.2ThreadsModernWorkstationsandPCsMultiplewindowsinpersonalcomputerdoingcompletelyindependentthingsWord,Excel,Photoshop,E-mail,music,etc
2、.MultipleactivitieswithinoneapplicationE.g.,inMicrosoftWordReadingandinterpretingkeystrokesFormattinglineandpagebreaksDisplayingwhatyoutypedSpellcheckingHyphenation….WhenthereisasingleprogramrunningintheCPU,itleadstothedegradationoftheCPUutilization.Exam
3、ple:WhenarunningprograminitiatesanI/Ooperation,theCPUremainidleuntiltheI/Ooperationiscompleted.SolutiontothisproblemisprovidedbyMultiprogramming.Multiprogramming(1)DefinitionAmodeofoperationthatprovidesfortheinterleavedexecutionoftwoormoreprogramsbyasing
4、leprocessor.ImprovingCPUutilizationByallowingseveralprogramstoresideinmainmemoryatthe“sametime”theCPUmightbeshared,suchthatwhenoneprograminitiatesanI/Ooperation,anotherprogramcanbeassignedtotheCPU,thustheimprovementoftheCPUutilization.Multiprogramming(2)
5、AllowsmultipleapplicationstorunatthesametimeExampleInsequentialenvironment,Aexecutesfirst,thenB.Concurrency(1)Example(ctd.)ConcurrencyConcurrency(2)ABCPUDEV1DEV1CPU10152025CPUDEV2CPU3035DEV24045CPUDEV2BenefitsofConcurrencyWhatarethelimitationswithoutconc
6、urrency?LongresponsetimeResourcesunderutilizedBetterresourceutilizationResourcesunusedbyoneapplicationcanbeusedbytheothersBetteraverageresponsetimeNoneedtowaitforotherapplicationstocompleteIssuesrelatedtoconcurrencyItiseasiertodoonethingatatime.Problemsw
7、ithdoingmultiplethings:ApplicationsneedtobeprotectedfromoneanotherAdditionalcoordinationmechanismsamongapplicationsOverheadtoswitchamongapplicationsPotentialperformancedegradationwhenrunningtoomanyapplicationsUsers,Programs,ProcessesUsershaveaccountsonth
8、esystemUserslaunchprogramsManyusersmaylaunchsameprogramOneusermaylaunchmanyinstancesofthesameprogramTheprocessisanOSabstractionforarunningprogramProcess:anexecutingprogramProcessesareinstancesofaprogramThe“program”canreall
此文档下载收益归作者所有