1,161 views
1 votes
1 votes
VIPT

PIPT

PIVT
VIVT

1 Answer

Best answer
5 votes
5 votes

VIPT refers to Virtually Indexed-Physically Tagged Cache. Most commonly used one. Using virtual addresses to select a set within the cache and physical addresses to determine if a hit has occurred allows the cache lookup to begin in parallel with address translation but provides protection, unlike virtually addressed/virtually tagged systems. As long as address translation takes less time than accessing the tag array, this type of cache can be as fast as a virtually addressed/virtually tagged cache, since the physical address isn’t needed for hit/miss determination until after the tag array lookup completes.

Advantage: Gain benefit of a VIVT and PIPT.

Disadvantage: Synonym as in VIVT; No homonym.

PIPT refers to Physically Indexed-Physically Tagged Cache. This scheme translates the Virtual address to Physical Address and then proceeds to access the cache. This procedure has a drawback that TLB access cannot be overlapped with cache access. Can take advantage of the fact that physical addresses are shorter than virtual addresses on many systems to reduce the size of their tag arrays. Necessary to perform address translation before the cache is accessed, which increases the cache-hit time. Hence slower. Simpler for data coherence.

In VIVT caches, the virtual address is used for tag comparisons and indexing. Only necessary to do an address translation if a cache miss occurs, but the disadvantage that all the data in the cache must be invalidated when a context switch occurs, to prevent the new program from accessing the old program’s data or else a special process identifier has to be used to distinguish between processes.

Advantage: Fast cache access. Only require address translation upon miss.

Disadvantage:

- Homonym: Same VA maps to different PAs upon context switch.

- Synonym (also a problem in VIPT): Different VAs map to the same PA when data is shared by multiple processes.

In general, CPU caches have a index and a tag, which are two parts of a memory address. Index portion of the address is used to index the entry in a cache. Tag is used to to check the entry we are looking for is the same as the entry that is being cached. Indexing and tagging can be done using either physical address or virtual addresses, or a combination of both. 

I'm unaware of any real PIVT caches and they are most likely not used bcz, it doesn't make sense to use physical address to index and then later use virtual-address for tagging. Using the physical address to select a set within the cache means that the cache access needs to wait for address translation to complete before it can begin, while the virtual tag means that the cache doesn’t provide protection against the use of the same virtual address by multiple programs. Systems combine the worst aspects of virtual and physical addressing and are pretty much never used.

selected by

Related questions

2 votes
2 votes
0 answers
1
hem chandra joshi asked Jan 2, 2018
338 views
Let m[0]....m[4] be mutexes (binary semaphores) and P[0].......P[4] be processes. Suppose each process P[i] executes the following:wait (m[i]; wait (m(i+1) mode 4]); .......
1 votes
1 votes
0 answers
2
hem chandra joshi asked Jan 1, 2018
203 views
https://gateoverflow.in/?qa=blob&qa_blobid=11484316347737079122Reference this question https://gateoverflow.in/1314/gate2009-28can any one tell how this matrix obtain .?
0 votes
0 votes
0 answers
3
hem chandra joshi asked Oct 25, 2017
237 views
The bipartite graph G = (V ,E) with bipartition (V1, V2) has a complete matching from V1 to V2 if and only if |N(A)| ≥ |A| for all subsetsA of V1.