US6546467B2ExpiredUtilityA1

Cache coherency mechanism using an operation to be executed on the contents of a location in a cache specifying an address in main memory

34
Assignee: SGS THOMSON MICROELECTRONICSPriority: Mar 5, 1997Filed: Mar 2, 1998Granted: Apr 8, 2003
Est. expiryMar 5, 2017(expired)· nominal 20-yr term from priority
G06F 12/0837G06F 9/30047G06F 12/0891
34
PatentIndex Score
7
Cited by
17
References
20
Claims

Abstract

A computer system has a processor, a cache and a main memory. A cache coherency mechanism ensures that the contents of the cache are coherent with respect to main memory by the provision of cache coherency instructions which each specify: 1) an operation to be executed on the contents of a location in the cache; and 2) an address in main memory. The operation is executed for the contents of the location in the cache which could be filled by an access to that address in main memory if the executing process normally has access to that address in main memory, regardless of whether or not the contents of the specified address in main memory are held at that location in the cache. This provides an extra degree of freedom because it is not necessary for the cache coherency operation to be requested in respect of a particular address stored in the cache. The instruction can specify any address which would map onto that cache location.

Claims

exact text as granted — not AI-modified
What is claimed is:  
     
       1. A cache coherency mechanism in a computer system comprising a processor, a cache and main memory wherein a plurality of addresses in main memory have access to each location in the cache, wherein a process being run by the processor includes a software cache coherency instruction which includes (i) an operation to be executed on the contents of a location in the cache and (ii) an address in main memory; 
       wherein the cache coherency operation is executed for the contents of said location in the cache to which said address in main memory has access provided that the running process normally has access to said address in main memory and independent of whether the contents of said address in main memory are held at said location in the cache.  
     
     
       2. A cache coherency mechanism according to  claim 1 , wherein the contents of each cache location comprise a respective address in main memory and an item stored at the respective address in main memory. 
     
     
       3. A cache coherency mechanism according to  claim 2 , wherein the cache coherency instruction is a flush instruction which writes back to the respective address in main memory the item held at said location in the cache. 
     
     
       4. A cache coherency mechanism according to  claim 1 , wherein the cache coherency instruction is a purge instruction which clears the contents of said location in the cache. 
     
     
       5. A cache coherency mechanism according to  claim 1 , wherein the cache coherency instruction includes a sequence of addresses in main memory and operates for the contents of a set of locations in the cache which would normally be filled by accesses to the addresses in said sequence. 
     
     
       6. A cache coherency mechanism according to  claim 1 , wherein the cache is partitioned into a plurality of cache partitions, and wherein at least one of the cache partitions containing a relevant location in the cache is determined in dependence on said address in main memory. 
     
     
       7. A cache coherency mechanism according to  claim 1 , wherein the main memory is organised in pages, each page comprising a sequence of addresses and wherein the cache coherency instruction specifies a page in main memory for which the operation is to be executed, the operation being executed for each of the sequence of addresses in the specified page. 
     
     
       8. A cache coherency mechanism according to  claim 7 , wherein the cache is partitioned into a plurality of cache partitions, and wherein each page comprises a number of addresses, said number of addresses being at least as great as the number of locations in one of said cache partitions. 
     
     
       9. A cache coherency mechanism according to  claim 6 , wherein each cache partition is direct mapped. 
     
     
       10. A cache coherency mechanism according to  claim 1 , wherein the operation to be executed on the contents of said location in the cache is selected from a flush operation, a purge operation and a cohere operation. 
     
     
       11. A cache coherency mechanism according to  claim 2 , wherein the cache coherency instruction is a purge instruction which clears the contents of said location in the cache. 
     
     
       12. A computer system, comprising: 
       a processor for running a process by executing a sequence of instructions;  
       a main memory which holds said instructions and data for said instructions; and  
       a cache connected in a memory access path between the processor and the main memory and having a plurality of storage locations, wherein a plurality of addresses in main memory have access to each storage location;  
       wherein the sequence of instructions for execution by the processor includes a software cache coherency instruction which includes (i) a cache coherency operation to be executed on the contents of a storage location in the cache, and (ii) an address in the main memory; and  
       wherein the cache coherency operation is executed for the contents of said storage location in the cache to which said address in main memory has access provided that the running process normally has access to said address in main memory and independent of whether the contents of said address in main memory are held at said storage location in the cache.  
     
     
       13. A computer system according to  claim 12 , wherein the processor has a user mode of operation and a privileged mode of pereation and wherein the cache coherency instruction is executed in the user mode. 
     
     
       14. A computer system according to  claim 12 , wherein the operation to be executed on the contents of said location in the cache is selected from a flush opereation, a purge operation and cohere operation. 
     
     
       15. An instruction set for a computer system which includes a software cache coherency instruction which includes (i) a cache coherency operation to be executed on the contents of a location in a cache and (ii) an address in main memory; 
       wherein the cache coherency instruction causes the cache coherency operation to be executed for the contents of said location in the cache to which said address in main memory has access only when the running process normally has access to said address in main memory and independent of whether the contents of said address in main memory are held at said location in the cache.  
     
     
       16. An instruction set according to  claim 15 , wherein the operation to be executed on the contents of said location in the cache is selected from a flush operation, a purge operation and a cohere operation. 
     
     
       17. A computer system comprising: 
       a processor for running a process by executing a sequence of instructions;  
       a main memory which holds said instructions and data for said instructions; and  
       a cache connected in a memory access path between the processor and the main memory and having a plurality of storage locations, wherein a plurality of addresses in main memory have access to each storage location;  
       wherein the sequence of instructions for execution by the processor includes a software cache coherency instruction which includes (i) a cache coherency operation to be executed on the contents of a storage location in the cache, and (ii) an address in the main memory;  
       wherein the cache coherency operation is executed for the contents of said storage location in the cache to which said address in main memory has access provided that the running process normally has access to said address in main memory and independent of whether the contents of said address in main memory are held at said storage location in the cache; and  
       wherein the processor has a user mode of operation and a privileged mode of operation and wherein the cache coherency instruction is executed in the user mode and not the privileged mode.  
     
     
       18. A cumputer system according to  claim 17 , wherein the operation to be executed on the contents of said location in the cache is selected from a flush operation, a purge operation and a cohere operation. 
     
     
       19. A method of modifying the coherency status of the contents of a cache with respect to items held in a main memory, wherein a plurality of addresses in main memory have access to each location of the cache, the method comprising: 
       executing a software cache coherency instruction which includes (i) a cache coherency operation to be executed on the contents of a location in the cache and (ii) an address in main memory; and  
       responsive to said cache coherency instruction, executing the cache coherency operation for the contents of said location in the cache to which said address in main memory has access when the running process normally has access to said address in main memory and independent of whether the contents of said address in main memory are held at said location in the cache.  
     
     
       20. A method according to  claim 19 , wherein the operation to be executed on the contents of said location in the cache is selected from a flush operation, a purge operation and a cohere operation.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.