Paging Example What is the data corresponding to the logical address below: 0000 1001 1110 0101.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Part IV: Memory Management
Paging Hardware With TLB
4/14/2017 Discussed Earlier segmentation - the process address space is divided into logical pieces called segments. The following are the example of types.
Main Memory Operating System Concepts chapter 8 CS 355
Chapter 8.3: Memory Management
Memory Management (II)
Linux Vs. Windows NT Memory Management Hitesh Kumar
CE6105 Linux 作業系統 Linux Operating System 許 富 皓. Chapter 2 Memory Addressing.
Memory Management.
Chapter 3.2 : Virtual Memory
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
Memory Management Chapter 5.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Ch 8: Memory Management Dr. Mohamed Hefeeda.
Chapter 7: Main Memory CS 170, Fall Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation.
CS2422 Assembly Language & System Programming September 22, 2005.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
Silberschatz, Galvin and Gagne  Operating System Concepts Segmentation Memory-management scheme that supports user view of memory. A program.
A. Frank - P. Weisberg Operating Systems Simple/Basic Segmentation.
Main Memory. Background Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are only.
1 Memory Management in Representative Operating Systems.
Virtual Memory  Early computers had a small and fixed amount to memory. All programs had to be able to fit in this memory. Overlays were used when the.
Operating System Machine Level  An operating system is a program that, from the programmer’s point of view, adds a variety of new instructions and features,
Chapter 8: Main Memory.
Memory Management Ch.8.
CS 346 – Chapter 8 Main memory –Addressing –Swapping –Allocation and fragmentation –Paging –Segmentation Commitment –Please finish chapter 8.
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally MEMORYMANAGEMNT.
Operating Systems Chapter 8
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 08 Main Memory (Page table questions)
Exam2 Review Bernard Chen Spring Deadlock Example semaphores A and B, initialized to 1 P0 P1 wait (A); wait(B) wait (B); wait(A)
8.4 paging Paging is a memory-management scheme that permits the physical address space of a process to be non-contiguous. The basic method for implementation.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Acknowledgments: Some of the slides are adapted from Prof.
Page 110/20/2015 CSE 30341: Operating Systems Principles So far…  Page  Fixed size pages solve page allocation problem (and external fragmentation) 
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.
1 Linux Operating System 許 富 皓. 2 Memory Addressing.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
8.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Implementation of Page Table Page table is kept in main memory Page-table base.
CE Operating Systems Lecture 14 Memory management.
1 Memory Management (b). 2 Paging  Logical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter.
9.1 Operating System Concepts Paging Example. 9.2 Operating System Concepts.
CSCI 156: Lab 11 Paging. Our Simple Architecture Logical memory space for a process consists of 16 pages of 4k bytes each. Your program thinks it has.
Memory Management. Background Memory consists of a large array of words or bytes, each with its own address. The CPU fetches instructions from memory.
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Fragmentation External Fragmentation – total memory space exists to satisfy.
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.
Chapter 8: Memory Management. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 8: Memory Management Background Swapping Contiguous.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Example: The Intel 32 and 64-bit Architectures Dominant industry chips.
W4118 Operating Systems Instructor: Junfeng Yang.
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 MANAGEMENT. memory management  In a multiprogramming system, in order to share the processor, a number of processes must be kept in memory. 
Introduction to Paging. Readings r 4.3 of the text book.
COMBINED PAGING AND SEGMENTATION
Simple/Basic Segmentation
Paging and Segmentation
Chapter 8: Main Memory.
Practice Six Chapter Eight.
Segmentation 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.
Memory Management-I 1.
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 36 Syed Mansoor Sarwar
Main Memory Session - 16.
Lecture 3: Main Memory.
Lecture 35 Syed Mansoor Sarwar
Assembly Language for Intel-Based Computers, 5th Edition
Chapter 8: Main Memory CSS503 Systems Programming
Presentation transcript:

Paging Example What is the data corresponding to the logical address below:

Hash Page Table Hash Page table is commonly used in systems with address spaces larger than 32 bit So what is a hash table?

Hash Page Table Each element consists of three fields: 1. The virtual page number 2. The value of the mapped page frame 3. A pointer to the next element

Hash Page Table

8.6 Segmentation Since the user’s view of memory is not the same as the actual physical memory, segmentation helps user to view memory as a collection of variable-size segment Segmentation is a memory management scheme that supports user view of memory

Segmentation A program is a collection of segments. A segment is a logical unit such as: main program, procedure, function, method, object, local variables, global variables, common block, stack, symbol table, arrays

Segmentation

The user specifies each address by two quantities: a segment name and an offset Compare with page scheme, user specifies only a single address, which is partitioned by hardware into a page number and an offset, all invisible to the programmer

Segmentation Although the user can refer to objects in the program by a two-dimensional address, the actual physical address is still a one- dimensional sequence Thus, we need to map the segment number This mapping is effected by a segment table In order to protect the memory space, each entry in segment table has a segment base and a segment limit

Segmentation Hardware

Example of Segmentation For example, segment 2 starts from 4300 with size 400, if we reference to byte 53 of segment 2, it mapped to 4335 A reference to segment 3, byte 852? A reference to segment 0, byte 1222?

8.7 Example: Intel Pentium In Pentium system, the CPU generates logical address, which are given to the segmentation unit The segmentation unit produces a linear address for each logical address Then the linear address is then given to paging unit, which in turn generates the physical address in main memory.

Pentium paging The Pentium architecture allows a page size of either 4KB or 4MB. For 4KB pages, the Pentium uses a two level paging scheme in which division of the 32 bit linear address as:

Pentium paging

Linux on Pentium System Although the Pentium uses a two-level paging model, Linux is designed to run on a variety of hardware platform, many of which are 64- bit platforms Therefore, two-level paging is not plausible Thus, Linux has adopted a three level paging strategy that works well for both 32-bit and 64-bit architectures

Linux on Pentium System The linear address is Linux is broken into the following four parts: The number of bits in each part varies according to architecture How does Linux apply its three-level model on the Pentium? The size of middle directory is zero bits