PDA

View Full Version : ? regarding general computer architecture



exhausted mule
10-09-2006, 02:25 AM
i'm hoping someone with general knowledge of the transport of data through the architecture of the general pc could answer this.

i'm wondering if the data being transfered from say your sata lanes (Hdd/diskdrives) has to be computed (pass through the cpu) in order to get into any other lane offered by the nb/sb.

my question really is that if a given set of data or intructions is present on the ram for example and needs to be cached will the cpu just put the instruction set (ex: telling the NB put data located here and here to here and here) on the fsb for the nb and leave at that?

or does the cpu put the request on the fsb, the nb retreives the data passes it to the cpu which computes the data and returns it onto the nb for proper allocation?

i quess it would matter if the data has to be "processed" (sized differently or allocated/ ordered differently) if so then it would have to go through the cpu (unless the nb allready does that) and not if the data just needs to be moved.


i hope someone could answer this

largon
10-10-2006, 12:39 PM
CPU only deals with data it needs for executing instructions, it isn't a data hub. For example, if the data from the RAM is to be written onto the HDD, the CPU orders the massmemory controller - which usually is located on the SB - to do the transfer.
Depending on the massmemory controller's design, some level of CPU usage might be needed for all data transfers require some processing.

To answer you question:
Data moving between different components doesn't necessarily pass through the CPU.

uOpt
10-10-2006, 02:14 PM
i'm wondering if the data being transfered from say your sata lanes (Hdd/diskdrives) has to be computed (pass through the cpu) in order to get into any other lane offered by the nb/sb.



Unless you use PIO mode all disk transfer go directly from disk controller to RAM via DMA.




my question really is that if a given set of data or intructions is present on the ram for example and needs to be cached will the cpu just put the instruction set (ex: telling the NB put data located here and here to here and here) on the fsb for the nb and leave at that?



If I understand your question correctly, yes. The driver sends commands to the chip on the disk controller which tells it to place the data from a given disk block directly into a given piece of memory, respectively it tells the DMA controller to do so.




or does the cpu put the request on the fsb, the nb retreives the data passes it to the cpu which computes the data and returns it onto the nb for proper allocation?



The commands of couse go through the CPU, but the data from the disk block does not.




i quess it would matter if the data has to be "processed" (sized differently or allocated/ ordered differently) if so then it would have to go through the cpu (unless the nb allready does that) and not if the data just needs to be moved.


The transfer from the disk to memory happens without things flowing through the CPU.

But there is a fair bit of CPU overhead involved anyway. If the read request is the result of a page fault then you have a TLB walk and a trap to initiate the disk transfer. If the read request is not O_DIRECT, then the blocks retrieved from the disk controller will be indexed for the filesystem buffer cache which is failry expensive CPU-wise.

It is also important to understand that in modern computer systems there is almost never free memory. For every piece of data that you want to read from disk the OS will have to make space, or even if there was enough free memory, the OS might decide after the disk transfer that it now needs to re-expands it's list of free memory.

Making space for new disk blocks can be anything from dropping fileystem cache data, dropping readonly mapped pages (on most OSes there's not really a difference between the two) or even moving read-write or copy-on-write pages to swapspace (expensive!).

exhausted mule
10-10-2006, 11:27 PM
Hmmmm.....


thanks.