Given a variable X which is an integer pointer, what is the addressing mode used in the following statement:

int a = *X;

Direct addressing mode
Indirect addressing mode
Indexed addressing mode
Auto-increment addressing mode
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Suppose an non-pipelined processor with a 30ns cycle time is divided into 5 pipeline stages with latencies of 6ns, 4ns, 10ns, 5ns and 5ns. If the pipeline latch latency is 2ns, what is the cycle time of the resulting processor?
30ns
15ns
20ns
12ns
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
A computer has a main memory of 32MB. How many bits are required for memory address if the smallest addressable memory unit is a word and each word is of size 16 bits?
14
22
24
12
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
If the associativity of a processor cache is doubled while keeping the capacity and block size unchanged, which of the following is/are affected? [MSQ]
Width of tag comparator
Width of set index decoder
Width of way selection multiplexor
Width of processor to main memory data bus
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
In a k-way set associative cache, the cache is divided into x sets, each of which consists of k lines. The lines of a set are placed in sequence one after another. The lines in set s are sequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards. The main memory block numbered i must be mapped to any one of the cache lines from
(i mod k) * x to (j mod k) * x + (x-1)
(i mod x) to (i mod x) + (k-1)
(i mod k) to (i mod k) + (x-1)
(i mod x) * k to (i mod x) * k + (k-1)
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Register renaming is done in pipelined processors
as an alternative to register allocation at compile time
for efficient access to function parameters and local variables
to handle RAW hazards
to handle WAR hazards
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a direct mapped cache with 256 blocks and a block size of 16 bytes. What is the block number to which the byte address 2800 map to?
81
52
175
127
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Which of the following statement/s is/are true in a pipelined processor? [MSQ]
Bypassing can handle all RAW hazards.
Branch prediction is a solution for control hazards
Resource conflicts result in structural hazards
None of the above
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Assume a memory access to main memory on a cache miss takes 50 ns and a memory access to the cache on a cache hit takes 4ns. If 80% of the processor's memory requests result in a cache hit, what is the average memory access time?
3ns
40ns
7ns
14 ns
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Belady’s anomaly is that the no. of page faults may increase as the number of allocated frames increases. Consider the following page replacement algorithms:

Random page replacement: Chose a page at random to replace

LILO (Last-In-Last-Out)

LRU (Least Recently used)

Which of the above algorithms may suffer from Belady’s anomaly?

Random page replacement, LRU
LILO, LRU
Random page replacement, LILO
All the three algorithms
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following sequence of micro-operations:

MAR <- PC

MBR <- (memory)

PC <- PC +1

IR <- MBR

Which of the following is a possible operation performed by this sequence?

Instruction fetch
Operand fetch
Conditional branch
Initiation of interrupt service
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
A processor has 200 distinct instructions and 30 general purpose registers. A 32-bit instruction word has an opcode, two register operands and an immediate operand. The maximum value of the immediate operand is________
16383
4095
1023
511
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a system with a clock period of 12 ns can perform jumps (2 cycle), branches (3 cycles), arithmetic instructions (4 cycles), multiply instructions (5 cycles), and memory instructions (3 cycles). A certain program has 15% jumps, 10% branches, 40% arithmetic, 20% multiply, and 15% memory instructions.If the program executes 10^9 instructions, what is its execution time in seconds?

20.4 s
25.6 s
30.8 s
43.8 s
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a two-level cache hierarchy with L1 and L2 caches. An application incurs 1.6 memory accesses per instruction on average. For this application, the miss rate of L1 cache is 0.2; the L2 cache experiences, on average, 8 misses per 1000 instructions. The hit rate of L2 expressed correct to three decimal places is _______
0.950
0.975
0.925
0.990
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Assume that there is a fully associative cache of size 3 blocks. Assuming the cache is empty initially, for the following sequence of block addresses: “0, 4, 0, 2, 4, 3, 1, 0” what are the number of cache misses if FIFO replacement algorithm is used?
3
4
5
6
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
A CPU has 64 bit instructions. The program starts at address 168 (in decimal). Which of the following is a legal program counter (all values in decimal):
500
300
408
250
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
When a cache memory is 30 times faster than main memory/RAM and cache hit ratio is 90%. If hierarchical memory access is used, what is the speed up gained approximately using the cache ____
6.5
7.5
6
8.5
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider two cache organizations. The first one is 64 KB 4 way associative with 64 byte block size. The second one is of the 64 KB direct mapped cache. The size of an address is 32 bits in both organizations. A 4 to 1 multiplexer has latency of 0.8 ns which k bit comparator has latency of k/5 nsec. If H1 = hit latency of set associative cache and H2 = hit latency of direct mapped cache, what is the H1-H2 ? (in nsec) __
1.2
3
2
4
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A certain processor deploys a single-level cache. The cache block size is 4 words and the word size is 2 bytes. The memory system uses a 10-MHz clock. To service a cache miss, the memory controller first takes 1 cycle to accept the starting address of the block, it then takes 2 cycles to fetch all the four words of the block, and finally transmits the words of the requested block at the rate of 1 word per cycle. What is the total time taken to service one cache miss in microseconds?
0.2
0.7
0.5
1
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A CPU has a 32 KB direct mapped cache with 128 byte block size. Suppose A is a 2 dimensional array of size 512×512 with elements that occupy 8 bytes each. Consider the code segment

for (i=0; i<512; i++) {

for (j=0; j<512; j++) {

x+=A[i][j];

}

}

Assuming that array is stored in order A[0][0], A[0][1], A[0][2] ……, the number of cache misses is

16384
512
2048
1024
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the virtual page reference string

1, 2, 3, 2, 4, 1, 3, 2, 4, 1

on a demand paged virtual memory system running on a computer system that has a main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then

OPTIMAL < LRU < FIFO
OPTIMAL < FIFO < LRU
OPTIMAL = LRU
OPTIMAL = FIFO
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider a system that employs interrupt driven I/O for a particular device that transfers data at an average of 16 KB/sec on a continuous basis. Considering interrupt processing takes about 50 microseconds, this is the time to jump to ISR, execute it and return to the main program. The fraction of processor time consumed by this I/O device if interrupts occur for every byte_______(Upto 2 decimal points).
((0.80,0.82))
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
A computer has a 512 KByte, 8-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.

The number of bits in the tag field of an address is

11
14
16
27
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A computer has a 512 KByte, 8-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.

The size of the cache tag directory is

160 Kbits
136 Kbits
40 Kbits
320 Kbits
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider a disk drive with the following specifications:

16 surfaces, 512 tracks/surface, 512 sectors/track, 512 B/sector, rotation speed 6000 rpm. The disk is operated in cycle stealing mode whereby whenever one 4 byte word is ready it is sent to memory; similarly, for writing, the disk interface reads a 4 byte word from the memory in each DMA cycle. Memory cycle time is 80 nsec. The maximum percentage of time that the CPU gets blocked during DMA operation is:

10
25
40
50
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A 5 stage pipelined CPU has the following sequence of stages:

IF – instruction fetch from instruction memory

ID – Instruction decode

OF - Operand fetch phase

EX – Execute: ALU operation for data and address computation

WB – Register write back

Consider the following sequence of instructions:

I0: ADD R0, R1; R0 <- R0+R1

I1: MUL R1, R2; R1 <- R1*R2

I2: SUB R2, R1; R2 <- R2-R1

Assume the EX phase of MUL operation takes 3 clock cycles and every other stage of all the instructions takes one clock cycle.

If operand forwarding is there, what is the number of clock cycles taken to complete the above sequence of instructions starting from the fetch of I0?

10
12
9
15
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A memory system consisting of two levels L1 and L2. The required access times of those are 10 ns and 120 ns respectively. Another memory system has also two levels L3 and L4 whose access time are 20 ns and 100 ns respectively. The hit ratio of the second system is 0.9 and average access time is twice that of the first system. What is the hit ratio of the first system?
0.958
0.583
0.625
0.875
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Suppose the functions X and Y can be computed in 8 and 5 nanoseconds by functional units UX and UY, respectively. Given two instances of UX and two instances of UY, it is required to implement the computation X(Y(ti)) for 1 <= i <= 10. ignoring all other delays, the minimum time required to complete this computation is ________________ nanoseconds
28
34
45
100
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A computer has 256KB, k-way set associative write back data cache with block size of 128B. The address sent to the cache controller by the processor is of 32 bits. In addition to the address tag , each cache directory contains 3 valid bits and 1 modified bit. If 16 bits are used to address tag then what is the min value of k.
4
8
2
6
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Assume that for a certain processor, main memory access time is 100 nanoseconds and cache access time is 10 nanoseconds. It is estimated that 80% of the main memory requests are for read operation and the rest for write operation. Suppose while running a program, it was observed that 90% of the processor’s read requests result in a cache hit. If this is a write through cache which can do simultaneous write operation, the average memory access time in nanoseconds is________
30
36
64
45
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A 16KB direct-mapped write-back cache is organized as multiple blocks, where each cache block is of size 256-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of 1 Valid bit and

1 Modified bit. What is the total size of memory needed at the cache controller to store metadata (tags) for the cache?

2560 bits
1280 bits
5120 bits
1024 bits
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A computer system has a level-1 instruction cache (1-cache), a level-1 data cache (D-cache) and a level-2 cache (L2-cache) with the following specifications:


Capacity

Mapping Method

Block Size

I-Cache

2K words

Direct mapping

4 words

D-Cache

2K words

2-way set associative

4 words

L2-Cache

32K words

4-way set associative

16 words

The length of the physical address of a word in the main memory is 30 bits. The capacity of the tag memory in the I-cache, D-cache and L2-cache is, respectively,

512 x 19-bit, 512 x 20-bit, 2 K x 17-bit
1K x 16-bit, 512 x 19-bit, 2 K x 18-bit
512 x 19-bit, 1K x 20-bit, 2 K x 18-bit
1 K x 18-bit, 512 x 18-bit, 2 K x 18-bit
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66

Consider a disk pack with a seek time of 5 milliseconds and rotational speed of 6000 rotations per minute (RPM). It has 500 sectors per track and each sector can store 512 bytes of data. Consider a file stored in the disk. The file contains 1000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is ________

10020
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00