Lec 6 Memory systems-computer architecture
Lec 6 Memory systems-computer architecture
ORGANIZATION HIERARCHIES
LECTURE 6
Memory
Memory can be categorised into two;
■ External Memory or Secondary Memory –
Comprising of Magnetic Disk, Optical Disk, Magnetic Tape i.e.
peripheral storage devices which are accessible by the processor via
I/O Module.
■ Internal Memory or Primary Memory –
Comprising of Main Memory, Cache Memory & CPU registers. This is
directly accessible by the processor
Memory
■ The memory unit is an essential component in any digital computer
since it is needed for storing programs and data
■ Most general-purpose computers would run more efficiently if they were
equipped with additional storage beyond the capacity of the main
memory. There is just not enough space in one memory unit to
accommodate all the programs used in a typical computer. Moreover,
most computer users accumulate and continue to accumulate large
amounts of data-processing software.
■ Not all accumulated information is needed by the processor at the same
time. Therefore, it is more economical to use low-cost storage devices to
serve as a backup for storing the information that is not currently used
by the CPU
Memory
■ The memory unit that communicates directly with the CPU is called
the main memory. Devices that provide backup storage are called
auxiliary memory.
■ The most common auxiliary memory devices used in computer
systems are magnetic disks and tapes. They are used for storing
system programs, large data files, and other backup information.
■ Only programs and data currently needed by the processor reside in
main memory. All other information is stored in auxiliary memory and
transferred to main memory when needed
Memory Hierarchy
■ The total memory capacity of a computer can be visualized by hierarchy
of components. The memory hierarchy system consists of all storage
devices contained in a computer system from the slow Auxiliary Memory
to fast Main Memory and to smaller Cache memory.
Characteristics of memory hierarchy
design
■ Capacity:
It is the global volume of information the memory can store. As we move from top
to bottom in the Hierarchy, the capacity increases.
■ Access Time:
It is the time interval between the read/write request and the availability of the
data. As we move from top to bottom in the Hierarchy, the access time increases.
■ Performance:
One of the most significant ways to increase system performance is minimizing
how far down the memory hierarchy one has to go to manipulate data.
■ Cost per bit:
As we move from bottom to top in the Hierarchy, the cost per bit increases i.e.
Internal Memory is costlier than External Memory.
Auxiliary Memory
■ Devices that provide backup storage are called auxiliary memory. For
example: Magnetic disks and tapes are commonly used auxiliary
devices. Other devices used as auxiliary memory are magnetic drums,
magnetic bubble memory and optical disks.
■ It is not directly accessible to the CPU, and is accessed using the
Input/Output channels.
■ Auxillary memory access time is generally 1000 times that of the
main memory, hence it is at the bottom of the hierarchy.
Main Memory
The main memory is the central storage unit in a computer system. It is a
relatively large and fast memory used to store programs and data during the
computer operation. It is the central storage unit of the computer system. Main
memory is made up of RAM and ROM, with RAM integrated circuit chips holding
the major share.
■ RAM: Random Access Memory
– DRAM: Dynamic RAM, is made of capacitors and transistors, and must be
refreshed every 10~100 ms. It is slower and cheaper than SRAM.
– SRAM: Static RAM, has a six transistor circuit in each cell and retains data,
until powered off.
– NVRAM: Non-Volatile RAM, retains its data, even when turned off.
Example: Flash memory.
■ ROM: Read Only Memory, is non-volatile and is more like a permanent storage
for information. It also stores the bootstrap loader program, to load and start
the operating system when computer is turned on. PROM(Programmable
ROM), EPROM(Erasable PROM) and EEPROM(Electrically Erasable PROM) are
some commonly used ROMs.
Main memory contd
– associative mapping
– direct mapping
Memory access methods
■ Each memory type, is a collection of numerous memory locations. To
access data from any memory, first it must be located and then the
data is read from the memory location. Following are the methods to
access information from memory locations:
■ Random Access: Main memories are random access memories, in
which each memory location has a unique address. Using this unique
address any memory location can be reached in the same amount of
time in any order.
■ Sequential Access: This methods allows memory access in a
sequence or in order.
■ Direct Access: In this mode, information is stored in tracks, with
each track having a separate read/write head.
MEMORY CONNECTION TO CPU
■ RAM and ROM chips are connected to a CPU through the data and
address buses. The low-order lines in the address bus select the byte
within the chips and other lines in the address bus select a particular
chip through its chip select inputs
■ This configuration gives a memory capacity of 512 bytes of RAM and
512 bytes of ROM. Each RAM receives the seven low order bits of the
address bus to select one of 128 possible bytes. The particular RAM
chip selected is determined from lines 8 and 9 in the address bus.
■ This is done through a 2 × 4 decoder whose outputs go to the SCI
input in each RAM chip. Thus, when address lines 8 and 9 are equal to
00, the first RAM chip is selected. When 01, the second RAM chip is
selected, and so on. The RD and WR outputs from the microprocessor
are applied to the inputs of each RAM chip.
MEMORY CONNECTION TO CPU
■ The selection between RAM and ROM is achieved through bus line 10.
The RAMs are selected when the bit in this line is 0, and the ROM
when the bit is 1. The other chip select input in the ROM is connected
to the RD control line for the ROM chip to be enabled only during a
read operation.
■ Address bus lines 1 to 9 are applied to the input address of ROM
without going through the decoder. This assigns addresses 0 to 511 to
RAM and 512 to 1023 to ROM. The data bus of the ROM has only an
output capability, whereas the data bus connected to the RAMs can
transfer information in both directions.
Magnetic memory
2. Rotational Latency-
■ The time taken by the desired sector to come under the read / write head
is called as rotational latency.
■ It depends on the rotation speed of the spindle.
3. Data Transfer Rate-
■ The amount of data that passes under the read / write head in a given
amount of time is called as data transfer rate.
■ The time taken to transfer the data is called as transfer time.
5. Queuing Delay-
■ The time spent waiting for the disk to become free is called as
queuing delay.
Data Organization and
Formatting
■ A bit near the center of a rotating disk travels past a fixed point (such
as a read–write head) slower than a bit on the outside. Therefore,
some way must be found to compensate for the variation in speed so
that the head can read all the bits at the same rate.
■ This can be done by increasing the spacing between bits of
information recorded in segments of the disk. The information can
then be scanned at the same rate by rotating the disk at a fixed
speed, known as the constant angular velocity(CAV).Figure 6.3a shows
the layout of a disk using CAV.
■ The disk is divided into a number of pie-shaped sectors and into a
series of concentric tracks.
Data Organization and
Formatting
■ The advantage of using CAV is that individual blocks of data can be
directly addressed by track and sector. To move the head from its
current location to a specific address, it only takes a short movement
of the head to a specific track and a short wait for the proper sector to
spin under the head.
Data Organization and
Formatting
■ The disadvantage of CAV is that the amount of data that can be stored
on the long outer tracks is the only same as what can be stored on the
short inner tracks. Because the density, in bits per linear inch, increases
in moving from the outermost track to the innermost track, disk storage
capacity in a straightforward CAV system is limited by the maximum
recording density that can be achieved on the innermost track.
■ Some means is needed to locate sector positions within a track. Clearly,
there must be some starting point on the track and a way of identifying
the start and end of each sector. These requirements are handled by
means of control data recorded on the disk. Thus, the disk is formatted
with some extra data used only by the disk drive and not accessible to
the user.
.
Memory Organization