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

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

?? timesharedwithfailure.java

?? 中間件開發詳細說明:清華大學J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會員下載此源碼] [成為VIP會
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
     * @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;        // find this Gridlet in the execution list        int found = super.findGridlet(gridletInExecList_, gridletId, userId);        if (found >= 0)        {            // update Gridlets in execution list up to this point in time            updateGridletProcessing();            // get a Gridlet from execution list            ResGridlet rgl = (ResGridlet) gridletInExecList_.remove(found);            // if a Gridlet is finished upon pausing, then set it to success            // instead.            if (rgl.getRemainingGridletLength() == 0.0)            {                System.out.println(super.resName_                        + ".TimeSharedWithFailure.gridletPause(): Cannot pause"                        + " Gridlet #" + gridletId + " for User #" + userId                        + " since it is FINISHED.");                gridletFinish(rgl, Gridlet.SUCCESS);            }            else            {                status = true;                rgl.setGridletStatus(Gridlet.PAUSED);                // add the Gridlet into the paused list                gridletPausedList_.add(rgl);                System.out.println(super.resName_ +                ".TimeSharedWithFailure.gridletPause(): Gridlet #" + gridletId +                " with User #" + userId + " has been sucessfully PAUSED.");            }            // forecast all Gridlets in the execution list            forecastGridlet();        }        else   // if not found in the execution list        {            System.out.println(super.resName_ +                    ".TimeSharedWithFailure.gridletPause(): Cannot find " +                    "Gridlet #" + gridletId + " for User #" + userId);        }        // sends back an ack        if (ack == true)        {            super.sendAck(GridSimTags.GRIDLET_PAUSE_ACK, status,                          gridletId, userId);        }    }    /**     * Moves a Gridlet from this GridResource entity to a different one.     * This method will search in both the execution and paused list.     * The User ID is important as many Users might have the same Gridlet ID     * in the lists.     * <p>     * If a Gridlet has finished beforehand, then this method will send back     * the Gridlet to sender, i.e. the <tt>userId</tt> and sets the     * acknowledgment to false (if required).     *     * @param gridletId    a Gridlet ID     * @param userId       the user or owner's ID of this Gridlet     * @param destId       a new destination GridResource ID for 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     * @pre destId > 0     * @post $none     */    public void gridletMove(int gridletId, int userId, int destId, boolean ack)    {        // cancel the Gridlet first        ResGridlet rgl = cancel(gridletId, userId);        // If no found then print an error msg        if (rgl == null)        {            System.out.println(super.resName_ +                    ".TimeSharedWithFailure.gridletMove(): Cannot find " +                    "Gridlet #" + gridletId + " for User #" + userId);            if (ack == true)   // sends ack that this operation fails            {                super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false,                              gridletId, userId);            }            return;        }        // if found        rgl.finalizeGridlet();   // finalise Gridlet        Gridlet gl = rgl.getGridlet();        // if a Gridlet has finished execution        if (gl.getGridletStatus() == Gridlet.SUCCESS)        {            System.out.println(super.resName_                    + ".TimeSharedWithFailure.gridletMove(): Cannot move"                    + " Gridlet #" + gridletId + " for User #" + userId                    + " since it has FINISHED.");            if (ack == true)            {                super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false, gridletId,                              userId);            }            super.sendFinishGridlet(gl);   // sends the Gridlet back to sender        }        // moves this Gridlet to another GridResource entity        else {            super.gridletMigrate(gl, destId, ack);        }    }    /**     * Resumes a Gridlet only in the paused 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 gridletResume(int gridletId, int userId, boolean ack)    {        boolean success = false;        // finds in the execution list first        int found = super.findGridlet(gridletPausedList_, gridletId, userId);        if (found >= 0)        {            // need to update Gridlets in execution up to this point in time            updateGridletProcessing();            // remove a Gridlet from paused list and change the status            ResGridlet rgl = (ResGridlet) gridletPausedList_.remove(found);            rgl.setGridletStatus(Gridlet.RESUMED);            // add the Gridlet back to in execution list            gridletInExecList_.add(rgl);            // then forecast Gridlets in execution list            forecastGridlet();            success = true;            System.out.println(super.resName_ +            ".TimeSharedWithFailure.gridletResume(): Gridlet #" + gridletId +            " with User #" + userId + " has been sucessfully RESUMED.");        }        else  // if no found then prints an error msg        {            System.out.println(super.resName_ +            ".TimeSharedWithFailure.gridletResume(): Cannot find Gridlet #" +            gridletId + " for User #" + userId);        }        // sends back an ack to sender        if (ack == true)        {            super.sendAck(GridSimTags.GRIDLET_RESUME_ACK, success,                          gridletId, userId);        }    }    ////////////////////// PRIVATE METHODS //////////////////////////////    /**     * Updates the execution of all Gridlets for a period of time.     * The time period is determined from the last update time up to the     * current time. Once this operation is successfull, then the last update     * time refers to the current time.     * @pre $none     * @post $none     */    private void updateGridletProcessing()    {        // Identify MI share for the duration (from last event time)        double time = GridSim.clock();        double timeSpan = time - lastUpdateTime_;        // if current time is the same or less than the last update time,        // then ignore        if (timeSpan <= 0.0) {            return;        }        // Update Current Time as the Last Update        lastUpdateTime_ = time;        // update the GridResource load        int size = gridletInExecList_.size();        double load = super.calculateTotalLoad(size);        super.addTotalLoad(load);       // add the current resource load        // if no Gridlets in execution then ignore the rest        if (size == 0) {            return;        }        // gets MI Share for all Gridlets        MIShares shares = getMIShare(timeSpan, size);        ResGridlet obj = null;        // a loop that allocates MI share for each Gridlet accordingly        // In this algorithm, Gridlets at the front of the list        // (range = 0 until MIShares.maxCount-1) will be given max MI value        // For example, 2 PEs and 3 Gridlets. PE #0 processes Gridlet #0        // PE #1 processes Gridlet #1 and Gridlet #2        int i = 0;  // a counter        Iterator iter = gridletInExecList_.iterator();        while ( iter.hasNext() )        {            obj = (ResGridlet) iter.next();            // Updates the Gridlet length that is currently being executed            if (i < shares.maxCount) {                obj.updateGridletFinishedSoFar(shares.max);            }            else {                obj.updateGridletFinishedSoFar(shares.min);            }            i++;   // increments i        }    }    /**     * Identifies MI share (max and min) for all Gridlets in     * a given time duration     * @param timeSpan duration     * @param size    total number of Gridlets in the execution list     * @return  the total MI share that a Gridlet gets for a given     *          <tt>timeSpan</tt>     */    private MIShares getMIShare(double timeSpan, int size)    {        // 1 - localLoad_ = available MI share percentage        double localLoad = super.resCalendar_.getCurrentLoad();        double TotalMIperPE = super.resource_.getMIPSRatingOfOnePE() * timeSpan                              * (1 - localLoad);        // This TimeSharedWithFailure is not Round Robin where each PE for        // 1 Gridlet only.        // a PE can have more than one Gridlet executing.        // minimum number of Gridlets that each PE runs.        int glDIVpe = size / super.totalPE_;        // number of PEs that run one extra Gridlet        int glMODpe = size % super.totalPE_;        // If num Gridlets in execution > total PEs in a GridResource,        // then divide MIShare by the following constraint:        // - obj.max = MIShare of a PE executing n Gridlets        // - obj.min = MIShare of a PE executing n+1 Gridlets        // - obj.maxCount = a threshold number of Gridlets will be assigned to        //                  max MI value.        //        // In this algorithm, Gridlets at the front of the list        // (range = 0 until maxCount-1) will be given max MI value        if (glDIVpe > 0)        {            // this is for PEs that run one extra Gridlet            share_.min = TotalMIperPE / (glDIVpe + 1);            share_.max = TotalMIperPE / glDIVpe;            share_.maxCount = (super.totalPE_ - glMODpe) * glDIVpe;        }        // num Gridlet in Exec < total PEs, meaning it is a        // full PE share: i.e a PE is dedicated to execute a single Gridlet        else        {            share_.max = TotalMIperPE;            share_.min = TotalMIperPE;            share_.maxCount = size;   // number of Gridlet        }        return share_;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久久精品免费观看国产蜜| 久久不见久久见免费视频1| 69堂亚洲精品首页| 国产精品1024| 日产精品久久久久久久性色| 国产精品丝袜在线| 日韩欧美中文一区二区| 日本高清不卡aⅴ免费网站| 国产一区欧美二区| 亚洲国产精品久久久男人的天堂| 国产欧美日韩精品一区| 911国产精品| 色综合色综合色综合| 美脚の诱脚舐め脚责91| 亚洲资源中文字幕| 亚洲国产精品精华液ab| 日韩美女一区二区三区四区| 欧美亚洲高清一区| 不卡一二三区首页| 国产精品一品二品| 日本aⅴ亚洲精品中文乱码| 亚洲精品v日韩精品| 国产精品美女久久久久久久| 2021中文字幕一区亚洲| 日韩一区二区三区在线| 91久久精品日日躁夜夜躁欧美| 国产91丝袜在线播放0| 激情成人综合网| 日韩va亚洲va欧美va久久| 亚洲第一狼人社区| 一区二区三区在线播放| 亚洲视频中文字幕| 国产精品女主播在线观看| 久久久精品人体av艺术| 欧美精品一区二区三区蜜臀| 日韩精品一区二区三区四区视频 | 欧美日韩在线电影| 97久久超碰国产精品| 成人黄色777网| 成人app下载| 成人精品一区二区三区中文字幕| 国产高清一区日本| 东方aⅴ免费观看久久av| 国产夫妻精品视频| 国产精品 欧美精品| 国产精华液一区二区三区| 国产九九视频一区二区三区| 国产精品18久久久久久久久| 国产成人综合亚洲网站| 国产成a人无v码亚洲福利| 高清日韩电视剧大全免费| 国产91在线观看| 99久久精品情趣| 日本精品视频一区二区三区| 欧美色精品天天在线观看视频| 欧美日韩卡一卡二| 91精品国产色综合久久不卡蜜臀 | 亚洲欧美在线视频观看| 日韩毛片精品高清免费| 一区二区三区日本| 五月婷婷激情综合| 日韩二区三区四区| 国产呦萝稀缺另类资源| 成人午夜激情在线| 色视频欧美一区二区三区| 欧美无乱码久久久免费午夜一区| 4438成人网| 国产日韩欧美精品电影三级在线| 国产精品美女久久福利网站| 亚洲免费视频中文字幕| 视频一区二区三区中文字幕| 久久99精品久久只有精品| 粉嫩在线一区二区三区视频| 99久久精品一区二区| 在线不卡一区二区| 久久久久成人黄色影片| 中文字幕欧美一| 日韩vs国产vs欧美| 成人激情免费视频| 精品1区2区3区| 久久天堂av综合合色蜜桃网| 亚洲精品写真福利| 日韩av一区二区三区四区| 丁香天五香天堂综合| 欧美电影影音先锋| 国产欧美日本一区视频| 天天操天天色综合| 成人一级视频在线观看| 精品视频在线看| 国产精品麻豆99久久久久久| 日韩电影在线观看网站| 国产成人免费网站| 欧美日韩免费视频| 国产精品污污网站在线观看| 日韩综合一区二区| 成人国产精品免费观看| 91精品国产品国语在线不卡| 国产精品久久久久影视| 麻豆精品视频在线| 91精品91久久久中77777| 久久夜色精品一区| 亚洲v中文字幕| 99re8在线精品视频免费播放| 日韩欧美不卡在线观看视频| 亚洲精品国产高清久久伦理二区| 国产一区二区网址| 欧美日本精品一区二区三区| 专区另类欧美日韩| 国产成人精品aa毛片| 欧美一级片在线观看| 一区二区三区在线观看动漫| av不卡在线播放| 久久精品亚洲乱码伦伦中文 | 国产精品夫妻自拍| 久久99精品一区二区三区三区| 欧美日韩一区二区三区高清| 亚洲欧美国产高清| 成人小视频在线| 久久人人97超碰com| 三级欧美韩日大片在线看| av一二三不卡影片| 久久综合色播五月| 免费在线一区观看| 欧美日韩二区三区| 伊人色综合久久天天人手人婷| 成人久久视频在线观看| 久久精品视频在线免费观看| 久久99久久久久久久久久久| 91精品免费观看| 午夜精品久久久久久久99水蜜桃| 91国在线观看| 亚洲黄色尤物视频| 99久久99久久免费精品蜜臀| 中文字幕av不卡| 岛国精品一区二区| 久久一二三国产| 国产成人免费视频一区| 国产欧美综合在线观看第十页 | bt7086福利一区国产| 国产三级久久久| 高清在线不卡av| 国产精品黄色在线观看| 成人app在线观看| 亚洲图片你懂的| 日本精品视频一区二区| 亚洲一区免费视频| 欧美性色黄大片手机版| 亚洲福中文字幕伊人影院| 欧美日本不卡视频| 日本亚洲电影天堂| 日韩美女视频一区二区在线观看| 久久精品免费观看| 久久久亚洲国产美女国产盗摄 | 日本韩国欧美在线| 亚洲国产综合色| 91麻豆精品国产91久久久更新时间 | 婷婷夜色潮精品综合在线| 欧美视频在线观看一区| 丝袜亚洲另类丝袜在线| 日韩一区二区三区在线| 国产美女精品人人做人人爽| 国产精品丝袜一区| 色婷婷综合久久久久中文 | 国产精品性做久久久久久| 亚洲国产精品黑人久久久| 色网综合在线观看| 午夜a成v人精品| 精品福利一二区| 99久久国产免费看| 五月激情六月综合| 精品粉嫩aⅴ一区二区三区四区| 成人自拍视频在线观看| 一区二区三区国产| 日韩亚洲欧美一区二区三区| 国产成人欧美日韩在线电影| 一区二区激情视频| 日韩精品中文字幕在线不卡尤物| 国产不卡视频一区二区三区| 一区二区三区视频在线看| 日韩欧美色综合| 成人av电影观看| 蜜桃av一区二区三区电影| 中文字幕精品在线不卡| 欧美日韩久久久| 成人一区在线看| 男人操女人的视频在线观看欧美| 国产午夜精品美女毛片视频| 欧美亚洲另类激情小说| 国产伦精品一区二区三区视频青涩| 亚洲精品成a人| 久久精品免视看| 欧美精品一二三四| 岛国精品在线观看| 蜜桃av一区二区三区| 亚洲摸摸操操av| 久久精品男人的天堂| 8x福利精品第一导航| 99久久综合99久久综合网站| 久久99国产乱子伦精品免费| 亚洲高清免费视频|