<s>
ALTQ	B-Algorithm
(	O
ALTernate	O
Queueing	O
)	O
is	O
the	O
network	B-Application
scheduler	I-Application
for	O
Berkeley	B-Operating_System
Software	I-Operating_System
Distribution	I-Operating_System
.	O
</s>
<s>
ALTQ	B-Algorithm
provides	O
queueing	B-Application
disciplines	I-Application
,	O
and	O
other	O
components	O
related	O
to	O
quality	O
of	O
service	O
(	O
QoS	O
)	O
,	O
required	O
to	O
realize	O
resource	O
sharing	O
.	O
</s>
<s>
It	O
is	O
most	O
commonly	O
implemented	O
on	O
BSD-based	O
routers	B-Protocol
.	O
</s>
<s>
ALTQ	B-Algorithm
is	O
included	O
in	O
the	O
base	O
distribution	O
of	O
FreeBSD	B-Operating_System
,	O
NetBSD	B-Device
,	O
and	O
DragonFly	B-Application
BSD	I-Application
,	O
and	O
was	O
integrated	O
into	O
the	O
pf	B-Protocol
packet	B-Protocol
filter	I-Protocol
of	O
OpenBSD	B-Operating_System
but	O
later	O
replaced	O
by	O
a	O
new	O
queueing	O
subsystem	O
(	O
it	O
was	O
deprecated	O
with	O
OpenBSD	B-Operating_System
5.5	O
release	O
,	O
and	O
completely	O
removed	O
with	O
5.6	O
in	O
2014	O
)	O
.	O
</s>
<s>
With	O
ALTQ	B-Algorithm
,	O
packets	B-Protocol
can	O
be	O
assigned	O
to	O
queues	B-Application
for	O
the	O
purpose	O
of	O
bandwidth	O
control	O
.	O
</s>
<s>
The	O
scheduler	O
defines	O
the	O
algorithm	O
used	O
to	O
decide	O
which	O
packets	B-Protocol
get	O
delayed	O
,	O
dropped	O
or	O
sent	O
out	O
immediately	O
.	O
</s>
<s>
There	O
are	O
five	O
schedulers	O
currently	O
supported	O
in	O
the	O
FreeBSD	B-Operating_System
implementation	O
of	O
ALTQ	B-Algorithm
:	O
</s>
<s>
Queues	B-Application
attached	O
to	O
an	O
interface	B-Protocol
build	O
a	O
tree	B-Application
,	O
thus	O
each	O
queue	B-Application
can	O
have	O
further	O
child	O
queues	B-Application
.	O
</s>
<s>
Each	O
queue	B-Application
can	O
have	O
a	O
priority	O
and	O
a	O
bandwidth	O
assigned	O
.	O
</s>
<s>
Priority	O
mainly	O
controls	O
the	O
time	O
packets	B-Protocol
take	O
to	O
get	O
sent	O
out	O
,	O
while	O
bandwidth	O
has	O
primarily	O
effects	O
on	O
throughput	O
.	O
</s>
<s>
—	O
Hierarchical	B-Algorithm
Fair	I-Algorithm
Service	I-Algorithm
Curve	I-Algorithm
.	O
</s>
<s>
Queues	B-Application
attached	O
to	O
an	O
interface	B-Protocol
build	O
a	O
tree	B-Application
,	O
thus	O
each	O
queue	B-Application
can	O
have	O
further	O
child	O
queues	B-Application
.	O
</s>
<s>
Each	O
queue	B-Application
can	O
have	O
a	O
priority	O
and	O
a	O
bandwidth	O
assigned	O
.	O
</s>
<s>
Priority	O
mainly	O
controls	O
the	O
time	O
packets	B-Protocol
take	O
to	O
get	O
sent	O
out	O
,	O
while	O
bandwidth	O
has	O
primarily	O
effects	O
on	O
throughput	O
.	O
</s>
<s>
Queues	B-Application
are	O
flat	O
attached	O
to	O
the	O
interface	B-Protocol
,	O
thus	O
,	O
queues	B-Application
cannot	O
have	O
further	O
child	O
queues	B-Application
.	O
</s>
<s>
Each	O
queue	B-Application
has	O
a	O
unique	O
priority	O
assigned	O
,	O
ranging	O
from	O
0	O
to	O
15	O
.	O
</s>
<s>
Packets	B-Protocol
in	O
the	O
queue	B-Application
with	O
the	O
highest	O
priority	O
are	O
processed	O
first	O
.	O
</s>
