Oscillation of a frictionless mass-spring system