I understand that data is transferred from the main memory to the CPU and vise versa using the data bus. But, I am unable to understand, how the data is being transferred from the main memory to the hard disk or from the hard disk to main memory. Does it use the same data bus for the transfer? My guess is that it also involves the use of a DMA controller. But the address bus has the address for the main memory, how does it finds the address of the hard disk? For the file reading, CPU sends the read request but what is stored in the address bus? the actual hard disk address or the memory address? but how the data will be directly accessed from the memory?

  • $\begingroup$ It’s magic. Well, it’s not, but “it’s magic” is as good as any other answer. $\endgroup$
    – gnasher729
    Dec 4, 2021 at 18:48
  • $\begingroup$ See here: cs.stackexchange.com/questions/142525/… $\endgroup$
    – user123
    Dec 4, 2021 at 20:07
  • $\begingroup$ I answered pretty much to the same question earlier. $\endgroup$
    – user123
    Dec 4, 2021 at 20:07
  • $\begingroup$ Does [data between memory and secondary storage] use the same data bus [as between main memory and CPU? Depends. Both has been used, and I would be stunned if either isn't any-more. $\endgroup$
    – greybeard
    Dec 4, 2021 at 21:27
  • 2
    $\begingroup$ (@gnasher729: the technical term is electrickery.) $\endgroup$
    – greybeard
    Dec 4, 2021 at 21:28


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.