Two blocks of masses $m$ and $2 m$ are connected by a light string passing over a frictionless pulley. As shown in the figure, the mass $m$ is placed on a smooth inclined plane of inclination $30^{\circ}$ and $2 \mathrm{~m}$ hangs vertically. If the system is released, the blocks move with an acceleration equal to
(a) $\frac{g}{4}$
(b) $\frac{g}{3}$
(c) $\frac{g}{2}$
(d) $g$