top of page
Search

What is RAM (Random Access Memory)

Updated: Mar 6, 2020


RAM is part of the computer memory.


After the magnetic hard drive or SSD, RAM is the biggest piece of memory which exists on the computer hardware. RAM is used to store the programs and data being used by the CPU in real time. The data on the random access memory can be read, written, and erased any number of times.


It is a volatile memory which means the data stored in the RAM evaporates the moment you cut the power supply. That’s one of the reasons we can’t use random access memory as permanent storage despite the fact that it’s way faster than the traditional magnetic disk-based hard drives.


All of the modern operating systems we use have built-in workarounds to handle RAM’s volatile nature. All the work done is constantly saved on the hard drive to avoid situations where unexpected system shutdown would result in data loss.


RAM


Data

The data is not permanent and it can be altered any number of times.


Speed

It is a high-speed memory.


CPU Interaction

The CPU can access the data stored on it.


Size and Capacity

Large size with higher capacity.


Usage

Primary memory (DRAM DIMM modules), CPU Cache (SRAM).


Cost

It doesn’t come cheap.


The term "memory", meaning "primary storage" or "main memory", is often associated with addressable semiconductor memory, i.e. integrated circuits consisting of silicon-based MOS transistors[5], used for example as primary storage but also other purposes in computers.


Most semiconductor memory is organized into memory cells or bistable flip-flops, each storing one bit (0 or 1).


The memory cells are grouped into words of fixed word length, for example 1, 2, 4, 8, 16, 32, 64 or 128 bit.


Non-volatile memory is computer memory that can retain the stored information even when not powered. Examples of non-volatile memory include read-only memory (see ROM), flash memory, most types of magnetic computer storage devices (e.g. hard disk drives, floppy disks and magnetic tape), optical discs, and early computer storage methods such as paper tape and punched cards.


Bugs


Improper management of memory is a common cause of bugs, including the following types:


In an arithmetic overflow, a calculation results in a number larger than the allocated memory permits. For example, a signed 8-bit integer allows the numbers −128 to +127. If its value is 127 and it is instructed to add one, the computer can not store the number 128 in that space. Such a case will result in undesired operation, such as changing the number's value to −128 instead of +128.


A memory leak occurs when a program requests memory from the operating system and never returns the memory when it's done with it. A program with this bug will gradually require more and more memory until the program fails as it runs out.


A segmentation fault results when a program tries to access memory that it does not have permission to access. Generally a program doing so will be terminated by the operating system.


A buffer overflow means that a program writes data to the end of its allocated space and then continues to write data to memory that has been allocated for other purposes. This may result in erratic program behavior, including memory access errors, incorrect results, a crash, or a breach of system security. They are thus the basis of many software vulnerabilities and can be maliciously exploited.


Kernel


The kernel is a computer program at the core of a computer's operating system with complete control over everything in the system. It is the "portion of the operating system code that is always resident in memory". It facilitates interactions between hardware and software components.


Virtual memory is a memory management capability of an operating system (OS) that uses hardware and software to allow a computer to compensate for physical memory shortages by temporarily transferring data from random access memory (RAM) to disk storage.








Recent Posts

See All

Generative AI report

Top GenAI companies: OpenAI Google Anthropic Meta Mistral Stability AI MidJourney Top GenAI Models GPT 4 Gemini 1.5 Llama2 Mistral Claude Stable Diffusion

bottom of page