Memory and storge part 1 Flashcards
Primary and secondary storage
Why is primary storage needed in Von Neumann Architecture?
In the Von Neumann Architecture, primary storage is needed to store programs that are currently running and need to be accessed by the CPU.
What are the two types of primary storage used?
RAM (Random Access Memory) and ROM (Read Only Memory)
What is RAM used for?
RAM is used to store running programs and data when the computer is in use.
What are the characteristics of RAM?
RAM is often referred to as Main Memory.
It can be read to and written from.
Access to RAM is much faster than access to a hard drive
it is volatile, so data stored in RAM is lost when the power turns off
When your computer is turned off, where is the data stored?
All your programs and data are stored permanently on the hard drive - this is known as non-volatile storage so it doesn’t lose the data when power is turned off.
What does RAM usually store?
Operating system (or part that is currently in use)
The software currently in use
The data which the software is using
What is ROM used for?
ROM is used to store the bootstrap, which is the initial program that is run when the computer is turned on. It tells the computer where it will find the operating system on the hard drive.
ROM also stores the Basic Input/Output System (BIOS). the BIOS can run without a hard drive or secondary storage present. It controls basic technical configuration of the computer such as the processor speed or the system time.
What are the characteristics of ROM?
Data is read from ROM, but cannot be written to
It is non-volatile, so data won’t be lost when the power is turned off
What are the differences between RAM and ROM?
RAM:
Size - typically 4GB to 32GB
Used to store running programs and operating system
Can be read from and written to
Is volatile
ROM:
Size - typically 4MB - 8MB
Used to store BIOS and Bootstrap
Can be read from
Cannot be written to
Is not volatile
What is virtual memory?
Virtual memory is a part of the hard drive used as an extension to RAM.
Why might virtual memory be needed?
When RAM is (close to being) full, virtual memory can be used so that the computer remains operational.
How does virtual memory work?
Programs and data that are not currently being executed can be (temporarily) transferred to virtual memory.
So the computer can remain fully operational and more space is allowed in RAM for currently running programs.
Virtual memory is an area of secondary storage (e.g. the hard drive)
Programs and data are transferred back to RAM when they are needed
It’s a temporary measure
What are the advantages and disadvantages of virtual memory?
Advantages:
Uses cheap secondary storage on the hard drive
Prevents error messages saying “out of memory” - the programs and files will still open
Disadvantages:
Accessing virtual memory is very slow
To access data, the existing data in RAM needs to be copied into virtual memory, then data in virtual memory needs to be copied into RAM
Why is secondary storage needed?
A computer needs secondary storage for long term storage of programs and data that are not currently in use.
Secondary storage is needed as ROM is read only and RAM is volatile.
Performance of secondary storage is much slower than primary storage but its capacity is much higher.
Is cache primary or secondary storge?
Primary storage