Resource Analysis of Distributed Systems