The extensive use of layering raises important performance issues in Horus. On the one hand, the layering improves performance, since applications can choose the minimal stack for their requirements. Also, because each layer is small and simple, they can easily and effectively be optimized individually. Since Horus is thread-safe, multiple procedure calls into the same layer often have to be synchronized by a lock. To avoid deadlock, it is sometimes necessary to invoke an upcall as a thread.
Layers push their own header onto the message.
For convenience, this header is aligned to a word boundary. This leads to a considerable overhead of unused bits on messages that need be transfered. Also, each pop and push operation has an associated overhead. We believe we could bring this down somewhat by more careful coding, but we are working on more rigorous solutions to each of these problems. For the first problem, we will avoid unnecessary invocations of a layer, skipping layers that take no action on the way down or up.