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
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Omar SoudaniSenior System 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.
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.
Omar SoudaniSenior System 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.
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

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.
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.
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....
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jskfanAuthor Commented:
Thank you Guys
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.