A brief description of computer memory.
A Brief Introduction to Computer Memory
Computer memory is only like a container and an essential computer component that helps store programs and data for processing. However, this component is not involved in any data processing.
What are the Different Types?
In a computer, there are two types of memory: primary and secondary. While RAM is a part of primary memory and is used to store data temporarily, secondary memory includes devices such as ROM, hard drives, and USB drives and is used to store data permanently.
What Constitutes a Primary Memory?
Primary memory, also known as RAM (Random Access Memory), consists of an array of bytes with different capacities like 2 Gega Bytes, 4 Gega Bytes, 8 Gega Bytes, to multiples of 8 Gega Bytes. Most people use RAM of 8gega bytes or 16 Gega bytes, but 32 Gega Bytes or 64 Gega Bytes can be considered for higher performance.
What Constitutes a Secondary Memory?
Secondary memory is either built into the computer system or connected from external sources to the computer. Some examples of secondary memory are hard disk, SD Card, solid-state drive, pen drive, and others. Secondary memory is non-volatile, meaning it can retain or hold data even when the computer is switched off. Hence, such devices are used to store programs and data longer. Although hard drives are more popular among the various secondary storage devices, solid-state drives are slowly becoming familiar as they can keep the data magnetically over the spinning disks, making them more efficient in terms of fastness or reliability than traditional hard drives.
Importantly, all the compiled or executable files in machine language formats, ROM files, are sent to the RAM. To elaborate, the dot e x e files of c programming which are in binary form of structured programming, and dot class files of java that are byte code in binary form of object-oriented programming, are stored inside the hard disk and will be sent to the RAM to initiate processing upon calling for execution.
What is the Structure?
The main memory or RAM is organized into many layers as a stack. Here, stack means one end will be closed, and another will be open.
These layers are occupied with various data. A few of them include the kernel and unused space. With the kernel occupying the bottom end, the unused space is on the top. While the kernel is part of the operating system, the programmer’s data will occupy the unused space.
What is a Kernel in Computer Memory?
The kernel is a vital component of an operating system that resides inside the memory. It is crucial in bridging the operation gap between computer applications and hardware and enables interaction between software and hardware components. Furthermore, with the kernel being the core component of an operating system, it can control all other parts and software of the system. As a result, the kernel is the first to be loaded soon after starting the system as it needs to manage and integrate other things in the operating system. It stays within the memory till the shutting down of the operating system. Hence, if the kernel gets damaged, the computer cannot start.
With the kernel playing a critical role in a computer’s operation, the space allocated to the kernel inside the computer memory needs careful protection. So, the loading of the kernel is done into a protected location of memory. The protected space ensures that the data inside the kernel is safe from overwriting. The data from user applications or application software loads into the user memory space.
A Brief Overview of RAM Organization
Let’s see how the data is organized inside the RAM. For example, if the programmer is writing a program named A, B, C, D. The data is organized as shown in Figure 1, the Load Process C.
In the second scenario, the B program will not be visible because the B program has been executed as a result, the information is swiped out with some space. (For better understanding, please watch the video above.)
In the third scenario, another new program, “D,” will be loaded with a 5-instruction set. In such a case, the space left out by the B program is being used in addition to the space below the C program.
Otherwise, it may push the C program further down to make way for the D program. Thus, during this data organizing, the RAM follows its own algorithm.