PA0 is due in 12 hours PA1 will be out in 12 hours

Slides:



Advertisements
Similar presentations
Central Processing Unit
Advertisements

The Microprocessor and its Architecture
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.
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
Chapter 15 Address Translation Chien-Chung Shen CIS, UD
Lecture 7 Memory Management. Virtual Memory Approaches Time Sharing: one process uses RAM at a time Static Relocation: statically rewrite code before.
Lecture 8 Memory Management. Paging Too slow -> TLB Too big -> multi-level page table What if all that stuff does not fit into memory?
1 Operating Systems and Protection CS Goals of Today’s Lecture How multiple programs can run at once  Processes  Context switching  Process.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management -3 CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
COMP3221 lec36-vm-I.1 Saeid Nooshabadi COMP 3221 Microprocessors and Embedded Systems Lectures 13: Virtual Memory - I
1 Operating Systems and Protection Professor Jennifer Rexford CS 217.
Memory Management April 28, 2000 Instructor: Gary Kimura.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
Week 7 February 17, 2004 Adrienne Noble. Important Dates Due Monday, Feb 23 Homework 7 Due Wednesday, Feb 25 Project 3 Due Friday, Feb 27 Homework 8.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
80386DX.
CS 3204 Operating Systems Godmar Back Lecture 11.
The Intel Microprocessors. Real Mode Memory Addressing Real mode, also called real address mode, is an operating mode of and later x86-compatible.
VAX. Agenda VAX and its History VAX ISA VAX Virtual Address Microcode.
Virtual Memory Expanding Memory Multiple Concurrent Processes.
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.
Chapter 4 Memory Management Virtual Memory.
Virtual Memory. Virtual Memory: Topics Why virtual memory? Virtual to physical address translation Page Table Translation Lookaside Buffer (TLB)
Review (1/2) °Caches are NOT mandatory: Processor performs arithmetic Memory stores data Caches simply make data transfers go faster °Each level of memory.
Lecture 8: Buffer Overflow CS 436/636/736 Spring 2013 Nitesh Saxena *Adopted from a previous lecture by Aleph One (Smashing the Stack for Fun and Profit)
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 9: Virtual Memory.
Microprocessor Microprocessor (cont..) It is a 16 bit μp has a 20 bit address bus can access upto 220 memory locations ( 1 MB). It can support.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
PA1 due in one week TA office hour is 1-3 PM The grade would be available before that.
Lecture 7 TLB. Virtual Memory Approaches Time Sharing Static Relocation Base Base+Bounds Segmentation Paging.
Computer Architecture Lecture 5 by Engineer A. Lecturer Aymen Hasan AlAwady 25/11/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
Virtual Memory 1 Computer Organization II © McQuain Virtual Memory Use main memory as a “cache” for secondary (disk) storage – Managed jointly.
Chapter 18 Paging Chien-Chung Shen CIS/UD
1 Classification of instructions 4-address instructions 3-address instructions 2-address instructions 1-address instructions 0-address instructions.
Chapter 15 Address Translation Chien-Chung Shen CIS/UD
CS 140 Lecture Notes: Virtual Memory
Virtualization Virtualize hardware resources through abstraction CPU
Segmentation COMP 755.
Chapter 9: Virtual Memory – Part I
Paging COMP 755.
Chien-Chung Shen CIS/UD
PA1 is out Best by Feb , 10:00 pm Enjoy early
CSE 153 Design of Operating Systems Winter 2018
The fetch-execute cycle
CSE 153 Design of Operating Systems Winter 2018
CS 140 Lecture Notes: Virtual Memory
Lecture 6 Memory Management
Segmentation Lecture November 2018.
Computer Organization & Compilation Process
Operating Systems Lecture November 2018.
8086 Registers Module M14.2 Sections 9.2, 10.1.
Module IV Memory Organization.
CS 140 Lecture Notes: Virtual Memory
Memory Physical and Virtual
Instructors: Majd Sakr and Khaled Harras
8086 processor.
Lecture 37 Syed Mansoor Sarwar
Virtual Memory Prof. Eric Rotenberg
Lecture 35 Syed Mansoor Sarwar
COMP3221: Microprocessors and Embedded Systems
CSE 153 Design of Operating Systems Winter 2019
CS703 - Advanced Operating Systems
CSE 153 Design of Operating Systems Winter 2019
Computer Organization & Compilation Process
Memory segmentation and addressing
CS 140 Lecture Notes: Virtual Memory
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
(The Stack and Procedures)
Presentation transcript:

PA0 is due in 12 hours PA1 will be out in 12 hours

Lecture 5 Memory Management

Segmentation Example Assume a 14-bit virtual addresses, with the high 2 bits indicating the segment. Assume 0=>code, 1=>heap, and 2=>stack. What virtual addresses could be valid for each segment?

Segment Base Size Positive? Code 1 Heap 1KB 1KB 1 Stack 5KB 1KB 0 (free) heap stack Segment Base Size Positive? Code 1 Heap 1KB 1KB 1 Stack 5KB 1KB 0 Virtual 0x2C00 Physical 4KB

Segments: 0=>code 1=>heap 2=>stack ? Heap ? Stack ? VirtA 0KB 4KB 8KB 12KB 16KB PhysA 16KB 20KB 24KB 26KB 28KB 32KB Segments: 0=>code 1=>heap 2=>stack Segment Base Size Positive? Code 0 16KB 4KB 1 Heap 1 22KB Stack 2 28KB 2KB

Memory Accesses Fetch instruction at 0x4010 Exec, load from 0x5900 Fetch instruction at 0x4014 Fetch instruction at 0x4017 Exec, store to 0x5900 0x0010 movl 0x1100, %r8d 0x0014 addl $0x3, %r8d 0x0017 movl %r8d, 0x1100 Segment Base Size Positive? Code 0 16KB (0x4000) 4KB (0x1000) 1 Heap 1 22KB (0x5800) Stack 2 28KB (0x7000) 2KB (0x0800)

More Memory Accesses Fetch instruction at 0x4010 Exec, load from 0x6100 Fetch instruction at 0x4014 Fetch instruction at 0x4017 Exec, store to 0x6100 0x0010 movl 0x2100, %r8d 0x0014 addl $0x3, %r8d 0x0017 movl %r8d, 0x2100 Segment Base Size Positive? Code 0 16KB (0x4000) 4KB (0x1000) 1 Heap 1 22KB (0x5800) Stack 2 28KB (0x7000) 2KB (0x0800)

Segments: 0=>code 1=>heap 2=>stack VirtA 0KB 4KB 8KB 12KB 16KB PhysA 16KB 20KB 24KB 26KB 28KB 32KB Segments: 0=>code 1=>heap 2=>stack Segment Base Size Positive? Code 0 16KB 4KB 1 Heap 1 22KB Stack 2 30KB Segment Base Size Positive? Code 0 16KB 4KB 1 Heap 1 22KB Stack 2 28KB 2KB

More Memory Accesses Get Right Fetch instruction at 0x4010 Exec, load from 0x6900 Fetch instruction at 0x4014 Fetch instruction at 0x4017 Exec, store to 0x6900 0x0010 movl 0x2100, %r8d 0x0014 addl $0x3, %r8d 0x0017 movl %r8d, 0x2100 Segment Base Size Positive? Code 0 16KB (0x4000) 4KB (0x1000) 1 Heap 1 22KB (0x5800) Stack 2 30KB (0x7800)

Support for Code Sharing Idea: make base/bounds for the code of several processes point to the same physical mem Careful: need extra protection! Adding protection bits Segment Base Size Positive? Protection Code 0 16KB (0x4000) 4KB (0x1000) 1 Read-Execute Heap 1 22KB (0x5800) Read-Write Stack 2 30KB (0x7800)

Work on the second problem