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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? resfailureex01.java

?? 中間件開(kāi)發(fā)詳細(xì)說(shuō)明:清華大學(xué)J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會(huì)員下載此源碼] [成為VIP會(huì)
?? JAVA
字號(hào):
/* * Title:        GridSim Toolkit * Description:  GridSim (Grid Simulation) Toolkit for Modeling and Simulation *               of Parallel and Distributed Systems such as Clusters and Grids *               An example of how to use the failure functionality. * Licence:      GPL - http://www.gnu.org/copyleft/gpl.html * * Author: Agustin Caminero and Anthony Sulistio * Organization: UCLM (Spain) * Created on: August 2007 */import gridsim.resFailure.*;import gridsim.*;import gridsim.net.*;import java.util.*;import gridsim.util.NetworkReader;import gridsim.util.HyperExponential;/** * This example shows a basic topology with 1 user, 3 resources and 1 GIS. * All of them are connected by a router. * There is only one VO in this example. * @author       Agustin Caminero and Anthony Sulistio * @since        GridSim Toolkit 4.1 */public class ResFailureEx01{    public static void main(String[] args)    {        System.out.println("Starting failure example 1...");        try        {            if (args.length < 1)            {                System.out.println("Usage: java ResFailureEx01 network_ex01.txt");                return;            }            //////////////////////////////////////////            // First step: Initialize the GridSim package. It should be called            // before creating any entities. We can't run this example without            // initializing GridSim first. We will get a run-time exception            // error.            // a flag that denotes whether to trace GridSim events or not.            boolean trace_flag = false;  // dont use SimJava trace            int num_user = 1; //  number of grid users            Calendar calendar = Calendar.getInstance();            // Initialize the GridSim package            System.out.println("Initializing GridSim package");            GridSim.init(num_user, calendar, trace_flag);            trace_flag = true;            //////////////////////////////////////////            // Second step: Builds the network topology among Routers.            String filename = args[0];  // get the network topology            System.out.println("Reading network from " + filename);            LinkedList routerList = NetworkReader.createFIFO(filename);            //////////////////////////////////////////            // Third step: Creates one RegionalGISWithFailure entity,            // linked to a router in the topology            Router router = null;            double baud_rate = 100000000;   // 100Mbps, i.e. baud rate of links            double propDelay = 10;      // propagation delay in milliseconds            int mtu = 1500;             // max. transmission unit in byte            int totalMachines = 10;     // num of machines each resource has            String NAME = "Ex01_";  // a common name            String gisName = NAME + "Regional_GIS";  // GIS name            // a network link attached to this regional GIS entity            Link link = new SimpleLink(gisName + "_link", baud_rate,                                       propDelay, mtu);            // HyperExponential: mean, standard deviation, stream            // how many resources will fail            HyperExponential failureNumResPattern =                    new HyperExponential(totalMachines / 2, totalMachines, 4);            // when they will fail            HyperExponential failureTimePattern =                    new HyperExponential(25, 100, 4);            // how long the failure will be            HyperExponential failureLengthPattern =                    new HyperExponential(20, 25, 4); // big test: (20, 100, 4);            // creates a new Regional GIS entity that generates a resource            // failure message according to these patterns.            RegionalGISWithFailure gis = new RegionalGISWithFailure(gisName,                              link, failureNumResPattern, failureTimePattern,                              failureLengthPattern);            gis.setTrace(trace_flag);   // record this GIS activity            // link these GIS to a router            router = NetworkReader.getRouter("Router0", routerList);            linkNetwork(router, gis);            // print some info messages            System.out.println("Created a REGIONAL GIS with name " + gisName +                    " and id = " + gis.get_id() + ", connected to " +                    router.get_name() );            //////////////////////////////////////////            // Fourth step: Creates one or more GridResourceWithFailure            // entities, linked to a router in the topology            String sched_alg = "SPACE";  // use space-shared policy            int totalResource = 3; // number of resources            ArrayList resList = new ArrayList(totalResource);            // Each resource may have different baud rate,            // totalMachine, rating, allocation policy and the router to            // which it will be connected. However, in this example, we assume            // all have the same properties for simplicity.            int totalPE = 4;        // num of PEs each machine has            int rating = 49000;     // rating (MIPS) of PEs            int GB = 1000000000;    // 1 GB in bits            baud_rate = 2.5 * GB;            for (int i = 0; i < totalResource; i++)            {                // gets the router object from the list                router = NetworkReader.getRouter("Router0", routerList);                // creates a new grid resource                String resName = NAME + "Res_" + i;                GridResourceWithFailure res = createGridResource(resName,                            baud_rate, propDelay, mtu, totalPE, totalMachines,                            rating, sched_alg);                // add a resource into a list                resList.add(res);                res.setRegionalGIS(gis);    // set the regional GIS entity                res.setTrace(trace_flag);   // record this resource activity                // link a resource to this router object                linkNetwork(router, res);                System.out.println("Created a RESOURCE (" + totalMachines +                    " machines, each with " + totalPE + " PEs) with name = " +                    resName + " and id = " + res.get_id() +                    ", connected to router " + router.get_name() +                    " and registered to " + gis.get_name() );            }            //////////////////////////////////////////            // Fifth step: Creates one GridUserFailure entity,            // linked to a router of the topology            int totalGridlet = 5;    // total jobs            double pollTime = 100;   // time between polls            int glSize = 100000;     // the size of gridlets (input/output)            int glLength = 42000000; // the length (MI) of gridlets            String userName = NAME + "User0";            // gets the router object from the list            router = NetworkReader.getRouter("Router0", routerList);            // a network link attached to this entity            Link link2 = new SimpleLink(userName + "_link", baud_rate,                                        propDelay, mtu);            GridUserFailureEx01 user = new GridUserFailureEx01(userName, link2,                    pollTime, glLength, glSize, glSize, trace_flag);            user.setRegionalGIS(gis); // set the regional GIS entity            user.setGridletNumber(totalGridlet);            // link a resource to this router object            linkNetwork(router, user);            System.out.println("Created a USER with name " + userName +                    " and id = " + user.get_id() + ", connected to " +                    router.get_name() + ", and with " + totalGridlet +                    " gridlets. Registered to " + gis.get_name() );            System.out.println();            //////////////////////////////////////////            // Sixth step: Starts the simulation            GridSim.startGridSimulation();            System.out.println("\nFinish failure example 1... \n");        }        catch (Exception e)        {            e.printStackTrace();            System.out.println("Unwanted errors happen");        }    }    /**     * Links a particular entity with a given Router.     *     * @param router    a Router object     * @param obj       a GridSim entity to be attached to the Router     */    private static void linkNetwork(Router router, GridSimCore obj) throws Exception    {        if (router == null) {            System.out.println("Error - router is NULL.");            return;        }        // get the baud rate of a link        double baud_rate = obj.getLink().getBaudRate();        // create the packet scheduler for this link        PacketScheduler pktObj = new FIFOScheduler(router.get_name() +                                                   "_to_" + obj.get_name() );        // attach this GridSim entity to a Router        router.attachHost(obj, pktObj);    }    /**     * Creates one Grid resource. A Grid resource contains one or more     * Machines. Similarly, a Machine contains one or more PEs (Processing     * Elements or CPUs).     * <p>     * In this simple example, we are simulating one Grid resource with three     * Machines that contains one or more PEs.     *     * @param name          a Grid Resource name     * @param baud_rate     the bandwidth of this entity     * @param delay         the propagation delay     * @param MTU           Maximum Transmission Unit     * @param totalPE       number of PE per machine     * @param totalMachine  number of machines in this resources     * @param rating        rating of mahcines in this resource     * @param sched_alg     the scheduling algorithm of this resource     * @return a GridResource object     */    private static GridResourceWithFailure createGridResource(String name,                        double baud_rate, double delay, int MTU, int totalPE,                        int totalMachine, int rating, String sched_alg)    {        // Here are the steps needed to create a Grid resource:        // 1. We need to create an object of MachineList to store one or more        //    Machines        MachineList mList = new MachineList();        for (int i = 0; i < totalMachine; i++)        {            // 2. A Machine contains one or more PEs or CPUs. Therefore, should            //    create an object of PEList to store these PEs before creating            //    a Machine.            PEList peList = new PEList();            // 3. Create PEs and add these into an object of PEList.            for (int k = 0; k < totalPE; k++)            {                // need to store PE id and MIPS Rating                peList.add( new PE(k, rating) );            }            // 4. Create one Machine with its id and list of PEs or CPUs            mList.add( new Machine(i, peList) );        }        // 5. Create a ResourceCharacteristics object that stores the        //    properties of a Grid resource: architecture, OS, list of        //    Machines, allocation policy: time- or space-shared, time zone        //    and its price (G$/PE time unit).        String arch = "Sun Ultra";      // system architecture        String os = "Solaris";          // operating system        double time_zone = 9.0;         // time zone this resource located        double cost = 3.0;              // the cost of using this resource        // we create Space_Shared_failure or Time_Shared_failure schedulers        int scheduling_alg = 0;         // space_shared or time_shared        if (sched_alg.equals("SPACE") == true) {            scheduling_alg = ResourceCharacteristics.SPACE_SHARED;        }        else if (sched_alg.equals("TIME") == true) {            scheduling_alg = ResourceCharacteristics.TIME_SHARED;        }        ResourceCharacteristics resConfig = new ResourceCharacteristics(                arch, os, mList, scheduling_alg, time_zone, cost);        // 6. Finally, we need to create a GridResource object.        long seed = 11L*13*17*19*23+1;        double peakLoad = 0.0;        // the resource load during peak hour        double offPeakLoad = 0.0;     // the resource load during off-peak hr        double holidayLoad = 0.0;     // the resource load during holiday        // incorporates weekends so the grid resource is on 7 days a week        LinkedList Weekends = new LinkedList();        Weekends.add(new Integer(Calendar.SATURDAY));        Weekends.add(new Integer(Calendar.SUNDAY));        // incorporates holidays. However, no holidays are set in this example        LinkedList Holidays = new LinkedList();        GridResourceWithFailure gridRes = null;        try        {            // creates a GridResource with a link            gridRes = new GridResourceWithFailure(name,                new SimpleLink(name + "_link", baud_rate, delay, MTU),                seed, resConfig, peakLoad, offPeakLoad, holidayLoad,                Weekends, Holidays);        }        catch (Exception e) {            e.printStackTrace();        }        return gridRes;    }} // end class

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久久久久久久久| 97精品超碰一区二区三区| 亚洲午夜视频在线观看| 日本va欧美va欧美va精品| 欧美mv和日韩mv的网站| 在线综合+亚洲+欧美中文字幕| 91久久久免费一区二区| 国产精品一区在线观看你懂的| 久色婷婷小香蕉久久| 国产a视频精品免费观看| 国产精品免费视频一区| 午夜精品123| 色欧美日韩亚洲| 中文字幕不卡三区| 不卡av在线网| 亚洲精品视频免费观看| 波多野结衣欧美| 中文字幕一区三区| 美女国产一区二区三区| 成人综合婷婷国产精品久久免费| 欧美日韩一本到| 国产精品美女一区二区| 精品一区在线看| 色8久久人人97超碰香蕉987| 欧美一级xxx| 18欧美乱大交hd1984| 日本不卡1234视频| 国内精品久久久久影院薰衣草| 国产在线精品一区在线观看麻豆| 欧洲av在线精品| 一区二区国产盗摄色噜噜| 韩国v欧美v亚洲v日本v| 久久综合久久久久88| 亚洲图片欧美色图| av电影在线观看一区| 欧洲一区二区三区在线| 久久综合99re88久久爱| 久久国产夜色精品鲁鲁99| 91超碰这里只有精品国产| 大胆欧美人体老妇| 亚洲精品视频自拍| 欧美肥妇bbw| 在线观看av不卡| 成人18视频日本| 美女一区二区三区在线观看| 亚洲欧美日韩在线播放| 欧美午夜精品一区| 免费美女久久99| 国产欧美一区二区精品性色| 国产乱码精品一区二区三区av | 色菇凉天天综合网| 欧美疯狂性受xxxxx喷水图片| 中文字幕av一区二区三区免费看 | 日韩欧美一卡二卡| 亚洲男女一区二区三区| 国产精品系列在线播放| 日韩欧美中文字幕公布| 午夜精品免费在线| 欧美综合亚洲图片综合区| 亚洲视频狠狠干| 97国产一区二区| 欧美国产日韩一二三区| 国产做a爰片久久毛片| 日韩天堂在线观看| 免费在线视频一区| 欧美一区二区三区喷汁尤物| 亚洲bdsm女犯bdsm网站| 欧美日韩亚洲另类| 亚洲一区av在线| 欧美艳星brazzers| 亚洲一级在线观看| 欧美日韩午夜影院| 日韩成人一级片| 91 com成人网| 蜜桃av一区二区三区电影| 91精品国产91综合久久蜜臀| 日本伊人精品一区二区三区观看方式 | 日韩一级在线观看| 久久国内精品自在自线400部| 日韩精品一区二区三区视频| 韩国三级中文字幕hd久久精品| 日韩精品一区在线| 韩国三级中文字幕hd久久精品| 国产亚洲精久久久久久| 成人免费视频国产在线观看| 国产精品不卡一区| 色悠久久久久综合欧美99| 亚洲在线视频免费观看| 7777精品伊人久久久大香线蕉完整版| 日韩精品一二区| 久久奇米777| 99久久99久久精品免费看蜜桃 | 欧美顶级少妇做爰| 久热成人在线视频| 国产女人18水真多18精品一级做| 成人精品视频网站| 一区二区在线看| 51精品国自产在线| 激情综合色丁香一区二区| 国产无遮挡一区二区三区毛片日本| 大白屁股一区二区视频| 亚洲一区二区三区四区在线观看| 在线成人小视频| 国产精品一区二区在线观看不卡| 国产精品久久夜| 欧美视频一二三区| 久久成人免费网| 中文字幕不卡一区| 欧美日韩免费不卡视频一区二区三区 | 在线视频你懂得一区二区三区| 日韩经典中文字幕一区| 久久久蜜桃精品| 91最新地址在线播放| 丝袜亚洲另类丝袜在线| 国产午夜精品久久久久久免费视| 在线观看视频一区| 久久国产成人午夜av影院| 国产精品三级久久久久三级| 欧美色爱综合网| 国产精品一区在线| 一级精品视频在线观看宜春院| 日韩三级免费观看| 99精品视频在线观看| 日韩高清欧美激情| 国产精品久久久久天堂| 69久久夜色精品国产69蝌蚪网| 国产成人免费在线视频| 香蕉加勒比综合久久| 久久精品日产第一区二区三区高清版| 色婷婷综合视频在线观看| 久久国产欧美日韩精品| 亚洲免费观看高清完整版在线观看| 日韩欧美亚洲国产另类| 日本韩国欧美一区| 国产高清在线观看免费不卡| 日韩一区精品视频| 亚洲视频在线一区| 久久中文字幕电影| 欧美女孩性生活视频| 波多野结衣中文字幕一区| 麻豆国产欧美一区二区三区| 亚洲欧美另类在线| 久久久久国产精品麻豆| 欧美日本韩国一区二区三区视频| 成人一级黄色片| 久久国产视频网| 视频一区在线播放| 玉足女爽爽91| 欧美国产一区二区在线观看| 欧美成人vps| 欧美福利一区二区| 在线观看成人小视频| 不卡电影一区二区三区| 国产一区二区91| 蜜桃久久久久久久| 亚洲成人三级小说| 一区二区三区在线观看网站| 国产精品全国免费观看高清 | 国产成人午夜视频| 久久精品国产在热久久| 天天色图综合网| 亚洲国产裸拍裸体视频在线观看乱了 | 久久精品国产久精国产爱| 亚洲国产精品麻豆| 亚洲免费三区一区二区| 亚洲色欲色欲www| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 国产精品福利一区二区三区| 国产婷婷色一区二区三区四区 | 粉嫩av一区二区三区粉嫩| 精品制服美女丁香| 久久国产剧场电影| 精品一区二区三区视频在线观看| 日韩一区欧美二区| 日本成人在线视频网站| 首页国产欧美日韩丝袜| 丝袜美腿亚洲一区| 日韩av电影一区| 久久99最新地址| 久久66热偷产精品| 精品一区二区三区影院在线午夜 | 国产欧美日韩精品一区| 国产欧美日韩精品在线| 国产欧美日韩激情| 国产精品国产三级国产aⅴ原创 | 日本久久精品电影| 欧美在线免费观看亚洲| 欧洲精品在线观看| 欧美日韩国产免费一区二区| 欧美日韩精品综合在线| 欧美高清视频www夜色资源网| 欧美精品在线观看一区二区| 欧美一区二区视频观看视频| 日韩亚洲电影在线| 亚洲精品一区二区三区福利| 国产亚洲精品超碰| 亚洲视频网在线直播| 亚洲国产视频a| 裸体一区二区三区| 国产精品一区二区三区99|