Determining Global Snapshots in a Distributed System