• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 41
  • Last Modified:

Data Flow in Computers.

Data Flow in Computers.

When Data is entered in a Computer, for instance you open up an Excel Spreadsheet, or you enter data in a program that will process that data in order to give you a result.

will the Data first be loaded to RAM then Goes to CPU then gets saved in Disk ?
what is the correct flow ?

Thank you
0
jskfan
Asked:
jskfan
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
Omar SoudaniSystem Support EngineerCommented:
Actually, RAM works in conjunction with the CPU; Each application requires a minimum amount of temporary memory to operate efficiently. RAM is only responsible for holding data while an application is running.
0
 
jskfanAuthor Commented:
when you open up Excel for instance, the whole Data will go to RAM, if RAM is full it puts some in the DIsk (Paging file) and if there is anything that requires processing it will be handed ou to the CPU by the RAM.
0
 
Omar SoudaniSystem Support EngineerCommented:
Many applications load only the essential parts of the program initially and then load other pieces as needed. After an application is loaded, any files that are opened for use in that application are loaded into RAM. When you save and close the application the data will be deleted from the RAM. The CPU calls the required data from the RAM process it and send it back to the RAM in a continuous cycle.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Dave BaldwinFixer of ProblemsCommented:
The CPU manages all of that.  Though DMA may be used to get data from the disk to RAM, the CPU sets that up and starts it.  If you type something or use the mouse for something, the CPU runs the code that detects those things and responds to the event.  When you save a file or close the program, the CPU sets that up and executes it.  The CPU is in the middle of almost everything that happens in a computer.
0
 
nociSoftware EngineerCommented:
Simple question, not so simple answer....

Some computers handle demand paged virtual memory. (ie. Memory that is store on disk if physical RAM is not available). This is handled by a pager/swapper process in most of the cases. (handles transparantly wrt. applications).
For normal processing the CPU fetches the data from RAM and stores the result back there. To get the initial data there a file is read into RAM. For large files a program may choose to only load part of the data and only load the active parts. (depending on program design, file & memory sizes.) Mostly this partial loading is doen through intermediate files that are better design for updated processing.

Most of the transfers between RAM and Disk are done by controllers running in DMA mode (notable exceptions xt509 (PC-hadrdisks) &  and subsequent IDE disks).  DMA mode only involves the CPU is setting up & closing the IO transfer.
Without DMA mode the CPU has to handleall memory to disk transfers (write) and the revers (read) as well byte by byte.

That said... CPU doesn't talk to RAM directly there are 2 - 3 levels of caching in between those. As a CPU operates on far higher frequencies wrt. RAM.
Disks are effectively small computers that also can cache data for faster transfers.
0
 
jskfanAuthor Commented:
I thought nothing goes to CPU before it gets stored in RAM, in other words everything is loaded to RAM and CPU fetches needed Data from RAM processes it and put it back in RAM.
For instance if you open Excel some if it is Data is loaded to RAM and the rest stays  in Disk,  CPU will fetch Data that needs processing and puts it back into memory. When you Click Save, RAM will put some Data on Disk (probably CPU will signal RAM to put specific Data on disk).
When you close the Application RAM clears the Data from itself.

*** If I can put it this way :
Disk is slow Storage
RAM is very Fast Storage
CPU is Calculator, Shaper, Modeler, you name it....
0
 
nociSoftware EngineerCommented:
CPU is calculator (with conditional stepping) not more not less.
Memory is stepped, from FAST -> SLOW...
CPU Registers, Cache 1st (per Core), Cache 2nd (Per CPU), Cache 3rd(per Socket), RAM buffers, RAM, SDD, Magnetic Disk, Tape,  (Off-line storage of Disk/Tape/...), if you wish... paper, parchment, clay tablet, sand stone, ... granite.
Granite is hard to write, but is solid memory for thousands of years.....

CPU can actualy only operate on registers.... so stuff needs to be loaded from some memory into registers for manipulations.
Older PC's hade no DMA controllers, so the CPU needed to do EVERYTHING also byte / byte read from a disk and storing the data in RAM. (Drivers did that for you), while you program thought only of reading files..., the OS maps files onto blocks etc.
0
 
jskfanAuthor Commented:
Thank you Guys
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now