TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
COMPUTER MEMORY
1. INTRODUCTION
In computing, memory refers to the physical devices used to store programs
(sequences of instructions) or data (e.g. program state information) on a temporary
or permanent basis for use in a computer or other digital electronic device
The term "memory" applies to any electronic component capable of temporarily
storing data. There are two main categories of memories:
Internal memory that temporarily memorises data while programs are running.
Internal memory uses microconductors, i.e. fast specialised electronic circuits.
Internal memory corresponds to what we call random access memory (RAM).
Auxiliary memory (also called physical memory or external memory) that stores
information over the long term, including after the computer is turned off.
Auxiliary memory corresponds to magnetic storage devices such as the hard drive,
optical storage devices such as CD-ROMs and DVD-ROMs, as well as read-only
memories.
Technical Characteristics
The main characteristics of a memory are:
Capacity, representing the global volume of information (in bits) that the
memory can store
Access time, corresponding to the time interval between the read/write
request and the availability of the data
Cycle time, representing the minimum time interval between two successive
accesses
Throughput, which defines the volume of information exchanged per unit of
time, expressed in bits per second
2. Non-volatility, which characterises the ability of a memory to store data
when it is not being supplied with electricity
The term "memory" is often (but not always) associated with addressable
semiconductor memory, i.e. integrated circuits consisting of silicon-based
transistors, used for example as primary memory but also other purposes in
computers and other digital electronic devices.
There are two main types of semiconductor memory:
Volatile
Non-volatile
. Examples of non-volatile memory are flash memory (sometimes used as
secondary, sometimes primary computer memory) and
ROM/PROM/EPROM/EEPROM memory (used for firmware such as boot
programs).
Examples of volatile memory are primary memory (typically dynamic RAM,
DRAM), and fast CPU cache memory (typically static RAM, SRAM, which is fast but
energy-consuming and offer lower memory capacity per area unit than DRAM) .
The semiconductor memory is organized into memory cells or bistable flip-flops,
each storing one binary bit (0 or 1). The memory cells are grouped into words of
fix 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.
Volatile memory
3. Volatile memory is computer memory that requires power to maintain the stored
information. Most modern semiconductor volatile memory is either Static RAM
(see SRAM) or dynamic RAM (see DRAM). SRAM retains its contents as long as the
power is connected and is easy to interface to but uses six transistors per bit.
Dynamic RAM is more complicated to interface to and control and needs regular
refresh cycles to prevent its contents being lost. However, DRAM uses only one
transistor and a capacitor per bit, allowing it to reach much higher densities and,
with more bits on a memory chip, be much cheaper per bit. 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 include Z-
RAM, TTRAM, A-RAM and ETA RAM.
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
HOW MEMORY WORKS?
Although memory is technically any form of electronic storage, it is used most
often to identify fast, temporary forms of storage. If your computer's CPU had to
constantly access the hard drive to retrieve every piece of data it needs, it would
operate very slowly. When the information is kept in memory, the CPU can access
it much more quickly. Most forms of memory are intended to store data
temporarily.
As you can see in the diagram above, the CPU accesses memory according to a
distinct hierarchy. Whether it comes from permanent storage (the hard drive) or
input (the keyboard), most data goes in random access memory (RAM) first. The
4. CPU then stores pieces of data it will need to access, often in a cache, and
maintains certain special instructions in the register. We'll talk about cache and
registers later.
All of the components in your computer, such as the CPU, the hard drive and the
operating system, work together as a team, and memory is one of the most
essential parts of this team. From the moment you turn your computer on until
the time you shut it down, your CPU is constantly using memory. Let's take a look
at a typical scenario:
• You turn the computer on.
• The computer loads data from read-only memory (ROM) and performs a
power-on self-test (POST) to make sure all the major components are functioning
properly. As part of this test, the memory controller checks all of the memory
addresses with a quick read/write operation to ensure that there are no errors in
the memory chips. Read/write means that data is written to a bit and then read
from that bit.
• The computer loads the basic input/output system (BIOS) from ROM. The
BIOS provides the most basic information about storage devices, boot sequence,
security, Plug and Play (auto device recognition) capability and a few other items.
• The computer loads the operating system (OS) from the hard drive into the
system's RAM. Generally, the critical parts of the operating system are maintained
in RAM as long as the computer is on. This allows the CPU to have immediate
access to the operating system, which enhances the performance and
functionality of the overall system.
• When you open an application, it is loaded into RAM. To conserve RAM
usage, many applications load only the essential parts of the program initially and
then load other pieces as needed.
• After an application is loaded, any files that are opened for use in that
application are loaded into RAM.
• When you save a file and close the application, the file is written to the
specified storage device, and then it and the application are purged from RAM.
5. ¬In the list above, every time something is loaded or opened, it is placed into
RAM. This simply means that it has been put in the computer's temporary storage
area so that the CPU can access that information more easily. The CPU requests
the data it needs from RAM, processes it and writes new data back to RAM in a
continuous cycle. In most computers, this shuffling of data between the CPU and
RAM happens millions of times every second. When an application is closed, it
and any accompanying files are usually purged (deleted) from RAM to make room
for new data. If the changed files are not saved to a permanent storage device
before being purged, they are lost.In the list above, every time something is
loaded or opened, it is placed into RAM. This simply means that it has been put in
the computer's temporary storage area so that the CPU can access that
information more easily. The CPU requests the data it needs from RAM, processes
it and writes new data back to RAM in a continuous cycle. In most computers, this
shuffling of data between the CPU and RAM happens millions of times every
second. When an application is closed, it and any accompanying files are usually
purged (deleted) from RAM to make room for new data. If the changed files are
not saved to a permanent storage device before being purged, they are lost.
RAM-RANDOM ACCESS MEMORY
As the name suggests, Random Access Memory can find and access the data
randomly. Sequential access is the opposite of Random access. In Sequential
access, to retrieve the data that is stored in the middle, all the data from the
beginning has to be read sequentially until the searched data is found. So it takes
time. Where as in RAM, the data can be directly jumped to the middle if
necessary without having to read the data sequentially. So the reading is faster. In
computers and printers RAM is used. In fact, RAM is the most important memory
in computers and printers. Every file or application opened is placed in RAM. Any
information the computer needs or uses becomes part of a continuous cycle
where the CPU requests data from RAM, processes it and then writes new data
back to RAM. This can happen millions of times a second. However, this is usually
just for temporary file storage, so unless the data is saved somewhere, it is
deleted when the files or applications are closed.
How RAM works???
6. Although memory is technically any form of electronic storage, it is used most
often to identify fast, temporary forms of storage. If your computer's CPU had to
constantly access the hard drive to retrieve every piece of data it needs, it would
operate very slowly. When the information is kept in memory, the CPU can access
it much more quickly. Most forms of memory are intended to store data
temporarily.
As you can see in the diagram above, the CPU accesses memory according to a
distinct hierarchy. Whether it comes from permanent storage (the hard drive) or
input (the keyboard), most data goes in random access memory (RAM) first. The
CPU then stores pieces of data it will need to access, often in a cache, and
maintains certain special instructions in the register. We'll talk about cache and
registers later.
All of the components in your computer, such as the CPU, the hard drive and the
operating system, work together as a team, and memory is one of the most
essential parts of this team. From the moment you turn your computer on until
the time you shut it down, your CPU is constantly using memory. Let's take a look
at a typical scenario:
• You turn the computer on.
• The computer loads data from read-only memory (ROM) and performs a
power-on self-test (POST) to make sure all the major components are functioning
properly. As part of this test, the memory controller checks all of the memory
addresses with a quick read/write operation to ensure that there are no errors in
the memory chips. Read/write means that data is written to a bit and then read
from that bit.
• The computer loads the basic input/output system (BIOS) from ROM. The
BIOS provides the most basic information about storage devices, boot sequence,
security, Plug and Play (auto device recognition) capability and a few other items.
• The computer loads the operating system (OS) from the hard drive into the
system's RAM. Generally, the critical parts of the operating system are maintained
in RAM as long as the computer is on. This allows the CPU to have immediate
access to the operating system, which enhances the performance and
functionality of the overall system.
7. • When you open an application, it is loaded into RAM. To conserve RAM
usage, many applications load only the essential parts of the program initially and
then load other pieces as needed.
• After an application is loaded, any files that are opened for use in that
application are loaded into RAM.
• When you save a file and close the application, the file is written to the
specified storage device, and then it and the application are purged from RAM.
¬In the list above, every time something is loaded or opened, it is placed into
RAM. This simply means that it has been put in the computer's temporary storage
area so that the CPU can access that information more easily. The CPU requests
the data it needs from RAM, processes it and writes new data back to RAM in a
continuous cycle. In most computers, this shuffling of data between the CPU and
RAM happens millions of times every second. When an application is closed, it
and any accompanying files are usually purged (deleted) from RAM to make room
for new data. If the changed files are not saved to a permanent storage device
before being purged, they are lost.automatically thousands of times per second.
TYPES OF RAM
Ram is built by using two different techniques:
1. DRAM: DRAM stands for dynamic fandom access memory. It is a type of
memory that is used in most computers. It is the least expensive kind of
RAM.
DRAM requires an electric current to maintain its electrical state. The
electrical charge of DRAM decreases with time that may result in loss of data.
DRAM is recharged or refreshed again and again to maintain its data. The
processor cannot access the data of DRAM when it is being refreshed. That is why
it is slow.
2. SRAM: SRAM stands for static random access memory. The memory cells
are made from digital gates. Each cell can store data without any need of
frequent recharging. CPU does not need to wait to access data from SRAM
during processing. That is why it is faster than DRAM. It utilizes less power
8. than DRAM. SRAM is more expensive. It is normally used to build a very fast
memory known as cache memory.
RAM
ROM-READ ONLY MEMORY
ROM stands for Read Only Memory. The instructions in ROM prepare the
computer for use. These instructions can only be read but cannot be changed or
deleted. It is not possible to write new information or instructions into the ROM.
ROM stores data and instructions permanently. When the power is switched off,
the instructions stored in ROM are not lost. That is why ROM is known as non-
volatile memory.
9. The information in ROM is stored by the manufacturer. When the computer is
switched on, the instructions in ROM are automatically loaded into the memory
of computer.
Types of ROM
Different types of ROM are as follows;
1. PROM: stands for programmable read only memory. This form of ROM is
initially blank. The user or manufacturer can write data and programs on it
using special devices. The user can write data and instruction on it only
once. If there is any error in writing the instructions, the error cannot be
removed from PROM. The chip becomes unusable.
1. EPROM: EPROM stands for erasable programmable read only memory. This
form of ROM is initially blank. The user or manufacturer can write data and
programs on it using special ultraviolet rays. The user then can write new
program on it.
3. EEPROM: EEPROM stands for electronically erasable programmable read
only memory. In this memory, user can erase and write instructions with
the help of electrical pulses. It there is any error in writing the instructions,
the user can erase the contents electronically. The contents of EEPROM can
be modified easily.
10. VIRTUAL MEMORY
Virtual memory typically comes into place when applications are too large for the
RAM to handle. The operating System uses the hard drive to temporarily store
information and take it back when needed. This is normally a lot slower than
actual RAM and can possibly degrade performance if used to heavily. A part of the
hard disk can be used as a Virtual Memory. Generally the size of the virtual
memory in a computer is 2 or 2.5 times greater than the RAM memory size in that
computer.
Assume you are starting an application. But there are already many programs
started previously that is occupying the RAM space. And the remaining space in
RAM is not sufficient to use the new application that you are starting. Then the
virtual memory is used. Now the Operating System comes into play. It decides
which are the applications that are not currently used and then moves them from
the RAM memory to the Virtual memory in Hard Disk. Therefore the RAM is now
free and the new application can occupy the space and be started. If the program
that is moved to the virtual memory is used again then the Operating System
brings that application back from virtual memory to the RAM and some other idle
application is moved to the virtual memory.
Therefore the virtual memory is also referred to as Swap memory.
HOW VIRTUAL MEMORY WORKS???
11. Virtual memory is a common part of most operating systems on desktop
computers. It has become so common because it provides a big benefit for users
at a very low cost.
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.
12. CACHE MEMORY
A part of the main memory (RAM) can be used as Cache or it can be separate
chip.
The commands that are often used, or data often used will be kept in this static
RAM. This static RAM is called Cache memory.
Cache Memory is used in-between the CPU and the RAM and holds the most
frequently used data or instructions to be processed. Caching allows to do the
computer tasks more rapidly.The main purpose of cache is to accelerate the
computer while keeping the price of the computer low.Cache technology is the
use of faster but smaller memory type to accelerate a slower but larger type
memory type.when using a cache , we must check the cache to see if an item is in
there .If it is there, it’s called a cache hit.If not it is called a cache miss and the
computer must wait for a round trip from the larger,slower memory area.A cache
has some maximum size that is much smaller than the large storage area.It is
possible to have multiple layers of cache.
There are three different grades of Cache. Some systems will only have level 1
and level 2. More advanced systems will include the level 3 .
Level 1 (L1) - Is the primary and is on or very close to the processor. This is
used for the most frequently used data and instructions.Memory accesses
at full microprocessor speed ( 10 nanoseconds,4 kilobytes to 16 kilobytes
in size)
Level 2 (L2) - Is second closest to the CPU and is more common to be on the
motherboard. Depending on your motherboard it might be able to be
updated. This is used for the most frequently used data and
instructions.Memory access of type SRAM (around 20 to 30
nanoseconds,128 kilobytes to 512 kilobytes in size)
13. Level 3 (L3) - This is the most advanced cache and will speed up the
memory even further. This is used for the most frequently used data and
instructions.
But there are also Cache memory that comes independently from RAM. Level 1
(L1) and Level 2 (L2) are types of cache memory. The cache integrated inside the
microprocessor is categorised as L1 cache. For example Pentium Processor comes
with 16KB cache. This is SRAM.
The cache between the Microprocessor and the RAM is L2 Cache. This is also
SRAM category