<s>
Fair	B-Algorithm
queuing	I-Algorithm
is	O
a	O
family	O
of	O
scheduling	O
algorithms	O
used	O
in	O
some	O
process	O
and	O
network	B-Application
schedulers	I-Application
.	O
</s>
<s>
The	O
algorithm	O
is	O
designed	O
to	O
achieve	O
fairness	B-Protocol
when	O
a	O
limited	O
resource	O
is	O
shared	O
,	O
for	O
example	O
to	O
prevent	O
flows	O
with	O
large	O
packets	O
or	O
processes	O
that	O
generate	O
small	O
jobs	O
from	O
consuming	O
more	O
throughput	O
or	O
CPU	O
time	O
than	O
other	O
flows	O
or	O
processes	O
.	O
</s>
<s>
Fair	B-Algorithm
queuing	I-Algorithm
is	O
implemented	O
in	O
some	O
advanced	O
network	B-Protocol
switches	I-Protocol
and	O
routers	B-Protocol
.	O
</s>
<s>
The	O
term	O
fair	B-Algorithm
queuing	I-Algorithm
was	O
coined	O
by	O
John	O
Nagle	O
in	O
1985	O
while	O
proposing	O
round-robin	B-Algorithm
scheduling	I-Algorithm
in	O
the	O
gateway	O
between	O
a	O
local	B-General_Concept
area	I-General_Concept
network	I-General_Concept
and	O
the	O
internet	O
to	O
reduce	O
network	O
disruption	O
from	O
badly-behaving	O
hosts	O
.	O
</s>
<s>
A	O
byte-weighted	O
version	O
was	O
proposed	O
by	O
Alan	O
Demers	O
,	O
Srinivasan	O
Keshav	O
and	O
Scott	O
Shenker	O
in	O
1989	O
,	O
and	O
was	O
based	O
on	O
the	O
earlier	O
Nagle	O
fair	B-Algorithm
queuing	I-Algorithm
algorithm	O
.	O
</s>
<s>
The	O
concept	O
has	O
been	O
further	O
developed	O
into	O
weighted	B-Algorithm
fair	I-Algorithm
queuing	I-Algorithm
,	O
and	O
the	O
more	O
general	O
concept	O
of	O
traffic	O
shaping	O
,	O
where	O
queuing	O
priorities	O
are	O
dynamically	O
controlled	O
to	O
achieve	O
desired	O
flow	O
quality	O
of	O
service	O
goals	O
or	O
accelerate	O
some	O
flows	O
.	O
</s>
<s>
Fair	B-Algorithm
queuing	I-Algorithm
uses	O
one	O
queue	O
per	O
packet	B-Operating_System
flow	I-Operating_System
and	O
services	O
them	O
in	O
rotation	O
,	O
such	O
that	O
each	O
flow	O
can	O
"	O
obtain	O
an	O
equal	O
fraction	O
of	O
the	O
resources	O
"	O
.	O
</s>
<s>
The	O
advantage	O
over	O
conventional	O
first	B-Operating_System
in	I-Operating_System
first	I-Operating_System
out	I-Operating_System
(	O
FIFO	B-Operating_System
)	O
or	O
priority	B-Application
queuing	I-Application
is	O
that	O
a	O
high-data-rate	O
flow	O
,	O
consisting	O
of	O
large	O
packets	O
or	O
many	O
data	O
packets	O
,	O
cannot	O
take	O
more	O
than	O
its	O
fair	O
share	O
of	O
the	O
link	O
capacity	O
.	O
</s>
<s>
Fair	B-Algorithm
queuing	I-Algorithm
is	O
used	O
in	O
routers	B-Protocol
,	O
switches	O
,	O
and	O
statistical	O
multiplexers	O
that	O
forward	O
packets	O
from	O
a	O
buffer	B-General_Concept
.	O
</s>
<s>
The	O
buffer	B-General_Concept
works	O
as	O
a	O
queuing	O
system	O
,	O
where	O
the	O
data	O
packets	O
are	O
stored	O
temporarily	O
until	O
they	O
are	O
transmitted	O
.	O
</s>
<s>
In	O
the	O
context	O
of	O
network	B-Application
scheduling	I-Application
,	O
fairness	B-Protocol
has	O
multiple	O
definitions	O
.	O
</s>
<s>
Nagel	O
's	O
article	O
uses	O
round-robin	B-Algorithm
scheduling	I-Algorithm
of	O
packets	O
,	O
which	O
is	O
fair	O
in	O
terms	O
of	O
the	O
number	O
of	O
packets	O
,	O
but	O
not	O
on	O
the	O
bandwidth	O
use	O
when	O
packets	O
have	O
varying	O
size	O
.	O
</s>
<s>
Several	O
formal	O
notions	O
of	O
fairness	B-Protocol
measure	I-Protocol
have	O
been	O
defined	O
including	O
max-min	B-Algorithm
fairness	I-Algorithm
,	O
worst-case	O
fairness	B-Protocol
,	O
and	O
fairness	B-Protocol
index	I-Protocol
.	O
</s>
<s>
A	O
natural	O
extension	O
consists	O
in	O
letting	O
the	O
user	O
specify	O
the	O
portion	O
of	O
bandwidth	O
allocated	O
to	O
each	O
flow	O
leading	O
to	O
weighted	B-Algorithm
fair	I-Algorithm
queuing	I-Algorithm
and	O
generalized	B-Algorithm
processor	I-Algorithm
sharing	I-Algorithm
.	O
</s>
<s>
This	O
algorithm	O
attempts	O
to	O
emulate	O
the	O
fairness	B-Protocol
of	O
bitwise	O
round-robin	O
sharing	O
of	O
link	O
resources	O
among	O
competing	O
flows	O
.	O
</s>
<s>
With	O
a	O
virtual	O
finishing	O
time	O
of	O
all	O
candidate	O
packets	O
(	O
i.e.	O
,	O
the	O
packets	O
at	O
the	O
head	O
of	O
all	O
non-empty	O
flow	O
queues	O
)	O
computed	O
,	O
fair	B-Algorithm
queuing	I-Algorithm
compares	O
the	O
virtual	O
finishing	O
time	O
and	O
selects	O
the	O
minimum	O
one	O
.	O
</s>
