The Gateway to Computer Science Excellence

+4 votes

Consider $1 \text{GHz}$ clock frequency processor,uses different operand accessing models shown below:

Operand Accessing Mode |
Frequency(%) |

Register | 10 |

Immediate | 20 |

Direct | 30 |

Memory Indirect | 20 |

Indexed | 20 |

Assume that $2$ memory cycles consumed for memory reference ,3 cycles consumed for arithmetic computation and $1$ cycle consumed when the operand is in register(s) instruction itself . The average operand fetch rate (in millions $\text{words/sec}$) of processor is __________ (upto 2 to decimal places).

+9 votes

Best answer

Operand Addressing Mode | Frequency | No of Cycles |
---|---|---|

register | $10 \%$ | $1$-reg reference ( $1$ cycle) |

immediate | $20 \%$ | no reference ($0$ cycle) |

direct | $30 \%$ | $1$-mem reference ($2$ Cycle) |

memory indirect | $20 \%$ | $2$-mem reference ( $4$ Cycle) |

indexed | $20 \%$ | $1$-reg reference and $1$-mem reference and $1$-arithmetic calculation ($6$ Cycle) |

In** Indexed Addressing mode**, if nothing specified then assume "**Base Address is given directly into the instruction and Index value is stored into the Index Register**".

Total average number of Cycle required to execute one instruction = $ 1 * 0.1 + 0 * 0.2 + 2 * 0.3 + 4 * 0.2 + 6 * 0.2 $

= $ 2.7 $ Cycles

Cycle time = $ \frac{1}{1 GHz} = 1 $ nano second.

Average time required to execute one instructions = $ 2.7 * 1 = 2.7 $ nano second.

$2.7 $ nano second required for = $1$ instruction

$1$ second required for = $ \frac{1}{2.7 * 10^{-9}} $ instructions

= $ 0.37037037037 * 10^{9} $ instructions

= $ 370.37 * 10^{6} $ instructions

= $370.37$ MIPS

+6 votes

operand addressing mode | frequency | cycles |
---|---|---|

register | 10% | 1 |

immediate | 20% | 1 |

direct | 30% | 2 (2 memory read cycles) |

memory indirect | 20% | 4 (2 times 2 memory read cycles) |

indexed | 20% | 5 (2 memory read cycles + 3 for index add) |

Total number of cycle = $\frac{1*.1+1*.2+2*.3+4*.2+5*.2}{.1+.2+.3+.2+.2} = 2.7$

Cycle time = $\frac{1}{1Ghz} = 1ns$

1 operand -> 2.7 ns

? ->1 sec

Average fetch rate = $\frac{1}{2.7} = .370370$ op/ns

= .370370 $10^9$op/s

= 370.37 MIPS

0

its given in the question 1 cycle if operand is in register 2 cycle if in memory and 2 for airthmetic operation so calculate according to addressing mode.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.4k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.4k
- Others 1.7k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,654 questions

56,169 answers

193,876 comments

94,298 users