It looks like this article explain well how cgroups are working and can be easily used on a single process