對(duì)于給定的一組進(jìn)程,采用優(yōu)先級(jí)加時(shí)間片輪轉(zhuǎn)法進(jìn)行調(diào)度。設(shè)有一個(gè)就緒隊(duì)列,就緒進(jìn)程按優(yōu)先數(shù)(優(yōu)先數(shù)范圍0-100)由小到大排列(優(yōu)先數(shù)越小,級(jí)別越高)。當(dāng)某一進(jìn)程運(yùn)行完一個(gè)時(shí)間片后,其優(yōu)先級(jí)應(yīng)下調(diào)(如優(yōu)先數(shù)加3),試對(duì)如下給定的一組進(jìn)程給出其調(diào)度順序。每當(dāng)結(jié)束一進(jìn)程時(shí)要給出當(dāng)前系統(tǒng)的狀態(tài)(即顯示就緒隊(duì)列)。這里,進(jìn)程可用進(jìn)程控制塊(PCB)表示為如右表所示。
進(jìn)程名 A B C D E F G H J K L M
到達(dá)時(shí)間 0 1 2 3 6 8 12 12 12 18 25 25
服務(wù)時(shí)間 6 4 10 5 1 2 5 10 4 3 15 8
采用3D Bresenham算法在兩點(diǎn)間劃一直線
% This program is ported to MATLAB from:
% B.Pendleton. line3d - 3D Bresenham s (a 3D line drawing algorithm)
% ftp://ftp.isc.org/pub/usenet/comp.sources.unix/volume26/line3d, 1992
%
% Which is referenced by:
% Fischer, J., A. del Rio (2004). A Fast Method for Applying Rigid
% Transformations to Volume Data, WSCG2004 Conference.
% http://wscg.zcu.cz/wscg2004/Papers_2004_Short/M19.pdf