  We give an upper bound on the codimension in $M_{g,1}$ of the variety
$M^S_{g,1}$ of marked curves $(C,p)$ with a given Weierstrass semigroup. The
bound is a combinatorial quantity which we call the effective weight of the
semigroup; it is a refinement of the weight of the semigroup, and differs from
it precisely when the semigroup is not primitive. We prove that whenever the
effective weight is less than g, the variety $M^S_{g,1}$ is nonempty and has a
component of the predicted codimension. These results extend previous results
of Eisenbud, Harris, and Komeda to the case of non-primitive semigroups. We
also survey other cases where the codimension of $M^S_{g,1}$ is known, as
evidence that the effective weight estimate is correct in much wider
circumstances.
