







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








In the following code (15) For (i=2 ; i < 100 ; i = i+1){ a[i] = b[i] + a[i] /s1/ c[i-1] = a[i] + d[i] /s2/ a[i-1] = 2 * b[i] /s3/ b[i+1] = 2 * b[i] /s4/ }
I. List all dependences (output, anti and true) ANSWER
There are six dependences in the loop.
Here, the value of a in s2 is dependent on the result of a in s1.
3 There is loop carried true dependence from s4 to s1 on b.
4 There is loop carried true dependence from s4 to s3 on b.
5 There is loop carried true dependence from s3 to s3 on b.
6 There is loop carried output dependence from s3 to s3 on a
II. Indicate whether the true dependences are loop carried or not? ANSWER
We know that for loops to be parallel, each iteration must be independent of all others. Here in this case, as dependences 3, 4, 5 are true dependences They cannot removed by renaming or any such technique
These dependence are loop carried as the iterations of the loop are not independent. These factors imply the loop is not parallel as the loop is written.
III. Why the loop is not parallel? ANSWER
Loop can be made parallel by rewriting the loop to find a loop that is functionality equivalent to the original loop that can be made parallel.
a) Implementation of directory protocol where the whole directory is centralized in one location have problems scaling to more than a couple hundred processors. what is the bottleneck directory protocol and why does it occur ?How might this bottleneck be removed? ANSWER
Directory protocols collect and maintain information about where copies of lines reside. Typically, there is a centralized controller that is part of the main memory controller, and a directory that is stored in main memory.
The directory contains global state information about the contents of the various local caches. When an individual cache controller makes a request, the centralized controller checks and issues necessary commands for data transfer between memory and caches or between caches. It is also responsible for keeping the state information up to date; therefore, every local action that can affect the global state of a line must be reported to the central controller.
Typically, the controller maintains information about which processors have a copy of which lines. Before a processor can write to a local copy of a line, it must request exclusive access to the line from the controller. Before granting this exclusive access, the controller sends a message to all processors with a cached copy of this line, forcing each processor to invalidate its copy. After receiving acknowledgments back from each such processor, the controller grants exclusive access to the requesting processor. When another processor tries to read a line that is exclusively granted to another processor, it will send a miss notification to the controller. The controller then issues a command to the processor holding that line that requires the processor to do a write back to main memory. The line may now be shared for reading by the original processor and the requesting processor.
Directory schemes suffer from the drawbacks of a central bottleneck and the overhead of communication between the various cache controllers and the central controller. However, they are effective in large-scale systems that involve multiple buses or some other complex interconnection scheme.
b) How redundancy achieved in RAID system? ANSWER
As cache increased in size blocks often increase in size as well ,
a)If a large instruction cache has larger data blocks is there a need for perfetching? Explain the interaction between perfechting and increase block size instruction cache? ANSWER
Program basic blocks are often short (<10 instr.), and thus program executions does not continue to follow sequential locations for very long. As block gets larger, program is more likely to not execute all instructions in the block but branch out early, making instruction prefetching less attractive.
Data structures often comprise lengthy sequences of memory addresses, and program access of data structure often takes the form of sequential sweep. Large data blocks work well with such access patterns, and prefetching is likely still of value to the highly sequential access patterns
b)is there a need for data prefetch instruction when data blocks gets larger ?Explain Enhanced DRAMs ANSWER
1. Fast Page Mode DRAM (FPM DRAM) In normal DRAM, we can only read and write M-bit at time because only one row and one column is selected at any time by the row and column address In other words, for each M-bit memory access, we have to provide a row address followed by a column address. 2. Extended data out DRAM (EDO DRAM) It is the Enhanced FPM DRAM with more closely spaced CAS signals 3. Synchronous DRAM (SDRAM) It is driven with rising clock edge instead of asynchronous control signals. 4. Double Data Rate synchronous DRAM (DDR SDRAM) It is Enhancement of SDRAM that uses both clock edges as control signals. 5. Video RAM (VRAM) It is like FPM DRAM, but output is produced by shifting row buffer; and is Dual ported to allow concurrent reads and writes
The running program pattern is 0x0 0x8 0x10 0x18 0x20 0x
a) If you directed mapped cache size 1KB and block size of 8 bytes (2 words) how many set: ANSWER
Cache size = 1KB=1024 Bytes Block size = 8 Bytes No. of blocks = 1024/8 = 128 if we makes sets of 2 blocks then the number of sets = 128/2 = 64
b) With the same cache and block size what is miss rate of the directed mapped. ANSWER When we access 0x0 it is miss Block of 8 bytes (0-7) comes into cache When we access 0x8 it is miss because till now it is not in cache Block of 8 bytes (8-15) comes into cache When we access 0x10(16 binary) it is miss because till now it is not in cache Block of 8 bytes (16-23) comes into cache When we access 0x18(24 binary) it is miss because till now it is not in cache Block of 8 bytes (24-31) comes into cache When we access 0x20(32 binary) it is miss because till now it is not in cache Block of 8 bytes (32-39) comes into cache When we access 0x28(40 binary) it is miss because till now it is not in cache Block of 8 bytes (40-47) comes into cache Number of access = 6 Number of misses = 6 Miss rate = 100 %
c) On which would decrease miss rate the most
i. Increasing the degree of associative by 2. ii. Increasing the block size to 16 bytes. (Answer)
(a) Why the hardware speculation techniques differ from the instruction set extension approach to make the branches predictable at the compile time? ANSWER
The most commonly used such techniques are: Extension of the Instruction Set by including Conditional or Predicated (base something on something) Instructions Hardware speculation to enhance the ability of compiler to move code over branches, while preserving exceptional behavior To allow the compiler to reorder load/store instruction when no conflict is suspected but not certain
(b) Discuss poison-bit approach used to preserve hardware speculation. ANSWER
The basic concept behind this approach is that the speculative movement of instructions, before branch or before reordering of load/store, must not cause exceptions.
2. Interleaved Memory Partition memory into banks, with each bank able to access a word and send it to cache in parallel. Organize address space so that adjacent words live in different banks - called interleaving.
Define reliability; availability and dependence......Also explain performance of I/O. ANSWER
Reliability; Fault Avoidance – prevent fault occurrence by construction Fault Tolerance – providing service complying with the service specification by redundancy Error Removal – minimizing the presence of errors by verification Error Forecasting – to estimate the presence, creation and consequence of errors by evaluation Availability The availability of a module is the measure of the service accomplishment with respect to the swinging between the two states of accomplishment and interruption The module availability, therefore can be quantified as the ratio of the MTTF and Mean Time Between Failure – MTBF (which is equal to the sum of MTTF and MTTR); i.e., Availability = MTTF / (MTTF +MTTR) = MTTF / MTBF Dependability Laprie defined dependability as the quality of delivered service such that reliance can justifiably be placed on this service; Where the service delivered by a system is its observed actual behavior and the system failure occurs when actual behavior deviates from the specified behavior Quantifying the transitions between service accomplishment and service interruption is the measure of the dependability.
Storage I/O Performance Now having discussed the basic types of storage devices and the ways to interconnect them to the CPU, we are going to look into the ways to evaluate the performance of storage I/O systems We know that if a storage device crashes then prime objective of a storage device should be to remember the original information to make storage device reliable The reliability of a system can be improved by using the following four methods.
(a) How processor determines which device issued interrupt? ANSWER
Basically for processing I/O device interrupts there is special dedicated chip called as PIC (Programmable Interrupt Controller).
When you hit interrupt through keyboard it will be initially sent to PIC then PIC sends a signal on INT pin of processor (due to which processor will aware that there is something interrupt due to some device), when processor will free it will send READY signal to PIC then PIC sends information regarding interrupt device and interrupt type to processor via data bus line and finally interrupt is executed.
There are various types of interrupts which have different priorities e.g. your keyboard interrupt have higher priority than autorun interrupt of pen drive. And for controlling interrupts according to their priorities there total 8 levels of priority in PIC.
(b) For an associative cache, a main memory address is viewed as consistency of two fields. List and define the two fields. ANSWER
Tag and Word fields. Tag field uniquely identifies a block of main memory. The word is what is to be placed in the block of memory.
(c) Consider the following code sequence: SW R3, 512 (R0), M[512] - R LW R1, 1024(R0); R1 - M[1024] LW R2, 512(R0),; R2 - M[512]
Assume a direct mapped, write through cache that maps 512 and 1024 to the same block, and a four word write buffer that is not checked on a real miss, Will the value in R2 always be equal to the value in R3? ANSWER
Let us see how the cache access is performed The Data in R3 is placed in write-buffer after first instruction; i.e., after the store instruction using the index 512. The following load instruction (i.e., the 2nd instruction) uses the same index 512; and is therefore a miss
Define multiprocessor cache coherence and explain considering three processes which see old values in their caches. ANSWER
What is clusters SAN? Explain performance confronts. ANSWER
Explain 2D Mesh and 2D Torus. ANSWER
2D Mesh Two dimensional Mesh or Grid is an example of asymmetric network topology and uses bisection bandwidth as the performance metric. Here, the nodes (processors) are arranged in a array structure forming 2D Grid or Mesh. An example 3x4 mesh structure is shown here.
A switch is associated to each (processor) node [shown as blue circle] Each switch has one port for the processor and four ports to interconnect the processor to the four nearest-neighbor nodes, i.e., the nodes to the left - right and up - down position. This structure is sometimes also referred to as NEWS communication pattern, representing North, East, West and South communication. Note that here the switches associated with the top/bottom rows or left/right columns don‘t connect among themselves, thus have unused ports.
2D Torus
Connecting the unused ports of switches of the top/bottom rows and the left/right columns forms 2D Torus, using wraparound links, as shown here.
The performance metrics of n-node 2D Mesh / Torus are as follows
Explain Crossbar Switch Topology (15) ANSWER
Crossbar Switch Topology
How many total bits are required for a direct mapped cache with 16 KB of data and 4-word block size, assuming 32-bit address.
ANSWER