MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER ARCHITECTURE

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What it means that the cache is set associative?
A
It means that each block has only one place it can appear in the cache
B
It means that block can be placed in a restricted set of places in the cache
C
It means that block can be placed anywhere in the cache
D
No correct answer
Explanation: 

Detailed explanation-1: -a cache is said to be directly mapped if every block has a unique, predefined place in the cache; if the block can be placed anywhere in the cache the cache is said to be fully associative; if the block can be placed in a restricted set of places then the cache is called set associative.

Detailed explanation-2: -Set Associative Cache • Set associative caches are a. compromise between fully associative caches and direct-mapped caches. In a set associative cache, there are a fixed number of locations (called a set) that a given address may be stored in. The number of locations in each set is the associative of the cache.

Detailed explanation-3: -A block of memory cannot necessarily be placed randomly in the cache and may be restricted to a single cache line or a set of cache lines by the cache placement policy. In other words, the cache placement policy determines where a particular memory block can be placed when it goes into the cache.

Detailed explanation-4: -A set-associative cache uses multiple frames for each cache line, typically two or four frames per line. A fully associative cache can place any block in any frame. Both these schemes use an associative search over the tags to determine if a block is in the cache.

Detailed explanation-5: -When the CPU tries to read from memory, the address will be sent to a cache controller.-The lowest k bits of the address will index a block in the cache.-If the block is valid and the tag matches the upper (m-k) bits of the m-bit address, then that data will be sent to the CPU.

There is 1 question to complete.