Techniques for implementing caches for context switching applications are provided. A context identifier is stored in the cache to indicate the context to which data in the cache is associated. Additionally, the context can have different priorities so that storage space in the cache can be more efficiently allocated to the contexts based on their priorities.
Methods and apparatus to process cache allocation requests are disclosed. In an example method, a priority level is assigned to a cache allocation request. Based on the priority level, an allocation probability associated with the cache allocation request is identified. Based on the allocation probability, the cache allocation request is identified with either an allocate condition and a bypass condition.