Dominating sets of some graphs associated to commutative rings