Lesson Objectives Aims Key Words Paging, Segmentation, Virtual Memory

Slides:



Advertisements
Similar presentations
MEMORY MANAGEMENT Y. Colette Lemard. MEMORY MANAGEMENT The management of memory is one of the functions of the Operating System MEMORY = MAIN MEMORY =
Advertisements

Part IV: Memory Management
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 36 Virtual Memory Read.
ITEC 352 Lecture 27 Memory(4). Review Questions? Cache control –L1/L2  Main memory example –Formulas for hits.
Memory Management Norman White Stern School of Business.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Multiprocessing Memory Management
Understanding Operating Systems1 Operating Systems Virtual Memory Thrashing Single-User Contiguous Scheme Fixed Partitions Dynamic Partitions.
Memory Management (continued) CS-3013 C-term Memory Management CS-3013 Operating Systems C-term 2008 (Slides include materials from Operating System.
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
1 Chapter 8 Virtual Memory Virtual memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
Computer Organization and Architecture
CS364 CH08 Operating System Support TECH Computer Science Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management.
Layers and Views of a Computer System Operating System Services Program creation Program execution Access to I/O devices Controlled access to files System.
Virtual Memory By: Dinouje Fahih. Definition of Virtual Memory Virtual memory is a concept that, allows a computer and its operating system, to use a.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Tutorial 6 Memory Management
Tutorial 7 Memory Management presented by: Antonio Maiorano Paul Di Marco.
Review of Memory Management, Virtual Memory CS448.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
1 Memory Management Memory Management COSC513 – Spring 2004 Student Name: Nan Qiao Student ID#: Professor: Dr. Morteza Anvari.
1. Memory Manager 2 Memory Management In an environment that supports dynamic memory allocation, the memory manager must keep a record of the usage of.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
Memory Management – Page 1 of 49CSCI 4717 – Computer Architecture Memory Management Uni-program – memory split into two parts –One for Operating System.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
VIRTUAL MEMORY By Thi Nguyen. Motivation  In early time, the main memory was not large enough to store and execute complex program as higher level languages.
Chapter 4 Memory Management Virtual Memory.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Computer Systems Week 14: Memory Management Amanda Oddie.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
Memory management.
Swap Space and Other Memory Management Issues Operating Systems: Internals and Design Principles.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Memory Management. Why memory management? n Processes need to be loaded in memory to execute n Multiprogramming n The task of subdividing the user area.
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
Virtual Memory Pranav Shah CS147 - Sin Min Lee. Concept of Virtual Memory Purpose of Virtual Memory - to use hard disk as an extension of RAM. Personal.
Virtual Memory From course notes University of Waikato. Some material by Tony McGregor Other material from: The Architecture.
NETW3005 Virtual Memory. Reading For this lecture, you should have read Chapter 9 (Sections 1-7). NETW3005 (Operating Systems) Lecture 08 - Virtual Memory2.
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
Virtual Memory By CS147 Maheshpriya Venkata. Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory.
Operating Systems c. define and explain the purpose of scheduling, job queues, priorities and how they are used to manage job throughput; d. explain how.
Virtual Memory (Section 9.3). The Need For Virtual Memory Many computers don’t have enough memory in RAM to accommodate all the programs a user wants.
Chapter 7 Memory Management
Chapter 2 Memory and process management
Lesson Objectives Aims Key Words
Paging COMP 755.
William Stallings Computer Organization and Architecture
Day 20 Virtual Memory.
CSI 400/500 Operating Systems Spring 2009
Chapter 8: Main Memory.
14/11/2018 RAM and ROM.
O.S Lecture 13 Virtual Memory.
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
Chapter 9: Virtual-Memory Management
Module IV Memory Organization.
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 32 Syed Mansoor Sarwar
Chapter 9: Virtual Memory
Lecture 3: Main Memory.
Memory management Explain how memory is managed in a typical modern computer system (virtual memory, paging and segmentation should be described.
COMP755 Advanced Operating Systems
Operating Systems: Internals and Design Principles, 6/E
Student : Yan Wang student ID:
Presentation transcript:

Lesson Objectives Aims Key Words Paging, Segmentation, Virtual Memory Be able to describe how memory is managed in an operating system Understand the following terms: Paging Segmentation Virtual memory Key Words Paging, Segmentation, Virtual Memory

Remember our history lesson… Early computers and micro computers usually ran one task only until completion This meant memory management was simple – why?

Single contiguous allocation Sounds complex, but all this means is: There will be a small amount of memory reserved for the operating system/system use The rest is for the single task loaded/programmed/running on the system

Multi-tasking, Multi-programming Any system that allows multiple programs/processes/tasks to run at the same time must make use of some form of memory management. There are three main types Paging Segmentation Virtual memory

When is memory not memory? When it’s storage… Storage (hard drives, SSD’s) can be used as working memory Dedicated memory such as RAM is referred to as “Primary Memory” Any other store used as memory is referred to as “Secondary Memory”

Paging, Segmentation, Virtual Memory Task For each type of memory management, do the following: Draw and label a detailed diagram explaining how it works and highlighting any key terms Give a short description of what it is/entails Extra info – any advantages or disadvantages, operating system overheads, examples of where it is used Paging, Segmentation, Virtual Memory

Paging In simple terms… A page is a unit of logical memory of a program A frame is a unit of physical memory All pages are of the same size All frames are of the same size

Paging

Paging Paging – Also called swapping – is the process of moving data between RAM and virtual memory. It moves data out of RAM that is not immediately needed and replaces it with ones that are. This process is slower than using just using primary memory alone since secondary storage is slower and the data has to move around more. It achieves this by using a page table to keep track of where data resides.

Segmentation

Segmentation Memory segments are NOT of fixed width Each program is split in to component parts – Code, Variables, Stacks, Libraries etc Each part does not need to be stored contiguously in memory This means we can SHARE memory segments

Segmentation When programs are loaded up into memory, segmentation allows the primary memory to store only the bit it needs at that particular time. For example, Dynamic Link Libraries can be stored on the hard disk until called by main memory by a program. Segmentation allows programs to be broken up into smaller address spaces and each can have its own type of protection and can be shared amongst other processes.

Virtual Memory RAM is a finite resource It is quite possible to open more programs than there is memory available to use Virtual memory uses paging to allocate sections of Secondary Memory to enable this to happen

Virtual Memory Uses secondary storage (such as the hard disk) as an extension of physical memory (RAM). The memory manager can trick the operating system into thinking that it has more physical memory than it actually does by making use of secondary storage such as the hard disk or flash drives

Virtual Memory O/S can page out idle tasks in to virtual memory to free up Primary Memory Paging to Secondary Memory takes LOTS of time and therefore isn’t an ideal solution

Summary Computer memory consists of primary memory (random-access memory [RAM]) for running programs and secondary memory (Hard Disk Drive [HDD] and other storage media). The memory manager allocates primary memory to running processes. Segments are blocks of memory that can vary in size. A segmentation table keeps track of the addresses of segments used by each process. Pages are fixed-size blocks of memory that are smaller in size than segments. Details of the mapping of logical addresses to physical addresses are stored in the page table. Pages can be swapped out to a virtual memory page file on the HDD. A flag in the page file indicates that this has happened. If too many pages are being swapped in and out of virtual memory, the system can slow down and become unresponsive, which is known as disc thrashing

Review/Success Criteria You should understand: The need for memory management Three memory management techniques What a Page, Frame and Segment are