SlideShare a Scribd company logo
WWW.EASYDESIGN.COM
DESIGN BY
IMDAD HUSSAIN
Operatin Sysrem COMSATS Sahiwal
Virtual Memory
Alloction of Frames
Trashing
GROUP MEMBERS
IMDAD HUSSAIN SP13-BCS-B-91
KASHIF BILAL SP13-BCS-B-90
MOHSIN SHABIR SP13-BCS-B-88
SUBMITTED TO
Sir.Farhan-u-Allah Khan
Operating System COMSATS Sahiwal
IN THE NAME OF ALLAH WHO IS MOST BEFICIAL AND MOST MERCIFUL
OUTLINES
• VIRTUAL MEMORY
• VITUAL MEMORY CONCEPT
• IMPLEMENTATION OF VIRTUAL MEMORY
• ALLOCATION OF FRAMES
• GLOBAL VERSES LOCAL ALLOCATION
• HOW MAYNY FRAME ASSIGN TO EACH PROCESS
• TRASHING
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.
VITUAL MEMORY CONCEPT
The conceptual
separation of user
logical memory from
physical memory.
Thus we can have
large virtual memory
on a small physical
memory
TRANSFER OF A PAGED MEMORY TO CONTIGUOUS DISK SPACE
IMPLEMENTATION OF VIRTUAL MEMORY
• DEMAND PAGING
WHEN A PAGE IS TOUCHED, BRING IT FROM SECONDARY TO MAIN MEMORY
• DEMAND SEGMENTATION
ALLOCATION OF FRAMES
EACH PROCESS NEEDS MINIMUM NUMBER OF PAGES
• EXAMPLE:IBM 370 - 6 PAGES TO HANDLE ,SS MOVE INSTRUCTION:
• A) INSTRUCTION IS 6 BYTES, MIGHT SPAN 2 PAGES.
• B) 2 PAGES TO HANDLE FROM.
• C) 2 PAGES TO HANDLE TO.
FRAME ALLOCATION
•GLOBAL REPLACEMENT: A PROCESS CAN REPLACE ANY PAGE IN THE MEMORY.
•LOCAL REPLACEMENT: EACH PROCESS CAN REPLACE ONLY FROM ITS OWN RESERVED SET OF
ALLOCATED PAGE FRAMES
EXAMPLE PROPOTIONAL ALLOCATION
CONSIDER A SYSTEM HAVING 64 FRAMES AND THERE ARE 4 PROCESSES WITH THE FOLLOWING VIRTUAL
MEMORY SIZES: V(1) = 16, V(2) = 128, V(3) = 64 AND V(4) = 48.
EQUAL ALLOCATION: ASSUME THAT THERE ARE N FRAMES, AND P PROCESSES, THEN N/P FRAMES ARE
PROPORTIONAL ALLOCATION: V = 16 + 128 + 64 + 48 = 256. IT ALLOCATES:
(16 / 256) * 64 = 4 FRAMES TO PROCESS 1,
(128 / 256) * 64 = 32 FRAMES TO PROCESS 2,
(64 / 256) * 64 = 16 FRAMES TO PROCESS 3,
(48 / 256) * 64 = 12 FRAMES PROCESS 4
ALLOCATION SCHEMES
•FIXED ALLOCATION
•PRIORITY ALLOCATION
HOW FRAME ASSIGN TO EACH PROCESS
•EQUAL ALLOCATION: IF THERE ARE N FRAMES AND P PROCESSES, N/P FRAMES ARE ALLOCATED TO
• EACH PROCESS.
• PROPORTIONAL ALLOCATION: LET THE VIRTUAL MEMORY SIZE FOR PROCESS P BE V(P). LET THERE
• ARE M PROCESSES AND N FRAMES. THEN THE TOTAL VIRTUAL MEMORY SIZEWILL BE: V = ΣV(P).
• ALLOCATE (V(P) /V) * N FRAMES TO PROCESS P.
FIXED ALLOCATION
EQUAL ALLOCATION
• IF 100 FRAMES AND 5 PROCESSES, GIVE EACH PROCESS 20 FRAMES.
PROPORTIONAL ALLOCATION
• ALLOCATE ACCORDING TO THE SIZE OF PROCESS
SI = SIZE OF PROCESS PI
S = S SI
M = TOTAL NUMBER OF FRAMES
AI = ALLOCATION FOR PI =SI/S *M
THRASHING
IF A PROCESS DOES NOT HAVE ‘‘ENOUGH’’ PAGES, THE PAGE-FAULT RATE IS VERY HIGH
• LOW CPU UTILIZATION
• OPERATING SYSTEM THINKS THAT IT NEEDSTO INCREASE THE DEGREE OF MULTIPROGRAMMING
• ANOTHER PROCESS ADDED TO THE SYSTEM.
•THRASHING= A PROCESS IS BUSY SWAPPING PAGES IN AND OUT.
EXAMPLE OF THRASHING
CPU
Utilization
Degree of
Multiprogramming
Trashing
SADVANTAGES
• INCREASES THE DEGREE OF MULTIPROGRAMMING
•
• SYSTEM THROUGHPUT DECREASES
• PAGE FAULT RATE INCREASES
• EFFECTIVE ACCESS TIME INCREASES
SOLUTION
1. WE CAN REDUCE THE EFFECT OF THRASHING BY USING THE LOCAL REPLACEMENT ALGORITHM
2. TO PREVENT THRASHING PROVIDE AS MANY FRAMES AS IT NEEDS
3.TO KNOW THE NUMBER OF FRAMES USE WORKING SET STRATEGY
WHY DOES PAGING WORK?
• LOCALITY MODEL
 PROCESS MIGRATES FROM ONE LOCALITY TO ANOTHER
 LOCALITIES MAY OVERLAP
• WHY DOES THRASHING OCCUR?
 SIZE OF LOCALITY > TOTAL MEMORY SIZE
PRINCIPLE OF LOCALITY
1. ONLY A FEW PIECES OF A PROCESS WILL BE NEEDED OVER A SHORT PERIOD OF TIME
2. POSSIBLE TO MAKE INTELLIGENT GUESSES ABOUT WHICH PIECES WILL BE NEEDED IN THE FUTURE
3.THIS SUGGESTS THAT VIRTUAL MEMORY MAY WORK EFFICIENTLY

More Related Content

Similar to Virtual memory, allocaton of frame & trashing

Computer architecture abhmail
Computer architecture abhmailComputer architecture abhmail
Computer architecture abhmail
Om Prakash
 
Computer architecture
Computer architecture Computer architecture
Computer architecture Ashish Kumar
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43myrajendra
 
Operating System
Operating SystemOperating System
Operating System
Subhasis Dash
 
Inter Process communication and Memory Management
Inter Process communication and Memory ManagementInter Process communication and Memory Management
Inter Process communication and Memory Management
PoonamChawhan1
 
CREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptxCREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptx
Matthew Groves
 
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptxCache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Matthew Groves
 
Aerospike Go Language Client
Aerospike Go Language ClientAerospike Go Language Client
Aerospike Go Language Client
Sayyaparaju Sunil
 
Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022
Matthew Groves
 
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptxParallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Sumalatha A
 
Operating system 36 virtual memory
Operating system 36 virtual memoryOperating system 36 virtual memory
Operating system 36 virtual memory
Vaibhav Khanna
 
7. Memory management in operating system.ppt
7. Memory management in operating system.ppt7. Memory management in operating system.ppt
7. Memory management in operating system.ppt
imrank39199
 
Monomi: Practical Analytical Query Processing over Encrypted Data
Monomi: Practical Analytical Query Processing over Encrypted DataMonomi: Practical Analytical Query Processing over Encrypted Data
Monomi: Practical Analytical Query Processing over Encrypted Data
Mostafa Arjmand
 
Virtual memory and page replacement algorithm
Virtual memory and page replacement algorithmVirtual memory and page replacement algorithm
Virtual memory and page replacement algorithm
Muhammad Mansoor Ul Haq
 
Memory Management in Operating Systems for all
Memory Management in Operating Systems for allMemory Management in Operating Systems for all
Memory Management in Operating Systems for all
VSKAMCSPSGCT
 
Chap2 slides
Chap2 slidesChap2 slides
Chap2 slides
BaliThorat1
 
Scalable Whole-Exome Sequence Data Processing Using Workflow On A Cloud
Scalable Whole-Exome Sequence Data Processing Using Workflow On A CloudScalable Whole-Exome Sequence Data Processing Using Workflow On A Cloud
Scalable Whole-Exome Sequence Data Processing Using Workflow On A Cloud
Paolo Missier
 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Management
donny101
 
Limitations of memory system performance
Limitations of memory system performanceLimitations of memory system performance
Limitations of memory system performance
Syed Zaid Irshad
 
Managing Memory Allocation
Managing Memory AllocationManaging Memory Allocation
Managing Memory Allocation
Meghaj Mallick
 

Similar to Virtual memory, allocaton of frame & trashing (20)

Computer architecture abhmail
Computer architecture abhmailComputer architecture abhmail
Computer architecture abhmail
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
 
Operating System
Operating SystemOperating System
Operating System
 
Inter Process communication and Memory Management
Inter Process communication and Memory ManagementInter Process communication and Memory Management
Inter Process communication and Memory Management
 
CREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptxCREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptx
 
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptxCache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptx
 
Aerospike Go Language Client
Aerospike Go Language ClientAerospike Go Language Client
Aerospike Go Language Client
 
Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022
 
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptxParallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
 
Operating system 36 virtual memory
Operating system 36 virtual memoryOperating system 36 virtual memory
Operating system 36 virtual memory
 
7. Memory management in operating system.ppt
7. Memory management in operating system.ppt7. Memory management in operating system.ppt
7. Memory management in operating system.ppt
 
Monomi: Practical Analytical Query Processing over Encrypted Data
Monomi: Practical Analytical Query Processing over Encrypted DataMonomi: Practical Analytical Query Processing over Encrypted Data
Monomi: Practical Analytical Query Processing over Encrypted Data
 
Virtual memory and page replacement algorithm
Virtual memory and page replacement algorithmVirtual memory and page replacement algorithm
Virtual memory and page replacement algorithm
 
Memory Management in Operating Systems for all
Memory Management in Operating Systems for allMemory Management in Operating Systems for all
Memory Management in Operating Systems for all
 
Chap2 slides
Chap2 slidesChap2 slides
Chap2 slides
 
Scalable Whole-Exome Sequence Data Processing Using Workflow On A Cloud
Scalable Whole-Exome Sequence Data Processing Using Workflow On A CloudScalable Whole-Exome Sequence Data Processing Using Workflow On A Cloud
Scalable Whole-Exome Sequence Data Processing Using Workflow On A Cloud
 
Unit iiios Storage Management
Unit iiios Storage ManagementUnit iiios Storage Management
Unit iiios Storage Management
 
Limitations of memory system performance
Limitations of memory system performanceLimitations of memory system performance
Limitations of memory system performance
 
Managing Memory Allocation
Managing Memory AllocationManaging Memory Allocation
Managing Memory Allocation
 

More from COMSATS Institute of Information Technology

Data Hazard and Solution for Data Hazard
Data Hazard and Solution for Data HazardData Hazard and Solution for Data Hazard
Data Hazard and Solution for Data Hazard
COMSATS Institute of Information Technology
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
Software ArchitectureSoftware Architecture
Network cables-Imdad Hussain
Network cables-Imdad HussainNetwork cables-Imdad Hussain
Network cables-Imdad Hussain
COMSATS Institute of Information Technology
 
COMUNICATION NETWORK NETWORK TOPOLOGY NETWORK CABLES NETWORK DEVICES
COMUNICATION NETWORK NETWORK TOPOLOGY NETWORK CABLES NETWORK DEVICESCOMUNICATION NETWORK NETWORK TOPOLOGY NETWORK CABLES NETWORK DEVICES
COMUNICATION NETWORK NETWORK TOPOLOGY NETWORK CABLES NETWORK DEVICES
COMSATS Institute of Information Technology
 
DOC MS Microsoft windows
DOC MS Microsoft windowsDOC MS Microsoft windows
Amdahl`s law -Processor performance
Amdahl`s law -Processor performanceAmdahl`s law -Processor performance
Amdahl`s law -Processor performance
COMSATS Institute of Information Technology
 
Sequnce diagram for ONLINE EXAMINATION SYSTEM
Sequnce diagram for ONLINE EXAMINATION SYSTEMSequnce diagram for ONLINE EXAMINATION SYSTEM
Sequnce diagram for ONLINE EXAMINATION SYSTEM
COMSATS Institute of Information Technology
 
DHCP Server Guaidlines using CISCO PACKET TRACER
DHCP Server Guaidlines using CISCO PACKET TRACERDHCP Server Guaidlines using CISCO PACKET TRACER
DHCP Server Guaidlines using CISCO PACKET TRACER
COMSATS Institute of Information Technology
 

More from COMSATS Institute of Information Technology (9)

Data Hazard and Solution for Data Hazard
Data Hazard and Solution for Data HazardData Hazard and Solution for Data Hazard
Data Hazard and Solution for Data Hazard
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Network cables-Imdad Hussain
Network cables-Imdad HussainNetwork cables-Imdad Hussain
Network cables-Imdad Hussain
 
COMUNICATION NETWORK NETWORK TOPOLOGY NETWORK CABLES NETWORK DEVICES
COMUNICATION NETWORK NETWORK TOPOLOGY NETWORK CABLES NETWORK DEVICESCOMUNICATION NETWORK NETWORK TOPOLOGY NETWORK CABLES NETWORK DEVICES
COMUNICATION NETWORK NETWORK TOPOLOGY NETWORK CABLES NETWORK DEVICES
 
DOC MS Microsoft windows
DOC MS Microsoft windowsDOC MS Microsoft windows
DOC MS Microsoft windows
 
Amdahl`s law -Processor performance
Amdahl`s law -Processor performanceAmdahl`s law -Processor performance
Amdahl`s law -Processor performance
 
Sequnce diagram for ONLINE EXAMINATION SYSTEM
Sequnce diagram for ONLINE EXAMINATION SYSTEMSequnce diagram for ONLINE EXAMINATION SYSTEM
Sequnce diagram for ONLINE EXAMINATION SYSTEM
 
DHCP Server Guaidlines using CISCO PACKET TRACER
DHCP Server Guaidlines using CISCO PACKET TRACERDHCP Server Guaidlines using CISCO PACKET TRACER
DHCP Server Guaidlines using CISCO PACKET TRACER
 

Recently uploaded

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 

Recently uploaded (20)

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 

Virtual memory, allocaton of frame & trashing

  • 1. WWW.EASYDESIGN.COM DESIGN BY IMDAD HUSSAIN Operatin Sysrem COMSATS Sahiwal Virtual Memory Alloction of Frames Trashing
  • 2. GROUP MEMBERS IMDAD HUSSAIN SP13-BCS-B-91 KASHIF BILAL SP13-BCS-B-90 MOHSIN SHABIR SP13-BCS-B-88 SUBMITTED TO Sir.Farhan-u-Allah Khan Operating System COMSATS Sahiwal
  • 3. IN THE NAME OF ALLAH WHO IS MOST BEFICIAL AND MOST MERCIFUL
  • 4. OUTLINES • VIRTUAL MEMORY • VITUAL MEMORY CONCEPT • IMPLEMENTATION OF VIRTUAL MEMORY • ALLOCATION OF FRAMES • GLOBAL VERSES LOCAL ALLOCATION • HOW MAYNY FRAME ASSIGN TO EACH PROCESS • TRASHING
  • 5. 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.
  • 6. VITUAL MEMORY CONCEPT The conceptual separation of user logical memory from physical memory. Thus we can have large virtual memory on a small physical memory
  • 7. TRANSFER OF A PAGED MEMORY TO CONTIGUOUS DISK SPACE
  • 8. IMPLEMENTATION OF VIRTUAL MEMORY • DEMAND PAGING WHEN A PAGE IS TOUCHED, BRING IT FROM SECONDARY TO MAIN MEMORY • DEMAND SEGMENTATION
  • 9. ALLOCATION OF FRAMES EACH PROCESS NEEDS MINIMUM NUMBER OF PAGES • EXAMPLE:IBM 370 - 6 PAGES TO HANDLE ,SS MOVE INSTRUCTION: • A) INSTRUCTION IS 6 BYTES, MIGHT SPAN 2 PAGES. • B) 2 PAGES TO HANDLE FROM. • C) 2 PAGES TO HANDLE TO.
  • 10. FRAME ALLOCATION •GLOBAL REPLACEMENT: A PROCESS CAN REPLACE ANY PAGE IN THE MEMORY. •LOCAL REPLACEMENT: EACH PROCESS CAN REPLACE ONLY FROM ITS OWN RESERVED SET OF ALLOCATED PAGE FRAMES
  • 11. EXAMPLE PROPOTIONAL ALLOCATION CONSIDER A SYSTEM HAVING 64 FRAMES AND THERE ARE 4 PROCESSES WITH THE FOLLOWING VIRTUAL MEMORY SIZES: V(1) = 16, V(2) = 128, V(3) = 64 AND V(4) = 48. EQUAL ALLOCATION: ASSUME THAT THERE ARE N FRAMES, AND P PROCESSES, THEN N/P FRAMES ARE PROPORTIONAL ALLOCATION: V = 16 + 128 + 64 + 48 = 256. IT ALLOCATES: (16 / 256) * 64 = 4 FRAMES TO PROCESS 1, (128 / 256) * 64 = 32 FRAMES TO PROCESS 2, (64 / 256) * 64 = 16 FRAMES TO PROCESS 3, (48 / 256) * 64 = 12 FRAMES PROCESS 4
  • 13. HOW FRAME ASSIGN TO EACH PROCESS •EQUAL ALLOCATION: IF THERE ARE N FRAMES AND P PROCESSES, N/P FRAMES ARE ALLOCATED TO • EACH PROCESS. • PROPORTIONAL ALLOCATION: LET THE VIRTUAL MEMORY SIZE FOR PROCESS P BE V(P). LET THERE • ARE M PROCESSES AND N FRAMES. THEN THE TOTAL VIRTUAL MEMORY SIZEWILL BE: V = ΣV(P). • ALLOCATE (V(P) /V) * N FRAMES TO PROCESS P.
  • 14. FIXED ALLOCATION EQUAL ALLOCATION • IF 100 FRAMES AND 5 PROCESSES, GIVE EACH PROCESS 20 FRAMES. PROPORTIONAL ALLOCATION • ALLOCATE ACCORDING TO THE SIZE OF PROCESS SI = SIZE OF PROCESS PI S = S SI M = TOTAL NUMBER OF FRAMES AI = ALLOCATION FOR PI =SI/S *M
  • 15. THRASHING IF A PROCESS DOES NOT HAVE ‘‘ENOUGH’’ PAGES, THE PAGE-FAULT RATE IS VERY HIGH • LOW CPU UTILIZATION • OPERATING SYSTEM THINKS THAT IT NEEDSTO INCREASE THE DEGREE OF MULTIPROGRAMMING • ANOTHER PROCESS ADDED TO THE SYSTEM. •THRASHING= A PROCESS IS BUSY SWAPPING PAGES IN AND OUT.
  • 16. EXAMPLE OF THRASHING CPU Utilization Degree of Multiprogramming Trashing
  • 17. SADVANTAGES • INCREASES THE DEGREE OF MULTIPROGRAMMING • • SYSTEM THROUGHPUT DECREASES • PAGE FAULT RATE INCREASES • EFFECTIVE ACCESS TIME INCREASES
  • 18. SOLUTION 1. WE CAN REDUCE THE EFFECT OF THRASHING BY USING THE LOCAL REPLACEMENT ALGORITHM 2. TO PREVENT THRASHING PROVIDE AS MANY FRAMES AS IT NEEDS 3.TO KNOW THE NUMBER OF FRAMES USE WORKING SET STRATEGY
  • 19. WHY DOES PAGING WORK? • LOCALITY MODEL  PROCESS MIGRATES FROM ONE LOCALITY TO ANOTHER  LOCALITIES MAY OVERLAP • WHY DOES THRASHING OCCUR?  SIZE OF LOCALITY > TOTAL MEMORY SIZE
  • 20. PRINCIPLE OF LOCALITY 1. ONLY A FEW PIECES OF A PROCESS WILL BE NEEDED OVER A SHORT PERIOD OF TIME 2. POSSIBLE TO MAKE INTELLIGENT GUESSES ABOUT WHICH PIECES WILL BE NEEDED IN THE FUTURE 3.THIS SUGGESTS THAT VIRTUAL MEMORY MAY WORK EFFICIENTLY