Page Replacement Implementation Issues Text: –Tanenbaum ch. 4.7.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Chapter 4 Memory Management Page Replacement 补充:什么叫页面抖动?
Memory Management Paging &Segmentation CS311, CS350 & CS550.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Intel MP.
Configuring the Operating System Configure Performance Options Processor scheduling and memory usage Virtual memory Memory for network performance Configure.
OS Memory Addressing.
CSC 322 Operating Systems Concepts Lecture - 18: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Memory Management Design & Implementation Segmentation Chapter 4.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
X86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT
Chapter 8.3: Memory Management
Memory Management (II)
1 Pertemuan 16 Isu-Isu pada Sistem Paging dan Segmentasi Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5.
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 121 Today’s class Operating System Machine Level.
Chapter 3.2 : Virtual Memory
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Operating System Machine.
Virtual Memory Management B.Ramamurthy. Paging (2) The relation between virtual addresses and physical memory addres- ses given by page table.
CS2422 Assembly Language & System Programming September 22, 2005.
1 Virtual Memory Management B.Ramamurthy Chapter 10.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
Protected Mode. Protected Mode (1 of 2) 4 GB addressable RAM –( to FFFFFFFFh) Each program assigned a memory partition which is protected from.
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Chapter 3 Memory Management 3.7 Segmentation. A compiler has many tables that are built up as compilation proceeds, possibly including: The source text.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
Virtual Memory  Early computers had a small and fixed amount to memory. All programs had to be able to fit in this memory. Overlays were used when the.
Operating System Machine Level  An operating system is a program that, from the programmer’s point of view, adds a variety of new instructions and features,
UNIT 2 Memory Management Unit and Segment Description and Paging
CS333 Intro to Operating Systems Jonathan Walpole.
Microprocessor system architectures – IA32 segmentation Jakub Yaghob.
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
Memory Management 3 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
1 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms.
CS 6560 Operating System Design Lecture 8: Memory Management.
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Memory Addressing / Kernel Modules.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 9: Virtual Memory.
Chapter 4 Memory Management Segmentation. (a) One address space. (b) Separate I and D spaces. Separate Instruction and Data Spaces.
Memory Management Operating Systems CS550. Memory Manager Memory manager - manages allocation and de-allocation of main memory Plays significant impact.
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
操作系统原理 OPERATING SYSTEM Chapter 3 Memory Management 内存管理.
1 Microprocessors CSE Protected Mode Memory Addressing Remember using real mode addressing we were previously able to address 1M Byte of memory.
Information Security - 2. Descriptor Tables There are two descriptor tables – Global Descriptor Tables – Local Descriptor Tables The global descriptor.
OS Memory Addressing. Architecture CPU – Processing units – Caches – Interrupt controllers – MMU Memory Interconnect North bridge South bridge PCI, etc.
1 Memory Management Chapter Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement.
Memory Management Chapter 3
MODERN OPERATING SYSTEMS Third Edition ANDREW S
SLC/VER1.0/OS CONCEPTS/OCT'99
Memory Management Paging (continued) Segmentation
CSE 120 Principles of Operating
Session 3 Memory Management
COMBINED PAGING AND SEGMENTATION
143A: Principles of Operating Systems Lecture 5: Address translation
Protection UQ: Explain the protection mechanism of X86 Intel family microprocessor(10 Marks)
x86 segmentation, page tables, and interrupts
Instructor: Junfeng Yang
Page Replacement Implementation Issues
Lecture 28: Virtual Memory-Address Translation
Page Replacement.
Memory Management Paging (continued) Segmentation
Module IV Memory Organization.
The Operating System Machine Level
Page Replacement Implementation Issues
Memory Management Tasks
Memory management, part 3: outline
Lecture 37 Syed Mansoor Sarwar
Assembly Language for Intel-Based Computers, 5th Edition
Memory Management Paging (continued) Segmentation
Presentation transcript:

Page Replacement Implementation Issues Text: –Tanenbaum ch. 4.7

Instruction Backup Page handling involves restarting the instruction that causes the trap Need to determine the first byte of instruction - difficult for some CPUs CPU uses an internal hidden register to copy the PC before executing the instruction If page fault occurs here, where does the instruction begin?

Locking Page in Memory Virtual memory and I/O occasionally interact A process issues call for read from device into buffer –while waiting for I/O, another process starts up –has a page fault –buffer for the first process may be paged out –data from I/O may get loaded on the new page Need to specify some pages locked (pinning in memory) –exempted from removal from memory

Backing Store (a) Paging to static swap area - problem with process that increases in size after starting (b) Backing up pages dynamically - allocate disk space when the page is swapped out and deallocate it when it is swapped back in Proc size Proc size

Separation of Policy and Mechanism Where is the page replacement algorithm?

Growing Tables One dimensional address space with growing tables, one table may bump into another Consider a compiler table example:

Segmentation Divide the address space into segments and each segment can grow independent of each other segments have large address space to prevent bumping into each other two part address- a segment number and address within the segment

Advantages of Segmentation Modification and compilation of one segment’s procedure will not affect any other procedures in other segments (no starting address has been modified) Better sharing of procedures or data between processes (put shared libraries in a special segment) Different protection for different segments

Comparison of Paging and Segmentation

Implementation of Pure Segmentation Segments are of various sizes (different from paging) Evicting and loading segments cause checkerboarding

x86 Segmentation with Paging x86 has 16K segments each holding 4GB of data To access a segment, x86 first loads a selector into one of CPU’s six segment registers (cs, ds, ss, es, fs, gs). The corresponding LDT or GDT is fetched and stored in microprogram registers. (Requestor’s)

Segment Descriptor Each program uses a Local Descriptor Table (LDT) to describe the code, data, stack etc. A single Global Descriptor Table(GDT) shared among all programs describes OS etc. Code segment descriptor: (descriptor)

Conversion to Linear Address Segment translation- logical address (what the applications see) to linear address (address for each segment) Page translation- linear address to physical address 16-bit32-bit Logical address

Mapping of a linear address onto a physical address

Protection on x86 Both Linux and Win32, only 0 and 3 are used Access to segments done by evaluating: –CPL: internal register stores current privilege level –DPL: descriptor privilege level –RPL: requestor’s privilege level Level