Implements a sample synchronous GHS algorithm.