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

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

?? spacesharedwithfailure.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.*;import java.util.Iterator;import eduni.simjava.Sim_event;import eduni.simjava.Sim_system;import gridsim.ResGridletList;import gridsim.GridSim;import gridsim.Gridlet;/** * SpaceSharedWithFailure class is based on {@link gridsim.SpaceShared}, but * with added failure functionalities. * SpaceSharedWithFailure class is an allocation policy for GridResource that * behaves exactly like First Come First Serve (FCFS). 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.SpaceShared * @invariant $none */class SpaceSharedWithFailure extends AllocPolicy implements AllocPolicyWithFailure{    private ResGridletList gridletQueueList_;     // Queue list    private ResGridletList gridletInExecList_;    // Execution list    private ResGridletList gridletPausedList_;    // Pause list    private double lastUpdateTime_;    // the last time Gridlets updated    private int[] machineRating_;      // list of machine ratings available    /**     * Allocates a new SpaceSharedWithFailure 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     */    SpaceSharedWithFailure(String resourceName, String entityName) throws Exception    {        super(resourceName, entityName);        // initialises local data structure        this.gridletInExecList_ = new ResGridletList();        this.gridletPausedList_ = new ResGridletList();        this.gridletQueueList_  = new ResGridletList();        this.lastUpdateTime_ = 0.0;        this.machineRating_ = null;    }    /**     * Handles internal events that are coming to this entity.     * @pre $none     * @post $none     */    public void body()    {        // Gets the PE's rating for each Machine in the list.        // Assumed one Machine has same PE rating.        MachineList list = super.resource_.getMachineList();        int size = list.size();        machineRating_ = new int[size];        for (int i = 0; i < size; i++) {            machineRating_[i] = super.resource_.getMIPSRatingOfOnePE(i, 0);        }        // 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_ && gridletInExecList_.size() > 0)            {                updateGridletProcessing();   // update Gridlets                checkGridletCompletion();    // check for finished Gridlets            }        }        // 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_ +                    ".SpaceSharedWithFailure.body(): ignore 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 the current Gridlets in exec list 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);        }        ResGridlet rgl = new ResGridlet(gl);        boolean success = false;        // if there is an available PE slot, then allocate immediately        if (gridletInExecList_.size() < super.totalPE_) {            success = allocatePEtoGridlet(rgl);        }        // if no available PE then put the ResGridlet into a Queue list        if (success == false)        {            rgl.setGridletStatus(Gridlet.QUEUED);            gridletQueueList_.add(rgl);        }        // sends back an ack if required        if (ack == true)        {            super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true,                          gl.getGridletID(), gl.getUserID()            );        }    }    /**     * 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();        }        // Find 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();        }        // Find in Queue List        found = super.findGridlet(gridletQueueList_, gridletId, userId);        if (found >= 0)        {            // Get the Gridlet from the execution list            rgl = (ResGridlet) gridletQueueList_.get(found);            return rgl.getGridletStatus();        }        // if not found in all 3 lists then no found        return -1;    }    /**     * Cancels a Gridlet running in this entity.     * This method will search the execution, queued 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)    {        // cancels a Gridlet        ResGridlet rgl = cancel(gridletId, userId);        // if the Gridlet is not found        if (rgl == null)        {            System.out.println(super.resName_ +                    ".SpaceSharedWithFailure.gridletCancel(): Cannot find " +                    "Gridlet #" + gridletId + " for User #" + userId);            super.sendCancelGridlet(GridSimTags.GRIDLET_CANCEL, null,                                    gridletId, userId);            return;        }        // if the Gridlet has finished beforehand then prints an error msg        if (rgl.getGridletStatus() == Gridlet.SUCCESS)        {            System.out.println(super.resName_                    + ".SpaceSharedWithFailure.gridletCancel(): Cannot cancel"                    + " Gridlet #" + gridletId + " for User #" + userId                    + " since it has FINISHED.");        }        // sends the Gridlet back to sender        rgl.finalizeGridlet();        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     * @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 gridletId > 0     * @pre userId > 0     * @post $none     */    public void gridletPause(int gridletId, int userId, boolean ack)    {        boolean status = false;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图视频网| 91丨porny丨蝌蚪视频| av中文字幕不卡| 欧美日韩一区三区| 中文av一区二区| 日本成人在线电影网| 91视频一区二区三区| 久久网站最新地址| 天天做天天摸天天爽国产一区 | 久久久夜色精品亚洲| 亚洲成av人片一区二区| 成人av网站在线| 亚洲精品在线免费播放| 性做久久久久久免费观看欧美| 国产91丝袜在线18| 精品免费国产一区二区三区四区| 亚洲福利一二三区| 91老师片黄在线观看| 国产色91在线| 国产一区二区在线观看免费| 欧美日韩aaa| 亚洲综合在线免费观看| 99精品久久99久久久久| 日本一区二区免费在线观看视频| 九一九一国产精品| 日韩欧美区一区二| 伦理电影国产精品| 欧美成人精品高清在线播放| 日韩成人一区二区三区在线观看| 91久久精品一区二区三区| ㊣最新国产の精品bt伙计久久| 国产一区二区三区日韩| 欧美精品一区二区三区高清aⅴ| 日韩精品午夜视频| 日韩一二三四区| 老司机午夜精品99久久| 日韩免费观看高清完整版| 免费一区二区视频| 精品国产一区久久| 国产美女精品一区二区三区| 久久你懂得1024| 丁香激情综合国产| 亚洲欧洲成人精品av97| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美亚洲图片小说| 日本一区二区三区视频视频| av在线播放一区二区三区| 亚洲欧洲中文日韩久久av乱码| 色婷婷狠狠综合| 亚洲第一福利一区| 欧美一级片在线观看| 精品一区二区三区在线播放| 久久―日本道色综合久久| 国产精品99久| 一区二区三区在线观看欧美| 欧美日韩一区二区三区高清| 日本不卡123| 国产精品三级av| 在线欧美日韩精品| 理论电影国产精品| 国产精品免费人成网站| 欧美在线观看你懂的| 蜜桃av一区二区在线观看| 久久免费午夜影院| 91极品视觉盛宴| 另类专区欧美蜜桃臀第一页| 国产精品久久国产精麻豆99网站| 欧洲精品一区二区| 久久国内精品视频| 亚洲欧美色图小说| 日韩三级免费观看| 91在线你懂得| 蜜桃久久久久久| 中文字幕综合网| 日韩一级免费观看| 91福利国产精品| 国产精一区二区三区| 亚洲va韩国va欧美va精品| 久久蜜桃av一区精品变态类天堂| 色视频欧美一区二区三区| 久久国内精品自在自线400部| 亚洲乱码中文字幕| 精品久久久久久久久久久院品网| 91香蕉视频在线| 老司机精品视频在线| 午夜精品福利一区二区三区av| 国产精品乱子久久久久| 欧美一级欧美一级在线播放| 一本一本久久a久久精品综合麻豆| 麻豆国产欧美一区二区三区| 亚洲第一成人在线| 亚洲婷婷在线视频| 欧美国产一区视频在线观看| 欧美一区二区成人6969| 欧美亚洲国产一区二区三区va| 国产一区二区免费在线| hitomi一区二区三区精品| 精品美女被调教视频大全网站| 1000精品久久久久久久久| av不卡免费电影| 国产精品一区二区x88av| 亚洲美女淫视频| 成人一级黄色片| 狠狠色丁香久久婷婷综合丁香| 国产精品一级二级三级| 成人毛片在线观看| 99久久精品免费看| 欧美嫩在线观看| 欧美一区2区视频在线观看| 日韩视频免费观看高清完整版在线观看 | 蜜乳av一区二区| 免费欧美在线视频| 国产成人av一区二区三区在线观看| 国产精品538一区二区在线| 国产一区二区女| 91美女在线视频| 欧美精品色综合| 日韩视频在线你懂得| 久久久久久久综合日本| 亚洲欧美成aⅴ人在线观看| 亚洲午夜一区二区三区| 狠狠色2019综合网| 免费观看在线综合色| 色综合咪咪久久| 欧美日本在线看| 久久久久久亚洲综合影院红桃| 中文字幕在线播放不卡一区| 亚洲第四色夜色| 久久国产精品免费| 99视频精品免费视频| 欧美电影在线免费观看| 久久久电影一区二区三区| 一区二区三区在线不卡| 亚洲一区二区视频在线观看| 国产白丝网站精品污在线入口| 色综合久久久久| 欧美精品一区二区三区一线天视频 | 成人毛片在线观看| 欧美久久久影院| 国产天堂亚洲国产碰碰| 亚洲国产婷婷综合在线精品| 国产高清久久久久| 国产精品自在在线| 91精品欧美久久久久久动漫| 国产精品毛片无遮挡高清| 日本欧美久久久久免费播放网| 国产成人亚洲综合色影视| 在线精品视频免费观看| 亚洲国产高清不卡| 日韩精品91亚洲二区在线观看| 国产成都精品91一区二区三| 正在播放亚洲一区| 亚洲免费在线电影| 从欧美一区二区三区| 日韩丝袜情趣美女图片| 亚洲一区二区三区美女| 国产91综合网| 精品福利一区二区三区免费视频| 成人免费在线观看入口| 国产成人精品免费一区二区| 日韩精品一区二区三区视频播放 | 蜜臀av性久久久久蜜臀aⅴ流畅| 91福利视频在线| 国产精品乱人伦| 国产电影一区在线| www国产成人免费观看视频 深夜成人网| 亚洲综合在线免费观看| 欧美亚洲一区二区在线| 亚洲欧洲韩国日本视频| 高清久久久久久| 欧美激情中文字幕| 国产一区二区精品久久| 日本一区二区视频在线| 国产自产2019最新不卡| 日韩精品综合一本久道在线视频| 亚洲第一主播视频| 色狠狠桃花综合| 亚洲sss视频在线视频| 色婷婷综合久色| 曰韩精品一区二区| 一本大道综合伊人精品热热| 国产午夜精品在线观看| 99久免费精品视频在线观看| 中文字幕成人av| 风间由美性色一区二区三区| 国产女人aaa级久久久级 | 欧美aaaaaa午夜精品| 欧美肥妇毛茸茸| 奇米影视在线99精品| 欧美成人三级在线| 国产在线看一区| 久久久久久久久久看片| 国产一区二区成人久久免费影院| 国产精品你懂的| 色先锋aa成人| 亚洲成人精品一区| 欧美一级日韩免费不卡| 丁香激情综合国产| 日韩美女精品在线| 欧洲av在线精品|