亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? workload.java

?? 中間件開發詳細說明:清華大學J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會員下載此源碼] [成為VIP會
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * Title:        GridSim Toolkit * Description:  GridSim (Grid Simulation) Toolkit for Modeling and Simulation *               of Parallel and Distributed Systems such as Clusters and Grids * Licence:      GPL - http://www.gnu.org/copyleft/gpl.html * * $Id: Workload.java,v 1.9 2007/08/30 01:50:04 anthony Exp $ */package gridsim.util;import eduni.simjava.*;import gridsim.*;import gridsim.net.*;// below packages are needed to read a fileimport java.util.*;import java.util.zip.*;import java.io.*;/** * The main purpose of this class is to create a realistic simulation * environment where your jobs or Gridlets are competing with others. * In other words, the grid resource might not be available at certain times. * In addition, the arrival time of jobs are also captured in the trace file. * <p> * This class is responsible for reading resource traces from a file and * sends Gridlets to only <tt>one</tt> destinated resource. <br> * <b>NOTE:</b> * <ul> *      <li> This class can only take <tt>one</tt> trace file of the following *           format: <i>ASCII text, zip, gz.</i> *      <li> This class can be classified as <b>one grid user entity</b>. *           Hence, you need to incorporate this entity into <tt>numUser</tt> *           during {@link gridsim.GridSim#init(int, Calendar, boolean)} *      <li> If you need to use multiple trace files to submit Gridlets to *           same or different resources, then you need to create multiple *           instances of this class <tt>each with a unique entity name</tt>. *      <li> If size of the trace file is huge or contains lots of traces *           please increase the JVM heap size accordingly by using *           <tt>java -Xmx</tt> option when running the simulation. *      <li> If you are running an experiment using the network extension, *           i.e. the gridsim.net package, then you need to use *           {@link #Workload(String, double, double, int, String, String, int)} *           instead. *      <li> The default job file size for sending to and receiving from *           a resource is {@link gridsim.net.Link#DEFAULT_MTU}. *           However, you can specify *           the file size by using {@link #setGridletFileSize(int)}. *      <li> A job run time is only for 1 PE <tt>not</tt> the total number of *           allocated PEs. *           Therefore, a Gridlet length is also calculated for 1 PE.<br> *           For example, job #1 in the trace has a run time of 100 seconds *           for 2 processors. This means each processor runs *           job #1 for 100 seconds, if the processors have the same *           specification. * </ul> * <p> * By default, this class follows the standard workload format as specified * in <a href="http://www.cs.huji.ac.il/labs/parallel/workload/"> * http://www.cs.huji.ac.il/labs/parallel/workload/</a> <br> * However, you can use other format by calling the below methods before * running the simulation: * <ul> *      <li> {@link #setComment(String)} *      <li> {@link #setField(int, int, int, int, int)} * </ul> * * @see gridsim.GridSim#init(int, Calendar, boolean) * @author   Anthony Sulistio * @since    GridSim Toolkit 3.1 * @invariant $none */public class Workload extends GridSim{    private String fileName_;   // file name    private String resName_;    // resource name    private int resID_;         // resource ID    private int rating_;        // a PE rating    private int gridletID_;     // gridletID    private int size_;          // job size for sending it through a network    private ArrayList list_;    // a list for getting all the Gridlets    // constant    private int JOB_NUM;        // job number    private int SUBMIT_TIME;    // submit time of a Gridlet    private int RUN_TIME;       // running time of a Gridlet    private int NUM_PROC;       // number of processors needed for a Gridlet    private int REQ_NUM_PROC;   // required number of processors    private int REQ_RUN_TIME;   // required running time    private int MAX_FIELD;      // max number of field in the trace file    private String COMMENT;     // a string that denotes the start of a comment    private final int IRRELEVANT = -1;  // irrelevant number    private final int INTERVAL = 10;    // number of intervals    private String[] fieldArray_;       // a temp array storing all the fields    /**     * Create a new Workload object <b>without</b> using the network extension.     * This means this entity directly sends Gridlets to a destinated resource     * without going through a wired network. <br>     * <tt>NOTE:</tt>     * You can not use this constructor in an experiment that uses a wired     * network topology.     *     * @param name      this entity name     * @param fileName  the workload trace filename in one of the following     *                  format: <i>ASCII text, zip, gz.</i>     * @param resourceName  the resource name     * @param rating    the resource's PE rating     * @throws Exception  This happens when creating this entity before     *                   initializing GridSim package or this entity name is     *                   <tt>null</tt> or empty     * @throws ParameterException   This happens for the following conditions:     *      <ul>     *          <li>the entity name is null or empty     *          <li>the workload trace file name is null or empty     *          <li>the resource entity name is null or empty     *          <li>the resource PE rating <= 0     *      </ul>     * @pre name != null     * @pre fileName != null     * @pre resourceName != null     * @pre rating > 0     * @post $none     */    public Workload(String name, String fileName, String resourceName,                    int rating) throws ParameterException, Exception    {        super(name, GridSimTags.DEFAULT_BAUD_RATE);        // check the input parameters first        String msg = name + "(): Error - ";        if (fileName == null || fileName.length() == 0) {            throw new ParameterException(msg + "invalid trace file name.");        }        else if (resourceName == null || resourceName.length() == 0) {            throw new ParameterException(msg + "invalid resource name.");        }        else if (rating <= 0) {            throw new ParameterException(msg+"resource PE rating must be > 0.");        }        System.out.println(name + ": Creating a workload object ...");        init(fileName, resourceName, rating);    }    /**     * Create a new Workload object <b>with</b> the network extension.     * This means this entity directly sends Gridlets to a destinated resource     * through a link. The link is automatically created by this constructor.     *     * @param name      this entity name     * @param baudRate  baud rate of this link (bits/s)     * @param propDelay Propogation delay of the Link in milli seconds     * @param MTU       Maximum Transmission Unit of the Link in bytes.     *                  Packets which are larger than the MTU should be split     *                  up into MTU size units.     *                  For example, a 1024 byte packet trying to cross a 576     *                  byte MTU link should get split into 2 packets of 576     *                  bytes and 448 bytes.     * @param fileName  the workload trace filename in one of the following     *                  format: <i>ASCII text, zip, gz.</i>     * @param resourceName  the resource name     * @param rating    the resource's PE rating     * @throws Exception  This happens when creating this entity before     *                   initializing GridSim package or this entity name is     *                   <tt>null</tt> or empty     * @throws ParameterException   This happens for the following conditions:     *      <ul>     *          <li>the entity name is null or empty     *          <li> baudRate <= 0     *          <li> propDelay <= 0     *          <li> MTU <= 0     *          <li>the workload trace file name is null or empty     *          <li>the resource entity name is null or empty     *          <li>the resource PE rating <= 0     *      </ul>     * @pre name != null     * @pre baudRate > 0     * @pre propDelay > 0     * @pre MTU > 0     * @pre fileName != null     * @pre resourceName != null     * @pre rating > 0     * @post $none     */    public Workload(String name, double baudRate, double propDelay, int MTU,                    String fileName, String resourceName, int rating)                    throws ParameterException, Exception    {        super( name, new SimpleLink(name+"_link", baudRate, propDelay, MTU) );        // check the input parameters first        String msg = name + "(): Error - ";        if (fileName == null || fileName.length() == 0) {            throw new ParameterException(msg + "invalid trace file name.");        }        else if (resourceName == null || resourceName.length() == 0) {            throw new ParameterException(msg + "invalid resource name.");        }        else if (rating <= 0) {            throw new ParameterException(msg+"resource PE rating must be > 0.");        }        System.out.println(name + ": Creating a workload object ...");        init(fileName, resourceName, rating);    }    /**     * Create a new Workload object <b>with</b> the network extension.     * This means this entity directly sends Gridlets to a destinated resource     * through a link. The link is automatically created by this constructor.     *     * @param name      this entity name     * @param link      the link that will be used to connect this Workload     *                  to another entity or a Router.     * @param fileName  the workload trace filename in one of the following     *                  format: <i>ASCII text, zip, gz.</i>     * @param resourceName  the resource name     * @param rating    the resource's PE rating     * @throws Exception  This happens when creating this entity before     *                   initializing GridSim package or this entity name is     *                   <tt>null</tt> or empty     * @throws ParameterException   This happens for the following conditions:     *      <ul>     *          <li>the entity name is null or empty     *          <li>the link is empty     *          <li>the workload trace file name is null or empty     *          <li>the resource entity name is null or empty     *          <li>the resource PE rating <= 0     *      </ul>     * @pre name != null     * @pre link != null     * @pre fileName != null     * @pre resourceName != null     * @pre rating > 0     * @post $none     */    public Workload(String name, Link link, String fileName,                    String resourceName, int rating)                    throws ParameterException, Exception    {        super(name, link);        // check the input parameters first        String msg = name + "(): Error - ";        if (fileName == null || fileName.length() == 0) {            throw new ParameterException(msg + "invalid trace file name.");        }        else if (resourceName == null || resourceName.length() == 0) {            throw new ParameterException(msg + "invalid resource name.");        }        else if (rating <= 0) {            throw new ParameterException(msg+"resource PE rating must be > 0.");        }        System.out.println(name + ": Creating a workload object ...");        init(fileName, resourceName, rating);    }    /**     * Initialises all the attributes     * @param   fileName    trace file name     * @param   resourceName    resource entity name     * @param   rating      resource PE rating     * @pre $none     * @post $none     */    private void init(String fileName, String resourceName, int rating)    {        fileName_ = fileName;        resName_ = resourceName;        resID_ = GridSim.getEntityId(resName_);        rating_ = rating;        gridletID_ = 1;   // starts at 1 to make it the same as in a trace file        list_ = null;        size_ = Link.DEFAULT_MTU;        // if using Standard Workload Format -- don't forget to substract by 1        // since an array starts at 0, but the field in a trace starts at 1        JOB_NUM = 1 - 1;        SUBMIT_TIME = 2 - 1;        RUN_TIME = 4 - 1;        NUM_PROC = 5 - 1;        REQ_NUM_PROC = 8 - 1;        REQ_RUN_TIME = 9 - 1;        COMMENT = ";";      // semicolon means the start of a comment        MAX_FIELD = 18;     // standard workload format has 18 fields        fieldArray_ = null;    }    /**     * Sets a Gridlet file size (in byte) for sending to/from a resource.     * @param size  a Gridlet file size (in byte)     * @return <tt>true</tt> if it is successful, <tt>false</tt> otherwise     * @pre size > 0     * @post $none     */    public boolean setGridletFileSize(int size)    {        if (size < 0) {            return false;        }        size_ = size;        return true;    }    /**     * Identifies the start of a comment line. Hence, a line that starts     * with a given comment will be ignored.     * @param comment  a character that denotes the start of a comment,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av电影在线| 一区二区三区欧美久久| 日本一区二区电影| 一区二区在线免费观看| 日本欧美一区二区三区| 国产精品自拍毛片| 色婷婷久久久久swag精品 | 国产乱码精品一品二品| 国产精品69毛片高清亚洲| 91美女视频网站| 7799精品视频| 国产精品视频线看| 天涯成人国产亚洲精品一区av| 九色综合狠狠综合久久| 91网站最新地址| 欧美成人午夜电影| 亚洲三级在线观看| 黄页网站大全一区二区| 色94色欧美sute亚洲线路二| 欧美不卡123| 一区二区三区欧美日| 国产精品中文字幕日韩精品 | 日韩毛片精品高清免费| 日韩经典一区二区| 成人av资源下载| 日韩视频国产视频| 一本大道久久a久久精二百| 精品国免费一区二区三区| 亚洲免费高清视频在线| 九一久久久久久| 欧美三级视频在线播放| 日本一区二区不卡视频| 美女脱光内衣内裤视频久久影院| 99久久免费精品| 久久精品无码一区二区三区| 婷婷成人综合网| 91福利在线免费观看| 国产欧美日韩久久| 另类的小说在线视频另类成人小视频在线| 99久久精品免费看国产免费软件| 欧美精品一区二区在线播放| 婷婷六月综合亚洲| 一本久道久久综合中文字幕| 国产精品入口麻豆九色| 精品一区二区三区免费观看| 88在线观看91蜜桃国自产| 一区二区成人在线视频| 不卡av电影在线播放| 国产综合久久久久影院| 日韩视频一区二区| 午夜精品久久久久久久99水蜜桃| 99re免费视频精品全部| 国产精品视频一二| 成人午夜视频免费看| 日韩精品一区二| 蜜臀av在线播放一区二区三区| 精品视频1区2区| 洋洋成人永久网站入口| 91在线免费视频观看| 中文字幕久久午夜不卡| 国产伦精品一区二区三区免费 | 视频一区欧美日韩| 在线亚洲人成电影网站色www| 国产精品久99| 成人av影视在线观看| 国产日韩精品一区二区三区 | 国产一区二区三区四区五区美女 | 九色综合狠狠综合久久| 欧美一级二级在线观看| 日本不卡123| 欧美一区日本一区韩国一区| 婷婷国产在线综合| 在线不卡一区二区| 日韩不卡在线观看日韩不卡视频| 欧美三级乱人伦电影| 婷婷亚洲久悠悠色悠在线播放 | 久久精品国产精品亚洲综合| 欧美一区二区视频在线观看2020| 午夜精品成人在线视频| 884aa四虎影成人精品一区| 强制捆绑调教一区二区| 91精品福利在线一区二区三区 | 毛片一区二区三区| 欧美电影免费观看高清完整版在线| 日韩电影一区二区三区四区| 91精品国产高清一区二区三区| 日韩av在线发布| 精品国产a毛片| 国产成人精品免费视频网站| 欧美激情综合网| av成人动漫在线观看| 亚洲综合色视频| 欧美精品丝袜中出| 久久av中文字幕片| 欧美激情在线免费观看| 99re这里都是精品| 午夜精品免费在线| 精品福利在线导航| 不卡一二三区首页| 亚洲一区二区三区在线看| 欧美福利视频一区| 国产一区二区精品在线观看| 国产精品毛片大码女人| 欧美在线免费视屏| 精品一区二区久久久| 欧美极品少妇xxxxⅹ高跟鞋 | 色美美综合视频| 亚洲成人一区在线| 337p日本欧洲亚洲大胆精品 | 亚洲黄色性网站| 91精品国产入口在线| 国产电影一区二区三区| 亚洲视频图片小说| 5566中文字幕一区二区电影| 国产精品自拍一区| 亚洲最大的成人av| 欧美精品一区二区三区视频| 不卡电影一区二区三区| 亚洲成av人片| 国产精品久久久久久户外露出 | 婷婷开心激情综合| 国产精品色在线| 91精品欧美一区二区三区综合在| 国产不卡视频在线播放| 欧美日韩免费在线视频| 国产精品一区二区在线看| 亚洲精品国产一区二区精华液| 555夜色666亚洲国产免| 波多野结衣中文字幕一区二区三区 | 日本欧美肥老太交大片| 国产精品电影一区二区三区| 在线播放91灌醉迷j高跟美女| 国产成人免费视频一区| 日韩精品91亚洲二区在线观看 | 99久久99久久久精品齐齐| 美女视频网站黄色亚洲| 亚洲欧美影音先锋| 精品乱码亚洲一区二区不卡| 日本韩国精品在线| 国产美女精品在线| 日本vs亚洲vs韩国一区三区| 亚洲免费伊人电影| 久久久久久久久久看片| 91精品在线免费| 亚洲免费在线播放| 国产精品丝袜在线| 日韩欧美亚洲一区二区| 精品视频在线免费看| caoporm超碰国产精品| 国产乱码精品一品二品| 蜜臀精品一区二区三区在线观看| 亚洲黄色性网站| 国产精品成人免费| 久久久美女艺术照精彩视频福利播放| 欧美日韩高清一区二区不卡| 91一区一区三区| 不卡在线视频中文字幕| 国产精品一二三四区| 蜜臀av一区二区在线免费观看| 亚洲在线成人精品| 亚洲人成影院在线观看| 韩国v欧美v日本v亚洲v| 精品国产乱码久久久久久浪潮| 欧美日韩国产一级片| 91麻豆蜜桃一区二区三区| 国产精品影视天天线| 久久超碰97中文字幕| 丝袜美腿高跟呻吟高潮一区| 亚洲午夜在线视频| 一区二区三区加勒比av| 99精品一区二区| 粉嫩绯色av一区二区在线观看| 激情五月婷婷综合网| 蜜桃一区二区三区在线| 日韩av一级电影| 日韩国产欧美在线观看| 天天免费综合色| 日韩精品福利网| 日本不卡一区二区| 日本美女一区二区三区| 免费成人你懂的| 精品在线观看免费| 激情欧美日韩一区二区| 经典三级一区二区| 国模无码大尺度一区二区三区| 看国产成人h片视频| 久久99精品久久久久久国产越南| 蜜臀va亚洲va欧美va天堂| 久久成人av少妇免费| 韩国在线一区二区| 国产精品一区免费在线观看| 丁香一区二区三区| 99久久久国产精品| 91电影在线观看| 欧美日韩国产免费一区二区| 欧美日本在线视频| 日韩一卡二卡三卡| 久久久夜色精品亚洲| 日本一区二区三区在线观看| 中文字幕免费一区|