Lecture#11-Memory & Storage
Lecture#11-Memory & Storage
Applications of ICT
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
• 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
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
• 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”
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
Basic Speed 150 Kbits/S 1.36 MB/ S 4.5 MB/S 120 MB/S
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
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
Suffers from
Fragmentation Negligible effect Yes
fragmentation
Susceptibility to magnetic
Magnetic effect on storage No Yes
fields
Weight and size Light weight, compact size Same size but heavier