Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?

Slides:



Advertisements
Similar presentations
CDA 3100 Recitation Week 10.
Advertisements

HW/Study Guide. Synchronization Make sure you understand the HW problems!
1 CMPT 300 Introduction to Operating Systems Virtual Memory Sample Questions.
3.3 Paging PAGE TABLE Logical memory Physical memory page frame
Base 10 Denary Decimal
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.
1. 1. Database address space 2. Virtual address space 3. Map table 4. Translation table 5. Swizzling and UnSwizzling 6. Pinned Blocks 2.
 Just as processes share the CPU, they also share physical memory. This section is about mechanisms for doing that sharing. EXAMPLE OF MEMORY USAGE Calculation.
Allocating Memory.
CSC 4250 Computer Architectures December 8, 2006 Chapter 5. Memory Hierarchy.
Day 20 Memory Management. Assumptions A process need not be stored as one contiguous block. The entire process must reside in main memory.
Memory Management Design & Implementation Segmentation Chapter 4.
+======-========-========-========-========-========-========-========-========+ | Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |Byte | | | | | | | | | |======+=======================================================================|
Memory Problems Prof. Sin-Min Lee Department of Mathematics and Computer Sciences.
Answer to exercises(2) P74, 2.1 (a) =6B 16 (b) = (d) = (f) F3A5 8 =
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.
Contiguous Allocation of Disk Space. Linked Allocation.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Memory Management Ch.8.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 32 Paging Read Ch. 9.4.
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 08 Main Memory (Page table questions)
File Systems Dr John Cowell phones off (please). Q 1 Which of the following statements about NTFS is NOT true? a) NTFS uses 64 bit addressing. b) Supports.
A sample data structure for N-level page tables. Sample Data Structure PageTable – Contains information about the tree Level – A structure describing.
Paging Example What is the data corresponding to the logical address below:
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Chapter 91 Logical Address in Paging  Page size always chosen as a power of 2.  Example: if 16 bit addresses are used and page size = 1K, we need 10.
Binary Lesson 5 Counting. Powers of 2 One bit has 2 possible values (2^1) One bit has 2 possible values (2^1) 0 or 1 0 or 1 Two bits have 4 possible values.
Homework Assignment #3 J. H. Wang Nov. 13, 2015.
Paging Paging is a memory-management scheme that permits the physical-address space of a process to be noncontiguous. Paging avoids the considerable problem.
Allocation Methods An allocation method refers to how disk blocks are allocated for files: Contiguous allocation Linked allocation Indexed allocation.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Operating Systems, Winter Semester 2011 Practical Session 9, Memory 1.
Main Memory: Paging and Segmentation CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Memory Management & Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
Memory: Page Table Structure CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Introduction to Paging. Readings r 4.3 of the text book.
Memory: Page Table Structure
VIRTUAL MEMORY.
CS 140 Lecture Notes: Virtual Memory
Binary and Logic Computers use electrical signals that are on or off, so they have to see everything as a series of binary numbers. This data is represented.
Section 8 Address Translation March 10th, 2017 Taught by Joshua Don.
Tutorial Nine Cache CompSci Semester One 2016.
Figure 6-1: Memory Byte Addressing in ARM
Paging COMP 755.
COMBINED PAGING AND SEGMENTATION
HW/Study Guide.
Day 19 Memory Management.
CSCI206 - Computer Organization & Programming
Theory: 2.6 – Data Representation
Binary Code  
Paging Lecture November 2018.
Background Program must be brought into memory and placed within a process for it to be run. Input queue – collection of processes on the disk that are.
Computer Architecture
Lecture 32 Syed Mansoor Sarwar
Help! How does cache work?
Operating Systems Placement Algorithm Alok Kumar Jagadev.
CS 140 Lecture Notes: Virtual Memory
Main Memory Session - 16.
So far in memory management…
Binary  Name: Class: .
2P13 Week 7.
Lab 10 Paging.
Paging Memory Relocation and Fragmentation Paging
CS 140 Lecture Notes: Virtual Memory
Digital Logic Design.
Subnetting Subnetting is a method for getting the most out of the limited 32-bit IP addressing space. With any address class, subnetting provides a means.
Memory Management & Virtual Memory
Virtual Memory 1 1.
Presentation transcript:

Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?

Answer: 2^5 = 32. Assuming a 15-bit address space with 8 logical pages. How large are the pages?

Answer: 2^5 = 32. Assuming a 15-bit address space with 8 logical pages. How large are the pages? Answer: 2^12 = 4K. It takes 3 bits to reference 8 logical pages (2^3 = 8). This leaves 12 bits for the page size thus pages are 2^12.

Consider logical address 1025 and the following page table for some process P0. Assume a 15-bit address space with a page size of 1K. What is the physical address to which logical address 1025 will be mapped? 8 2

Consider logical address 1025 and the following page table for some process P0. Assume a 15-bit address space with a page size of 1K. What is the physical address to which logical address 1025 maps? Step 1. Convert to binary: 000010000000001 8 2

Consider logical address 1025 and the following page table for some process P0. Assume a 15-bit address space with a page size of 1K. What is the physical address to which logical address 1025 maps? Step2. Determine the logical page number: Since there are 5-bits allocated to the logical page, the address is broken up as follows: 00001 0000000001 Logical page number offset within page 8 2

Consider logical address 1025 and the following page table for some process P0. What is the physical address? Step 3. Use logical page number as an index into the page table. 00001 0000000001 8 2 00001

Consider logical address 1025 and the following page table for some process P0. What is the physical address? Take the physical page number from the page table and concatenate the offset. The physical address is byte 1. 000000000000001 8 2 00001