Diffusion takes place when gas molecules disperse throughout a container. Effusion takes place when a gas passes through an opening that is smaller than the mean free path of the particles, that is, the average distance traveled between collisions.