?? checkdiskqueue_hrrn.m
字號:
function [QDisk,QReady]=CheckDiskQueue_HRRN(QDisk,QReady,Qlen,GlobalCycle,TB,EndTime)
%disp('=========CheckDiskQueue_HRRN================');
QDisk=sortrows(QDisk,2);
i=1;
flag=0; %whether move p from QDisk to QReady
% fprintf('before checking(Time is %d)',GlobalCycle);
% QDisk
% QReady
while i<=Qlen
if QDisk(i,2)<=GlobalCycle %if there is a empty element the QDisk(i,2)=Endtime+100>GlobalCycle
BeginToWaitTime=QDisk(i,2); %should be save before Out put
[QDisk,p]=OutQueue2(QDisk,Qlen,EndTime+100,'D');
[QReady,pos]=InQueue3HRRN(p,BeginToWaitTime,TB(p),QReady,Qlen,'R'); %Only for HRRN
% fprintf('Move the p%d from the QDisk to QReady\n',p);
flag=1;
end
i=i+1;
end
if flag==0
% disp('Nothing to move from QDisk');
end
% disp('-----After Check..---');
% QReady
%disp('after checking');
% QDisk
% QReady
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -