Unit-IV COA
Unit-IV COA
Both static and dynamic RAM are considered volatile, as their state is lost or
reset when power is removed from the system. By contrast, read-only memory
(ROM) stores data by permanently enabling or disabling selected transistors, such
that the memory cannot be altered. Writeable variants of ROM (such as EEPROM
and flash memory) share properties of both ROM and RAM, enabling data to persist
without power and to be updated without requiring special equipment. These
persistent forms of semiconductor ROM include USB flash drives, memory cards
for cameras and portable devices, and solid-state drives. ECC memory (which can
be either SRAM or DRAM) includes special circuitry to detect and/or correct
random faults (memory errors) in the stored data, using parity bits or error
correction codes.
In general, the term RAM refers solely to solid-state memory devices (either
DRAM or SRAM), and more specifically the main memory in most computers. In
optical storage, the term DVD-RAM is somewhat of a misnomer since, unlike CD-
RW or DVD-RW it does not need to be erased before reuse. Nevertheless, a DVD-
RAM behaves much like a hard disc drive if somewhat slower.
Difference between Static Ram And Dynamic Ram
2D and 2.5D Memory organization
The internal structure of Memory either RAM or ROM is made up of memory cells
that contain a memory bit. A group of 8 bits makes a byte. The memory is in the
form of a multidimensional array of rows and columns. In which, each cell stores a
bit and a complete row contains a word. A memory simply can be divided into this
below form.
2n = N
where n is the no. of address lines and N is the total memory in bytes.
There will be 2n words.
2D Memory organization –
In 2D organization, memory is divided in the form of rows and columns(Matrix).
Each row contains a word, now in this memory organization, there is a decoder. A
decoder is a combinational circuit that contains n input lines and 2 n output lines.
One of the output lines selects the row by the address contained in the MAR and
the word which is represented by that row gets selected and is either read or
written through the data lines.
2D Memory Organization:
Higher Bandwidth: 2.5D memory organization has higher bandwidth since it uses
a high-speed interconnect between memory chips, enabling faster data transfer
rates.
Higher Capacity: 2.5D memory organization has higher capacity since it can stack
multiple memory chips on top of each other, enabling more memory to be packed
into a smaller space.
Scalability: 2.5D memory organization is highly scalable, making it easier to
increase memory capacity or performance without adding more memory chips.
Disadvantages:
2D Memory Organization:
Levels of memory:
Level 1 or Register – It is a type of memory in which data is stored and
accepted that are immediately stored in CPU. Most commonly used register is
accumulator, Program counter, address register etc.
Level 2 or Cache memory – It is the fastest memory which has faster access
time where data is temporarily stored for faster access.
Level 3 or Main Memory – It is memory on which computer works currently.
It is small in size and once power is off data no longer stays in this memory.
Level 4 or Secondary Memory – It is external memory which is not as fast as
main memory but data stays permanently in this memory.
Cache Performance:
When the processor needs to read or write a location in main memory, it first
checks for a corresponding entry in the cache.
If the processor finds that the memory location is in the cache, a cache hit has
occurred and data is read from cache
If the processor does not find the memory location in the cache, a cache
miss has occurred. For a cache miss, the cache allocates a new entry and
copies in data from main memory, then the request is fulfilled from the
contents of the cache.
Types of Cache –
Primary Cache – A primary cache is always located on the processor chip.
This cache is small and its access time is comparable to that of processor
registers.
Secondary Cache – Secondary cache is placed between the primary cache
and the rest of the memory. It is referred to as the level 2 (L2) cache. Often,
the Level 2 cache is also housed on the processor chip.
Auxiliary memory
Auxiliary memory devices used in computer systems are magnetic disks and tapes, magnetic
drums, magnetic bubble memory, and optical disks. • A magnetic disk is a circular plate
constructed of metal or plastic coated with magnetized material. Often both sides of the disk
are used and several disks may be stacked on one spindle with read/write heads available on
each surface. All disks rotate together at high speed and are not stopped or started for access
purposes. Bits are stored in the magnetized surface in spots along concentric circles called
tracks. The tracks are commonly divided into sections called sectors. In most systems, the
minimum quantity of information which can be transferred is a sector. The subdivision of one
disk surface into tracks and sectors is shown in figure.
Magnetic tape transport consists of the electrical, mechanical, and electronic components to
provide the parts and control mechanism for a magnetic-tape unit. The tape itself is a strip of
plastic coated with a magnetic recording medium. Magnetic tape units can be stopped, started
to move forward or in reverse, or can be rewound.
Optical discs
Another form of largely read-only memory is the optical compact disc, developed
from videodisc technology during the early 1980s. Data are recorded as tiny pits in a single
spiral track on plastic discs that range from 3 to 12 inches (7.6 to 30 cm) in diameter, though a
diameter of 4.8 inches (12 cm) is most common. The pits are produced by a laser or by a
stamping machine and are read by a low-power laser and a photocell that generates an
electrical signal from the varying light reflected from the pattern of pits. Optical discs are
removable and have a far greater memory capacity than diskettes; the largest ones can store
many gigabytes of information.
A common optical disc is the CD-ROM (compact disc read-only memory). It holds about 700
megabytes of data, recorded with an error-correcting code that can correct bursts of errors
caused by dust or imperfections. CD-ROMs are used to distribute software, encyclopaedias,
and multimedia text with audio and images. CD-R (CD-recordable), or WORM (write-once
read-many), is a variation of CD-ROM on which a user may record information but not
subsequently change it. CD-RW (CD-rewritable) disks can be re-recorded. DVDs (digital video,
or versatile, discs), developed for recording movies, store data more densely than does CD-
ROM, with more powerful error correction. Though the same size as CDs, DVDs typically hold 5
to 17 gigabytes—several hours of video or several million text pages.
Magneto-optical discs
Magneto-optical discs are a hybrid storage medium. In reading, spots with different directions
of magnetization give different polarization in the reflected light of a low-power laser beam. In
writing, every spot on the disk is first heated by a strong laser beam and then cooled under
a magnetic field, magnetizing every spot in one direction, to store all 0s. The writing process
then reverses the direction of the magnetic field to store 1s where desired.
Virtual Memory
What is Virtual Memory?
Virtual memory in computer organization architecture is a technique and not actually a
memory in physical form present in computer system. This is the reason it is known
as virtual memory.
Virtual memory in COA is simply a technique used to provide an illusion of presence of large
main memory to the programmer, when in actual it’s not present physically.
The size of virtual memory is equivalent to the size of secondary memory. Each virtual address
or logical address referenced by the CPU is mapped to a physical address in main memory.
A hardware device called Memory Management Unit (MMU) performs this mapping
during run time. To perform this activity MMU actually takes help of a memory map table,
which is maintained by the operating system.
The set of all logical address generated by CPU or program is known as logical address space.
It is also called as virtual address space.
The set of all physical addresses corresponding to the above logical addresses is known
as physical address space.
The complete procedure is something like this. When a program is required to be executed
then the CPU or program would generate a addresses called logical addresses. And executing
program occupies corresponding addresses in physical memory called as physical address.
Virtual memory technique helps in efficient utilization of main memory. As larger size
programs are divided into blocks and partially each block is loaded into main memory
as per need. This makes simultaneous execution of multiple program possible.
Virtual memory helps in efficient CPU utilization
Virtual memory helps to improve overall throughput.
Some of the key disadvantages and problems associated with virtual memory usage are:
All of us are aware of the fact that our program needs to be available in main memory for the
processor to execute it. Assume that your computer has something like 32 or 64 MB RAM
available for the CPU to use. 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 MB is not
enough to hold all of them. If there were no such thing as virtual memory, then you will not be
able to run your programs, unless some program is closed. With virtual memory, we do not
view the program as one single piece. We divide it into pieces, and only the one part that is
currently being referenced by the processor need to be available in main memory. The entire
program is available in the hard disk. As the copying between the hard disk and main memory
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 MB installed. Because hard disk
space is so much cheaper than RAM chips, it also has a n economic benefit.
Techniques that automatically move program and data blocks into the physical main
memory when they are required for execution are called virtual-memory techniques.
Programs, and hence the processor, reference an instruction and data space that is
independent of the available physical main memory space. The binary addresses that the
processor issues for either instructions or data are called virtual or logical addresses. These
addresses are translated into physical addresses by a combination of hardware and software
components. If a virtual address refers to a part of the program or data space that is currently
in the physical memory, then the contents of the appropriate location in the main memory are
accessed immediately. On the other hand, if the referenced address is not in the main memory,
its contents must be brought into a suitable location in the memory before they can be used.
Therefore, an address used by a programmer will be called a virtual address, and the set of
such addresses the address space. An address in main memory is called a location or physical
address. The set of such locations is called the memory space, which consists of the actual main
memory locations directly addressable for processing. As an example, consider a computer
with a main-memory capacity of 32M words. Twenty-five bits are needed to specify a physical
address in memory since 32 M = 225. Suppose that the computer has available auxiliary
memory for storing 235, that is, 32G words. Thus, the auxiliary memory has a capacity for
storing information equivalent to the capacity of 1024 main memories. Denoting the address
space by N and the memory space by M, we then have for this example N = 32 Giga words and
M = 32 Mega words.
The portion of the program that is shifted between main memory and secondary storage can
be of fixed size (pages) or of variable size (segments). Virtual memory also permits a
program’s memory to be physically noncontiguous , so that every portion can be allocated
wherever space is available. This facilitates process relocation. Virtual memory, apart from
overcoming the main memory size limitation, allows sharing of main memory among
processes. Thus, the virtual memory model provides decoupling of addresses used by the
program (virtual) and the memory addresses (physical). Therefore, the definition of virtual
memory can be stated as, “ The conceptual separation of user logical memory from physical
memory in order to have large virtual memory on a small physical memory”. It gives an
illusion of infinite storage, though the memory size is limited to the size of the virtual address.
Even though the programs generate virtual addresses, these addresses cannot be used to
access the physical memory. Therefore, the virtual to physical address translation has to be
done. This is done by the memory management unit (MMU). The mapping is a dynamic
operation, which means that every address is translated immediately as a word is referenced
by the CPU. This concept is depicted diagrammatically in Figures 1 and 2. Figure 1 gives a
general overview of the mapping between the logical addresses and physical addresses. Figure
2 shows how four different pages A, B, C and D are mapped. Note that, even though they are
contiguous pages in the virtual space, they are not so in the physical space. Pages A, B and C
are available in physical memory at non-contiguous locations, whereas, page D is not available
in physical storage.