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

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

?? timesharedwithfailure.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 * * Author: Agustin Caminero * Organization: Universidad de Castilla La Mancha (UCLM), Spain. * Created on: Nov 2006. */package gridsim.resFailure;import gridsim.resFailure.*;import java.util.Iterator;import gridsim.*;import eduni.simjava.*;/** * TimeSharedWithFailure class is based on {@link gridsim.TimeShared}, but with * added failure functionalities. * TimeSharedWithFailure class is an allocation policy for GridResource that * behaves similar to a round robin algorithm, except that all Gridlets are * executed at the same time. This is a basic and simple * scheduler that runs each Gridlet to one Processing Element (PE). * If a Gridlet requires more than one PE, then this scheduler only assign * this Gridlet to one PE. * * @author       Agustin Caminero * @since        GridSim Toolkit 4.1 * @see gridsim.TimeShared * @invariant $none */class TimeSharedWithFailure extends AllocPolicy implements AllocPolicyWithFailure{    private ResGridletList gridletInExecList_;  // storing exec Gridlets    private ResGridletList gridletPausedList_;  // storing Paused Gridlets    private double lastUpdateTime_;   // a timer to denote the last update time    private MIShares share_;   // a temp variable    /**     * Allocates a new TimeSharedWithFailure object     * @param resourceName    the GridResource entity name that will contain     *                        this allocation policy     * @param entityName      this object entity name     * @throws Exception This happens when one of the following scenarios occur:     *      <ul>     *          <li> creating this entity before initializing GridSim package     *          <li> this entity name is <tt>null</tt> or empty     *          <li> this entity has <tt>zero</tt> number of PEs (Processing     *              Elements). <br>     *              No PEs mean the Gridlets can't be processed.     *              A GridResource must contain one or more Machines.     *              A Machine must contain one or more PEs.     *      </ul>     * @see gridsim.GridSim#init(int, Calendar, boolean, String[], String[],     *          String)     * @pre resourceName != null     * @pre entityName != null     * @post $none     */    TimeSharedWithFailure(String resourceName, String entityName) throws Exception    {        super(resourceName, entityName);        // initialises local data structure        this.gridletInExecList_ = new ResGridletList();        this.gridletPausedList_ = new ResGridletList();        this.share_ = new MIShares();        this.lastUpdateTime_ = 0.0;    }    ////////////////////// INTERNAL CLASS /////////////////////////////////    /**     * Gridlets MI share in Time Shared Mode     */    private class MIShares    {        /**  maximum amount of MI share Gridlets can get */        public double max;        /** minimum amount of MI share Gridlets can get when         * it is executed on a PE that runs one extra Gridlet         */        public double min;        /** Total number of Gridlets that get Max share */        public int maxCount;        /**         * Default constructor that initializes all attributes to 0         * @pre $none         * @post $none         */        public MIShares()        {            max = 0.0;            min = 0.0;            maxCount = 0;        }    } // end of internal class    /////////////////////// End of Internal Class /////////////////////////    /**     * Handles internal events that are coming to this entity.     * @pre $none     * @post $none     */    public void body()    {        // a loop that is looking for internal events only        Sim_event ev = new Sim_event();        while ( Sim_system.running() )        {            super.sim_get_next(ev);            // if the simulation finishes then exit the loop            if (ev.get_tag() == GridSimTags.END_OF_SIMULATION ||                super.isEndSimulation() == true)            {                break;            }            // Internal Event if the event source is this entity            if (ev.get_src() == super.myId_) {                internalEvent();            }        }        // CHECK for ANY INTERNAL EVENTS WAITING TO BE PROCESSED        while (super.sim_waiting() > 0)        {            // wait for event and ignore since it is likely to be related to            // internal event scheduled to update Gridlets processing            super.sim_get_next(ev);            System.out.println(super.resName_ +                    ".TimeSharedWithFailure.body(): ignoring internal events");        }    }    /**     * Schedules a new Gridlet that has been received by the GridResource     * entity.     * @param   gl    a Gridlet object that is going to be executed     * @param   ack   an acknowledgement, i.e. <tt>true</tt> if wanted to know     *        whether this operation is success or not, <tt>false</tt>     *        otherwise (don't care)     * @pre gl != null     * @post $none     */    public void gridletSubmit(Gridlet gl, boolean ack)    {        // update Gridlets in execution up to this point in time        updateGridletProcessing();        // reset number of PE since at the moment, it is not supported        if (gl.getNumPE() > 1)        {            String userName = GridSim.getEntityName( gl.getUserID() );            System.out.println();            System.out.println(super.get_name() + ".gridletSubmit(): " +                " Gridlet #" + gl.getGridletID() + " from " + userName +                " user requires " + gl.getNumPE() + " PEs.");            System.out.println("--> Process this Gridlet to 1 PE only.");            System.out.println();            // also adjusted the length because the number of PEs are reduced            int numPE = gl.getNumPE();            double len = gl.getGridletLength();            gl.setGridletLength(len*numPE);            gl.setNumPE(1);        }        // adds a Gridlet to the in execution list        ResGridlet rgl = new ResGridlet(gl);        rgl.setGridletStatus(Gridlet.INEXEC); // set the Gridlet status to exec        gridletInExecList_.add(rgl);   // add into the execution list        // sends back an ack if required        if (ack == true)        {            super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true,                          gl.getGridletID(), gl.getUserID()            );        }        // forecast all Gridlets in the execution list        forecastGridlet();    }    /**     * Finds the status of a specified Gridlet ID.     * @param gridletId    a Gridlet ID     * @param userId       the user or owner's ID of this Gridlet     * @return the Gridlet status or <tt>-1</tt> if not found     * @see gridsim.Gridlet     * @pre gridletId > 0     * @pre userId > 0     * @post $none     */    public int gridletStatus(int gridletId, int userId)    {        ResGridlet rgl = null;        // Find in EXEC List first        int found = super.findGridlet(gridletInExecList_, gridletId, userId);        if (found >= 0)        {            // Get the Gridlet from the execution list            rgl = (ResGridlet) gridletInExecList_.get(found);            return rgl.getGridletStatus();        }        // if not found then find again in Paused List        found = super.findGridlet(gridletPausedList_, gridletId, userId);        if (found >= 0)        {            // Get the Gridlet from the execution list            rgl = (ResGridlet) gridletPausedList_.get(found);            return rgl.getGridletStatus();        }        // if not found in all lists        return -1;    }    /**     * Cancels a Gridlet running in this entity.     * This method will search the execution and paused list. The User ID is     * important as many users might have the same Gridlet ID in the lists.     * <b>NOTE:</b>     * <ul>     *    <li> Before canceling a Gridlet, this method updates all the     *         Gridlets in the execution list. If the Gridlet has no more MIs     *         to be executed, then it is considered to be <tt>finished</tt>.     *         Hence, the Gridlet can't be canceled.     *     *    <li> Once a Gridlet has been canceled, it can't be resumed to     *         execute again since this method will pass the Gridlet back to     *         sender, i.e. the <tt>userId</tt>.     *     *    <li> If a Gridlet can't be found in both execution and paused list,     *         then a <tt>null</tt> Gridlet will be send back to sender,     *         i.e. the <tt>userId</tt>.     * </ul>     *     * @param gridletId    a Gridlet ID     * @param userId       the user or owner's ID of this Gridlet     * @pre gridletId > 0     * @pre userId > 0     * @post $none     */    public void gridletCancel(int gridletId, int userId)    {        // Finds the gridlet in execution and paused list        ResGridlet rgl = cancel(gridletId, userId);        // If not found in both lists then report an error and sends back        // an empty Gridlet        if (rgl == null)        {            System.out.println(super.resName_ +                    ".TimeSharedWithFailure.gridletCancel(): Cannot find " +                    "Gridlet #" + gridletId + " for User #" + userId);            super.sendCancelGridlet(GridSimTags.GRIDLET_CANCEL, null,                                    gridletId, userId);            return;        }        // if a Gridlet is found        rgl.finalizeGridlet();     // finalise Gridlet        // if a Gridlet has finished execution before canceling, the reports        // an error msg        if (rgl.getGridletStatus() == Gridlet.SUCCESS)        {            System.out.println(super.resName_                    + ".TimeSharedWithFailure.gridletCancel(): Cannot cancel"                    + " Gridlet #" + gridletId + " for User #" + userId                    + " since it has FINISHED.");        }        // sends the Gridlet back to sender        super.sendCancelGridlet(GridSimTags.GRIDLET_CANCEL, rgl.getGridlet(),                                gridletId, userId);    }    /**     * Pauses a Gridlet only if it is currently executing.     * This method will search in the execution list. The User ID is     * important as many users might have the same Gridlet ID in the lists.     * @param gridletId    a Gridlet ID     * @param userId       the user or owner's ID of this Gridlet

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蓝色福利精品导航| 色一情一乱一乱一91av| 日韩精品一级二级 | 久久嫩草精品久久久精品| 欧美三级一区二区| 欧美日韩黄视频| 欧美精选午夜久久久乱码6080| 欧美午夜精品理论片a级按摩| 男人的j进女人的j一区| 久久国产乱子精品免费女| 伦理电影国产精品| 国产一区二区三区日韩| 国产福利一区二区三区视频在线 | 欧美一级艳片视频免费观看| 欧美精品一级二级三级| 91精品国产91久久久久久最新毛片| 欧美一区二区在线视频| 欧美一级久久久| 精品99久久久久久| 国产欧美一区二区精品性色超碰 | 免费观看成人鲁鲁鲁鲁鲁视频| 喷水一区二区三区| 国产一区在线看| 99精品国产视频| 欧美日韩一区三区| 精品国产一区二区三区av性色| 久久综合色鬼综合色| 国产精品毛片大码女人| 一区二区三区高清在线| 日韩在线播放一区二区| 国产精品一区二区久久不卡| 成人福利视频在线看| 欧美艳星brazzers| 精品美女一区二区| 国产精品久久久一本精品| 亚洲综合成人在线| 看电视剧不卡顿的网站| www.日韩大片| 7777精品伊人久久久大香线蕉完整版 | 国产一本一道久久香蕉| 91性感美女视频| 日韩欧美一区在线观看| 国产免费久久精品| 亚洲成人精品一区二区| 国产精品自在在线| 欧美视频自拍偷拍| 久久婷婷成人综合色| 亚洲天堂a在线| 久久精品国产免费| 色综合天天综合网天天狠天天 | 国产网站一区二区| 亚洲成人动漫在线免费观看| 国产综合久久久久久鬼色 | 一卡二卡欧美日韩| 韩国一区二区三区| 欧美中文字幕一二三区视频| 欧美成人一区二区三区片免费| 亚洲日穴在线视频| 国产伦精一区二区三区| 欧美日韩精品一区二区三区四区| 久久久精品免费免费| 午夜欧美电影在线观看| 国产经典欧美精品| 日韩视频免费直播| 一级中文字幕一区二区| 成人永久免费视频| 欧美大胆人体bbbb| 亚洲成人777| 97精品国产露脸对白| 久久免费电影网| 男女性色大片免费观看一区二区| 91福利国产成人精品照片| 久久精品一区二区三区不卡牛牛| 热久久一区二区| 欧美日韩在线直播| 亚洲少妇30p| 成人性生交大合| 久久天堂av综合合色蜜桃网| 日韩国产欧美三级| 在线观看日韩av先锋影音电影院| 国产网红主播福利一区二区| 久久99国产精品久久| 欧美久久婷婷综合色| 亚洲综合色自拍一区| 不卡av电影在线播放| 久久久亚洲国产美女国产盗摄| 奇米影视在线99精品| 欧美在线不卡一区| 亚洲乱码国产乱码精品精98午夜| 成人永久免费视频| 国产精品―色哟哟| 国产成人av自拍| 久久久.com| 国产不卡视频在线播放| 久久综合给合久久狠狠狠97色69| 蜜臀久久99精品久久久久久9| 欧美性欧美巨大黑白大战| 亚洲精品视频一区| 一本色道久久综合狠狠躁的推荐 | 丰满少妇久久久久久久| 久久久亚洲精品一区二区三区| 激情六月婷婷久久| 久久综合五月天婷婷伊人| 精品在线观看免费| 精品国产一区久久| 国内精品国产三级国产a久久| 精品少妇一区二区三区在线播放| 老司机一区二区| 精品国产一区二区在线观看| 久久精品国产成人一区二区三区 | 亚洲美女一区二区三区| 99久久精品国产观看| ...av二区三区久久精品| 97精品视频在线观看自产线路二| 成人免费一区二区三区视频 | 欧美精品一区二区三区很污很色的| 麻豆精品一二三| 久久在线观看免费| 国产成人在线免费观看| 国产精品久久久久一区二区三区共 | 91麻豆6部合集magnet| 一区二区成人在线观看| 欧美精品一二三| 久久国产成人午夜av影院| 久久久蜜臀国产一区二区| 成人在线一区二区三区| 一区二区三区欧美在线观看| 欧美午夜电影一区| 蜜臀av一区二区在线免费观看| 2023国产精品视频| 成人午夜免费视频| 亚洲最新在线观看| 日韩一区二区三区视频| 国产福利电影一区二区三区| 1区2区3区欧美| 欧美精品视频www在线观看| 久久99精品一区二区三区| 国产精品久久久久一区| 欧美日韩高清在线| 国产剧情一区二区三区| 一区二区三区免费网站| 日韩免费观看2025年上映的电影 | 欧美一级xxx| 国产成人超碰人人澡人人澡| 亚洲尤物在线视频观看| 日韩女同互慰一区二区| 91色.com| 加勒比av一区二区| 亚洲精品日产精品乱码不卡| 日韩免费视频一区二区| 一本大道久久a久久综合 | 日韩三级高清在线| 成人综合婷婷国产精品久久蜜臀| 亚洲国产精品一区二区www| 国产亚洲制服色| 精品视频在线免费| 丁香激情综合国产| 日韩av电影天堂| 亚洲欧洲精品一区二区三区 | 美女久久久精品| 日韩毛片在线免费观看| 日韩欧美激情在线| 色婷婷综合久久久久中文| 激情五月婷婷综合网| 亚洲综合在线视频| 欧美激情在线观看视频免费| 91精品啪在线观看国产60岁| 99久久精品99国产精品 | 欧美日韩国产另类不卡| 成人免费黄色大片| 蜜臀av在线播放一区二区三区| 亚洲欧美日韩国产另类专区| 久久久亚洲综合| 欧美一级一区二区| 欧美日韩一区二区在线观看| 成人黄色a**站在线观看| 美女一区二区视频| 三级成人在线视频| 亚洲综合视频在线观看| 国产精品久久久久久久久图文区 | 亚洲国产精品ⅴa在线观看| 欧美一级理论性理论a| 日本久久一区二区| 不卡av在线免费观看| 国产一级精品在线| 黄页网站大全一区二区| 日日噜噜夜夜狠狠视频欧美人 | 人人超碰91尤物精品国产| 一区二区三区四区在线播放 | 日韩电影免费在线| 一区二区三区高清不卡| 亚洲欧洲日韩av| 国产精品的网站| 国产欧美精品一区二区色综合| 精品捆绑美女sm三区| 日韩午夜电影av| 91精品国产综合久久香蕉麻豆| 欧美亚洲图片小说| 欧美怡红院视频| 欧美日韩亚洲不卡|