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

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

?? timesharedwithfailure.java

?? 中間件開發詳細說明:清華大學J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會員下載此源碼] [成為VIP會
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
    /**     * Determines the smallest completion time of all Gridlets in the execution     * list. The smallest time is used as an internal event to     * update Gridlets processing in the future.     * <p>     * The algorithm for this method:     * <ul>     *     <li> identify the finish time for each Gridlet in the execution list     *          given the share MIPS rating for all and the remaining Gridlet's     *          length     *     <li> find the smallest finish time in the list     *     <li> send the last Gridlet in the list with     *          <tt>delay =  smallest finish time - current time</tt>     * </ul>     * @pre $none     * @post $none     */    private void forecastGridlet()    {        // if no Gridlets available in exec list, then exit this method        if (gridletInExecList_.size() == 0) {            return;        }        // checks whether Gridlets have finished or not. If yes, then remove        // them since they will effect the MIShare calculation.        checkGridletCompletion();        // Identify MIPS share for all Gridlets for 1 second, considering        // current Gridlets + No of PEs.        MIShares share = getMIShare( 1.0, gridletInExecList_.size() );        ResGridlet rgl = null;        int i = 0;        double time = 0.0;        double rating = 0.0;        double smallestTime = 0.0;        // For each Gridlet, determines their finish time        Iterator iter = gridletInExecList_.iterator();        while ( iter.hasNext() )        {            rgl = (ResGridlet) iter.next();            // If a Gridlet locates before the max count then it will be given            // the max. MIPS rating            if (i < share.maxCount) {                rating = share.max;            }            else {   // otherwise, it will be given the min. MIPS Rating                rating = share.min;            }            time = forecastFinishTime(rating, rgl.getRemainingGridletLength() );            int roundUpTime = (int) (time+1);   // rounding up            rgl.setFinishTime(roundUpTime);            // get the smallest time of all Gridlets            if (i == 0 || smallestTime > time) {                smallestTime = time;            }            i++;        }        // sends to itself as an internal event        super.sendInternalEvent(smallestTime);    }    /**     * Checks all Gridlets in the execution list whether they are finished or     * not.     * @pre $none     * @post $none     */    private void checkGridletCompletion()    {        ResGridlet rgl = null;        // a loop that determine the smallest finish time of a Gridlet        // Don't use an iterator since it causes an exception because if        // a Gridlet is finished, gridletFinish() will remove it from the list.        int i = 0;        while ( i < gridletInExecList_.size() )        {            rgl = (ResGridlet) gridletInExecList_.get(i);            // if a Gridlet has finished, then remove it from the list            if (rgl.getRemainingGridletLength() <= 0.0)            {                gridletFinish(rgl, Gridlet.SUCCESS);                continue;  // not increment i coz the list size also decreases            }            i++;        }    }    /**     * Forecast finish time of a Gridlet.     * <tt>Finish time = length / available rating</tt>     * @param availableRating   the shared MIPS rating for all Gridlets     * @param length   remaining Gridlet length     * @return Gridlet's finish time.     */    private double forecastFinishTime(double availableRating, double length)    {        double finishTime = length / availableRating;        // This is as a safeguard since the finish time can be extremely        // small close to 0.0, such as 4.5474735088646414E-14. Hence causing        // some Gridlets never to be finished and consequently hang the program        if (finishTime < 1.0) {            finishTime = 1.0;        }        return finishTime;    }    /**     * Updates the Gridlet's properties, such as status once a     * Gridlet is considered finished.     * @param rgl     a ResGridlet object     * @param status  the status of this ResGridlet object     * @pre rgl != null     * @post $none     */    private void gridletFinish(ResGridlet rgl, int status)    {        // NOTE: the order is important! Set the status first then finalize        // due to timing issues in ResGridlet class.        rgl.setGridletStatus(status);        rgl.finalizeGridlet();        // sends back the Gridlet with no delay        Gridlet gl = rgl.getGridlet();        super.sendFinishGridlet(gl);        // remove this Gridlet in the execution        gridletInExecList_.remove(rgl);    }    /**     * Handles internal event     * @pre $none     * @post $none     */    private void internalEvent()    {        // this is a constraint that prevents an infinite loop        // Compare between 2 floating point numbers. This might be incorrect        // for some hardware platform.        if ( lastUpdateTime_ == GridSim.clock() ) {            return;        }        // update Gridlets in execution up to this point in time        updateGridletProcessing();        // schedule next event        forecastGridlet();    }    /**     * Handles an operation of canceling a Gridlet in either execution list     * or paused list.     * @param gridletId    a Gridlet ID     * @param userId       the user or owner's ID of this Gridlet     * @param an object of ResGridlet or <tt>null</tt> if this Gridlet is not     *        found     * @pre gridletId > 0     * @pre userId > 0     * @post $none     */    private ResGridlet cancel(int gridletId, int userId)    {        ResGridlet rgl = null;        // Check whether the Gridlet is in execution list or not        int found = super.findGridlet(gridletInExecList_, gridletId, userId);        // if a Gridlet is in execution list        if (found >= 0)        {            // update the gridlets in execution list up to this point in time            updateGridletProcessing();            // Get the Gridlet from the execution list            rgl = (ResGridlet) gridletInExecList_.remove(found);            // if a Gridlet is finished upon cancelling, then set it to success            if (rgl.getRemainingGridletLength() == 0.0) {                rgl.setGridletStatus(Gridlet.SUCCESS);            }            else {                rgl.setGridletStatus(Gridlet.CANCELED);            }            // then forecast the next Gridlet to complete            forecastGridlet();        }        // if a Gridlet is not in exec list, then find it in the paused list        else        {            found = super.findGridlet(gridletPausedList_, gridletId, userId);            // if a Gridlet is found in the paused list then remove it            if (found >= 0)            {                rgl = (ResGridlet) gridletPausedList_.remove(found);                rgl.setGridletStatus(Gridlet.CANCELED);            }        }        return rgl;    }    /**     * Sets the status of all Gridlets in this resource to <tt>FAILED</tt>.     * Then sends them back to users, and clean up the relevant lists.     */    public void setGridletsFailed()    {        ResGridlet rgl;        int gridletPausedList_size = gridletPausedList_.size();        int gridletInExecList_size = gridletInExecList_.size();        /*******************        // Uncomment this to get more info on the progress of sims        System.out.println("################# " + super.get_name() +        ". Cleaning gridlets in InExec and Paused lists in the failed resource." +        " gridletInExecList_.size (): " + gridletInExecList_.size() +        " gridletPausedList_.size (): " + gridletPausedList_.size());        *******************/        for (int i = 0; i<gridletPausedList_size; i++)        {            rgl = (ResGridlet) gridletPausedList_.get(0);            int status = rgl.getGridletStatus();            // if the gridlet has already finished, then just send it back.            // Otherwise, set status to FAILED_RESOURCE_UNAVAILABLE            if (status != Gridlet.SUCCESS)            {                rgl.setGridletStatus(Gridlet.FAILED_RESOURCE_UNAVAILABLE);            }            rgl.finalizeGridlet();            super.sendFinishGridlet(rgl.getGridlet());            gridletPausedList_.remove(0);        }        updateGridletProcessing();        // go on with the gridlet in exec list.        for (int i = 0; i < gridletInExecList_size; i++)        {            rgl = (ResGridlet) gridletInExecList_.get(0);            int status = rgl.getGridletStatus();            // if the gridlet has already finished, then just send it back.            // Otherwise, set status to FAILED_RESOURCE_UNAVAILABLE            if (status != Gridlet.SUCCESS)            {                rgl.setGridletStatus(Gridlet.FAILED_RESOURCE_UNAVAILABLE);            }            rgl.finalizeGridlet();            super.sendFinishGridlet(rgl.getGridlet());            gridletInExecList_.remove(0);        }    }    /**     * This method is empty because it is not required by this policy.     * Sets the status of all Gridlets in this machine to <tt>FAILED</tt>.     * Then sends them back to users, and clean up the relevant lists.     * @param failedMachID  the id of the failed machine     */    public void setGridletsFailed(int failedMachID)    {        // Nothing, as in a time_shared machine, all the gridlets use the        // machine in turn, during a period of time.        // So, gridlets are not allocated tightly to a machine or PE.        // Because of that, we don't have to make fail any gridlet        // when a machine fails    }} // end class

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av电影在线| 欧美三级午夜理伦三级中视频| 国产高清不卡一区二区| 国产成人精品一区二| 91在线观看免费视频| 欧美精品高清视频| 国产精品灌醉下药二区| 免费亚洲电影在线| 97se狠狠狠综合亚洲狠狠| 欧美日韩国产一区| 国产精品福利影院| 另类中文字幕网| 在线免费亚洲电影| 国产精品免费人成网站| 人人狠狠综合久久亚洲| www.日韩在线| 99国产精品久| 欧美一区二区视频网站| 欧美一级精品在线| 亚洲黄色免费电影| 国产美女久久久久| 成人精品视频一区二区三区 | 蜜臀久久久99精品久久久久久| 成人综合婷婷国产精品久久蜜臀| 国产精品青草久久| 人人超碰91尤物精品国产| 99re亚洲国产精品| 久久久久久久久久久久电影| 丝瓜av网站精品一区二区| 国产精品自拍在线| 精品国精品国产尤物美女| 自拍av一区二区三区| 国产一区二区在线视频| 777xxx欧美| 婷婷六月综合亚洲| 欧美私模裸体表演在线观看| 精品国产免费久久| 久久99精品久久久久久动态图| 在线免费视频一区二区| 亚洲欧洲日韩综合一区二区| 国产成人午夜片在线观看高清观看| 欧美一卡2卡3卡4卡| 舔着乳尖日韩一区| 欧美日韩精品欧美日韩精品一综合| 亚洲美女区一区| 成人av免费在线观看| 久久精子c满五个校花| 国产自产视频一区二区三区| 欧美xxx久久| 久久激情五月婷婷| 精品噜噜噜噜久久久久久久久试看| 亚洲午夜精品久久久久久久久| 91亚洲精品乱码久久久久久蜜桃| 国产精品影视网| 久久久三级国产网站| 韩国一区二区视频| 欧美国产综合色视频| 国产成人在线观看免费网站| 久久久精品影视| 国产成人在线视频免费播放| 国产精品素人一区二区| 99久久久久免费精品国产| 国产精品毛片久久久久久| 色综合欧美在线视频区| 亚洲激情六月丁香| 欧美日韩不卡一区| 精品亚洲aⅴ乱码一区二区三区| 久久综合九色综合97_久久久| 国产不卡视频在线观看| 亚洲黄色录像片| 在线不卡中文字幕播放| 激情伊人五月天久久综合| 久久精品欧美一区二区三区不卡| 国产成人午夜高潮毛片| 亚洲在线视频免费观看| 91精品国产综合久久福利软件 | 欧洲一区二区三区在线| 一级中文字幕一区二区| 91精品一区二区三区在线观看| 麻豆成人综合网| 亚洲色图在线播放| 7777精品伊人久久久大香线蕉的| 精品系列免费在线观看| 亚洲精品国产一区二区三区四区在线| 91精品国产综合久久精品| 国产精品18久久久久久久久| 亚洲色图20p| 日韩午夜小视频| 成人av电影在线观看| 天天影视网天天综合色在线播放| 日韩欧美国产系列| 91麻豆国产精品久久| 久久99国产精品免费| 亚洲精品欧美激情| 国产亚洲精品aa午夜观看| 在线免费视频一区二区| 国产成都精品91一区二区三| 午夜电影一区二区| 亚洲天堂a在线| 精品乱人伦小说| 欧美日韩国产三级| jlzzjlzz欧美大全| 国产一区二区三区美女| 五月天中文字幕一区二区| 国产精品成人网| 精品国产91乱码一区二区三区| 欧美午夜精品一区二区三区| 国产精品乡下勾搭老头1| 欧美bbbbb| 日韩经典中文字幕一区| 亚洲黄色免费网站| 国产精品女主播av| 国产欧美视频一区二区三区| 在线成人av影院| 欧美日韩在线播放三区| 本田岬高潮一区二区三区| 久久国产婷婷国产香蕉| 五月天久久比比资源色| 亚洲一区视频在线| 亚洲免费在线播放| 国产三级欧美三级| 国产亚洲成年网址在线观看| 日韩一级片在线观看| 欧美久久久久久久久| 在线观看91视频| 欧美日韩一区二区不卡| 色猫猫国产区一区二在线视频| 99久久久精品免费观看国产蜜| 国产精品小仙女| 国产jizzjizz一区二区| 高清国产午夜精品久久久久久| 久久精品国产色蜜蜜麻豆| 麻豆精品在线播放| 久久99精品久久久| 国产一区二区三区高清播放| 国产毛片一区二区| 国产精品123| a亚洲天堂av| 色哟哟国产精品| 在线看日韩精品电影| 欧美亚洲综合一区| 欧美理论片在线| 日韩欧美一二区| 久久综合精品国产一区二区三区| 欧美一区二区福利视频| 欧美视频完全免费看| 日韩午夜三级在线| 久久色成人在线| 国产精品三级av在线播放| 自拍偷拍国产精品| 亚洲电影欧美电影有声小说| 男男视频亚洲欧美| 狠狠色丁香久久婷婷综合丁香| 国产在线麻豆精品观看| av高清不卡在线| 欧美日韩国产一级二级| 日韩精品中文字幕在线一区| 久久一夜天堂av一区二区三区| 国产精品美日韩| 亚洲v中文字幕| 亚洲综合免费观看高清完整版| 亚洲日本一区二区| 午夜欧美2019年伦理| 久久精品国产久精国产| 久久精品国产**网站演员| 成人午夜看片网址| 99久久精品国产一区| 欧美精品亚洲一区二区在线播放| 久久久久久免费毛片精品| 亚洲精品国产第一综合99久久| 日韩国产在线观看一区| 国产·精品毛片| 欧美猛男超大videosgay| 国产日本一区二区| 视频一区二区三区在线| 风间由美性色一区二区三区| 欧美日韩一区二区三区视频| 精品日韩在线观看| 一级中文字幕一区二区| 国产精品一区二区免费不卡 | 亚洲国产日韩精品| 久久国产生活片100| 99久久777色| 制服丝袜成人动漫| **网站欧美大片在线观看| 免费在线观看精品| 在线亚洲+欧美+日本专区| 国产偷v国产偷v亚洲高清| 视频一区中文字幕国产| 99vv1com这只有精品| 久久综合一区二区| 日韩国产精品久久久| 欧美熟乱第一页| 最新高清无码专区| 国产精品18久久久久久vr| 欧美日韩国产色站一区二区三区| 亚洲色欲色欲www在线观看| 国产精品一区二区三区99| 日韩欧美国产一区二区在线播放| 亚洲综合在线观看视频|