SlideShare a Scribd company logo
discuss the drawbacks of programmed and interrupt driven i/o and describe in general the
functionality of the DNA
Solution
Programmed I/O
Programmed I/O (PIO) refers to data transfers initiated by a CPU under driver software control
to access registers or memory on a device.
The CPU issues a command then waits for I/O operations to be complete. As the CPU is faster
than the I/O module, the problem with programmed I/O is that the CPU has to wait a long time
for the I/O module of concern to be ready for either reception or transmission of data. The CPU,
while waiting, must repeatedly check the status of the I/O module, and this process is known as
Polling. As a result, the level of the performance of the entire system is severely degraded.
Programmed I/O basically works in these ways:
Interrupt
The CPU issues commands to the I/O module then proceeds with its normal work until
interrupted by I/O device on completion of its work.
For input, the device interrupts the CPU when new data has arrived and is ready to be retrieved
by the system processor. The actual actions to perform depend on whether the device uses I/O
ports, memory mapping.
For output, the device delivers an interrupt either when it is ready to accept new data or to
acknowledge a successful data transfer. Memory-mapped and DMA-capable devices usually
generate interrupts to tell the system they are done with the buffer.
Although Interrupt relieves the CPU of having to wait for the devices, but it is still inefficient in
data transfer of large amount because the CPU has to transfer the data word by word between I/O
module and memory.
The main limitation of programmed I/O and interrupt driven I/O is given below:
Programmed I/O
Each instructions selects one I/O device (by number) and transfers a single character (byte)
Example: microprocessor controlled video terminal.
Four registers: input status and character, output status and character.
Interrupt-driven I/O
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).
All these limitation can be overcome by the Introduction of DMA (Direct Memory Access)
To write block of 32 bytes from memory address 100 to device 4
1. CPU writes 32, 100, 4 into the first three DMA registers (memory address, count, device
number)
2. CPU puts code for WRITE (say 1) into fourth (direction) DMA register, which signals DMA
controller to begin operation
3. Controller reads (via bus request as CPU would) byte 100 from memory
4. Controller makes I/O request to write to device 4
5. Controller increments memory address register and decrements count register
6. Controller continues this loop until count decrements to 0
7. When count becomes 0 I/O is complete and controller asserts interrupt line on bus.
8. With DMA the CPU only has to start the I/O and respond to the final interrupt
9. There is only one interrupt per block of bytes input or output
10. Some DMA controllers can do two or more simultaneous I/O operations
11. DMA process is not free
– When controller wants to read/write via the bus it must make the CPU wait (DMA controller
always has higher priority on bus). This process is called cycle stealing
- DMA I/O is used on PCs and minicomputers.
A programmed I/O needs to be polled at regular intervals to detect its state, hence, a short
transition may NOT be detected.
An interrupted Input will generate an interrupt a any change of state, and the CPU will respond
(nearly) immediately to that change, entering and executing the interrupt routine.
A program has to wait and repeatedly tests the status; Waiting period for an asynchronous event
can be too large
Many I/O devices generate asynchronous events— events that occur at times that the processor
cannot predict or control, but which the processor must respond to reasonably quickly to provide
acceptable performance
Direct Memory Access (DMA)
Direct Memory Access (DMA) means CPU grants I/O module authority to read from or write to
memory without involvement. DMA module controls exchange of data between main memory
and the I/O device. Because of DMA device can transfer data directly to and from memory,
rather than using the CPU as an intermediary, and can thus relieve congestion on the bus. CPU is
only involved at the beginning and end of the transfer and interrupted only after entire block has
been transferred.
Direct Memory Access needs a special hardware called DMA controller (DMAC) that manages
the data transfers and arbitrates access to the system bus. The controllers are programmed with
source and destination pointers (where to read/write the data), counters to track the number of
transferred bytes, and settings, which includes I/O and memory types, interrupts and states for
the CPU cycles.
DMA increases system concurrency by allowing the CPU to perform tasks while the DMA
system transfers data via the system and memory busses. Hardware design is complicated
because the DMA controller must be integrated into the system, and the system must allow the
DMA controller to be a bus master. Cycle stealing may also be necessary to allow the CPU and
DMA controller to share use of the memory bus.
Direct Memory Access (DMA) is a capability provided by some computer bus architectures that
allows data to be sent directly from an attached device (such as a disk drive) to the memory on
the computer's motherboard. The microprocessor is freed from involvement with the data
transfer, thus speeding up overall computer operation.
Usually a specified portion of memory is designated as an area to be used for direct memory
access. In the ISA bus standard, up to 16 megabytes of memory can be addressed for DMA. The
EISA and Micro Channel Architecture standards allow access to the full range of memory
addresses (assuming they're addressable with 32 bits). Peripheral Component
Interconnectaccomplishes DMA by using a bus master (with the microprocessor "delegating"
I/O control to the PCI controller).
An alternative to DMA is the Programmed Input/Output (PIO) interface in which all data
transmitted between devices goes through the processor. A newer protocol for the ATA/IDE
interface is Ultra DMA, which provides a burst data transfer rate up to 33 MB (megabytes) per
second. Hard drives that come with Ultra DMA/33 also support PIO modes 1, 3, and 4, and
multiword DMA mode 2 (at 16.6 megabytes per second)
The DMA functions are:
ddi_dma_alloc_handle()
Allocate a DMA handle
ddi_dma_free_handle()
Free a DMA handle
ddi_dma_mem_alloc()
Allocate memory for a DMA transfer
ddi_dma_mem_free()
Free previously allocated DMA memory
ddi_dma_addr_bind_handle()
Bind an address to a DMA handle
ddi_dma_buf_bind_handle()
Bind a system buffer to a DMA handle
ddi_dma_unbind_handle()
Unbind the address in a DMA handle
ddi_dma_nextcookie()
Retrieve the subsequent DMA cookie
ddi_dma_getwin()
Activate a new DMA window
ddi_dma_numwin()
Retrieve number of DMA windows
ddi_dma_sync()
Synchronize CPU and I/O views of memory
ddi_check_dma_handle()
Check a DMA handle
ddi_dma_set_sbus64()
Allow 64-bit transfers on SBus
ddi_slaveonly()
Report whether a device is installed in a slave access-only location
ddi_iomin()
Find the minimum alignment and transfer size for DMA
ddi_dma_burstsizes()
Find out the allowed burst sizes for a DMA mapping
ddi_dma_devalign()
Find DMA mapping alignment and minimum transfer size
ddi_dmae_alloc()
Acquire a DMA channel
ddi_dmae_release()
Release a DMA channel
ddi_dmae_getattr()
Get the DMA engine attributes
ddi_dmae_prog()
Program a DMA channel
ddi_dmae_stop()
Terminate a DMA engine operation
ddi_dmae_disable()
Disable a DMA channel
ddi_dmae_enable()
Enable a DMA channel
ddi_dmae_getcnt()
Get the remaining DMA engine count
ddi_dmae_1stparty()
Configure the DMA channel cascade mode
ddi_dma_coff()
Convert a DMA cookie to an offset within a DMA handle

More Related Content

Similar to discuss the drawbacks of programmed and interrupt driven io and des.pdf

Input output in computer Orgranization and architecture
Input output in computer Orgranization and architectureInput output in computer Orgranization and architecture
Input output in computer Orgranization and architecture
vikram patel
 
Input-Output Modules
Input-Output ModulesInput-Output Modules
Input-Output Modules
Mukesh Tekwani
 
IO Techniques in Computer Organization
IO Techniques in Computer OrganizationIO Techniques in Computer Organization
IO Techniques in Computer Organization
Om Prakash
 
Direct Memory Access ppt
Direct Memory Access pptDirect Memory Access ppt
Ch 01 os8e
Ch 01  os8eCh 01  os8e
Ch 01 os8e
Syed Faisal
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
JavedIqbal549896
 
ELEC3300_09-DMA.pdf
ELEC3300_09-DMA.pdfELEC3300_09-DMA.pdf
ELEC3300_09-DMA.pdf
KwunHokChong
 
ch -6 IO.pptx
ch -6 IO.pptxch -6 IO.pptx
ch -6 IO.pptx
GadisaKanchora1
 
IO_ORGANIZATION.pdf
IO_ORGANIZATION.pdfIO_ORGANIZATION.pdf
IO_ORGANIZATION.pdf
GaganaPurshothama
 
IO and file systems
IO and file systems IO and file systems
IO and file systems
EktaVaswani2
 
Chapter 6 input output
Chapter 6 input outputChapter 6 input output
Chapter 6 input outputrisal07
 
IO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTUREIO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTURE
Hariharan Anand
 
DMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/ODMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/O
sathish sak
 
Unit 6
Unit 6Unit 6
Unit 6
pm_ghate
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3
Mujaheed Sulantingan
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3
Mujaheed Sulantingan
 
Chapter 5 IO Unit.pptx we are electrical
Chapter 5 IO Unit.pptx we are electricalChapter 5 IO Unit.pptx we are electrical
Chapter 5 IO Unit.pptx we are electrical
bayisabayecha51
 
Ch # 04 computer hardware
Ch # 04 computer hardware Ch # 04 computer hardware
Ch # 04 computer hardware
MuhammadRobeel3
 
Modes of data transfer
Modes of data transferModes of data transfer
Modes of data transfer
Shah Ishtiyaq Mehfooze
 
Input/Output System (Part 2)
Input/Output System (Part 2) Input/Output System (Part 2)
Input/Output System (Part 2)
Ajeng Savitri
 

Similar to discuss the drawbacks of programmed and interrupt driven io and des.pdf (20)

Input output in computer Orgranization and architecture
Input output in computer Orgranization and architectureInput output in computer Orgranization and architecture
Input output in computer Orgranization and architecture
 
Input-Output Modules
Input-Output ModulesInput-Output Modules
Input-Output Modules
 
IO Techniques in Computer Organization
IO Techniques in Computer OrganizationIO Techniques in Computer Organization
IO Techniques in Computer Organization
 
Direct Memory Access ppt
Direct Memory Access pptDirect Memory Access ppt
Direct Memory Access ppt
 
Ch 01 os8e
Ch 01  os8eCh 01  os8e
Ch 01 os8e
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
 
ELEC3300_09-DMA.pdf
ELEC3300_09-DMA.pdfELEC3300_09-DMA.pdf
ELEC3300_09-DMA.pdf
 
ch -6 IO.pptx
ch -6 IO.pptxch -6 IO.pptx
ch -6 IO.pptx
 
IO_ORGANIZATION.pdf
IO_ORGANIZATION.pdfIO_ORGANIZATION.pdf
IO_ORGANIZATION.pdf
 
IO and file systems
IO and file systems IO and file systems
IO and file systems
 
Chapter 6 input output
Chapter 6 input outputChapter 6 input output
Chapter 6 input output
 
IO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTUREIO SYSTEM AND CASE STUDY STRUCTURE
IO SYSTEM AND CASE STUDY STRUCTURE
 
DMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/ODMA Versus Polling or Interrupt Driven I/O
DMA Versus Polling or Interrupt Driven I/O
 
Unit 6
Unit 6Unit 6
Unit 6
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3
 
Chapter 5 IO Unit.pptx we are electrical
Chapter 5 IO Unit.pptx we are electricalChapter 5 IO Unit.pptx we are electrical
Chapter 5 IO Unit.pptx we are electrical
 
Ch # 04 computer hardware
Ch # 04 computer hardware Ch # 04 computer hardware
Ch # 04 computer hardware
 
Modes of data transfer
Modes of data transferModes of data transfer
Modes of data transfer
 
Input/Output System (Part 2)
Input/Output System (Part 2) Input/Output System (Part 2)
Input/Output System (Part 2)
 

More from info998421

If Mendel had chosen factors to follow in his pea plants poorly,.pdf
If Mendel had chosen factors to follow in his pea plants poorly,.pdfIf Mendel had chosen factors to follow in his pea plants poorly,.pdf
If Mendel had chosen factors to follow in his pea plants poorly,.pdf
info998421
 
If the significance level of a test is increased (i.e. increased fr.pdf
If the significance level of a test is increased (i.e.  increased fr.pdfIf the significance level of a test is increased (i.e.  increased fr.pdf
If the significance level of a test is increased (i.e. increased fr.pdf
info998421
 
I need an inttroduction for my paper on Conducting and Analyzing Sta.pdf
I need an inttroduction for my paper on Conducting and Analyzing Sta.pdfI need an inttroduction for my paper on Conducting and Analyzing Sta.pdf
I need an inttroduction for my paper on Conducting and Analyzing Sta.pdf
info998421
 
Identify the contributions to Microbiology made by Redi, Tyndall, an.pdf
Identify the contributions to Microbiology made by Redi, Tyndall, an.pdfIdentify the contributions to Microbiology made by Redi, Tyndall, an.pdf
Identify the contributions to Microbiology made by Redi, Tyndall, an.pdf
info998421
 
I need help with two things. First Id like someone to check over m.pdf
I need help with two things. First Id like someone to check over m.pdfI need help with two things. First Id like someone to check over m.pdf
I need help with two things. First Id like someone to check over m.pdf
info998421
 
Explain Internal Controls and Corporate Governance.SolutionInt.pdf
Explain Internal Controls and Corporate Governance.SolutionInt.pdfExplain Internal Controls and Corporate Governance.SolutionInt.pdf
Explain Internal Controls and Corporate Governance.SolutionInt.pdf
info998421
 
Environmental Laws and Acts Project Research all of the following law.pdf
Environmental Laws and Acts Project Research all of the following law.pdfEnvironmental Laws and Acts Project Research all of the following law.pdf
Environmental Laws and Acts Project Research all of the following law.pdf
info998421
 
do it on excel and please kindly upload the excel file. or explain m.pdf
do it on excel and please kindly upload the excel file. or explain m.pdfdo it on excel and please kindly upload the excel file. or explain m.pdf
do it on excel and please kindly upload the excel file. or explain m.pdf
info998421
 
Describe the structure and location of the parathyroid glands.Desc.pdf
Describe the structure and location of the parathyroid glands.Desc.pdfDescribe the structure and location of the parathyroid glands.Desc.pdf
Describe the structure and location of the parathyroid glands.Desc.pdf
info998421
 
Describe how the composition of MALT tissue bypasses the need for.pdf
Describe how the composition of MALT tissue bypasses the need for.pdfDescribe how the composition of MALT tissue bypasses the need for.pdf
Describe how the composition of MALT tissue bypasses the need for.pdf
info998421
 
C. wye D. delta E. not defined Question 6 What is the configuration o.pdf
C. wye D. delta E. not defined Question 6 What is the configuration o.pdfC. wye D. delta E. not defined Question 6 What is the configuration o.pdf
C. wye D. delta E. not defined Question 6 What is the configuration o.pdf
info998421
 
A bullet that lodges in the heart would a. be located in the ventra.pdf
A bullet that lodges in the heart would  a. be located in the ventra.pdfA bullet that lodges in the heart would  a. be located in the ventra.pdf
A bullet that lodges in the heart would a. be located in the ventra.pdf
info998421
 
Year d) interactions with other species for space or resources-classi.pdf
Year d) interactions with other species for space or resources-classi.pdfYear d) interactions with other species for space or resources-classi.pdf
Year d) interactions with other species for space or resources-classi.pdf
info998421
 
Write a program that creates a linked list of families. Each family .pdf
Write a program that creates a linked list of families. Each family .pdfWrite a program that creates a linked list of families. Each family .pdf
Write a program that creates a linked list of families. Each family .pdf
info998421
 
Why do Radicals maintain capitalism will always tend to enter into c.pdf
Why do Radicals maintain capitalism will always tend to enter into c.pdfWhy do Radicals maintain capitalism will always tend to enter into c.pdf
Why do Radicals maintain capitalism will always tend to enter into c.pdf
info998421
 
Write a C program that converts an NFA file to a DFA, where the lang.pdf
Write a C program that converts an NFA file to a DFA, where the lang.pdfWrite a C program that converts an NFA file to a DFA, where the lang.pdf
Write a C program that converts an NFA file to a DFA, where the lang.pdf
info998421
 
Which of these hypotheses cannot be tested by an experiment Biologi.pdf
Which of these hypotheses cannot be tested by an experiment  Biologi.pdfWhich of these hypotheses cannot be tested by an experiment  Biologi.pdf
Which of these hypotheses cannot be tested by an experiment Biologi.pdf
info998421
 
Which is the mode of inheritance that is most likely [That is the mo.pdf
Which is the mode of inheritance that is most likely [That is the mo.pdfWhich is the mode of inheritance that is most likely [That is the mo.pdf
Which is the mode of inheritance that is most likely [That is the mo.pdf
info998421
 
Which of the following is a good example of homoplasy (convergent ev.pdf
Which of the following is a good example of homoplasy (convergent ev.pdfWhich of the following is a good example of homoplasy (convergent ev.pdf
Which of the following is a good example of homoplasy (convergent ev.pdf
info998421
 
What happens at the mid-blastula transition in Xenopus Which part o.pdf
What happens at the mid-blastula transition in Xenopus  Which part o.pdfWhat happens at the mid-blastula transition in Xenopus  Which part o.pdf
What happens at the mid-blastula transition in Xenopus Which part o.pdf
info998421
 

More from info998421 (20)

If Mendel had chosen factors to follow in his pea plants poorly,.pdf
If Mendel had chosen factors to follow in his pea plants poorly,.pdfIf Mendel had chosen factors to follow in his pea plants poorly,.pdf
If Mendel had chosen factors to follow in his pea plants poorly,.pdf
 
If the significance level of a test is increased (i.e. increased fr.pdf
If the significance level of a test is increased (i.e.  increased fr.pdfIf the significance level of a test is increased (i.e.  increased fr.pdf
If the significance level of a test is increased (i.e. increased fr.pdf
 
I need an inttroduction for my paper on Conducting and Analyzing Sta.pdf
I need an inttroduction for my paper on Conducting and Analyzing Sta.pdfI need an inttroduction for my paper on Conducting and Analyzing Sta.pdf
I need an inttroduction for my paper on Conducting and Analyzing Sta.pdf
 
Identify the contributions to Microbiology made by Redi, Tyndall, an.pdf
Identify the contributions to Microbiology made by Redi, Tyndall, an.pdfIdentify the contributions to Microbiology made by Redi, Tyndall, an.pdf
Identify the contributions to Microbiology made by Redi, Tyndall, an.pdf
 
I need help with two things. First Id like someone to check over m.pdf
I need help with two things. First Id like someone to check over m.pdfI need help with two things. First Id like someone to check over m.pdf
I need help with two things. First Id like someone to check over m.pdf
 
Explain Internal Controls and Corporate Governance.SolutionInt.pdf
Explain Internal Controls and Corporate Governance.SolutionInt.pdfExplain Internal Controls and Corporate Governance.SolutionInt.pdf
Explain Internal Controls and Corporate Governance.SolutionInt.pdf
 
Environmental Laws and Acts Project Research all of the following law.pdf
Environmental Laws and Acts Project Research all of the following law.pdfEnvironmental Laws and Acts Project Research all of the following law.pdf
Environmental Laws and Acts Project Research all of the following law.pdf
 
do it on excel and please kindly upload the excel file. or explain m.pdf
do it on excel and please kindly upload the excel file. or explain m.pdfdo it on excel and please kindly upload the excel file. or explain m.pdf
do it on excel and please kindly upload the excel file. or explain m.pdf
 
Describe the structure and location of the parathyroid glands.Desc.pdf
Describe the structure and location of the parathyroid glands.Desc.pdfDescribe the structure and location of the parathyroid glands.Desc.pdf
Describe the structure and location of the parathyroid glands.Desc.pdf
 
Describe how the composition of MALT tissue bypasses the need for.pdf
Describe how the composition of MALT tissue bypasses the need for.pdfDescribe how the composition of MALT tissue bypasses the need for.pdf
Describe how the composition of MALT tissue bypasses the need for.pdf
 
C. wye D. delta E. not defined Question 6 What is the configuration o.pdf
C. wye D. delta E. not defined Question 6 What is the configuration o.pdfC. wye D. delta E. not defined Question 6 What is the configuration o.pdf
C. wye D. delta E. not defined Question 6 What is the configuration o.pdf
 
A bullet that lodges in the heart would a. be located in the ventra.pdf
A bullet that lodges in the heart would  a. be located in the ventra.pdfA bullet that lodges in the heart would  a. be located in the ventra.pdf
A bullet that lodges in the heart would a. be located in the ventra.pdf
 
Year d) interactions with other species for space or resources-classi.pdf
Year d) interactions with other species for space or resources-classi.pdfYear d) interactions with other species for space or resources-classi.pdf
Year d) interactions with other species for space or resources-classi.pdf
 
Write a program that creates a linked list of families. Each family .pdf
Write a program that creates a linked list of families. Each family .pdfWrite a program that creates a linked list of families. Each family .pdf
Write a program that creates a linked list of families. Each family .pdf
 
Why do Radicals maintain capitalism will always tend to enter into c.pdf
Why do Radicals maintain capitalism will always tend to enter into c.pdfWhy do Radicals maintain capitalism will always tend to enter into c.pdf
Why do Radicals maintain capitalism will always tend to enter into c.pdf
 
Write a C program that converts an NFA file to a DFA, where the lang.pdf
Write a C program that converts an NFA file to a DFA, where the lang.pdfWrite a C program that converts an NFA file to a DFA, where the lang.pdf
Write a C program that converts an NFA file to a DFA, where the lang.pdf
 
Which of these hypotheses cannot be tested by an experiment Biologi.pdf
Which of these hypotheses cannot be tested by an experiment  Biologi.pdfWhich of these hypotheses cannot be tested by an experiment  Biologi.pdf
Which of these hypotheses cannot be tested by an experiment Biologi.pdf
 
Which is the mode of inheritance that is most likely [That is the mo.pdf
Which is the mode of inheritance that is most likely [That is the mo.pdfWhich is the mode of inheritance that is most likely [That is the mo.pdf
Which is the mode of inheritance that is most likely [That is the mo.pdf
 
Which of the following is a good example of homoplasy (convergent ev.pdf
Which of the following is a good example of homoplasy (convergent ev.pdfWhich of the following is a good example of homoplasy (convergent ev.pdf
Which of the following is a good example of homoplasy (convergent ev.pdf
 
What happens at the mid-blastula transition in Xenopus Which part o.pdf
What happens at the mid-blastula transition in Xenopus  Which part o.pdfWhat happens at the mid-blastula transition in Xenopus  Which part o.pdf
What happens at the mid-blastula transition in Xenopus Which part o.pdf
 

Recently uploaded

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 

Recently uploaded (20)

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 

discuss the drawbacks of programmed and interrupt driven io and des.pdf

  • 1. discuss the drawbacks of programmed and interrupt driven i/o and describe in general the functionality of the DNA Solution Programmed I/O Programmed I/O (PIO) refers to data transfers initiated by a CPU under driver software control to access registers or memory on a device. The CPU issues a command then waits for I/O operations to be complete. As the CPU is faster than the I/O module, the problem with programmed I/O is that the CPU has to wait a long time for the I/O module of concern to be ready for either reception or transmission of data. The CPU, while waiting, must repeatedly check the status of the I/O module, and this process is known as Polling. As a result, the level of the performance of the entire system is severely degraded. Programmed I/O basically works in these ways: Interrupt The CPU issues commands to the I/O module then proceeds with its normal work until interrupted by I/O device on completion of its work. For input, the device interrupts the CPU when new data has arrived and is ready to be retrieved by the system processor. The actual actions to perform depend on whether the device uses I/O ports, memory mapping. For output, the device delivers an interrupt either when it is ready to accept new data or to acknowledge a successful data transfer. Memory-mapped and DMA-capable devices usually generate interrupts to tell the system they are done with the buffer. Although Interrupt relieves the CPU of having to wait for the devices, but it is still inefficient in data transfer of large amount because the CPU has to transfer the data word by word between I/O module and memory. The main limitation of programmed I/O and interrupt driven I/O is given below: Programmed I/O Each instructions selects one I/O device (by number) and transfers a single character (byte) Example: microprocessor controlled video terminal. Four registers: input status and character, output status and character. Interrupt-driven I/O 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
  • 2. 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). All these limitation can be overcome by the Introduction of DMA (Direct Memory Access) To write block of 32 bytes from memory address 100 to device 4 1. CPU writes 32, 100, 4 into the first three DMA registers (memory address, count, device number) 2. CPU puts code for WRITE (say 1) into fourth (direction) DMA register, which signals DMA controller to begin operation 3. Controller reads (via bus request as CPU would) byte 100 from memory 4. Controller makes I/O request to write to device 4 5. Controller increments memory address register and decrements count register 6. Controller continues this loop until count decrements to 0 7. When count becomes 0 I/O is complete and controller asserts interrupt line on bus. 8. With DMA the CPU only has to start the I/O and respond to the final interrupt 9. There is only one interrupt per block of bytes input or output 10. Some DMA controllers can do two or more simultaneous I/O operations 11. DMA process is not free – When controller wants to read/write via the bus it must make the CPU wait (DMA controller always has higher priority on bus). This process is called cycle stealing - DMA I/O is used on PCs and minicomputers. A programmed I/O needs to be polled at regular intervals to detect its state, hence, a short transition may NOT be detected. An interrupted Input will generate an interrupt a any change of state, and the CPU will respond (nearly) immediately to that change, entering and executing the interrupt routine. A program has to wait and repeatedly tests the status; Waiting period for an asynchronous event can be too large Many I/O devices generate asynchronous events— events that occur at times that the processor cannot predict or control, but which the processor must respond to reasonably quickly to provide acceptable performance Direct Memory Access (DMA) Direct Memory Access (DMA) means CPU grants I/O module authority to read from or write to memory without involvement. DMA module controls exchange of data between main memory and the I/O device. Because of DMA device can transfer data directly to and from memory,
  • 3. rather than using the CPU as an intermediary, and can thus relieve congestion on the bus. CPU is only involved at the beginning and end of the transfer and interrupted only after entire block has been transferred. Direct Memory Access needs a special hardware called DMA controller (DMAC) that manages the data transfers and arbitrates access to the system bus. The controllers are programmed with source and destination pointers (where to read/write the data), counters to track the number of transferred bytes, and settings, which includes I/O and memory types, interrupts and states for the CPU cycles. DMA increases system concurrency by allowing the CPU to perform tasks while the DMA system transfers data via the system and memory busses. Hardware design is complicated because the DMA controller must be integrated into the system, and the system must allow the DMA controller to be a bus master. Cycle stealing may also be necessary to allow the CPU and DMA controller to share use of the memory bus. Direct Memory Access (DMA) is a capability provided by some computer bus architectures that allows data to be sent directly from an attached device (such as a disk drive) to the memory on the computer's motherboard. The microprocessor is freed from involvement with the data transfer, thus speeding up overall computer operation. Usually a specified portion of memory is designated as an area to be used for direct memory access. In the ISA bus standard, up to 16 megabytes of memory can be addressed for DMA. The EISA and Micro Channel Architecture standards allow access to the full range of memory addresses (assuming they're addressable with 32 bits). Peripheral Component Interconnectaccomplishes DMA by using a bus master (with the microprocessor "delegating" I/O control to the PCI controller). An alternative to DMA is the Programmed Input/Output (PIO) interface in which all data transmitted between devices goes through the processor. A newer protocol for the ATA/IDE interface is Ultra DMA, which provides a burst data transfer rate up to 33 MB (megabytes) per second. Hard drives that come with Ultra DMA/33 also support PIO modes 1, 3, and 4, and multiword DMA mode 2 (at 16.6 megabytes per second) The DMA functions are: ddi_dma_alloc_handle() Allocate a DMA handle ddi_dma_free_handle() Free a DMA handle ddi_dma_mem_alloc() Allocate memory for a DMA transfer ddi_dma_mem_free()
  • 4. Free previously allocated DMA memory ddi_dma_addr_bind_handle() Bind an address to a DMA handle ddi_dma_buf_bind_handle() Bind a system buffer to a DMA handle ddi_dma_unbind_handle() Unbind the address in a DMA handle ddi_dma_nextcookie() Retrieve the subsequent DMA cookie ddi_dma_getwin() Activate a new DMA window ddi_dma_numwin() Retrieve number of DMA windows ddi_dma_sync() Synchronize CPU and I/O views of memory ddi_check_dma_handle() Check a DMA handle ddi_dma_set_sbus64() Allow 64-bit transfers on SBus ddi_slaveonly() Report whether a device is installed in a slave access-only location ddi_iomin() Find the minimum alignment and transfer size for DMA ddi_dma_burstsizes() Find out the allowed burst sizes for a DMA mapping ddi_dma_devalign() Find DMA mapping alignment and minimum transfer size ddi_dmae_alloc() Acquire a DMA channel ddi_dmae_release() Release a DMA channel ddi_dmae_getattr() Get the DMA engine attributes ddi_dmae_prog() Program a DMA channel ddi_dmae_stop()
  • 5. Terminate a DMA engine operation ddi_dmae_disable() Disable a DMA channel ddi_dmae_enable() Enable a DMA channel ddi_dmae_getcnt() Get the remaining DMA engine count ddi_dmae_1stparty() Configure the DMA channel cascade mode ddi_dma_coff() Convert a DMA cookie to an offset within a DMA handle