Introduction to Cloud computing simulation software Cloudsim and introduction of class functions

Source: Internet
Author: User

• Introduction to Cloud computing

Cloud computing simulation software, called Cloudsim. It is a library of functions developed on discrete event simulation package Simjava that can run across platforms on Windows and Linux systems, Cloudsim inherits the Gridsim programming model, supports the research and development of cloud computing, and offers the following new features: (1) Modeling and simulation of infrastructure supporting large-scale cloud computing; (2) a self-contained platform that supports data centers, service agents, scheduling, and distribution policies. One of the unique features of Cloudsim is to provide a virtualization engine designed to help build and manage multiple, independent, and collaborative virtualization services on data center nodes, and to flexibly switch between time sharing and spatial sharing when assigning processing cores to virtualization services. The Cloudsim platform helps accelerate the development of algorithms, methodologies, and specifications for cloud computing. Cloudsim's component tools are open source. Cloudsim's software Architecture framework and architecture components include the Simjava, Gridsim, Cloudsim, and Usercode four levels.

Cloudsim is developed on the basis of the Gridsim model, which provides the characteristics of cloud computing and supports the resource management and scheduling simulation of cloud computing. A significant difference between cloud computing and grid computing is that cloud computing uses a mature virtualization technology to virtualize data center resources into resource pools, and to package external services to users, Cloudsim embodies this feature, extending the implementation of a series of interfaces that provide data center-based virtualization technology, Modeling and simulation capabilities for virtualized clouds. Typically, the resources of a single host in the datacenter can be mapped to multiple virtual machines based on the user's needs, so there is a competitive relationship between the virtual machines and the host resources. Cloudsim provides resource monitoring, host-to-virtual-machine mapping capabilities. Cloudsim's CIS (Cloud information Service) and Datacenterbroker realize resource discovery and information interaction, which is the core of the simulation scheduling. The scheduling algorithm developed by the user can be implemented in the Datacenterbroker method, thus realizing the simulation of the scheduling algorithm.

Two Cloudsim several core class introduction:

   (1) Cloudlet class: Build tasks in a cloud environment.
    (2) Datacenter Class: Data center, providing virtualized grid resources, processing virtual machine information query, Contains virtual machine-to-resource allocation policies, and cloud computing uses Vmprovisioner to process virtual machines.
    (3) Datacenterbroker class: Hides the management of virtual machines, such as creation, task submission, destruction of virtual machines, etc.
    (4) Host class: Extends the machine to the virtual machine in addition to processing unit (PE) parameter assignment policy, such as bandwidth, storage space, memory, etc. One host can correspond to multiple virtual machines.
    (5) Virtualmachine Class: Virtual machine class, running on host, sharing resources with other virtual machines, Each virtual machine is owned by one owner, can submit a task, and is customized by the Vmscheduler class scheduling policy for that virtual machine.
    (6) Vmscheduler class: The scheduling policy of a virtual machine, which is used to manage the execution of tasks and implements the task interface.
    (7) Vmcharacteristics class: Provides a description of the virtual machine.
    (8) Vmmallocationpolicy class: Virtual Machine monitor Policy class, A policy that describes the shared resources of multiple virtual machines on the same host.
    (9) Vmprovisioner class: Implements a host-to-virtual-machine mapping for a datacenter.

Three Cloudsim Download and install

Please refer to my other blog post: http://www.cnblogs.com/wenjieyatou/p/6061044.html

Four general steps for using CLOUDSIM emulation

(1) Initializing the Gridsim library

Gridsim.init (Num_user, Calendar, Trace_flag, exclude_from_file,exclude_from_processing, report_name);
(2) Create a data center, in the Cloudsim simulation platform, a data center consists of one or more machine, a machine is composed of one or more PES or CPUs.
DataCenter Datacenter0 = Createdatacenter ("Datacenter_0");
(3) Create broker Broker
Datacenterbroker broker = Createbroker ();
int brokerid = broker.get_id ();
(4) Create a virtual machine
Vmlist = new Virtualmachinelist ();
Specify broker for virtual machine at creation time
Virtualmachine vm1 = new Virtualmachine (
New Vmcharacteristics (VMID,BROKERID,SIZE,MEMORY,BW,VCPUS,PRIORITY,VMM,
New Timesharedvmscheduler ()));
To join a virtual machine to a list of virtual machines
Vmlist.add (VM1);
Submit a list of virtual machines to the appropriate agent broker
Broker.submitvmlist (vmlist);
(5) Create a cloud task
Cloudletlist = new Cloudletlist ();
User Id,brokerid the specified task at creation time
Cloudlet Cloudlet1 = new Cloudlet (id, length, file_size, output_size);
Cloudlet1.setuserid (Brokerid);
......
Adding tasks to the Task list
Cloudletlist.add (CLOUDLET1);
......
Submit a task list to broker broker
Broker.submitcloudletlist (cloudletlist);
(6) Start simulation
Gridsim.startgridsimulation ();
(7) Statistical results after simulation is completed
Cloudletlist NewList = Broker.getcloudletlist ();
Gridsim.stopgridsimulation ();
Printcloudletlist (NewList);
Datacenter0.printdebts ();

Introduction to Cloud computing simulation software Cloudsim and introduction of class functions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.