What is RAM ?
The long form of “RAM” is Random Access Memory. RAM is a type of memory storage in a computer. This is short-term memory storage, and it will not store data permanently. RAM is volatile memory, meaning it loses its data when the computer is switched off.
Functionality of the RAM
RAM is used to process tasks more efficiently. RAM helps the CPU read data faster. It holds short-term data and instructions the CPU needs at the moment to run programs. To better understand this concept, we will take a small example.
Think of backing a cake. The first thing to do to make cake is to go to Supper Market and grab the ingredients for the cake. After buying all the necessary ingredients, you will store them in a cupboard to grab things when you need them. Finally, you start to prepare the cake. Now you will pick the ingredients from the cupboard and bring them to the kitchen to prepare the cake.
Now apply this same concept to the process of the RAM. refer to the supper market as the hard drive. The hard drive is the place where all the data on the computer is stored. Refer to the Cupboard as the RAM. All the necessary data is stored in the RAM to quickly read and process the task. Refer to the kitchen as the CPU, where the data is fetched and programs run.
As mentioned before, RAM is a short-term memory. This memory is useful for computers to process tasks in an efficient way. When you click on something (for example, opening an application), first the CPU will send a signal (a system call) to the operating system, and then the operating system will locate the application file on the drive. After locating the necessary data for the program, the operating system will load the data from the drive into RAM.
RAM can hold many processors, depending on the capacity of the RAM. In the above diagram, you can see there are four processes being loaded into the RAM except for the operating system (OS will be loaded in the first place when we boot our computer). You can see a real example of the current processors that are running at the moment by executing the task manager (to open task manager on your computer, press ctrl + shift + ecs). Below, I have given an example of the task manager with some processes.
According to the task manager application, we can see 72% of memory space has already been used by the processes. This memory space can be referred to as the RAM space, so we can say 72% of RAM is filled with some processes.
After loading the data into the RAM, the OS will start processing each process. When the process is completed, the data from the process will be stored again on the drive, or in some instants, it won’t.
For example, if you open a word application and start writing a document, after you finish the task, you may save the document, so when you click save and close the application, it will store again in the drive, or else you may think that you didn’t save the file before closing the word application. In that case, only the process will be removed from the RAM but won’t store in the drive because there is no data to store inside the drive.
Summery
RAM is a component in the computer hardware that is used by the CPU to fetch data and instructions to run programs in an efficient way. The more space there is in RAM, the faster the process is.