Project 4 Awards First Place Group 7 Samuel Bartlett Michael Phillips Norman Chen.

Slides:



Advertisements
Similar presentations
Chapters 7 & 8 Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Advertisements

Chapter 3.3 : OS Policies for Virtual Memory
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Virtual Memory II Chapter 8.
Chapter 8 Virtual Memory
Chapter 101 Cleaning Policy When should a modified page be written out to disk?  Demand cleaning write page out only when its frame has been selected.
Segmentation and Paging Considerations
Virtual Memory Chapter 8.
Chapter 8 Virtual Memory Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice.
Day 23 Virtual Memory. Operating system’s role in VM Hardware-support Use VM or not Use paging or segmentation or both Software domain Algorithms for.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
Virtual Memory Chapter 8.
Virtual Memory Chapter 8.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Lecture 11: Memory Management
1 Virtual Memory Chapter 9. 2 Characteristics of Paging and Segmentation n Memory references are dynamically translated into physical addresses at run.
Module 3.1: Virtual Memory
Memory Management 2010.
Virtual Memory Chapter 8.
1 Virtual Memory Chapter 8. 2 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
1 Lecture 9: Virtual Memory Operating System I Spring 2007.
1 Chapter 8 Virtual Memory Virtual memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
Virtual Memory (Chapter 8) Memory Management is an intimate and complex interrelationship between processor hardware and operating system software. Paging.
Virtual Memory Chapter 8.
Computer Organization and Architecture
Virtual Memory I Chapter 8.
1 Virtual Memory Chapter 8. 2 Process Execution n The OS brings into main memory only a few pieces of the program (including its starting point) n Each.
Virtual Memory BY JEMINI ISLAM. What is Virtual Memory Virtual memory is a memory management system that gives a computer the appearance of having more.
Chapter 8 Virtual Memory
A. Frank - P. Weisberg Operating Systems Virtual Memory Policies.
Virtual Memory Management
Chapter 8 Virtual Memory
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Chapter 8 Virtual Memory Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
Virtual Memory Chapter 8. Characteristics of Paging and Segmentation A process may be broken up into pieces (pages or segments) that do not need to be.
Chapter 8 Virtual Memory Operating Systems: Internals and Design Principles Seventh Edition William Stallings.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
1 Virtual Memory Chapter 8. 2 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
1 Virtual Memory Chapter 8. 2 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Chapter 8 Virtual Memory Operating Systems: Internals and Design Principles Seventh Edition William Stallings.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Memory.
1 Virtual Memory Chapter 8. 2 Virtual memory concept Simple paging/ segmentation  pages or segments are loaded into frames that may not necessarily be.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Page Replacement Allocation of.
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 9 th Edition Chapter 9: Virtual-Memory Management.
Memory Management. Why memory management? n Processes need to be loaded in memory to execute n Multiprogramming n The task of subdividing the user area.
Silberschatz, Galvin and Gagne  Operating System Concepts Virtual Memory Virtual memory – separation of user logical memory from physical memory.
1 Virtual Memory. Cache memory: provides illusion of very high speed Virtual memory: provides illusion of very large size Main memory: reasonable cost,
Informationsteknologi Wednesday, October 3, 2007Computer Systems/Operating Systems - Class 121 Today’s class Memory management Virtual memory.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
1 Lecture 8: Virtual Memory Operating System Fall 2006.
Chapter 9: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Background Virtual memory – separation of user logical memory.
COMP 3500 Introduction to Operating Systems Paging: Basic Method Dr. Xiao Qin Auburn University Slides.
Chapters 7 & 8 Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
COMP 3500 Introduction to Operating Systems Memory Management: Part 2 Dr. Xiao Qin Auburn University Slides.
Virtual Memory Chapter 8.
Computer Organization
ITEC 202 Operating Systems
Day 22 Virtual Memory.
Chapter 8 Virtual Memory
Virtual Memory Chapter 8.
Lecture 10: Virtual Memory
Chapter 9 Virtual Memory
Virtual Memory فصل هشتم.
Chapter 8 Virtual Memory
Operating Systems Concepts
COMP755 Advanced Operating Systems
Operating Systems: Internals and Design Principles, 6/E
Presentation transcript:

Project 4 Awards First Place Group 7 Samuel Bartlett Michael Phillips Norman Chen

Group 15 Michael Pearce Martin Wang Michael Volz Project 4 Awards Second Place

Group 14 Stephen Ward John Jorgensen Neal Smith Group 18 Bridges Penn James Post Project 4 Awards Second Place

COMP 3500 Introduction to Operating Systems Virtual Memory Dr. Xiao Qin Auburn University Slides are adopted and modified from materials developed by Drs. Silberschatz, Galvin, and Gagne

Review: Paging and Translation Lookaside Buffer (TLB) 5

Segment Organization Each segment table entry contains the starting address of the corresponding segment in main memory and the length of the segment A bit is needed to determine if the segment is already in main memory Another bit is needed to determine if the segment has been modified since it was loaded in main memory 6

Address Translation in a Segmentation System 7

Combined Paging and Segmentation A user’s address space is broken up into a number of segments. Each segment is broken up into a number of fixed-sized pages Each page is equal in length to a main memory frame Segmentation is visible to the programmer Paging is transparent to the programmer 8

Address Translation in a Segmentation/Paging System

10

11 Protection and Sharing Segmentation lends itself to the implementation of protection and sharing policies Each entry has a base address and length so inadvertent memory access can be controlled Sharing can be achieved by segments referencing multiple processes

Operating System Software The design of the memory management portion of an operating system depends on: whether or not to use virtual memory techniques the use of paging or segmentation or both the algorithms employed for various aspects of memory management 12

Operating System Policies for Virtual Memory 13

Fetch Policy Determines when a page should be brought into memory Two main types: Demand Paging Prepaging 14

Demand Paging Brings pages into main memory when a reference is made to a location on the page Q1: Many or few page faults when process is first started? Q2: What happens after more and more pages are brought in? Principle of locality suggests that as, most future references will be to pages that have recently been brought in, and page faults should drop to a very low level 15

Prepaging Pages other than the one demanded by a page fault are brought in Exploits the characteristics of most secondary memory devices If pages of a process are stored contiguously in secondary memory it is more efficient to bring in a number of pages at one time Q3: What is the downside? Ineffective if extra pages are not referenced 16

Placement Policy Determines where in real memory a process piece is to reside Important design issue in a segmentation system Paging or combined paging with segmentation placing is irrelevant because hardware performs functions with equal efficiency For NUMA systems an automatic placement strategy is desirable 17

Replacement Policy Deals with the selection of a page in main memory to be replaced when a new page must be brought in Objective: the page that is removed should be the page least likely to be referenced in the near future The more elaborate the replacement policy the greater the hardware and software overhead to implement it 18

Frame Locking When a frame is locked the page currently stored in that frame may not be replaced. Q4: What pages should be locked? – kernel of the OS as well as key control structures are held in locked frames – I/O buffers and time-critical areas may be locked into main memory frames – locking is achieved by associating a lock bit with each frame 19

Basic Algorithms Algorithms used for the selection of a page to replace: Optimal Least recently used (LRU) First-in-first-out (FIFO) Clock 20

Least Recently Used (LRU) Replaces the page that has not been referenced for the longest time By the principle of locality, this should be the page least likely to be referenced in the near future 21

Amazon Interview Question for Software Engineer / Developers Implement an LRU cache Q5: How to implement LRU? – one approach is to tag each page with the time of last reference – this requires a great deal of overhead 22

First-in-First-out (FIFO) Treats page frames allocated to a process as a circular buffer Pages are removed in round-robin style A Simple replacement policy to implement Page that has been in memory the longest is replaced 23

Clock Policy Requires the association of an additional bit with each frame: referred to as the use bit When a page is first loaded in memory or referenced, the use bit is set to 1 The set of frames is considered to be a circular buffer Any frame with a use bit of 1 is passed over by the algorithm Page frames visualized as laid out in a circle 24

Clock Policy: An Example 25

26

Comparisons of the Page Replacement Algorithms 27

The OS must decide how many pages to bring into main memory – the smaller the amount of memory allocated to each process, the more processes can reside in memory – small number of pages loaded increases page faults – beyond a certain size, further allocations of pages will not effect the page fault rate 28 Resident Set Management

Resident Set Size Fixed-allocation Variable-allocation allows the number of page frames allocated to a process to be varied over the lifetime of the process gives a process a fixed number of frames in main memory within which to execute – when a page fault occurs, one of the pages of that process must be replaced 29

Summary Hardware and control structures Combined paging and segmentation Protection and sharing OS software Fetch policy Placement policy Replacement policy Resident set management 30