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.