INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

Size: px
Start display at page:

Download "INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing"

Transcription

1 UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version English Lecture 17 Title: - Objectives and Operation Summary: secondary memory; ; Address translation (hierarchy tables and inverted tables). 2010/2011 Nuno.Roma@ist.utl.pt

2 Architectures for Embedded Computing : Objectives and Operation Prof. Nuno Roma ACE 2010/11 - DEI-IST 1 / 32 Previous Class In the previous class... Primary Memory: Technologies; DRAM memories operation; Memory planes; Primary memory access optimization. Prof. Nuno Roma ACE 2010/11 - DEI-IST 2 / 32

3 Road Map Prof. Nuno Roma ACE 2010/11 - DEI-IST 3 / 32 Summary Today: : secondary memory; ; Address translation: Hierarchy tables; Inverted tables. Bibliography: Computer Architecture: a Quantitative Approach, Sections C.4-C.5 and Prof. Nuno Roma ACE 2010/11 - DEI-IST 4 / 32

4 Prof. Nuno Roma ACE 2010/11 - DEI-IST 5 / 32 Memory Hierarchy µp Cache Memory Hard Disk Registers Each level includes a subset of the data that is stored in the next higher level. Price per Megabyte: Cache: 3 e DRAM: 0.6 e Disk: e Prof. Nuno Roma ACE 2010/11 - DEI-IST 6 / 32

5 Control Bus c Address Bus µp Memory m Data Bus n Memory Managment Unit (MMU): Responsible for the translation between virtual addresses and physical addresses. Prof. Nuno Roma ACE 2010/11 - DEI-IST 7 / 32 Prof. Nuno Roma ACE 2010/11 - DEI-IST 8 / 32

6 Increase of the memory space from the program point of view: Automatic overlaying mechanism; Only the memory that is really needed is instantiated; Prof. Nuno Roma ACE 2010/11 - DEI-IST 9 / 32 Increase of the memory space from the program point of view: Automatic overlaying mechanism; Only the memory that is really needed is instantiated; Memory protection between the programs; Prof. Nuno Roma ACE 2010/11 - DEI-IST 9 / 32

7 Increase of the memory space from the program point of view: Automatic overlaying mechanism; Only the memory that is really needed is instantiated; Memory protection between the programs; Memory sharing mechanism between programs; Prof. Nuno Roma ACE 2010/11 - DEI-IST 9 / 32 Increase of the memory space from the program point of view: Automatic overlaying mechanism; Only the memory that is really needed is instantiated; Memory protection between the programs; Memory sharing mechanism between programs; Program relocation within memory: The same program can be executed in any memory position; Prof. Nuno Roma ACE 2010/11 - DEI-IST 9 / 32

8 Increase of the memory space from the program point of view: Automatic overlaying mechanism; Only the memory that is really needed is instantiated; Memory protection between the programs; Memory sharing mechanism between programs; Program relocation within memory: The same program can be executed in any memory position; Decrease of programs start-up time: It is not necessary any change to the program compilation, independently of the memory position where the program will stay resident. Prof. Nuno Roma ACE 2010/11 - DEI-IST 9 / 32 Prof. Nuno Roma ACE 2010/11 - DEI-IST 10 / 32

9 Segmented Memory Each process uses a set of segments (code, data, stack) with variable dimension. The Segment table keeps, for each segment, information about: Starting address, at physical memory, or indication that such segment is currently not in memory; Dimension; Protection; Each memory reference requires: Segment index, within this table; Offset, within this segment (logic address) 2 words!!! Prof. Nuno Roma ACE 2010/11 - DEI-IST 11 / 32 Paged Memory Memory is divided in fixed-sized blocks, denoted as pages. Each process uses a given set of pages. The page table keeps, for each page used by the process, information about: Physical page index; Protection. Each entry in this table is usually denoted as Page Table Entry (PTE). The virtual address contains: Virtual page index Offset Each memory reference only requires one address: 1 word!!! Prof. Nuno Roma ACE 2010/11 - DEI-IST 12 / 32

10 Paged Memory Example: Pages with 4k(= 2 12 ) bytes, Physical memory with 256M(= 2 28 ) bytes, Virtual memory with 32G(= 2 35 ) bytes. Prof. Nuno Roma ACE 2010/11 - DEI-IST 13 / 32 Paged Memory Example: Pages with 4k(= 2 12 ) bytes, Physical memory with 256M(= 2 28 ) bytes, Virtual memory with 32G(= 2 35 ) bytes. Hence... the physical memory is composed of 64k(= 2 16 ) (10000h) pages and the virtual memory has 8M(= 2 23 ) (800000h) pages. 7FFFFFh 7FFFFEh. FFFFh FFFFh FFFEh. FFFEh. 0h 0h Physical Address Virtual Address Prof. Nuno Roma ACE 2010/11 - DEI-IST 13 / 32

11 Comparison Between Segmented and Paged Memory Paged Words per reference 1 2 Segmented Visible to the programmer no may be Block substitution easy problematic Memory use efficiency internal fragmentation external fragmentation Efficient disk traffic yes not always Table dimension big small There are hybrid schemes, where the segments are paginated. Prof. Nuno Roma ACE 2010/11 - DEI-IST 14 / 32 Objective: fast and functional Segmented: logic address = {segment index, offset} segment base = segments table [segment index] physical address = segment base + offset Several checks to the range and access rights are done in parallel. Paged: virtual address = {virtual page index offset} physical page index = page table [virtual page index] physical address = physical page index offset Access rights are done in parallel. Fault: The result of a query to the segments table / page table indicates that such segment / page currently is not in primary memory. Prof. Nuno Roma ACE 2010/11 - DEI-IST 15 / 32

12 Prof. Nuno Roma ACE 2010/11 - DEI-IST 16 / 32 : Paged Memory Prof. Nuno Roma ACE 2010/11 - DEI-IST 17 / 32

13 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Just as cache accommodates a subset of primary memory positions, the primary memory accommodates a subset of virtual memory positions. Block? Prof. Nuno Roma ACE 2010/11 - DEI-IST 18 / 32 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Just as cache accommodates a subset of primary memory positions, the primary memory accommodates a subset of virtual memory positions. Block = page Dimension? Prof. Nuno Roma ACE 2010/11 - DEI-IST 18 / 32

14 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Just as cache accommodates a subset of primary memory positions, the primary memory accommodates a subset of virtual memory positions. Block = page Dimension: Usually large, to increase the efficiency when acceding the disk (also reduces the dimension of translation tables). However, the bigger it is, the greatest is the potential memory waste (on average, 50% of the page dimension). Typical values are 4k and 8k bytes. Prof. Nuno Roma ACE 2010/11 - DEI-IST 18 / 32 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Just as cache accommodates a subset of primary memory positions, the primary memory accommodates a subset of virtual memory positions. Block = page Dimension: Usually large, to increase the efficiency when acceding the disk (also reduces the dimension of translation tables). However, the bigger it is, the greatest is the potential memory waste (on average, 50% of the page dimension). Typical values are 4k and 8k bytes. Where can a given block be placed in memory (i.e., set-associativity)? Prof. Nuno Roma ACE 2010/11 - DEI-IST 18 / 32

15 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Just as cache accommodates a subset of primary memory positions, the primary memory accommodates a subset of virtual memory positions. Block = page Dimension: Usually large, to increase the efficiency when acceding the disk (also reduces the dimension of translation tables). However, the bigger it is, the greatest is the potential memory waste (on average, 50% of the page dimension). Typical values are 4k and 8k bytes. Where can a given block be placed in memory (i.e., set-associativity): In any place of the memory (full associativity). Prof. Nuno Roma ACE 2010/11 - DEI-IST 18 / 32 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Substitution policy? Prof. Nuno Roma ACE 2010/11 - DEI-IST 19 / 32

16 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Substitution policy: LRU Software managed (OS) - allows more sophistication. Prof. Nuno Roma ACE 2010/11 - DEI-IST 19 / 32 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Substitution policy: LRU Software managed (OS) - allows more sophistication. Write policy? Prof. Nuno Roma ACE 2010/11 - DEI-IST 19 / 32

17 Cache - Primary Mem. vs Primary Mem. - Secondary Mem. Substitution policy: LRU Software managed (OS) - allows more sophistication. Write policy: Write-back: the disk access penalty is to high... Prof. Nuno Roma ACE 2010/11 - DEI-IST 19 / 32 Mean Access Time Mean access time: t access = t h + p m t p t h < 150 clock cycles. t p can be as high as 10,000,000 clock cycles! Prof. Nuno Roma ACE 2010/11 - DEI-IST 20 / 32

18 Mean Access Time Mean access time: t access = t h + p m t p t h < 150 clock cycles. t p can be as high as 10,000,000 clock cycles! Why does this work? Prof. Nuno Roma ACE 2010/11 - DEI-IST 20 / 32 Mean Access Time Mean access time: t access = t h + p m t p t h < 150 clock cycles. t p can be as high as 10,000,000 clock cycles! Why does this work? Because p m may be as low as %! t access = = 160 Prof. Nuno Roma ACE 2010/11 - DEI-IST 20 / 32

19 Mean Access Time Mean access time: t access = t h + p m t p t h < 150 clock cycles. t p can be as high as 10,000,000 clock cycles! Why does this work? Because p m may be as low as %! t access = = 160 Capacity misses: Few! The context corresponding to the set of programs under execution is usually smaller than the memory dimension (otherwise... thrashing). Conflict misses: Few! Full associative allocation policy. Compulsory misses: Usually, the most prevalent. Prof. Nuno Roma ACE 2010/11 - DEI-IST 20 / 32 Pages Table Dimension One common problem in paging systems is the dimension of the page table that is required to translate the addresses. Must be allocated in a contiguous region at physical memory. Example: Virtual space with 2 32 bytes, Pages with 4k(= 2 12 ) bytes, Descriptor with D = 4 bytes: Table with 2 20 entries (4M bytes). Prof. Nuno Roma ACE 2010/11 - DEI-IST 21 / 32

20 Hierarchical Page Tables One common solution to this problem is to implement the translation with a hierarchy of translation tables. Virtual address is seen as: Level 1 index Level 2 index Level n index Offset Prof. Nuno Roma ACE 2010/11 - DEI-IST 22 / 32 Hierarchical Page Tables Prof. Nuno Roma ACE 2010/11 - DEI-IST 23 / 32

21 Hierarchical Page Tables How much space is required to store the tables? Example: 2 levels, virtual address with 2 32 bytes and pages with 4k(= 2 12 ) bytes Level 1 index Level 2 index Offset Directory has 1024 entries. Each level 2 table has 1024 entries. The total is 1M entries, corresponding to 4M bytes, just as before! Only the directory must be always in memory: the higher level tables may be at disk! Prof. Nuno Roma ACE 2010/11 - DEI-IST 24 / 32 Hierarchical Page Tables How much space is required to store the tables? Example: 2 levels, virtual address with 2 32 bytes and pages with 4k(= 2 12 ) bytes Level 1 index Level 2 index Offset Directory has 1024 entries. Each level 2 table has 1024 entries. The total is 1M entries, corresponding to 4M bytes, just as before! Only the directory must be always in memory: the higher level tables may be at disk! Usually, it is adopted: Page tables with the same dimension as the tables; Only the pages under use have to be in primary memory; Only the required pages are instantiated. Prof. Nuno Roma ACE 2010/11 - DEI-IST 24 / 32

22 Hierarchical Page Tables How much space is required to store the tables? Example: 2 levels, virtual address with 2 32 bytes and pages with 4k(= 2 12 ) bytes Level 1 index Level 2 index Offset Directory has 1024 entries. Each level 2 table has 1024 entries. The total is 1M entries, corresponding to 4M bytes, just as before! Only the directory must be always in memory: the higher level tables may be at disk! Usually, it is adopted: Page tables with the same dimension as the tables; Only the pages under use have to be in primary memory; Only the required pages are instantiated. What happens if it is not possible to divide in equal-sized levels? Prof. Nuno Roma ACE 2010/11 - DEI-IST 24 / 32 Hierarchical Page Tables How much space is required to store the tables? Example: 2 levels, virtual address with 2 32 bytes and pages with 4k(= 2 12 ) bytes Level 1 index Level 2 index Offset Directory has 1024 entries. Each level 2 table has 1024 entries. The total is 1M entries, corresponding to 4M bytes, just as before! Only the directory must be always in memory: the higher level tables may be at disk! Usually, it is adopted: Page tables with the same dimension as the tables; Only the pages under use have to be in primary memory; Only the required pages are instantiated. What happens if it is not possible to divide in equal-sized levels? No Problem! Prof. Nuno Roma ACE 2010/11 - DEI-IST 24 / 32

23 Inverted Tables Address translation based in hash tables: A given hash function H(x) is applied to the virtual address to find out a particular queue of descriptors composed by pairs virtual page - physical page, whose corresponding virtual addresses lead to the same value of the hash function H(x) collisions. The required physical address may (or may not) be present in that queue of descriptors. Prof. Nuno Roma ACE 2010/11 - DEI-IST 25 / 32 Inverted Tables The inverted table translation system is implemented by using two tables: Entries Table: for each value of the hash function indicates the starting address of the corresponding queue. Collision Table: contains a list of physical pages whose corresponding virtual address give rise to the same value of the hash function H(x). Each entry has information about: Virtual page number; Protection; Pointer to the next entry. The entry that contains the virtual page number corresponding to the virtual address under translation corresponds to the index of the desired physical page. Dimension of the tables is determined by the number of physical pages and does not depend of the virtual space size. Prof. Nuno Roma ACE 2010/11 - DEI-IST 26 / 32

24 Inverted Tables Address translation based on inverted tables: Prof. Nuno Roma ACE 2010/11 - DEI-IST 27 / 32 Inverted Tables Example: Prof. Nuno Roma ACE 2010/11 - DEI-IST 28 / 32

25 Inverted Tables Tables dimension: Collision table has as many entries as the number of installed physical pages: Each entry has the following dimension: (V log 2 P ) + (F log 2 P )+protection bits Prof. Nuno Roma ACE 2010/11 - DEI-IST 29 / 32 Inverted Tables Tables dimension: Collision table has as many entries as the number of installed physical pages: Each entry has the following dimension: (V log 2 P ) + (F log 2 P )+protection bits Entries table is dimensioned to achieve a certain performance level: N: rows in the entries table; M: rows in the collision table (= physical pages) Load factor: α = M N Mean number of searched elements: S = 1 + α 2 Prof. Nuno Roma ACE 2010/11 - DEI-IST 29 / 32

26 Inverted Tables Hash function: should assure an uniform distribution of virtual pages in the several queues Prof. Nuno Roma ACE 2010/11 - DEI-IST 30 / 32 Inverted Tables Hash function: should assure an uniform distribution of virtual pages in the several queues Possible solution: Use the least significant bits of the virtual page index. Prof. Nuno Roma ACE 2010/11 - DEI-IST 30 / 32

27 Inverted Tables Hash function: should assure an uniform distribution of virtual pages in the several queues Possible solution: Use the least significant bits of the virtual page index. Example: Virtual memory with 1T (=2 40 ) bytes, physical memory with 512M (=2 29 ) bytes and pages with 8k (=2 13 ) bytes. It is required that, on average, only 2 descriptors are analyzed. Which bits should be used by the hash function? Prof. Nuno Roma ACE 2010/11 - DEI-IST 30 / 32 Inverted Tables Hash function: should assure an uniform distribution of virtual pages in the several queues Possible solution: Use the least significant bits of the virtual page index. Example: Virtual memory with 1T (=2 40 ) bytes, physical memory with 512M (=2 29 ) bytes and pages with 8k (=2 13 ) bytes. It is required that, on average, only 2 descriptors are analyzed. Which bits should be used by the hash function? M = # physical pages = = S = 1 + α 2 with α = M N, it comes: 2 = N N = 215 Among the 40 bits of the virtual address, the 13 least significant bits are used as the offset within the page. The following 15 bits are used by the hash function: bits 13 to 27. Prof. Nuno Roma ACE 2010/11 - DEI-IST 30 / 32

28 Prof. Nuno Roma ACE 2010/11 - DEI-IST 31 / 32 Virtual memory: Very large addressing spaces; Translation Lookaside Buffer (TLB); Virtual caches; Parallel access to the cache and TLB. Prof. Nuno Roma ACE 2010/11 - DEI-IST 32 / 32

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 16

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 14

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 06

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 07

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 11

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 05

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 03 Title: Processor

More information

Virtual to physical address translation

Virtual to physical address translation Virtual to physical address translation Virtual memory with paging Page table per process Page table entry includes present bit frame number modify bit flags for protection and sharing. Page tables can

More information

Virtual Memory Virtual memory first used to relive programmers from the burden of managing overlays.

Virtual Memory Virtual memory first used to relive programmers from the burden of managing overlays. CSE420 Virtual Memory Prof. Mokhtar Aboelaze York University Based on Slides by Prof. L. Bhuyan (UCR) Prof. M. Shaaban (RIT) Virtual Memory Virtual memory first used to relive programmers from the burden

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 04

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 12

More information

Memory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization

Memory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization Requirements Relocation Memory management ability to change process image position Protection ability to avoid unwanted memory accesses Sharing ability to share memory portions among processes Logical

More information

Computer Systems Architecture I. CSE 560M Lecture 18 Guest Lecturer: Shakir James

Computer Systems Architecture I. CSE 560M Lecture 18 Guest Lecturer: Shakir James Computer Systems Architecture I CSE 560M Lecture 18 Guest Lecturer: Shakir James Plan for Today Announcements No class meeting on Monday, meet in project groups Project demos < 2 weeks, Nov 23 rd Questions

More information

CPS 104 Computer Organization and Programming Lecture 20: Virtual Memory

CPS 104 Computer Organization and Programming Lecture 20: Virtual Memory CPS 104 Computer Organization and Programming Lecture 20: Virtual Nov. 10, 1999 Dietolf (Dee) Ramm http://www.cs.duke.edu/~dr/cps104.html CPS 104 Lecture 20.1 Outline of Today s Lecture O Virtual. 6 Paged

More information

CS252 S05. Main memory management. Memory hardware. The scale of things. Memory hardware (cont.) Bottleneck

CS252 S05. Main memory management. Memory hardware. The scale of things. Memory hardware (cont.) Bottleneck Main memory management CMSC 411 Computer Systems Architecture Lecture 16 Memory Hierarchy 3 (Main Memory & Memory) Questions: How big should main memory be? How to handle reads and writes? How to find

More information

Computer Science 146. Computer Architecture

Computer Science 146. Computer Architecture Computer Architecture Spring 2004 Harvard University Instructor: Prof. dbrooks@eecs.harvard.edu Lecture 18: Virtual Memory Lecture Outline Review of Main Memory Virtual Memory Simple Interleaving Cycle

More information

CPS104 Computer Organization and Programming Lecture 16: Virtual Memory. Robert Wagner

CPS104 Computer Organization and Programming Lecture 16: Virtual Memory. Robert Wagner CPS104 Computer Organization and Programming Lecture 16: Virtual Memory Robert Wagner cps 104 VM.1 RW Fall 2000 Outline of Today s Lecture Virtual Memory. Paged virtual memory. Virtual to Physical translation:

More information

Reducing Hit Times. Critical Influence on cycle-time or CPI. small is always faster and can be put on chip

Reducing Hit Times. Critical Influence on cycle-time or CPI. small is always faster and can be put on chip Reducing Hit Times Critical Influence on cycle-time or CPI Keep L1 small and simple small is always faster and can be put on chip interesting compromise is to keep the tags on chip and the block data off

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática Architectures for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 09

More information

Virtual Memory. control structures and hardware support

Virtual Memory. control structures and hardware support Virtual Memory control structures and hardware support 1 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time A process may be swapped in and

More information

Chapter 8. Virtual Memory

Chapter 8. Virtual Memory Operating System Chapter 8. Virtual Memory Lynn Choi School of Electrical Engineering Motivated by Memory Hierarchy Principles of Locality Speed vs. size vs. cost tradeoff Locality principle Spatial Locality:

More information

The memory of a program. Paging and Virtual Memory. Swapping. Paging. Physical to logical address mapping. Memory management: Review

The memory of a program. Paging and Virtual Memory. Swapping. Paging. Physical to logical address mapping. Memory management: Review The memory of a program Paging and Virtual Memory Operating Systems Spring 4 Source-code is compiled into linkable object modules Memory addresses given as relative offsets Libraries contain object modules

More information

Page 1. Review: Address Segmentation " Review: Address Segmentation " Review: Address Segmentation "

Page 1. Review: Address Segmentation  Review: Address Segmentation  Review: Address Segmentation Review Address Segmentation " CS162 Operating Systems and Systems Programming Lecture 10 Caches and TLBs" February 23, 2011! Ion Stoica! http//inst.eecs.berkeley.edu/~cs162! 1111 0000" 1110 000" Seg #"

More information

Multi-Process Systems: Memory (2) Memory & paging structures: free frames. Memory & paging structures. Physical memory

Multi-Process Systems: Memory (2) Memory & paging structures: free frames. Memory & paging structures. Physical memory Multi-Process Systems: Memory (2) What we will learn A detailed description of various ways of organizing memory Discuss various memory-management techniques, including paging and segmentation To provide

More information

Memory: Page Table Structure. CSSE 332 Operating Systems Rose-Hulman Institute of Technology

Memory: Page Table Structure. CSSE 332 Operating Systems Rose-Hulman Institute of Technology Memory: Page Table Structure CSSE 332 Operating Systems Rose-Hulman Institute of Technology General address transla+on CPU virtual address data cache MMU Physical address Global memory Memory management

More information

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. April 12, 2018 L16-1

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. April 12, 2018 L16-1 Virtual Memory Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. L16-1 Reminder: Operating Systems Goals of OS: Protection and privacy: Processes cannot access each other s data Abstraction:

More information

Computer Architecture. Lecture 8: Virtual Memory

Computer Architecture. Lecture 8: Virtual Memory Computer Architecture Lecture 8: Virtual Memory Dr. Ahmed Sallam Suez Canal University Spring 2015 Based on original slides by Prof. Onur Mutlu Memory (Programmer s View) 2 Ideal Memory Zero access time

More information

Memory Management. An expensive way to run multiple processes: Swapping. CPSC 410/611 : Operating Systems. Memory Management: Paging / Segmentation 1

Memory Management. An expensive way to run multiple processes: Swapping. CPSC 410/611 : Operating Systems. Memory Management: Paging / Segmentation 1 Memory Management Logical vs. physical address space Fragmentation Paging Segmentation An expensive way to run multiple processes: Swapping swap_out OS swap_in start swapping store memory ready_sw ready

More information

LECTURE 12. Virtual Memory

LECTURE 12. Virtual Memory LECTURE 12 Virtual Memory VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a cache for magnetic disk. The mechanism by which this is accomplished

More information

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 7: Memory Organization Part II

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 7: Memory Organization Part II ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 7: Organization Part II Ujjwal Guin, Assistant Professor Department of Electrical and Computer Engineering Auburn University, Auburn,

More information

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1 Virtual Memory Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. L20-1 Reminder: Operating Systems Goals of OS: Protection and privacy: Processes cannot access each other s data Abstraction:

More information

Operating Systems, Fall

Operating Systems, Fall Operating Systems: Memory management Fall 2008 Tiina Niklander Memory Management Programmer wants memory to be Indefinitely large Indefinitely fast Non volatile Memory hierarchy Memory manager handles

More information

Memory management: outline

Memory management: outline Memory management: outline Concepts Swapping Paging o Multi-level paging o TLB & inverted page tables 1 Memory size/requirements are growing 1951: the UNIVAC computer: 1000 72-bit words! 1971: the Cray

More information

Operating Systems, Fall

Operating Systems, Fall Operating Systems: Memory management Fall 2008 Basic Memory Management: One program Monoprogramming without Swapping or Paging Tiina Niklander No memory abstraction, no address space, just an operating

More information

Memory management: outline

Memory management: outline Memory management: outline Concepts Swapping Paging o Multi-level paging o TLB & inverted page tables 1 Memory size/requirements are growing 1951: the UNIVAC computer: 1000 72-bit words! 1971: the Cray

More information

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing UNIVERSIDADE TÉCNICA DE LISBOA INSTITUTO SUPERIOR TÉCNICO Departamento de Engenharia Informática for Embedded Computing MEIC-A, MEIC-T, MERC Lecture Slides Version 3.0 - English Lecture 22 Title: and Extended

More information

Operating Systems. 09. Memory Management Part 1. Paul Krzyzanowski. Rutgers University. Spring 2015

Operating Systems. 09. Memory Management Part 1. Paul Krzyzanowski. Rutgers University. Spring 2015 Operating Systems 09. Memory Management Part 1 Paul Krzyzanowski Rutgers University Spring 2015 March 9, 2015 2014-2015 Paul Krzyzanowski 1 CPU Access to Memory The CPU reads instructions and reads/write

More information

Chapter 5B. Large and Fast: Exploiting Memory Hierarchy

Chapter 5B. Large and Fast: Exploiting Memory Hierarchy Chapter 5B Large and Fast: Exploiting Memory Hierarchy One Transistor Dynamic RAM 1-T DRAM Cell word access transistor V REF TiN top electrode (V REF ) Ta 2 O 5 dielectric bit Storage capacitor (FET gate,

More information

1. Creates the illusion of an address space much larger than the physical memory

1. Creates the illusion of an address space much larger than the physical memory Virtual memory Main Memory Disk I P D L1 L2 M Goals Physical address space Virtual address space 1. Creates the illusion of an address space much larger than the physical memory 2. Make provisions for

More information

Chapter 8 Main Memory

Chapter 8 Main Memory COP 4610: Introduction to Operating Systems (Spring 2014) Chapter 8 Main Memory Zhi Wang Florida State University Contents Background Swapping Contiguous memory allocation Paging Segmentation OS examples

More information

Memory Management. Memory Management

Memory Management. Memory Management Memory Management Gordon College Stephen Brinton Memory Management Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging 1 Background Program must be brought into memory

More information

VIRTUAL MEMORY II. Jo, Heeseung

VIRTUAL MEMORY II. Jo, Heeseung VIRTUAL MEMORY II Jo, Heeseung TODAY'S TOPICS How to reduce the size of page tables? How to reduce the time for address translation? 2 PAGE TABLES Space overhead of page tables The size of the page table

More information

CS307 Operating Systems Main Memory

CS307 Operating Systems Main Memory CS307 Main Memory Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2018 Background Program must be brought (from disk) into memory and placed within a process

More information

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science Virtual Memory CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition of the course text Operating

More information

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1 Virtual Memory Patterson & Hennessey Chapter 5 ELEC 5200/6200 1 Virtual Memory Use main memory as a cache for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs

More information

CS 152 Computer Architecture and Engineering. Lecture 11 - Virtual Memory and Caches

CS 152 Computer Architecture and Engineering. Lecture 11 - Virtual Memory and Caches CS 152 Computer Architecture and Engineering Lecture 11 - Virtual Memory and Caches Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste

More information

memory management Vaibhav Bajpai

memory management Vaibhav Bajpai memory management Vaibhav Bajpai OS 2013 motivation virtualize resources: multiplex CPU multiplex memory (CPU scheduling) (memory management) why manage memory? controlled overlap processes should NOT

More information

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 27 (Final Exam Review) Summer 2018 Overview Objective: Revise topics and questions for the final-exam. 1. Main Memory 2. Virtual Memory 3. Mass Storage

More information

Virtual Memory: From Address Translation to Demand Paging

Virtual Memory: From Address Translation to Demand Paging Constructive Computer Architecture Virtual Memory: From Address Translation to Demand Paging Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology November 12, 2014

More information

CPE300: Digital System Architecture and Design

CPE300: Digital System Architecture and Design CPE300: Digital System Architecture and Design Fall 2011 MW 17:30-18:45 CBC C316 Virtual Memory 11282011 http://www.egr.unlv.edu/~b1morris/cpe300/ 2 Outline Review Cache Virtual Memory Projects 3 Memory

More information

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY MANAGEMENT Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the

More information

Move back and forth between memory and disk. Memory Hierarchy. Two Classes. Don t

Move back and forth between memory and disk. Memory Hierarchy. Two Classes. Don t Memory Management Ch. 3 Memory Hierarchy Cache RAM Disk Compromise between speed and cost. Hardware manages the cache. OS has to manage disk. Memory Manager Memory Hierarchy Cache CPU Main Swap Area Memory

More information

Memory Management Ch. 3

Memory Management Ch. 3 Memory Management Ch. 3 Ë ¾¾ Ì Ï ÒÒØ Å ÔÔ ÓÐÐ 1 Memory Hierarchy Cache RAM Disk Compromise between speed and cost. Hardware manages the cache. OS has to manage disk. Memory Manager Ë ¾¾ Ì Ï ÒÒØ Å ÔÔ ÓÐÐ

More information

Chapter 5 Memory Hierarchy Design. In-Cheol Park Dept. of EE, KAIST

Chapter 5 Memory Hierarchy Design. In-Cheol Park Dept. of EE, KAIST Chapter 5 Memory Hierarchy Design In-Cheol Park Dept. of EE, KAIST Why cache? Microprocessor performance increment: 55% per year Memory performance increment: 7% per year Principles of locality Spatial

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Operating System Concepts 8 th Edition,! Silberschatz, Galvin and Gagne 2009! Chapter 8: Memory Management Background" Swapping " Contiguous Memory Allocation" Paging" Structure

More information

Chapter 9: Memory Management. Background

Chapter 9: Memory Management. Background 1 Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging 9.1 Background Program must be brought into memory and placed within a process for

More information

EEC 170 Computer Architecture Fall Cache Introduction Review. Review: The Memory Hierarchy. The Memory Hierarchy: Why Does it Work?

EEC 170 Computer Architecture Fall Cache Introduction Review. Review: The Memory Hierarchy. The Memory Hierarchy: Why Does it Work? EEC 17 Computer Architecture Fall 25 Introduction Review Review: The Hierarchy Take advantage of the principle of locality to present the user with as much memory as is available in the cheapest technology

More information

CHAPTER 4 MEMORY HIERARCHIES TYPICAL MEMORY HIERARCHY TYPICAL MEMORY HIERARCHY: THE PYRAMID CACHE PERFORMANCE MEMORY HIERARCHIES CACHE DESIGN

CHAPTER 4 MEMORY HIERARCHIES TYPICAL MEMORY HIERARCHY TYPICAL MEMORY HIERARCHY: THE PYRAMID CACHE PERFORMANCE MEMORY HIERARCHIES CACHE DESIGN CHAPTER 4 TYPICAL MEMORY HIERARCHY MEMORY HIERARCHIES MEMORY HIERARCHIES CACHE DESIGN TECHNIQUES TO IMPROVE CACHE PERFORMANCE VIRTUAL MEMORY SUPPORT PRINCIPLE OF LOCALITY: A PROGRAM ACCESSES A RELATIVELY

More information

CS 5523 Operating Systems: Memory Management (SGG-8)

CS 5523 Operating Systems: Memory Management (SGG-8) CS 5523 Operating Systems: Memory Management (SGG-8) Instructor: Dr Tongping Liu Thank Dr Dakai Zhu, Dr Palden Lama, and Dr Tim Richards (UMASS) for providing their slides Outline Simple memory management:

More information

Chapter 8: Main Memory

Chapter 8: Main Memory Chapter 8: Main Memory Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The Intel Pentium 8.2 Silberschatz, Galvin

More information

Memory Management! How the hardware and OS give application pgms:" The illusion of a large contiguous address space" Protection against each other"

Memory Management! How the hardware and OS give application pgms: The illusion of a large contiguous address space Protection against each other Memory Management! Goals of this Lecture! Help you learn about:" The memory hierarchy" Spatial and temporal locality of reference" Caching, at multiple levels" Virtual memory" and thereby " How the hardware

More information

Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation

Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Basic Hardware Address Binding Logical VS Physical Address Space Dynamic Loading Dynamic Linking and Shared

More information

Module 8: Memory Management

Module 8: Memory Management Module 8: Memory Management Background Logical versus Physical Address Space Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging Operating System Concepts 8.1 Silberschatz and Galvin

More information

Memory Management. CSCI 315 Operating Systems Design Department of Computer Science

Memory Management. CSCI 315 Operating Systems Design Department of Computer Science Memory Management CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture are based on those from Operating Systems Concepts, 9th ed., by Silberschatz, Galvin,

More information

Modern Virtual Memory Systems. Modern Virtual Memory Systems

Modern Virtual Memory Systems. Modern Virtual Memory Systems 6.823, L12--1 Modern Virtual Systems Asanovic Laboratory for Computer Science M.I.T. http://www.csg.lcs.mit.edu/6.823 6.823, L12--2 Modern Virtual Systems illusion of a large, private, uniform store Protection

More information

a process may be swapped in and out of main memory such that it occupies different regions

a process may be swapped in and out of main memory such that it occupies different regions Virtual Memory Characteristics of Paging and Segmentation A process may be broken up into pieces (pages or segments) that do not need to be located contiguously in main memory Memory references are dynamically

More information

Operating Systems. Paging... Memory Management 2 Overview. Lecture 6 Memory management 2. Paging (contd.)

Operating Systems. Paging... Memory Management 2 Overview. Lecture 6 Memory management 2. Paging (contd.) Operating Systems Lecture 6 Memory management 2 Memory Management 2 Overview Paging (contd.) Structure of page table Shared memory Segmentation Segmentation with paging Virtual memory Just to remind you...

More information

Operating System Support

Operating System Support Operating System Support Objectives and Functions Convenience Making the computer easier to use Efficiency Allowing better use of computer resources Layers and Views of a Computer System Operating System

More information

Memory management units

Memory management units Memory management units Memory management unit (MMU) translates addresses: CPU logical address memory management unit physical address main memory Computers as Components 1 Access time comparison Media

More information

Address Translation. Tore Larsen Material developed by: Kai Li, Princeton University

Address Translation. Tore Larsen Material developed by: Kai Li, Princeton University Address Translation Tore Larsen Material developed by: Kai Li, Princeton University Topics Virtual memory Virtualization Protection Address translation Base and bound Segmentation Paging Translation look-ahead

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 L17 Main Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ Was Great Dijkstra a magician?

More information

Chapter 8 Virtual Memory

Chapter 8 Virtual Memory Operating Systems: Internals and Design Principles Chapter 8 Virtual Memory Seventh Edition William Stallings Modified by Rana Forsati for CSE 410 Outline Principle of locality Paging - Effect of page

More information

Virtual Memory: Mechanisms. CS439: Principles of Computer Systems February 28, 2018

Virtual Memory: Mechanisms. CS439: Principles of Computer Systems February 28, 2018 Virtual Memory: Mechanisms CS439: Principles of Computer Systems February 28, 2018 Last Time Physical addresses in physical memory Virtual/logical addresses in process address space Relocation Algorithms

More information

Memory Management. Disclaimer: some slides are adopted from book authors slides with permission 1

Memory Management. Disclaimer: some slides are adopted from book authors slides with permission 1 Memory Management Disclaimer: some slides are adopted from book authors slides with permission 1 CPU management Roadmap Process, thread, synchronization, scheduling Memory management Virtual memory Disk

More information

Virtual Memory: From Address Translation to Demand Paging

Virtual Memory: From Address Translation to Demand Paging Constructive Computer Architecture Virtual Memory: From Address Translation to Demand Paging Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology November 9, 2015

More information

Introduction to Operating Systems

Introduction to Operating Systems Introduction to Operating Systems Lecture 6: Memory Management MING GAO SE@ecnu (for course related communications) mgao@sei.ecnu.edu.cn Apr. 22, 2015 Outline 1 Issues of main memory 2 Main memory management

More information

ECE468 Computer Organization and Architecture. Virtual Memory

ECE468 Computer Organization and Architecture. Virtual Memory ECE468 Computer Organization and Architecture Virtual Memory ECE468 vm.1 Review: The Principle of Locality Probability of reference 0 Address Space 2 The Principle of Locality: Program access a relatively

More information

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD OPERATING SYSTEMS #8 After A.S.Tanenbaum, Modern Operating Systems 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD MEMORY MANAGEMENT MEMORY MANAGEMENT The memory is one of

More information

CSE 120. Translation Lookaside Buffer (TLB) Implemented in Hardware. July 18, Day 5 Memory. Instructor: Neil Rhodes. Software TLB Management

CSE 120. Translation Lookaside Buffer (TLB) Implemented in Hardware. July 18, Day 5 Memory. Instructor: Neil Rhodes. Software TLB Management CSE 120 July 18, 2006 Day 5 Memory Instructor: Neil Rhodes Translation Lookaside Buffer (TLB) Implemented in Hardware Cache to map virtual page numbers to page frame Associative memory: HW looks up in

More information

I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY

I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY MANAGEMENT Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of

More information

SMD149 - Operating Systems - Memory

SMD149 - Operating Systems - Memory SMD149 - Operating Systems - Memory Roland Parviainen November 8, 2005 1/57 Outline Overview Mostly historical management Paging 2/57 Overview 3/57 Memory hierarchy Memory divided into tiers Main memory

More information

ECE4680 Computer Organization and Architecture. Virtual Memory

ECE4680 Computer Organization and Architecture. Virtual Memory ECE468 Computer Organization and Architecture Virtual Memory If I can see it and I can touch it, it s real. If I can t see it but I can touch it, it s invisible. If I can see it but I can t touch it, it

More information

Virtual Memory. Chapter 8

Virtual Memory. Chapter 8 Chapter 8 Virtual Memory What are common with paging and segmentation are that all memory addresses within a process are logical ones that can be dynamically translated into physical addresses at run time.

More information

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses. 1 Memory Management Address Binding The normal procedures is to select one of the processes in the input queue and to load that process into memory. As the process executed, it accesses instructions and

More information

csci 3411: Operating Systems

csci 3411: Operating Systems csci 3411: Operating Systems Memory Management II Gabriel Parmer Slides adapted from Silberschatz and West Each Process has its Own Little World Virtual Address Space Picture from The

More information

198:231 Intro to Computer Organization. 198:231 Introduction to Computer Organization Lecture 14

198:231 Intro to Computer Organization. 198:231 Introduction to Computer Organization Lecture 14 98:23 Intro to Computer Organization Lecture 4 Virtual Memory 98:23 Introduction to Computer Organization Lecture 4 Instructor: Nicole Hynes nicole.hynes@rutgers.edu Credits: Several slides courtesy of

More information

CS 3733 Operating Systems:

CS 3733 Operating Systems: CS 3733 Operating Systems: Topics: Memory Management (SGG, Chapter 08) Instructor: Dr Dakai Zhu Department of Computer Science @ UTSA 1 Reminders Assignment 2: extended to Monday (March 5th) midnight:

More information

Memory Management. Memory

Memory Management. Memory Memory Management These slides are created by Dr. Huang of George Mason University. Students registered in Dr. Huang s courses at GMU can make a single machine readable copy and print a single copy of

More information

Virtual Memory. User memory model so far:! In reality they share the same memory space! Separate Instruction and Data memory!!

Virtual Memory. User memory model so far:! In reality they share the same memory space! Separate Instruction and Data memory!! Virtual Memory User memory model so far:! Separate Instruction and Data memory!! In reality they share the same memory space!!! 0x00000000 User space Instruction memory 0x7fffffff Data memory MicroComuter

More information

stack Two-dimensional logical addresses Fixed Allocation Binary Page Table

stack Two-dimensional logical addresses Fixed Allocation Binary Page Table Question # 1 of 10 ( Start time: 07:24:13 AM ) Total Marks: 1 LRU page replacement algorithm can be implemented by counter stack linked list all of the given options Question # 2 of 10 ( Start time: 07:25:28

More information

Memory Management! Goals of this Lecture!

Memory Management! Goals of this Lecture! Memory Management! Goals of this Lecture! Help you learn about:" The memory hierarchy" Why it works: locality of reference" Caching, at multiple levels" Virtual memory" and thereby " How the hardware and

More information

MEMORY HIERARCHY BASICS. B649 Parallel Architectures and Programming

MEMORY HIERARCHY BASICS. B649 Parallel Architectures and Programming MEMORY HIERARCHY BASICS B649 Parallel Architectures and Programming BASICS Why Do We Need Caches? 3 Overview 4 Terminology cache virtual memory memory stall cycles direct mapped valid bit block address

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 23

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 23 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 208 Lecture 23 LAST TIME: VIRTUAL MEMORY Began to focus on how to virtualize memory Instead of directly addressing physical memory, introduce a level of indirection

More information

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems Instructor: Dr. Turgay Korkmaz Department Computer Science The University of Texas at San Antonio Office: NPB

More information

Address Translation. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Address Translation. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University Address Translation Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics How to reduce the size of page tables? How to reduce the time for

More information

Paging! 2/22! Anthony D. Joseph and Ion Stoica CS162 UCB Fall 2012! " (0xE0)" " " " (0x70)" " (0x50)"

Paging! 2/22! Anthony D. Joseph and Ion Stoica CS162 UCB Fall 2012!  (0xE0)    (0x70)  (0x50) CS162 Operating Systems and Systems Programming Lecture 10 Caches and TLBs" February 22, 2011! Anthony D. Joseph and Ion Stoica! http//inst.eecs.berkeley.edu/~cs162! Segmentation! Paging! Recap Segmentation

More information

Chapter 8 Memory Management

Chapter 8 Memory Management Chapter 8 Memory Management Da-Wei Chang CSIE.NCKU Source: Abraham Silberschatz, Peter B. Galvin, and Greg Gagne, "Operating System Concepts", 9th Edition, Wiley. 1 Outline Background Swapping Contiguous

More information

Objectives and Functions Convenience. William Stallings Computer Organization and Architecture 7 th Edition. Efficiency

Objectives and Functions Convenience. William Stallings Computer Organization and Architecture 7 th Edition. Efficiency William Stallings Computer Organization and Architecture 7 th Edition Chapter 8 Operating System Support Objectives and Functions Convenience Making the computer easier to use Efficiency Allowing better

More information

8.1 Background. Part Four - Memory Management. Chapter 8: Memory-Management Management Strategies. Chapter 8: Memory Management

8.1 Background. Part Four - Memory Management. Chapter 8: Memory-Management Management Strategies. Chapter 8: Memory Management Part Four - Memory Management 8.1 Background Chapter 8: Memory-Management Management Strategies Program must be brought into memory and placed within a process for it to be run Input queue collection of

More information

How to create a process? What does process look like?

How to create a process? What does process look like? How to create a process? On Unix systems, executable read by loader Compile time runtime Ken Birman ld loader Cache Compiler: generates one object file per source file Linker: combines all object files

More information