SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Cache memory
Cache memoryCache memory
Cache memory
Anuj Modi
 
Windows memory management
Windows memory managementWindows memory management
Windows memory management
Tech_MX
 

Mais procurados (20)

8086 class notes-Y.N.M
8086 class notes-Y.N.M8086 class notes-Y.N.M
8086 class notes-Y.N.M
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
 
Unix Memory Management - Operating Systems
Unix Memory Management - Operating SystemsUnix Memory Management - Operating Systems
Unix Memory Management - Operating Systems
 
Cache memory
Cache memoryCache memory
Cache memory
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
 
Unit 6 interprocessor arbitration
Unit 6 interprocessor arbitrationUnit 6 interprocessor arbitration
Unit 6 interprocessor arbitration
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory management
Memory managementMemory management
Memory management
 
Cache memory
Cache memory Cache memory
Cache memory
 
Unit IV Memory and I/O Organization
Unit IV Memory and I/O OrganizationUnit IV Memory and I/O Organization
Unit IV Memory and I/O Organization
 
Cache memory and cache
Cache memory and cacheCache memory and cache
Cache memory and cache
 
Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt
 
cache memory
cache memorycache memory
cache memory
 
Basics Of Semiconductor Memories
Basics Of Semiconductor MemoriesBasics Of Semiconductor Memories
Basics Of Semiconductor Memories
 
Windows memory management
Windows memory managementWindows memory management
Windows memory management
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
 
Distributed system
Distributed systemDistributed system
Distributed system
 

Destaque

Virtual memory
Virtual memoryVirtual memory
Virtual 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
 

Destaque (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
 
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)
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 

Semelhante a 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
 
How many total bits are required for a direct-mapped cache with 2048 .pdf
How many total bits are required for a direct-mapped cache with 2048 .pdfHow many total bits are required for a direct-mapped cache with 2048 .pdf
How many total bits are required for a direct-mapped cache with 2048 .pdf
Eye2eyeopticians10
 

Semelhante a 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
 
COMPUTER MEMORY
COMPUTER MEMORYCOMPUTER MEMORY
COMPUTER MEMORY
 
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 ...
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)
 
Cmp
CmpCmp
Cmp
 
How many total bits are required for a direct-mapped cache with 2048 .pdf
How many total bits are required for a direct-mapped cache with 2048 .pdfHow many total bits are required for a direct-mapped cache with 2048 .pdf
How many total bits are required for a direct-mapped cache with 2048 .pdf
 
Computer memory
Computer memoryComputer memory
Computer memory
 
06 - Memory.ppt
06 - Memory.ppt06 - Memory.ppt
06 - Memory.ppt
 

Mais de 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
 

Mais de 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
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Último (20)

Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
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
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
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
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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
 

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