SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Unit 4 - Memory Organization
Abhineet Anand
Computer Science and Engg. Department
University of Petroleum and Energy Studies, Dehradun

November 30, 2012

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

1 / 19
Outline
1

Introduction
Memory
Memory Hierarchy
Memory Management System

2

Main Memory

3

Auxiliary Memory

4

Associative Memory

5

Cache Memory
Characteristic of Cache Memory
Associative Mapping
Direct Mapping
Set- Associative Mapping

6

Virtual Memory

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

2 / 19
Memory

The memory that communicates directly with CPU is called main
memory.
Devices that provides backup storage are called auxiliary memory.
Only program and data currently needed by the processor resides in
main memory.
All other information is stored in auxiliary memory and transferred to
main memory when needed.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

3 / 19
Memory Hierarchy

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

4 / 19
CPU Register - also known as Internal Processor Memory. The data
or instruction which has to be executed are kept in these registers.
The Cache Memory is employed in computer system to compensate
for the speed differential between main memory access time and
processor logic.
The cache is used for storing segments of programs currently being
executed in the CPU and temporary data frequently needed in the
present calculations.
By making program and data available at a rapid rate, it is possible to
increase the performance rate of the computer.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

5 / 19
Memory Management System

Many operating system are designed to enable the CPU to process a
number of independent programs concurrently - known as
multiprogramming.
Sometimes a program are too long to be accommodated in total
space available in main memory. A program with its data normally
resides in auxiliary memory.
When the program or a segment of program is to be executed, it is
transfered to main memory to be executed by the CPU.
The part of the computer system that supervise the flow of
information between auxiliary memory and main memory is called the
memory management system.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

6 / 19
Main Memory
The principal technology used for main memory is based on
semiconductor integrated circuit.
The Integrated circuit chips are available in two possible operating
modes:
Static
Dynamic

The Static RAM consists essentially of internal flip-flop that store the
binary information.
The dynamic RAM stores the binary information in form of electronic
charges that are applied to capacitors.
The stored charge on the capacitor tend to discharge with time and
the capacitors must be periodically recharged by refreshing the
dynamic memory.
The static RAM is easier to use and has shorter read and write cycles
and used in cache.
The dynamic RAMs are used for implementing the main memory.
Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

7 / 19
Auxiliary Memory

The Most common auxiliary memory devices used in computer
system are magnetic disk and tapes.
Other components used, but not as frequently, are magnetic drums,
magnetic bubble memory, and optical disks.
The average time required to reach a storage location in memory and
obtain its contents is called the access time.
In electromechanical devices with moving parts such as disks an
tapes, the access time consists of seek time required to position the
read-write head to a location and a transfer time required to transfer
data to or from the devices.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

8 / 19
Associative Memory
An assembler program searches the symbol address table in order to
extract the symbol’s binary equivalent.
The number of accesses to memory depends on the location of the
item and the efficiency of search algorithm.
Many search algorithm have been developed to minimize the number
of access while searching for an item in a random or sequential
access memory.
The time required to find an item stored in memory can be reduced
considerably if stored data can be identified by the content of the data
itself rather than an address.
A memory unit accessed by content is called an associative memory
or content addressable memory(CAM).

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

9 / 19
Associative Memory

This type of memory is accessed simultaneously and in parallel on
the basis of data content rather then by specific address or location.
When a word is written in an associative memory, no address is
given. The memory is capable of finding an empty unused location to
store the word.
When a word is to be read from an associative memory, the content
of the word, or part of the word, is specified. The memory locates all
words which match the specified content and marks them for reading.
An associative memory is more expensive than a random access
memory, so are used in application where the search time is very
critical and must be very short.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

10 / 19
Cache Memory

A typical computer program flows in a straight-line fashion with
program loops and subroutine calls encountered frequently.
Analysis of a large number of typical programs has been shown that
the reference to memory at any given interval of time tend to be
confined within a few localized areas in memory. This phenomenon is
known as the property of locality of reference.
If the active portions of the program and data are placed in a fast
small memory, the average memory access time can be reduced,
thus reducing the total execution time of program. Such memory is
known as Cache memory.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

11 / 19
Cache Memory

The Performance of cache memory is frequently measured in terms
of a quantity called hit ratio.
When the CPU refers to memory and finds the word in cache, it is
said to produce a hit.
If the word is not found in cache, it is in main memory and it counts as
a miss.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

12 / 19
Characteristic of Cache Memory

The basic characteristic of cache memory is its fast access time.
The transformation of data from main memory to cache memory is
referred to as a mapping process.
Three types of mapping procedures are:
Associative Mapping
Direct Mapping
Set-associative Mapping

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

13 / 19
Associative Mapping

The fastest and most flexible cache organization uses an associative
memory.
The associative memory stores both the address and content (data)
of the memory word.
If the address is found corresponding data is read otherwise main
memory is accessed for the word.
It is expensive compared to random-access memories because of the
added logic associated with each cell.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

14 / 19
Associative Mapping

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

15 / 19
Direct Mapping
The n-bit memory address is divided into two Fields: k-bits for the
index field and n-k bits for the tag field.
The direct mapping cache organization uses the n-bit address to
access the main memory and the k-bit index to access the cache.
Each word in cache consists of the data word and its associated tag.
When a new word is first brought into the cache, the tag bits are
stored alongside the data bits.
When the CPU generates a memory request, the index field is used
for the address to access the cache.
The tag field of the CPU address is compared with the tag in the word
read from cache.
If the two tags match, there is a hit and the required word is read from
cache otherwise it is read from main memory.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

16 / 19
Set- Associative Mapping

In Direct mapping, every time a miss occurs, an entire block of words
must be transfered from main memory to cache memory.
Another disadvantage of direct mapping is that two words with the
same index in their address but with different tag values cannot reside
in cache memory at same time.
A third type of cache organization, called set-associative mapping, in
which each word of cache can store two or more words of memory
under the same index address.
Each data word is stored together with its tag and the number of
tag-data items in one word of cache is said to from a set.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

17 / 19
Virtual Memory
In a memory hierarchy system, program and data are first stored in
auxiliary memory.
Portion of a program or data are brought into main memory as they
are needed by the CPU.
Virtual Memory is a concept used in some large computer systems
that permit the user to construct programs as though a large memory
space were available, equal to the totality of auxiliary memory.
A virtual memory system provides a mechanism for translating
program-generated addresses into correct main memory locations.
An address used by a programmer will be called a virtual address,
and set of such addresses the address space.
An address in main memory is called a location or physical address
and the set of such addresses is called memory space.

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

18 / 19
THANK YOU

Abhineet Anand (UPES, Dehradun)

Unit 4 - Memory Organization

November 30, 2012

19 / 19

Contenu connexe

En vedette

Computer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 clComputer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 clSaumya Sahu
 
Chapter 04 computer codes
Chapter 04 computer codesChapter 04 computer codes
Chapter 04 computer codesHareem Aslam
 
Computer Fundamentals Chapter 07 pam
Computer Fundamentals Chapter  07 pamComputer Fundamentals Chapter  07 pam
Computer Fundamentals Chapter 07 pamSaumya Sahu
 
pipeline and vector processing
pipeline and vector processingpipeline and vector processing
pipeline and vector processingAcad
 
Computer Fundamentals_Chapter 02 bco
Computer Fundamentals_Chapter 02 bcoComputer Fundamentals_Chapter 02 bco
Computer Fundamentals_Chapter 02 bcoSaumya Sahu
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 
Memory organisation ppt final presentation
Memory organisation ppt final presentationMemory organisation ppt final presentation
Memory organisation ppt final presentationrockymani
 
Input output organization
Input output organizationInput output organization
Input output organizationabdulugc
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and DesignKamal Acharya
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processingKamal Acharya
 

En vedette (13)

Chapter 13 sio
Chapter 13 sioChapter 13 sio
Chapter 13 sio
 
Computer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 clComputer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 cl
 
Chapter 04 computer codes
Chapter 04 computer codesChapter 04 computer codes
Chapter 04 computer codes
 
Computer Fundamentals Chapter 07 pam
Computer Fundamentals Chapter  07 pamComputer Fundamentals Chapter  07 pam
Computer Fundamentals Chapter 07 pam
 
pipeline and vector processing
pipeline and vector processingpipeline and vector processing
pipeline and vector processing
 
Computer Fundamentals_Chapter 02 bco
Computer Fundamentals_Chapter 02 bcoComputer Fundamentals_Chapter 02 bco
Computer Fundamentals_Chapter 02 bco
 
Chapter6 pipelining
Chapter6  pipeliningChapter6  pipelining
Chapter6 pipelining
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Memory organisation ppt final presentation
Memory organisation ppt final presentationMemory organisation ppt final presentation
Memory organisation ppt final presentation
 
Memory organization
Memory organizationMemory organization
Memory organization
 
Input output organization
Input output organizationInput output organization
Input output organization
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
 

Similaire à Memory organization

Similaire à Memory organization (20)

Memory Management
Memory ManagementMemory Management
Memory Management
 
Paging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory managementPaging +Algorithem+Segmentation+memory management
Paging +Algorithem+Segmentation+memory management
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Memory Organization.pdf
Memory Organization.pdfMemory Organization.pdf
Memory Organization.pdf
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
CH08.pdf
CH08.pdfCH08.pdf
CH08.pdf
 
Operating system
Operating systemOperating system
Operating system
 
virtual memory.ppt
virtual memory.pptvirtual memory.ppt
virtual memory.ppt
 
Cs8493 unit 3
Cs8493 unit 3Cs8493 unit 3
Cs8493 unit 3
 
Memory Organization of a Computer System
Memory Organization of a Computer SystemMemory Organization of a Computer System
Memory Organization of a Computer System
 
Cs8493 unit 3
Cs8493 unit 3Cs8493 unit 3
Cs8493 unit 3
 
Unit 5Memory management.pptx
Unit 5Memory management.pptxUnit 5Memory management.pptx
Unit 5Memory management.pptx
 
CS6401 OPERATING SYSTEMS Unit 3
CS6401 OPERATING SYSTEMS Unit 3CS6401 OPERATING SYSTEMS Unit 3
CS6401 OPERATING SYSTEMS Unit 3
 
Unit 5-lecture-2
Unit 5-lecture-2Unit 5-lecture-2
Unit 5-lecture-2
 
NOV11 virtual memory.ppt
NOV11 virtual memory.pptNOV11 virtual memory.ppt
NOV11 virtual memory.ppt
 
Virtual memory presentation
Virtual memory presentationVirtual memory presentation
Virtual memory presentation
 
OSCh9
OSCh9OSCh9
OSCh9
 
Ch9 OS
Ch9 OSCh9 OS
Ch9 OS
 
OS_Ch9
OS_Ch9OS_Ch9
OS_Ch9
 
Android Memory Management
Android Memory ManagementAndroid Memory Management
Android Memory Management
 

Plus de Kumar

Graphics devices
Graphics devicesGraphics devices
Graphics devicesKumar
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithmsKumar
 
region-filling
region-fillingregion-filling
region-fillingKumar
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivationKumar
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons dericationKumar
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xsltKumar
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xmlKumar
 
Xml basics
Xml basicsXml basics
Xml basicsKumar
 
XML Schema
XML SchemaXML Schema
XML SchemaKumar
 
Publishing xml
Publishing xmlPublishing xml
Publishing xmlKumar
 
Applying xml
Applying xmlApplying xml
Applying xmlKumar
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLKumar
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee applicationKumar
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLKumar
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB FundmentalsKumar
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programmingKumar
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programmingKumar
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversKumar
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EEKumar
 

Plus de Kumar (20)

Graphics devices
Graphics devicesGraphics devices
Graphics devices
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 
region-filling
region-fillingregion-filling
region-filling
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
 
Xml basics
Xml basicsXml basics
Xml basics
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Publishing xml
Publishing xmlPublishing xml
Publishing xml
 
DTD
DTDDTD
DTD
 
Applying xml
Applying xmlApplying xml
Applying xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
 

Dernier

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Dernier (20)

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Memory organization

  • 1. Unit 4 - Memory Organization Abhineet Anand Computer Science and Engg. Department University of Petroleum and Energy Studies, Dehradun November 30, 2012 Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 1 / 19
  • 2. Outline 1 Introduction Memory Memory Hierarchy Memory Management System 2 Main Memory 3 Auxiliary Memory 4 Associative Memory 5 Cache Memory Characteristic of Cache Memory Associative Mapping Direct Mapping Set- Associative Mapping 6 Virtual Memory Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 2 / 19
  • 3. Memory The memory that communicates directly with CPU is called main memory. Devices that provides backup storage are called auxiliary memory. Only program and data currently needed by the processor resides in main memory. All other information is stored in auxiliary memory and transferred to main memory when needed. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 3 / 19
  • 4. Memory Hierarchy Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 4 / 19
  • 5. CPU Register - also known as Internal Processor Memory. The data or instruction which has to be executed are kept in these registers. The Cache Memory is employed in computer system to compensate for the speed differential between main memory access time and processor logic. The cache is used for storing segments of programs currently being executed in the CPU and temporary data frequently needed in the present calculations. By making program and data available at a rapid rate, it is possible to increase the performance rate of the computer. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 5 / 19
  • 6. Memory Management System Many operating system are designed to enable the CPU to process a number of independent programs concurrently - known as multiprogramming. Sometimes a program are too long to be accommodated in total space available in main memory. A program with its data normally resides in auxiliary memory. When the program or a segment of program is to be executed, it is transfered to main memory to be executed by the CPU. The part of the computer system that supervise the flow of information between auxiliary memory and main memory is called the memory management system. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 6 / 19
  • 7. Main Memory The principal technology used for main memory is based on semiconductor integrated circuit. The Integrated circuit chips are available in two possible operating modes: Static Dynamic The Static RAM consists essentially of internal flip-flop that store the binary information. The dynamic RAM stores the binary information in form of electronic charges that are applied to capacitors. The stored charge on the capacitor tend to discharge with time and the capacitors must be periodically recharged by refreshing the dynamic memory. The static RAM is easier to use and has shorter read and write cycles and used in cache. The dynamic RAMs are used for implementing the main memory. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 7 / 19
  • 8. Auxiliary Memory The Most common auxiliary memory devices used in computer system are magnetic disk and tapes. Other components used, but not as frequently, are magnetic drums, magnetic bubble memory, and optical disks. The average time required to reach a storage location in memory and obtain its contents is called the access time. In electromechanical devices with moving parts such as disks an tapes, the access time consists of seek time required to position the read-write head to a location and a transfer time required to transfer data to or from the devices. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 8 / 19
  • 9. Associative Memory An assembler program searches the symbol address table in order to extract the symbol’s binary equivalent. The number of accesses to memory depends on the location of the item and the efficiency of search algorithm. Many search algorithm have been developed to minimize the number of access while searching for an item in a random or sequential access memory. The time required to find an item stored in memory can be reduced considerably if stored data can be identified by the content of the data itself rather than an address. A memory unit accessed by content is called an associative memory or content addressable memory(CAM). Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 9 / 19
  • 10. Associative Memory This type of memory is accessed simultaneously and in parallel on the basis of data content rather then by specific address or location. When a word is written in an associative memory, no address is given. The memory is capable of finding an empty unused location to store the word. When a word is to be read from an associative memory, the content of the word, or part of the word, is specified. The memory locates all words which match the specified content and marks them for reading. An associative memory is more expensive than a random access memory, so are used in application where the search time is very critical and must be very short. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 10 / 19
  • 11. Cache Memory A typical computer program flows in a straight-line fashion with program loops and subroutine calls encountered frequently. Analysis of a large number of typical programs has been shown that the reference to memory at any given interval of time tend to be confined within a few localized areas in memory. This phenomenon is known as the property of locality of reference. If the active portions of the program and data are placed in a fast small memory, the average memory access time can be reduced, thus reducing the total execution time of program. Such memory is known as Cache memory. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 11 / 19
  • 12. Cache Memory The Performance of cache memory is frequently measured in terms of a quantity called hit ratio. When the CPU refers to memory and finds the word in cache, it is said to produce a hit. If the word is not found in cache, it is in main memory and it counts as a miss. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 12 / 19
  • 13. Characteristic of Cache Memory The basic characteristic of cache memory is its fast access time. The transformation of data from main memory to cache memory is referred to as a mapping process. Three types of mapping procedures are: Associative Mapping Direct Mapping Set-associative Mapping Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 13 / 19
  • 14. Associative Mapping The fastest and most flexible cache organization uses an associative memory. The associative memory stores both the address and content (data) of the memory word. If the address is found corresponding data is read otherwise main memory is accessed for the word. It is expensive compared to random-access memories because of the added logic associated with each cell. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 14 / 19
  • 15. Associative Mapping Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 15 / 19
  • 16. Direct Mapping The n-bit memory address is divided into two Fields: k-bits for the index field and n-k bits for the tag field. The direct mapping cache organization uses the n-bit address to access the main memory and the k-bit index to access the cache. Each word in cache consists of the data word and its associated tag. When a new word is first brought into the cache, the tag bits are stored alongside the data bits. When the CPU generates a memory request, the index field is used for the address to access the cache. The tag field of the CPU address is compared with the tag in the word read from cache. If the two tags match, there is a hit and the required word is read from cache otherwise it is read from main memory. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 16 / 19
  • 17. Set- Associative Mapping In Direct mapping, every time a miss occurs, an entire block of words must be transfered from main memory to cache memory. Another disadvantage of direct mapping is that two words with the same index in their address but with different tag values cannot reside in cache memory at same time. A third type of cache organization, called set-associative mapping, in which each word of cache can store two or more words of memory under the same index address. Each data word is stored together with its tag and the number of tag-data items in one word of cache is said to from a set. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 17 / 19
  • 18. Virtual Memory In a memory hierarchy system, program and data are first stored in auxiliary memory. Portion of a program or data are brought into main memory as they are needed by the CPU. Virtual Memory is a concept used in some large computer systems that permit the user to construct programs as though a large memory space were available, equal to the totality of auxiliary memory. A virtual memory system provides a mechanism for translating program-generated addresses into correct main memory locations. An address used by a programmer will be called a virtual address, and set of such addresses the address space. An address in main memory is called a location or physical address and the set of such addresses is called memory space. Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 18 / 19
  • 19. THANK YOU Abhineet Anand (UPES, Dehradun) Unit 4 - Memory Organization November 30, 2012 19 / 19