Pass ResourceManager to OS, instead of create it inside of it.