1. A method comprising: receiving, from an application, first data that identifies a particular category of hardware resources, of a plurality of categories of hardware resources, that the application needs to use in order to function; wherein each category in the plurality of categories is mapped to a different set of hardware resources of a device on which the application is executing; receiving, from the application, second data that identifies a particular mode of a plurality of modes; wherein each mode of the plurality of modes (a) corresponds to a different intended use of a set of hardware resources and (b) is mapped to a different group of settings applicable to hardware resources and consistent with the intended use; and in response to receiving the first data and the second data, (1) allocating, to the application, a particular set of hardware resources that are mapped to the particular category and the particular mode, and (2) configuring one or more hardware resources in the particular set of hardware resources in conformity with a particular group of settings that are mapped to the particular mode; wherein the first data differs from the second data; wherein the method is performed by one or more computing devices.