1. A method operable in a computer system having at least one thread and at least one processor for dynamically switching the assignment of resources between a thread and a processor during the running of the thread so that the entity to which resources are assigned can use those resources without accounting for intervening access by other threads, the method comprising: (a) assigning resources to one of the thread and the processor; (b) during the operation of the thread, measuring a utilization of the resources; and (c) switching the assignment of resources to one of the thread and the processor to which resources are not currently assigned when the utilization measured in step (b) falls below a predetermined threshold.