Equation of state and hydrodynamics of quark-gluon plasmas