Tight approximations for resource constrained scheduling and bin packing