KJ

Memory

KEY WORDS:

RAM - Random Access Memory - where programs are loaded when the user opens them. It is a volatile memory device.

ROM - Read Only Memory - a non-volatile memory device which stores the boot up scripts.

Virtual Memory - when the RAM is full, a proportions of secondary storage (often the hard disk) is used as an overflow allowing programs to continue to function, albeit slower.

RAM (aka main memory):

  • RAM is needed to store programs that are currently being used.

  • They enable ‘multi-tasking’, which means having several programs open and using them all at the same time.

  • It does this by copying the data needed by programs at that time so that it can be passed to the CPU when it needs to process that data.

  • It also stores all the instructions/modules from the open programs that the CPU will require for processing.

  • RAM stores data as small charges of electricity in tiny transistors etched into a circuit in the device.

  • The charge needs to be refreshed every few milliseconds otherwise the charge leaks away.

  • RAM is therefore volatile memory - it loses data when there is no power.

  • When programs are opened by the user, they’re loaded from the hard disk onto the RAM.

  • This is so that the CPU can access the data and instructions at the acceptable rate.

  • If the CPU reads the program instructions and data from the hard disk, the data access would be extremely slow - this is why RAM is so important.

  • RAM will hold a copy of data/instructions (programs) that are CURRENTLY being used by the data.

ROM:

  • Data must be in the RAM for the computer to work

  • ROM is a special memory chip that can store data even without power - it is non-volatile.

  • It is used by a computer to store the boot sequence(start up) and load the operating system.

  • The boot sequence is also known as the BIOS sequence.

  • When you switch on your computer, data is the ROM is accessed by the CPU in order to start the computer and load the operating system successfully.

  • The data on ROM cannot easily be overwritten by the user.

  • Like the RAM, is is classed as primary storage (memory that is directly accessed by the CPU) and has fast data access rates.

VIRTUAL MEMORY:

  • Virtual Memory is actually a hard-drive (hard disk) space which acts as RAM (although it operates a lot slower than RAM) and is used when the RAM is full.

  • Too many programs and their data need to be copied to the RAM.

  • Computers will relocate programs that have not been recently used to the hard disk.

  • This process will take time as the hard-disk data speeds are much slower.

HOW RAM AFFECTS PERFORMANCE:

Smaller RAM:

  • Limits multitasking and greater need for Virtual Memory use.

Larger RAM:

  • Greater storage of programs/data leading to faster performance and effective multitasking.

CACHE:

  • A few megabytes of memory sits inside the CPU.

  • Being inside the CPU means that the data access speed is equal to the CPU’s speed. CPU performance is therefore maintained.

  • Well written programs will make sure that sets of regularly used instructions are copied into the cache so the programs can run more efficiently.

  • Poor programs tend to need to fetch the instructions required by the RAM.