SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Assignment on

  Advanced Computer Architecture
           Virtual Memory & Cache Memory




Submitted To:
Dr. Md. Fokhray Hossain
Associate Professor
Department of CSE, CIS & CS
Faculty of Science & Information Technology
DIU



Submitted By:
Muhammad Ashik Iqbal
M.Sc. in CSE
ID: 092-25-127
DIU



Submission Date:
20 December 2009
Introduction

Virtual Memory
Virtual (or logical) memory is a concept that, when implemented by a computer and its operating system,
allows programmers to use a very large range of memory or storage addresses for stored data. The
computing system maps the programmer's virtual addresses to real hardware storage addresses. Usually,
the programmer is freed from having to be concerned about the availability of data storage.

In addition to managing the mapping of virtual storage addresses to real storage addresses, a computer
implementing virtual memory or storage also manages storage swapping between active storage (RAM)
and hard disk or other high volume storage devices. Data is read in units called "pages" of sizes ranging
from a thousand bytes (actually 1,024 decimal bytes) up to several megabytes in size. This reduces the
amount of physical storage access that is required and speeds up overall system performance.

Cache Memory
A small amount of high-speed memory residing on or close to the CPU is called Cache Memory. Cache
memory supplies the processor with the most frequently requested data and instructions. Level 1 cache
(primary cache) is the cache closest to the processor. Level 2 cache (secondary cache) is the cache second
closest to the processor and is usually on the motherboard.

Cache memory helps to alleviate the gap between the speed of a CPU's megahertz rating and the ability
of RAM to respond and deliver data. It reduces the frequency that the CPU must wait for data from the
main memory.




                                                                                                 Page | 2
Description

Virtual Memory

Virtual memory is a computer system technique which gives
an application program the impression that it has
contiguous working memory (an address space), while in
fact it may be physically fragmented and may even overflow
on to disk storage.

Developed for multitasking kernels, virtual memory provides
two primary functions:

   1. Each process has its own address space, thereby not
      required to be relocated nor required to use relative
      addressing mode.
   2. Each process sees one contiguous block of free
      memory upon launch. Fragmentation is hidden.

All implementations (excluding emulators) require hardware
support. This is typically in the form of a Memory
Management Unit built into the CPU.

Systems that use this technique make programming of large
applications easier and use real physical memory (e.g. RAM)
more efficiently than those without virtual memory. Virtual memory differs significantly from memory
virtualization in that virtual memory allows resources to be virtualized as memory for a specific system,
as opposed to a large pool of memory being virtualized as smaller pools for many different systems.

Note that "virtual memory" is more than just "using disk space to extend physical memory size" - that is
merely the extension of the memory hierarchy to include hard disk drives. Extending memory to disk is a
normal consequence of using virtual memory techniques, but could be done by other means such as
overlays or swapping programs and their data completely out to disk while they are inactive. The
definition of "virtual memory" is based on redefining the address space with a contiguous virtual memory
addresses to "trick" programs into thinking they are using large blocks of contiguous addresses.

Modern general-purpose computer operating systems generally use virtual memory techniques for
ordinary applications, such as word processors, spreadsheets, multimedia players, accounting, etc.,
except where the required hardware support (a memory management unit) is unavailable. Older
operating systems, such as DOS of the 1980s, or those for the mainframes of the 1960s, generally had no
virtual memory functionality - notable exceptions being the Atlas, B5000 and Apple Computer's Lisa.

Embedded systems and other special-purpose computer systems which require very fast and/or very
consistent response times may opt not to use virtual memory due to decreased determinism. This is
based on the idea that unpredictable processor exceptions produce unwanted jitter on CPU operated I/O,
which the smaller embedded processors often perform directly to keep cost and power consumption low.
And the associated simple application has little use for multitasking features.
                                                                                                Page | 3
Cache Memory
Pronounced cash, a special high-speed
storage mechanism. It can be either a
reserved section of main memory or an
independent high-speed storage device.
Two types of caching are commonly
used in personal computers: memory caching and disk caching.

A memory cache, sometimes called a cache store or RAM cache, is a portion of memory made of high-
speed static RAM (SRAM) instead of the slower and cheaper dynamic RAM (DRAM) used for main
memory. Memory caching is effective because most programs access the same data or instructions over
and over. By keeping as much of this information as possible in SRAM, the computer avoids accessing the
slower DRAM.

Some memory caches are built into the architecture of microprocessors. The Intel 80486 microprocessor,
for example, contains an 8K memory cache, and the Pentium has a 16K cache. Such internal caches are
often called Level 1 (L1) caches. Most modern PCs also come with external cache memory, called Level 2
(L2) caches. These caches sit between the CPU and the DRAM. Like L1 caches, L2 caches are composed of
SRAM but they are much larger.

Disk caching works under the same principle as memory caching, but instead of using high-speed SRAM, a
disk cache uses conventional main memory. The most recently accessed data from the disk (as well as
adjacent sectors) is stored in a memory buffer. When a program needs to access data from the disk, it
first checks the disk cache to see if the data is there. Disk caching can dramatically improve the
performance of applications, because accessing a byte of data in RAM can be thousands of times faster
than accessing a byte on a hard disk.

When data is found in the cache, it is called a cache hit, and the effectiveness of a cache is judged by its
hit rate. Many cache systems use a technique known as smart caching, in which the system can recognize
certain types of frequently used data. The strategies for determining which information should be kept in
the cache constitute some of the more interesting problems in computer science.

Pronounced cash, a special high-speed storage mechanism. It can be either a reserved section of main
memory or an independent high-speed storage device. Two types of caching are commonly used in
personal computers: memory caching and disk caching.

A memory cache, sometimes called a cache store or RAM cache, is a portion of memory made of high-
speed static RAM (SRAM) instead of the slower and cheaper dynamic RAM (DRAM) used for main
memory. Memory caching is effective because most programs access the same data or instructions over
and over. By keeping as much of this information as possible in SRAM, the computer avoids accessing the
slower DRAM.

Some memory caches are built into the architecture of microprocessors. The Intel 80486 microprocessor,
for example, contains an 8K memory cache, and the Pentium has a 16K cache. Such internal caches are
often called Level 1 (L1) caches. Most modern PCs also come with external cache memory, called Level 2
(L2) caches. These caches sit between the CPU and the DRAM. Like L1 caches, L2 caches are composed of
SRAM but they are much larger.



                                                                                                   Page | 4
Disk caching works under the same principle as memory caching, but instead of using high-speed SRAM, a
disk cache uses conventional main memory. The most recently accessed data from the disk (as well as
adjacent sectors) is stored in a memory buffer. When a program needs to access data from the disk, it
first checks the disk cache to see if the data is there. Disk caching can dramatically improve the
performance of applications, because accessing a byte of data in RAM can be thousands of times faster
than accessing a byte on a hard disk.

When data is found in the cache, it is called a cache hit, and the effectiveness of a cache is judged by its
hit rate. Many cache systems use a technique known as smart caching, in which the system can recognize
certain types of frequently used data. The strategies for determining which information should be kept in
the cache constitute some of the more interesting problems in computer science.




References
    •   www.wikipedia.org
    •   www.answers.com
    •   www.webopedia.com
    •   www.intel.com




                                                                                                   Page | 5

Weitere ähnliche Inhalte

Was ist angesagt?

Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
sumitjain2013
 
System partitioning in VLSI and its considerations
System partitioning in VLSI and its considerationsSystem partitioning in VLSI and its considerations
System partitioning in VLSI and its considerations
Subash John
 

Was ist angesagt? (20)

Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output Organization
 
Implementation of High Reliable 6T SRAM Cell Design
Implementation of High Reliable 6T SRAM Cell DesignImplementation of High Reliable 6T SRAM Cell Design
Implementation of High Reliable 6T SRAM Cell Design
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
 
Set associative mapping
Set associative mappingSet associative mapping
Set associative mapping
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
Arm modes
Arm modesArm modes
Arm modes
 
Deadlock
DeadlockDeadlock
Deadlock
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
 
Multi Processors And Multi Computers
 Multi Processors And Multi Computers Multi Processors And Multi Computers
Multi Processors And Multi Computers
 
Ch 4 95
Ch 4 95Ch 4 95
Ch 4 95
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
 
Distributed Operating System
Distributed Operating SystemDistributed Operating System
Distributed Operating System
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
 
Feng’s classification
Feng’s classificationFeng’s classification
Feng’s classification
 
04 cache memory
04 cache memory04 cache memory
04 cache memory
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
System partitioning in VLSI and its considerations
System partitioning in VLSI and its considerationsSystem partitioning in VLSI and its considerations
System partitioning in VLSI and its considerations
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Clusters and Wharehouse Scale Computers
Clusters and Wharehouse Scale ComputersClusters and Wharehouse Scale Computers
Clusters and Wharehouse Scale Computers
 

Andere mochten auch

Virtual memory
Virtual memoryVirtual memory
Virtual memory
Anuj Modi
 
Cache memory
Cache memoryCache memory
Cache memory
Anuj Modi
 
11 process definition
11 process definition11 process definition
11 process definition
myrajendra
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
rohassanie
 

Andere mochten auch (20)

Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
VIRTUAL MEMORY
VIRTUAL MEMORYVIRTUAL MEMORY
VIRTUAL MEMORY
 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and Paging
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
 
Memory management
Memory managementMemory management
Memory management
 
Virtual memory managment
Virtual memory managmentVirtual memory managment
Virtual memory managment
 
Operating System (Scheduling, Input and Output Management, Memory Management,...
Operating System (Scheduling, Input and Output Management, Memory Management,...Operating System (Scheduling, Input and Output Management, Memory Management,...
Operating System (Scheduling, Input and Output Management, Memory Management,...
 
Operating Systems: Virtual Memory
Operating Systems: Virtual MemoryOperating Systems: Virtual Memory
Operating Systems: Virtual Memory
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
 
Cache memory
Cache memoryCache memory
Cache memory
 
11 process definition
11 process definition11 process definition
11 process definition
 
Kallmann syndrome
Kallmann syndromeKallmann syndrome
Kallmann syndrome
 
Kallmann syndrome
Kallmann syndromeKallmann syndrome
Kallmann syndrome
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
Ch09
Ch09Ch09
Ch09
 
Ch10: Virtual Memory
Ch10: Virtual MemoryCh10: Virtual Memory
Ch10: Virtual Memory
 
Os8
Os8Os8
Os8
 
Virtual Memory (Making a Process)
Virtual Memory (Making a Process)Virtual Memory (Making a Process)
Virtual Memory (Making a Process)
 

Ähnlich wie Virtual Memory vs Cache Memory

2. the memory systems (module2)
2. the memory systems (module2)2. the memory systems (module2)
2. the memory systems (module2)
Ajit Saraf
 
COMPUTER MEMORY
COMPUTER MEMORYCOMPUTER MEMORY
COMPUTER MEMORY
Rajat More
 
Understanding And Managing Memory
Understanding And Managing MemoryUnderstanding And Managing Memory
Understanding And Managing Memory
isma ishak
 

Ähnlich wie Virtual Memory vs Cache Memory (20)

Ram and types of ram.Cache
Ram and types of ram.CacheRam and types of ram.Cache
Ram and types of ram.Cache
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
 
Information processing cycle
Information processing cycleInformation processing cycle
Information processing cycle
 
Computer memory and types of memory.pptx
Computer memory and types of memory.pptxComputer memory and types of memory.pptx
Computer memory and types of memory.pptx
 
2. the memory systems (module2)
2. the memory systems (module2)2. the memory systems (module2)
2. the memory systems (module2)
 
How Does Memory Storage Work in Computers ppt.pptx
How Does Memory Storage Work in Computers ppt.pptxHow Does Memory Storage Work in Computers ppt.pptx
How Does Memory Storage Work in Computers ppt.pptx
 
Cache memory
Cache memoryCache memory
Cache memory
 
Ppt cache vs virtual memory without animation
Ppt cache vs virtual memory without animationPpt cache vs virtual memory without animation
Ppt cache vs virtual memory without animation
 
COMPUTER MEMORY
COMPUTER MEMORYCOMPUTER MEMORY
COMPUTER MEMORY
 
Cache memory and cache
Cache memory and cacheCache memory and cache
Cache memory and cache
 
Memory managment
Memory managmentMemory managment
Memory managment
 
M E M O R Y
M E M O R YM E M O R Y
M E M O R Y
 
Understanding And Managing Memory
Understanding And Managing MemoryUnderstanding And Managing Memory
Understanding And Managing Memory
 
What is Computer Memory.ppt
What is Computer Memory.pptWhat is Computer Memory.ppt
What is Computer Memory.ppt
 
BBA CHAPTER COMPUTER HARDWARE 5 .pptx
BBA CHAPTER COMPUTER HARDWARE    5 .pptxBBA CHAPTER COMPUTER HARDWARE    5 .pptx
BBA CHAPTER COMPUTER HARDWARE 5 .pptx
 
Cache memory and virtual memory
Cache memory and virtual memoryCache memory and virtual memory
Cache memory and virtual memory
 
Cache memory ...
Cache memory ...Cache memory ...
Cache memory ...
 
COMPUTER MEMORY
COMPUTER MEMORYCOMPUTER MEMORY
COMPUTER MEMORY
 
virtual memory - Computer operating system
virtual memory - Computer operating systemvirtual memory - Computer operating system
virtual memory - Computer operating system
 
Virtual SAN - A Deep Dive into Converged Storage (technical whitepaper)
Virtual SAN - A Deep Dive into Converged Storage (technical whitepaper)Virtual SAN - A Deep Dive into Converged Storage (technical whitepaper)
Virtual SAN - A Deep Dive into Converged Storage (technical whitepaper)
 

Mehr von Ashik Iqbal

Al quran-er-arobi-shikhi
Al quran-er-arobi-shikhiAl quran-er-arobi-shikhi
Al quran-er-arobi-shikhi
Ashik Iqbal
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
Ashik Iqbal
 
Profit From Ramadan
Profit From RamadanProfit From Ramadan
Profit From Ramadan
Ashik Iqbal
 
Mobile/Digital Wallet
Mobile/Digital WalletMobile/Digital Wallet
Mobile/Digital Wallet
Ashik Iqbal
 
Handbook Of Islamic Banking
Handbook Of Islamic BankingHandbook Of Islamic Banking
Handbook Of Islamic Banking
Ashik Iqbal
 

Mehr von Ashik Iqbal (17)

Document Archiving & Sharing System
Document Archiving & Sharing SystemDocument Archiving & Sharing System
Document Archiving & Sharing System
 
Document Archiving & Sharing System
Document Archiving & Sharing SystemDocument Archiving & Sharing System
Document Archiving & Sharing System
 
We Forgot
We ForgotWe Forgot
We Forgot
 
Al quran-er-arobi-shikhi
Al quran-er-arobi-shikhiAl quran-er-arobi-shikhi
Al quran-er-arobi-shikhi
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Commercially Available Fiber Optic Cables
Commercially Available Fiber Optic CablesCommercially Available Fiber Optic Cables
Commercially Available Fiber Optic Cables
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
 
Advanced Artificial Intelligence
Advanced Artificial IntelligenceAdvanced Artificial Intelligence
Advanced Artificial Intelligence
 
Profit From Ramadan
Profit From RamadanProfit From Ramadan
Profit From Ramadan
 
Mobile/Digital Wallet
Mobile/Digital WalletMobile/Digital Wallet
Mobile/Digital Wallet
 
Rsa Algorithm
Rsa AlgorithmRsa Algorithm
Rsa Algorithm
 
Prophets Graves
Prophets GravesProphets Graves
Prophets Graves
 
Cryprography Assignment
Cryprography AssignmentCryprography Assignment
Cryprography Assignment
 
Cryptography Ashik
Cryptography AshikCryptography Ashik
Cryptography Ashik
 
My Abokash
My AbokashMy Abokash
My Abokash
 
Handbook Of Islamic Banking
Handbook Of Islamic BankingHandbook Of Islamic Banking
Handbook Of Islamic Banking
 
The Window
The WindowThe Window
The Window
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Virtual Memory vs Cache Memory

  • 1. Assignment on Advanced Computer Architecture Virtual Memory & Cache Memory Submitted To: Dr. Md. Fokhray Hossain Associate Professor Department of CSE, CIS & CS Faculty of Science & Information Technology DIU Submitted By: Muhammad Ashik Iqbal M.Sc. in CSE ID: 092-25-127 DIU Submission Date: 20 December 2009
  • 2. Introduction Virtual Memory Virtual (or logical) memory is a concept that, when implemented by a computer and its operating system, allows programmers to use a very large range of memory or storage addresses for stored data. The computing system maps the programmer's virtual addresses to real hardware storage addresses. Usually, the programmer is freed from having to be concerned about the availability of data storage. In addition to managing the mapping of virtual storage addresses to real storage addresses, a computer implementing virtual memory or storage also manages storage swapping between active storage (RAM) and hard disk or other high volume storage devices. Data is read in units called "pages" of sizes ranging from a thousand bytes (actually 1,024 decimal bytes) up to several megabytes in size. This reduces the amount of physical storage access that is required and speeds up overall system performance. Cache Memory A small amount of high-speed memory residing on or close to the CPU is called Cache Memory. Cache memory supplies the processor with the most frequently requested data and instructions. Level 1 cache (primary cache) is the cache closest to the processor. Level 2 cache (secondary cache) is the cache second closest to the processor and is usually on the motherboard. Cache memory helps to alleviate the gap between the speed of a CPU's megahertz rating and the ability of RAM to respond and deliver data. It reduces the frequency that the CPU must wait for data from the main memory. Page | 2
  • 3. Description Virtual Memory Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory (an address space), while in fact it may be physically fragmented and may even overflow on to disk storage. Developed for multitasking kernels, virtual memory provides two primary functions: 1. Each process has its own address space, thereby not required to be relocated nor required to use relative addressing mode. 2. Each process sees one contiguous block of free memory upon launch. Fragmentation is hidden. All implementations (excluding emulators) require hardware support. This is typically in the form of a Memory Management Unit built into the CPU. Systems that use this technique make programming of large applications easier and use real physical memory (e.g. RAM) more efficiently than those without virtual memory. Virtual memory differs significantly from memory virtualization in that virtual memory allows resources to be virtualized as memory for a specific system, as opposed to a large pool of memory being virtualized as smaller pools for many different systems. Note that "virtual memory" is more than just "using disk space to extend physical memory size" - that is merely the extension of the memory hierarchy to include hard disk drives. Extending memory to disk is a normal consequence of using virtual memory techniques, but could be done by other means such as overlays or swapping programs and their data completely out to disk while they are inactive. The definition of "virtual memory" is based on redefining the address space with a contiguous virtual memory addresses to "trick" programs into thinking they are using large blocks of contiguous addresses. Modern general-purpose computer operating systems generally use virtual memory techniques for ordinary applications, such as word processors, spreadsheets, multimedia players, accounting, etc., except where the required hardware support (a memory management unit) is unavailable. Older operating systems, such as DOS of the 1980s, or those for the mainframes of the 1960s, generally had no virtual memory functionality - notable exceptions being the Atlas, B5000 and Apple Computer's Lisa. Embedded systems and other special-purpose computer systems which require very fast and/or very consistent response times may opt not to use virtual memory due to decreased determinism. This is based on the idea that unpredictable processor exceptions produce unwanted jitter on CPU operated I/O, which the smaller embedded processors often perform directly to keep cost and power consumption low. And the associated simple application has little use for multitasking features. Page | 3
  • 4. Cache Memory Pronounced cash, a special high-speed storage mechanism. It can be either a reserved section of main memory or an independent high-speed storage device. Two types of caching are commonly used in personal computers: memory caching and disk caching. A memory cache, sometimes called a cache store or RAM cache, is a portion of memory made of high- speed static RAM (SRAM) instead of the slower and cheaper dynamic RAM (DRAM) used for main memory. Memory caching is effective because most programs access the same data or instructions over and over. By keeping as much of this information as possible in SRAM, the computer avoids accessing the slower DRAM. Some memory caches are built into the architecture of microprocessors. The Intel 80486 microprocessor, for example, contains an 8K memory cache, and the Pentium has a 16K cache. Such internal caches are often called Level 1 (L1) caches. Most modern PCs also come with external cache memory, called Level 2 (L2) caches. These caches sit between the CPU and the DRAM. Like L1 caches, L2 caches are composed of SRAM but they are much larger. Disk caching works under the same principle as memory caching, but instead of using high-speed SRAM, a disk cache uses conventional main memory. The most recently accessed data from the disk (as well as adjacent sectors) is stored in a memory buffer. When a program needs to access data from the disk, it first checks the disk cache to see if the data is there. Disk caching can dramatically improve the performance of applications, because accessing a byte of data in RAM can be thousands of times faster than accessing a byte on a hard disk. When data is found in the cache, it is called a cache hit, and the effectiveness of a cache is judged by its hit rate. Many cache systems use a technique known as smart caching, in which the system can recognize certain types of frequently used data. The strategies for determining which information should be kept in the cache constitute some of the more interesting problems in computer science. Pronounced cash, a special high-speed storage mechanism. It can be either a reserved section of main memory or an independent high-speed storage device. Two types of caching are commonly used in personal computers: memory caching and disk caching. A memory cache, sometimes called a cache store or RAM cache, is a portion of memory made of high- speed static RAM (SRAM) instead of the slower and cheaper dynamic RAM (DRAM) used for main memory. Memory caching is effective because most programs access the same data or instructions over and over. By keeping as much of this information as possible in SRAM, the computer avoids accessing the slower DRAM. Some memory caches are built into the architecture of microprocessors. The Intel 80486 microprocessor, for example, contains an 8K memory cache, and the Pentium has a 16K cache. Such internal caches are often called Level 1 (L1) caches. Most modern PCs also come with external cache memory, called Level 2 (L2) caches. These caches sit between the CPU and the DRAM. Like L1 caches, L2 caches are composed of SRAM but they are much larger. Page | 4
  • 5. Disk caching works under the same principle as memory caching, but instead of using high-speed SRAM, a disk cache uses conventional main memory. The most recently accessed data from the disk (as well as adjacent sectors) is stored in a memory buffer. When a program needs to access data from the disk, it first checks the disk cache to see if the data is there. Disk caching can dramatically improve the performance of applications, because accessing a byte of data in RAM can be thousands of times faster than accessing a byte on a hard disk. When data is found in the cache, it is called a cache hit, and the effectiveness of a cache is judged by its hit rate. Many cache systems use a technique known as smart caching, in which the system can recognize certain types of frequently used data. The strategies for determining which information should be kept in the cache constitute some of the more interesting problems in computer science. References • www.wikipedia.org • www.answers.com • www.webopedia.com • www.intel.com Page | 5