Showing posts with label 2008. Show all posts
Showing posts with label 2008. Show all posts

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.



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