Check out the new USENIX Web site. next up previous
Next: Filter-specific memory array Up: Buffer management Previous: Slow reader preference.

Fast reader preference.

FRP is a departure from the `traditional' way of dealing with buffer overflow. In FRP mode, FFPF keeps writing packets, regardless of the status of the readers, and it is the reader's responsibility to keep up. An application that fails to keep up may have older but still unread data overwritten by new packets. In this case, \ensuremath{R} is of no concern to FFPF and used only by the application. The idea is that applications check after they processed a set of packets, whether or not these packets were overwritten in the meantime (and hence whether the application should consider them lost after all). For this purpose, FFPF keeps a memory mapped wrap counter that is incremented each time \ensuremath{W} `wraps' to zero. Using the counter, applications can check themselves whether the current value of \ensuremath{W} is greater than their value of \ensuremath{R} and thus whether the packets they just accessed were valid.

Suppose an application is about to access a set of 100 packets when the values of \ensuremath{R}, \ensuremath{W} and wrap counter are 50, 400, and 10, respectively. When the application has finished processing, it again checks these values and now finds that \ensuremath{W} is 450, while the wrap counter is 11. In other words, the writing process has wrapped and overwritten all packets that were just processed. The application will count these packets as dropped. Note that as a result the drop rate in a group may vary from application to application. It should be mentioned that FRP is not necessarily more efficient in terms of the total processing that is required for buffer management. Rather, it distributes this computation to the applications themselves, removing the dependencies between readers that exist in a centralised solution.


next up previous
Next: Filter-specific memory array Up: Buffer management Previous: Slow reader preference.
Herbert Bos 2004-10-06