Foundations of computer science IV, distributed systems