1. A method, comprising: performing by a computer: receiving two or more applications configured for parallel execution on the computer, each application implementing multiple software threads for performing work on behalf of the respective application; for each of the two or more applications, associating each of the application's multiple software threads with a respective one of multiple hardware contexts in the computer, wherein a single software thread of each of the two or more applications is associated with each of the multiple hardware contexts, and wherein the software threads of the two or more applications remain associated with their respective hardware contexts during execution of the two or more applications; for each of the two or more applications: determining one or more of the multiple hardware contexts to allocate to the application, dependent on collective resource demands of the two or more applications, wherein each of the multiple hardware contexts is allocated to only one of the two or more applications; and allocating the one or more determined hardware contexts to the software threads of the application that are associated with the one or more determined hardware contexts, wherein each hardware context is allocated to a single software thread of one of the two or more applications; the software threads of the two or more applications to which hardware contexts are allocated beginning to perform work on behalf of the two or more applications on the hardware contexts; and prior to completing execution of the two or more applications, and in response to detecting a change in the collective resource demands of the two or more applications, re-allocating at least one of the hardware contexts to another software thread that is associated with the hardware context, wherein the other software thread is a software thread of an application other than the application to which the hardware context is allocated, and wherein the software thread of the application to which the hardware context is allocated remains associated with the hardware context while the other software thread is executing on the hardware context.