The objective of this project is to exercise the concepts of
network control. However, we'll be doing this at the user-level,
perhaps with kernel support. The idea is to enable different classes of
users, or different types of files to be transfered with differnt
priorities, thus yielding different response times for the different
requests. The motivation for such a scheme is that can be used by a
web-enabled service provider that wants to differentiate the different
types of users that it has, and therefore must give different
priorities (at the network level, since this is the important external
metric for the user) for different threads, different users, or
different types of files.
The Apache server can be modified to include a registration procedure,
or you can assume that users can register through a separate (regular)
webpage. That is, you can assume you have a list of the "special" types
of users, to expedite the project outcome.
One idea is to use netnice packet filters to identify the type of
packet that is flowing and use netnice's network control mechanism to
regulate how much data flows out from each Apache child process/thread.
(See
www.cs.pitt.edu/NETNICE or
www.netnice.org
for details.) For this to work, you'll have to install netnice in
your FreeBSD machine and will have to understand how to use netnice for
the network bandwidth control. netnice allows you to choose the type of
scheduler you want to use, so that you can provide some type of
fairness (stronger notion then simply the absence of starvation) among
users.
Another idea is to modify Apache itself to make the coordination among
child processes/threads, so that each process/thread regulates the
amount of network packets it is using. The processes must have some
form of coordination, so that they know what their "share" of the
bandwidth is, and they must implement a packet scheduler that does not
exceed this amount. Notice that this is not CPU scheduling, as the CPU
will do very little processing and limiting the access of a process to
the CPU will not have much effect in the overall response time of the
processes.
You will have to test your program against a (real or synthetic)
workload; a good start is traces that exist in the 'net, or a synthetic
workload generator, such as WebStone. Alternatively, you may want to
come up with your own workload generator and keep the files that will
be transfered in the same location as your new Apache server.