Showing posts with label Closed Book. Show all posts
Showing posts with label Closed Book. Show all posts

Thursday, January 13, 2011

August 2007 - Comp Org & Soft Sys

------------------------------------------------------------------------------------------------------------------
 
What is the use of control memory? Differentiate between microinstruction sequencing and microinstruction execution.


------------------------------------------------------------------------------------------------------------------

Does disk striping improve I/O request rate performance compared to a comparable disk array without striping?
If a single I/O request consists of multiple logically contiguous strips, then up of 'n' strips of data can be handled in parallel, greatly reducing the I/O transfer time.

------------------------------------------------------------------------------------------------------------------
What is bus arbitration? What is the difference between synchronous and asynchronous bus.

------------------------------------------------------------------------------------------------------------------

Wednesday, January 12, 2011

August 2008 - Comp Org & Soft Sys

------------------------------------------------------------------------------------------------------------------

In the context of RAID what is the distinction between parallel access and independent access?
Parallel Access Arrays. Parallel access arrays are arrays in which every member disk participates in every I/O operation. They provide a high data transfer rate because the data for any given read/write operation is spread among the member disks and is accessed simultaneously. The data transfer rate will be approximately equal (within 5%) to the sum of the transfer rates of the member disks. The disk I/O rate (number of individual read/writes per second) is similar to the I/O rate for a single disk, because the disks in a parallel access array work in unison to access only one block of data at a time. In other words, a parallel access array will access only one file at a time, but will do so at a very high transfer rate. Some implementations of parallel access arrays also require synchronized rotation of member disks. Disk synchronization requires disks that support this feature. RAID levels 2 and 3 are parallel access arrays.

Independent Access Arrays. Independent Access Arrays are arrays in which the member disks operate independently, even to the extent of satisfying multiple I/O requests concurrently. They provide a high disk I/O rate because each disk can be servicing a separate I/O request. The disk I/O rate will be approximately equal (within 5%) to the sum of the I/O rates of the member disks. The data transfer rate for a given block is the same as the transfer rate for a single disk because each block is stored on only one member disk. The total system transfer rate for an independent access array is similar to a parallel access array but may be split between several unrelated I/O requests. RAID levels 4 and 5 are independent access arrays. RAID levels 0 and 1 may be either parallel or independent but are usually implemented as independent arrays.

------------------------------------------------------------------------------------------------------------------

What is the difference between EPROM, EEPROM and Flash memory? Explain in brief.

------------------------------------------------------------------------------------------------------------------

What are the advantages of memory mapped I/O over isolated I/O?
A memory mapped peripheral device is connected to the CPU's address and data lines exactly like memory, so whenever the CPU reads or writes the address associated with the peripheral device, the CPU transfers data to or from the device. This mechanism has several benefits and only a few disadvantages.


The principle advantage of a memory-mapped I/O subsystem is that the CPU can use any instruction that accesses memory to transfer data between the CPU and a memory-mapped I/O device. The MOV instruction is the one most commonly used to send and receive data from a memory-mapped I/O device, but any instruction that reads or writes data in memory is also legal. For example, if you have an I/O port that is read/write, you can use the ADD instruction to read the port, add data to the value read, and then write data back to the port. 

Of course, this feature is only usable if the port is a read/write port (or the port is readable and you've specified the port address as the source operand of your ADD instruction). If the port is read-only or write-only, an instruction that reads memory, modifies the value, and then writes the modified value back to memory will be of little use. You should use such read/modify/write instructions only with read/write ports (or dual I/O ports if such an operation makes sense). 

Nevertheless, the fact that you can use any instruction that accesses memory to manipulate port data is often a big advantage since you can operate on the data with a single instruction rather than first moving the data into the CPU, manipulating the data, and then writing the data back to the I/O port. 

The big disadvantage of memory-mapped I/O devices is that they consume addresses in the memory map. Generally, the minimum amount of space you can allocate to a peripheral (or block of related peripherals) is a four kilobyte page. Therefore, a few independent peripherals can wind up consuming a fair amount of the physical address space. Fortunately, a typical PC has only a couple dozen such devices, so this isn't much of a problem. However, some devices, like video cards, consume a large chunk of the address space (e.g., some video cards have 32 megabytes of on-board memory that they map into the memory address space). 

The advantage of an I/O address space is that peripheral devices mapped to this area do not consume space in the memory address space. This allows you to fully expand the memory address space with RAM or other memory. On the other hand, you cannot use arbitrary memory instructions to access peripherals in the I/O address space, you can only use the IN and OUT instructions. 


------------------------------------------------------------------------------------------------------------------

In virtually all systems that include DMA modules, DMA access to main memory is given higher priority than CPU access to main memory. Why?
Because the DMA runs slower than the processor and therefore potentially starves the processor of data which in turn wastes the processor resources (i.e. the processor becomes under utilised) and slows down the whole application. Furthermore, DMA requests are much less frequent than the CPU.  If the CPU were given priority, it would hog the access, preventing the DMA from ever making a request.  Secondly, I/O requests may have no buffer and data may be lost if the transfer is delayed.
------------------------------------------------------------------------------------------------------------------

Draw the state diagram of an instruction cycle with interrupts. Label all states clearly.



------------------------------------------------------------------------------------------------------------------

Monday, January 10, 2011

Feb 2010 - Comp Org & Soft Sys

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.



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.
 
------------------------------------------------------------------------------------------------------------------