1
$\begingroup$

Suppose in an architecture, interrupt driven IO is used. And suppose a program is to be loaded from an IO device into the RAM. I have been studying IO mechanisms and I came to know that upon receiving a request to load a program, the processor generates control signals to the IO module and then the data is loaded into the IO module interface buffer. When its done loading, it will generate an interrupt to CPU.

But how does a complete file or program gets transferred to RAM? I mean does the processor issues requests only for a byte/word transfer at a time and the interrupt is raised each time a word gets transferred from io device to module? Or is it something else? Please help me understand.

$\endgroup$
  • $\begingroup$ It depends on the specific IO device. There is no single answer. Can you be more specific about what kind of device you have in mind? Are you thinking of a hard disk? On what kind of system? Different systems do it differently (modern ones use different mechanisms than older ones). Today some might use DMA. $\endgroup$ – D.W. Jun 19 '18 at 20:19
  • $\begingroup$ If suppose an interrupt is generated by the IO module, and then an ISR runs. My question is that the process was file transfer. So each time the processor wants some section of the IO device, it has to update the associated ISR? Because the instructions will be different for each transfer. $\endgroup$ – Rajat Jun 19 '18 at 20:27
1
$\begingroup$

I modern architectures the peripheral has direct access to the system RAM independent of the CPU and what it is executing. This is called a DMA (direct memory access) transfer.

In other words when the interrupt is raised the entire transfer is already completed and you can read the data transferred.

$\endgroup$
  • 1
    $\begingroup$ I am asking about the interrupt driven IO. In such a case, if the word gets transferred to the interface register in the io module, it raises an interrupt. So does the ISR have to be updated every time because for different word transfers different instructions will be used? Please clarify me this $\endgroup$ – Rajat Jun 20 '18 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.