Chemiosmosis is one of the processes by which ATP is synthesized. In eukaryotes, it takes place in the mitochondria during cellular respiration and in the chloroplasts during photosynthesis. In prokaryotes, it occurs in the cell membrane.