File

advertisement
Computers in the real world
Objectives
• Understand what is meant by memory
• Difference between RAM and ROM
• Look at how memory affects the performance
of a PC
• Understand what is meant by virtual memory
• Look at different memory types such as
– Flash memory
– Cache
• Understand how changing memory is
changing computer designs.
Computers in the real world
What is memory?
All devices which have a micro-processor have
memory. Memory can store data and programs
(like a hard drive) and it is used to store values
currently in use by the computer.
There are different types of memory and they are
used for different purposes.
Memory
Memory access times are MUCH faster than a hard
drive. This is the biggest reason why a system must
have memory installed.
Computers in the real world
How is memory structured?
A memory chip will have a size which is normally
given in either mega or giga bytes.
Memory is then split up into a lot of storage blocks.
The number of available blocks is governed by the
size of the memory.
Memory
Each block can then store data or instructions.
Depending on what the memory is used for will
determine what will be stored inside it.
Computers in the real world
Memory Address
Each block inside memory is numbered. This will start at 0 and go up in fixed
sizes until it gets to the end. A memory chip will have a lot of memory blocks!
For example a 1GB memory chip will contain about 270,000,000 memory
blocks
Address
0
1
2
3
4
5
6
7
Data
M
R
H
A
M
F
L
E
Continued
To access or store some data you will need to know the address of where it is
stored. For example the “A” is stored at address 3. If you try and store another
value at address 3 then it would over write the A.
Computers in the real world
Activity
In your notes create a new section called “memory” and describe what is
meant by a memory address.
Computers in the real world
RAM memory
Your computer will contain RAM memory. RAM stands for random access
memory. Currently computers have between 2Gb and 8Gb of RAM. However
this will get bigger as time goes on.
My first computer had 128Kb! It was a spectrum +2. My spectrum had 0.002%
of the memory of my current laptop!
RAM stores currently running programs and any files you have open. So if you
were editing a word file you would have that document in RAM as well as
Microsoft word!
RAM is volatile. This means that when it is switched off it get wiped. This is
why if you do not save your work to the hard drive it will be lost! Also if the
computer looses power RAM is wiped.
Computers in the real world
ROM memory
All computers also have ROM. ROM stands for read only memory. As the
name suggests this block of memory will not change and can not be written to
under normal circumstances. It is used to store special software which can
boot the computer.
If the ROM gets wiped then it would be impossible to start the computer. This
is why it is read only!
The boot software stored on it will be looked at in a later unit. It can be
changed by running a special program known as a flasher. This allows you to
update the boot software. However if at any point the flash fails it will result
in a unbootable computer. A failed flash and a unbootable system is known as
“bricking” a device.
Bricking refers more to hand held devices such as a Iphone or DS. If you brick
one of these devices then you are effectively left with a very expensive brick!
Computers in the real world
Flash memory
Flash memory is very special memory as it retains its contents when there is
no power supplied. Flash memory is used in portable devices such as cameras
and phones.
Flash memory is also used in memory cards such as SD cards, memory sticks
or compact flash. You can also get smaller versions such as mini and micro SD.
Computers in the real world
Memory sticks use flash memory
Memory sticks use flash memory to allow you to save and store data. Devices
like memory sticks are called solid state devices. You can now buy solid state
hard drives which use flash memory instead of a magnetic disk. The advantage
here is that solid state drives are less prone to error and can be faster.
Memory sticks use a USB interface to connect to a computer. Newer memory
sticks connect via USB v2 but in the future USB v3 will start to become more
common. The difference is SPEEED!
Computers in the real world
Activity
In your revision power point make notes on –
•RAM
•Flash memory
•ROM
Make sure you say
•What is it used for?
•What does it store?
•What happens when it looses power?
Computers in the real world
Choosing RAM for a PC
RAM comes in many flavours. Below are some of them. It is important to note
that different motherboards only support cert
DDR – Double Data Rate . This type of RAM can access two blocks of memory
at once. DDR is split into DDR, DDR2 and DDR3. The higher the number the
faster the memory. You also sometimes have a number associated with it like
DD2 – 400 or DD2-1066. Again the higher the number the faster the memory
SDR– Single Data Rate . This is older RAM which is still in use. Data can only
be accessed one block at a time.
Computers in the real world
What RAM is supported by a motherboard?
You need to look at the specifications of a
motherboard to see what memory it
supports.
Computers in the real world
What RAM is supported by a motherboard?
This motherboard uses DDR2 SDRAM. We can also see –
What speed RAM it supports
What the maximum amount of RAM it supports.
Computers in the real world
A search on dabs...
A search for 2GB DDR2 RAM shows some results. The PC2-6400 is supported by
our motherboard.
Computers in the real world
Activity
Go onto www.das.com. Find a motherboard of your choice. Find memory and
CPU which will be combatable with that motherboard.
Write down –
The name and part number.
The URL of the part
The cost and quantity needed.
Most motherboards work better when they have 2 memory chips rather than
one. So to get 4GB you would install 2 x 2GB instead of 1 x 4Gb. Make sure
your answer has at least 2 memory chips.
Computers in the real world
Virtual memory
So you have 2Gb of RAM! That gets eaten up very quickly! It is very common
that your programs will need more RAM that is actually available. Rather than
not open the programs it will use something known as virtual memory.
Virtual memory will use the hard drive as extra RAM. This vastly extends the
amount of memory available on a computer which is essential when dealing
with programs which require a lot of RAM such as image editing or videos.
Virtual memory will extend the available amount of RAM by using a section of
the hard drive called “swap space” or “page file” (unix/mac/linux call it swap
space while windows calls it a page file).
Computers in the real world
How does virtual memory work?
Data, programs or parts of programs are copied from memory onto the hard
drive. This occurs, normally, when they are not in use.
Photoshop
Image 1
Image 2
Image 3
Step 1 – Data which has not been used for a
while is identified by the OS
Computers in the real world
How does virtual memory work?
Data, programs or parts of programs are copied from memory onto the hard
drive. This occurs, normally, when they are not in use.
Photoshop
Image 1
Image 2
Image 3
Step 2 – This block of data is copied onto the
hard drive.
Computers in the real world
How does virtual memory work?
Data, programs or parts of programs are copied from memory onto the hard
drive. This occurs, normally, when they are not in use.
Photoshop
Image 1
Media
player
Image 3
Step 3 – The space created can be used for
something else!
Image 2
Computers in the real world
Virtual memory - problems
Virtual memory is much slower than normal RAM. If it is used too much it can
slow down the computer.
Computers with low amount of RAM tend to rely more on virtual memory
than computers that have large amounts or RAM. All computers use some
virtual memory.
Over use of virtual memory can lead to an effect called trashing. This is where
data is continuously swapped in and out causing major slow down of the
computer.
Computers in the real world
Thrashing
Thrashing causes data to be swapped in and out regularly. In this situation
image 2 and the media player are both in use.
Photoshop
Image 1
Media
player
Image 3
Step 1 – Media player is swapped out.
Image 2
Computers in the real world
Thrashing
Thrashing causes data to be swapped in and out regularly. In this situation
image 2 and the media player are both in use.
Photoshop
Media
player
Image 2
Image 1
Image 3
Step 2 – Image 2 is swapped in
Computers in the real world
Thrashing
Thrashing causes data to be swapped in and out regularly. In this situation
image 2 and the media player are both in use.
Photoshop
Media
player
Image 1
Image 2
Image 3
Step 3 – Media player is needed so...
Computers in the real world
Thrashing
Thrashing causes data to be swapped in and out regularly. In this situation
image 2 and the media player are both in use.
Photoshop
Image 2
Image 1
Media
player
Image 3
Step 4 – but Image 2 is needed again...
Computers in the real world
Thrashing
Thrashing causes data to be swapped in and out regularly. In this situation
image 2 and the media player are both in use.
Photoshop
Media
player
Image 1
Image 2
Image 3
Step 5 – Media player is needed so...
Computers in the real world
Thrashing
Thrashing causes data to be swapped in and out regularly. In this situation
image 2 and the media player are both in use.
Photoshop
Image 2
Image 1
Media
player
Image 3
Step 6 – but Image 2 is needed again...
Computers in the real world
Thrashing
Thrashing causes data to be swapped in and out regularly. In this situation
image 2 and the media player are both in use.
Photoshop
Media
player
Image 1
Image 2
Image 3
Step 7 – Getting the idea 
Computers in the real world
Activity
Make notes on virtual memory.
In your notes explain why having higher amounts of RAM can speed up your
system. Make sure you talk about thrashing.
Computers in the real world
Cache memory
This has been covered in the CPU piece of work. You should already have
notes on this!!!!!!
Download