OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Memory
OCR GCSE Computing © Hodder Education 2013 Slide 2 Index to topics RAM and ROM Virtual memory Cache memory Flash memory
OCR GCSE Computing © Hodder Education 2013 Slide 3 Chapter 2: Memory The CPU in the computer fetches data and instructions from memory to process. This type of memory is called primary memory and it is the only memory the CPU can access directly. The two main types of primary memory are – RAM( Random Access Memory) and – ROM (Read Only Memory)
OCR GCSE Computing © Hodder Education 2013 Slide 4 Chapter 2: Memory RAM is memory that can be accessed and changed by the computer at any time. RAM stores the programs and data that the computer is currently working on The operating system will also be loaded into RAM in order to run. RAM needs power to store data and is volatile (i.e. if you turn off the power everything in RAM is lost) – Data is stored in RAM as a charge in an electronic circuit and will leak away if not kept refreshed.
OCR GCSE Computing © Hodder Education 2013 Slide 5 Chapter 2: Memory If you are listening to some music while researching on the internet for information to use in a word processed document, the RAM might contain: – The operating system for the computer – Music player software – The music file you are listening to – The web browser software – The website you are looking at – The word processor software – The word-processed file – Anti-virus software …
OCR GCSE Computing © Hodder Education 2013 Slide 6 Chapter 2: Memory Computers need a lot of RAM to deal with the large amounts of data they need to make available at any one time for the CPU. Adding more RAM to a computer will improve the performance of that computer by making more memory available for direct access from the CPU. A typical laptop will have 6 GB of RAM or more available.
OCR GCSE Computing © Hodder Education 2013 Slide 7 Chapter 2: Memory When the computer is first switched on RAM will be empty because it is volatile and needs power to maintain the contents. In order to supply the instructions needed to start up the computer, the CPU needs access to permanently stored instructions, the boot program. ROM is a more complex form of electronic circuit that does not require power to maintain the contents and is non-volatile.
OCR GCSE Computing © Hodder Education 2013 Slide 8 Chapter 2: Memory The information on a ROM chip is often programmed at manufacture. ROM is often used to store the boot program, a sequence of instructions to start the computer and load the operating system. The boot program: – Performs some basic checks – Finds the operating system – Hands over control to the operating system ROM cannot be overwritten by the computer, hence Read Only Memory.
OCR GCSE Computing © Hodder Education 2013 Slide 9 Chapter 2: Memory ROM does not need to contain very much data and is typically just 1 or 2MB in size Many devices, including music players, mobile phones and cameras, need ROM to boot them up. Since many of these devices have the operating system stored in ROM, the type of ROM used is changeable through a process called ‘flashing’, hence flash memory.
OCR GCSE Computing © Hodder Education 2013 Slide 10 Chapter 2: Memory RAM and ROM – a summary:
OCR GCSE Computing © Hodder Education 2013 Slide 11 Chapter 2: Memory Virtual memory is part of the hard drive used as an extension to the RAM. It is used when the computer does not have enough RAM to hold all the data and programs that a user wants. A specific area of the hard drive will be allocated to temporarily store data from RAM that is currently not needed, while data that is needed will be loaded into RAM.
OCR GCSE Computing © Hodder Education 2013 Slide 12 Chapter 2: Memory Virtual memory Total memory in use Hard disk Main Memory Virtual Memory space on hard disk
OCR GCSE Computing © Hodder Education 2013 Slide 13 Chapter 2: Memory The time taken to access the hard disk on a computer is significantly longer than that required to access RAM. If a computer is having to move data between the hard disk and RAM constantly, it will slow down the computer significantly. To overcome this it will be necessary either – To quit some programs OR – To add extra RAM to enable more programs to run
OCR GCSE Computing © Hodder Education 2013 Slide 14 Chapter 2: Memory There are two types of RAM: Dynamic RAM, which can only hold a charge for a few milliseconds and must be constantly refreshed Static RAM, which does not need to be constantly refreshed, but is a much more complex and expensive design – Since static RAM does not need to be constantly refreshed, access times to this type of RAM are much faster – Static RAM chips are used for cache memory
OCR GCSE Computing © Hodder Education 2013 Slide 15 Chapter 2: Memory Cache memory is used next to the CPU to provide very fast access to data. Cache is used between the main RAM and the CPU to improve performance by holding the data that has just been, or is just about to be, processed. Cache memory is a much more complex design than standard RAM, is more expensive and only available in much smaller sizes, so is not suitable for main memory.
OCR GCSE Computing © Hodder Education 2013 Slide 16 Chapter 2: Memory Transfer speed increases Hard diskRAMCacheCPU When data is requested it is moved from the hard disk to RAM, then into cache. When data is requested again, it first checks if it is in the cache. If not then the RAM is checked and finally the hard disk. By using the cache as a buffer it means most frequently used data is immediately available. Cache memory can improve the performance of the computer quite significantly and generally, the more cache, the better the performance.
OCR GCSE Computing © Hodder Education 2013 Slide 17 Chapter 2: Memory Flash memory is a type of ROM that can be re- written by erasing the contents, or parts of the contents. – This is done by applying an electronic charge to all or part of the circuit. Flash memory is used in most modern computers to store the boot program, and in most devices to store the boot program and the operating system. – Flash memory allows these programs to be updated using a special process.
OCR GCSE Computing © Hodder Education 2013 Slide 18 Chapter 2: Memory Flash memory is also commonly used as a portable medium for storing and transferring data, e.g. flash memory cards in cameras, mobile phones and, of course, the USB memory stick. These devices range in size from a few GB, e.g. 4 GB flash card in a mobile phone, to 256 GB USB memory drives. Access times for flash memory are not as fast as RAM but are faster than hard disks, making them suitable for additional drives or back-up devices.