Segmentation ITCS /25/2013. Group #2: Daniel Scroggins Farida Bestowros Rowena Winston Vitali Kuyel Willie Holguin

Similar documents
Memory management, part 3: outline

Memory management, part 3: outline

Modeling Page Replacement: Stack Algorithms. Design Issues for Paging Systems

Operating Systems. Memory Management. Lecture 9 Michael O Boyle

Virtual Memory 1. To do. q Segmentation q Paging q A hybrid system

MEMORY MANAGEMENT/1 CS 409, FALL 2013

Memory and multiprogramming

Virtual Memory. Today. Segmentation Paging A good, if common example

Virtual Memory. control structures and hardware support

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition

Operating Systems, Fall Lecture 5, Tiina Niklander 1

MEMORY MANAGEMENT. Jo, Heeseung

Memory Management. Jo, Heeseung

Chapter 8: Memory Management

CS307: Operating Systems

Module 8: Memory Management

Page Size Page Size Design Issues

Outline. V Computer Systems Organization II (Honors) (Introductory Operating Systems) Advantages of Multi-level Page Tables

Chapter 8 Memory Management

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management

Operating Systems, Fall Lecture 5 1. Overhead due to page table and internal fragmentation. Tbl 8.2 [Stal05] 4.

Operating Systems, Fall Lecture 5 1

Chapter 9: Memory Management. Background

CS450/550 Operating Systems

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts

Chapter 8: Main Memory

Memory Management. Chapter 4 Memory Management. Multiprogramming with Fixed Partitions. Ideally programmers want memory that is.

Chapter 8: Memory-Management Strategies

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

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

Page Tables. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Chapter 8: Main Memory. Operating System Concepts 9 th Edition

Chapter 8: Main Memory

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

The Working Set. CS 355 Operating Systems. The Working Set. Working Set Model 3/27/18. Paging Algorithms and Segmentation

Chapter 8: Main Memory

Chapter 8: Main Memory

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 8: Memory- Management Strategies

Memory Management. Dr. Yingwu Zhu

Memory Management Topics. CS 537 Lecture 11 Memory. Virtualizing Resources

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

Chapter 8: Memory Management Strategies

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

Module 8: Memory Management

18-447: Computer Architecture Lecture 18: Virtual Memory III. Yoongu Kim Carnegie Mellon University Spring 2013, 3/1

Chapter 4 Memory Management. Memory Management

Module 9: Memory Management. Background. Binding of Instructions and Data to Memory

Operating Systems and Computer Networks. Memory Management. Dr.-Ing. Pascal A. Klein

Chapter 9 Memory Management

Chapter 3 Memory Management: Virtual Memory

Processes and Tasks What comprises the state of a running program (a process or task)?

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

Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1

Memory Management. Reading: Silberschatz chapter 9 Reading: Stallings. chapter 7 EEL 358

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

Part Three - Memory Management. Chapter 8: Memory-Management Strategies

SHANDONG UNIVERSITY 1

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

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES

Chapter 8 Main Memory

Main Memory CHAPTER. Exercises. 7.9 Explain the difference between internal and external fragmentation. Answer:

Multi-level Page Tables & Paging+ segmentation combined

[07] SEGMENTATION 1. 1

File Systems. OS Overview I/O. Swap. Management. Operations CPU. Hard Drive. Management. Memory. Hard Drive. CSI3131 Topics. Structure.

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit

CS 134: Operating Systems

Chapter 8: Memory Management

Main Memory. CISC3595, Spring 2015 X. Zhang Fordham University

Logical versus Physical Address Space

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

Operating Systems: Internals and Design Principles. Chapter 7 Memory Management Seventh Edition William Stallings

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

Memory Management Ch. 3

Memory Management. Memory

Operating Systems Unit 6. Memory Management

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

stack Two-dimensional logical addresses Fixed Allocation Binary Page Table

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

Architectural Support for A More Secure Operating System

Chapter 8 Main Memory

ECE232: Hardware Organization and Design

Course Outline. Processes CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Distributed Systems

Goals of memory management

Last Class: Deadlocks. Where we are in the course

Basic Memory Management

CS162 - Operating Systems and Systems Programming. Address Translation => Paging"

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

Clock page algorithm. Least recently used (LRU) NFU algorithm. Aging (NFU + forgetting) Working set. Process behavior

Roadmap. Tevfik Koşar. CSC Operating Systems Spring Lecture - XII Main Memory - II. Louisiana State University

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

Background. Contiguous Memory Allocation

Chapter 8: Memory- Manage g me m nt n S tra r t a e t gie i s

Chapters 9 & 10: Memory Management and Virtual Memory

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1

CSE 120 Principles of Operating Systems

Lecture 8 Memory Management Strategies (chapter 8)

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

Memory Management. Memory Management

Transcription:

Segmentation Group #2: Daniel Scroggins Farida Bestowros Rowena Winston Vitali Kuyel Willie Holguin ITCS 3146-091 9/25/2013

Overview History What is Paging? Paging Example Pros/Cons of Paging. What of Segmentation. Addressing Segments. Segmentation Example Pros/Cons of Segmentation. Video #1

Overview cont. Segmentation vs. Paging Segmentation with Paging Multics - quick case study Implementation: Segmentation w/paging: MULTICS Video 2 Summary Class Questions

History Virtual memory was developed in approximately 1959 1962, at the University of Manchester for the Atlas Computer, completed in 1962. In 1961, Burroughs released the B5000, the first commercial computer with virtual memory based on segmentation.

What is Paging? During paging, the system divides the memory into pages. A page is a physical entity of a fixed size. Memory can be divided into large page sizes or small page sizes. A whole page must be used even if only holding a very small portion of data.

Paging example

Small Pages: Paging Large amounts of data cannot be held on a single page. Pages are frequently swapped in and out causing page faults. A page fault is what occurs when a page is too small to hold program Program thrashing Thrashing is when virtual memory is constant state of paging causing many exchanges of data in memory for data on disk. Large Pages: -Require less swapping -Memory is quickly depleted -Under utilization of physical memory due to fragmentation

Pros/Cons of Paging Advantages: Efficient memory usage Simple partition management due to discontiguous loading and fixed partition size No compaction necessary Easy to share pages

Pros/Cons of Paging Disadvantages: Job Size <= Memory Size Internal fragmentation (half the page size on the average) Need special hardware for address translation Some main memory space used for PMT's Address translation lengthens memory cycle times

Segmentation A compromise was needed between large and small page sizes to maximize efficiency and improve performance.

Segmentation Memory- management scheme that break the main memory in logical pieces called Segments. Segments are divisions of computer memory of variable size. A program is a collection of segments. A segment is a logical unit such as: -main program, procedure, logical variables, global variables, symbols table, arrays

What is Segmentation?

Addressing Segments Let's first assume no paging in the system User generates logical addresses These addresses consist of a segment number and an offset into the segment Use segment number to index into a table Table contains the physical address of the start of the segment -often called the base address Add the offset to the base and generate the physical address -before doing this, check the offset against the limit -the limit is the size of the segment

Example of Segmentation

Pros/ Cons of Segmentation Advantages: No internal fragmentation but external fragmentation. May save memory if segments are very small and should not be combined into one page. Segment tables: only one entry per actual segment as opposed to one per page in VM Average segment size >> average page size

Pros/ Cons of Segmentation Disadvantages: External fragmentation Costly memory management algorithms - Segmentation: find free memory area big enough (search!). - Paging: keep list of free pages, any page is ok (take first!).

Video #1

Paging vs. Segmentation Need the programmer be aware that this is being used? How many linear address spaces are there? Can the total address space exceed the size of physical memory? Is sharing of procedures between users facilitated?

Segmentation with paging Some modern processors allow usage of both, segmentation and paging alone or in a combination (Motorola 8030 and later, Intel 80386, 80486, Pentium) - the OS designers have a choice.

Segmentation with paging: MULTICS cont. The MULTICS OS Ran on Honeywell computers Segmentation + paging Up to 218 segments Segment length up to 216 36-bit words Each program has a segments table (itself a segment) Each segment has a page table

MULTICS data-structures

MULTICS memory reference procedure 1. Use segment number to find segment descriptor Descriptor segment is itself paged because it may be large. The descriptor-base-register points to its page table 2. Check if segment s page table is in memory if not a segment fault occurs if there is a protection violation TRAP (fault) 3. page table entry examined, a page fault may occur if page is in memory the start-of-page address is extracted from page table entry 4. offset is added to the page origin to construct main memory address 5. perform read/store etc.

MULTICS Address Translation Scheme

MULTICS TLB

MULTICS Additional checks during segment link (call) Since segments are mapped to files, ACL (access control list) are checked with first access (open) Protection rings are called A very advanced architecture for 1970 s!

Implementation Segmentation with paging: MULTICS Presenting the program.

Video 2

Summary / Conclusion What is Paging? What is Segmentation? Examples of Paging and Segmentation. Pros/Cons of Paging and Segmentation. Two Videos. Segmentation vs. Paging. Segmentation with Paging. Multics. Implementation Segmentation with Paging: MULTICS.

Class