A method implemented by a computing device for managing a resource thereof, comprising: determining a first amount of the resource that is used by a first instance of an application while being executed by the computing device, the determining including determining an amount of the resource that is used by a foreground process associated with the first instance of the application and one or more background tasks associated with the first instance of the application; calculating a first predicted resource usage amount for the application based at least on the first amount; storing the first predicted resource usage amount in a data store; determining a second amount of the resource to be allocated to a second instance of the application to be executed by the computing device based at least on the first predicted resource usage amount stored in the data store; sending, to the foreground process associated with the application, at least one message that is indicative of a resource usage budget; receiving, from the foreground process, at least one message specifying a first portion of the resource usage budget that is to be allocated to the foreground process and second portion of the resource usage budget that is to be allocated to at least one background task associated with the application; allocating a portion of a resource that is equal to the first portion of the resource usage budget to the foreground process and allocating a portion of the resource that is equal to the second portion of the resource usage budget to the at least one background task; determining after a predetermined time period whether a sum of an amount of the resource being used by the foreground process and an amount of the resource being used by the at least one background process exceeds the resource usage budget, and, in response to determining that the sum exceeds the resource usage budget, causing one of the foreground process and the at least one background process to be terminated. determining a first amount of the resource that is used by a first instance of an application while being executed by the computing device, the determining including determining an amount of the resource that is used by a foreground process associated with the first instance of the application and one or more background tasks associated with the first instance of the application; calculating a first predicted resource usage amount for the application based at least on the first amount; storing the first predicted resource usage amount in a data store; determining a second amount of the resource to be allocated to a second instance of the application to be executed by the computing device based at least on the first predicted resource usage amount stored in the data store; sending, to the foreground process associated with the application, at least one message that is indicative of a resource usage budget; receiving, from the foreground process, at least one message specifying a first portion of the resource usage budget that is to be allocated to the foreground process and second portion of the resource usage budget that is to be allocated to at least one background task associated with the application; allocating a portion of a resource that is equal to the first portion of the resource usage budget to the foreground process and allocating a portion of the resource that is equal to the second portion of the resource usage budget to the at least one background task; determining after a predetermined time period whether a sum of an amount of the resource being used by the foreground process and an amount of the resource being used by the at least one background process exceeds the resource usage budget, and, in response to determining that the sum exceeds the resource usage budget, causing one of the foreground process and the at least one background process to be terminated.