Submit Search
Upload
Virtual Memory sjkdhikejv vsdkjnksnv vkjhfvk
•
Download as PPT, PDF
•
0 likes
•
2 views
H
HKShab
Follow
uwehidfshc9woefji9
Read less
Read more
Education
Report
Share
Report
Share
1 of 22
Download now
Recommended
Demand paging
Demand paging
Trinity Dwarka
Virtual memory and page replacement algorithm
Virtual memory and page replacement algorithm
Muhammad Mansoor Ul Haq
Virtual Memory.pdf
Virtual Memory.pdf
SujanTimalsina5
O ssvv82014
O ssvv82014
Shivashekharayya Viraktamath
Operating system 38 page replacement
Operating system 38 page replacement
Vaibhav Khanna
Unit 2chapter 2 memory mgmt complete
Unit 2chapter 2 memory mgmt complete
Kalai Selvi
OS Presentation 2023.pptx
OS Presentation 2023.pptx
ShayanAli68
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memory
ghayour abbas
Recommended
Demand paging
Demand paging
Trinity Dwarka
Virtual memory and page replacement algorithm
Virtual memory and page replacement algorithm
Muhammad Mansoor Ul Haq
Virtual Memory.pdf
Virtual Memory.pdf
SujanTimalsina5
O ssvv82014
O ssvv82014
Shivashekharayya Viraktamath
Operating system 38 page replacement
Operating system 38 page replacement
Vaibhav Khanna
Unit 2chapter 2 memory mgmt complete
Unit 2chapter 2 memory mgmt complete
Kalai Selvi
OS Presentation 2023.pptx
OS Presentation 2023.pptx
ShayanAli68
CSI-503 - 9. Virtual Memory
CSI-503 - 9. Virtual Memory
ghayour abbas
08 virtual memory
08 virtual memory
Kamal Singh
Virtual memory
Virtual memory
Shashank Shetty
virtual memory
virtual memory
surbhisinghal90
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptx
Amanuelmergia
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdf
Harika Pudugosula
Operating system 37 demand paging
Operating system 37 demand paging
Vaibhav Khanna
Virtual Memory in Windows
Virtual Memory in Windows
HanzlaRafique
Comparision of page replacement algorithms.pptx
Comparision of page replacement algorithms.pptx
SureshD94
Mem mgt
Mem mgt
Dr. Jasmine Beulah Gnanadurai
Virtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdf
Harika Pudugosula
Computer architecture virtual memory
Computer architecture virtual memory
Mazin Alwaaly
Improving page migration분산처리
Improving page migration분산처리
Park Chunduck
virtual memory Operating system
virtual memory Operating system
Shaheen kousar
Memory Management
Memory Management
lavanya marichamy
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptx
Amanuelmergia
07-MemoryManagement.ppt
07-MemoryManagement.ppt
hello509579
Virtual memory managment
Virtual memory managment
Santu Kumar
Virtual memory This is the operating system ppt.ppt
Virtual memory This is the operating system ppt.ppt
ry54321288
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
LeahRachael
Os unit 3
Os unit 3
SandhyaTatekalva
Unit-1 part 2.pptx
Unit-1 part 2.pptx
HKShab
Multithreadingppt.pptx
Multithreadingppt.pptx
HKShab
More Related Content
Similar to Virtual Memory sjkdhikejv vsdkjnksnv vkjhfvk
08 virtual memory
08 virtual memory
Kamal Singh
Virtual memory
Virtual memory
Shashank Shetty
virtual memory
virtual memory
surbhisinghal90
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptx
Amanuelmergia
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdf
Harika Pudugosula
Operating system 37 demand paging
Operating system 37 demand paging
Vaibhav Khanna
Virtual Memory in Windows
Virtual Memory in Windows
HanzlaRafique
Comparision of page replacement algorithms.pptx
Comparision of page replacement algorithms.pptx
SureshD94
Mem mgt
Mem mgt
Dr. Jasmine Beulah Gnanadurai
Virtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdf
Harika Pudugosula
Computer architecture virtual memory
Computer architecture virtual memory
Mazin Alwaaly
Improving page migration분산처리
Improving page migration분산처리
Park Chunduck
virtual memory Operating system
virtual memory Operating system
Shaheen kousar
Memory Management
Memory Management
lavanya marichamy
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptx
Amanuelmergia
07-MemoryManagement.ppt
07-MemoryManagement.ppt
hello509579
Virtual memory managment
Virtual memory managment
Santu Kumar
Virtual memory This is the operating system ppt.ppt
Virtual memory This is the operating system ppt.ppt
ry54321288
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
LeahRachael
Os unit 3
Os unit 3
SandhyaTatekalva
Similar to Virtual Memory sjkdhikejv vsdkjnksnv vkjhfvk
(20)
08 virtual memory
08 virtual memory
Virtual memory
Virtual memory
virtual memory
virtual memory
Lecture 8- Virtual Memory Final.pptx
Lecture 8- Virtual Memory Final.pptx
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdf
Operating system 37 demand paging
Operating system 37 demand paging
Virtual Memory in Windows
Virtual Memory in Windows
Comparision of page replacement algorithms.pptx
Comparision of page replacement algorithms.pptx
Mem mgt
Mem mgt
Virtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdf
Computer architecture virtual memory
Computer architecture virtual memory
Improving page migration분산처리
Improving page migration분산처리
virtual memory Operating system
virtual memory Operating system
Memory Management
Memory Management
Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptx
07-MemoryManagement.ppt
07-MemoryManagement.ppt
Virtual memory managment
Virtual memory managment
Virtual memory This is the operating system ppt.ppt
Virtual memory This is the operating system ppt.ppt
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
Os unit 3
Os unit 3
More from HKShab
Unit-1 part 2.pptx
Unit-1 part 2.pptx
HKShab
Multithreadingppt.pptx
Multithreadingppt.pptx
HKShab
Pharmacymanagement- Harish(221348092).pptx
Pharmacymanagement- Harish(221348092).pptx
HKShab
assamppt-161024172823.pptx
assamppt-161024172823.pptx
HKShab
1's and 2's complement.pptx
1's and 2's complement.pptx
HKShab
1sand2scomplement.pptx
1sand2scomplement.pptx
HKShab
hp.pptx
hp.pptx
HKShab
Ankit (221348051) BCA-Aiml.pptx
Ankit (221348051) BCA-Aiml.pptx
HKShab
Ram Singh (221348062) - Cloud Computing.pptx
Ram Singh (221348062) - Cloud Computing.pptx
HKShab
Sahil Presentation1.pptx
Sahil Presentation1.pptx
HKShab
More from HKShab
(10)
Unit-1 part 2.pptx
Unit-1 part 2.pptx
Multithreadingppt.pptx
Multithreadingppt.pptx
Pharmacymanagement- Harish(221348092).pptx
Pharmacymanagement- Harish(221348092).pptx
assamppt-161024172823.pptx
assamppt-161024172823.pptx
1's and 2's complement.pptx
1's and 2's complement.pptx
1sand2scomplement.pptx
1sand2scomplement.pptx
hp.pptx
hp.pptx
Ankit (221348051) BCA-Aiml.pptx
Ankit (221348051) BCA-Aiml.pptx
Ram Singh (221348062) - Cloud Computing.pptx
Ram Singh (221348062) - Cloud Computing.pptx
Sahil Presentation1.pptx
Sahil Presentation1.pptx
Recently uploaded
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
Celine George
microwave assisted reaction. General introduction
microwave assisted reaction. General introduction
Maksud Ahmed
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
JhengPantaleon
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
UnboundStockton
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
FatimaKhan178732
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
ssuser54595a
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
eniolaolutunde
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Sarwono Sutikno, Dr.Eng.,CISA,CISSP,CISM,CSX-F
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
pboyjonauth
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
EduSkills OECD
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
JemimahLaneBuaron
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
InMediaRes1
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
pboyjonauth
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
David Douglas School District
mini mental status format.docx
mini mental status format.docx
PoojaSen20
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
dawncurless
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology ( Production , Purification , and Application )
Sakshi Ghasle
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
sanyamsingh5019
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
anshu789521
Recently uploaded
(20)
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
microwave assisted reaction. General introduction
microwave assisted reaction. General introduction
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
mini mental status format.docx
mini mental status format.docx
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology ( Production , Purification , and Application )
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
Virtual Memory sjkdhikejv vsdkjnksnv vkjhfvk
1.
© Oxford University
Press 2014. All rights reserved. Virtual Memory
2.
© Oxford University
Press 2014. All rights reserved. Objectives • Need of Virtual Memory • Virtual addresses and virtual address space • Implementation of VM system through demand loading • Demand paging • Page replacement algorithms • Thrashing and its solutions
3.
© Oxford University
Press 2014. All rights reserved. Virtual Memory • Virtual memory may be realized with paging or segmentation as it requires a non-contiguous memory allocation method. • All the basics related to these concepts apply here also in VM system. • The logical address here is known as virtual address and the logical address space is called as virtual address space.
4.
© Oxford University
Press 2014. All rights reserved. Why Virtual Memory •Code needs to be in memory to execute, but entire program rarely used Error code, unusual routines, large data structures •Entire program code not needed at same time •Consider ability to execute partially-loaded program Program no longer constrained by limits of physical memory Each program takes less memory while running -> more programs run at the same time Increased CPU utilization and throughput with no increase in response time or turnaround time Less I/O needed to load or swap programs into memory -> each user program runs faster •
5.
© Oxford University
Press 2014. All rights reserved. Virtual Memory Virtual memory – separation of user logical memory from physical memory •Only part of the program needs to be in memory for execution •Logical address space can therefore be much larger than physical address space •Allows address spaces to be shared by several processes •Allows for more efficient process creation •More programs running concurrently •Less I/O needed to load or swap processes
6.
© Oxford University
Press 2014. All rights reserved. Virtual Memory • Virtual memory can be implemented via: Demand paging Demand segmentation • The address translation using paging and segmentation are applied in the same way as discussed in the last chapter. • The only difference of applying paging and segmentation in relation to virtual memory is that there is no need to load the whole process in the form of pages or segments in the main memory. • VM system requires only those pages or segments of a process in the memory which are needed at a certain time of execution.
7.
© Oxford University
Press 2014. All rights reserved. Demand loading
8.
© Oxford University
Press 2014. All rights reserved. Demand paging Demand paging is to load only those pages in the memory that are needed at an instant of time of execution. •Could bring entire process into memory at load time Or bring a page into memory only when it is needed •Less I/O needed, no unnecessary I/O •Less memory needed •Faster response •More users •Similar to paging system with swapping •Page is needed reference/logical address to it •invalid reference abort •not-in-memory bring to memory •Lazy swapper – never swaps a page into memory unless page will be needed •Swapper that deals with pages is a pager
9.
© Oxford University
Press 2014. All rights reserved. Demand paging
10.
© Oxford University
Press 2014. All rights reserved. Valid-Invalid Bit • With each page table entry a valid–invalid bit is associated (v in-memory – memory resident, i not- in-memory) • Initially valid–invalid bit is set to i on all entries • Example of a page table snapshot: During MMU address translation, if valid– invalid bit in page table entry is i page fault
11.
© Oxford University
Press 2013. All rights reserved. Page Table When Some Pages Are Not in Main Memory
12.
© Oxford University
Press 2014. All rights reserved. Page and Frame Replacement Algorithms • Frame-allocation algorithm determines – How many frames to give each process – Which frames to replace • Page-replacement algorithm – Want lowest page-fault rate on both first access and re-access • Evaluate algorithm by running it on a particular string of memory references (reference string) and computing the number of page faults on that string – String is just page numbers, not full addresses – Repeated access to the same page does not cause a page fault – Results depend on number of frames available • In all our examples, the reference string of referenced page numbers is 7,0,1,2,0,3,0,4,2,3,0,3,0,3,2,1,2,0,1,7,0,1
13.
© Oxford University
Press 2014. All rights reserved. Page replacement algorithms •A page fault occurs when a page is not found in the memory, and needs to be loaded from the disk. •If a page fault occurs and all memory frames have been already allocated, then replacement of a page in memory is required on the request of a new page. This is referred to as demand-paging. •The choice of which page to replace is specified by a page replacement algorithms. The commonly used page replacement algorithms are FIFO, LRU, optimal page replacement algorithms etc.
14.
© Oxford University
Press 2014. All rights reserved. Page replacement algorithms The strategy to choose a best page to be replaced in the memory is called a page replacement algorithm. FIFO page replacement algorithm A page to be replaced is chosen such that it is the oldest one among the all pages in the memory. Optimal page replacement algorithm A page will be replaced that will not be referenced for the longest time.
15.
© Oxford University
Press 2014. All rights reserved. First-In-First-Out (FIFO) Algorithm • Reference string: 7,0,1,2,0,3,0,4,2,3,0,3,0,3,2,1,2,0,1,7,0,1 • 3 frames (3 pages can be in memory at a time per process) • Can vary by reference string: consider 1,2,3,4,1,2,5,1,2,3,4,5 – Adding more frames can cause more page faults! • Belady’s Anomaly 15 page faults
16.
© Oxford University
Press 2014. All rights reserved. Belody Anamoly • Generally, on increasing the number of frames to a process’ virtual memory, its execution becomes faster as less number of page faults occur. Sometimes the reverse happens, i.e. more number of page faults occur when more frames are allocated to a process. This most unexpected result is termed as Belady’s Anomaly. • Bélády’s anomaly is the name given to the phenomenon where increasing the number of page frames results in an increase in the number of page faults for a given memory access pattern.
17.
© Oxford University
Press 2014. All rights reserved. Optimal Page Replacement Algorithm • Replace page that will not be used for longest period of time (Page that is referred in last in reference string is replaced first) • How do you know this? – Can’t read the future • Used for measuring how well your algorithm performs
18.
© Oxford University
Press 2014. All rights reserved. Page replacement algorithms Least Recently Used (LRU) page replacement algorithm Replace a page which will not be referenced for a longest time in the future. •Use past knowledge rather than future •Replace page that has not been used in the most amount of time •Associate time of last use with each page •
19.
© Oxford University
Press 2014. All rights reserved. Least Recently Used (LRU) Algorithm •12 faults – better than FIFO but worse than OPT •Generally good algorithm and frequently used
20.
© Oxford University
Press 2014. All rights reserved. Global vs. Local Allocation • Global replacement – process selects a replacement frame from the set of all frames; one process can take a frame from another – But then process execution time can vary greatly – But greater throughput so more common • Local replacement – each process selects from only its own set of allocated frames – More consistent per-process performance – But possibly underutilized memory
21.
© Oxford University
Press 2014. All rights reserved. Thrashing The high paging activity is known as thrashing. A process is said to be thrashing if most of the time is being consumed in paging rather than its actual execution. If a process does not have “enough” pages, the page-fault rate is very high Page fault to get page Replace existing frame But quickly need replaced frame back This leads to: Low CPU utilization Operating system thinking that it needs to increase the degree of multiprogramming Another process added to the system
22.
© Oxford University
Press 2014. All rights reserved. Thrashing
Download now