Codilime interview question

Q: How linux manages RAM memory in running multiple threads