欢迎来到天天文库
浏览记录
ID:33508337
大小:93.00 KB
页数:11页
时间:2019-02-26
《cloudsim源代码学习之vm》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、packageorg.cloudbus.cloudsim;importjava.util.ArrayList;//Thisclassprovidesmethodstomanipulatethesizeofthearraythatisusedinternallytostorethelist.importjava.util.List;/**【虚拟机】*VmrepresentsaVM:【itrunsinsideaHost,sharinghostList*withotherVMs.Itprocessescloudlets.】Thisprocessin
2、ghappensaccording*toapolicy,definedbytheCloudletScheduler.EachVMhasaowner(每个虚拟机有一个所有者),whichcan*submitcloudletstotheVMtobeexecuted**@authorRodrigoN.Calheiros*@authorAntonBeloglazov*@sinceCloudSimToolkit1.0*/publicclassVm{/**Theid.ID号*/privateintid;/**Theuserid.用户编号*/private
3、intuserId;privateStringuid;/**Thesize.大小*/privatelongsize;/**TheMIPS.处理速度MIPS*/privatedoublemips;/**ThePEsnumber.PE数*/privateintpesNumber;/**Theram.内存*/privateintram;/**Thebw.带宽*/privatelongbw;/**Thevmm.虚拟机管理程序*/privateStringvmm;/**TheCloudletscheduler.云任务调度程序*/privateCloud
4、letSchedulercloudletScheduler;/**Thehost.主机*/privateHosthost;/**Inmigrationflag.迁移标志*/privatebooleaninMigration;/**Thecurrentallocatedsize.当前分配大小*/privatelongcurrentAllocatedSize;/**Thecurrentallocatedram.当前分配内存*/privateintcurrentAllocatedRam;/**Thecurrentallocatedbw.当前分配带宽
5、*/privatelongcurrentAllocatedBw;/**Thecurrentallocatedmips.当前分配mips*/privateListcurrentAllocatedMips;/**Therecentlycreated.最近创建*/privatebooleanrecentlyCreated;/**【虚拟机特征对象】*CreatesanewVMCharacteristicsobject.**@paramiduniqueIDoftheVM*@paramuserIdIDoftheVM'sowner*@par
6、amsizeamountofstorage*@paramramamountofram*@parambwamountofbandwidth*@parampesNumberamountofCPUsCPU总和*@paramvmmvirtualmachinemonitor虚拟机监控器*@paramcloudletSchedulercloudletSchedulerpolicyforcloudlets云任务调度协议*@paramprioritythepriority优先权*@parammipsthemips**@preid>=0*@preuserId>
7、=0*@presize>0*@preram>0*@prebw>0*@precpus>0*@prepriority>=0*@precloudletScheduler!=null*@post$none*/publicVm(intid,intuserId,doublemips,intpesNumber,intram,longbw,longsize,Stringvmm,CloudletSchedulercloudletScheduler){setId(id);setUserId(userId);setUid(getUid(userId,id));se
8、tMips(mips);setPesNumber(pesNumber);setRam(ram);setBw(bw);setSize(size);setVmm(vmm
此文档下载收益归作者所有