|
Algorithm 1 Target channel selection. |
-
1:
procedureTrue Prediction(, )
-
2:
for
do
/* existing SUs */
-
3:
/* arrange SUs with respect to RemPkts in lowest to highest order*/
-
4:
end for
-
5:
for
do
-
6:
/* arrange all Channels with respect to prob of idleness in highest to lowest order*/
-
7:
end for
-
8:
for
do
-
9:
/*Channel with jth highest prob of idleness is allotted to SU with jth shortest job*/
-
10:
if
then
-
11:
transmit
/* contention free access as prediction is true*/
-
12:
remove
-
13:
else
goto Procedure False Prediction
-
14:
end if
-
15:
end for
-
16:
end procedure
-
-
17:
SUs unsuccessful in channel access due to false prediction
-
18:
new arriving SUs in the system
-
19:
new arriving SUs in the system
-
20:
procedureFalse Prediction(, , )
-
21:
-
22:
-
23:
begin contention for channel access/* All contenders contend for channel access in random access fashion*/
-
24:
if
then
-
25:
wait
until beginning of next
-
26:
else
-
27:
transmit
on channel accessed successfully during contention
-
28:
end if
-
29:
end procedure
|