Question

QUESTION 1. [14 marks] a) What is the main difference between programmed I/O and interrupt I/O? [4] b) During the initializat

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(1)

Programmed I/O

On a basic level Programmed I/O is a method of transferring data between the Processor and other peripheral devices connected, where instruction running in the CPU performs an operation of data transferring from and/or to an I/O device. In this case the Processor issues a command and then waits for it to execute. Then it waits for the I/O device to complete the request and respond. Processor needs to keep check the status of the I/O device from time to time (this is called Polling). The important thing to consider here is that processor is way more faster than the I/O module and thus have to wait for a long time to respond.

Programmed I/O is the simplest I/O technique for exchanging data between processor and other external device.

In Programmed I/O processor executes a program that gives the direct control of I/O operation. Processor issue a command to the I/O module and wait until the operation is complete. Processor will periodically check the status of I/O module until it find that the operation is complete. If the processor is faster than I/O module , the processor time is waste .

It module is treated as slow module.

It used only in some low-end microcomputers.
* It has single input and single output instruction.
* Each instructions selects one I/O device (by number) and transfers a single character (byte)
* Four registers: input status and character, output status and character.

Interrupt-driven I/O-

In case of interrupt-driven I/O, processor after requesting the I/O module proceeds with its normal work. After I/O device has completed the request, it notifies the processor using an interrupt. This relieves the processor from checking again and again whether I/O device has completed the request. But, still this is not very effective technique, especially when data needs to be transferred in large quantity. In this case processor has to transfer data word by word between I/O module and memory. This leads us to another approach called Direct Memory Access (DMA).

Interrupt I/O is something similar to Programmed I/O technique.

At this technique the processor do not wait for until the I/O operation is complete. Rather processor normally do the other task. When I/O is complete the I/O module interrupt into processor . Interrupt means that the operation is completed.

It module is faster than programmed i/o module.

Primary disadvantage of programmed I/O is that CPU spends most of its time in a tight loop waiting for the device to become ready. This is called busy waiting.
* With interrupt-driven I/O, the CPU starts the device and tells it to generate an interrupt when it is finished.
* Done by setting interrupt-enable bit in status register.
* Still requires an interrupt for every character read or written.
* Interrupting a running process is an expensive business (requires saving context).
* Requires extra hardware (DMA controller chip).

(2)test  I/O is an alternative scheme dealing with I/O. Interrupt I/O is a way of controlling input/output activity whereby a peripheral or terminal that needs to make or receive a data transfer sends a signal. This will cause a program interrupt to be set. At a time appropriate to the priority level of the I/O interrupt. Relative to the total interrupt system, the processors enter an interrupt service routine. The function of the routine will depend upon the system of interrupt levels and priorities that is implemented in the processor.

(3)

DMA saves lots of CPU time so that CPU can have more time to execute CPU-bound tasks.

In a simple computer architecture, CPU and IO devices are linked with a bus. if CPU wants to get data from IO device, it will send a message to IO device via bus and wait for its response. During this time, CPU can do nothing except waiting for data. This method seems to waste CPU resource a lot and one solution of this problem is DMA.

In a computer architecture with DMA, CPU, DMA and memory are linked with a bus. And DMA will have an exclusive IO bus connected with IO devices. In order to get data from IO device, CPU just need to send a message to DMA and do any other task instead of waiting. After DMA receives the message, it first fetchs data from IO device and then put data in memory. Finally, it sends an interrupt to CPU for telling him the IO operation is finished, and CPU gets that IO data from memory after receiving the interrupt.

Writing data to IO device is similar to reading, and DMA can reduce the CPU waiting time of both IO operations.

(4)

The processor either doesn't need to use the bus at the time, or it is forced to suspend operation temporarily. The processor deals with other things, while the bus operation is left to DMA.

##That is all about your answer............please upvote my answer...........please.............

Add a comment
Know the answer?
Add Answer to:
QUESTION 1. [14 marks] a) What is the main difference between programmed I/O and interrupt I/O?...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Distinguish between control processing unit (CPU), core and processor. 2. Briefly explain how short-I/O-wait interrupt...

    1. Distinguish between control processing unit (CPU), core and processor. 2. Briefly explain how short-I/O-wait interrupt can improve the exexution of user program 3. What is the relationship between: (i) the width of address bus and the memory capacity (ii) the width of data bust and the data transfer

  • 1. Difference between sector sparing and sector slipping is A) sector sparing uses spare sectors while...

    1. Difference between sector sparing and sector slipping is A) sector sparing uses spare sectors while sector slipping does not. B) sector sparing results in copying of a single sector while sector slipping may result in copying of multiple sectors. C) sector sparing can help recover from hard errors while sector slipping cannot. D) sector slipping can help recover from hard errors while sector sparing cannot. 2. Which of the following is FALSE about swap space use? A) Swap space...

  • Vocabulary Exercises is the communication channel that connects all computer system components Cache types that are...

    Vocabulary Exercises is the communication channel that connects all computer system components Cache types that are generally implemented on the same chip as the CPU include 3. thus controlling access to the bus by all other The CPU is always capable of being a(a) devices in the computer system. 4. An) is a reserved area of memory used to resolve differences in data transfer rate or data transfer unit size. 5. A(n) is an area of fast memory where data...

  • Part 1: A pipelined computer completes instructions more quickly by having more than one instruction at...

    Part 1: A pipelined computer completes instructions more quickly by having more than one instruction at a time "in the pipeline." Explain what problem branch instructions cause with instruction pipelining. Describe one approach to overcoming this problem. Part 2: RISC computers generally execute more instructions per second than CISC computers. Describe the penalty or trade-off paid when adopting the RISC architecture. Part 3: When a cache hit to a cache on the CPU chip occurs on a memory write the...

  • Please answer the following questions: 1) Describe the main functions of a computer network (12 marks)...

    Please answer the following questions: 1) Describe the main functions of a computer network (12 marks) 2) In your own words, compare the three types of files: directories, ordinary files, and special files. Explain what would happen if a user modified a directory file (10 marks) 3)What are the advantages of having a Windows system using the menu-driven interface, instead of typing commands. Give at least one example where having menus is an advantage (6 marks) 4) Identify at least...

  • Question 5. 111 marks] (Chapter 2] Consider the following studies Study 1: A study was conducted...

    Question 5. 111 marks] (Chapter 2] Consider the following studies Study 1: A study was conducted to see if music can influence people's ability to remember Memory was tested by giving people a series of pictures to look at for 10 minutes and then asking them to answer a series of questions about the pictures. A memory score computed based on their answers. 120 people were recruited and randomly allocated to one of 4 groups: the first group did the...

  • I need #5 Each carries 2 marks 1. What is the difference in between conductor and...

    I need #5 Each carries 2 marks 1. What is the difference in between conductor and insulators? Write with necessary figures and examples of electrostatic charging by Induction? What is Charge? Problem-1: Find the charge (Q) of a system having 1000 electrons? 2. Explain the electric field produced due to a positive and negative point charges separately with necessary figures? Problem-2: Calculate the electricfield (E) at a field point of 0.2 μm from a point charge +10 pC? What is...

  • I need #3 Each carries 2 marks 1. What is the difference in between conductor and...

    I need #3 Each carries 2 marks 1. What is the difference in between conductor and insulators? Write with necessary figures and examples of electrostatic charging by Induction? What is Charge? Problem-1: Find the charge (Q) of a system having 1000 electrons? 2. Explain the electric field produced due to a positive and negative point charges separately with necessary figures? Problem-2: Calculate the electricfield (E) at a field point of 0.2 μm from a point charge +10 pC? What is...

  • Question I This question carries 20% of the marks for this assignment. You are asked to...

    Question I This question carries 20% of the marks for this assignment. You are asked to develop a set of bash shell script: Write a script that asks for the user's salary per month. If it is less or equals to 800, print a message saying that you need to get another job to increase your income, what you earn is the Minim living cost. If the user's salary is higher than 800 and below 2000, print a message telling...

  • Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers...

    Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers Sometimes we're given an array of data that we need to be able to view in sorted order while leaving the original order unchanged. In such cases we could sort the data set, but then we would lose the information contained in the original order. We need a better solution. One solution might be to create a duplicate of the data set, perhaps make...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT