0% found this document useful (0 votes)
57 views

Chapter Five

This chapter discusses computer memory. There are three main processes involved in memory: encoding, storage, and retrieval. Encoding converts information into a usable form, storage holds information for later use outside of awareness, and retrieval brings stored memories into conscious thought. The chapter aims to help readers understand memory types, characteristics, limitations, and how memory is used to accomplish tasks. Key topics covered include volatile vs. non-volatile memory, random access vs. sequential access, and the storage hierarchy from fastest but smallest memory to slower but largest storage.

Uploaded by

HR Sakib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Chapter Five

This chapter discusses computer memory. There are three main processes involved in memory: encoding, storage, and retrieval. Encoding converts information into a usable form, storage holds information for later use outside of awareness, and retrieval brings stored memories into conscious thought. The chapter aims to help readers understand memory types, characteristics, limitations, and how memory is used to accomplish tasks. Key topics covered include volatile vs. non-volatile memory, random access vs. sequential access, and the storage hierarchy from fastest but smallest memory to slower but largest storage.

Uploaded by

HR Sakib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 15

Chapter Five Memory

CHAPTER FIVE
MEMORY

Overview

Memory refers to the processes that are used to acquire, store, retain and later retrieve information.
There are three major processes involved in memory: encoding, storage and retrieval.

In order to form new memories, information must be changed into a usable form, which occurs through
the process known as encoding. Once information has been successfully encoded, it must be stored in
memory for later use. Much of this stored memory lies outside of our awareness most of the time,
except when we actually need to use it. The retrieval process allows us to bring stored memories into
conscious awareness.

The goal of this chapter is to help you become literate in Memory. In becoming computer literate about
Memory, you will be able to know about the importance of memory, types of memory, how to use the
memory and be able to use them to accomplish tasks every day.

Learning Objectives

In this chapter you will learn about:

 Memory
 Characteristics of Storage

 Need for Memory, Memory Types

 Comparisons of different memory

 Storage Hierarchy

 Memory Limitations

Page- 73
Chapter Five Memory

Introduction
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 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.

Computer - Memory
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 Cells
Primary computer memory is made up of memory cells, where each memory cell contains exactly one
number. Thus, a memory cell can be thought of as box into which a single number can be placed. The
number contained in a memory cell can be changed over time. When a new number is stored into a
memory cell, the old number contained in the memory cell is lost forever. At any time, the computer
may peer into a memory cell to read the current contents of the memory cell. The computer may read
the contents of a memory cell as many times as it wants, without disturbing it.

Characteristics of Storage
Storage technologies at all levels of the storage hierarchy can be differentiated by evaluating certain
core characteristics as well as measuring characteristics specific to a particular implementation. These
core characteristics are volatility, mutability, accessibility, and addressability. For any particular
implementation of any storage technology, the characteristics worth measuring are capacity and
performance.

1. Volatility
Non-volatile memory 
Will retain the stored information even if it is not constantly supplied with electric power. It is
suitable for long-term storage of information.
Volatile memory 
Requires constant power to maintain the stored information. The fastest memory technologies
of today are volatile ones (not a universal rule). Since primary storage is required to be very
fast, it predominantly uses volatile memory.
Dynamic random-access memory 
A form of volatile memory which also requires the stored information to be periodically re-
read and re-written, or refreshed, otherwise it would vanish.
Static random-access memory 
Page- 74
Chapter Five Memory

A form of volatile memory similar to DRAM with the exception that it never needs to be
refreshed as long as power is applied.

2. Mutability
Read/write storage or mutable storage 
Allows information to be overwritten at any time. A computer without some amount of
read/write storage for primary storage purposes would be useless for many tasks. Modern
computers typically use read/write storage also for secondary storage.
Read only storage 
Retains the information stored at the time of manufacture, and write once storage (Write Once
Read Many) allows the information to be written only once at some point after manufacture.
These are called immutable storage. Immutable storage is used for tertiary and off-line
storage. Examples include CD-ROM and CD-R.
Slow write, fast read storage 
Read/write storage which allows information to be overwritten multiple times, but with the
write operation being much slower than the read operation. Examples include CD-RW and
flash memory.

3. Accessibility
Random access 
Any location in storage can be accessed at any moment in approximately the same amount of
time. Such characteristic is well suited for primary and secondary storage.

Sequential access 
The accessing of pieces of information will be in a serial order, one after the other; therefore
the time to access a particular piece of information depends upon which piece of information
was last accessed. Such characteristic is typical of off-line storage.

4. Addressability
Location-addressable 
Each individually accessible unit of information in storage is selected with its numerical
memory address. In modern computers, location-addressable storage usually limits to primary
storage, accessed internally by computer programs, since location-addressability is very
efficient, but burdensome for humans.
File addressable 
Information is divided into files of variable length, and a particular file is selected with human-
readable directory and file names. The underlying device is still location-addressable, but the
operating system of a computer provides the file system abstraction to make the operation
more understandable. In modern computers, secondary, tertiary and off-line storage use file
systems.
Content-addressable 
Each individually accessible unit of information is selected based on the basis of (part of) the
contents stored there. Content-addressable storage can be implemented using software
(computer program) or hardware (computer device), with hardware being faster but more

Page- 75
Chapter Five Memory

expensive option. Hardware content addressable memory is often used in a computer's CPU
cache.

5. Capacity
Raw capacity 
The total amount of stored information that a storage device or medium can hold. It is
expressed as a quantity of bits or bytes (e.g. 10.4 megabytes).
Memory storage density 
The compactness of stored information. It is the storage capacity of a medium divided with a
unit of length, area or volume (e.g. 1.2 megabytes per square inch).

6. Performance
Latency 
The time it takes to access a particular location in storage. The relevant unit of measurement is
typically nanosecond for primary storage, millisecond for secondary storage, and second for
tertiary storage. It may make sense to separate read latency and write latency, and in case of
sequential access storage, minimum, maximum and average latency.
Throughput 
The rate at which information can be read from or written to the storage. In computer data
storage, throughput is usually expressed in terms of megabytes per second or MB/s, though bit
rate may also be used. As with latency, read rate and write rate may need to be differentiated.
Also accessing media sequentially, as opposed to randomly, typically yields maximum
throughput.
7. Energy use
 Storage devices that reduce fan usage, automatically shut-down during inactivity, and low
power hard drives can reduce energy consumption 90 percent.
 2.5 inch hard disk drives often consume less power than larger ones. Low capacity solid-state
drives have no moving parts and consume less power than hard disks. Also, memory may use
more power than hard disks.

Need for Memory


The computer executes the instructions one after the other. Thus, it is necessary to have a memory in
which all the instructions and data can be stored first and can be taken one after other later for
execution. For some periodical works such as the preparation of pay bill, pay-roll program is used
repeatedly and the data are required to store to avoid feed them again and again. Thus the memory is
needed for the following purposes:
 To store the program and data during execution
 To store the program for repetitive use.
 To store the data for further/periodical use.
 The store the results of execution.

Memory Types
Page- 76
Chapter Five Memory

The memory components of a computer system can be divided into following main groups:
1. Main Memory ( Primary Memory)
2. Secondary Memory (Auxiliary Memory)
3. Internal Processor Memory.

 Main Memory: It is characterized by the fact that locations in memory can be directly
accessed by the CPU instructions set. This is used for program and data storage during
computer operation.
 Secondary Memory: It is much larger in size but much slower than main memory and is used
for storing system programs and large data files which are continually not required by CPU.
 Internal Processor Memory: This usually comprises a small set of high speed registers used
as working for temporary storage of instructions and data.

Fig 5.1: Various forms of storage, divided according to their distance from the central processing unit.

RAM

Page- 77
Chapter Five Memory

RAM (random-access memory): RAM (Random Access Memory) is the internal memory of the CPU
for storing data, program and program result. It is read/write memory which stores data until the
machine is working. As soon as the machine is switched off, data is erased.

Access time in RAM is independent of the address that is, each storage location inside the memory is as
easy to reach as other locations and takes the same amount of time. Data in the RAM can be accessed
randomly but it is very expensive.
RAM is volatile, i.e. data stored in it is lost when we switch off the computer or if there is a power
failure. Hence a backup uninterruptible power system(UPS) is often used with computers. RAM is
small, both in terms of its physical size and in the amount of data it can hold.
RAM is of two types
 Static RAM (SRAM)
 Dynamic RAM (DRAM)

ROM
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.

Read-only memory (ROM) is a class of storage medium used in computers and other electronic
devices. Data stored in ROM cannot be modified, or can be modified only slowly or with difficulty, so
it is mainly used to distribute firmware (software that is very closely tied to specific hardware, and
unlikely to need frequent updates).
Other types of non-volatile memory such as erasable programmable read only memory (EPROM) and
electrically erasable programmable read-only memory (EEPROM or Flash ROM) are sometimes
referred to, in an abbreviated way, as "read-only memory" (ROM), but this is actually a misnomer
because these types of memory can be erased and re-programmed multiple times. When used in this less
precise way, "ROM" indicates a non-volatile memory which serves functions typically provided by
mask ROM, such as storage of program code and nonvolatile data.

Page- 78
Chapter Five Memory

PROM (programmable read-only memory): A PROM is a memory chip on which you can store a
program. 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.

Main (Primary) 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.

Volatile & Non Volatile Memory


A memory is said to be volatile if the stored information is destroyed when power goes off. A non-
volatile memory is one that retains its contents even after power failure. Most semiconductor memories
are volatile whereas most magnetic memories such as disk, drum, and ferrite core are non-volatile.

Destructive and Non-destructive Memory


If the contents of a storage location is lost when it is read, the memory is called destructive memory.
Thus to save the contents of the memory, it has to be rewritten after every read operation. In non-
destructive memory, the contents are retained even after reading operation.
Magnetic core memory is destructive read out type and IC, magnetic drum, disk and tape are non-
destructive read out type 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.

Page- 79
Chapter Five Memory

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.
The secondary storage devices, more commonly in use these days, are as follows:
 Magnetic Tape
 Magnetic Disk
 Floppy Disk
 Magnetic Storage
 Optical Disk
 Flash Memory
 Punched Tape

Punched Tape
Punched tape or paper tape is a largely obsolete form of data storage, consisting of a long strip of
paper in which holes are punched to store data. It was widely used during much of the twentieth century
for tele printer communication, and later as a storage medium for minicomputers and CNC machine
tools.

Punched card
A punched card, punch card, IBM card, or Hollerith card is a piece of stiff paper that contains digital
information represented by the presence or absence of holes in predefined positions. Now an obsolete
recording medium, punched cards were widely used throughout the 19th century for controlling textile
looms and in the late 19th and early 20th century for operating fairground organs and related
instruments. They were used through the 20th century in unit record machines for input, processing, and
data storage. Early digital computers used punched cards, often prepared using keypunch machines, as
the primary medium for input of both computer programs and data. Some voting machines use punched
cards.

Magnetic Storage
Magnetic storage uses different patterns of magnetization on a magnetically coated surface to store
information. Magnetic storage is non-volatile. The information is accessed using one or more read/write
heads which may contain one or more recording transducers. A read/write head only covers a part of the
surface so that the head or medium or both must be moved relative to another in order to access data. In
modern computers, magnetic storage will take these forms:
 Magnetic disk
o Floppy disk, used for off-line storage
o Hard disk drive, used for secondary storage

Page- 80
Chapter Five Memory

 Magnetic tape data storage, used for tertiary and off-line storage
In early computers, magnetic storage was also used for primary storage in a form of magnetic drum, or
core memory, core rope memory, thin-film memory, twistor memory or bubble memory. Also unlike
today, magnetic tape was often used for secondary storage.

Optical Storage
Optical storage, the typical optical disc, stores information in deformities on the surface of a circular
disc and reads this information by illuminating the surface with a laser diode and observing the
reflection. Optical disc storage is non-volatile. The deformities may be permanent (read only media),
formed once (write once media) or reversible (recordable or read/write media). The following forms are
currently in common use:
 CD, CD-ROM, DVD, BD-ROM: Read only storage, used for mass distribution of digital
information (music, video, computer programs)
 CD-R, DVD-R, DVD+R, BD-R: Write once storage, used for tertiary and off-line storage
 CD-RW, DVD-RW, DVD+RW, DVD-RAM, BD-RE: Slow write, fast read storage, used for
tertiary and off-line storage
 Ultra Density Optical or UDO is similar in capacity to BD-R or BD-RE and is slow write, fast
read storage used for tertiary and off-line storage.

Hard Disk
Hard disk is a magnetic disk on
which you can store computer
data. The term hard is used to
distinguish it from a soft, or
floppy, disk. Hard disks hold
more data and are faster than
floppy disks. A hard disk, for
example, can store anywhere
from 10 to more than 100
gigabytes, whereas most floppies
have a maximum storage
capacity of 1.4 megabytes.
A single hard disk usually
consists of several platters. Each
platter requires two read/write
heads, one for each side. All the
read/write heads are attached to a single access arm so that they cannot move independently. Each
platter has the same number of tracks, and a track location that cuts across all platters is called a
cylinder. For example, a typical 84 megabyte hard disk for a PC might have two platters (four sides)
and 1,053 cylinders. Nearly every desktop computer and server in use today contains one or more hard-
disk drives. Every mainframe and supercomputer is normally connected to hundreds of them.

Page- 81
Chapter Five Memory

Features of a Hard Disk


To make the best decision in purchasing a hard disk for your system or to understand what distinguishes
one brand of hard disk from another, you must consider many features. This section examines some of
the issues you should consider when you evaluate drives:
 Capacity
 Performance
 Reliability
 Cost

Flash memory
Flash memory is a non-volatile computer storage chip that can be electrically erased and
reprogrammed. It was developed from EEPROM (electrically erasable programmable read-only
memory) and must be erased in fairly large blocks before these can be rewritten with new data. The
high density NAND type must also be programmed and read in (smaller) blocks, or pages, while the
NOR type allows a single machine word (byte) to be written and/or read independently.

Table 5.1: Comparison of Primary & Secondary Storage


S.N Primary Storage Secondary Storage
1. Cost Most Expensive Less expensive than primary storage.
2.Capacity Limited Nearly limited.
3.Access time In billionth of a second In millionth of a second.
4.Processing Directly accessible to the processing Data must be routed through the
unit primary storage.
5.Media of Semiconductor magnetic Magnetic tape, Magnetic disk.
storing
6.Location Within CPU Outside but connected to CPU.

A note on Storage Hierarchy


There is a trade-off among the three key characteristics of storage devices: Cost, capacity and access
time. At any given time, a variety of technologies are used to implement storage systems. Across this
spectrum of technologies, the following relationships hold:
 Smaller access time, greater cost per bit.
 Greater capacity, smaller cost per bit.
 Greater capacity greater access time.
Semiconductor Memory
Virtually all computers made today have semiconductor elements in their memory. The typical
semiconductor memory consists of a rectangular array of memory cells. The following points
summarize the important characteristics of core and semiconductor memories:
 Core memory has to be assembled manually, whereas MOS memory can be produced
mechanically. Hence, MOS memory is cheaper than core memory.
 MOS memory s available on a miniaturized chip and is therefore much smaller in size than
core memory.

Page- 82
Chapter Five Memory

 Core memory has a destructive read operation, while MOS memory has a non destructive read
operation. This enhances the speed of MOS memory.
 MOS memory s volatile, whereas core memory is non-volatile.
 Core memory is available only in large blocks whereas MOS memory is available in wide
variety of sizes up to 64 K bits.
 Core memory has limited range of cycle and access time and faster than core memory.

Magnetic tape data storage


Magnetic tape data storage uses magnetic tape to store digital information. Modern magnetic tape is
most commonly packaged in cartridges and cassettes. The device that performs actual writing or
reading of data is a tape drive. Autoloaders and tape libraries are frequently used to automate cartridge
handling.
When storing large amounts of data, tape can be substantially less expensive than disk or other data
storage options. Tape storage has always been used with large computer systems. Modern usage is
primarily as a high capacity medium for backups and archives. As of 2011, the highest capacity tape
cartridges (T10000C) can store 5 TB of uncompressed data.

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.

The below figure 5.2 shows Cache Memory:


Page- 83
Chapter Five Memory

Main Memory

Cache Memory

Processor

Virtual Memory
Virtual memory is a technique that allows the execution of processes which are not completely
available in memory. The main visible advantage of this scheme is that programs can be larger than
physical memory. Virtual memory is the separation of user logical memory from physical memory.
This separation allows an extremely large virtual memory to be provided for programmers when only a
smaller physical memory is available. Following are the situations, when entire program is not required
to be loaded fully in main memory.
 User written error handling routines are used only when an error occured in the data or
computation.
 Certain options and features of a program may be used rarely.
 Many tables are assigned a fixed amount of address space even though only a small amount of
the table is actually used.
 The ability to execute a program that is only partially in memory would counter many benefits.
 Less number of I/O would be needed to load or swap each user program into memory.
 A program would no longer be constrained by the amount of physical memory that is
available.
 Each user program could take less physical memory more programs could be run the same
time, with a corresponding increase in CPU utilization and throughput.

Virtual memory is commonly


implemented by demand paging. It can
also be implemented in a segmentation
system. Demand segmentation can also
be used to provide virtual memory. The
below Figure 5.3 shows the Virtual
Memory

Page- 84
Chapter Five Memory

Bits and Bytes Conversion Tables


In computer systems a byte is a binary unit of measurement used to refer to disk storage space in a hard
disk drive or Random Access Memory (RAM) memory on computer systems.
 
It takes 8 Bits to create one Byte where a Bit is also a binary digit consisting of a value of 0 or 1. For
example 10101010, 00000000, 11111111 are all 8 bits long and form 1 Byte. Put simply a Byte is a
collection of Bits.
The table 5.2 directly below will provide you with the conversions and the second chart shows you to
abbreviations for each.
Unit Equals
1 Bit  Binary Digit
8 Bits  1 Byte
1024 Bytes  1 Kilobyte
1024 Kilobytes  1 Megabyte
1024 Megabytes  1 Gigabyte
1024 Gigabytes  1 Terabyte
1024 Terabytes  1 Petabyte
1024 Petabytes  1 Exabyte -
1024 Exabytes  1 Zettabyte
1024 Zettabytes  1 Yottabyte
1024 Yottabytes  1 Brontobyte
 
Table 5.3: Abbreviations
 Unit Abbreviation
Bit b
Byte B
Kilo Byte KB
Mega Byte MB
Giga Byte GB
Tera Byte TB
Peta Byte PB
Exa Byte EB
Zetta Byte ZB
Yotta Byte YB
Bronto Byte BB

Page- 85
Chapter Five Memory

Table 5.4: Differences between RAM & ROM


RAM ROM
RAM stands for Random Access Memory ROM stands for Read only Memory
Main Memory Low level memory
Necessary to process information(example: Necessary to perform the most basic functions
work with a file) (example: start the computer)
Volatile: If not saved, data disappears when you Nonvolatile: Data remains even when you shut
shut off the computers power. It’s temporary. off the computer’s power. Its permanent.
Often discussed when buying a computer Seldom mentioned when buying a computer
You can read and write to it. Comparable to a You can read from it, but you can’t write to it.
notepad. Comparable to a novel.

Memory hierarchy
􀂃 Decreasing cost/bit
􀂃 Increasing capacity
􀂃 Increasing access time
􀂃 Decreasing frequency of access of the memory by the processor
Locality of reference

Figure 5.4: Computer Memory Hierarchy

Page- 86
Chapter Five Memory

Memory Limitations
It turns out that memory cells have a restriction on how big of a number they can store. While
historically the number size limitations have varied from computer to computer, most current computers
use a memory cell whose contents are limited to a number between 0 and 255. It is not important what
the exact memory cell limit is; what is important is that you understand that large numbers do not fit in
a single cell. When a number is too large to fit in a single cell, it is stored in a number of consecutive
memory cells.

Exercise
1. Define Memory.
2. What are Characteristics of Storage?
3. What are the needs for Memory?
4. Describe about Memory Types
5. Define Volatile & Non Volatile, Destructive and Non-destructive Memory.
6. Define Hard Disk.
7. What are the features of a Hard Disk?
8. Comparison of Primary & Secondary Storage.
9. Write short note on Storage Hierarchy. Draw the block diagram of Memory Hierarchy.
10. Describe Cache Memory & Virtual Memory.
11. Draw Bits and Bytes Conversion Table.
12. Write the differences between RAM & ROM.
13. Write the limitations of Memory.

Page- 87

You might also like