×

Scheme for insuring data consistency between a plurality of cache memories and the main memory in a multi-processor system

  • US 5,222,224 A
  • Filed: 07/09/1991
  • Issued: 06/22/1993
  • Est. Priority Date: 02/03/1989
  • Status: Expired due to Term
First Claim
Patent Images

1. In a multi-processor system having a system memory and a plurality of central processor units (CPUs), and CPUs being connected to said system memory, and wherein each CPU includes a respective cache memory for storing data from predefined blocks of memory locations in said system memory, said respective cache memory including storage locations for blocks of data words and associated block addresses and associated block status information indicating whether each block of data words in said respective cache memory has an "invalid" status, a "read" status, a "written-partial" status, or a "written-full" status, and status information indicating whether each word in a "written-partial" block of data words is valid or not,a method for controlling access to said respective cache memory in response to a memory access request from said each CPU, said memory access request specifying a block address of a specified block of data, said method comprising the steps of:

  • (a) searching said respective cache memory for an associated block address matching said specified block address, and when a matching associated block address is found in said respective cache memory, retrieving the associated block status information for the matching associated block address, and(b1) when said memory access request is a request to read data and a matching associated block address is found in said respective cache memory and the associated status information for the matching associated block address does not indicate an "invalid" status, reading data from said respective cache memory,(b2) when said memory access request is a request to read data and either a matching associated block address is not found in said respective cache memory or a matching associated block address is found in said respective cache memory but the associated block status information for the matching associated block address indicates an "invalid" status, fetching said specified data block from said system memory, writing said fetched data block into said respective cache memory, and setting in said respective cache memory the associated status information for the fetched data block to indicate a "read" status;

    (b3) when said memory access request is a request to write specified data to less than a full portion of at least one of said words and a matching associated block address is not found in said respective cache memory or a matching associated block address is found in said respective cache memory but the associated block status information for the matching associated block address indicates an "invalid" status, fetching said specified data block from said system memory, and writing at least a portion of the fetched data block and said specified data into said respective cache memory, and setting in said respective cache memory the associated status information for the fetched data block to indicate a "written full" status;

    (b4) when said memory access request is a request to write specified data to a full portion of at least a specified one of said words, and a matching associated block address is not found in said respective cache memory or a matching associated block address is found in said respective cache memory but the associated block status information for the matching associated block address indicates that the block is invalid, writing said specified data into said respective cache memory, setting in said respective cache memory the associated status information for each word in said specified block to indicate that said specified one of said words is valid, and setting in said respective cache memory the associated status information for said specified block to indicate a status of "written partial";

    (b5) when said memory access request is a request to write specified data and a matching associated block address is found in said cache memory and the associated block status information for the matching associated block address indicates neither an "invalid" status nor a "written full" status, fetching said specified data block from said system memory, writing at least a portion of the fetched data block and said specified data into said respective cache memory, and setting in said respective cache memory the associated status information for the fetched data block to indicate a "written full" status; and

    (b6) when said memory access request is a request to write specified data, a matching associated block address is found in said respective cache memory and the associated block status information for the matching associated block address indicates a "written full" status, writing said specified data into said cache memory.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×