SlideShare a Scribd company logo
1 of 23
VIRTUAL MEMORY
PRESENTED BY:
APARNA C BHADRAN
PGCS S1 1
INTRODUCTION
• Multiple processors will be having its own
address space.
• It will be expensive to allocate a memory with
full address space to each processors.
2
• Virtual memory:
– Divide physical memory to block
– Allocate them to different processors.
• Protection Scheme:
– To restrict a process to the block belonging only to
that process.
• Virtual memory reduce the time to start a
program
– All code and data does not need to be in physical
memory.
3
• If a program becomes too large .
– It was the programer job to fit it.
– Virtual memory was invented to relieve
programmer from this burden.
• Virtual memory supports relocation
mechanism.
– Allows same program to run in any location in
physical memory.
4
5
• Page and segment-block
• Page fault and address fault-miss
• Memory mapping(Address translation)
– Processors produce virtual address
– Virtual address is translated to physical address
which access main memory.
6
Difference between cache and VM
• Replacement of cache miss is controlled by
hardware.
VM replacement is controlled by OS.
• The size of processor address determines size
of VM
Cache Size is independent of processor
address.
7
• VM system can be categorized into 2:
– Pages:with fixed size block.
– Segments:with variable size block.
8
9
PAGED ADDRESSING
• Single fixed size address
• Divided into page number and
• offset within page.
SEGMENTED ADDRESSING
• Variable size required.
• 1 word for segment number
• 1 word for offset within a segment.
• Total 2 word.
10
DIFFERENCE BETWEEN PAGE AND
SEGMENT
11
• Because of replacement problem few
computers use pure segmentation.
• Hybrid approach:
– Called as paged segment.
– Segment will be internal number of page.
– Memory need not be contiguous
– full segment need not be in memory.
12
PAGE TABLE
• Paging and segmentation rely on data
structure.
• Indexed by page or segment number.
• Data structure contains physical address of
block.
• Segmentation:
– Offset is added to the segments physical address
to obtain final physical address.
13
• Paging:
– The offset is simply concatenated to physical page
address.
14
Indexed by virtual page number.
Size of the table =no.of pages in virtual address space.
15
REPLACEMENT ON VIRTUAL MEMORY
MISS
• LRU scheme is used for replacement.
• Processors will have a use bit or reference bit.
• The bit will set when the page is accessed.
16
Techniques for fast address translation
• Paging:
– Memory access to obtain physical address
– Access to get data.
• Can keep address translation in separate
cache to reduce the second access to data.
• Special address translation cache is called
Translation Lookaside Buffer(TLB)or
Translation Buffer(TB).
17
TLB
• Like cache entry.
• Tag holds portion of virtual address.
• Data portion holds:
– physical page frame number
– Protection field
– Valid bit
– Use and dirty bit.
18
19
• Step 1 and 2:
– Translation begins by sending virtual address to all
tags.
– The tag must be marked valid to allow match.
• Step 3:
– The matching tag sends the corresponding physical
address through a 40:1 multiplexer.
• Step 4:
– The page offset is combined with physical page frame
to form full address.
20
SELECTING A PAGE SIZE
• LARGE PAGE SIZE:
1)The size of the page table is inversely proportional to
the page size.
So memory can be saved by making the pages bigger.
2) larger page size can allow larger caches with fast cache
hit times.
3)Transferring larger pages to or from secondary storage,
possibly over a network, is more efficient than
transferring smaller pages.
4) The number of TLB entries is restricted, so a larger
page size means that more memory can be mapped
efficiently, thereby reducing the number of TLB misses.
21
• SMALL PAGE SIZE:
1)Conserving storage:
• A small page size will result in less wasted
storage
• Avoids internal fragmentation
2)Many process are small so large page size will
increase the time to invoke process.
22
THANK YOU
23

More Related Content

What's hot

Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithmsPiyush Rochwani
 
41 page replacement fifo
41 page replacement fifo41 page replacement fifo
41 page replacement fifomyrajendra
 
Database , 6 Query Introduction
Database , 6 Query Introduction Database , 6 Query Introduction
Database , 6 Query Introduction Ali Usman
 
Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...MdAlAmin187
 
42 lru optimal
42 lru optimal42 lru optimal
42 lru optimalmyrajendra
 
Virtual Memory in Windows
Virtual Memory in Windows Virtual Memory in Windows
Virtual Memory in Windows HanzlaRafique
 

What's hot (9)

Tlb
TlbTlb
Tlb
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
41 page replacement fifo
41 page replacement fifo41 page replacement fifo
41 page replacement fifo
 
Database , 6 Query Introduction
Database , 6 Query Introduction Database , 6 Query Introduction
Database , 6 Query Introduction
 
Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...Chosse a best algorithm for page replacement to reduce page fault and analysi...
Chosse a best algorithm for page replacement to reduce page fault and analysi...
 
42 lru optimal
42 lru optimal42 lru optimal
42 lru optimal
 
Virtual Memory in Windows
Virtual Memory in Windows Virtual Memory in Windows
Virtual Memory in Windows
 
M batching
M batchingM batching
M batching
 

Viewers also liked

basics of virtual memory
basics of virtual memorybasics of virtual memory
basics of virtual memoryAdarsh Patel
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual MemoryArchith777
 
Operating Systems - Virtual Memory
Operating Systems - Virtual MemoryOperating Systems - Virtual Memory
Operating Systems - Virtual MemoryEmery Berger
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryWayne Jones Jnr
 
Operating Systems: Virtual Memory
Operating Systems: Virtual MemoryOperating Systems: Virtual Memory
Operating Systems: Virtual MemoryDamian T. Gordon
 
Virtual memory
Virtual memoryVirtual memory
Virtual memoryAnuj Modi
 
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...ITM University
 
Ch10: Virtual Memory
Ch10: Virtual MemoryCh10: Virtual Memory
Ch10: Virtual MemoryAhmar Hashmi
 
Virtual Memory (Making a Process)
Virtual Memory (Making a Process)Virtual Memory (Making a Process)
Virtual Memory (Making a Process)David Evans
 
15. Computer Systems Basic Software 1
15. Computer Systems   Basic Software 115. Computer Systems   Basic Software 1
15. Computer Systems Basic Software 1New Era University
 
Design and development of autotransformer motor starter for induced draft fan...
Design and development of autotransformer motor starter for induced draft fan...Design and development of autotransformer motor starter for induced draft fan...
Design and development of autotransformer motor starter for induced draft fan...Alexander Decker
 

Viewers also liked (20)

VIRTUAL MEMORY
VIRTUAL MEMORYVIRTUAL MEMORY
VIRTUAL MEMORY
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
basics of virtual memory
basics of virtual memorybasics of virtual memory
basics of virtual memory
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Operating Systems - Virtual Memory
Operating Systems - Virtual MemoryOperating Systems - Virtual Memory
Operating Systems - Virtual Memory
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
 
Operating Systems: Virtual Memory
Operating Systems: Virtual MemoryOperating Systems: Virtual Memory
Operating Systems: Virtual Memory
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
Virtual Memory ,Direct memory addressing and indirect memory addressing prese...
 
Virtual memory 20070222-en
Virtual memory 20070222-enVirtual memory 20070222-en
Virtual memory 20070222-en
 
Ch09
Ch09Ch09
Ch09
 
Ch10: Virtual Memory
Ch10: Virtual MemoryCh10: Virtual Memory
Ch10: Virtual Memory
 
virtual memory
virtual memoryvirtual memory
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
 
15. Computer Systems Basic Software 1
15. Computer Systems   Basic Software 115. Computer Systems   Basic Software 1
15. Computer Systems Basic Software 1
 
Design and development of autotransformer motor starter for induced draft fan...
Design and development of autotransformer motor starter for induced draft fan...Design and development of autotransformer motor starter for induced draft fan...
Design and development of autotransformer motor starter for induced draft fan...
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 

Similar to Vm

Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdfHarika Pudugosula
 
PAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxPAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxImranBhatti58
 
The life and times
The life and timesThe life and times
The life and timesAbeer Naskar
 
Segmentation with paging methods and techniques
Segmentation with paging methods and techniquesSegmentation with paging methods and techniques
Segmentation with paging methods and techniquesnikhilrana24112003
 
Introduction to memory management
Introduction to memory managementIntroduction to memory management
Introduction to memory managementSweety Singhal
 
CSI-503 - 8.Paging and Segmentation
CSI-503 - 8.Paging and SegmentationCSI-503 - 8.Paging and Segmentation
CSI-503 - 8.Paging and Segmentationghayour abbas
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memoryMazin Alwaaly
 
Memory Management-Muhammad Ahmad.ppt
Memory Management-Muhammad Ahmad.pptMemory Management-Muhammad Ahmad.ppt
Memory Management-Muhammad Ahmad.pptAliyanAbbas1
 
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page tableduvvuru madhuri
 
Memory management in sql server
Memory management in sql serverMemory management in sql server
Memory management in sql serverPrashant Kumar
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and Segmentationsathish sak
 

Similar to Vm (20)

Os4
Os4Os4
Os4
 
Os4
Os4Os4
Os4
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
 
PAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docxPAGIN AND SEGMENTATION.docx
PAGIN AND SEGMENTATION.docx
 
Segmentation and paging
Segmentation and paging Segmentation and paging
Segmentation and paging
 
The life and times
The life and timesThe life and times
The life and times
 
Segmentation with paging methods and techniques
Segmentation with paging methods and techniquesSegmentation with paging methods and techniques
Segmentation with paging methods and techniques
 
Auxiliary, Cache and Virtual memory.pptx
Auxiliary, Cache and Virtual memory.pptxAuxiliary, Cache and Virtual memory.pptx
Auxiliary, Cache and Virtual memory.pptx
 
Ppt
PptPpt
Ppt
 
Introduction to memory management
Introduction to memory managementIntroduction to memory management
Introduction to memory management
 
CSI-503 - 8.Paging and Segmentation
CSI-503 - 8.Paging and SegmentationCSI-503 - 8.Paging and Segmentation
CSI-503 - 8.Paging and Segmentation
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
Memory Management-Muhammad Ahmad.ppt
Memory Management-Muhammad Ahmad.pptMemory Management-Muhammad Ahmad.ppt
Memory Management-Muhammad Ahmad.ppt
 
cache memory management
cache memory managementcache memory management
cache memory management
 
Chapter07_ds.ppt
Chapter07_ds.pptChapter07_ds.ppt
Chapter07_ds.ppt
 
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page table
 
Memory management in sql server
Memory management in sql serverMemory management in sql server
Memory management in sql server
 
Memory management
Memory managementMemory management
Memory management
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
Paging and Segmentation
Paging and SegmentationPaging and Segmentation
Paging and Segmentation
 

Recently uploaded

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 

Recently uploaded (20)

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 

Vm

  • 2. INTRODUCTION • Multiple processors will be having its own address space. • It will be expensive to allocate a memory with full address space to each processors. 2
  • 3. • Virtual memory: – Divide physical memory to block – Allocate them to different processors. • Protection Scheme: – To restrict a process to the block belonging only to that process. • Virtual memory reduce the time to start a program – All code and data does not need to be in physical memory. 3
  • 4. • If a program becomes too large . – It was the programer job to fit it. – Virtual memory was invented to relieve programmer from this burden. • Virtual memory supports relocation mechanism. – Allows same program to run in any location in physical memory. 4
  • 5. 5
  • 6. • Page and segment-block • Page fault and address fault-miss • Memory mapping(Address translation) – Processors produce virtual address – Virtual address is translated to physical address which access main memory. 6
  • 7. Difference between cache and VM • Replacement of cache miss is controlled by hardware. VM replacement is controlled by OS. • The size of processor address determines size of VM Cache Size is independent of processor address. 7
  • 8. • VM system can be categorized into 2: – Pages:with fixed size block. – Segments:with variable size block. 8
  • 9. 9
  • 10. PAGED ADDRESSING • Single fixed size address • Divided into page number and • offset within page. SEGMENTED ADDRESSING • Variable size required. • 1 word for segment number • 1 word for offset within a segment. • Total 2 word. 10
  • 11. DIFFERENCE BETWEEN PAGE AND SEGMENT 11
  • 12. • Because of replacement problem few computers use pure segmentation. • Hybrid approach: – Called as paged segment. – Segment will be internal number of page. – Memory need not be contiguous – full segment need not be in memory. 12
  • 13. PAGE TABLE • Paging and segmentation rely on data structure. • Indexed by page or segment number. • Data structure contains physical address of block. • Segmentation: – Offset is added to the segments physical address to obtain final physical address. 13
  • 14. • Paging: – The offset is simply concatenated to physical page address. 14
  • 15. Indexed by virtual page number. Size of the table =no.of pages in virtual address space. 15
  • 16. REPLACEMENT ON VIRTUAL MEMORY MISS • LRU scheme is used for replacement. • Processors will have a use bit or reference bit. • The bit will set when the page is accessed. 16
  • 17. Techniques for fast address translation • Paging: – Memory access to obtain physical address – Access to get data. • Can keep address translation in separate cache to reduce the second access to data. • Special address translation cache is called Translation Lookaside Buffer(TLB)or Translation Buffer(TB). 17
  • 18. TLB • Like cache entry. • Tag holds portion of virtual address. • Data portion holds: – physical page frame number – Protection field – Valid bit – Use and dirty bit. 18
  • 19. 19
  • 20. • Step 1 and 2: – Translation begins by sending virtual address to all tags. – The tag must be marked valid to allow match. • Step 3: – The matching tag sends the corresponding physical address through a 40:1 multiplexer. • Step 4: – The page offset is combined with physical page frame to form full address. 20
  • 21. SELECTING A PAGE SIZE • LARGE PAGE SIZE: 1)The size of the page table is inversely proportional to the page size. So memory can be saved by making the pages bigger. 2) larger page size can allow larger caches with fast cache hit times. 3)Transferring larger pages to or from secondary storage, possibly over a network, is more efficient than transferring smaller pages. 4) The number of TLB entries is restricted, so a larger page size means that more memory can be mapped efficiently, thereby reducing the number of TLB misses. 21
  • 22. • SMALL PAGE SIZE: 1)Conserving storage: • A small page size will result in less wasted storage • Avoids internal fragmentation 2)Many process are small so large page size will increase the time to invoke process. 22