Segmentation Lecture 16 22 November 2018.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Paging Hardware With TLB
Memory Management.
03/10/2004CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
1 Friday, June 30, 2006 "Man's mind, once stretched by a new idea, never regains its original dimensions." - Oliver Wendell Holmes, Jr.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
Chapter 7: Main Memory CS 170, Fall Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation.
A. Frank - P. Weisberg Operating Systems Simple/Basic Segmentation.
03/17/2008CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 346, Royden, Operating System Concepts Operating Systems Lecture 24 Paging.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation.
Memory Management -1 Background Swapping Memory Management Schemes
Example of a Resource Allocation Graph CS1252-OPERATING SYSTEM UNIT III1.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 32 Paging Read Ch. 9.4.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-7 Memory Management (1) Department of Computer Science and Software.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 8: Main Memory.
Operating Systems Chapter 8
CS212: OPERATING SYSTEM Lecture 5: Memory Management Strategies 1 Computer Science Department.
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.
Silberschatz and Galvin  Operating System Concepts Module 8: Memory Management Background Logical versus Physical Address Space Swapping Contiguous.
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.
CSC 360, Instructor Kui Wu Memory Management I: Main Memory.
Chapter 8: Main Memory. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Memory and Addressing It all starts.
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.
Memory Management 1. Outline Background Logical versus Physical Address Space Swapping Contiguous Allocation Paging Segmentation 2.
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.
W4118 Operating Systems Instructor: Junfeng Yang.
Main Memory: Paging and Segmentation CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition, Chapter 8: Memory- Management Strategies.
MEMORY MANAGEMENT. memory management  In a multiprogramming system, in order to share the processor, a number of processes must be kept in memory. 
Module 9: Memory Management
Chapter 9: Memory Management
UNIT–IV: Memory Management
Chapter 8: Memory Management
Simple/Basic Segmentation
Chapter 8: Main Memory.
Chapter 8: Memory Management
Paging and Segmentation
Chapter 8: Main Memory.
Chapter 8: Main Memory.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy 11/12/2018.
Storage Management Chapter 9: Memory Management
Chapter 8: Main Memory.
Operating System Concepts
Module 9: Memory Management
Chapter 8: Main Memory.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 8 11/24/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.
CSS 430: Operating Systems - Main Memory
Multistep Processing of a User Program
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 12/1/2018.
So far… Text RO …. printf() RW link printf Linking, loading
Memory Management-I 1.
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 32 Syed Mansoor Sarwar
Main Memory Session - 16.
Lecture 3: Main Memory.
Chapter 8: Memory Management strategies
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 4/5/2019.
Lecture 35 Syed Mansoor Sarwar
Chapter 8 Memory Management
Chapter 8: Main Memory.
CSE 542: Operating Systems
Page Main Memory.
Presentation transcript:

Segmentation Lecture 16 22 November 2018

Segmentation A memory management scheme that supports programmer’s view of memory. A segment is a logical unit such as: main program, procedure, function, method, object, global variables, stack, symbol table A program is a collection of segments 22 November 2018

Segmentation 22 November 2018

Segmentation 1 2 3 4 5 logical memory physical memory 22 November 2018

Segmentation 1 1 4 2 5 3 4 2 3 5 1 4 2 3 logical memory physical memory 22 November 2018

Segmentation 1 4 1 2 5 3 2 4 3 5 1 4 2 3 segment table physical memory logical memory physical memory 22 November 2018

Segmentation Logical address consists of a two tuple: <segment-number, offset> Segment table – maps two-dimensional logical addresses to physical addresses 22 November 2018

Segmentation Each segment table entry has: base – contains the starting physical address where the segments reside in memory. limit – specifies the length of the segment. 22 November 2018

Segmentation Segment-table base register (STBR) points to the segment table’s location in memory. Segment-table length register (STLR) indicates number of segments used by a program Segment number s is legal if s < STLR 22 November 2018

Segmentation CPU 22 November 2018

Segmentation Architecture Relocation Dynamic By segment table Sharing Shared segments Same segment number 22 November 2018

Segmentation Architecture Dynamic Storage Allocation First fit Best fit Worst fit External fragmentation 22 November 2018

Segmentation Architecture Protection: Bits are associated for this purpose with each entry in segment table: Validation bit = 0  illegal segment Read, write, execute bits 22 November 2018

Example 22 November 2018

Address Translation Logical and Physical Addresses (2, 399) – PA: 4300+399 = 4699 (4, 0) – PA: 4700+0 = 4700 (4, 1000)  trap (3, 1300)  trap (6, 297)  trap 22 November 2018

Sharing of Segments Sharing at the segment level and not at the fixed-size page level Sharing at the code or data level Segment table of multiple processes point to the same segment 22 November 2018

Sharing of Segments 22 November 2018

Issues with Segmentation External Fragmentation Total memory space exists to satisfy a space allocation request for a segment, but memory space is not contiguous. 22 November 2018

Issues with Segmentation Reduce external fragmentation by compaction Shuffle segments to place free memory together in one block. Compaction is possible only if relocation is dynamic, and is done at execution time. 22 November 2018

Issues with Segmentation I/O problem Latch job in memory while it is involved in I/O. Do I/O only into OS buffers Very large segments  page program segments—paged segmentation 22 November 2018