|
Algorithm 1 A M-Level contention window tuning algorithm with a minimum tuning rate of γ. |
Initialization
-
1:
, , k;
-
2:
, , ;
-
3:
for
do
-
4:
;
-
5:
;
-
6:
end for
Algorithm Body
-
1:
while 1 do
-
2:
if detecting an idle slot then
-
3:
;
-
4:
if the slot is over with idle then
-
5:
;
-
6:
end if
-
7:
end if
-
8:
end while
-
9:
while 1 do
-
10:
if before generating a new backoff period then
-
11:
if
then
-
12:
for
do
-
13:
if
then
-
14:
;
-
15:
end if
-
16:
if
then
-
17:
;
-
18:
end if
-
19:
end for
-
20:
, ;
-
21:
end if
-
22:
end if
-
23:
end while
|