Deprecated: Implicit conversion from float-string "1633945022.940" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1633945022.940" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1633945022.940" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1633945022.940" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1633945022.940" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1669177823.720" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1669177823.720" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1669177823.720" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1669177823.720" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1669177823.720" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1669821346.409" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1669821346.409" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1669821346.409" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1669821346.409" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1669821346.409" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1568799997.298" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1568799997.298" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1568799997.298" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1568799997.298" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1568799997.298" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1569500419.051" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1569500419.051" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1569500419.051" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1569500419.051" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1569500419.051" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1570213552.450" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1570213552.450" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1570213552.450" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1570213552.450" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1570213552.450" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1571045470.647" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1571045470.647" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1571045470.647" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1571045470.647" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1571045470.647" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1571128765.289" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1571128765.289" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1571128765.289" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1571128765.289" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1571128765.289" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1571427641.703" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1571427641.703" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1571427641.703" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1571427641.703" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1571427641.703" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1571491715.070" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1571491715.070" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1571491715.070" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1571491715.070" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1571491715.070" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1574607925.285" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1574607925.285" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1574607925.285" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1574607925.285" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1574607925.285" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1609147802.042" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1609147802.042" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1609147802.042" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1609147802.042" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1609147802.042" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1669821288.372" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1669821288.372" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1669821288.372" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1669821288.372" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1669821288.372" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1570221970.447" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1570221970.447" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1570221970.447" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1570221970.447" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1570221970.447" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
CO and Architecture: GATE CSE 2004 | Question: 65
edited by
15,206 views
17 votes
17 votes

Consider a small two-way set-associative cache memory, consisting of four blocks. For choosing the block to be replaced, use the least recently used (LRU) scheme. The number of cache misses for the following sequence of block addresses is:

$8, 12, 0, 12, 8$.

  1. $2$
  2. $3$
  3. $4$
  4. $5$
edited by

3 Answers

Best answer
29 votes
29 votes
We have $4$ blocks and $2$ blocks in a set

$\implies$ there are $2$ sets. So blocks will go to sets as follows:
$$\begin{array}{|c|c|} \hline \textbf {Set Number} &  \textbf{Block Number} \\\hline \text{0} & \text{0,8,12}  \\\hline\text{1} &  \\\hline \end{array}$$
Since the lowest bit of block address is used for indexing into the set, so $8, 12$ and $0$ first miss in cache with $0$ replacing $8$ (there are two slots in each set due to $2-\text{way}$ set) and then $12$ hits in cache and $8$ again misses. So, totally $4$ misses.

Correct Answer: $C$
edited by
5 votes
5 votes
2 way set associative

4 blocks

Set size = # of blocks / # of sets

            = 4/2 = 2

So Block addresses will be divided by 2 ... On the basis of their remainder we will place those blocks in the sets .. applying LRU approach ... answer will be 4 ..
Answer:

Related questions

19.7k
views
4 answers
59 votes
go_editor asked Apr 24, 2016
19,671 views
Consider the following program segment for a hypothetical CPU having three user registers $R_1, R_2$ and $R_3.$\begin{array}{|l|l|c|} \hline \text {Instruction} & \text...
20.5k
views
3 answers
35 votes
Kathleen asked Sep 18, 2014
20,454 views
A 4-stage pipeline has the stage delays as $150$, $120$, $160$ and $140$ $nanoseconds$, respectively. Registers that are used between the stages have a delay of $5$ $nano...
27.0k
views
10 answers
52 votes
Kathleen asked Sep 18, 2014
27,022 views
A hard disk with a transfer rate of $10$ Mbytes/second is constantly transferring data to memory using DMA. The processor runs at $600$ MHz, and takes $300$ and $900$ clo...
13.5k
views
2 answers
39 votes
Kathleen asked Sep 18, 2014
13,484 views
The microinstructions stored in the control memory of a processor have a width of $26$ bits. Each microinstruction is divided into three fields: a micro-operation field o...