CS 162 Discussion Section Week 6. Administrivia Project 2 Deadlines – Initial Design Due: 3/1 – Review Due: 3/5 – Code Due: 3/15.

Slides:



Advertisements
Similar presentations
Paging Andrew Whitaker CSE451.
Advertisements

Multilevel Page Tables
Page Table Implementation
1 CMPT 300 Introduction to Operating Systems Virtual Memory Sample Questions.
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
Paging Hardware With TLB
CS 153 Design of Operating Systems Spring 2015
CSCE 212 Chapter 7 Memory Hierarchy Instructor: Jason D. Bakos.
Recap. The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of the.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Oct 31, 2005 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Memory Management.
Chapter 3.2 : Virtual Memory
Virtual Memory. Why do we need VM? Program address space: 0 – 2^32 bytes –4GB of space Physical memory available –256MB or so Multiprogramming systems.
Chapter 7: Main Memory CS 170, Fall Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation.
Memory Management 2 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
Answers to the VM Problems Spring First question A computer has 32 bit addresses and a virtual memory with a page size of 8 kilobytes.  How many.
1 Tuesday, July 04, 2006 "Programs expand to fill the memory available to hold them." - Modified Parkinson’s Law.
CS 241 Section Week #12 (04/22/10).
Review of Memory Management, Virtual Memory CS448.
CMPE 421 Parallel Computer Architecture
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 34 Paging Implementation.
July 30, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 8: Exploiting Memory Hierarchy: Virtual Memory * Jeremy R. Johnson Monday.
Memory and cache CPU Memory I/O. CEG 320/52010: Memory and cache2 The Memory Hierarchy Registers Primary cache Secondary cache Main memory Magnetic disk.
Virtual Memory Expanding Memory Multiple Concurrent Processes.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-8 Memory Management (2) Department of Computer Science and Software.
Virtual Memory. DRAM as cache What about programs larger than DRAM? When we run multiple programs, all must fit in DRAM! Add another larger, slower level.
9.1 Operating System Concepts Paging Example. 9.2 Operating System Concepts.
Operating Systems Unit 7: – Virtual Memory organization Operating Systems.
Nachos Lecture 2 Xiaorui Sun. Phase 2 You have got one machine (machine package) You have to implements the incomplete OS (userprog package) Run programs.
Paging Paging is a memory-management scheme that permits the physical-address space of a process to be noncontiguous. Paging avoids the considerable problem.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Page Table Implementation. Readings r Silbershatz et al:
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
Operating Systems Session 7: – Virtual Memory organization Operating Systems.
Week 5:Virtual Memory CS 162. Today’s Section Administrivia Quiz Review of Lecture Worksheet and Discussion.
Operating Systems, Winter Semester 2011 Practical Session 9, Memory 1.
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Vivek Seshadri 15740/18740 Computer Architecture
Virtual Memory Chapter 7.4.
Section 8 Address Translation March 10th, 2017 Taught by Joshua Don.
CS161 – Design and Architecture of Computer
Section 9: Virtual Memory (VM)
CS 704 Advanced Computer Architecture
Chapter 8: Main Memory Source & Copyright: Operating System Concepts, Silberschatz, Galvin and Gagne.
CS510 Operating System Foundations
Andy Wang Operating Systems COP 4610 / CGS 5765
FIGURE 12-1 Memory Hierarchy
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 8 11/24/2018.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 12/1/2018.
Lecture 22: Cache Hierarchies, Memory
Andy Wang Operating Systems COP 4610 / CGS 5765
CPSC 457 Operating Systems
Virtual Memory فصل هشتم.
Sarah Diesburg Operating Systems CS 3430
Exam Review Mark Stanovich Operating Systems COP
Practical Session 9, Memory
TLB Performance Seung Ki Lee.
Virtual Memory Overcoming main memory size limitation
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 4/5/2019.
CS703 - Advanced Operating Systems
Lecture 9: Caching and Demand-Paged 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.
Sarah Diesburg Operating Systems CS 3430
Andy Wang Operating Systems COP 4610 / CGS 5765
Paging Andrew Whitaker CSE451.
Memory Management & Virtual Memory
Sarah Diesburg Operating Systems COP 4610
Presentation transcript:

CS 162 Discussion Section Week 6

Administrivia Project 2 Deadlines – Initial Design Due: 3/1 – Review Due: 3/5 – Code Due: 3/15

Project 2 Overview Part I – Implement file system calls – like create, open, read, write, close etc. Part II – Implement support for multiprogramming – Play with allocating memory, virtual memory Part III – Implement system calls – like exec, join and exit Part IV – Implement lottery scheduling

Recap Why do we have a virtual address space?

Recap How is a virtual address translated into a physical address?

Recap Why do we have multiple levels of page tables?

What is the size of the page table in a 64bit system if each page is 4K in size? – 16 PB How many levels would you need if you had 1024 entry page tables?

TLB Caching Applied to Address Translation

Caching caching is to store copies of data at places that can be accessed more quickly than accessing the original. Locality: – Temporal locality Example: recently accessed files – Spatial locality Example: ls command

Memory Hierarchy Image Source:

Issues in Caching Cache Hit Cache Miss effective access time is defined with the following equation: T = P(cache hit)*(cost of hit) + P(cache miss)*(cost of miss)

Problem What is the effective access time for TLB with 80% hit rate, 20ns TLB access time and 100 ns Memory access time (assume two-level page table that is not in L2 cache)?

Is there any way to make the page table smaller?

Linear inverted page tables

Hashed inverted page table

Design Issues in Caching The design of a caching mechanism needs to answer the following questions: – How is a cache entry lookup performed? – If the data is not in the cache, which cache entry should be replaced? – How does the cache copy maintain consistency with the real version of data?

Types of Cache Direct Mapped Cache Fully Associative Cache N way Set Associative Cache

2-Way Associative Cache in TLB