Bus Sniffing

Bus sniffing or Bus snooping is a technique used in distributed shared memory systems and multiprocessors to achieve cache coherence. Although there is one main memory, there are several caches (one per processor), and unless preventative steps are taken, the same memory location may be loaded into two caches, and given two different values. To prevent this, every cache controller monitors the bus, listening for broadcasts which may cause it to invalidate its cache line.

Each cache line is in one of the following states: "dirty" (has been updated by local processor), "valid", "invalid" or "shared". The set of operations is thus: a value can be read or written. Writing it changes the value. Each value is either in main memory (which is very slow to access), or in one or more local caches (which is fast). When a block is first loaded in the cache it is marked "valid".

On a read miss to the local cache, the read request is broadcast on the bus. All cache controllers monitor the bus. If one has cached that address and it is in the state "dirty", it changes the state to "valid" and sends the copy to requesting node. The "valid" state means that the cache line is current.

On a local write miss (an attempt to write that value is made, but it's not in the cache), bus snooping ensures that any copies in other caches are set to "invalid". "Invalid" means that a copy used to exist in the cache, but it is no longer current.

When writing a block in state "valid" its state is changed to "dirty" and a broadcast is sent out to all cache controllers to invalidate their copies.

Since snooping does not scale well, larger ccNuma systems tend to use directory-based coherence protocols.

Read more about Bus Sniffing:  Implementation

Famous quotes containing the words bus and/or sniffing:

    David: All the reporters are on the bus.
    Lucas: Okay, start the bus then. And drive them over a cliff.
    Jeremy Larner, U.S. screenwriter, and Michael Ritchie. David (Chris Prey)

    On her headstone you’ll find this refrain:
    ‘She died as she lived, sniffing cocaine.’
    Unknown. Cocaine Lil (l. 27–28)