The adsorption and co-adsorption of CO and H2 at different coverages on p(4 × 4) Ru(0001) have been computed using periodic density functional theory (GGA-RPBE) and atomistic thermodynamics. Only molecular CO adsorption is possible and the saturation coverage is 0.75 ML (nCO = 12) with CO molecules co-adsorbed at different sites and has a hexagonal adsorption pattern as found by low energy electron diffraction. Only dissociative H2 adsorption is possible and the saturation coverage is 1 ML (nH = 16) with H atoms at face-centered cubic sites. The computed CO and H2 desorption patterns and temperatures agree reasonably with the experiments under ultrahigh vacuum conditions. For CO and H2 co-adsorption (nCO + mH2; n = 1-6 and m = 7, 6, 5, 5, 3, 1), CO pre-coverage affects H adsorption strongly, and each pre-adsorbed CO molecule blocks 2H adsorption sites and H2 does not adsorb on the surface with CO pre-coverage larger than 0.44 ML (nCO = 7); all these are in full agreement with the experiments under ultrahigh vacuum conditions. Our results provide the basis for exploring the mechanisms of catalytic conversion of synthesis gas.