Given a variable X which is an integer pointer, what is the addressing mode used in the following statement:
int a = *X;
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?
MAR <- PC
MBR <- (memory)
PC <- PC +1
IR <- MBR
Which of the following is a possible operation performed by this sequence?
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
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
The number of bits in the tag field of an address is
The size of the cache tag directory is
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:
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?
1 Modified bit. What is the total size of memory needed at the cache controller to store metadata (tags) for the cache?
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,
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 ________