The most important computational unit is the CPU, which requires a large amount of data to execute several instructions.
This information is in the form of bits and bytes. This binary digital information is stored in the storage or memory devices. Initially, all storage devices were known as memory, but today, memory means the semiconductor storage device called random access memory or RAM.
The first computers used delay lines, magnetic drums, William tubes, etc. to store data. These devices provide an extremely low access rate. But with the invention of transistors, radical changes were introduced in the techniques of memory implementation. Depending on storage capacity, access speed and volatility, data storage can be divided into primary storage and secondary storage.
The primary storage or random access memory commonly referred to is the memory directly accessible to the CPU. The CPU constantly reads the instructions in this memory. The capacity of RAM in terms of data storage is lower, but it offers a very fast access speed, which is quite expensive. It offers minimum latency, therefore, it is suitable for transactional environment databases. Primary storage also consists of processor registers and processor cache.
- Processor registers: Processor registers, located inside the CPU, are used to load instructions for execution by the CPU. The registers contain data words of size 32 or 64 bits. They are the fastest means of data storage. But they are capable of storing data of a very small size.
- Processor cache: the processor cache memory is part of RAM and is used to speed up executions. Copy the most used data from the main memory and store it. When the CPU needs the particular data element, it can simply access the cache that is nearby, instead of accessing the much slower main memory.
However, primary storage allows faster access, it is highly volatile in nature, that is, it is erased during startup. To avoid this, a small boot program (BIOS) is implemented. The BIOS loads the boot instructions from the non-volatile main memory and executes them to boot the RAM. The problem of volatility can be avoided by using read-only memory (ROM). Although ROM retains the program’s instructions, it does not allow you to add or change them.
Secondary storage is commonly referred to as a hard drive. It is a non-volatile storage and is capable of storing large amounts of data. The term “secondary” refers to the inability of the CPU to access it directly. The CPU accesses the data in secondary storage through intermediary devices such as the processor cache. The computer uses its secondary storage through several input / output channels. Because secondary storage is not volatile, it is used for secure storage or without data connection. The data in the secondary memory is organized in files, directories and units. Units are periodically formatted to provide abstraction as required by FileSystem.
Commonly used secondary storage devices include flash drives, USB sticks, punch cards, floppy disks, CDs, magnetic tapes, Iomega Zip tapes, etc. However, secondary storage provides very slow access, is much cheaper than primary storage and is capable of storing much larger data volumes.
Modern computer operating systems implement virtual memory to efficiently use the space available in primary memory. As for secondary memory, it is still an important means to store data and recover it in times of crisis.