Buffer-space efficient and deadlock-free scheduling of stream applications on multi-core architectures