Computer Memory

Hardware
Computer Memory

A Computer Memory is a device that is used to store information or data in a computer or related computer hardware device.

It typically refers to Semiconductor Memory (a digital electronic semiconductor device used for digital data storage), specifically metal–oxide–semiconductor (MOS) memory

Computer memory operates at a high speed.

Types of Computer Memory :

  • Volatile, that requires power to maintain the stored information. Eg : static RAM (SRAM) or dynamic RAM (DRAM). Technologies competing with SRAM and DRAM include Z-RAM and A-RAM.
  • Non Volatile, that can retains the stored information even when not powered. Eg : read-only memory (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.

The above devices are Primary storage or Main memory.

Computer main memory comes in two principal varieties:

  • random-access memory (RAM)
  • read-only memory (ROM)

Did You Know

RAM can be read and written to anytime the CPU commands it,
but ROM is preloaded with data and software that never changes, therefore the CPU can only read from it.

ROM is typically used to store the computer's initial start-up instructions.

In general, the contents of RAM are erased when the power to the computer is turned off,
but ROM retains its data indefinitely.

In a PC, the ROM contains a specialized program called the BIOS that orchestrates loading the computer's operating system from the hard disk drive into RAM whenever the computer is turned on or reset.

Software stored in ROM is often called firmware, because it is notionally more like hardware than software.

Flash memory blurs the distinction between ROM and RAM, as it retains its data when turned off but is also rewritable. It is typically much slower than conventional ROM and RAM however, so its use is restricted to applications where high speed is unnecessary.

Secondary storage devices are hard disk drives (HDD) and solid-state drives (SSD).

Virtual memory

In computing, virtual memory (also virtual storage) is a memory management technique.

The computer's operating system, using a combination of hardware and software, maps memory addresses used by a program, called virtual addresses, into physical addresses in computer memory.

When a program needs memory, it requests it from the operating system. The operating system then decides in what physical location to place the program's code and data.

Virtual Memory
Virtual memory combines active RAM and inactive memory on DASD[NB 1] (A direct-access storage device is a secondary storage device in which "each physical record has a discrete location and a unique address") to form a large range of contiguous addresses.

Advantages of Virtual Memory

  • Computer programmers no longer need to worry about where their data is physically stored or whether the user's computer will have enough memory.
  • It also allows multiple types of memory to be used.For example, some data can be stored in physical RAM chips while other data is stored on a hard drive (e.g. in a swapfile), functioning as an extension of the cache hierarchy.This drastically increases the amount of memory available to programs.
  • The operating system will place actively used data in physical RAM, which is much faster than hard disks.
  • When the amount of RAM is not sufficient to run all the current programs, it can result in a situation where the computer spends more time moving data from RAM to disk and back than it does accomplishing tasks; this is known as thrashing.

Protected memory

Protected memory is a system where each program is given an area of memory to use and is not permitted to go outside that range.

Use of protected memory greatly enhances both the reliability and security of a computer system.

Without protected memory, it is possible that a bug in one program will alter the memory used by another program.

This will cause that other program to run off of corrupted memory with unpredictable results.

If the operating system's memory is corrupted, the entire computer system may crash and need to be rebooted.

At times programs intentionally alter the memory used by other programs. This is done by viruses and malware to take over computers. It may also be used benignly by desirable programs which are intended to modify other programs; in the modern age, this is generally considered bad programming practice for application programs, but it may be used by system development tools such as debuggers, for example to insert breakpoints or hooks.

Protected memory assigns programs their own areas of memory. If the operating system detects that a program has tried to alter memory that does not belong to it, the program is terminated (or otherwise restricted or redirected). This way, only the offending program crashes, and other programs are not affected by the misbehavior (whether accidental or intentional).

Protected memory systems almost always include virtual memory as well.


Reset

  Thank you for your love and generous support  😄

DONATE