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

Lecture#11-Memory & Storage

The document discusses different types of computer memory and storage devices. It describes primary memory like RAM and cache memory, as well as secondary storage. It provides details on different RAM technologies like DRAM and SRAM, and cache levels like L1 and L2 cache. The document aims to explain the purpose and workings of various computer memory components.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Lecture#11-Memory & Storage

The document discusses different types of computer memory and storage devices. It describes primary memory like RAM and cache memory, as well as secondary storage. It provides details on different RAM technologies like DRAM and SRAM, and cache levels like L1 and L2 cache. The document aims to explain the purpose and workings of various computer memory components.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

COMP1116

Applications of ICT

Lecture # 11 Memory/ Storage Devices

Dr. Aftab Akram (PhD CS)


Instructor: Assistant Professor
Division of Science & Technology
University of Education, Lahore
Computer Storage/ Memory

Computer
components,
devices and Memory
Fundamental Stores Data,
recording coupled with
component of Instructions
media that CPU
all modern and
retain digital implements
digital Information
data used for basic Von
computer for current
computing on Neumann
systems and future use
temporary or Architecture
permanent
basis
Purpose of Memory

Computer
One of the
works on
distinctive If there is no
instructions,
feature of memory, Storing of data
and need data This would
Modern Digital computer and
for processing. significantly
Computer would be instructions
If it do not slow the
“Data, simple signal make
store, data and working of
Information processing computer fast
instruction computer
and device e.g. TV, and versatile
have to be
Instructions Radio
provided when
can be stored”
it is working
Types of
Memory/
Storage

Primary Secondary
Memory Memory
Primary Memory Secondary Memory

• CPU can directly access • CPU cannot directly


data stored in primary access data stored in
memory secondary memory
• Data is stored • Data is stored
electronically magnetically/ optically
• Volatile Memory— • Non Volatile Memory—
contents are lost when contents are not lost
power is switched off when power is switched
• Temporary Memory off
• Random/ Direct Access • Permanent Memory
of Data • Sequential Access of
• Fast data access Data
• Costly • Slow data access
• Cheaper
Units of Memory/ Storage
• 0 or 1 --- 1 bit
• 4 bits --- 1 Nibble
• 8 bits --- 1 Byte
• 210=1024 Bytes --- 1 Kilo Byte / 1 KB
• 220=1024 KB --- 1 Mega Byte / 1 MB
• 230= 1024 MB --- 1 Giga Byte / 1GB
• 240= 1024 GB --- 1 Tera Byte / 1 TB
• Channel/Path/Wire/ Conductor on which data is transferred in the form of
BUS electrical signals
• One channel or wire required to transfer one bit at a time

Bus • Capacity of a Bus


Width • The number of bits that can be transferred at a time

Bus • The rate at which data is transferred through the Bus


Speed • Measured in Hz (number of pulses per second)

• Every time data is transferred from memory to CPU, also known as Memory Cycle
Bus Cycle • Time to complete one cycle is the Cycle Time

• Number of bytes that CPU can access at a time


Bit Size • A 32-bit CPU can read 4 Bytes from RAM

Memory • Single physical unit of memory which can store 1 bit


• Each memory cell is built using a pair or capacitor and transistor or a group of
Cell transistors

Burst • Bits are stored in contagious memory cells


Mode
Primary Memory
Devices

RAM (Random
Cache Memory
Access Memory)
RAM
CPU uses RAM to store data
Also known as Main Memory
and instruction for processing
Working of RAM
• Instruction are stored in Non Volatile Memory e.g. Hard
Disk
• To process them, instruction are transferred to RAM
• From RAM instruction are sent to CPU one by one for
processing
• If data is input through some input device e.g. keyboard,
scanner, it is sent to RAM
• To store data permanently, it sent to Non Volatile
Memory from RAM
• Memory is divided into System Address Space (part of
memory occupied by Operating System) and User
Address Space (part of memory available for user
process)
Memory Management
• Process is loaded into main memory to execute it (whole process or part of
it)
• Virtual Memory is a technique in which a process can be executed in much
smaller physical memory than its own size
• Only those parts of process are loaded which are necessary
• A process is divided into pages, CPU generates virtual address which consists
of (page#, offset)
• Physical memory is also divided into same size frames, a corresponding
physical address consists of (frame#, offset)
• Memory Management Unit (MMU) translate virtual address to physical
address using a page table
• If required page is not in memory, then page fault is created. The required
page is loaded from non volatile memory to main memory
• Page Faults are bad, if there is only one page fault in 2.5 million memory
references, reduces system performance by 10%, that is a memory access
which takes 100ns now it will take 110ns
Types of
RAM

Dynamic Static
RAM RAM
Dynamic RAM
• Made of large number of Capacitors
• Each capacitor can store one bit, Charged = 1,
Discharged = 0
• Capacitors can leak charge, so to retain contents in
them, must continuously recharged
• This recharging/ refreshing process effects data
access speed, DRAM is slower than SRAM
• Simple and Compact structure, not very complex
• Cheaper, used in common low cost desktop
computers
• DRAM consumes more power than SRAM
• Synchronous Dynamic RAM

SD RAM
• Read/Write operations are synchronized with
computer system clock
• It waits for clock signal before responding to control
input

DDR • Double Data Rate SDRAM


• Uses double pumping (transferring data on both the
rising and falling edges of the clock signal)

SDRAM • Nearly the double data rate as SD RAM , peak transfer


rate 3200 MB/S

DDR2 • An up gradation of DDR SDRAM


• QDR-Quad Data Rate or Quad Pumping
• Transfers data four times in a pulse

SD RAM • Memory Clock up to 800Mhz, Cycle Time as low as


3.75ns, Peak transfer rate as high as 6400 MB/S
Static RAM
• Made of transistors, large number of
transistors are used to store data
• A group of 5-7 transistors is used to store 1 bit
• Transistors can retain data without refreshing,
SRAM has faster data access rate then DRAM
• Complex structure and also less compact than
DRAM
• SRAM consumes less power than DRAM
• SRAM is costly used high performance systems
RAM Performance
• How much data RAM can send to CPU?
• Two factors are critical: RAM Bus Width and Bus Speed
• For example, a 100-MHz 32-bit bus is capable of sending
4 bytes (32 / 8 = 4 bytes) of data to the CPU 100 million
times per second
• A 66-MHz 16-bit bus can send 2 bytes of data 66 million
times per second
• Changing the bus width from 16 bits to 32 bits and the
speed from 66 MHz to 100 MHz allows for three times
as much data (400 million bytes versus 132 million
bytes) to pass through to the CPU every second
Processor-Memory Bottleneck
• Older computer work at the same speed as does the
memory
• Modern computer work 2 or 3 times faster then
memory
• More the processor is running faster than the
memory the more it has to wait for data from the
memory
• This creates Processor-Memory Bottleneck
• Processor is forced to work at lower speed (the exact
speed of memory) even it can work at much faster
• Processor have cycle times as short as 2 ns, a
memory cycle may take 60ns to complete
Cache
• It has been observed that CPU often uses certain
instructions again and again
• A copy of such instructions can be saved in a
memory built directly (or near to) CPU
• If next time same instruction is required, it can be
taken from that memory instead of fetching it from
RAM
• This memory is known as Cache, most of cache are
Static RAM because they are faster and made of
transistors
• Fetching instructions from cache significantly
reduces Processor-Memory Bottleneck
Types of Cache
L1 Cache L2 Cache

• Built directly into CPU main • Built outside CPU main chip
chip • Faster data access than RAM
• Many modern CPUs have 1 e.g. if CPU accesses data
MB of L1 Cache from RAM in 60 ns, it can
• Fastest data access almost access data from L2 cache in
same as speed of CPU 30 ns
• Typical desktop processor
has 12 MB of L2 Cache
• Many high performance
processor may have up to 24
GB of L2 cache e.g. Intel
Itanium Processor
Secondary Memory Devices
• Also known as Storage Devices
• Store huge amount of data as compared to primary
memory devices
• For example, if a common desktop computer has 2 GB of
RAM, it may have 250 GB of Secondary Memory (e.g. Hard
Disk)

Types of
Secondary
Memory

Magnetic Optical
Storage Storage
Devices Devices
Magnetic Storage Devices
• Magnetic storage uses different patterns of
magnetization in a magnetizable material to store
data
• Particles in a magnetic material can have polar
distribution e.g. north and south poles and they are
randomly aligned
• By applying magnetic field randomly aligned
particles can be magnetized and used to represent
data
• Hard Disk Drives (or simply Hard Disks) are most
commonly used magnetic storage, others examples
are Floppy Disks, Zip Disks, Taper Drives etc.
Hard Disk Drive
• Most commonly used secondary storage in
Computer, also known as Hard Disk
• IBM's RAMAC is first hard disk introduced in
1956, it has a capacity of about 5 MB,
stored on 50 24" disks
• Today hard disks are faster, smaller in size
and can store huge amount of data
• Hard disks are available with storage
capacity of 2 Tera Bytes (2048 GB) to use in
desktop computers
Role of Hard Disk in Computer Performance
• Since hard disk is non volatile, most of time
instructions and data is store in it, therefore overall
working speed of computer is quite affected by
working speed of hard disk
• The more the capacity of hard disk, more data and
instructions can be stored in it
• Newer and better software need more capacity,
better hard disk with large capacity and faster data
rate can accomplish this goal
• Hard disk is reliable source of data storage with
longer working life and data retrieval in case of
failure
Construction
• Round flat disks made of aluminum and coated by a
magnetic material on both sides
• There are 1-5 platters in a hard disk drive, some high
Platters capacity hard disk may have 15 platters
• Size of platters used in hard disks for desktop computers is
3.5”, those used in laptops computer have platter size of 2.5”

• Platters are mounted by cutting a hole in the center and


stacked on a spindle
• The Spindle is attached to a multi speed electric motor which
Spindle the rotates platters
• The greater the speed of rotation the shorter will be the
access time
• Electromagnetic tiny devices works on the principle of
magneto resistance “certain materials change their
resistance when subjected to different magnetic
Read/ fields”
• Convert electrical signals to magnetic signals and
Write Head magnetic signals to electrical signals
• Each surface of platter has its own R/W Head, so if
there are 5 platter or 10 surfaces, there would be 10
R/W heads

• The mechanism that moves the R/W head on the platter


Actuator surface
• The R/W head is attached to actuator arm

Hard Disk • Combination of hardware and software the controls the


operation of hard disk

Controller • A small cache is present in the hard disk where data is stored
before storing or sending to RAM
Storing Data on Hard Disk
• Data is stored onto disk in the form of file, a
file is named location of bytes
• Before storing data, hard disk is Formatted
• Formatting is process of creating logical
Tracks and Sectors on the disk surface
• Tracks are concentric circles with center at
the spindle and further divided into sectors
• Each sector can store fixed data known as
Sector Size, typical sector size is 256KB or
512 KB
Track

Sector
Storing Data on Hard Disk
• The CPU sends command to disk controller to a
particular file, the file is then loaded from RAM to
disk cache
• If the file size is greater than the sector size, the file is
tore into fragments, max. size of a fragment is equal
to the sector size
• The Operating System’s File System keeps the record
about how many fragments of a file have been
created and in which sector they are stored
• The file system sends this information to disk
controller which controls R/W Head to store each
fragment to a particular sector
Storing Data on Hard Disk
• The head creates bands of aligned particles on the disk
surface, two such bands combine to represent one bit
• If particles on both bands are aligned in the same direction,
it represents bit 0, if direction is opposite then it is bit 1
• If CPU commands to read a file, the file system send
information to disk controller about number of fragments of
file and their location
• The head in this case reads whole track and copy it in the
disk cache, where fragments are combined to form
complete file
• The unnecessary sector are deleted and file is sent to RAM
• The disk in the this whole process rotates with different
speeds and R/W head moves over disk surface by actuator
arm
Performance of Hard Disk

Data Rate Seek Time


Depend upon
Number of RPM Amount of time Measured Milli
bytes per (Revolution per A 7200 RPM CPU requests a Seconds, typical
second that a Minute), drive has data file and when desktop hard
drive can greater the RPM rate of 70 MB/S the first byte is disks have seek
deliver to CPU greater will be sent time of 9ms
the data rate
Defragmentation
• Most of time file size is greater than sector, file is
divided into lot of fragments
• Each fragment is stored in separate sector which may be
in the same track or may be in different
• With the passage of time Hard Disk Fragmentation
occurs which means file fragments are not stored
continuously in consecutive sectors
• Fragmentation significantly increases seek time and
hard disk becomes slower
• Defragmentation is a process that reduces the amount
of fragmentation in file systems, it does this by
physically organizing the pieces of each file close
together and contiguously
Optical Storage Media
• Store data optically in pits & lands
• A pit represents bit-1 and land represents bit-
0
• A laser beam falls on bumpy surface of optical
disk, different amount of light reflecting from
surface is read as sequence of 1’s & 0’s
Optical Storage Media
• ROM(Read Only Memory): data is already
written, no new data can be written but can
be read only
• Recordable- blank optical storage disk, data
can be written only once but can be read
many times, also known as WORM (Write
Once Read Many)
• Rewritable-also blank optical disk, data can
written, erased and re-written many times
Optical Storage Media
• Laser beam of different wave lengths are used
to read and write data on optical disks
• Optical Disk Reader-a device used to read
data from optical disk, does not has ability to
write data on optical disk
• Optical Disk Reader/ Writer- device has ability
to read as well as write data on optical disk
Optical Storage Media
• Types
– Compact Disk(CD)- originally developed to store
music
– Digital Video Disk (DVD)- developed as storage for
high quality videos
– Blue Ray Disk- developed as high capacity storage
for data archiving
– Holographic Disk- anticipated development of
ultra high capacity storage disk, storage capacity
of up to 6 Tera Bytes
Optical Storage Media
Compact Disk DVD Blue Ray Disk Holographic Disk

120mm 120mm 120mm 120mm


Physical Size
(4.7 inches) (4.7 inches) (4.7 inches) (4.7 inches)

4.7 GB 25 GB Single Layer


Data Capacity 700 MB 6 TB
Max. 17.08 GB 50 GB Double Layer

Basic Speed 150 Kbits/S 1.36 MB/ S 4.5 MB/S 120 MB/S

Pit Length 800 nm 400 nm 150 nm Variable

Wavelength 780 nm 650 nm 405 nm variable

Introduction Year 1982 1995 2006 Not yet

Sony, Philips, Toshiba, Blue Ray Disk


Developers Sony, Philips HSD Forum
Panasonic Association

Typical Usage Audio, Data Video, Data Data, HD Video Data, Ultra HD Videos
Optical Storage Media
Solid State Drive (SSD)
• A data storage device using integrated circuit assemblies as
memory to store data
• Does not contain any disk or rotating parts as in hard disk drives
• No moving parts
• More resistant to physical shock
• Run Silently
• Lower access time
• Low Latency
• About 7 to 8 times more expensive than traditional hard disk drives
• Hybrid Drives, hard disk drives with SSD cache to speed up data
access
Solid State Drive (SSD)
Comparison- SSD VS HDD
Attribute Definition SSD HDD

Almost zero, no Several second,


Start Up Time Time to ready for use
mechanical components depends on RPM

Accessing randomly
Random Access Time Under 0.1 sec 2.9 to 12 milli second
located files
Time to read specified
Generally high (in milli
Read Latency location after receiving Typically low
seconds )
command
Rate of data transfer
Data Transfer Rate 100 MB/s to 600 MB/s Upto 140 MB/s
from device to RAM

Read Performance Performance over time Degrades over time Fragmentation

Suffers from
Fragmentation Negligible effect Yes
fragmentation

Generate noise during Not moving part, so no


Noise Yes
working noise
Comparison- SSD VS HDD
Attribute Definition SSD HDD

Temperature control Effect of temperature No Yes (between 95-131 oF)

Susceptibility to Effect of factors like shock


No Yes
environmental factors or vibration

Specific installation Yes care has to taken in


Installation and mounting No
orientation installation

Susceptibility to magnetic
Magnetic effect on storage No Yes
fields

Weight and size Light weight, compact size Same size but heavier

Failure Probability/ Typical Failure rate 6 yrs/ Life


Reliability and lifetime Highly reliable
length of service Expectancy 9-11 yrs

US 0.05 per GB for 3.5”


Cost per capacity US 0.59 per GB
US 0.25 per GB for 2.5”

Power Consumption ½ to 1/3rd of HDD 0.35 to 20 Watts

You might also like