亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久久99精品免费观看不卡| 国产v综合v亚洲欧| 日韩一区在线播放| 国产亚洲福利社区一区| 精品久久久久久无| 欧美videos大乳护士334| 日韩写真欧美这视频| 欧美videos大乳护士334| 麻豆成人在线观看| 久久国产精品第一页| 韩国成人在线视频| 国产成人av资源| 六月丁香婷婷久久| 国产成人自拍网| www.av亚洲| 欧美日韩国产中文| 欧美成人a∨高清免费观看| 日韩免费高清av| 亚洲综合免费观看高清完整版在线 | 国产日产亚洲精品系列| 国产在线一区观看| 99天天综合性| 欧美精品成人一区二区三区四区| 日韩一区二区三区视频| 久久免费偷拍视频| 一区二区三区四区视频精品免费| a美女胸又www黄视频久久| 一区二区三区蜜桃| 精品午夜久久福利影院| 成人动漫一区二区在线| 欧美视频一区在线| 精品国一区二区三区| 成人欧美一区二区三区小说| 一区二区三区中文在线观看| 麻豆精品一区二区av白丝在线 | 色综合久久综合网欧美综合网| 欧美亚洲国产怡红院影院| 国内外成人在线视频| 日韩一区二区高清| 国产精品456露脸| 一本高清dvd不卡在线观看| 国产在线日韩欧美| 99久久精品免费看国产免费软件| aaa欧美日韩| www国产成人免费观看视频 深夜成人网| 国产欧美精品一区二区色综合 | 亚洲国产精品激情在线观看| 国产精品乱码人人做人人爱| 秋霞午夜鲁丝一区二区老狼| 99久久伊人久久99| 日韩视频123| 夜夜嗨av一区二区三区网页 | 亚洲欧美日韩国产综合| 国产在线精品一区在线观看麻豆| 欧美日韩另类一区| 亚洲精品免费在线观看| 成人午夜精品在线| 麻豆精品在线观看| 欧美午夜一区二区三区 | 三级影片在线观看欧美日韩一区二区| 成人黄色大片在线观看| 国产午夜亚洲精品理论片色戒 | 成人午夜免费视频| 精品国产sm最大网站| 蜜臀久久99精品久久久画质超高清 | 日韩av电影免费观看高清完整版| 丁香激情综合五月| 久久蜜桃一区二区| 精品亚洲成a人| 精品国产三级电影在线观看| 日韩国产欧美在线视频| 6080亚洲精品一区二区| 三级久久三级久久| 8v天堂国产在线一区二区| 日日摸夜夜添夜夜添精品视频| 亚洲一线二线三线久久久| 一本一道波多野结衣一区二区| 中文字幕成人在线观看| jlzzjlzz亚洲日本少妇| 亚洲欧洲av另类| 色94色欧美sute亚洲线路二| 亚洲另类色综合网站| 欧洲精品在线观看| 亚洲chinese男男1069| 精品视频在线免费观看| 奇米四色…亚洲| 精品三级av在线| 国产成人综合在线| 久久亚洲捆绑美女| 成人免费毛片高清视频| 国产精品乱人伦中文| 91亚洲永久精品| 亚洲一区二区三区爽爽爽爽爽| 欧美性猛交xxxx乱大交退制版| 一区二区三区欧美视频| 欧美一区二区三区喷汁尤物| 老司机精品视频一区二区三区| 欧美电视剧在线观看完整版| 欧美一区二区免费视频| 裸体健美xxxx欧美裸体表演| 久久久美女毛片| 欧亚洲嫩模精品一区三区| 奇米888四色在线精品| 久久99精品久久只有精品| 国产精品视频在线看| 欧美日韩在线播放三区| 精品一区二区三区在线播放| 亚洲三级在线播放| 日韩视频在线一区二区| 99v久久综合狠狠综合久久| 蜜臀久久久久久久| 国产精品国产三级国产专播品爱网| 日本韩国欧美在线| 国产在线精品一区二区| 亚洲一区二区三区四区五区黄| 51精品国自产在线| 国产主播一区二区| 亚洲高清免费视频| 中文无字幕一区二区三区| 欧美高清一级片在线| jlzzjlzz亚洲女人18| 黄色成人免费在线| 亚洲国产美女搞黄色| 国产精品网站一区| 精品国产免费久久| 欧美久久一区二区| 91麻豆蜜桃一区二区三区| 国产综合久久久久久久久久久久| 亚洲永久精品国产| 亚洲日本电影在线| 国产精品国产三级国产普通话99| 日韩一级高清毛片| 亚洲一区二区欧美日韩| 久久久蜜桃精品| 国产一区三区三区| 蜜臀精品一区二区三区在线观看| 一区二区三区在线播放| 亚洲欧洲精品一区二区三区 | av网站免费线看精品| 激情欧美一区二区| 免费xxxx性欧美18vr| 视频一区在线视频| 日韩中文字幕1| 亚洲欧美一区二区三区孕妇| 中文字幕精品—区二区四季| 久久婷婷久久一区二区三区| 91精品福利在线一区二区三区| 欧美日韩免费视频| 欧美亚洲日本国产| 欧美日本精品一区二区三区| 色婷婷av一区二区三区软件| 91在线精品一区二区三区| 懂色av一区二区在线播放| 粉嫩av一区二区三区在线播放 | 国产亚洲一二三区| 国产色产综合产在线视频| 国产视频一区在线观看| 欧美国产日韩亚洲一区| 成人免费不卡视频| 成人国产视频在线观看| 色综合色综合色综合色综合色综合| 97aⅴ精品视频一二三区| 91精彩视频在线| 欧美精品xxxxbbbb| 精品久久久网站| 国产精品久久久一本精品| 亚洲天堂精品在线观看| 欧美日韩日日骚| 日韩一区二区免费电影| 国产丝袜欧美中文另类| 中文字幕一区二区三区在线观看 | 91美女在线观看| 欧美色倩网站大全免费| 日韩午夜中文字幕| 日本一区二区免费在线观看视频 | 精品国精品自拍自在线| 国产精品国产精品国产专区不片| 亚洲激情在线激情| 免费看日韩精品| 成人性生交大片免费看中文| 色综合天天综合色综合av| 欧美一区二区视频在线观看2022| 久久久久久久久久看片| 一区二区三区中文在线| 国产在线精品一区二区三区不卡| 成人午夜视频在线| 9191精品国产综合久久久久久| 欧美经典一区二区三区| 色噜噜狠狠色综合欧洲selulu| 99久久综合国产精品| 91视视频在线观看入口直接观看www | 国产日产欧美精品一区二区三区| 亚洲激情在线播放| 国产精品一区二区三区乱码| 欧美伊人久久久久久久久影院 | 国产69精品一区二区亚洲孕妇| 欧美日韩视频不卡| 一区二区免费看| 成人一区二区三区视频在线观看| 欧美三区免费完整视频在线观看|