Restricting CPU and memory usage