Optimal control strategies for a computer network under virus threat