Answer Scheme: Tutorial 2
1. A set associative cache consists of 64 lines or slot divided into four-line sets. Main memory contains 4K blocks of 128 words each. Show the format of main memory addresses.
The cache is divided into 16 sets of 4 lines each. Therefore, 4 bits are needed to identify the set number. Main memory consists of 4K = 212 blocks. Therefore, the set plus tag lengths must be 12 bits and therefore the tag length is 8 bits. Each block contains 128 words. Therefore, 7 bits are needed to specify the word.
Main memory address =
TAG
SET
WORD
8
4
7
2. For direct-mapped cache, a main memory address is viewed as consisting of three fields. List and define the three fields.
One field …show more content…
2: Redundant via Hamming code; an error-correcting code is calculated across corresponding bits on each data disk, and the bits of the code are stored in the corresponding bit positions on multiple parity disks. 3: Bit-interleaved parity; similar to level 2 but instead of an error-correcting code, a simple parity bit is computed for the set of individual bits in the same position on all of the data disks. 4: Block-interleaved parity; a bit-by-bit parity strip is calculated across corresponding strips on each data disk, and the parity bits are stored in the corresponding strip on the parity disk. 5: Block-interleaved distributed parity; similar to level 4 but distributes the parity strips across all disks. 6: Block interleaved dual distributed parity; two different parity calculations are carried out and stored in separate blocks on different …show more content…
Interrupt-driven I/O: The processor issues an I/O command on behalf of a process, continues to execute subsequent instructions, and is interrupted by the I/O module when the latter has completed its work. The subsequent instructions may be in the same process, if it is not necessary for that process to wait for the completion of the I/O. Otherwise, the process is suspended pending the interrupt and other work is performed. Direct memory access (DMA): A DMA module controls the exchange of data between main memory and an I/O module. The processor sends a request for the transfer of a block of data to the DMA module and is interrupted only after the entire block has been