Download Memory and Storage (Aldon Tom)

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Memory and Storage
Aldon Tom
What is Memory?
Memory is a solid-state digital device that stores data values.
Memory holds running programs and the data that those programs
use. It also stores data that is not currently being used, although
most memory falls into the category of temporary storage.
The Key Aspects of Memory
There are two basic aspects of memory:
•Technology
The properties of the underlying hardware that are used to
construct the memory system.
•Organization
The format of the memory system.
Memory Volatility
Memory is considered volatile if the contents of the memory
disappears when the power is shut off. RAM (not magnetic) is a
common example of volatile memory.
Nonvolatile memory is the exact opposite. Its contents remain even
after power is shut off. An example would be your hard drive.
Nonvolatile Memory (cont)
Nonvolatile memory is usually much larger than volatile memory
-Additionally nonvolatile memory is in the form of rotating disks
-hard disks, floppy disks, CDs, etc
-it is also usually much slower, but much cheaper
Data access must wait for seek time, which is the positioning
of the head. It also must wait for rotational latency.
Types of Memory Access
The most common types of memory is random access. That is to
say that any value in the memory can be accessed at any point in
time.
The alternative to random access is sequential access. Sequential
access memory must be read in the same order that they were
inputted. An example is the FIFO: First-In-First-Out method.
There are also methods that combine both forms of access in
various ways.
Just what is a memory chip made of?
Well each chip is an integrated circuit made up of millions of
transistors and capacitors. Capacitors are paired with transistors
to make a memory cell which holds one bit and can thus store
a 1 or 0 by filling or emptying the capacitor.
There are still many other forms of memory, but this is the most
common form of RAM.
Each memory cell has an address. This is how it can be
randomly accessed. The cells are then further divided
into a grid layout. This is why your RAM modules have
something called RAS and CAS delays. The delays are
time it takes for the Row Access Select and Column
Access Select to execute between cycles. Then the system
fetches what is stored at a particular address and then it
stores it to a register for use in calculations.
Permanence of Values
Memory is characterized by whether it can be
read, written, or both. The primary form of memory
can be both read and written at anytime. There are
some types of memory that are more permanent, namely
ROM: Read Only Memory
Types of ROM
The standard ROM contains values that can only be accessed, but
not changed.
There is also PROM: Programmable ROM which allows data values
to be written only once, and then accessed many times.
Intermediate forms also exist. For example, EEPROM: Electronically
Erasable Programmable ROM. Although it is an oxymoron, it allows
data to be electronically burned into the memory, but it takes a long
time. A popular form of EEPROM is Flash Memory, which is
commonly used in digital cameras. Although it is slow, the memory
works faster than a human can aim and take a picture.
Primary and Secondary
Memory
Primary memory refers to the fast, volatile, internal memory of
the computer:
-RAM
-Cache
Secondary memory refers to the slower, nonvolatile, external
storage usually provided by electromechanical devices such as:
-Hard Disk
-CDs
Memory Hierarchy
Primary and Secondary memory arose from the idea of a Memory
Hierarchy. This hierarchy came about due to the economy of
production. That is to say the cost versus the performance.
Research revealed that using given budget, the best performance
is not achieved by using the same type of memory throughout the
system. It is most efficient to use a very small amount of the
highest performance memory, which is backed up by a slightly
larger amount of a slightly slower memory, and so on. This creates
a sort of pyramid or a funnel.
The CPU accesses memory according to a distinct
hierarchy. Whether it comes from permanent storage
or input, it is all stored in RAM first. The CPU then
stores pieces of information that it will need to access
often in the cache and then it maintains certain
instructions in registers.
CPU
Cache
RAM
Virtual
Memory
Disk
Storage
In order to maximize performance with powerful CPUs, the data
has to be easy and quick to access. If the CPU does not get the
data it needs it stops and waits for it, therefore you need memory
that can keep up with the CPU. The problem is that memory
fast enough to keep up with the CPU is extremely expensive.
The solution is to tier the memory as described earlier.
Using progressively cheaper memory to back up each
other provides maximal efficiency in terms of price.
From slowest to fastest:
-Hard Drive
-RAM
-Cache
Instruction and Data Store
The earliest computers used to have separate memories
for programs and data. Later, most architects adopted the
Von Neumann Architecture which combines both into
one memory.
With the advent of new memory technologies, the separation
of data and programs has come back into use, but only in
special-purpose systems.
Memory used to hold a program is called instruction store.
Memory used to hold data is called data store.
The motivations for separating data and instructions is basically
since the data for a program only needs to be loaded less
frequently, but the instructions that utilize that data are executed
much more often. Therefore if both data and instruction are both
in the same memory, the extra speed is useless for the data
portion, where as the instructions suffer from lack of speed.
By separating the data and instructions into separate
memories, faster memory can be used for
instructions, while slower memory can be used for
the data.
Fetching and Storing
All memory uses a fetch-store architecture.
That is there are only two operations that memory understands:
Read and Write
This is also known as a load-store architecture, or read-write, but
they all just refer to the same thing.
Executing a Program
After the system loads the necessary data, all that is really left
is the instructions. The system only retrieves new data a small
percentage of the time. The rest of the time is spent on instructions
-Each instruction is fetched from memory
-Decoded
-Executed
-Then next, where next can be the next in the sequence or a jump