教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 范文大全 > 行业范文 >

Graphic Engine Resource Management

来源:网络收集 时间:2026-08-08
导读: Modern consumer-grade 3D graphic cards boast a computation/memory resource that can easily rival or even exceed that of standard desktop PCs. Although these cards are mainly designed for 3D gaming applications, their enormous computational

Modern consumer-grade 3D graphic cards boast a computation/memory resource that can easily rival or even exceed that of standard desktop PCs. Although these cards are mainly designed for 3D gaming applications, their enormous computational power has attrac

GraphicEngineResourceManagement

MikhailBautinAshokDwarakinathTzi-ckerChiueh

ComputerScienceDepartment

StonyBrookUniversity

{mbautin,ashok,chiueh}@cs.sunysb.edu

ABSTRACT

Modernconsumer-grade3Dgraphiccardsboastacomputation/memoryresourcethatcaneasilyrivalorevenexceedthatofstandarddesktopPCs.Althoughthesecardsaremainlydesignedfor3Dgamingapplications,theirenormouscomputationalpowerhasattracteddeveloperstoportanincreasingnumberofscienti ccomputationprogramstothesecards,includingmatrixcomputation,collisiondetection,cryptography,databasesorting,etc.Asmoreandmoreapplicationsrunon3Dgraphiccards,thereisaneedtoallocatethecomputation/memoryresourceonthesecardsamongthesharingapplicationsmorefairlyande ciently.Inthispaper,wedescribethedesign,implementationandevaluationofaGraphicProcessingUnit(GPU)schedulerbasedonDe citRoundRobinschedulingthatsuccessfullyallocatestoeveryprocessanequalshareoftheGPUtimeregardlessoftheirdemand.Thisscheduler,calledGERM,estimatestheexecutiontimeofeachGPUcommandgroupbasedondynamicallycollectedstatistics,andcontrolseachprocess’sGPUcommandproductionratethroughitsCPUschedulingpriority.Measurementsonthe rstGERMprototypeshowthatthisapproachcankeepthemaximalGPUtimeconsumptiondi erenceamongconcurrentGPUprocessesconsistentlybelow5%foravarietyofapplicationmixes.

Keywords:GPUscheduling,ResourceManagement,GPUfairness,DRI,DRMkernelmodule,GERM

1.INTRODUCTION

Modernconsumer-gradegraphiccardsboastacomputation/memoryresourcethatcaneasilyrivalorevenexceedthatofstandarddesktopPCs.Forexample,aGeforce8800GTX-basedcardcontains786MBofmemorywithatotalmemorybandwidthof86.4GB/sec,andaG80GPUthathas128shaderprocessorseachoperatingat

1.35GHz,where16pixelsareprocessedsimultaneouslyineachclockcycle.Althoughthesecardsareoriginallydesignedfor3Dgamingapplications,theirenormouscomputationalpowerhasattractedanincreasingnumberofresearcherstoporttheirapplicationstothem.Non-graphicapplications1thathavebeensuccessfullyportedtoGPUsincludematrixcomputation,video/imageprocessing,collisiondetection,cryptography,databasesorting,etc.AsmoreandmoreGPU-exploitingapplicationsstarttoemerge,aGPU’scomputation/memoryresourcemayneedtobetime-sharedamongmultiplesuchapplicationsthatarerunningconcurrently.Asaresult,GPUneedsanoperatingsystemtomanageitscomputation/memoryresource,justasCPU.Inaddition,theGPU’sresourcemanagershouldcoordinateitsresourceallocationdecisionswiththosemadebythemainOSrunningontheCPU.

ExistingoperatingsystemsupportforGPU2,3allowsmultiplegraphicapplicationstorunonasingleGPUasifeachofthemhasexclusiveaccesstotheGPU’sresource,butdoesnotpreventapplicationsfrommonopolizingtheGPUresource.Typically,agraphicapplicationisbuiltontopofauser-levelgraphiclibrary,e.g.OpenGLorDirect3D,whichconvertshigh-levelcommandsintolow-levelGPUcommandsthroughauser-levelGPU-speci cdriver.AGPUinteractswithitsdriverviaaGPUcommandringbu eronthegraphiccard,towhichtheGPUdriverDMAscommandsfromthehostmemory.AlthoughGPUinterruptsCPUwhenDMAtransactionscomplete,theydonotgenerateinterruptswhenaGPUcommandexitstheGPU’sgraphicpipeline.

ModernGPUsarestatefulinthesensethatagraphicapplication’sGPUcommandsmustbeexecutedwithrespecttoaspeci cGPUstatethatitsetupbeforehand.AGPUstatetypicallyincludestransformationmatrices,view-portspeci cations,lightingparameters,etc.Becausedi erentapplicationsrequiredi erentGPUstates,itisessentialtorestoretheGPUstateofagraphicapplicationbeforeschedulingitsGPUcommands.Restoringagraphicapplication’sstaterequiresissuingasequenceofGPUcommandstoproperlysetupthe

Modern consumer-grade 3D graphic cards boast a computation/memory resource that can easily rival or even exceed that of standard desktop PCs. Although these cards are mainly designed for 3D gaming applications, their enormous computational power has attrac

GPU.ThisstepissimilartocontextswitchingassociatedwithmultiplexingprocessesonaCPU,exceptonekeydi erence:ContextswitchingisperformedbytheOSaspartofCPUschedulingandistypicallytransparenttotheapplications,whereasGPUstateswitchingisdonebytheuser-levelGPUdriver,andisdecoupledfromtheCPUscheduler.

BecausetheCPUschedulerisnotresponsibleforestablishingagraphicapplication’sstatebeforeschedulingitontheCPU,thereisnoguaranteethatitsGPUcommandsareexecutedwithrespecttotheircorrespondingstate.Toaddressthisproblem,theuser-levelGPUdriverofagraphicapplicationmustacquirealockbeforesubmittingcommandstotheGPUtoguaranteethatithasexclusiveaccesstotheGPU.WecallthesetofcommandsanapplicationissuestotheGPUbetweenalockacquisitionandalockreleaseasacommandbatch,whichisdi erentfromacommandgroup,aminimalsequenceofcommandsthatmustbeDMAedintotheGPUatomically.

Asaresultoftheabovedesign,thecomputationandmemoryresourcesontheGPUareallocatedona rstcome rstservebasis.Moreconcretely,theGPUprocessescommandsintheGPUcommandringbu erintheorderinwhichtheyareinsertedwithoutregardstoanynotionoffairnessorpriority.BecauseGPUcommandsmayrequestallocationofphysicalmemoryonthegraphiccard,theseallocationrequestsarealsoservicedona rstcome rstserveorder.

TheprevailingGPUcommandschedulingmodelhasseveralseriousweaknesses.First,itcannotlimittheamountofGPUresourceconsumedbyindividualprocesses,asisdonebyCPUschedulerusingtimequanta,becauseeachgraphicapplicationisallowedtoissueasmanyGPUcommandsasitwantsonceacquiringthelockprotectingthecommandringbu er.Second,ifaprocessacquiresthecommandringbu erlockanddoesnotreleaseitmaliciouslyorbymistake,nootherprocessescanissuecommandstotheGPUandtheGPU’sresourcemayliewastedduringsuchtimes.Finally,theresourceallocationdecisionsoftheGPUschedulerarenotcoordinatedwiththeCPUscheduler’s.Thiscouldhurtagraphicapplication’sperformanceattimesofGPUcommandburstsbecausetheCPUan …… 此处隐藏:38784字,全部文档内容请下载后查看。喜欢就下载吧 ……

Graphic Engine Resource Management.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/fanwen/983581.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)