Computer Organization and Architecture questions

Q11

GATE CS 2017 CS-1Instruction Set and AddressingMCQ1 mark−1/3 if wrong
Consider the C struct defined below:
struct data {
    int marks[100];
    char grade;
    int cnumber;
};
struct data student;
The base address of student is available in register R1. The field student.grade can be accessed efficiently using
Show answer without attempting

Answer: D

Q25

GATE CS 2017 CS-1Memory HierarchyNAT1 mark
Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.41.4 memory accesses per instruction on average. For this application, the miss rate of L1 cache is 0.10.1; the L2 cache experiences, on average, 77 misses per 10001000 instructions. The miss rate of L2 expressed correct to two decimal places is ____________.
Show answer without attempting

Answer: 0.05

Q49

GATE CS 2017 CS-1Instruction Set and AddressingNAT2 marks
Consider a RISC machine where each instruction is exactly 44 bytes long. Conditional and unconditional branch instructions use PC-relative addressing mode with Offset specified in bytes to the target location of the branch instruction. Further the Offset is always with respect to the address of the next instruction in the program sequence. Consider the following instruction sequence

Instr. No.‾Instruction‾i:add R2,R3,R4i+1:sub R5,R6,R7i+2:cmp R1,R9,R10i+3:beq R1,Offset\begin{array}{rll} \underline{\text{Instr. No.}} & & \underline{\text{Instruction}} \\ i & : & \text{add } R2, R3, R4 \\ i+1 & : & \text{sub } R5, R6, R7 \\ i+2 & : & \text{cmp } R1, R9, R10 \\ i+3 & : & \text{beq } R1, \text{Offset} \end{array}

If the target of the branch instruction is ii, then the decimal value of the Offset is ____________.
Show answer without attempting

Answer: -16.0

Q50

GATE CS 2017 CS-1Instruction PipeliningNAT2 marks
Instruction execution in a processor is divided into 55 stages, Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Execute (EX), and Write Back (WB). These stages take 5,4,20,10,5, 4, 20, 10, and 33 nanoseconds (ns) respectively. A pipelined implementation of the processor requires buffering between each pair of consecutive stages with a delay of 2 ns2\text{ ns}. Two pipelined implementations of the processor are contemplated:

(i) a naive pipeline implementation (NP) with 55 stages and
(ii) an efficient pipeline (EP) where the OF stage is divided into stages OF1 and OF2 with execution times of 12 ns12\text{ ns} and 8 ns8\text{ ns} respectively.

The speedup (correct to two decimal places) achieved by EP over NP in executing 2020 independent instructions with no hazards is ____________.
Show answer without attempting

Answer: 1.49 to 1.52

Q51

GATE CS 2017 CS-1Memory HierarchyNAT2 marks
Consider a 2-way set associative cache with 256256 blocks and uses LRU replacement. Initially the cache is empty. Conflict misses are those misses which occur due to contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks

(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)(0, 128, 256, 128, 0, 128, 256, 128, 1, 129, 257, 129, 1, 129, 257, 129)

is repeated 1010 times. The number of conflict misses experienced by the cache is ____________.
Show answer without attempting

Answer: 76.0

Q52

GATE CS 2017 CS-1Instruction Set and AddressingNAT2 marks
Consider the expression (a−1)∗(((b+c)/3)+d)(a-1)*(((b+c)/3)+d). Let X be the minimum number of registers required by an optimal code generation (without any register spill) algorithm for a load/store architecture, in which (i) only load and store instructions can have memory operands and (ii) arithmetic instructions can have only register or immediate operands. The value of X is ____________.
Show answer without attempting

Answer: 2.0

Q54

GATE CS 2017 CS-1Memory HierarchyNAT2 marks
A cache memory unit with capacity of NN words and block size of BB words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 1010 bits. If the cache unit is now designed as a 1616-way set-associative cache, the length of the TAG field is ____________ bits.
Show answer without attempting

Answer: 14.0

Q29

GATE CS 2017 CS-2Memory HierarchyMCQ2 marks−2/3 if wrong
In a two-level cache system, the access times of L1L_1 and L2L_2 caches are 1 and 8 clock cycles, respectively. The miss penalty from the L2L_2 cache to main memory is 18 clock cycles. The miss rate of L1L_1 cache is twice that of L2L_2. The average memory access time (AMAT) of this cache system is 2 cycles. The miss rates of L1L_1 and L2L_2 respectively are:
Show answer without attempting

Answer: A

Q45

GATE CS 2017 CS-2Memory HierarchyNAT2 marks
The read access times and the hit ratios for different caches in a memory hierarchy are as given below.
CacheRead access time (in nanoseconds)Hit ratio
I-cache20.8
D-cache20.9
L2-cache80.9
The read access time of main memory is 90 nanoseconds. Assume that the caches use the referred-word-first read policy and the write back policy. Assume that all the caches are direct mapped caches. Assume that the dirty bit is always 0 for all the blocks in the caches. In execution of a program, 60% of memory reads are for instruction fetch and 40% are for memory operand fetch. The average read access time in nanoseconds (up to 2 decimal places) is ____________.
Show answer without attempting

Answer: 4.72

Q53

GATE CS 2017 CS-2Memory HierarchyNAT2 marks
Consider a machine with a byte addressable main memory of 2322^{32} bytes divided into blocks of size 32 bytes. Assume that a direct mapped cache having 512 cache lines is used with this machine. The size of the tag field in bits is ____________.
Show answer without attempting

Answer: 18.0

0/100 correct0 marks

Related topics in GATE CS