Saturday 9 December 2017

Interaction between CPU and RAM

Interaction between CPU and RAM
Interaction between CPU and RAM 

CPU and RAM are the two most conspicuous computer components and interact most frequently with each other. This is because every data or instruction that is to be executed by the CPU; is fetched from the RAM (also known as main memory or volatile memory as the data is stored temporarily in RAM and is lost if we do not save the data in hard disk). CPU also stores the processed data and instructions in RAM.

A computer system consists of various components of which every component is assigned a categorical task to perform as the respective component is contrived for an exclusive purpose. But the computer components cannot perform these tasks properly unless they communicate with each other. Different components of a computer system communicate with each other through buses. These buses are communication channels that are basically routes for connecting different computer components with each other. Like other computer components; CPU and RAM also communicate with each other using buses. The buses that are responsible for the interaction between CPU and RAM are called System Buses. System buses, including data bus, address bus and control bus allow the communication between CPU and RAM. Data is carried between CPU and RAM with the help of these buses.

Interaction between CPU and RAM


Interaction between CPU and RAM usually takes place when:

·         CPU reads the data from RAM
·         CPU writes the data to RAM

We should better not leave the above lines without elaborating as definitely you would be curious about how these two interactions exactly take place...

            CPU reads the data from RAM


System buses take the whole charge of communication between RAM and CPU. Following steps are performed when CPU wants to read the data from RAM.

1.       CPU places the read request on control bus


When there is a need to read the data from RAM, CPU requests the main memory through control bus. Control bus, a type of system bus that is responsible for carrying different commands between RAM and CPU, helps CPU read the data and instructions from RAM by sending it the "read" command.

2.       CPU places the address of required data on address bus


Another category of system bus, the address bus, is chargeable for transmitting the address of the required data between CPU and RAM. For reading the data from RAM, first CPU sends the "read" request to main memory through control bus but this step is not enough for the main memory to allow CPU read the data because RAM need to know that which data CPU wants to read at the respective time. For that purpose CPU gets the help of address bus to send the address of the data CPU wants to read from RAM.

3.       RAM puts the required data on data bus


As soon as the RAM reads the command that CPU has conveyed through control bus and the address of the particular data that has been carried by the address bus, it puts the required data on the data bus. As the application of the data bus is clear from its name, it is used to carry the data and instructions between CPU and RAM. Hence the required data is sent from RAM to CPU through data bus.

4.       CPU reads the data from data bus


Now we reached the final step of this process that let CPU read the data from RandomAccess Memory (RAM). The data, which is lugged by the data bus from RAM, is read by CPU. CPU has provided different commands and address of the desired data to the RAM through control bus and address bus to let it know about data it exactly want to read. System buses have been proved very reliable in the accomplishment of this whole process.

CPU writes the data to RAM


The steps necessary for the completion of this process are somehow similar to those that were needed in the preceding process. However, some alterations take place as in this case CPU wants to write the data to RAM. The steps involved in this process are given below.

1.       CPU places the write request on control bus


Previously, when CPU wanted to read the data from RAM, it placed the "read" request on the control bus. Similarly in this process, CPU places the "write" request on the control bus in order to write the data to the memory unit. Control bus carries this "write" command to the memory.

2.       CPU places the address of the word where it wants to write the data on address bus


After sending the "write" command for making the request to write the data to the memory unit, CPU is required to send the address of that word in the memory unit where CPU wants to write the data. CPU places the address of this word on the address bus which carries it to the RAM.

3.       CPU puts the data on data bus


When the address bus carries the address of the word (to which the data is to be written) from CPU to RAM, RAM recognizes that word and gets ready for the operation that is going to be performed by the Processor. The processor then places the data on the data bus which carries it to the RAM.

4.       RAM places the data in the required word


RAM on receiving the data from data bus, stores this data in the word the address of which was sent by the CPU through address bus. Hence, after these four main steps, CPU becomes successful in writing the data to RAM.




     

No comments:

Post a Comment

Top 10 uses of python-Why choose Python?

Why Choose Python? Computer programming is one of the most popular and demanding courses in the field of technology . Programm...