<s>
AQuoSA	B-Application
(	O
Adaptive	O
Quality	O
of	O
Service	O
Architecture	O
)	O
is	O
an	O
open	B-Architecture
architecture	I-Architecture
for	O
the	O
provisioning	O
of	O
adaptive	O
Quality	O
of	O
Service	O
functionality	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
The	O
project	O
features	O
a	O
flexible	O
,	O
portable	O
,	O
lightweight	O
and	O
open	B-Architecture
architecture	I-Architecture
for	O
supporting	O
QoS	O
related	O
services	O
on	O
the	O
top	O
of	O
a	O
general-purpose	B-General_Concept
operating	I-General_Concept
system	I-General_Concept
as	O
Linux	B-Application
.	O
</s>
<s>
A	O
key	O
feature	O
of	O
AQuoSA	B-Application
is	O
the	O
Resource	O
Reservation	O
layer	O
that	O
is	O
capable	O
of	O
dynamically	O
adapting	O
the	O
CPU	B-General_Concept
allocation	O
for	O
QoS	O
aware	O
applications	O
based	O
on	O
their	O
run-time	B-Library
requirements	O
.	O
</s>
<s>
In	O
order	O
to	O
provide	O
such	O
functionality	O
,	O
AQuoSA	B-Application
embeds	O
a	O
kernel-level	O
CPU	B-General_Concept
scheduler	O
implementing	O
a	O
resource	O
reservation	O
mechanism	O
for	O
the	O
CPU	B-General_Concept
based	O
on	O
Earliest	O
Deadline	O
First	O
(	O
EDF	O
)	O
.	O
</s>
<s>
This	O
gives	O
the	O
ability	O
to	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
to	O
realize	O
(	O
partially	O
)	O
temporal	B-General_Concept
isolation	I-General_Concept
among	O
the	O
tasks	O
running	O
within	O
the	O
system	O
.	O
</s>
<s>
AQuoSA	B-Application
is	O
one	O
of	O
a	O
few	O
projects	O
that	O
provides	O
real-time	B-General_Concept
scheduling	O
capabilities	O
to	O
unprivileged	O
users	O
on	O
a	O
multi-user	O
system	O
in	O
a	O
controlled	O
way	O
,	O
by	O
means	O
of	O
a	O
properly	O
designed	O
access-control	O
model	O
.	O
</s>
<s>
At	O
the	O
lowest	O
level	O
,	O
a	O
patch	O
to	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
adds	O
the	O
ability	O
to	O
notify	O
to	O
dynamically	O
loaded	O
modules	B-Application
any	O
relevant	O
scheduling	O
event	O
.	O
</s>
<s>
This	O
patch	O
is	O
minimally	O
invasive	O
,	O
in	O
that	O
it	O
consists	O
of	O
a	O
few	O
lines	O
of	O
code	O
properly	O
inserted	O
mainly	O
within	O
the	O
Linux	B-Application
scheduler	O
code	O
(	O
sched.c	O
)	O
.	O
</s>
<s>
The	O
core	O
component	O
is	O
a	O
dynamically	O
loadable	B-Application
kernel	I-Application
module	I-Application
that	O
implements	O
a	O
Resource	O
Reservations	O
scheduling	O
paradigm	O
for	O
the	O
CPU	B-General_Concept
,	O
by	O
exploiting	O
functionality	O
introduced	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
through	O
the	O
Generic	O
Scheduler	O
Patch	O
.	O
</s>
<s>
Second	O
,	O
a	O
user-level	O
library	O
(	O
QRES	O
library	O
)	O
allows	O
an	O
application	O
to	O
use	O
the	O
new	O
scheduling	O
policy	O
through	O
a	O
complete	O
and	O
well-designed	O
set	O
of	O
API	B-Application
calls	O
.	O
</s>
<s>
Essentially	O
,	O
these	O
calls	O
allow	O
an	O
application	O
to	O
ask	O
the	O
system	O
to	O
reserve	O
a	O
certain	O
percentage	O
of	O
the	O
CPU	B-General_Concept
to	O
their	O
processes	O
.	O
</s>
<s>
Third	O
,	O
a	O
kernel-level	O
component	O
(	O
the	O
Supervisor	O
)	O
mediates	O
all	O
requests	O
made	O
by	O
the	O
applications	O
through	O
the	O
QRES	O
library	O
,	O
so	O
that	O
the	O
total	O
sum	O
of	O
the	O
requested	O
CPU	B-General_Concept
shares	O
does	O
not	O
violate	O
the	O
schedulability	O
condition	O
of	O
the	O
scheduler	O
(	O
less	O
than	O
one	O
,	O
or	O
slightly	O
less	O
than	O
one	O
,	O
due	O
to	O
overhead	O
)	O
.	O
</s>
<s>
The	O
supervisor	O
behaviour	O
is	O
completely	O
configurable	O
by	O
the	O
system	O
administrator	O
,	O
so	O
that	O
it	O
is	O
possible	O
to	O
specify	O
,	O
on	O
a	O
per-user/per	O
-group	O
basis	O
,	O
minimum	O
guaranteed	O
and	O
maximum	O
allowed	O
values	O
for	O
the	O
reservations	O
made	O
on	O
the	O
CPU	B-General_Concept
.	O
</s>
<s>
With	O
AQuoSA	B-Application
,	O
applications	O
may	O
use	O
directly	O
the	O
Resource	O
Reservation	O
layer	O
,	O
which	O
allows	O
them	O
to	O
reserve	O
a	O
fraction	O
of	O
the	O
CPU	B-General_Concept
,	O
so	O
to	O
run	O
with	O
the	O
required	O
scheduling	O
guarantees	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
multimedia	O
application	O
may	O
ask	O
the	O
operating	B-General_Concept
system	I-General_Concept
to	O
run	O
the	O
application	O
with	O
the	O
guarantee	O
of	O
being	O
scheduled	O
at	O
least	O
for	O
Q	O
milliseconds	O
every	O
P	O
milliseconds	O
,	O
where	O
Q	O
and	O
P	O
depend	O
on	O
the	O
nature	O
of	O
the	O
application	O
.	O
</s>
<s>
it	O
allows	O
a	O
new	O
application	O
in	O
only	O
if	O
,	O
after	O
the	O
addition	O
of	O
it	O
,	O
the	O
new	O
set	O
of	O
running	O
applications	O
does	O
not	O
overcome	O
the	O
CPU	B-General_Concept
saturation	O
limit	O
.	O
</s>
<s>
For	O
typical	O
multimedia	O
application	O
making	O
use	O
of	O
high	O
compression	O
technologies	O
,	O
it	O
may	O
be	O
quite	O
difficult	O
,	O
impractical	O
or	O
inconvenient	O
to	O
run	O
such	O
applications	O
with	O
a	O
fixed	O
reservation	O
on	O
the	O
CPU	B-General_Concept
.	O
</s>
<s>
Traditional	O
real-time	B-General_Concept
systems	I-General_Concept
make	O
use	O
of	O
WCET	B-General_Concept
(	O
Worst	B-General_Concept
Case	I-General_Concept
Execution	I-General_Concept
Time	I-General_Concept
)	O
analysis	O
techniques	O
in	O
order	O
to	O
compute	O
what	O
is	O
the	O
maximum	O
time	O
an	O
instance	O
of	O
,	O
for	O
example	O
,	O
a	O
periodic	O
task	O
may	O
execute	O
on	O
the	O
CPU	B-General_Concept
before	O
blocking	O
waiting	O
for	O
the	O
next	O
instance	O
.	O
</s>
<s>
Such	O
analysis	O
is	O
very	O
difficult	O
in	O
today	O
's	O
complex	O
multimedia	O
applications	O
,	O
especially	O
when	O
running	O
on	O
general-purpose	O
hardware	O
like	O
standard	O
PCs	O
,	O
where	O
technologies	O
like	O
multi-level	O
caches	O
,	O
CPU	B-General_Concept
execution	O
pipelines	O
,	O
on-bus	O
buffers	O
,	O
multi-master	O
buses	O
,	O
introduce	O
many	O
unpredictable	O
variables	O
in	O
determining	O
the	O
time	O
required	O
for	O
memory	O
accesses	O
.	O
</s>
<s>
Otherwise	O
,	O
the	O
system	O
may	O
be	O
significantly	O
under-utilized	O
during	O
runtime	B-Library
.	O
</s>
<s>
As	O
already	O
mentioned	O
,	O
for	O
certain	O
classes	O
of	O
multimedia	O
applications	O
,	O
such	O
as	O
a	O
video	O
player	O
,	O
it	O
is	O
quite	O
impossible	O
to	O
find	O
an	O
appropriate	O
fixed	O
value	O
for	O
the	O
fraction	O
of	O
CPU	B-General_Concept
required	O
by	O
the	O
application	O
at	O
run-time	B-Library
,	O
due	O
to	O
the	O
heavy	O
fluctuations	O
of	O
the	O
load	O
depending	O
on	O
the	O
actual	O
data	O
that	O
is	O
being	O
processed	O
by	O
the	O
application	O
.	O
</s>
<s>
A	O
fixed	O
reservation	O
based	O
on	O
the	O
average	O
requirements	O
,	O
or	O
slightly	O
greater	O
than	O
that	O
,	O
results	O
in	O
transient	O
periods	O
of	O
poor	O
quality	O
during	O
runtime	B-Library
(	O
e.g.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
a	O
fixed	O
reservation	O
based	O
on	O
the	O
maximum	O
expected	O
load	O
results	O
in	O
an	O
unneeded	O
over-reservation	O
of	O
the	O
CPU	B-General_Concept
for	O
most	O
of	O
the	O
time	O
,	O
except	O
the	O
periods	O
in	O
which	O
the	O
load	O
really	O
approaches	O
the	O
maximum	O
expected	O
value	O
.	O
</s>
<s>
For	O
these	O
classes	O
of	O
applications	O
,	O
it	O
is	O
much	O
more	O
convenient	O
to	O
use	O
the	O
Adaptive	O
Reservation	O
techniques	O
,	O
like	O
the	O
ones	O
provided	O
by	O
the	O
Adaptive	O
Reservation	O
layer	O
of	O
AQuoSA	B-Application
,	O
that	O
performs	O
a	O
continuous	O
on-line	O
monitoring	O
of	O
the	O
computational	O
requirements	O
of	O
the	O
application	O
processes	O
,	O
so	O
that	O
it	O
may	O
dynamically	O
adapt	O
the	O
reservation	O
made	O
on	O
the	O
CPU	B-General_Concept
depending	O
on	O
the	O
monitored	O
data	O
.	O
</s>
<s>
The	O
Adaptive	O
Reservation	O
layer	O
exposes	O
to	O
applications	O
an	O
API	B-Application
for	O
using	O
a	O
set	O
of	O
controllers	O
which	O
are	O
of	O
quite	O
general	O
use	O
within	O
a	O
wide	O
set	O
of	O
multimedia	O
applications	O
.	O
</s>
<s>
Most	O
real-time	B-General_Concept
variations	O
of	O
Linux	B-Application
require	O
users	O
of	O
real-time	B-General_Concept
capabilities	O
of	O
the	O
modified	O
OS	O
to	O
have	O
root	O
privileges	O
on	O
the	O
system	O
.	O
</s>
<s>
However	O
,	O
this	O
is	O
excessive	O
for	O
multi-user	O
systems	O
where	O
real-time	B-General_Concept
scheduling	O
features	O
are	O
needed	O
for	O
multimedia	O
applications	O
or	O
similar	O
.	O
</s>
<s>
Therefore	O
,	O
AQuoSA	B-Application
embeds	O
a	O
dedicated	O
access-control	O
model	O
by	O
which	O
system	O
administrators	O
can	O
:	O
</s>
<s>
define	O
real-time	B-General_Concept
scheduling	O
quotas	O
to	O
individual	O
users	O
or	O
groups	O
,	O
in	O
terms	O
of	O
maximum	O
values	O
for	O
the	O
minimum	O
guaranteed	O
bandwidth	O
that	O
the	O
OS	O
can	O
grant	O
to	O
individual	O
users	O
or	O
groups	O
as	O
a	O
whole	O
;	O
</s>
<s>
control	O
the	O
maximum	O
scheduling	O
overhead	O
that	O
can	O
be	O
imposed	O
on	O
the	O
system	O
as	O
due	O
to	O
real-time	B-General_Concept
reservations	O
created	O
by	O
individual	O
users	O
or	O
groups	O
;	O
for	O
example	O
,	O
allowing	O
to	O
control	O
what	O
is	O
the	O
minimum	O
period	O
that	O
can	O
be	O
specified	O
in	O
a	O
real-time	B-General_Concept
reservation	O
.	O
</s>
