Gridsim的下载和安装

本文介绍了Gridsim的下载和安装步骤,包括从www.sun.com安装J2SE并配置环境变量,以及从sourceforge.net获取GridSim Toolkit 4.1的zip压缩包。Gridsim的测试文件在examples/Example01中,展示了如何利用API初始化网络资源。
摘要由CSDN通过智能技术生成
    下面以Window版本为例说明GridSim的安装。

1)安装准备工作

    在www.sun.com下载并安装J2SE,并配置好环境变量。

    从网站http://sourceforge.net/projects/gridsim上可以下载gridsim的最新版本GridSim Toolkit 4.1,下来是一个zip的压缩包。


(2)Gridsim安装

    解压这个压缩包到一个位置(如:c:/).
    压缩包的文档结构图如下:
$gridsimtoolkit-4.1/               -- the current GridSim directory (top level)
    classes/            -- The GridSim class files
    doc/                -- GridSim and SimJava API Documentation
        eduni/
        gridsim/
    examples/           -- GridSim examples, see examples/README.txt for details
    jars/               -- jar archives
    source/             -- The GridSim Java source code
        gridsim/*.java
        gridsim/auction/*.java      -- framework for the auction model
        gridsim/datagrid/*.java     -- framework for the Data Grids model
        gridsim/filter/*.java       -- filters incoming events
        gridsim/index/*.java        -- framework for the Grid Info Service model
        gridsim/net/*.java          -- framework for the network model
        gridsim/resFailure/*.java   -- framework for the resource failure model
        gridsim/util/*.java         -- includes some statistics classes.

为了能计算机的任意位置能够使用到gridsim的类库我们设置一下classpath
.;E:/gridsimtoolkit/jars/gridsim.jar;E:/gridsimtoolkit/jars/simjava2.jar

(3)测试运行结果

测试文件是软件包中的$gridsimtoolkit-4.1/examples/Example01

该文件显示了如何使用API来讲三台机器初始化为一个网路资源

测试文件如下

/*
 * Author: Anthony Sulistio
 * Date: April 2003
 * Description: A simple program to demonstrate of how to use GridSim package.
 *              This example shows how to create one Grid resource with three
 *              machines.
 *
 * NOTE: The values used from this example are taken from the GridSim paper.
 *       
http://www.gridbus.org/gridsim/
 * $Id: Example1.java,v 1.6 2004/05/29 05:24:00 anthony Exp $
 
*/


import java.util.*;
import gridsim.*;

/**
 * This class creates one Grid resource with three machines. Before creating
 * any of GridSim entities, you should remember to call
 * <tt>GridSim.Init()</tt>.
 
*/

class Example1
{
    
/**
     * Main function to run this example
     
*/

    
public static void main(String[] args)
    
{
        System.out.println(
"Starting example of how to create one Grid 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值