Embedded System Questions and Answers Part-21

1. Which of the following cache has a separate comparator for each entry?
a) direct mapped cache
b) fully associative cache
c) 2-way associative cache
d) 16-way associative cache

Answer: b
Explanation: A fully associative cache have a comparator for each entry so that all the entries can be tested simultaneously.

2. What is the disadvantage of a fully associative cache?
a) hardware
b) software
c) memory
d) peripherals

Answer: a
Explanation: The major disadvantage of the fully associative cache is the amount of hardware needed for the comparison increases in proportion to the cache size and hence, limits the fully associative cache

3. How many comparators present in the direct mapping cache?
a) 3
b) 2
c) 1
d) 4

Answer: c
Explanation: The direct mapping cache have only one comparator so that only one location possibly have all the data irrespective of the cache size.

4. Which mapping of cache is inefficient in software viewpoint?
a) fully associative
b) 2 way associative
c) 16 way associative
d) direct mapping

Answer: d
Explanation: The direct mapping cache organization is simple from the hardware design aspects but it is inefficient in the software viewpoint.

5. Which mechanism splits the external memory storage into memory pages?
a) index mechanism
b) burst mode
c) distributive mode
d) a software mechanism

Answer: a
Explanation: The index mechanism splits the external memory storage into a series of memory pages in which each page is the same size as the cache. Each page is mapped to the cache so that each page can have its own location in the cache.

6. Which of the following cache mapping can prevent bus thrashing?
a) fully associative
b) direct mapping
c) n way set associative
d) 2 way associative

Answer: c
Explanation: Only one data can be accessed in direct mapping that is, if one word is accessed at a time, all other words are discarded at the same time. This is known as bus thrashing which can be solved by splitting up the caches so there are 2,4,..n possible entries available. The major advantage of the set associative cache is its capability to prevent the bus thrashing at the expense of hardware.

7. Which cache mapping have a sequential execution?
a) direct mapping
b) fully associative
c) n way set associative
d) burst fill

Answer: d
Explanation: The burst fill mode of cache mapping have a sequential nature of executing instructions and data access. The instruction fetches and execution accesses to sequential memory locations until it has a jump instruction or a branch instruction. This kind of cache mapping is seen in the MC68030 processor

8. Which address is used for a tag?
a) memory address
b) logical address
c) cache address
d) location address

Answer: b
Explanation: The cache memory uses either a physical address or logical address for its tag data. For a logical cache, the tag refers to a logical address and for a physical cache, the tag refers to the physical address.

9. In which of the following the data is preserved within the cache?
a) logical cache
b) physical cache
c) unified cache
d) harvard cache

Answer: b
Explanation: In the physical cache, the data is preserved within the cache because it does not flush out during the context switching but on the other hand, the logical cache flushes out the data and clear it during a context switching.

10. What is the disadvantage of the physical address?
a) debugging
b) delay
c) data preservation
d) data cleared

Answer: b
Explanation: The physical address access the data through the memory management unit which causes a delay.