google云计算系列课程第一讲介绍.ppt

上传人:b****1 文档编号:1373618 上传时间:2022-10-21 格式:PPT 页数:37 大小:842KB
下载 相关 举报
google云计算系列课程第一讲介绍.ppt_第1页
第1页 / 共37页
google云计算系列课程第一讲介绍.ppt_第2页
第2页 / 共37页
google云计算系列课程第一讲介绍.ppt_第3页
第3页 / 共37页
google云计算系列课程第一讲介绍.ppt_第4页
第4页 / 共37页
google云计算系列课程第一讲介绍.ppt_第5页
第5页 / 共37页
点击查看更多>>
下载资源
资源描述

google云计算系列课程第一讲介绍.ppt

《google云计算系列课程第一讲介绍.ppt》由会员分享,可在线阅读,更多相关《google云计算系列课程第一讲介绍.ppt(37页珍藏版)》请在冰豆网上搜索。

google云计算系列课程第一讲介绍.ppt

DistributedComputingSeminar,Lecture1:

IntroductiontoDistributedComputing&SystemsBackground,ChristopheBisciglia,AaronKimball,&SierraMichels-SlettvetSummer2007,Exceptwhereotherwisenoted,thecontentsofthispresentationareCopyright2007UniversityofWashingtonandarelicensedundertheCreativeCommonsAttribution2.5License.,CourseOverview,5lectures1Introduction2TechnicalSide:

MapReduce&GFS2Theoretical:

AlgorithmsfordistributedcomputingReadings+QuestionsnightlyReadings:

http:

/http:

/,Outline,IntroductiontoDistributedComputingParallelvs.DistributedComputingHistoryofDistributedComputingParallelizationandSynchronizationNetworkingBasics,ComputerSpeedup,MooresLaw:

“Thedensityoftransistorsonachipdoublesevery18months,forthesamecost”(1965),Image:

TomsHardwareandnotsubjecttotheCreativeCommonslicenseapplicabletotherestofthiswork.,Image:

TomsHardware,Scopeofproblems,Whatcanyoudowith1computer?

Whatcanyoudowith100computers?

Whatcanyoudowithanentiredatacenter?

Distributedproblems,Renderingmultipleframesofhigh-qualityanimation,Image:

DreamWorksAnimationandnotsubjecttotheCreativeCommonslicenseapplicabletotherestofthiswork.,Distributedproblems,Simulatingseveralhundredorthousandcharacters,HappyFeetKingdomFeatureProductions;LordoftheRingsNewLineCinema,neitherimageissubjecttotheCreativeCommonslicenseapplicabletotherestofthework.,Distributedproblems,Indexingtheweb(Google)SimulatinganInternet-sizednetworkfornetworkingexperiments(PlanetLab)Speedingupcontentdelivery(Akamai),Whatisthekeyattributethatalltheseexampleshaveincommon?

Parallelvs.Distributed,Parallelcomputingcanmean:

VectorprocessingofdataMultipleCPUsinasinglecomputerDistributedcomputingismultipleCPUsacrossmanycomputersoverthenetwork,ABriefHistory1975-85,ParallelcomputingwasfavoredintheearlyyearsPrimarilyvector-basedatfirstGraduallymorethread-basedparallelismwasintroduced,Image:

ComputerPicturesDatabaseandCrayResearchCorpandisnotsubjecttotheCreativeCommonslicenseapplicabletotherestofthiswork.,“Massivelyparallelarchitectures”startrisinginprominenceMessagePassingInterface(MPI)andotherlibrariesdevelopedBandwidthwasabigproblem,ABriefHistory1985-95,ABriefHistory1995-Today,Cluster/gridarchitectureincreasinglydominantSpecialnodemachineseschewedinfavorofCOTStechnologiesWeb-wideclustersoftwareCompanieslikeGoogletakethistotheextreme,Parallelization&Synchronization,ParallelizationIdea,Parallelizationis“easy”ifprocessingcanbecleanlysplitintonunits:

ParallelizationIdea

(2),Inaparallelcomputation,wewouldliketohaveasmanythreadsaswehaveprocessors.e.g.,afour-processorcomputerwouldbeabletorunfourthreadsatthesametime.,ParallelizationIdea(3),ParallelizationIdea(4),ParallelizationPitfalls,Butthismodelistoosimple!

Howdoweassignworkunitstoworkerthreads?

Whatifwehavemoreworkunitsthanthreads?

Howdoweaggregatetheresultsattheend?

Howdoweknowalltheworkershavefinished?

Whatiftheworkcannotbedividedintocompletelyseparatetasks?

Whatisthecommonthemeofalloftheseproblems?

ParallelizationPitfalls

(2),Eachoftheseproblemsrepresentsapointatwhichmultiplethreadsmustcommunicatewithoneanother,oraccessasharedresource.Goldenrule:

Anymemorythatcanbeusedbymultiplethreadsmusthaveanassociatedsynchronizationsystem!

WhatisWrongWithThis?

Thread1:

voidfoo()x+;y=x;,Thread2:

voidbar()y+;x+=3;,Iftheinitialstateisy=0,x=6,whathappensafterthesethreadsfinishrunning?

Multithreaded=Unpredictability,Whenwerunamultithreadedprogram,wedontknowwhatorderthreadsrunin,nordoweknowwhentheywillinterruptoneanother.,Thread1:

voidfoo()eax=memx;inceax;memx=eax;ebx=memx;memy=ebx;,Thread2:

voidbar()eax=memy;inceax;memy=eax;eax=memx;addeax,3;memx=eax;,Manythingsthatlooklike“onestep”operationsactuallytakeseveralstepsunderthehood:

Multithreaded=Unpredictability,Thisappliestomorethanjustintegers:

PullingworkunitsfromaqueueReportingworkbacktomasterunitTellinganotherthreadthatitcanbeginthe“nextphase”ofprocessingAllrequiresynchronization!

SynchronizationPrimitives,Asynchronizationprimitiveisaspecialsharedvariablethatguaranteesthatitcanonlybeaccessedatomically.Hardwaresupportguaranteesthatoperationsonsynchronizationprimitivesonlyevertakeonestep,Semaphores,AsemaphoreisaflagthatcanberaisedorloweredinonestepSemaphoreswereflagsthatrailroadengineerswouldusewhenenteringasharedtrack,Onlyonesideofthesemaphorecaneverbered!

(Canbothbegreen?

),Semaphores,set()andreset()canbethoughtofaslock()andunlock()Callstolock()whenthesemaphoreisalreadylockedcausethethreadtoblock.Pitfalls:

Must“bind”semaphorestoparticularobjects;mustrememberto

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

当前位置:首页 > 医药卫生 > 药学

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

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