As far as I know, osmosis occurs in Eukaryotic cells, and I'm wondering if it could take place in prokaryotic cells too.
Osmosis works across every cell membrane along a concentration gradient as its a physico-chemical principle. Water can cross the membrane (or cell wall), while the substance dissolved in it (for example salts) can not. Because eukaryotic cells only have a cell membrane, they will burst eventually, while bacteria (and also plant cells) have a more rigid cell wall, which will mostly prevent bursting. However the influx (or outflux) of water creates a pressure which is called turgor pressure. How this works is shown below (figure from here), bacterial cells and plant cells work pretty much the same way:
The force driving osmosis exists in any system with an imbalance of solute molecules across a semipermeable membrane.
Think of a concentration gradient as an electrical potential, where high concentration is negative charge and low concentration is positive charge. In the case of electricity, its the magnetic force which causes the interactions leading to charge equilibrium.
In osmosis, there is no communication between solute molecules by an 'osmotic force'. Osmosis is a result of entropy. In chemistry, a separation of solute concentrations is called a chemical potential. As entropy increases in the system, this chemical potential is decreased, either endo or exothermically.
Here's a chart showing the change in heat for the dissolution of substances. Negative numbers mean a system loses heat (enthalpy) and is exothermic. Cold packs use ammonium nitrate, which absorb heat as they are dissolved in water.
The processes of osmosis, entropy are fundamental to our universe, not to a specific domain of life.
Enthalpy change of solution for some selected compounds hydrochloric acid -74.84 ammonium nitrate +25.69 ammonia -30.50 potassium hydroxide -57.61 caesium hydroxide -71.55 sodium chloride +3.87 potassium chlorate +41.38 acetic acid -1.51 sodium hydroxide -44.51 Change in enthalpy ΔHo in kJ/mol in water at 25°C