亚洲欧美第一页_禁久久精品乱码_粉嫩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综合网| 中文字幕一区二区三区av| 欧美精品18+| 福利一区在线观看| 喷白浆一区二区| 亚洲精品中文在线影院| 精品成人a区在线观看| 在线日韩一区二区| 成人精品小蝌蚪| 国内偷窥港台综合视频在线播放| 亚洲国产综合视频在线观看| 欧美激情一区二区在线| 精品欧美一区二区久久| 欧美日韩一区二区三区不卡| av在线播放一区二区三区| 精品一区二区在线观看| 婷婷国产v国产偷v亚洲高清| 亚洲婷婷在线视频| 国产亚洲精品精华液| 日韩美一区二区三区| 51精品国自产在线| 欧美午夜精品一区| 欧洲一区二区三区在线| 一本一道波多野结衣一区二区| 国产91露脸合集magnet| 国内精品自线一区二区三区视频| 免费一区二区视频| 日本中文字幕一区| 日韩**一区毛片| 日本va欧美va瓶| 免费在线观看成人| 麻豆国产一区二区| 麻豆精品一区二区| 裸体歌舞表演一区二区| 蜜臀va亚洲va欧美va天堂| 日韩精品一级中文字幕精品视频免费观看 | 亚洲va天堂va国产va久| 亚洲精品一二三区| 亚洲女同ⅹxx女同tv| 国产精品超碰97尤物18| 欧美国产激情一区二区三区蜜月| 久久嫩草精品久久久精品一| 久久综合九色欧美综合狠狠| 26uuuu精品一区二区| 国产清纯白嫩初高生在线观看91| 久久久久国产精品人| 国产视频一区二区三区在线观看| 国产三级精品三级| 中日韩免费视频中文字幕| 懂色av一区二区三区蜜臀| 粉嫩高潮美女一区二区三区| 粉嫩aⅴ一区二区三区四区五区 | 在线成人免费视频| 欧美福利视频导航| 精品国产污网站| 国产欧美一区二区精品秋霞影院| 国产亚洲成aⅴ人片在线观看| 国产精品热久久久久夜色精品三区| 欧美国产成人精品| 夜夜嗨av一区二区三区网页| 午夜影视日本亚洲欧洲精品| 青娱乐精品视频| 国产精品一二三区在线| 成人av免费网站| 欧洲一区二区av| 欧美不卡在线视频| 国产精品国产a级| 亚洲国产精品久久一线不卡| 蜜臀av亚洲一区中文字幕| 国产麻豆视频精品| 99热这里都是精品| 欧美精品色综合| 国产欧美一区二区三区网站 | 欧美成人精品3d动漫h| 国产精品青草久久| 午夜精品影院在线观看| 极品少妇xxxx偷拍精品少妇| 不卡视频一二三四| 欧美乱熟臀69xxxxxx| 久久久电影一区二区三区| 亚洲免费观看高清完整版在线观看熊| 视频一区二区中文字幕| 丁香六月综合激情| 欧美丰满嫩嫩电影| 国产精品欧美一区喷水| 日韩精品视频网站| 成人午夜电影久久影院| 欧美精品精品一区| 欧美国产一区二区| 日韩电影在线一区二区三区| 国产成人免费xxxxxxxx| 欧美色图在线观看| 日韩一区有码在线| 激情丁香综合五月| 欧美日韩国产综合久久| 一区在线观看视频| 精品无人码麻豆乱码1区2区 | 欧美电影免费观看高清完整版| 国产精品美女久久久久aⅴ| 青草国产精品久久久久久| 99国产精品久| 精品国产髙清在线看国产毛片| 一区二区三区在线视频免费观看| 国内不卡的二区三区中文字幕| 在线看国产一区二区| 国产日产欧产精品推荐色| 日本在线播放一区二区三区| 欧美在线观看一区二区| 中文字幕一区二区不卡 | 99综合电影在线视频| 日韩视频免费观看高清完整版在线观看| 中文字幕综合网| 国产一区二区三区四| 日韩三级精品电影久久久 | 亚洲国产美女搞黄色| 不卡的av电影| 久久久99免费| 经典一区二区三区| 欧美成人高清电影在线| 日韩精品视频网| 欧美日韩一区二区三区四区 | 欧美日韩亚洲另类| 亚洲精品中文字幕在线观看| 99精品偷自拍| 国产精品人妖ts系列视频| 国产一区二区三区在线观看免费| 日韩免费在线观看| 全国精品久久少妇| 777a∨成人精品桃花网| 午夜精品久久久久久| 欧美性xxxxxx少妇| 亚洲一区影音先锋| 欧美三级在线看| 午夜精品久久久久久久99樱桃| 欧美乱妇一区二区三区不卡视频| 亚洲成av人片一区二区三区| 欧美日韩在线免费视频| 亚洲图片有声小说| 91麻豆精品国产91久久久更新时间 | 日本一区二区三区高清不卡| 国产精品1区二区.| 欧美韩日一区二区三区四区| 成人午夜碰碰视频| 国产精品看片你懂得| www.亚洲精品| 一区二区三区欧美在线观看| 欧洲一区在线观看| 热久久免费视频| 久久亚洲欧美国产精品乐播| 成人亚洲一区二区一| 最新日韩在线视频| 欧美亚洲国产一区在线观看网站 | 精品国产一区二区国模嫣然| 国产在线不卡一区| 国产精品进线69影院| 97精品久久久午夜一区二区三区| 一区二区三区视频在线观看| 欧美日韩成人在线| 精品亚洲成a人| 中文字幕五月欧美| 7777精品伊人久久久大香线蕉的 | 综合分类小说区另类春色亚洲小说欧美 | 国产精品区一区二区三| 91久久精品一区二区三| 午夜精品在线看| 久久久久久免费网| 91女人视频在线观看| 亚洲成av人影院| 欧美极品美女视频| 欧美日韩一区 二区 三区 久久精品| 免费一区二区视频| 亚洲视频中文字幕| 日韩一级完整毛片| 成人不卡免费av| 在线观看成人小视频| 国产精品嫩草影院av蜜臀| 国产精品久久久久久久久久久免费看| 久久久电影一区二区三区| 亚洲视频免费在线观看| 亚洲成a人片在线观看中文| 91首页免费视频| 精品福利在线导航| 1区2区3区精品视频| 五月天亚洲精品| 亚洲电影一级片| 精品一区二区日韩| 欧美高清视频一二三区| 欧美激情在线一区二区| 午夜精品福利视频网站| 欧洲精品一区二区| 一区二区三区在线免费视频| 高清不卡一区二区| 国产精品视频九色porn| 国产精品99久久久久久宅男| 51精品视频一区二区三区| 青椒成人免费视频| 日韩欧美电影一二三| 国产一区久久久| 欧美国产在线观看|