Chapter 15 Address Translation Chien-Chung Shen CIS, UD

Slides:



Advertisements
Similar presentations
Part IV: Memory Management
Advertisements

Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
PA0 due today Anyone tried to submit?. Scheduling Workload assumptions Arrive time, run time, I/O, etc. Policies: FIFO, SJF, STCF, RR, MLFQ, and lottery.
Memory Management Chapter 7.
Chapter 6 User Protections in OS. csci5233 computer security & integrity (Chap. 6) 2 Outline User-level protections 1.Memory protection 2.Control of access.
Memory Management Questions answered in this lecture: How do processes share memory? What is static relocation? What is dynamic relocation? What is segmentation?
OS Memory Addressing.
Chapter 6 Limited Direct Execution
CS 311 – Lecture 21 Outline Memory management in UNIX
CS 153 Design of Operating Systems Spring 2015
1 Operating Systems and Protection CS Goals of Today’s Lecture How multiple programs can run at once  Processes  Context switching  Process.
Operating Systems CMPSCI 377 Lecture 11: Memory Management
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
X86 segmentation, page tables, and interrupts 3/17/08 Frans Kaashoek MIT
Virtual Memory Operating Systems Lecture # 8. Multi-tasking OS OS Excel MS Word Outlook 0x0000 0x7000 0x4000 0x8000 0x9000.
Multiprocessing Memory Management
Memory Management 2010.
Chapter 8 Operating System Support
Computer Organization and Architecture
Virtual Memory Deung young, Moon ELEC 5200/6200 Computer Architecture and Design Lectured by Dr. V. Agrawal Lectured by Dr. V.
CMSC 414 Computer and Network Security Lecture 13 Jonathan Katz.
Operating System Concepts
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
Computer Organization and Architecture Operating System Support Chapter 8.
Memory management. Instruction execution cycle Fetch instruction from main memory Decode instruction Fetch operands (if needed0 Execute instruction Store.
Chapter 91 Memory Management Chapter 9   Review of process from source to executable (linking, loading, addressing)   General discussion of memory.
Memory Management. Process must be loaded into memory before being executed. Memory needs to be allocated to ensure a reasonable supply of ready processes.
MEMORY MANAGEMENT Presented By:- Lect. Puneet Gupta G.P.C.G. Patiala.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Chapter 4 Storage Management (Memory Management).
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Chapter 18 Paging Chien-Chung Shen CIS, UD
PA0 due 60 hours. Lecture 4 Memory Management OSTEP Virtualization CPU: illusion of private CPU RAM: illusion of private memory Concurrency Persistence.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
Chapter 2 Introduction to OS Chien-Chung Shen CIS, UD
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Operating Systems Lecture 14 Segments Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software Engineering.
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
12/5/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam King,
Chapter 4 Process Abstraction Chien-Chung Shen CIS, UD
CPS110: Intro to memory Landon Cox February 14, 2008.
OS Memory Addressing. Architecture CPU – Processing units – Caches – Interrupt controllers – MMU Memory Interconnect North bridge South bridge PCI, etc.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
Memory Management Chapter 5 Advanced Operating System.
Chapter 6 Limited Direct Execution Chien-Chung Shen CIS/UD
Chapter 18 Paging Chien-Chung Shen CIS/UD
Computer Security: Chapter 5 Operating Systems Security.
Chapter 15 Address Translation Chien-Chung Shen CIS/UD
Virtualization Virtualize hardware resources through abstraction CPU
Segmentation COMP 755.
Memory management.
Chapter 8: Main Memory.
CSE 120 Principles of Operating
Mechanism: Address Translation
Chien-Chung Shen CIS/UD
PA1 is out Best by Feb , 10:00 pm Enjoy early
x86 segmentation, page tables, and interrupts
Lecture 28: Virtual Memory-Address Translation
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
The Operating System Memory Manager
Multistep Processing of a User Program
Memory Management Tasks
Lecture Topics: 11/1 General Operating System Concepts Processes
Lecture 3: Main Memory.
Computer System Structures
Mechanism: Address Translation
EECE.4810/EECE.5730 Operating Systems
Presentation transcript:

Chapter 15 Address Translation Chien-Chung Shen CIS, UD

Mechanism Mechanism of CPU virtualization: limited direct execution (LDE) –Let program run directed on hardware; at certain key points in time (e.g., system call or inter interrupt), OS retains control over hardware for efficient virtualization Mechanism of memory virtualization –efficiency – via hardware support –control – protection via hardware support –flexibility – make system easier to program and to use address space  (hardware-based) address translation

Address Translation Hardware does [virtual address (provided by instruction)  physical address] OS manages memory by setting up hardware –to create illusion that each program has its own private memory, even though many programs are sharing memory at the same time Create useful, powerful, and easy to use abstraction

Example Assumptions: user’s address space must be placed contiguously in physical memory; its size is less than the size of physical memory; each address space is exactly the same size

Interposition for Transparency x = x + 3; 128: movl 0x0(%ebx), %eax 132: addl $0x03, %eax 135: movl %eax, 0x0(%ebx) Address space starts from address 0 To virtualize memory, OS needs to place the process somewhere else in physical memory Problem: how can OS relocate process in memory that is transparent to the process? Solution: hardware interposes on each memory access, and translates each virtual address issued by the process to a physical address where the desired information is actually stored



Dynamic (H/W-based) Relocation Base and bounds registers Each program is written and compiled as if it is loaded at address 0 When a program starts running, OS decides where in physical memory it should be loaded and sets the base register to that value Address translation physical address = virtual address + base Bounds for protection Memory management unit (MMU) inside CPU

Static (S/W-based) Relocation Loader –take an executable that is about to be run and rewrites its addresses to the desired offset in physical memory –e.g., movl 1000,%eax, and the address space of the program was loaded starting at address 3000 (and not 0, as the program thinks), the loader would rewrite the instruction to offset each address by 3000 ( movl 4000,%eax ).

OS Issues OS must take action when a process is created, finding space for its address space in memory OS must take action when a process is terminated, reclaiming all of its memory for use in other processes or the OS OS must also take action when a context switch occurs (save/restore base-bounds register values to/from PCB) Access to base and bounds registers is privileged

Summary LDE  address translation –efficiency via hardware –transparent Base and bounds: protection Problem: internal fragmentation Solution: segmentation