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

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

?? spacesharedwithfailure.java

?? 中間件開發詳細說明:清華大學J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會員下載此源碼] [成為VIP會
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
        // Find in EXEC List first        int found = super.findGridlet(gridletInExecList_, gridletId, userId);        if (found >= 0)        {            // updates all the Gridlets first before pausing            updateGridletProcessing();            // Removes the Gridlet from the execution list            ResGridlet rgl = (ResGridlet) gridletInExecList_.remove(found);            // if a Gridlet is finished upon cancelling, then set it to success            // instead.            if (rgl.getRemainingGridletLength() == 0.0)            {                found = -1;  // meaning not found in Queue List                gridletFinish(rgl, Gridlet.SUCCESS);                System.out.println(super.resName_                        + ".SpaceSharedWithFailure.gridletPause(): Cannot pause"                        + " Gridlet #" + gridletId + " for User #" + userId                        + " since it has FINISHED.");            }            else            {                status = true;                rgl.setGridletStatus(Gridlet.PAUSED);  // change the status                gridletPausedList_.add(rgl);   // add into the paused list                // Set the PE on which Gridlet finished to FREE                super.resource_.setStatusPE( PE.FREE, rgl.getMachineID(),                                             rgl.getPEID() );                // empty slot is available, hence process a new Gridlet                allocateQueueGridlet();            }        }        else {      // Find in QUEUE list            found = super.findGridlet(gridletQueueList_, gridletId, userId);        }        // if found in the Queue List        if (status == false && found >= 0)        {            status = true;            // removes the Gridlet from the Queue list            ResGridlet rgl = (ResGridlet) gridletQueueList_.remove(found);            rgl.setGridletStatus(Gridlet.PAUSED);   // change the status            gridletPausedList_.add(rgl);            // add into the paused list        }        // if not found anywhere in both exec and paused lists        else if (found == -1)        {            System.out.println(super.resName_ +                    ".SpaceSharedWithFailure.gridletPause(): Error - cannot " +                    "find Gridlet #" + gridletId + " for User #" + userId);        }        // sends back an ack if required        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)    {        // cancels the Gridlet        ResGridlet rgl = cancel(gridletId, userId);        // if the Gridlet is not found        if (rgl == null)        {            System.out.println(super.resName_ +                       ".SpaceSharedWithFailure.gridletMove(): Cannot find " +                       "Gridlet #" + gridletId + " for User #" + userId);            if (ack == true)   // sends back an ack if required            {                super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false,                              gridletId, userId);            }            return;        }        // if the Gridlet has finished beforehand        if (rgl.getGridletStatus() == Gridlet.SUCCESS)        {            System.out.println(super.resName_                + ".SpaceSharedWithFailure.gridletMove(): Cannot move Gridlet #"                + gridletId + " for User #"+ userId+ " since it has FINISHED.");            if (ack == true) // sends back an ack if required            {                super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, false,                              gridletId, userId);            }            gridletFinish(rgl, Gridlet.SUCCESS);        }        else   // otherwise moves this Gridlet to a different GridResource        {            rgl.finalizeGridlet();            // Set PE on which Gridlet finished to FREE            super.resource_.setStatusPE( PE.FREE, rgl.getMachineID(),                                         rgl.getPEID() );            super.gridletMigrate(rgl.getGridlet(), destId, ack);            allocateQueueGridlet();        }    }    /**     * 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 status = false;        // finds the Gridlet in the execution list first        int found = super.findGridlet(gridletPausedList_, gridletId, userId);        if (found >= 0)        {            // removes the Gridlet            ResGridlet rgl = (ResGridlet) gridletPausedList_.remove(found);            rgl.setGridletStatus(Gridlet.RESUMED);            // update the Gridlets up to this point in time            updateGridletProcessing();            status = true;            // if there is an available PE slot, then allocate immediately            boolean success = false;            if ( gridletInExecList_.size() < super.totalPE_ ) {                success = allocatePEtoGridlet(rgl);            }            // otherwise put into Queue list            if (success == false)            {                rgl.setGridletStatus(Gridlet.QUEUED);                gridletQueueList_.add(rgl);            }            System.out.println(super.resName_ + "TimeShared.gridletResume():" +                    " Gridlet #" + gridletId + " with User ID #" +                    userId + " has been sucessfully RESUMED.");        }        else        {            System.out.println(super.resName_ +                    "TimeShared.gridletResume(): Cannot find " +                    "Gridlet #" + gridletId + " for User #" + userId);        }        // sends back an ack if required        if (ack == true)        {            super.sendAck(GridSimTags.GRIDLET_RESUME_ACK, status,                          gridletId, userId);        }    }    ///////////////////////////// PRIVATE METHODS /////////////////////    /**     * Allocates the first Gridlet in the Queue list (if any) to execution list     * @pre $none     * @post $none     */    private void allocateQueueGridlet()    {        // if there are many Gridlets in the QUEUE, then allocate a        // PE to the first Gridlet in the list since it follows FCFS        // (First Come First Serve) approach. Then removes the Gridlet from        // the Queue list        if (gridletQueueList_.size() > 0 &&            gridletInExecList_.size() < super.totalPE_)        {            ResGridlet obj = (ResGridlet) gridletQueueList_.get(0);            // allocate the Gridlet into an empty PE slot and remove it from            // the queue list            boolean success = allocatePEtoGridlet(obj);            if (success == true) {                gridletQueueList_.remove(obj);            }        }    }    /**     * 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 Last Update        lastUpdateTime_ = time;        // update the GridResource load        int size = gridletInExecList_.size();        double load = super.calculateTotalLoad(size);        super.addTotalLoad(load);        // if no Gridlets in execution then ignore the rest        if (size == 0) {            return;        }        ResGridlet obj = null;        // a loop that allocates MI share for each Gridlet accordingly        Iterator iter = gridletInExecList_.iterator();        while ( iter.hasNext() )        {            obj = (ResGridlet) iter.next();            // Updates the Gridlet length that is currently being executed            load = getMIShare( timeSpan, obj.getMachineID() );            obj.updateGridletFinishedSoFar(load);        }    }    /**     * Identifies MI share (max and min) each Gridlet gets for     * a given timeSpan     * @param timeSpan     duration     * @param machineId    machine ID that executes this Gridlet     * @return  the total MI share that a Gridlet gets for a given     *          <tt>timeSpan</tt>     * @pre timeSpan >= 0.0     * @pre machineId > 0     * @post $result >= 0.0     */    private double getMIShare(double timeSpan, int machineId)    {        // 1 - localLoad_ = available MI share percentage        double localLoad = super.resCalendar_.getCurrentLoad();        // each Machine might have different PE Rating compare to another        // so much look at which Machine this PE belongs to        double totalMI = machineRating_[machineId] * timeSpan * (1 - localLoad);        return totalMI;    }    /**     * Allocates a Gridlet into a free PE and sets the Gridlet status into     * INEXEC and PE status into busy afterwards     * @param rgl  a ResGridlet object     * @return <tt>true</tt> if there is an empty PE to process this Gridlet,     *         <tt>false</tt> otherwise     * @pre rgl != null     * @post $none     */    private boolean allocatePEtoGridlet(ResGridlet rgl)    {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩午夜在线| 亚洲美女淫视频| 精品国产乱码久久久久久久 | 欧美综合天天夜夜久久| 99久久夜色精品国产网站| 成人永久免费视频| av中文字幕在线不卡| 成人黄色软件下载| 中文字幕一区二区三区在线观看| 六月婷婷色综合| 日本午夜一本久久久综合| 日韩精品成人一区二区三区| 奇米精品一区二区三区四区| 日韩av高清在线观看| 精东粉嫩av免费一区二区三区| 久热成人在线视频| 国产一区日韩二区欧美三区| 国产sm精品调教视频网站| 99久久精品国产观看| 在线亚洲高清视频| 538prom精品视频线放| 欧美成人精品福利| 国产农村妇女精品| 亚洲欧洲日产国码二区| 亚洲综合丁香婷婷六月香| 亚洲国产aⅴ成人精品无吗| 丝袜亚洲另类丝袜在线| 国产一区二区三区观看| 成人av网址在线| 日本久久电影网| 日韩欧美色综合网站| 久久久精品免费免费| 亚洲男人的天堂在线aⅴ视频| 亚洲图片自拍偷拍| 久久av中文字幕片| av激情综合网| 欧美一区二区三级| 国产精品理论在线观看| 亚洲国产三级在线| 国产精品一区免费视频| 92精品国产成人观看免费| 欧美精品久久99| 国产亚洲精品福利| 亚洲电影一级黄| 国产精品1024| 欧美揉bbbbb揉bbbbb| 日本一区免费视频| 婷婷中文字幕一区三区| 高清av一区二区| 欧美精品vⅰdeose4hd| 国产欧美一区二区三区在线看蜜臀| 国产精品成人网| 久久精品久久99精品久久| 99精品久久99久久久久| 日韩一级欧美一级| 亚洲日本va在线观看| 久久99精品久久久| 欧美天天综合网| 国产精品情趣视频| 美女视频一区二区三区| 一本色道久久综合亚洲aⅴ蜜桃| 老司机免费视频一区二区| 99视频在线观看一区三区| 日韩小视频在线观看专区| 亚洲免费在线播放| 国产在线精品一区二区不卡了| 欧美日韩国产首页| 国产精品丝袜黑色高跟| 久久精品国产久精国产| 欧美日韩精品一区二区三区四区 | 国产欧美一区在线| 麻豆精品一二三| 91久久国产综合久久| 国产欧美一区二区精品仙草咪| 偷拍日韩校园综合在线| 91麻豆6部合集magnet| 国产日韩视频一区二区三区| 琪琪一区二区三区| 欧美日韩一区小说| 亚洲欧美激情在线| 成人国产精品免费观看动漫| 精品国产一区二区三区四区四| 午夜视频一区二区三区| 色av综合在线| 1区2区3区欧美| 岛国一区二区在线观看| 精品国产免费久久| 美日韩一区二区| 欧美一区二区在线不卡| 亚洲国产日日夜夜| 偷拍日韩校园综合在线| 在线观看一区二区视频| 自拍偷拍国产精品| 成人国产精品免费| 国产精品美女一区二区在线观看| 国内精品自线一区二区三区视频| 在线综合+亚洲+欧美中文字幕| 亚洲r级在线视频| 欧美色视频在线观看| 亚洲精品免费看| 色噜噜狠狠色综合中国| 亚洲男人天堂av| 在线免费观看成人短视频| 亚洲靠逼com| 欧美综合在线视频| 亚洲va欧美va天堂v国产综合| 在线亚洲高清视频| 日韩精品电影一区亚洲| 日韩欧美一区中文| 久久99久久99小草精品免视看| 日韩美女视频在线| 国产伦精品一区二区三区免费迷| 久久人人超碰精品| 国产xxx精品视频大全| 中文字幕免费不卡在线| 91免费小视频| 亚洲v精品v日韩v欧美v专区| 日韩一级黄色片| 久久精品国产久精国产爱| 国产亚洲欧洲一区高清在线观看| 成人在线综合网站| 亚洲女同一区二区| 欧美日韩精品一二三区| 免费日韩伦理电影| 久久久久久久久久久久电影| 成人黄色av网站在线| 亚洲精品国产无天堂网2021| 欧美片网站yy| 国产自产视频一区二区三区| 中文在线免费一区三区高中清不卡 | 国产麻豆91精品| 中文一区一区三区高中清不卡| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 成人免费电影视频| 亚洲国产综合人成综合网站| 欧美刺激午夜性久久久久久久| 国产精品亚洲成人| 亚洲激情校园春色| 精品国产凹凸成av人导航| a亚洲天堂av| 日韩不卡一区二区三区| 国产亚洲欧美色| 欧美日韩一级片在线观看| 国内精品伊人久久久久av一坑| 国产精品久久久一本精品| 在线不卡免费av| 成人一区二区三区在线观看| 亚洲一卡二卡三卡四卡| 国内精品国产成人| 亚洲欧美日韩一区二区 | 日韩欧美国产wwwww| 成人免费黄色大片| 日韩成人dvd| 亚洲欧美日韩国产另类专区| 日韩欧美高清一区| 91久久久免费一区二区| 韩国精品主播一区二区在线观看 | 国产精品天干天干在观线| 欧美日韩视频在线第一区| 国产在线精品免费av| 亚洲一区二区在线观看视频 | 亚洲国产精品人人做人人爽| 2023国产精品| 欧美日韩一级视频| 国产成人精品影视| 青娱乐精品视频在线| 欧美午夜片在线看| 国产福利一区二区三区视频在线| 亚洲主播在线观看| 中文字幕精品一区二区三区精品| 欧美年轻男男videosbes| av在线播放不卡| 国产一区二区看久久| 日韩国产在线一| 尤物av一区二区| 中国色在线观看另类| 精品国产乱码久久久久久图片| 欧美日韩一区二区三区四区五区| 99久久精品免费看| 国产盗摄女厕一区二区三区| 奇米影视一区二区三区小说| 亚洲综合免费观看高清完整版在线 | 久久久99久久精品欧美| 制服丝袜激情欧洲亚洲| 欧亚一区二区三区| 91蜜桃传媒精品久久久一区二区 | 中文久久乱码一区二区| 精品久久国产字幕高潮| 在线成人高清不卡| 在线免费观看日本欧美| 色哟哟在线观看一区二区三区| 大白屁股一区二区视频| 国产精品一二二区| 激情久久久久久久久久久久久久久久| 五月天网站亚洲| 亚洲成人tv网| 亚洲丶国产丶欧美一区二区三区| 亚洲午夜一区二区三区| 一区二区国产盗摄色噜噜| 一区二区三区四区在线|