SlideShare a Scribd company logo
1 of 24
By
Abhay , Osho
Akarsh , Adarsh
Abdullah , Nitin
 Virtual memory as an alternate set of memory
addresses.
 Programs use these virtual addresses rather than
real addresses to store instructions and data.
 When the program is actually executed, the virtual
addresses are converted into real memory addresses.
 Virtual memory was developed in
approximately 1959 – 1962, at the University
of Manchester for theAtlas Computer,
completed in 1962.
 In 1961, Burroughs released the B5000,
the first commercial computer with virtual
memory.
 Before the development of the virtual memory
technique, programmers in the 1940s and 1950s had to
manage directly two-level storage such as main
memory or ram and secondary memory in the form of
hard disks or earlier, magnetic drums.
 Enlarge the address space, the set of addresses a
program can utilize.
 Virtual memory might contain twice as many
addresses as main memory.
 When a computer is executing many programs
at the same time,Virtual memory make the
computer to share memory efficiently.
 Eliminate a restriction that a computer works in
memory which is small and be limited.
 When many programs is running at the same
time, by distributing each suitable memory area to
each program,VM protect programs to interfere
each other in each memory area.
 To facilitate copying virtual memory into real
memory, the operating system divides virtual
memory into pages, each of which contains a fixed
number of addresses.
 Each page is stored on a disk until it is needed.
 When the page is needed, the operating system
copies it from disk to main memory, translating the
virtual addresses into real addresses.
• Since the number of pages is very high, the page table
capacity is too large to fit on chip
• A translation lookaside buffer (TLB) caches the virtual
to physical page number translation for recent accesses
• ATLB miss requires us to access the page table, which
may not even be found in the cache – two expensive
memory look-ups to access one word of data!
• A large page size can increase the coverage of theTLB
and reduce the capacity of the page table, but also
increases memory wastage
 The hardware base that makes a virtual memory system
possible.
 Allows software to reference physical memory by virtual
addresses, quite often more than one.
 It accomplishes this through the use of page and page
tables.
 Use a section of memory to translate virtual addresses into
physical addresses via a series of table lookups.
 The software that handles the page fault is generally part of
an operating system and the hardware that detects this
situation is the MMU
 Paging: - Fixed-size blocks
 Segmentation:-Variable size blocks
 Segmentation involves the relocation of variable sized segments
into the physical address space.
 Generally these segments are contiguous units, and are referred
to in programs by their segment number and an offset to the
requested data.
 Efficient segmentation relies on programs that are very
thoughtfully written for their target system.
 Since segmentation relies on memory that is located in single
large blocks, it is very possible that enough free space is available
to load a new module, but can not be utilized.
 Segmentation may also suffer from internal fragmentation if
segments are not variable-sized, where memory above the
segment is not used by the program but is still “reserved” for it.
 A technique used by virtual memory operating systems to help
ensure that the data you need is available as quickly as possible.
 Paging systems use fixed-length blocks called pages and assign
them to fixed regions of physical memory called page frames.
 A valid page is one that currently resides in main memory. An
invalid page is one that currently resides in secondary memory.
 When a program needs a page that is not in primary memory, the
operating system copies the required page into primary memory
and copies another page back to the disk.
 Paging provides a somewhat easier interface for programs, in that
its operation tends to be more automatic and thus transparent.
 Instead of utilizing a segment addressing approach, as seen
in segmentation, paging uses a linear sequence of virtual addresses
which are mapped to physical memory as necessary.
 Due to this addressing approach, a single program may refer to
series of many non-contiguous segments.
 Although some internal fragmentation may still exist due to the fixed
size of the pages, the approach virtually eliminates external
fragmentation.
 Page size is an important factor that determines the efficiency of
the overall system.
 Large page size would be appropriate if the probablity of memory
location being reffered decreases with increasing distance from
location adressed
 If a page size is very large,much of the information being moved
may not be required in the main memory.
 If the page size is too small,the number of page transfer increases
needlessly,size of page availability table also increases
 Proper page size is n = Tas/Tap
 Before page of 64 to 128 words seemed appropriate but recent
times pages of 4K have become common
An interrupt to the software raised by the hardware when
a program accesses a page that is not mapped in physical
memory.
when a program accesses a memory location in its
memory and the page corresponding to that memory is
not loaded
when a program accesses a memory location in its
memory and the program does not have privileges to
access the page corresponding to that memory.
Demand paging follows that pages should only be brought into memory if
the executing process demands them. This is referred to as lazy
evaluation as only those pages demanded by the process are swapped
from secondary storage to main memory.
Attempt to access page.
If page is valid (in memory) then continue processing instruction as
normal.
If page is invalid then a page-fault trap occurs.
Check if the memory reference is a valid reference to a location on
secondary memory. If not, the process is terminated.
Schedule disk operation to read the desired page into main memory.
Restart the instruction that was interrupted by the operating system trap
OPT(MIN) : eliminate the page that be not expected
to be used.
FIFO(first input/first output) : rather than choosing
the victim page at random, the oldest page is the first
to be removed.
LRU(Least Recently used) : move out the page that is
the least rarely used.
LFU(Least Frequently used) : move out the page that
is not used often in the past.
FIFO
 FIFO(first in first out) :With FIFO, the oldest
page in memory is selected for replacement
Example:
2 3 2 1 5 2 4 5 3 2 5 2
2 2 *2 2 5 5 5 *5 3 3 3 3
3 3 3 3 2 2 2 2 *2 5 5
1 1 1 4 4 4 4 4 2
LRU: (least recently used)
 LRU Policy- a policy that selects the page that
has gone unused for the longest period of
time.
2 3 2 1 5 2 4 5 3 2 5 2
2 3 *2 1 5 *2 4 *5 3 2 *5 *2
2 3 2 1 5 2 4 5 3 2 5
3 2 1 5 2 4 5 3 3
Examples of OPT :
 2 3 2 1 5 2 4 5 3 2 5 2
2 2 *2 2 2 *2 4 4 4 2 2 *2
3 3 3 3 3 3 3 *3 3 3 3
1 5 5 5 *5 5 5 *5 5
 Main memory is used more efficiently
 Programs that are bigger than
 Main memory can still be executed
Disadvantages
 Applications run slower
 It takes more time to switch between applications
 Less hard drive space for your use
 Virtual memory is a common part of most operating systems
on computers.
 It has become so common because it provides a big benefit for
users at a very low cost.
 benefits of executing a program that is only partially in memory.
 program is no longer constrained by the amount of physical
memory.
 ⇒ user would be able to write programs for an
extremely large virtual address space.
 more programs could be run at the same time
⇒ increase CPU utilization and throughput.
 less I/O would be needed to load or swap each user program
⇒ run faster
Abhaycavirtual memory and the pagehit.pptx

More Related Content

Similar to Abhaycavirtual memory and the pagehit.pptx

Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memoryMazin Alwaaly
 
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual MemoryCSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memoryghayour abbas
 
Virtual Memory in Operating System
Virtual Memory in Operating SystemVirtual Memory in Operating System
Virtual Memory in Operating SystemMeghaj Mallick
 
OS Presentation 2023.pptx
OS Presentation 2023.pptxOS Presentation 2023.pptx
OS Presentation 2023.pptxShayanAli68
 
An Efficient Virtual Memory using Graceful Code
An Efficient Virtual Memory using Graceful CodeAn Efficient Virtual Memory using Graceful Code
An Efficient Virtual Memory using Graceful Codeijtsrd
 
Cache memory and virtual memory
Cache memory and virtual memoryCache memory and virtual memory
Cache memory and virtual memoryPrakharBansal29
 
Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management Shashank Asthana
 
virtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfvirtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfArchanaPandiyan
 
Virtual memory managment
Virtual memory managmentVirtual memory managment
Virtual memory managmentSantu Kumar
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1rohassanie
 
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptxSTORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptxDivyaKS18
 
Mca ii os u-4 memory management
Mca  ii  os u-4 memory managementMca  ii  os u-4 memory management
Mca ii os u-4 memory managementRai University
 

Similar to Abhaycavirtual memory and the pagehit.pptx (20)

Os unit 2
Os unit 2Os unit 2
Os unit 2
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual MemoryCSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memory
 
Virtual Memory in Operating System
Virtual Memory in Operating SystemVirtual Memory in Operating System
Virtual Memory in Operating System
 
OS Presentation 2023.pptx
OS Presentation 2023.pptxOS Presentation 2023.pptx
OS Presentation 2023.pptx
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
An Efficient Virtual Memory using Graceful Code
An Efficient Virtual Memory using Graceful CodeAn Efficient Virtual Memory using Graceful Code
An Efficient Virtual Memory using Graceful Code
 
Cache memory and virtual memory
Cache memory and virtual memoryCache memory and virtual memory
Cache memory and virtual memory
 
Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management
 
virtual memory - Computer operating system
virtual memory - Computer operating systemvirtual memory - Computer operating system
virtual memory - Computer operating system
 
virtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdfvirtualmemory-111228090333-phpapp02 (1).pdf
virtualmemory-111228090333-phpapp02 (1).pdf
 
Memory virtualization
Memory virtualizationMemory virtualization
Memory virtualization
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Virtual memory managment
Virtual memory managmentVirtual memory managment
Virtual memory managment
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
 
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptxSTORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
STORAGE MANAGEMENT AND PAGING ALGORITHMS.pptx
 
CH09.pdf
CH09.pdfCH09.pdf
CH09.pdf
 
Mca ii os u-4 memory management
Mca  ii  os u-4 memory managementMca  ii  os u-4 memory management
Mca ii os u-4 memory management
 
VirutualMemory.docx
VirutualMemory.docxVirutualMemory.docx
VirutualMemory.docx
 

More from wemoji5816

Assignment_bio about the replication of dna .pptx
Assignment_bio about the replication of dna .pptxAssignment_bio about the replication of dna .pptx
Assignment_bio about the replication of dna .pptxwemoji5816
 
Abhay_cell tissues and the organ system.pptx
Abhay_cell tissues and the organ system.pptxAbhay_cell tissues and the organ system.pptx
Abhay_cell tissues and the organ system.pptxwemoji5816
 
cells-tissues-organs-and-systems OF BODY.ppt
cells-tissues-organs-and-systems OF BODY.pptcells-tissues-organs-and-systems OF BODY.ppt
cells-tissues-organs-and-systems OF BODY.pptwemoji5816
 
PresentationNEWOF REPLICATION ANDTRANSCRIPTION.pptx
PresentationNEWOF REPLICATION ANDTRANSCRIPTION.pptxPresentationNEWOF REPLICATION ANDTRANSCRIPTION.pptx
PresentationNEWOF REPLICATION ANDTRANSCRIPTION.pptxwemoji5816
 
Presentation on the application of ai in law.pptx
Presentation on the application of ai in law.pptxPresentation on the application of ai in law.pptx
Presentation on the application of ai in law.pptxwemoji5816
 
Presentation1 it about the biology explaining marvel of dna replication and t...
Presentation1 it about the biology explaining marvel of dna replication and t...Presentation1 it about the biology explaining marvel of dna replication and t...
Presentation1 it about the biology explaining marvel of dna replication and t...wemoji5816
 
abdulla time complexity and linear search.pptx
abdulla time complexity and linear search.pptxabdulla time complexity and linear search.pptx
abdulla time complexity and linear search.pptxwemoji5816
 
dna transcription and the translation.pptx
dna transcription and the translation.pptxdna transcription and the translation.pptx
dna transcription and the translation.pptxwemoji5816
 
"Unraveling the Essentials of Life: An In-Depth Exploration of DNA Replicatio...
"Unraveling the Essentials of Life: An In-Depth Exploration of DNA Replicatio..."Unraveling the Essentials of Life: An In-Depth Exploration of DNA Replicatio...
"Unraveling the Essentials of Life: An In-Depth Exploration of DNA Replicatio...wemoji5816
 

More from wemoji5816 (9)

Assignment_bio about the replication of dna .pptx
Assignment_bio about the replication of dna .pptxAssignment_bio about the replication of dna .pptx
Assignment_bio about the replication of dna .pptx
 
Abhay_cell tissues and the organ system.pptx
Abhay_cell tissues and the organ system.pptxAbhay_cell tissues and the organ system.pptx
Abhay_cell tissues and the organ system.pptx
 
cells-tissues-organs-and-systems OF BODY.ppt
cells-tissues-organs-and-systems OF BODY.pptcells-tissues-organs-and-systems OF BODY.ppt
cells-tissues-organs-and-systems OF BODY.ppt
 
PresentationNEWOF REPLICATION ANDTRANSCRIPTION.pptx
PresentationNEWOF REPLICATION ANDTRANSCRIPTION.pptxPresentationNEWOF REPLICATION ANDTRANSCRIPTION.pptx
PresentationNEWOF REPLICATION ANDTRANSCRIPTION.pptx
 
Presentation on the application of ai in law.pptx
Presentation on the application of ai in law.pptxPresentation on the application of ai in law.pptx
Presentation on the application of ai in law.pptx
 
Presentation1 it about the biology explaining marvel of dna replication and t...
Presentation1 it about the biology explaining marvel of dna replication and t...Presentation1 it about the biology explaining marvel of dna replication and t...
Presentation1 it about the biology explaining marvel of dna replication and t...
 
abdulla time complexity and linear search.pptx
abdulla time complexity and linear search.pptxabdulla time complexity and linear search.pptx
abdulla time complexity and linear search.pptx
 
dna transcription and the translation.pptx
dna transcription and the translation.pptxdna transcription and the translation.pptx
dna transcription and the translation.pptx
 
"Unraveling the Essentials of Life: An In-Depth Exploration of DNA Replicatio...
"Unraveling the Essentials of Life: An In-Depth Exploration of DNA Replicatio..."Unraveling the Essentials of Life: An In-Depth Exploration of DNA Replicatio...
"Unraveling the Essentials of Life: An In-Depth Exploration of DNA Replicatio...
 

Recently uploaded

PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...Christo Ananth
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...singhalabhi53
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docxrahulmanepalli02
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
Overview of Transformation in Computer Graphics
Overview of Transformation in Computer GraphicsOverview of Transformation in Computer Graphics
Overview of Transformation in Computer GraphicsChandrakantDivate1
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORTanishkaHira1
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptamrabdallah9
 
Dr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptxDr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptxProfAAMiraje
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/FootingEr. Suman Jyoti
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxMustafa Ahmed
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxhublikarsn
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...archanaece3
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesChandrakantDivate1
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2ChandrakantDivate1
 

Recently uploaded (20)

PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
Call for Papers - Journal of Electrical Systems (JES), E-ISSN: 1112-5209, ind...
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...
Lect.1: Getting Started (CS771: Machine Learning by Prof. Purushottam Kar, II...
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Overview of Transformation in Computer Graphics
Overview of Transformation in Computer GraphicsOverview of Transformation in Computer Graphics
Overview of Transformation in Computer Graphics
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Dr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptxDr Mrs A A Miraje C Programming PPT.pptx
Dr Mrs A A Miraje C Programming PPT.pptx
 
Presentation on Slab, Beam, Column, and Foundation/Footing
Presentation on Slab,  Beam, Column, and Foundation/FootingPresentation on Slab,  Beam, Column, and Foundation/Footing
Presentation on Slab, Beam, Column, and Foundation/Footing
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2Fundamentals of Internet of Things (IoT) Part-2
Fundamentals of Internet of Things (IoT) Part-2
 

Abhaycavirtual memory and the pagehit.pptx

  • 1. By Abhay , Osho Akarsh , Adarsh Abdullah , Nitin
  • 2.
  • 3.  Virtual memory as an alternate set of memory addresses.  Programs use these virtual addresses rather than real addresses to store instructions and data.  When the program is actually executed, the virtual addresses are converted into real memory addresses.
  • 4.  Virtual memory was developed in approximately 1959 – 1962, at the University of Manchester for theAtlas Computer, completed in 1962.  In 1961, Burroughs released the B5000, the first commercial computer with virtual memory.
  • 5.  Before the development of the virtual memory technique, programmers in the 1940s and 1950s had to manage directly two-level storage such as main memory or ram and secondary memory in the form of hard disks or earlier, magnetic drums.  Enlarge the address space, the set of addresses a program can utilize.  Virtual memory might contain twice as many addresses as main memory.
  • 6.  When a computer is executing many programs at the same time,Virtual memory make the computer to share memory efficiently.  Eliminate a restriction that a computer works in memory which is small and be limited.  When many programs is running at the same time, by distributing each suitable memory area to each program,VM protect programs to interfere each other in each memory area.
  • 7.  To facilitate copying virtual memory into real memory, the operating system divides virtual memory into pages, each of which contains a fixed number of addresses.  Each page is stored on a disk until it is needed.  When the page is needed, the operating system copies it from disk to main memory, translating the virtual addresses into real addresses.
  • 8.
  • 9. • Since the number of pages is very high, the page table capacity is too large to fit on chip • A translation lookaside buffer (TLB) caches the virtual to physical page number translation for recent accesses • ATLB miss requires us to access the page table, which may not even be found in the cache – two expensive memory look-ups to access one word of data! • A large page size can increase the coverage of theTLB and reduce the capacity of the page table, but also increases memory wastage
  • 10.  The hardware base that makes a virtual memory system possible.  Allows software to reference physical memory by virtual addresses, quite often more than one.  It accomplishes this through the use of page and page tables.  Use a section of memory to translate virtual addresses into physical addresses via a series of table lookups.  The software that handles the page fault is generally part of an operating system and the hardware that detects this situation is the MMU
  • 11.  Paging: - Fixed-size blocks  Segmentation:-Variable size blocks
  • 12.  Segmentation involves the relocation of variable sized segments into the physical address space.  Generally these segments are contiguous units, and are referred to in programs by their segment number and an offset to the requested data.  Efficient segmentation relies on programs that are very thoughtfully written for their target system.  Since segmentation relies on memory that is located in single large blocks, it is very possible that enough free space is available to load a new module, but can not be utilized.  Segmentation may also suffer from internal fragmentation if segments are not variable-sized, where memory above the segment is not used by the program but is still “reserved” for it.
  • 13.  A technique used by virtual memory operating systems to help ensure that the data you need is available as quickly as possible.  Paging systems use fixed-length blocks called pages and assign them to fixed regions of physical memory called page frames.  A valid page is one that currently resides in main memory. An invalid page is one that currently resides in secondary memory.  When a program needs a page that is not in primary memory, the operating system copies the required page into primary memory and copies another page back to the disk.
  • 14.  Paging provides a somewhat easier interface for programs, in that its operation tends to be more automatic and thus transparent.  Instead of utilizing a segment addressing approach, as seen in segmentation, paging uses a linear sequence of virtual addresses which are mapped to physical memory as necessary.  Due to this addressing approach, a single program may refer to series of many non-contiguous segments.  Although some internal fragmentation may still exist due to the fixed size of the pages, the approach virtually eliminates external fragmentation.
  • 15.  Page size is an important factor that determines the efficiency of the overall system.  Large page size would be appropriate if the probablity of memory location being reffered decreases with increasing distance from location adressed  If a page size is very large,much of the information being moved may not be required in the main memory.  If the page size is too small,the number of page transfer increases needlessly,size of page availability table also increases  Proper page size is n = Tas/Tap  Before page of 64 to 128 words seemed appropriate but recent times pages of 4K have become common
  • 16. An interrupt to the software raised by the hardware when a program accesses a page that is not mapped in physical memory. when a program accesses a memory location in its memory and the page corresponding to that memory is not loaded when a program accesses a memory location in its memory and the program does not have privileges to access the page corresponding to that memory.
  • 17. Demand paging follows that pages should only be brought into memory if the executing process demands them. This is referred to as lazy evaluation as only those pages demanded by the process are swapped from secondary storage to main memory. Attempt to access page. If page is valid (in memory) then continue processing instruction as normal. If page is invalid then a page-fault trap occurs. Check if the memory reference is a valid reference to a location on secondary memory. If not, the process is terminated. Schedule disk operation to read the desired page into main memory. Restart the instruction that was interrupted by the operating system trap
  • 18. OPT(MIN) : eliminate the page that be not expected to be used. FIFO(first input/first output) : rather than choosing the victim page at random, the oldest page is the first to be removed. LRU(Least Recently used) : move out the page that is the least rarely used. LFU(Least Frequently used) : move out the page that is not used often in the past.
  • 19. FIFO  FIFO(first in first out) :With FIFO, the oldest page in memory is selected for replacement Example: 2 3 2 1 5 2 4 5 3 2 5 2 2 2 *2 2 5 5 5 *5 3 3 3 3 3 3 3 3 2 2 2 2 *2 5 5 1 1 1 4 4 4 4 4 2
  • 20. LRU: (least recently used)  LRU Policy- a policy that selects the page that has gone unused for the longest period of time. 2 3 2 1 5 2 4 5 3 2 5 2 2 3 *2 1 5 *2 4 *5 3 2 *5 *2 2 3 2 1 5 2 4 5 3 2 5 3 2 1 5 2 4 5 3 3
  • 21. Examples of OPT :  2 3 2 1 5 2 4 5 3 2 5 2 2 2 *2 2 2 *2 4 4 4 2 2 *2 3 3 3 3 3 3 3 *3 3 3 3 1 5 5 5 *5 5 5 *5 5
  • 22.  Main memory is used more efficiently  Programs that are bigger than  Main memory can still be executed Disadvantages  Applications run slower  It takes more time to switch between applications  Less hard drive space for your use
  • 23.  Virtual memory is a common part of most operating systems on computers.  It has become so common because it provides a big benefit for users at a very low cost.  benefits of executing a program that is only partially in memory.  program is no longer constrained by the amount of physical memory.  ⇒ user would be able to write programs for an extremely large virtual address space.  more programs could be run at the same time ⇒ increase CPU utilization and throughput.  less I/O would be needed to load or swap each user program ⇒ run faster