SlideShare une entreprise Scribd logo
1  sur  53
Er. Nawaraj Bhandari
Topic 3
Internal and External
Memory
Computer
Architecture
Computer Memory System
 Computer memory is any physical device capable of storing
information temporarily or permanently.
 For example, Random Access Memory (RAM), is a volatile memory that
stores information on an integrated circuit used by the operating
system, software, and hardware.
 The complex subject of computer memory is made more manageable
if we classify
Computer Memory System
 Key Characteristics of Computer Memory Systems
Computer Memory System
 A memory is just like a human brain. It is used to store data and
instructions.
 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.
Computer Memory System
Generally memory are categorized in 4 different types.
 Semiconductor Main Memory
 Cache Memory
 Magnetic disk
 RAID
 Optical Memory
Semiconductor Memory Types
Memory Type Category Erasure Write Mechanism Volatility
Random-access
memory (RAM)
Read-write memory Electrically, byte-level Electrically Volatile
Read-only
memory (ROM)
Read-only memory Not possible
Masks
Nonvolatile
Programmable
ROM (PROM)
Electrically
Erasable PROM
(EPROM)
Read-mostly memory
UV light, chip-level
Electrically Erasable
PROM (EEPROM)
Electrically, byte-level
Flash memory Electrically, block-level
Semiconductor Memory
 RAM
 Random access Memory
 Read/Write
 Volatile
 Temporary storage
DRAM(Dynamic RAM)
SRAM(Static RAM)
RAM
Read Only Memory (ROM)
 Permanent storage
 Nonvolatile
 Microprogramming (study later)
 Library subroutines
 Systems programs (BIOS)
 Function tables
Types of ROM
 Written during manufacture
 Very expensive for small runs
 Programmable (once)
 PROM
 Needs special equipment to program
 Read “mostly”
 Erasable Programmable (EPROM)
 Erased by UV
 Electrically Erasable (EEPROM)
 Takes much longer to write than read
 Flash memory
 Erase whole memory electrically
Cache Memory
 Cache memory is used in order to achieve higher performance of CPU by
allowing the CPU to access data at faster speed.
 It is placed closest to the processor in the computer assembly.
 It is way too costly.
 It is also a type of memory but keeping in mind the cost factor it cannot be used
as a primary memory.
What is Cache Memory?
Cache Memory
Cache write policies
When we write ,should we write to cache or memory?
 Write through cache – write to both cache and main memory. Cache and
memory are always consistent.
 Write back cache – write only to cache and set a “dirty bit”. When the block
gets replaced from the cache ,write it out to memory
Levels of Cache
Fastest Fast
Less Fast
Slow
Cache Organization
Address
Address
buffer
Control Control
Data
Data
buffer
System bus
Mapping Techniques
 Direct mapping
 Associative mapping
 Set associative mapping
Direct mapping
 Simplest technique
 In this , each block of main memory is mapped into only one
possible cache line .
i = j modulo m
where , i= cache memory
j= main memory
m=no. of lines in the cache
ASSOCIATIVE MAPPING
It overcomes the disadvantage of direct mapping.
It permits each main memory block to be loaded
into any line of the cache .
SET ASSOCIATIVE MAPPING
 The relationship which is followed here is
m= v*k
i= j modulo v
Where ,
i= cache set no.
j= main memory
m= no. of lines in the cache
v= no. of set
k= no. of lines in each set
This is called k-way set associative mapping .
Replacement algorithms
 Optimizing instructions.
 To manage cache information on computer.
 In direct mapping.
Each block only maps to one cache block .
 Associative and set associative mapping.
 Least recently used(LRU)
 First in first out(FIFO)
 Least frequently used(LFU)
 Random
Replacement algorithms
Random
 Randomly selects a block.
 Discards it to make space.
 Does not keep track of access history.
 This eliminates the overhead cost of tracking page references.
Types of External Memory
 Magnetic Disk
 RAID
 Removable
 Optical
 CD-ROM
 CD-Recordable (CD-R)
 CD-R/W
 DVD
 Magnetic Tape
Magnetic Disk
 Disk substrate coated with magnetisable material (iron
oxide…rust)
 Substrate used to be aluminium
 Now glass
 Improved surface uniformity
 Increases reliability
 Reduction in surface defects
 Reduced read/write errors
 Lower flight heights (See later)
 Better stiffness
 Better shock/damage resistance
Read and Write Mechanisms
 Recording & retrieval via conductive coil called a head
 May be single read/write head or separate ones
 During read/write, head is stationary, platter rotates
 Write
 Current through coil produces magnetic field
 Pulses sent to head
 Magnetic pattern recorded on surface below
 Read (traditional)
 Magnetic field moving relative to coil produces current
 Coil is the same for read and write
 Read (contemporary)
 Separate read head, close to write head
 Partially shielded magneto resistive (MR) sensor
 Electrical resistance depends on direction of magnetic field
 High frequency operation
 Higher storage density and speed
Data Organization and Formatting
 Concentric rings or tracks
 Gaps between tracks
 Reduce gap to increase capacity
 Same number of bits per track (variable packing density)
 Constant angular velocity
 Tracks divided into sectors
 Minimum block size is one sector
 May have more than one sector per block
Disk Data Layout
Floppy Disk
 8”, 5.25”, 3.5”
 Small capacity
 Up to 1.44Mbyte (2.88M never popular)
 Slow
 Universal
 Cheap
 Obsolete?
Winchester Hard Disk (1)
 Developed by IBM in Winchester (USA)
 Sealed unit
 One or more platters (disks)
 Heads fly on boundary layer of air as disk spins
 Very small head to disk gap
 Getting more robust
Winchester Hard Disk (2)
 Universal
 Cheap
 Fastest external storage
 Getting larger all the time
 250 Gigabyte now easily available
Speed
 Seek time
 Moving head to correct track
 (Rotational) latency
 Waiting for data to rotate under head
 Access time = Seek + Latency
 Transfer rate
Timing of Disk I/O Transfer
RAID
 Redundant Array of Independent Disks
 Redundant Array of Inexpensive Disks
 6 levels in common use
 Not a hierarchy
 Set of physical disks viewed as single logical drive by O/S
 Data distributed across physical drives
 Can use redundant capacity to store parity information
RAID 0
 This configuration has striping but no redundancy of data.
 It offers the best performance but no
fault-tolerance
 Data striped across all disks
 Round Robin striping
 Increase speed
 Multiple data requests probably not on same disk
 Disks seek in parallel
 A set of data is likely to be striped across multiple disks
RAID 1
 Also known as disk mirroring,
 this configuration consists of at least two drives that
duplicate the storage of data.
 There is no striping.
 Read performance is improved since either
disk can be read at the same time.
 Write performance is the same as for single disk storage.
 Recovery is simple
 Swap faulty disk & re-mirror
 No down time
 Expensive
RAID 2
 Disks are synchronized
 Very small stripes
 Often single byte/word
 Error correction calculated across corresponding bits on disks
 Multiple parity disks store Hamming code error correction in
corresponding positions
 Lots of redundancy
 Expensive
 Not used
RAID 3
 Similar to RAID 2
 This technique uses striping and dedicates one drive to storing parity
information.
 Since an I/O operation addresses all drives at the same time,
 RAID 3 cannot overlap I/O.
 For this reason, RAID 3 is best for single-user
systems with long record applications.
 Very high transfer rates
RAID 4
 This level uses large stripes,
which means you can read records
from any single drive.
 This allows you to use overlapped I/O for
read operations.
 Since all write operations have to update
the parity drive, no I/O overlapping is possible.
RAID 4 offers no advantage over RAID 5.
RAID 5
 The parity information is striped across each drive, allowing
the array to function even if one
drive were to failParity striped
across all disks
 Commonly used in network servers
 RAID 5 requires at least three disks,
but it is often recommended to use
least five disks for performance
reasons
RAID 6
 Two parity calculations
 The use of additional parity allows the array to
continue to function even if two disks fail
simultaneously.
 However, this extra protection comes at a cost.
RAID 6 arrays have a higher cost per gigabyte (GB)
and often have slower write performance
than RAID 5 arrays.
RAID 0, 1, 2
RAID 3 & 4
RAID 5 & 6
Optical storage
• Optical storage is any storage method in which data is written and
read with a laser for archival or backup purposes.
• Typically, data is written to optical media, such as CDs and DVDs
• Optical media is more durable than tape and less vulnerable to
environmental conditions
• On the other hand, it tends to be slower than typical hard drive
speeds, and to offer lower storage capacities.
• A number of new optical formats, such as Blu-ray and UDO (ultra
density optical), use a blue laser to dramatically increase capacities.
Magnetic Disk Layout(Hard Disk)
Magnetic Disk Layout(Hard Disk)
Magnetic Disk Layout(Hard Disk)
Exam Questions
Q: Assume you have a USB memory stick attached to your
computer. After working with the files on the USB memory, a so
called friend simply removes the USB memory from the
computer. Now, how does your mood depend on the used
update policy (write through or write back)?
A: If my USB is a write-back, data is only updated in the cache
and maybe not in the memory. Hence, my mood is towards
anger.
B. If my USB is a write-through, data is always updated. Hence,
my mood is not changed if a so called friend removes the USB.
Exam Questions
Q.Main types of technology utilized in computer memory system
Ans: Primary and Seconday Memory System
ANY QUESTIONS?

Contenu connexe

Tendances

Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
Wayne Jones Jnr
 

Tendances (19)

CS6401 Operating Systems
CS6401 Operating SystemsCS6401 Operating Systems
CS6401 Operating Systems
 
Os1
Os1Os1
Os1
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
 
Register
RegisterRegister
Register
 
Operating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsOperating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management Concepts
 
Operating System
Operating SystemOperating System
Operating System
 
08 Operating System Support
08  Operating  System  Support08  Operating  System  Support
08 Operating System Support
 
Cs8493 unit 1
Cs8493 unit 1Cs8493 unit 1
Cs8493 unit 1
 
Unit 5 Advanced Computer Architecture
Unit 5 Advanced Computer ArchitectureUnit 5 Advanced Computer Architecture
Unit 5 Advanced Computer Architecture
 
System Z operating system
System Z operating systemSystem Z operating system
System Z operating system
 
Parallel Processing (Part 2)
Parallel Processing (Part 2)Parallel Processing (Part 2)
Parallel Processing (Part 2)
 
Operating System / System Operasi
Operating System / System Operasi                   Operating System / System Operasi
Operating System / System Operasi
 
Storage management
Storage managementStorage management
Storage management
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Unit 5-lecture 5
Unit 5-lecture 5Unit 5-lecture 5
Unit 5-lecture 5
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
 
hierarchical bus system
 hierarchical bus system hierarchical bus system
hierarchical bus system
 
Ch1: Operating System- Introduction
Ch1: Operating System- IntroductionCh1: Operating System- Introduction
Ch1: Operating System- Introduction
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
 

Similaire à Chapter 3 (20)

Nachos Extra Points
Nachos Extra PointsNachos Extra Points
Nachos Extra Points
 
Storage Media and File Organisation.pptx
Storage Media and File Organisation.pptxStorage Media and File Organisation.pptx
Storage Media and File Organisation.pptx
 
Nachos 2
Nachos 2Nachos 2
Nachos 2
 
Nachos 2
Nachos 2Nachos 2
Nachos 2
 
Ch14 OS
Ch14 OSCh14 OS
Ch14 OS
 
OS_Ch14
OS_Ch14OS_Ch14
OS_Ch14
 
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 
Storage structure1
Storage structure1Storage structure1
Storage structure1
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage Systems
 
CS 542 Putting it all together -- Storage Management
CS 542 Putting it all together -- Storage ManagementCS 542 Putting it all together -- Storage Management
CS 542 Putting it all together -- Storage Management
 
FILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMSFILE STRUCTURE IN DBMS
FILE STRUCTURE IN DBMS
 
Ce202 Storage
Ce202 StorageCe202 Storage
Ce202 Storage
 
Thiru
ThiruThiru
Thiru
 
04.01 file organization
04.01 file organization04.01 file organization
04.01 file organization
 
11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS11. Storage and File Structure in DBMS
11. Storage and File Structure in DBMS
 
Db
DbDb
Db
 
db
dbdb
db
 
Raid 1 3
Raid 1 3Raid 1 3
Raid 1 3
 
06 External Memory
06  External  Memory06  External  Memory
06 External Memory
 
Storage devices
Storage devicesStorage devices
Storage devices
 

Plus de Er. Nawaraj Bhandari

Plus de Er. Nawaraj Bhandari (20)

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large Database
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousing
 
Data warehouse testing
Data warehouse testingData warehouse testing
Data warehouse testing
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data mining
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic Commerce
 
Evaluating software development
Evaluating software developmentEvaluating software development
Evaluating software development
 
Using macros in microsoft excel part 2
Using macros in microsoft excel   part 2Using macros in microsoft excel   part 2
Using macros in microsoft excel part 2
 
Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1
 
Using macros in microsoft access
Using macros in microsoft accessUsing macros in microsoft access
Using macros in microsoft access
 
Testing software development
Testing software developmentTesting software development
Testing software development
 

Dernier

Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Dernier (20)

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 

Chapter 3

  • 1. Er. Nawaraj Bhandari Topic 3 Internal and External Memory Computer Architecture
  • 2. Computer Memory System  Computer memory is any physical device capable of storing information temporarily or permanently.  For example, Random Access Memory (RAM), is a volatile memory that stores information on an integrated circuit used by the operating system, software, and hardware.  The complex subject of computer memory is made more manageable if we classify
  • 3. Computer Memory System  Key Characteristics of Computer Memory Systems
  • 4. Computer Memory System  A memory is just like a human brain. It is used to store data and instructions.  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.
  • 5. Computer Memory System Generally memory are categorized in 4 different types.  Semiconductor Main Memory  Cache Memory  Magnetic disk  RAID  Optical Memory
  • 6. Semiconductor Memory Types Memory Type Category Erasure Write Mechanism Volatility Random-access memory (RAM) Read-write memory Electrically, byte-level Electrically Volatile Read-only memory (ROM) Read-only memory Not possible Masks Nonvolatile Programmable ROM (PROM) Electrically Erasable PROM (EPROM) Read-mostly memory UV light, chip-level Electrically Erasable PROM (EEPROM) Electrically, byte-level Flash memory Electrically, block-level
  • 7. Semiconductor Memory  RAM  Random access Memory  Read/Write  Volatile  Temporary storage DRAM(Dynamic RAM) SRAM(Static RAM)
  • 8. RAM
  • 9. Read Only Memory (ROM)  Permanent storage  Nonvolatile  Microprogramming (study later)  Library subroutines  Systems programs (BIOS)  Function tables
  • 10. Types of ROM  Written during manufacture  Very expensive for small runs  Programmable (once)  PROM  Needs special equipment to program  Read “mostly”  Erasable Programmable (EPROM)  Erased by UV  Electrically Erasable (EEPROM)  Takes much longer to write than read  Flash memory  Erase whole memory electrically
  • 11. Cache Memory  Cache memory is used in order to achieve higher performance of CPU by allowing the CPU to access data at faster speed.  It is placed closest to the processor in the computer assembly.  It is way too costly.  It is also a type of memory but keeping in mind the cost factor it cannot be used as a primary memory. What is Cache Memory?
  • 13. Cache write policies When we write ,should we write to cache or memory?  Write through cache – write to both cache and main memory. Cache and memory are always consistent.  Write back cache – write only to cache and set a “dirty bit”. When the block gets replaced from the cache ,write it out to memory
  • 14. Levels of Cache Fastest Fast Less Fast Slow
  • 16. Mapping Techniques  Direct mapping  Associative mapping  Set associative mapping
  • 17. Direct mapping  Simplest technique  In this , each block of main memory is mapped into only one possible cache line . i = j modulo m where , i= cache memory j= main memory m=no. of lines in the cache
  • 18. ASSOCIATIVE MAPPING It overcomes the disadvantage of direct mapping. It permits each main memory block to be loaded into any line of the cache .
  • 19.
  • 20. SET ASSOCIATIVE MAPPING  The relationship which is followed here is m= v*k i= j modulo v Where , i= cache set no. j= main memory m= no. of lines in the cache v= no. of set k= no. of lines in each set This is called k-way set associative mapping .
  • 21.
  • 22. Replacement algorithms  Optimizing instructions.  To manage cache information on computer.  In direct mapping. Each block only maps to one cache block .  Associative and set associative mapping.
  • 23.  Least recently used(LRU)  First in first out(FIFO)  Least frequently used(LFU)  Random Replacement algorithms
  • 24. Random  Randomly selects a block.  Discards it to make space.  Does not keep track of access history.  This eliminates the overhead cost of tracking page references.
  • 25. Types of External Memory  Magnetic Disk  RAID  Removable  Optical  CD-ROM  CD-Recordable (CD-R)  CD-R/W  DVD  Magnetic Tape
  • 26. Magnetic Disk  Disk substrate coated with magnetisable material (iron oxide…rust)  Substrate used to be aluminium  Now glass  Improved surface uniformity  Increases reliability  Reduction in surface defects  Reduced read/write errors  Lower flight heights (See later)  Better stiffness  Better shock/damage resistance
  • 27. Read and Write Mechanisms  Recording & retrieval via conductive coil called a head  May be single read/write head or separate ones  During read/write, head is stationary, platter rotates  Write  Current through coil produces magnetic field  Pulses sent to head  Magnetic pattern recorded on surface below  Read (traditional)  Magnetic field moving relative to coil produces current  Coil is the same for read and write  Read (contemporary)  Separate read head, close to write head  Partially shielded magneto resistive (MR) sensor  Electrical resistance depends on direction of magnetic field  High frequency operation  Higher storage density and speed
  • 28. Data Organization and Formatting  Concentric rings or tracks  Gaps between tracks  Reduce gap to increase capacity  Same number of bits per track (variable packing density)  Constant angular velocity  Tracks divided into sectors  Minimum block size is one sector  May have more than one sector per block
  • 30. Floppy Disk  8”, 5.25”, 3.5”  Small capacity  Up to 1.44Mbyte (2.88M never popular)  Slow  Universal  Cheap  Obsolete?
  • 31. Winchester Hard Disk (1)  Developed by IBM in Winchester (USA)  Sealed unit  One or more platters (disks)  Heads fly on boundary layer of air as disk spins  Very small head to disk gap  Getting more robust
  • 32. Winchester Hard Disk (2)  Universal  Cheap  Fastest external storage  Getting larger all the time  250 Gigabyte now easily available
  • 33. Speed  Seek time  Moving head to correct track  (Rotational) latency  Waiting for data to rotate under head  Access time = Seek + Latency  Transfer rate
  • 34. Timing of Disk I/O Transfer
  • 35. RAID  Redundant Array of Independent Disks  Redundant Array of Inexpensive Disks  6 levels in common use  Not a hierarchy  Set of physical disks viewed as single logical drive by O/S  Data distributed across physical drives  Can use redundant capacity to store parity information
  • 36. RAID 0  This configuration has striping but no redundancy of data.  It offers the best performance but no fault-tolerance  Data striped across all disks  Round Robin striping  Increase speed  Multiple data requests probably not on same disk  Disks seek in parallel  A set of data is likely to be striped across multiple disks
  • 37. RAID 1  Also known as disk mirroring,  this configuration consists of at least two drives that duplicate the storage of data.  There is no striping.  Read performance is improved since either disk can be read at the same time.  Write performance is the same as for single disk storage.  Recovery is simple  Swap faulty disk & re-mirror  No down time  Expensive
  • 38. RAID 2  Disks are synchronized  Very small stripes  Often single byte/word  Error correction calculated across corresponding bits on disks  Multiple parity disks store Hamming code error correction in corresponding positions  Lots of redundancy  Expensive  Not used
  • 39. RAID 3  Similar to RAID 2  This technique uses striping and dedicates one drive to storing parity information.  Since an I/O operation addresses all drives at the same time,  RAID 3 cannot overlap I/O.  For this reason, RAID 3 is best for single-user systems with long record applications.  Very high transfer rates
  • 40. RAID 4  This level uses large stripes, which means you can read records from any single drive.  This allows you to use overlapped I/O for read operations.  Since all write operations have to update the parity drive, no I/O overlapping is possible. RAID 4 offers no advantage over RAID 5.
  • 41. RAID 5  The parity information is striped across each drive, allowing the array to function even if one drive were to failParity striped across all disks  Commonly used in network servers  RAID 5 requires at least three disks, but it is often recommended to use least five disks for performance reasons
  • 42. RAID 6  Two parity calculations  The use of additional parity allows the array to continue to function even if two disks fail simultaneously.  However, this extra protection comes at a cost. RAID 6 arrays have a higher cost per gigabyte (GB) and often have slower write performance than RAID 5 arrays.
  • 44. RAID 3 & 4
  • 45. RAID 5 & 6
  • 46. Optical storage • Optical storage is any storage method in which data is written and read with a laser for archival or backup purposes. • Typically, data is written to optical media, such as CDs and DVDs • Optical media is more durable than tape and less vulnerable to environmental conditions • On the other hand, it tends to be slower than typical hard drive speeds, and to offer lower storage capacities. • A number of new optical formats, such as Blu-ray and UDO (ultra density optical), use a blue laser to dramatically increase capacities.
  • 50. Exam Questions Q: Assume you have a USB memory stick attached to your computer. After working with the files on the USB memory, a so called friend simply removes the USB memory from the computer. Now, how does your mood depend on the used update policy (write through or write back)? A: If my USB is a write-back, data is only updated in the cache and maybe not in the memory. Hence, my mood is towards anger. B. If my USB is a write-through, data is always updated. Hence, my mood is not changed if a so called friend removes the USB.
  • 51. Exam Questions Q.Main types of technology utilized in computer memory system Ans: Primary and Seconday Memory System
  • 52.