STORAGE IN SMARTPHONES (RAM & ROM)

When you use a smartphone, bit and pieces of information that you generate like a new friend’s phone number that you saved, a picture you took, a movie you downloaded to watch later etc. are all saved as data in your smartphone. Even the apps that you use also save information about your use e.g. games will save your progress so that you simply continue from where you stopped, Instagram, Facebook, Telegram and WhatsApp saves pictures and videos you have viewed before so you do not have to spend data loading them all over again. This type of saved data is called Cache.
All this data generated have to be saved somewhere on the device, right? The RAM and Flash memory.

RANDOM ACCESS MEMORY (RAM)
RAM is also known as Random Access Memory. This is a type of memory that sits very close to the CPU cores. It is the middleman or link between the files stored on the flash memory (ROM) and the CPU cores. It acts as a workbench for the CPU.

(Image credits: Samsung)

Remember when you were in primary (or elementary) school and you needed to solve math problems? Yeah, most of the time, you might have needed a piece of disposable paper to work with. You used that paper to count, subtract or divide and as soon as you got your answers, you simply squeezed the paper into a ball and tossed it away. Some of us didn’t use pieces of paper, we have used the back pages of our notebooks or even bought a special note just for counting but it is still the same thing. When carrying out work, you needed a temporary space to work with and as soon as you were done, you cleared your desk. That piece of paper you used to solve that math problem could be said to be your RAM.

The RAM serves this function for the CPU cores. RAM provides memory space for the CPU to work on e.g. playing a game or making a call. After you are done, the apps are simply cleared from that space to make room for the current CPU task. Critical files such as components of the Operating System, App data, game graphics, location of all the files on the device etc. are stored in the RAM. Whenever the CPU cores need data to work on, the RAM quickly presents the data or location of the data to the CPU cores for an easy and quick retrieval.

The RAM also stores processes of apps that are running. If for example, you’re playing Pro Evolution Soccer and a message from WhatsApp comes in, you can pause the game and leave the app, the RAM will keep the app process saved. After you are done replying the message, you can simply go back and continue your game. This act of keeping two or more apps running simultaneously in the RAM memory is referred to as Multitasking.

If you are very observant, you’ll notice that parts of your RAM are always occupied even the phone is seemingly idle. If you use a 4GB RAM phone, you may only find 2GB or even less free for you to use. This is because the operating system (Android or iOS) is always constantly running in the background.

Other processes such as your network modems which keep your phone connected to the internet is constantly running as well. Apps like Facebook, Whatsapp, SMS, Dialer etc. are also running in the background and these eat up a good part of the RAM space. If too many apps are open in the background and the RAM is full, the OS (Operating System i.e. Android or iOS) may kill some apps so as to keep the phone running smoothly.


TYPES OF RAM

All RAM is use today are basically divided into two forms: Static and Dynamic RAM.

A static RAM is a type of RAM on which the data on it is loaded, fixed and doesn’t need refreshing. It needs power all the time to retain its data because RAM is a volatile type of memory. This means that once its power supply is cut, it loses all the data saved to it.

Dynamic RAM on the other hand is dynamic (changes and needs to be refreshed) but it doesn’t need constant power to retain information. When power is restored after a power cut, it simply reloads the necessary data from the flash storage (ROM) as the device is turning on (booting).

The types of RAM available today are
i. Static RAM (SRAM)
ii. Dynamic RAM (DRAM)
iii. Synchronous Dynamic RAM (SDRAM)
iv. Single Data Rate Synchronous Dynamic RAM (SDR SDRAM)
v. Double Data Rate Synchronous Dynamic RAM (DDR SDRAM)
vi. Graphics Double Data Rate Synchronous Dynamic RAM (GDDR SDRAM)

DRAM responds immediately to a single instruction. SDRAM waits for a clock cycle to begin before responding to an instruction. SDR SDRAM shows that the RAM only responds to a single information per clock cycle. SDRAM and SDR SDRAM are one and the same. DDR SDRAM responds to two or more instructions per clock cycle at once greatly improving multitasking and CPU speed. GDDR SDRAM is used for graphic cards in gaming PCs.

All smartphones today use a low powered DDR SDRAM along with their processor cores. They are called LPDDR SDRAMs. There are LPDDR, LPDDR2, LPDDR3, LPDDR4, LPDDR4x and LPDDR5. Most phones should use at least an LPDDR3 if it is old. The newer ones use LPDDR4 and LPDDR4x. The high end Flagships use LPDDR5.


RAM SPEED AND SIZE

The space of the memory is very important and manufacturers use it as a selling point for most of their phones these days. In the early days of smartphones, we had RAM sizes as small as 256MB and 512MB. My old Innjoo F3 tablet had 512MB of RAM. These days however, the lowest you’ll find is 1GB. Moving on there is 2GB, 3GB, 4GB, 6GB, 8GB and flagships with as much as 12GB. These days it is advisable to not go below 2GB of RAM if you are buying a phone.

Whilst most people talk about RAM sizes, they neglect to talk about RAM speeds. RAM speeds are also very important. A slow RAM could lag and ultimately slow down the performance of your device. The speeds of RAMs are measured in megahertz (MHz). A good RAM should run at 1600MHz and above. Then there’s also the read and write speeds of the different types of RAM. LPDDR5 is definitely the fastest around currently.


FLASH MEMORY (INTERNAL STORAGE)

Flash memory is a type of non-volatile storage medium that retains all data after power has been cut off. It is referred to as ROM (or Read Only Memory) by a lot of people but this is not exactly true as both the user and the OS can write data to the memory and modify it.

It is pertinent to note that you do not get the exact amount advertised by the manufacturer. This is because the Operating System (OS) is also saved to the internal memory as well. So if you were buying a phone that supposedly has 32GB of internal storage, you may end up only accessing 20GB of the said storage. Entry level devices come with 8 or 16GB, budget devices come with 16GB or 32GB, mid-rangers could have between 32 to 64GB, some go as high as 128GB.
Since the flash storage is interfacing with the RAM and CPU cores, the read and write speeds tend to be quick and with very little latency.
There are two types of internal flash memory: eMMC and UFC.

eMMC is older and cheaper but it is also slower and can only carry out one instruction at a time.

UFS (Universal Flash Storage) is much faster and can execute multiple instructions but it is more expensive.

EXTERNAL STORAGE

Due to the fact that the internal storage space may not be sufficient, added to the fact that apps, videos, photos are getting heavier with each new android generation, more storage space is needed. Only Android OS supports external SD card storage. Apple/iPhones do not support external SD cards because many users could buy slow or faulty SD cards which then slows the whole system down. I have met many android users who rave about how smooth an iPhone is but yet refuse to remove their external SD cards from their android devices.
The speed of SD cards are rated in classes. The cheap ones are usually around class 3 (speeds of 3MB/s) while the faster more expensive ones are around class 10 (10MB/s).
Phones can also interface with hard disk drives (HDD) or solid state drives (SSD) these days so you could also save your data to these forms of memory.


This brings us to the end of this post, don’t forget that the comment section is open to you for questions and contributions. See you in the next blog post.

2 comments

Tell us what you think about the article and what you would love to see in future. Please keep all comments nice and respectful.