Unit 5 Question Bank
Unit 5 Question Bank
Unit-5
QUESTION BANK WITH ANSWER-KEY
SUBJECT NAME: COMPUTER ORGANIZATION AND ARCHITECTURE (COA)
Q.No Description CO BL
Define Peripheral Devices.
Ans: Peripheral Devices are the devices that are under the direct control of the
computer and are said to be connected online. These devices are designed to read
1 CO5 KL2
information into or out of the memory unit upon command from the CPU. These
are called peripheral devices. These devices are of three types: Input, Output and
Input-Output peripherals.
Explain I/O Interface.
Discuss the design of a typical input or output interface. (2022-2023)
Ans: I/O Interface is used as a method which helps in transferring of
information between the internal storage devices i.e. memory and the external
peripheral device. A peripheral device is that which provide input and output
for the computer, it is also called Input-Output devices. For Example: A
keyboard and mouse provide Input to the computer are called input devices
while a monitor and printer that provide output to the computer are called
output devices. Just like the external hard-drives, there is also availability of
some peripheral devices which are able to provide both input and output.
Requirement of I/O Interface is because of the following reasons:
1. Data transfer rate of peripherals is usually slower than the CPU.
2. Data codes & formats in peripheral differ from the word format in
CPU and memory.
3. The operating modes of peripherals are different from each other and
each must be controlled so as not to disturb the operation of another
peripheral connected to CPU.
2 CO5 KL3
To resolve these differences, computer systems include special hardware
components between CPU and peripherals to supervise and synchronize all
input and output transfers are called interface.
4 CO5 KL3
Explain I/O module with block diagram. Also explain the functions of I/O
module.
2. Control and Timing: Another major function of the I/O module is control
and timing to coordinate between internal resources and external devices. Here
is how the data transfers from external devices to the processor:
• The processor asks the i/O module about the status of the attached
peripheral device.
• The I/O module returns the status of a specific device.
• If the device is ready to transmit the data, the processor issues a
command to the I/O module to transfer data.
• The I/O module then takes the requested data from the external device
and transmits it to the processor.
3. Data Buffering: Data buffering helps the I/O module to manage the data
transfer speed for the data sent by the processor to peripheral devices. This
helps peripheral devices and the processor work at the same pace.
ABES ENGINEERING COLLEGE, GHAZIABAD
4. Error Detection: The I/O module detects electrical and mechanical
malfunctions in peripheral devices and reports them to the processor. The
parity bit method is one of the ways the I/O module detects errors.
Here are a few examples of how programmed I/O transfer might be used in a computer system:
1. Keyboard input: When a user types on the keyboard, the keyboard sends a
signal to the CPU indicating that data is ready for transfer. The CPU uses
programmed I/O transfer to receive the data from the keyboard, one character at
a time.
2. Serial communication: When a computer communicates with another device
over a serial connection, the CPU uses programmed I/O transfer to send and
receive data. The CPU sends a command to the serial communication device to
initiate the transfer and then waits for the transfer to complete.
3. Disk I/O: When a computer reads data from a disk or writes data to a disk,
the CPU uses programmed I/O transfer to transfer the data. The CPU sends a
command to the disk controller to initiate the transfer and then waits for the
transfer to complete.
4. Display output: When a computer displays data on a screen, the CPU uses
programmed I/O transfer to send the data to the display adapter. The CPU sends
a command to the display adapter to initiate the transfer and then waits for the
transfer to complete.
These are just a few examples of how programmed I/O transfer might be used in
a computer system. The specific details of the transfer will vary depending on
the I/O device and the architecture of the computer system.
ABES ENGINEERING COLLEGE, GHAZIABAD
Conclusion
In conclusion, the transfer mode in Computer Organization and Architecture is
a critical aspect of the overall system design. There are three main transfer
ABES ENGINEERING COLLEGE, GHAZIABAD
modes: Programmed I/O transfer, Interrupt-driven transfer, and Direct Memory
Access (DMA).
Programmed I/O transfer is a straightforward data transfer method, but it can put
a heavy load on the CPU and result in low system performance.
The interrupt-driven transfer is more efficient than Programmed I/O transfer but
can introduce additional interrupt latency into the system.
Direct Memory Access (DMA) is the most efficient and high-performance data
transfer method. DMA allows I/O devices to transfer data directly to or from
memory without involving the CPU, resulting in improved system performance
and responsiveness. However, DMA is also the most complex and challenging
transfer mode, requiring careful system resource management and addressing
potential security risks.
Each transfer mode has its advantages and disadvantages, and the appropriate
mode of transfer for a particular system will depend on its specific requirements
and design constraints. Understanding the modes of transfer and their benefits
and limitations is crucial for effective computer organization and architecture
design.
10 CO5 KL3
Faster I/O Operations: Memory-mapped I/O allows the CPU to access I/O
devices at the same speed as it accesses memory. This means that I/O
operations can be performed much faster compared to isolated I/O.
Limited I/O Address Space: Memory-mapped I/O limits the I/O address
space as I/O devices share the same address space as the memory. This means
that there may not be enough address space available to address all I/O devices.
Slower Response Time: If an I/O device is slow to respond, it can delay the
CPU’s access to memory. This can lead to slower overall system performance.
Large I/O Address Space: Isolated I/O allows for a larger I/O address space
compared to memory-mapped I/O as I/O devices have their own separate
address space.
Greater Flexibility: Isolated I/O provides greater flexibility as I/O devices
can be added or removed from the system without affecting the memory
address space.
Improved Reliability: Isolated I/O provides better reliability as I/O devices
do not share the same address space as the memory. This means that if an I/O
device fails, it does not affect the memory or other I/O devices.
Slower I/O Operations: Isolated I/O can result in slower I/O operations
compared to memory-mapped I/O as it requires the use of specialized I/O
instructions.
More Complex Programming: Isolated I/O requires specialized I/O
instructions, which can lead to more complex programming.
Input-Output Processor
12 CO5 KL3
15 CO5 KL3
Example 1: Keyboard and CPU are the best examples of a simplex. The
keyboard always transmits characters to the CPU (Central processing unit), but
the CPU does not require transmitting characters or data to the keyboard.
Example 2: Printers and computers are one more example of the simplex.
Computers always send data to the printers, but printers are not able to send the
data to the computers. In some cases, printers can also talk back, and this case is
an exception. There is only one lane in the simplex.
Half Duplex: In the half-duplex, the sender and receiver can communicate in
both directions, but not at the same time. If a sender sends some data, the receiver
is able to accept it, but at that time, the receiver cannot send anything to the
receiver. Same as if the receiver sends data to the sender, the sender cannot send.
If there is a case where we don't need to communicate at a time in both the
direction, we can use the half-duplex. For example, the internet is a good
example of half-duplex. With the help of internet, if a user sends a web page
request to the web server, the server processes the application and sends the
requested page to the user.
Example1: One lane bridge can also explain the half-duplex. In a one-lane
bridge, the two-way vehicles will provide the way so that they can cross. At a
time, only one end will send, and the other end will only receive. We can also
perform the error correction that means if the information received by the
receiver is corrupted, then it can again request the sender to retransmit that
information.
Example 2: Walkie-talkie is also a classic example of half-duplex. Both ends
of walkie talkie contain the speakers. We can use each handset or walkie talkie
to either send the message or receive it, but we cannot do both things at the same
time.
Example 3: Railroads usually contain the scenario of half-duplex because it is
cheaper and has to lay a single track. The driver of the train has to hold a train at
one end of a single track until the driver of another train, which is travelling train
in another direction, goes through. The printer is also a good example of half-
duplex. In the IEEE-1284, printers are also able to send messages to the
computer. When the computer is sending characters to the printer, at that time,
the printer is not able to send the message to the computer. When the computer
successfully sends all the messages and stop sending them after that, the printer
can send a message back to the computer. The half-duplex has an advantage, i.e.,
double-track or double lane has a large cost as compared to the single track or
single lane.
Full Duplex
In the full-duplex, the sender and the receiver are able to send and receive at the
same time. The communication mode of full-duplex is widely used in the world.
In this mode, signals travelling in one direction are able to share the capacity of
links with signals travelling in the opposite directions. There are two ways in
which sharing can occur, which is described as follow:
ABES ENGINEERING COLLEGE, GHAZIABAD
Either capacity of the link is divided into the signals going in both directions or
the links have two physically separated transmission parts. Where one part can
be used for sending, and another part can be used for receiving.
But, the Asynchronous Data Transfer between two independent units requires
that control signals be transmitted between the communicating units so that the
ABES ENGINEERING COLLEGE, GHAZIABAD
time can be indicated at which they send data. These two methods can achieve
this asynchronous way of data transfer:
Strobe control: A strobe pulse is supplied by one unit to indicate to the other
unit when the transfer has to occur.
The strobe pulse and handshaking method of asynchronous data transfer is not
restricted to I/O transfer. They are used extensively on numerous occasions
requiring the transfer of data between two independent units. So, here we
consider the transmitting unit as a source and receiving unit as a destination.
For example, the CPU is the source during output or write transfer and the
destination unit during input or read transfer.
So, while discussing each data transfer method asynchronously, you can see the
control sequence in both terms when it is initiated by source or by destination.
In this way, each data transfer method can be further divided into parts, source
initiated and destination initiated.
The asynchronous data transfer between two independent units requires that
control signals be transmitted between the communicating units to indicate when
they send the data. Thus, the two methods can achieve the asynchronous way of
data transfer.
Source initiated strobe: In the below block diagram, you can see that strobe is
initiated by source, and as shown in the timing diagram, the source unit first
places the data on the data bus.
ABES ENGINEERING COLLEGE, GHAZIABAD
After a brief delay to ensure that the data resolve to a stable value, the source
activates a strobe pulse. The information on the data bus and strobe control signal
remains in the active state for a sufficient time to allow the destination unit to
receive the data.
The destination unit uses a falling edge of strobe control to transfer the contents
of a data bus to one of its internal registers. The source removes the data from
the data bus after it disables its strobe pulse. Thus, new valid data will be
available only after the strobe is enabled again.
In this case, the strobe may be a memory-write control signal from the CPU to a
memory unit. The CPU places the word on the data bus and informs the memory
unit, which is the destination.
Destination initiated strobe: In the below block diagram, you see that the
strobe initiated by destination, and in the timing diagram, the destination unit
first activates the strobe pulse, informing the source to provide the data.
The source unit responds by placing the requested binary information on the data
ABES ENGINEERING COLLEGE, GHAZIABAD
bus. The data must be valid and remain on the bus long enough for the destination
unit to accept it.
The falling edge of the strobe pulse can use again to trigger a destination register.
The destination unit then disables the strobe. Finally, and source removes the
data from the data bus after a determined time interval.
In this case, the strobe may be a memory read control from the CPU to a memory
unit. The CPU initiates the read operation to inform the memory, which is a
source unit, to place the selected word into the data bus.
2. Handshaking Method
The strobe method has the disadvantage that the source unit that initiates the
transfer has no way of knowing whether the destination has received the data
that was placed in the bus. Similarly, a destination unit that initiates the transfer
has no way of knowing whether the source unit has placed data on the bus.
In this method, one control line is in the same direction as the data flow in the
bus from the source to the destination. The source unit uses it to inform the
destination unit whether there are valid data in the bus.
The other control line is in the other direction from the destination to the source.
This is because the destination unit uses it to inform the source whether it can
accept data. And in it also, the sequence of control depends on the unit that
initiates the transfer. So, it means the sequence of control depends on whether
the transfer is initiated by source and destination.
Source initiated handshaking: In the below block diagram, you can see that
two handshaking lines are "data valid", which is generated by the source unit,
and "data accepted", generated by the destination unit.
ABES ENGINEERING COLLEGE, GHAZIABAD
The timing diagram shows the timing relationship of the exchange of signals
between the two units. The source initiates a transfer by placing data on the bus
and enabling its data valid signal. The destination unit then activates the data
accepted signal after it accepts the data from the bus.
The source unit then disables its valid data signal, which invalidates the data on
the bus.
After this, the destination unit disables its data accepted signal, and the system
goes into its initial state. The source unit does not send the next data item until
after the destination unit shows readiness to accept new data by disabling the
data accepted signal.
This sequence of events described in its sequence diagram, which shows the
above sequence in which the system is present at any given time.
Destination initiated handshaking: In the below block diagram, you see that
the two handshaking lines are "data valid", generated by the source unit, and
"ready for data" generated by the destination unit.
Note that the name of signal data accepted generated by the destination unit has
been changed to ready for data to reflect its new meaning.
ABES ENGINEERING COLLEGE, GHAZIABAD
The destination transfer is initiated, so the source unit does not place data on the
data bus until it receives a ready data signal from the destination unit. After that,
the handshaking process is the same as that of the source initiated.
The sequence of events is shown in its sequence diagram, and the timing
relationship between signals is shown in its timing diagram. Therefore, the
sequence of events in both cases would be identical.