A construct called a mediator is described. Mediators support synchronization and scheduling for systems programming within distributed systems. Mediators are based on a resource view of systems, and fit within a programming methodology that emphasizes resource modularity, synchronization modularity and encapsulated concurrency. The authors examine other existing synchronization mechanisms in the light of modular programming requirements. A sample syntax and semantics for mediators is presented with many examples. The mediator includes many interesting features. These include: an adaptation of guarded commands; keys that allow requests to be examined and manipulated before they receive service; parallel guard execution; and coupled and uncoupled modes of service execution.