What are the three performance parameters used for memories? Describe in brief.
From a users point of view, the two most important aspects of memory are capacity and performance.
Three performance parameters are,
1. Access time (latency):
2. Memory cycle time
3. Transfer rate
------------------------------------------------------------------------------------------------------------------
Explain in brief the difference between spatial and temporal locality
The basis for the performance advantage of two-level memory is a principle called Locality of Reference.
This principle states that memory references tend to cluster. Over a long period of time, the clusters in use change, but over a short period of time, the processor is primarily working with fixed clusters of memory references.
Spatial locality refers to the tendency of execution to involve a number of memory locations that are clustered. This reflects the tendency of a processor to access instructions sequentially. Spatial locality also reflects the tendency of processor to access data locations sequentially, such as when processing a table of data.
Temporal locality reflects to the tendency of a processor to access memory locations that have been used recently. For example, when an iteration loop is executed, the processor executes the same set of instructions repeatedly.
------------------------------------------------------------------------------------------------------------------
What are the relative advantages and disadvantages of unified cache versus split cache?
During initial days a single cache is used to store references to both data and instructions. Now a days it became a norm to split the cache into two, one dedicated to data and one dedicated to instructions.
There are two potential advantages of a unified cache,
1. Only one cache needs to be designed and implemented.
2. For a given cache size, a unified cache has a higher hit rate than split cache because it balances the load between instructions and data automatically. That is, if an execution pattern involves more instruction fetch than data fetches, then the catch will tend to fill up with instructions and vice verse.
Despite these advantages the trend is towards split caches.
The key advantage of split cache design is that it eliminates the contention for cache between instruction fetch/decode unit and execution unit. This is important in any design that relies over the pipe-lining of instructions.
Typically the processor will fetch instructions ahead of time and fill a buffer or pipeline, with instructions to be executed. Assuming we have unified cache, when the execution unit performs a memory access to load and store data, the request is submitted to unified cache. If, at the same time, the instructions prefetcher issues a read request to the cache for an instruction, that request will be temporarily blocked so that the cache can service the execution unit first.
This cache contention can degrade performance by interfering with efficient use of the instruction pipeline.
The split cache structure overcomes this difficulty.
------------------------------------------------------------------------------------------------------------------
Explain the basic differences between direct mapping, associative mapping and set associative mapping in caches.
------------------------------------------------------------------------------------------------------------------
Briefly describe the two approaches that can be used to deal with multiple interrupts.
------------------------------------------------------------------------------------------------------------------
What is the benefit of using multiple-bus architecture compared to single-bus architecture?
An on-chip bus may connect the processor and cache memory.
An on-board bus may connect the processor to main memory and other components.
If a great number of devices are connected to the bus, the performance will be greatly hit. There are two main reasons,
1.In general, more the devices attached to the bus, the greater the bus length and hence the greater the propagation delay. This delay determines the time it takes for devices to coordinate the use of bus. When control of the bus passes from one device to another frequently, these propagation delays can noticeably affect performance.
2. The bus may become a bottleneck as the aggregate data transfer demand approaches the capacity of the bus. This problem can be countered to some extent by increasing the data rate the bus can carry and by using wider buses (like increasing from 32 to 64 bits). However, because the data rates generated by attached devices are growing rapidly, this is a race that a single bus is destined to lose.
Traditional bus architecture is reasonably efficient but begins to break down as higher and higher performance is seen in I/O devices. In response to these growing demands, a new approach is to, build a high-speed bus that is closely integrated with the rest of the system, requiring only a bridge between the processor's bus and the high speed bus. This arrangement is also referred to as Mezzanine architecture.
2. The bus may become a bottleneck as the aggregate data transfer demand approaches the capacity of the bus. This problem can be countered to some extent by increasing the data rate the bus can carry and by using wider buses (like increasing from 32 to 64 bits). However, because the data rates generated by attached devices are growing rapidly, this is a race that a single bus is destined to lose.
Traditional bus architecture is reasonably efficient but begins to break down as higher and higher performance is seen in I/O devices. In response to these growing demands, a new approach is to, build a high-speed bus that is closely integrated with the rest of the system, requiring only a bridge between the processor's bus and the high speed bus. This arrangement is also referred to as Mezzanine architecture.
The advantage of this arrangement is that the high speed bus brings high demand devices into closer integration with the processor and at the same time is independent of the processor. Thus, differences in processor and high-speed bus speeds and signal line definitions are tolerated. Changes in processor architecture do not affect the high-speed bus and vice verse.
------------------------------------------------------------------------------------------------------------------
A DMA module is transferring characters to memory using cycle stealing, from a device transmitting at 9600 bps. The processor is fetching instructions at the rate of 1 MIPS. By how much will the processor be slowed down due to DMA activity?
Presuming that the data width of the system bus is a byte, the DMA module will steal a cycle each time a byte has arrived. If the device receives 9600 bits per second, 1200 bytes will be received every second. The CPU will slow from 1 MIPS to (1,000,000-1200) Instructions per second.
------------------------------------------------------------------------------------------------------------------
Why is a two-stage instruction pipeline unlikely to cut the instruction cycle time in half, compared with the use of no pipeline?
There could be two possibilities:
a. The execution time will generally be longer than the fetch time. Execution will involve reading and storing operands and the performance of some operation. Thus, the fetch stage may have to wait for some time before it can empty its buffer.
b. A conditional branch instruction makes the address of the next instruction to be fetched unknown. Thus, the fetch stage must wait until it receives the next instruction address from the execute stage. The execute stage may then have to wait while the next instruction is fetched.
a. The execution time will generally be longer than the fetch time. Execution will involve reading and storing operands and the performance of some operation. Thus, the fetch stage may have to wait for some time before it can empty its buffer.
b. A conditional branch instruction makes the address of the next instruction to be fetched unknown. Thus, the fetch stage must wait until it receives the next instruction address from the execute stage. The execute stage may then have to wait while the next instruction is fetched.
------------------------------------------------------------------------------------------------------------------

