# What are Directory Schemes?

Computer ArchitectureComputer ScienceNetwork

#### Computer Organization

107 Lectures 13.5 hours

#### Computer Networks

106 Lectures 8 hours

#### Computer Graphics

99 Lectures 6 hours

Directory schemes selectively send consistency commands only to those caches where the valid copy of the shared data block is stored. A directory entry must be associated with each data block. The directory entry consists of a set of pointers to the caches holding a valid copy of the block. A dirty bit specifies if any of the holding caches has the right to update the associated block of data.

Three main methods that can be well-known in the recognition of directory schemes are as follows −

• Full map directory scheme

In the full-map directory scheme, each directory entry consists of as many pointers as there are caches in the system. If cache Ci contains a copy of the data block, the pointer Pi points to Ci, otherwise Pi points to itself. If there is a one-to-one correspondence among the pointers and the caches, a simple flag Fi is enough to replace a pointer.

In this implementation structure, called the presence flag vector, a flag Fi is set to true if Ci contains a valid copy, otherwise, Fi is false. There is an extra flag called the dirty flag which is set when one and only one presence bit is set, indicating the associated cache has permission to update the data block.

• Limited directory scheme

The objective of the limited directory scheme was to radically reduce the bit overhead compared with the full-map directory scheme. The feature of cache-based shared memory systems showed that in the vast majority of cases only a limited number of caches contained valid copies of the same data block.

The structure of the directory entries in the shared memory is very similar to that of the full-map scheme. The number of pointers (k) in a directory entry is much smaller than the number of processors (n) in the shared memory system and these pointers are dynamically allocated for those caches that contain a copy of the associated data block.

As a consequence, simple bits are not enough to represent pointers. In an n-processor system log2n, bits are needed for defining a presence pointer and therefore, storing k pointers for each block of memory. The bit overhead of the limited directed is $\frac{klog_{2}n}{block}$, while in the full-map scheme it is n/block. The bit overhead of the limited directory scheme is less than the full map scheme if Klog2n<n i.e.k< $\frac{n}{log_{2}n}$.

• Chained directory scheme

The chained directory scheme is a good compromise between the previous two schemes. It preserves the limited size of the central directory frames and even further restricts the number of presence pointers to one, and yet eviction becomes unnecessary.

Dynamic extension of the number of presence pointer is achieved by distributing the extra presence pointers among the caches. Each data block in each cache is extended with a pointer that is used to chain the valid copies of a data block. The characteristic of this scheme is that it requires exactly as many presence pointers as there are valid copies of the data block. There are no superfluous presence pointers in the directory entries of the shared memory.

Updated on 23-Jul-2021 10:10:27