GATE 2005
203 questions
MCQ 2031-mark 203
Questions 81–85 of 203
Consider a direct mapped cache of size 32 KB with block size 32 bytes. The CPU generates 32 bit addresses. The number of bits needed for cache indexing and the number of tag bits are respectively.
Answer: (A)
Number of blocks , so indexing needs 10 bits.
A block has 32 bytes, and , so the offset needs 5 bits.
Number of tag bits .
Answer: (A)
A block has 32 bytes, and , so the offset needs 5 bits.
Number of tag bits .
Answer: (A)
A disk has 8 equidistant tracks. The diameters of the innermost and outermost tracks are 1 cm and 8 cm respectively. The innermost track has a storage capacity of 10 MB.
If the disk has 20 sectors per track and is currently at the end of the sector of the inner-most track and the head can move at a speed of 10 meters/sec and it is rotating at constant angular velocity of 6000 RPM, how much time will it take to read 1 MB contiguous data starting from the sector 4 of the outer-most track?
If the disk has 20 sectors per track and is currently at the end of the sector of the inner-most track and the head can move at a speed of 10 meters/sec and it is rotating at constant angular velocity of 6000 RPM, how much time will it take to read 1 MB contiguous data starting from the sector 4 of the outer-most track?
Answer: (B)
Total time seek time rotational delay transfer time.
Seek time
The tracks are cm in diameter, so their radii are cm to cm. The head moves from the innermost to the outermost track, a distance of cm. The head speed is m/s cm/ms, so seek time ms.
Rotational delay
rpm is rotations per second, so one rotation takes ms. A track has sectors, so one sector takes ms.
During the seek the disk turns through sectors. Starting from the end of sector , the head arrives at the end of sector . It must wait until the end of sector (the start of sector ), which is sectors away. Delay ms.
Transfer time
The disk turns at constant angular velocity, so every track has the same sectors and the same capacity. The outermost track also holds MB, so a sector holds MB. Reading MB means sectors, which takes ms.
Total ms.
Answer: (B)
Seek time
The tracks are cm in diameter, so their radii are cm to cm. The head moves from the innermost to the outermost track, a distance of cm. The head speed is m/s cm/ms, so seek time ms.
Rotational delay
rpm is rotations per second, so one rotation takes ms. A track has sectors, so one sector takes ms.
During the seek the disk turns through sectors. Starting from the end of sector , the head arrives at the end of sector . It must wait until the end of sector (the start of sector ), which is sectors away. Delay ms.
Transfer time
The disk turns at constant angular velocity, so every track has the same sectors and the same capacity. The outermost track also holds MB, so a sector holds MB. Reading MB means sectors, which takes ms.
Total ms.
Answer: (B)
A disk has 8 equidistant tracks. The diameters of the innermost and outermost tracks are 1 cm and 8 cm respectively. The innermost track has a storage capacity of 10 MB.
What is the total amount of data that can be stored on the disk if it is used with a drive that rotates it with
I.Constant Linear Velocity
II.Constant Angular Velocity?
What is the total amount of data that can be stored on the disk if it is used with a drive that rotates it with
I.Constant Linear Velocity
II.Constant Angular Velocity?
Answer: (D)
Constant Angular Velocity (CAV). The disk turns at one fixed angular speed and every track has the same number of sectors, so every track holds the same amount as the innermost track, MB. The bit density gets lower on the outer tracks.
Capacity MB.
Constant Linear Velocity (CLV). The bit density is the same on every track, so outer tracks hold more and the disk spins slower when they are read. Track capacity density circumference , so it is proportional to the diameter.
The track diameters are cm. For the first track, , so density MB per cm. A track of diameter cm then holds MB, which gives MB.
Capacity MB.
So CLV gives MB and CAV gives MB.
Answer: (D)
Capacity MB.
Constant Linear Velocity (CLV). The bit density is the same on every track, so outer tracks hold more and the disk spins slower when they are read. Track capacity density circumference , so it is proportional to the diameter.
The track diameters are cm. For the first track, , so density MB per cm. A track of diameter cm then holds MB, which gives MB.
Capacity MB.
So CLV gives MB and CAV gives MB.
Answer: (D)
Consider a disk drive with the following specifications:
16 surfaces, 512 tracks/surface, 512 sectors/track, 1 KB/sector, rotation speed 3000 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 40 nsec. The maximum percentage of time that the CPU gets blocked during DMA operation is:
Answer: (B)
Only one surface is read or written at a time, and one rotation reads one track.
Data per track = . Rotation speed = 3000 rpm = 50 rotations per second.
Transfer rate = .
Time for one 4-byte word = .
In cycle stealing, DMA takes one memory cycle () for each word. The CPU is blocked only if it needs memory at that moment. The maximum blocking happens when the CPU needs memory all the time, so the percentage of time blocked equals the share of memory cycles DMA uses.
A word is ready every 152.6 ns, which is about memory cycles. Taking whole cycles, DMA uses 1 cycle in every 4.
Maximum blocked time = . (The exact share is , and 25 is the closest option.)
Answer: (B)
Data per track = . Rotation speed = 3000 rpm = 50 rotations per second.
Transfer rate = .
Time for one 4-byte word = .
In cycle stealing, DMA takes one memory cycle () for each word. The CPU is blocked only if it needs memory at that moment. The maximum blocking happens when the CPU needs memory all the time, so the percentage of time blocked equals the share of memory cycles DMA uses.
A word is ready every 152.6 ns, which is about memory cycles. Taking whole cycles, DMA uses 1 cycle in every 4.
Maximum blocked time = . (The exact share is , and 25 is the closest option.)
Answer: (B)
A device with data transfer rate 10 KB/sec is connected to a CPU. Data is transferred byte-wise. Let
the interrupt overhead be 4 sec. The byte transfer time between the device interfaces register and
CPU or memory is negligible. What is the minimum performance gain of operating the device under
interrupt mode over operating it under program-controlled mode?
Answer: (B)
In programmed I/O, the CPU sends a command and then waits until the I/O work is done.
So here, the CPU waits for to move of data.
The minimum gain in interrupt mode comes with the smallest unit of data moved. Here that is byte.
Time to move byte in programmed I/O mode:
In interrupt mode, to move byte, the overhead is
Performance gain:
So, (b) is the correct answer.
So here, the CPU waits for to move of data.
The minimum gain in interrupt mode comes with the smallest unit of data moved. Here that is byte.
Time to move byte in programmed I/O mode:
In interrupt mode, to move byte, the overhead is
Performance gain:
So, (b) is the correct answer.