Primary memory: Difference between revisions

From Computer Science Wiki
No edit summary
No edit summary
Line 9: Line 9:
* ROM , or Read Only Memory is non-volatile and is used to store programs permanently (the start-up or " boot " instructions, for example), the computer cannot store anything in this type of memory.
* ROM , or Read Only Memory is non-volatile and is used to store programs permanently (the start-up or " boot " instructions, for example), the computer cannot store anything in this type of memory.


When the programs and data files (known as the software) are not in RAM, they are stored on [[secondary storage]] (also known as backing store) such as tapes or discs. The tape or disc drives and any input and output devices connected to the CPU are known collectively as peripherals.
When the programs and data files (known as the software) are not in RAM, they are stored on secondary storage (also known as backing store) such as tapes or discs. The tape or disc drives and any input and output devices connected to the CPU are known collectively as peripherals.


'''RAM – Random Access Memory'''<ref>http://dis-dpcs.wikispaces.com/2.1.2+Primary+Memory+and+2.1.3+Cache+Memory</ref>
'''RAM – Random Access Memory'''<ref>http://dis-dpcs.wikispaces.com/2.1.2+Primary+Memory+and+2.1.3+Cache+Memory</ref>
* The RAM is where instructions, values are stored at runtime
* The RAM is where instructions, values are stored at runtime
* The RAM can be accessed a lot faster than secondary storage, In general the time between primary memory and CPU is 7 to 10 nanoseconds.  
* The RAM can be accessed a lot faster than secondary storage, In general the time between primary memory and CPU is 7 to 10 nanoseconds.  
* All information is lost when the power is turned off (volatile)
* All data and instructions are lost when the power is turned off (volatile)
* Allows storage and random access of the data
* Allows storage and random access to data and instructions
* Each instruction & piece of data in the RAM has a unique address (see also: [[virtual memory]]
* Each instruction & piece of data in the RAM has a unique address (see also: [[virtual memory]]


Line 29: Line 29:
<iframe width="560" height="315" src="https://www.youtube.com/embed/bkJx-URsnyc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/bkJx-URsnyc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</html>
</html>
== NVRAM ==
Non-volatile random-access memory (NVRAM) is random-access memory that retains data without applied power. This is in contrast to dynamic random-access memory (DRAM) and static random-access memory (SRAM), which both maintain data only for as long as power is applied, or such forms of memory as magnetic tape, which cannot be randomly accessed but which retains data indefinitely without electric power.
Read-only memory devices can be used to store system firmware in embedded systems such as an automotive ignition system control or home appliance. They are also used to hold the initial processor instructions required to bootstrap a computer system. Read-write memory can be used to store calibration constants, passwords, or setup information, and may be integrated into a microcontroller.<ref>https://en.wikipedia.org/wiki/Non-volatile_random-access_memory</ref>





Revision as of 08:14, 30 September 2020

This is a basic concept in computer science

The primary memory stores instructions. It is important to understand primary memory generally holds currently executing instructions.

There are two types of memory in primary memory, RAM and ROM[1]. For the IB, you should focus on RAM, and not ROM.

  • RAM is Random Access Memory which loses its contents when the computer is switched off (it is volatile ). This memory can be written to, instructions and data can be loaded into it.
  • ROM , or Read Only Memory is non-volatile and is used to store programs permanently (the start-up or " boot " instructions, for example), the computer cannot store anything in this type of memory.

When the programs and data files (known as the software) are not in RAM, they are stored on secondary storage (also known as backing store) such as tapes or discs. The tape or disc drives and any input and output devices connected to the CPU are known collectively as peripherals.

RAM – Random Access Memory[2]

  • The RAM is where instructions, values are stored at runtime
  • The RAM can be accessed a lot faster than secondary storage, In general the time between primary memory and CPU is 7 to 10 nanoseconds.
  • All data and instructions are lost when the power is turned off (volatile)
  • Allows storage and random access to data and instructions
  • Each instruction & piece of data in the RAM has a unique address (see also: virtual memory

ROM – Read Only Memory

  • Can not be written to easily or at all (often times once only, then never again)
  • In modern PCs usually used for firmware in CPU, Graphics card, hard disks, etc.
  • Many ROM modules are replaced with Flash modules nowadays (ex. BIOS, firmware modules) to allow easier updating
  • In devices like keyboards, etc. which aren’t designed for firmware updates ROM might still be used
  • Stores code for interrupter

Video


References