Anda di halaman 1dari 30

Research for next week be ready for the recitation (Sept 15, 2015)

1. Memory
a. Types of Memory
b. Memory Caching (
c. Virtual Memory
d. Memory Interleaving
2. I/O Organization
a. Disk Organization
b. Input-Output Peripherals
3. Basic Interfacing

memory is the process in which information is encoded, stored, and retrieved.

https://en.wikipedia.org/wiki/Memory
memory refers to the computer hardware devices used to store information for immediate use in
a computer; it is synonymous with the term "primary storage". Computer memory operates at a high
speed, for example random-access memory (RAM), as a distinction from storage that provides slowto-access program and data storage but offers higher capacities. If needed, contents of the
computer memory can be transferred to secondary storage, through a memory management
technique called "virtual memory". An archaic synonym for memory is store.[1]
The term "memory", meaning "primary storage" or "main memory", is often associated with
addressable semiconductor memory, i.e. integrated circuits consisting of silicon-based transistors,
used for example as primary storage but also other purposes in computers and
other digital electronic devices. There are two main types of semiconductor
memory, volatile and non-volatile. Examples of non-volatile memory are flash memory (used as
secondary memory) and ROM, PROM, EPROM and EEPROM memory (used for
storing firmware such as BIOS). Examples of volatile memory are primary storage (typically dynamic
RAM, DRAM), and fast CPU cache memory (typically static RAM, SRAM, which is fast but energyconsuming and offer lower memory capacity per area unit than DRAM).
Most semiconductor memory is organized into memory cells or bistable flip-flops, each storing
one bit (0 or 1). Flash memory organization includes both one bit per memory cell and multiple bits
per cell (called MLC, Multiple Level Cell). The memory cells are grouped into words of fixed word
length, for example 1, 2, 4, 8, 16, 32, 64 or 128 bit. Each word can be accessed by a binary address
of N bit, making it possible to store 2 raised by N words in the memory. This implies that processor

registers normally are not considered as memory, since they only store one word and do not include
an addressing mechanism.
Typical secondary storage devices are hard disk drives and solid-state drives.

https://en.wikipedia.org/wiki/Computer_memory
Internal storage areas in the computer. The term memory identifies data storage that comes in the form of chips, and
the word storage is used for memory that exists on tapes or disks. Moreover, the term memory is usually used as a
shorthand for physical memory, which refers to the actual chips capable of holding data. Some computers also
use virtual memory, which expands physical memory onto a hard disk.
Every computer comes with a certain amount of physical memory, usually referred to as main memory or RAM. You
can think of main memory as an array of boxes, each of which can hold a single byte of information. A computer that
has 1 megabyte of memory, therefore, can hold about 1 million bytes (or characters) of information.

http://www.webopedia.com/TERM/M/memory.html

memory can refer to any medium of data storage, it usually refers


to RAM, or random access memory.
memory is a vital part of the way computers and many electronic
devices function. While memory and RAM can often be used
synonymously, it is good to know about other types of memory as
well. Hopefully you will be able to store the information you've
learned in your own memory.

Memory
Computer memory is any physical device capable of storing
information temporarily or permanently. For example, Random Access

Memory (RAM), is a volatile memory that stores information on


an integrated circuit used by the operating system, software,
and hardware. Below is an example picture of a 512MB DIMM
computer memory module.

http://www.computerhope.com/jargon/m/memory.htm

http://techterms.com/definition/memory

There are several different types of memory:

RAM (random-access memory): This is the same as main memory. When used by
itself, the termRAM refers to read and write memory; that is, you can both write data
into RAM and read data from RAM. This is in contrast to ROM, which permits you only
to read data. Most RAM is volatile, which means that it requires a steady flow of
electricity to maintain its contents. As soon as the power is turned off, whatever
data was in RAM is lost.
ROM (read-only memory): Computers almost always contain a small amount of
read-only memory that holds instructions for starting up the computer. Unlike RAM,
ROM cannot be written to.
PROM (programmable read-only memory): A PROM is a memory chip on which you
can store aprogram. But once the PROM has been used, you cannot wipe it clean and
use it to store something else. Like ROMs, PROMs are non-volatile.
EPROM (erasable programmable read-only memory): An EPROM is a special type of
PROM that can be erased by exposing it to ultraviolet light.

EEPROM (electrically erasable programmable read-only memory): An EEPROM is a special type of


PROM that can be erased by exposing it to an electrical charge.

http://www.webopedia.com/TERM/M/memory.html

Some of the more common types of memory chips for computers are listed
below.

EDO RAM
SDRAM
DDR RAM
DDR2 RAM
DDR3 RAM
DDR4 RAM

These types of memory all fall into the general categories of SIMM or DIMM.

Volatile vs. non-volatile memory


Memory can be either volatile and non-volatile memory. Volatile memory is
a memory that loses its contents when the computer or hardware device
loses power. Computer RAM is an example of a volatile memory and is why if
your computer freezes or reboots when working on a program, you lose
anything that hasn't been saved. Non-volatile memory, sometimes
abbreviated as NVRAM, is a memory that keeps its contents even if the
power is lost. EPROM is an example of a non-volatile memory.

Memory is not disk storage


It is very common for new computer users to be confused by what parts in
the computer are memory. Although both the hard drive and RAM are
memory, it is more appropriate to refer to RAM as "memory" or "primary
memory" and a hard drive as "storage" or "secondary storage."
When someone asks how much memory is in your computer, it is often
between 1GB and 16GB of Random Access Memory (RAM) and several

hundred gigabytes of hard disk drive storage. In other words, you always
have more hard drive space than RAM.

How can I learn more about computers?

How is memory used


When a program such as your Internet browser is open, it is loaded from
your hard drive and placed into RAM, which allows that program to
communicate with the processor at higher speeds. Anything you save to
your computer, such as a picture or video, is sent to your hard drive for
storage.

http://www.computerhope.com/jargon/m/memory.htm

Volatile memory[edit]

DDR-SD-RAM, SD-RAM and two older forms of RAM.

Main article: Volatile memory


Volatile memory is computer memory that requires power to maintain the stored information. Most
modern semiconductor volatile memory is either static RAM (SRAM) or dynamic RAM (DRAM).
SRAM retains its contents as long as the power is connected and is easy for interfacing, but uses six
transistors per bit. Dynamic RAM is more complicated for interfacing and control, needing regular
refresh cycles to prevent losing its contents, but uses only one transistor and one capacitor per bit,
allowing it to reach much higher densities and much cheaper per-bit costs.
SRAM is not worthwhile for desktop system memory, where DRAM dominates, but is used for their
cache memories. SRAM is commonplace in small embedded systems, which might only need tens

of kilobytes or less. Forthcoming volatile memory technologies that hope to replace or compete with
SRAM and DRAM includeZ-RAM, TTRAM, A-RAM and ETA RAM.

Non-volatile memory[edit]

Solid-state drives are one of the latest forms of non-volatile memory.

Main article: Non-volatile memory


Non-volatile memory is computer memory that can retain the stored information even when not
powered. Examples of non-volatile memory include read-only memory (see ROM), flash memory,
most types of magnetic computer storage devices (e.g. hard disks, floppy discs and magnetic
tape), optical discs, and early computer storage methods such as paper tape and punched cards.
Forthcoming non-volatile memory technologies
include FeRAM, CBRAM, PRAM, SONOS, RRAM, Racetrack memory, NRAM and Millipede.

https://en.wikipedia.org/wiki/Computer_memory

COMPUTER MEMORY
Memory is an essential element of a computer. Without its memory, a computer is of hardly any
use. Memory plays an important role in saving and retrieving data. The performance of the computer
system depends upon the size of the memory. Memory is of following types:
1. Primary Memory / Volatile Memory.
2. Secondary Memory / Non Volatile Memory.

1. Primary Memory / Volatile Memory: Primary Memory is internal memory of the computer. RAM AND
ROM both form part of primary memory. The primary memory provides main working space to the
computer.The following terms comes under primary memory of a computer are discussed below:

Random Access Memory (RAM): The primary storage is referred to as random access memory
(RAM) because it is possible to randomly select and use any location of the memory directly store and
retrieve data. It takes same time to any address of the memory as the first address. It is also called
read/write memory. The storage of data and instructions inside the primary storage is temporary. It
disappears from RAM as soon as the power to the computer is switched off. The memories, which lose
their content on failure of power supply, are known as volatile memories .So now we can say that RAM is
volatile memory.

Read Only Memory (ROM): There is another memory in computer, which is called Read Only
Memory (ROM). Again it is the ICs inside the PC that form the ROM. The storage of program and data in
the ROM is permanent. The ROM stores some standard processing programs supplied by the
manufacturers to operate the personal computer. The ROM can only be read by the CPU but it cannot be
changed. The basic input/output program is stored in the ROM that examines and initializes various
equipment attached to the PC when the power switch is ON. The memories, which do not lose their
content on failure of power supply, are known as non-volatile memories. ROM is non-volatile memory.

PROM: There is another type of primary memory in computer, which is called Programmable
Read Only Memory (PROM). You know that it is not possible to modify or erase programs stored in ROM,
but it is possible for you to store your program in PROM chip. Once the programmers are written it cannot
be changed and remain intact even if power is switched off. Therefore programs or instructions written in
PROM or ROM cannot be erased or changed.

EPROM: This stands for Erasable Programmable Read Only Memory, which overcome the
problem of PROM & ROM. EPROM chip can be programmed time and again by erasing the information
stored earlier in it. Information stored in EPROM exposing the chip for some time ultraviolet light and it
erases chip is reprogrammed using a special programming facility. When the EPROM is in use
information can only be read.

Cache Memory: The speed of CPU is extremely high compared to the access time of main
memory. Therefore the performance of CPU decreases due to the slow speed of main memory. To

decrease the mismatch in operating speed, a small memory chip is attached between CPU and Main
memory whose access time is very close to the processing speed of CPU. It is called CACHE memory.
CACHE memories are accessed much faster than conventional RAM. It is used to store programs or data
currently being executed or temporary data frequently used by the CPU. So each memory makes main
memory to be faster and larger than it really is. It is also very expensive to have bigger size of cache
memory and its size is normally kept small.

Registers: The CPU processes data and instructions with high speed; there is also movement of
data between various units of computer. It is necessary to transfer the processed data with high speed.
So the computer uses a number of special memory units called registers. They are not part of the main
memory but they store data or information temporarily and pass it on as directed by the control unit.
2. Secondary Memory / Non-Volatile Memory: Secondary memory is external and permanent in
nature. The secondary memory is concerned with magnetic memory. Secondary memory can be stored
on storage media like floppy disks, magnetic disks, magnetic tapes, This memory can also be stored
optically on Optical disks - CD-ROM. The following terms comes under secondary memory of a computer
are discussed below:

Magnetic Tape: Magnetic tapes are used for large computers like mainframe computers where
large volume of data is stored for a longer time. In PC also you can use tapes in the form of cassettes.
The cost of storing data in tapes is inexpensive. Tapes consist of magnetic materials that store data
permanently. It can be 12.5 mm to 25 mm wide plastic film-type and 500 meter to 1200 meter long which
is coated with magnetic material. The deck is connected to the central processor and information is fed
into or read from the tape through the processor. Its similar to cassette tape recorder.

Magnetic Disk: You might have seen the gramophone record, which is circular like a disk and
coated with magnetic material. Magnetic disks used in computer are made on the same principle. It
rotates with very high speed inside the computer drive. Data is stored on both the surface of the disk.
Magnetic disks are most popular for direct access storage device. Each disk consists of a number of
invisible concentric circles called tracks. Information is recorded on tracks of a disk surface in the form of
tiny magnetic spots. The presence of a magnetic spot represents one bit and its absence represents zero
bit. The information stored in a disk can be read many times without affecting the stored data. So the
reading operation is non-destructive. But if you want to write a new data, then the existing data is erased
from the disk and new data is recorded. For Example-Floppy Disk.

Optical Disk: With every new application and software there is greater demand for memory
capacity. It is the necessity to store large volume of data that has led to the development of optical disk
storage medium. Optical disks can be divided into the following categories:
1.

Compact Disk/ Read Only Memory (CD-ROM

2.

Write Once, Read Many (WORM)

3.

Erasable Optical Disk

http://successnotes4u.blogspot.com/2012/02/computer-memory-different-typesof.html
Sponsored Links

Computer Data Storage

Is PaaS Right for You? Find the

Right Provider. Free Expert Guide.


techtarget.com

http://www.ehow.com/about_5372043_different-kinds-computer-memory.html

Types of Computer Memory


A typical computer has:

Level 1 and level 2 caches

Normal system RAM

Virtual memory

A hard disk
Why so many? The answer to this question can teach you a lot about memory!
Fast, powerful CPUs need quick and easy access to large amounts of data in order to maximize their
performance. If the CPU cannot get to the data it needs, it literally stops and waits for it. Modern CPUs
running at speeds of about 1 gigahertz can consume massive amounts of data -- potentially billions
ofbytes per second. The problem that computer designers face is that memory that can keep up with a 1gigahertz CPU is extremely expensive -- much more expensive than anyone can afford in large
quantities.
Computer designers have solved the cost problem by "tiering" memory -- using expensive memory in
small quantities and then backing it up with larger quantities of less expensive memory.
The cheapest form of read/write memory in wide use today is the hard disk. Hard disks provide large
quantities of inexpensive, permanent storage. You can buy hard disk space for pennies per megabyte, but
it can take a good bit of time (approaching a second) to read a megabyte off a hard disk. Because storage
space on a hard disk is so cheap and plentiful, it forms the final stage of a CPUs memory hierarchy,
calledvirtual memory.
The next level of the hierarchy is RAM. We discuss RAM in detail in How RAM Works, but several points
about RAM are important here.
The bit size of a CPU tells you how many bytes of information it can access from RAM at the same time.
For example, a 16-bit CPU can process 2 bytes at a time (1 byte = 8 bits, so 16 bits = 2 bytes), and a 64bit CPU can process 8 bytes at a time.

Megahertz (MHz) is a measure of a CPU's processing speed, or clock cycle, in millions per second. So,
a 32-bit 800-MHz Pentium III can potentially process 4 bytes simultaneously, 800 million times per second
(possibly more based on pipelining)! The goal of the memory system is to meet those requirements.
A computer's system RAM alone is not fast enough to match the speed of the CPU. That is why you need
a cache (discussed later). However, the faster RAM is, the better. Most chips today operate with a cycle
rate of 50 to 70 nanoseconds. The read/write speed is typically a function of the type of RAM used, such
as DRAM, SDRAM, RAMBUS. We will talk about these various types of memory later.

http://computer.howstuffworks.com/computer-memory2.htm

A memory is just like a human brain. It is used to store data and instructions. Computer memory is
the storage space in computer where data is to be processed and instructions required for
processing are stored. The memory is divided into large number of small parts called cells. Each
location or cell has a unique address which varies from zero to memory size minus one. For
example if computer has 64k words, then this memory unit has 64 * 1024=65536 memory locations.
The address of these locations varies from 0 to 65535.
Memory is primarily of three types

Cache Memory

Primary Memory/Main Memory

Secondary Memory

Cache Memory
Cache memory is a very high speed semiconductor memory which can speed up CPU. It acts as a
buffer between the CPU and main memory. It is used to hold those parts of data and program which
are most frequently used by CPU. The parts of data and programs are transferred from disk to
cache memory by operating system, from where CPU can access them.

Advantages
The advantages of cache memory are as follows:

Cache memory is faster than main memory.

It consumes less access time as compared to main memory.

It stores the program that can be executed within a short period of time.

It stores data for temporary use.

Disadvantages
The disadvantages of cache memory are as follows:

Cache memory has limited capacity.

It is very expensive.

Primary Memory (Main Memory)


Primary memory holds only those data and instructions on which computer is currently working. It
has limited capacity and data is lost when power is switched off. It is generally made up of
semiconductor device. These memories are not as fast as registers. The data and instruction
required to be processed reside in main memory. It is divided into two subcategories RAM and
ROM.

Characteristics of Main Memory

These are semiconductor memories

It is known as main memory.

Usually volatile memory.

Data is lost in case power is switched off.

It is working memory of the computer.

Faster than secondary memories.

A computer cannot run without primary memory.

Secondary Memory
This type of memory is also known as external memory or non-volatile. It is slower than main
memory. These are used for storing data/Information permanently. CPU directly does not access
these memories instead they are accessed via input-output routines. Contents of secondary
memories are first transferred to main memory, and then CPU can access it. For example : disk,
CD-ROM, DVD etc.

Characteristic of Secondary Memory

These are magnetic and optical memories

It is known as backup memory.

It is non-volatile memory.

Data is permanently stored even if power is switched off.

It is used for storage of data in a computer.

Computer may run without secondary memory.

Slower than primary memories.

http://www.tutorialspoint.com/computer_fundamentals/computer_memory.htm

There are many types of computer memory modules available. In this day and age,
computers (laptops, PCs, etc.) generally do not use a single type of memory; rather, a
combination of memory chips and modules are normally found in today's computers,
depending on requirements and applications. The following is an overview of the
types of computer memory:

SIMM (Single In-Line Memory Module) Dating back to the days of 286, 386, and
486 PCs, SIMMs are generally plug-in memory modules that are inserted into the
CPU motherboard (or an extender memory board). A SIMM can be comprised of
BEDO (Burst Extended Data Out Dynamic Random Access Memory), DRAM
(Dynamic Random Access Memory) or EDO (Extended Data Out Dynamic Random
Access Memory), with the memory chips (one or more) soldered on a PCB (printed
circuit board). As mentioned above, it is the SIMM that is plugged into the CPU
motherboard or memory extend card to expand the memory capability of the
computer. Generally, when one is adding memory to a computer, it is in the form of a
SIMM. Early SIMMs handled 8 data bits at a time in a 30-pin configuration; later,
when CPUs were processing 32-bits, newer generation SIMMs were constructed in a
72-pin configuration.
DIMM (Dual In-Line Memory Module) DIMMs have two rows of DRAM, BEDO,
or EDO memory chips. DIMMS allow for double the memory on the same size
printed circuit board. A typical DIMM would be constructed in a 168-pin
configuration and handle 64 data bits at a time.
SODIMM (Small Outline Dual In-Line Memory Module) SODIMMs are generally
found in notebook computers and are smaller than standard DIMMs. In general, there
are 2 types of SODIMMs the first handling 32 data bits at a time with a 72-pin
configuration, and the second handling 64 data bits with a 144-pin configuration.
RIMM (Rambus In-Line Memory Module) Rambus Inc. in coordination with Intel
developed a new memory technology called Direct RDRAM, with the in-line modules
known as RIMMs. RIMMs have a 184-pin configuration and deliver a peak transfer
rate of 1.6 Gigabytes per second (in 16 data bit segments). SORIMM (Small Outline
Rambus In-Line Memory Module) SORIMMs have a similar outline as a SODIMM,
but use the Rambus memory technology. Different Types of Memory Chips:
DRAM (Dynamic Random Access Memory) The most common type of computer
memory. DRAMs hold data for a relatively brief period of time and need to be
refreshed at regular intervals. DRAMs are measured by access time (in nanoseconds,
or ns) and storage capacity (in megabytes, or MB). EDO (Extended Data Out)
Memory Higher-performing memory than DRAM, with a gain in performance of
roughly 10-15% over DRAM. BEDO (Burst Extended Data Out) Memory Higherperforming memory than EDO, with a gain in performance of roughly 13% over
EDO. SDRAM (Static Dynamic Random Access Memory) A memory chip that retains
memory and does not need refreshing. Another advantage of SDRAM is that it
synchronizes with the CPU timing. Although faster than DRAM, it is also more
expensive; available in speeds from 66 to 266 MHz. DDR SDRAM (Double Data
Rate Synchronous Dynamic Random Access Memory) A memory integrated circuit

that permits transactions on the rising as well as the falling edges of the clock cycle,
with a bus clock speed of 100 MHz with a data transfer rate of 200 MHz.
OTHER MEMORY TYPES VRAM (Video Random Access Memory) VRAM is a
video version of fast page mode memory and is found primarily in video accelerator
cards.
Flash Memory A memory chip that is non-volatile, re-writable that functions like a
combination random access memory and a hard disk drive. In the case of power being
lost, data is retained in memory. Advantages of flash memory include low voltage,
durability and high speed; for this reason, flash memory is used in printers, pagers,
digital cameras, audio recorders and cell phones.
Shadow RAM (Random Access Memory) During the booting up of a computer, a
minimal set of instructions to start the computer and video are stored in ROM (read
only memory), known as BIOS (basic input output system). Since ROM normally
executes slowly, Shadow RAM allows for the transfer of selected segments of the
BIOS code from ROM to RAM memory (which is faster).
file:///C:/Users/Edrian/Downloads/computer_memory_types.htm

Volatile
Rewritable - Byte Addressable (DRAM and SRAM)
Dynamic RAM (DRAM) and static RAM (SRAM) chips are the "working storage" in every computer.
DRAM is the main memory in a computer and SRAM is used for high-speed caches and buffers. Both
types are "byte addressable," which means that data can be read and written one byte at a time. Their
major drawback is that DRAM and SRAM require power to hold their content. See dynamic RAM, static
RAM and byte addressable.

Future Memories
The Holy Grail for future computer memories is to create a byte addressable RAM chip with the speed of
static RAM, the density of dynamic RAM and the non-volatility of flash. See future memory chips.

Non-Volatile
Rewritable - Byte Addressable - Symmetric
EEPROM chips and F-RAM, which have been on the market for some years, along with newer memory
technologies, offer the byte addressability of DRAM and SRAM, but do not lose their content when the
power is turned off. In addition, read and write speeds are equal or nearly the same. See EEPROM, FRAM and future memory chips.

Rewritable Flash - Block Writes - Asymmetric


Flash memory is the most widely used non-volatile memory chip in both computers and consumer
electronics (CE) devices. Although reads are random access to the byte level, writing is done at the block
level similar to writing a disk sector. Speeds are asymmetric; it takes longer to write than read. See flash
memory.

Rewritable When Removed (EPROM)


EPROM chips are initially written in an external "programmer" device and must be removed from the
circuit board and placed back in the device for reprogramming. See EPROM.

Permanent (ROM and PROM)


Data and instructions in ROM and PROM chips can never be changed. ROMs are manufactured, while
PROMs are programmed in an external device like EPROMs. See ROM and PROM.

Management of memory[edit]
Main article: Memory management
Proper management of memory is vital for a computer system to operate properly. Modern operating
systems have complex systems to properly manage memory. Failure to do so can lead to bugs, slow
performance, and at worst case, takeover by viruses and malicious software.
Nearly everything a computer programmer does requires him or her to consider how to manage
memory. Even storing a number in memory requires the programmer to specify how the memory
should store it.

Memory management bugs[edit]


Improper management of memory is a common cause of bugs, including the following types:

In an arithmetic overflow, a calculation results in a number larger than the allocated memory
permits. For example, a signed 8-bit integer allows the numbers 128 to +127. If its value is 127
and it is instructed to add one, the computer can not store the number 128 in that space. Such a
case will result in undesired operation, such as changing the number's value to 128 instead of
+128.

A memory leak occurs when a program requests memory from the operating system and
never returns the memory when it's done with it. A program with this bug will gradually require
more and more memory until the program fails as it runs out.

A segmentation fault results when a program tries to access memory that it does not have
permission to access. Generally a program doing so will be terminated by the operating system.

A buffer overflow means that a program writes data to the end of its allocated space and
then continues to write data to memory that has been allocated for other purposes. This may
result in erratic program behavior, including memory access errors, incorrect results, a crash, or
a breach of system security. They are thus the basis of many software vulnerabilities and can be
maliciously exploited.

Early computer systems[edit]


In early computer systems, programs typically specified the location to write memory and what data
to put there. This location was a physical location on the actual memory hardware. The slow
processing of such computers did not allow for the complex memory management systems used
today. Also, as most such systems were single-task, sophisticated systems were not required as
much.
This approach has its pitfalls. If the location specified is incorrect, this will cause the computer to
write the data to some other part of the program. The results of an error like this are unpredictable.
In some cases, the incorrect data might overwrite memory used by the operating system. Computer
crackers can take advantage of this to create viruses and malware.

Virtual memory[edit]
Main article: virtual memory
Virtual memory is a system where all physical memory is controlled by the operating system. When a
program needs memory, it requests it from the operating system. The operating system then decides
what physical location to place the memory in.
This offers several advantages. Computer programmers no longer need to worry about where the
memory is physically stored or whether the user's computer will have enough memory. It also allows
multiple types of memory to be used. For example, some memory can be stored in physical RAM
chips while other memory is stored on a hard drive. This drastically increases the amount of memory
available to programs. The operating system will place actively used memory in physical RAM, which
is much faster than hard disks. When the amount of RAM is not sufficient to run all the current
programs, it can result in a situation where the computer spends more time moving memory from
RAM to disk and back than it does accomplishing tasks; this is known as thrashing.
Virtual memory systems usually include protected memory, but this is not always the case.

Protected memory[edit]
Main article: memory protection

Protected memory is a system where each program is given an area of memory to use and is not
permitted to go outside that range. Use of protected memory greatly enhances both the reliability
and security of a computer system.
Without protected memory, it is possible that a bug in one program will alter the memory used by
another program. This will cause that other program to run off of corrupted memory with
unpredictable results. If the operating system's memory is corrupted, the entire computer system
may crash and need to be rebooted. At times programs intentionally alter the memory used by other
programs. This is done by viruses and malware to take over computers.
Protected memory assigns programs their own areas of memory. If the operating system detects that
a program has tried to alter memory that does not belong to it, the program is terminated. This way,
only the offending program crashes, and other programs are not affected by the error.
Protected memory systems almost always include virtual memory as well.

https://en.wikipedia.org/wiki/Computer_memory

Cache memory, also called CPU memory, is random access memory (RAM)
that a computer microprocessor can access more quickly than it can access
regular RAM. Thismemory is typically integrated directly with the CPU chip or
placed on a separate chipthat has a separate bus interconnect with the CPU.
http://searchstorage.techtarget.com/definition/cache-memory

Memory Caching
A memory cache, sometimes called a cache store or RAM cache, is a portion of memory made of high-speed static
RAM (SRAM) instead of the slower and cheaper dynamic RAM (DRAM) used for main memory. Memory caching is
effective because most programsaccess the same data or instructions over and over. By keeping as much of this
information as possible in SRAM, the computer avoids accessing the slower DRAM.

http://www.webopedia.com/TERM/C/cache.html

L1 and L2 Caches
Some memory caches are built into the architecture of microprocessors. The Intel 80486 microprocessor, for
example, contains an 8K memory cache, and the Pentium has a 16K cache. Such internal caches are often
called Level 1 (L1) caches. Most modern PCs also come with external cache memory, called Level 2 (L2) caches.
These caches sit between the CPU and the DRAM. Like L1 caches, L2 caches are composed of SRAM but they are
much larger.

Disk Caching
Disk caching works under the same principle as memory caching, but instead of using high-speed SRAM, a disk
cache uses conventional main memory. The most recently accessed data from the disk (as well as adjacentsectors)
is stored in a memory buffer. When a program needs to access data from the disk, it first checks the disk cache to
see if the data is there. Disk caching can dramatically improve the performance of applications, because accessing
a byte of data in RAM can be thousands of times faster than accessing a byte on a hard disk.

Smart Caching
When data is found in the cache, it is called a cache hit, and the effectiveness of a cache is judged by its hit
rate.Many cache systems use a technique known as smart caching, in which the system can recognize certain types
of frequently used data. The strategies for determining which information should be kept in the cache constitute some
of the more interesting problems in computer science.

http://www.webopedia.com/TERM/C/cache.html
Cache memory is a type of memory used to hold frequently used data. Cache memory is relatively
small, but very fast. Most web browsers use a cache to load regularly viewed webpages fast. The
most important type of cache memory is the CPU cache.

http://study.com/academy/lesson/cache-memory-definition-lesson-quiz.html

Definition of:cache(1) To store data locally in order to speed up subsequent retrievals.


Pronounced "cash." See Web cache andbrowser cache.
(2) Reserved areas of memory in every computer that are used to speed up instruction execution, data
retrieval and data updating. Pronounced "cash," they serve as staging areas, and their contents are
constantly changing. There are two kinds: memory caches and disk caches.

Memory Caches
A memory cache, also called a "CPU cache," is a memory bank that bridges main memory and the
processor. Comprising faster static RAM (SRAM) chips than the dynamic RAM (DRAM) used for main
memory, the cache allows instructions to be executed and data to be read and written at higher speed.
Instructions and data are transferred from main memory to the cache in fixed blocks, known as cache
"lines," using a look-ahead algorithm. See cache line, static RAM and dynamic RAM.

Temporal and Spatial (Time and Space)


Caches take advantage of "temporal locality," whereby unchanging data constants such as high-low limits,
messages and column headers are used over and over again. Caches also benefit from "spatial locality,"
because the next instruction to be executed or the next set of data to be processed is often next in line. The
more sequential they are, the greater the chance for a "cache hit." If the next item is not in the cache, a
"cache miss" occurs, and it must be retrieved from slower main memory.

Levels 1, 2 and 3 (L1, L2, L3)


Today's CPU chips contain two or three caches, with L1 being the fastest. Each subsequent cache is slower
and larger than L1, and instructions and data are staged from main memory to L3 to L2 to L1 to the
processor. On multicore chips, the L3 cache is generally shared among all the processing cores. See writeback cache andwrite-through cache.

Memory Cache Hierarchy


The whole idea is to keep staging more instructions and data in a memory that is closer to the speed of the processor.
The caches are generally built into the CPU chip. See L2 cache.

Disk Caches
A disk cache is a section of main memory or memory in the disk controller that bridges the disk and CPU.
When the disk is read, a larger block of data is copied into the cache than is immediately required. If
subsequent reads find the data already stored in the cache, there is no need to retrieve it from the disk,
which is slower to access.
If the cache is used for writing, data are queued up at high speed and then written to disk during idle
machine cycles by the caching program or the disk controller. See cache coherency, write-back
cache, write-through cache, pipeline burst cache, lookaside cache, inline cache, backside cache and NV
cache.

Disk Cache
Disk caches are usually just a part of main memory made up of common dynamic RAM (DRAM) chips, whereas
memory caches (CPU caches) use higher-speed static RAM (SRAM) chips.

http://www.pcmag.com/encyclopedia/term/39177/cache

virtual memory definition


Virtual memory is a feature of an operating system (OS) that allows a
computer to compensate for shortages of physical memory by temporarily
transferring pages of data from random access memory (RAM) to disk
storage.
http://searchstorage.techtarget.com/definition/virtual-memory
In computing, virtual memory is a memory management technique that is implemented using both
hardware and software. It maps memory addresses used by a program, called virtual addresses,
into physical addresses in computer memory. Main storage as seen by a process or task appears as
a contiguousaddress space or collection of contiguous segments. The operating system manages
virtual address spaces and the assignment of real memory to virtual memory. Address translation
hardware in the CPU, often referred to as a memory management unit or MMU, automatically
translates virtual addresses to physical addresses. Software within the operating system may extend
these capabilities to provide a virtual address space that can exceed the capacity of real memory
and thus reference more memory than is physically present in the computer.
The primary benefits of virtual memory include freeing applications from having to manage a shared
memory space, increased security due to memory isolation, and being able to conceptually use
more memory than might be physically available, using the technique of paging.

https://en.wikipedia.org/wiki/Virtual_memory
Virtual memory is a common part of most operating systems ondesktop computers. It has become so
common because it provides a big benefit for users at a very low cost.
In this article, you will learn exactly what virtual memory is, what your computer uses it for and how to
configure it on your own machine to achieve optimal performance.
Most computers today have something like 32 or 64 megabytes of RAM available for the CPU to use
(see How RAM Works for details on RAM). Unfortunately, that amount of RAM is not enough to run all of
the programs that most users expect to run at once.

For example, if you load the operating system, an e-mail program, a Web browser and word processor
into RAM simultaneously, 32 megabytes is not enough to hold it all. If there were no such thing as virtual
memory, then once you filled up the available RAM your computer would have to say, "Sorry, you can not
load any more applications. Please close another application to load a new one." With virtual memory,
what the computer can do is look at RAM for areas that have not been used recently and copy them onto
the hard disk. This frees up space in RAM to load the new application.
Because this copying happens automatically, you don't even know it is happening, and it makes your
computer feel like is has unlimited RAM space even though it only has 32 megabytes installed. Because
hard disk space is so much cheaper than RAM chips, it also has a nice economic benefit.
The read/write speed of a hard drive is much slower than RAM, and the technology of a hard drive is not
geared toward accessing small pieces of data at a time. If your system has to rely too heavily on virtual
memory, you will notice a significant performance drop. The key is to have enough RAM to handle
everything you tend to work on simultaneously -- then, the only time you "feel" the slowness of virtual
memory is is when there's a slight pause when you're changing tasks. When that's the case, virtual
memory is perfect.
When it is not the case, the operating system has to constantly swap information back and forth between
RAM and the hard disk. This is called thrashing, and it can make your computer feel incredibly slow.
The area of the hard disk that stores the RAM image is called a page file. It holds pages of RAM on the
hard disk, and the operating system moves data back and forth between the page file and RAM. On a
Windows machine, page files have a .SWP extension.
Next, we'll look at how to configure virtual memory on a computer.

http://computer.howstuffworks.com/virtual-memory.htm
An imaginary memory area supported by some operating systems (for example, Windows but not DOS) in
conjunction with the hardware. You can think of virtual memory as an alternate set of
memory addresses. Programs use thesevirtual addresses rather than real addresses to store instructions and data.
When the program is actuallyexecuted, the virtual addresses are convertedinto real memory addresses.
The purpose of virtual memory is to enlarge the address space, the set of addresses a program can utilize. For
example, virtual memory might contain twice as many addresses as main memory. A program using all of virtual
memory, therefore, would not be able to fit in main memory all at once. Nevertheless, the computer could execute
such a program by copyinginto main memory those portions of the program needed at any given point during
execution.

To facilitate copying virtual memory into real memory, the operating system divides virtual memory into pages, each
of which contains a fixed number of addresses. Each page is stored on a diskuntil it is needed. When the page is
needed, the operating system copies it from disk to main memory, translating the virtual addresses into real
addresses.

http://www.webopedia.com/TERM/V/virtual_memory.html

Virtual memory serves two purposes. First, it allows us to extend the use of
physical memory by using disk. Second, it allows us to have memory protection,
because each virtual address is translated to a physical address.
The two are somewhat orthogonal (independent) of each other. For example, we
could use the disk as an extension of the address space accessible to the
programmer, without providing memory protection. Thus, a programmer might
be able to access all disk pages, if the operating system allowed it when setting up
page tables.
It's also possible to have memory protection without any disks. Provided each
process only needs a small number of pages, we could allow all of those virtual
pages to reside in RAM. For example, suppose each process has only 2 virtual
pages. Then, since (in our example) RAM stores 256 pages, we could allow 128
processes to have virtual page 0 and 1, and they would not interfere with each
other in virtual memory.
http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Memory/virtual.html

virtual memory
Simulating more random access memory (RAM) than actually exists, allowing the computer to run larger
programs and multiple programs concurrently. A common function in most every OS and hardware
platform, virtual memory uses the hard disk to temporarily hold what was in real memory.
Virtual memory allows multiple programs to load in memory at the same time. Each application
addresses memory starting at zero, but virtual memory takes control of the memory addressing and lets
each application function as if it had unlimited memory.
Note that virtual "memory" and virtual "machine" are not the same. Virtual memory is used all the time,
whereas a virtual machine is an optional approach for running applications (see virtual machine).

Virtual Memory Pages


The computer's real memory is broken up into smaller segments, called "pages," typically 4KB in size.
When real memory fills up, pages not currently in use by open applications are written to a virtual
memory "swap file" on the disk for temporary storage. When any swapped out page is required again,
once again a page in real memory is written to the disk to make room, and the disk page is retrieved.
Memory is the computer's workspace, and since there is often a hundred times more disk space than
memory space, virtual memory dramatically increases the computer's capacity to do work. However, there

is a penalty. When a user has too many open programs, there can be excessive amounts of page swapping,
causing applications to slow down. In addition, switching between applications is no longer immediate
(see thrashing).

Hardware Is Required
Virtual memory can be implemented in software only, but efficient operation requires specialized
hardware circuits. All modern, general-purpose CPUs have memory management units (MMUs) that
support virtual memory. They provide "page tables" that are used to translate between the program's
"virtual" addresses and the "real" addresses in memory and disk, which may change at any time. Although
a program may initially load as a contiguous block of code, it can wind up in pages randomly scattered
around real memory.
Virtual memory claims are sometimes made for specific applications that bring additional parts of the
program in as needed; however, true virtual memory is built into the operating system and hardware and
works with all applications. See Windows swap file.

Memory Is Extended to Disk


Virtual memory allows more programs to be opened simultaneously by using the hard disk as
temporary storage of memory pages.

Page Out, Page In


When memory is full and the current program needs instructions that are not in memory, pages are
swapped. In this example, program A needs a page from the disk, and a page from program C is
swapped out to make room.

http://www.pcmag.com/encyclopedia/term/53929/virtual-memory

interleaved memory is a design made to compensate for the relatively slow speed of dynamic
random-access memory (DRAM) or core memory, by spreading memory addresses evenly
across memory banks. That way, contiguous memory reads and writes are using each memory bank
in turn, resulting in higher memory throughputs due to reduced waiting for memory banks to become
ready for desired operations.
It is different from multi-channel memory architectures, primarily as interleaved memory is not adding
more channels between the main memory and the memory controller. However, channel interleaving
is also possible, for example in freescale i.MX6 processors, which allow interleaving to be done
between two channels
https://en.wikipedia.org/wiki/Interleaved_memory

[ The PC Guide | Systems and Components Reference Guide | System Memory | Memory Speed,
Access and Timing ]
Interleaving
Interleaving is an advanced technique used by high-end motherboards/chipsets to improve
memory performance. Memory interleaving increases bandwidth by allowing simultaneous
access to more than one chunk of memory. This improves performance because the processor can
transfer more information to/from memory in the same amount of time, and helps alleviate the
processor-memory bottleneck that is a major limiting factor in overall performance.
Interleaving works by dividing the system memory into multiple blocks. The most common
numbers are two or four, called two-way or four-way interleaving, respectively. Each block of
memory is accessed using different sets of control lines, which are merged together on the
memory bus. When a read or write is begun to one block, a read or write to other blocks can be
overlapped with the first one. The more blocks, the more that overlapping can be done. As an
analogy, consider eating a plate of food with a fork. Two-way interleaving would mean dividing
the food onto two plates and eating with both hands, using two forks. (Four-way interleaving
would require two more hands. :^) ) Remember that here the processor is doing the "eating" and
it is much faster than the forks (memory) "feeding" it (unlike a person, whose hands are
generally faster.)
In order to get the best performance from this type of memory system, consecutive memory
addresses are spread over the different blocks of memory. In other words, if you have 4 blocks of
interleaved memory, the system doesn't fill the first block, and then the second and so on. It uses
all 4 blocks, spreading the memory around so that the interleaving can be exploited.

Interleaving is an advanced technique that is not generally supported by most PC motherboards,


most likely due to cost. It is most helpful on high-end systems, especially servers, that have to
process a great deal of information quickly. The Intel Orion chipset is one that does support
memory interleaving.
http://www.pcguide.com/ref/ram/timingInterleaving-c.html

Memory Interleaving

To speed up the memory operations (read and write), the main memory of
words can be organized as a set of
independent memory modules
(where
each containing
words. If these M modules can work in parallel
(or in a pipeline fashion), then ideally an M fold speed improvement can be expected.
The n-bit address is divided into an m-bit field to specify the module, and another (nm)-bit field to specify the word in the addressed module. The field for specifying the
modules can be either the most or least significant m bits of the address. For example,
these are the two arrangements of
of

words (

modules (

) of a memory

):

In general, the CPU is more likely to need to access the memory for a set of
consecutive words (either a segment of consecutive instructions in a program or the

components of a data structure such as an array, the interleaved (low-order)


arrangement is preferable as consecutive words are in different modules and can be
fetched simultaneously. In case of high-order arrangement, the consecutive words are
usually in one module, having multiple modules is not helpful if consecutive words
are needed.
Example: A memory of
containing

words (n=16) with


words:

http://fourier.eng.hmc.edu/e85_old/lectures/memory/node2.html

modules (m=4) each

Anda mungkin juga menyukai