GATE 2009
66 questions
MCQ 661-mark 24 · 2-mark 42
Questions 21–25 of 66
Answer: (C)
Number of chips:
Answer: 64
0, 255, 1, 4, 3, 8, 133, 159, 216, 129, 63, 8, 48, 32, 73, 92, 155.
Which one of the following memory block will NOT be in cache if LRU replacement policy is used?
Answer: (D)
Set 0 gets blocks 0, 4, 8, 216, 8, 48, 32, 92 (in this order):
0, 4, 8, 216 fill the set. The second 8 is a hit. 48 replaces the least recently used block 0. 32 replaces 4. 92 replaces 216.
Set 0 ends with 8, 48, 32, 92, so 216 is not in the cache.
Set 1 gets 1, 133, 129, 73. These are only 4 blocks, so all stay.
Set 3 gets 255, 3, 159, 63, 155. The fifth block evicts 255, so the set ends with 3, 159, 63, 155.
Set 2 gets no request.
Blocks 3, 8 and 129 are in the cache. Block 216 is not.
Answer: (D)
The address of the sector is
Answer: (C)
Since , the sector is in cylinder .
Divide by the sectors per track: . So full tracks (surfaces to ) come before it, and it lies on surface (valid, as ) at sector number (valid, as ).
The address is .
Answer: (C)
The address (400, 16, 29) corresponds to sector number:
Answer: (C)
Data on a disk is placed in a fixed order. First it fills the first sector of the first surface of the first cylinder. Then it goes to the next sector, and the next, until every sector on that first track is used. After that it moves to the first sector of the second surface, staying in the same cylinder, and continues the same way. When all surfaces of the first cylinder are full, it repeats the process for the next cylinder.
Each cylinder has surfaces, so it holds sectors. To reach cylinder number (the cylinder, as counting starts from ), we must skip sectors.
Next, to reach surface of that cylinder, we must skip more sectors.
Last, to reach sector , we move more sectors.
Sector number .
Answer: (C)
Answer: (C)
(A) is wrong because the current instruction must finish first. (B) is wrong because at the end of the fetch cycle the instruction has only been fetched, not executed. (D) is wrong because the check is made after every instruction, not at fixed time intervals.
Answer: (C)