That's why we now have a VFS and a /dev pseudo-filesystem. To provide that kind of things. Remember, everything is a file!! The new way to ask the kernel for random numbers is to read from /dev/random.