As nouns,
random number generator is a hyponym of
subroutine; that is, random number generator is a
word with a more specific, narrower meaning than
subroutine:
subroutine: a set sequence of steps, part of larger computer program
random number generator: a routine designed to yield a random number