VIRTUAL MEMORY AND VIRTUAL OPERATING SYSTEMS

Size: px
Start display at page:

Download "VIRTUAL MEMORY AND VIRTUAL OPERATING SYSTEMS"

Transcription

1 VIRTUAL MEMORY AND VIRTUAL OPERATING SYSTEMS Course Code: Course Description: CSCI-620 OPERATING SYSTEMS SECURITY : Session: 1 Lecture Unit: CSN1 Topic: Windows virtual memory management Author: Prof. Bill Mihajlović Year: 2011/2012 Dr. R.A. Mihajlovic, 2012 Reproduction in any shape or form is prohibited. Topics Introduction Physical & virtual memory Swap space Virtual memory adjustment Single program virtual memory Removing swap paging file (PF) Tracking swap PF percentage usage OS limits on physical memory usage Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 2 1

2 Virtual Memory Virtual memory system has hard drive space acting like a background memory extension. Functions of Virtual Machine Manager (VMM) Stores virtual memory extension capacity in a file called a swap file Moves 4KB pages into and out of physical RAM frames Disk thrashing is a problem caused by small RAM and excess memory paging with many programs loaded. Settings you can change in Virtual Memory dialog box Minimum and maximum file size The location of the swap file (Win386.swp) Swap files (UNIX swap partition) can be placed on a compressed drive/volume. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 3 Physical memory A single program instruction on an Intel 386 or later CPU can address up to 4GB of physical memory, using its full 32 bits = = 4G This is normally far more than the total installed system board physical memory (RAM+ROM) of the machine, (Not always). Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 4 2

3 Exercise 1: Windows msinfo32 utility Run standard Windows msinfo32.exe utility System board memory is scattered all over the real memory map Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 5 Question 1 Inspect the general screen on your system and determine the following parameters: Total physical memory? Available physical memory? What is the size of total real memory map? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 6 3

4 Question 2 Inspect the general screen on your system and determine the following parameters: Total virtual memory? Available virtual memory? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 7 Virtual and physical memory Virtual memory is a hardware-software computer sybsystem that enables programs to run in a memory address space whose size and addressing are not necessarily tied to the physical memory. When the total size and addressing of the process exceeds the available physical memory, the CPU will swap data to the hard drive and back. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 8 4

5 Question 3 Inspect the general report screen of msinfo32 utility shown below and answer the following questions: Is total physical memory larger here than total virtual memory parameter? Does it sound like a paradox? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 9 Question 4 Inspect the general screen on your system and determine the following parameters: Total swap page file space size? Name and location of the swap page file? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 10 5

6 Windows swap page file Only those parts of the program and data that are currently in active use need to stay loaded in physical memory. Other program parts not immediately needed are held in a: swap file (as it s called in Windows 95/98/ME: Win386.swp), or page file (in Windows NT versions including Windows 2000 and XP: pagefile.sys). Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 11 Swap storage space If there is pressure on space in physical memory, then parts of code and data that are not currently needed can be temporarily paged out in order to make room. The page file can be seen as an overflow area to make the RAM behave as if it were larger than it is. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 12 6

7 Exercise 2: Swap file The XP page file is a hidden file pagefile.sys. It is regenerated at each boot. Show the screen shot of your system page file? Folder Options View set to Show Hidden and System files, and not to Hide Protected mode System files. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 13 Question 5 Attack that would start endless count of concurrent programs with large data segments could inflate swap space and consume free storage space. Does such attack appear as denila of service attack or DOS? What services would be denied with such an attack? Windows pagefile.sys growth is limited. What is the maximal swap page files size allowed in your system? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 14 7

8 Page fault interrupt When a program tries to access some address that is not currently in physical memory, it generates an interrupt, called a Page Fault. Page fault requests from VM subsystem to retrieve the 4 KB page containing the faulty address: from the swap page file, or possibly from the original program file This valid page fault normally happens quite transparently, (From the user s point of view invisibly.) Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 15 Program code and data At run time, one program s code and data may be distributed and located: In physical memory loaded as CS and DS, On the swap storage space, (Most likely parts of DS), and On the original file system storage space, (Most likely CS unloaded parts). Only one portion is loaded in physical memory. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 16 8

9 Program virtually loaded VM creates an illusion of having entire program loaded and available to CPU: Program is virtually loaded, or Program is loaded into virtual memory. Program executes in virtual memory. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 17 Question 3 paradox Consider N programs virtually loaded using physical memory for N code and data segments CS i, DS i, i=1,2,3,..., N The global capacity of virtual memory space is much larger than the parameter Total Virtual Memory, (2GB). Total Virtual Memory is available just to one program out of N concurrently virtually loaded and executing. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 18 9

10 Virtual memory capacity Virtual memory global capacity is limited by the number N of programs that can be concurrently executing. It is equal to the summation of Physical memory available for execution of N programs CS i, DS i, i=1,2,3,..., N Swap space size, and Size of all running program file-portions that have not been yet physically loaded. Virtual memory global capacity may easily be tens of GB in size. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 19 Exercise 3: VM problems & tuning Sometimes system either has too many programs running at once, (too many concurrent processes) System just does not have enough of free physical memory. Swap space is full and no more programs can be loaded. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 20 10

11 Question 6 What is the reason of the following Windows message: Windows - Virtual Memory Minimum Too Low! Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 21 Adjusting-tuning VM parameters Start sysdm.cpl utility. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 22 11

12 Adjusting-Tuning VM parameters Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 23 Swap space modification Modify maximal VM size from 4092MB to 8GB. Paging file represents VM supporting storage swap space. If physical memory cannot be added, swap space limit can be increased. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 24 12

13 Swap space modification Recommended page file initial size is 1.5 times the size of the physical memory (RAM) installed. The maximum size is 3 times physical memory. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 25 Performance hint To keep page file from resizing, fragmenting and eventually slowing its access down you have to specify the same amount for both initial and maximal values. You'll have to reboot in order for the changes to take place. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 26 13

14 Removing swap paging file To delete a paging file, set both initial size and maximum size to zero, or click No paging file. Microsoft recommends that you do not disable or delete the paging file. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 27 Question 7 Can swap page file be placed on any drive C:, D: or E:? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 28 14

15 Non-Paged Area Non-Paged area parts of the Windows XP OS code and data which are so important that they must be always memory resident, may never be paged out. Mainly contains core code of the system, which is not likely to contain serious faults. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 29 Non-Paged Area In case of serious OS attack and kernel damage a blue screen referring to PAGE FAULT IN NON- PAGED AREA probably indicates a serious problem. If such faults arise when you have recently installed or updated something, try uninstalling it. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 30 15

16 Windows STOP message STOP Messages literally mean Windows OS has crashed, (has stopped!) 0x : PAGE_FAULT_IN_NONPAGED_AREA STOP messages are identified by an 8-digit hexadecimal number, but also commonly written in a shorthand notation; e.g., a STOP 0x A may also be written STOP 0xA. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 31 Windows VM working set Working set size W of a program translates into a number of memory pages (4kB/page) ofthe application process is being kept loaded and resident in real memory. W 100% When entire program image is resident in physical memory, all pages are loaded, working set is W=100%. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 32 16

17 : Inspecting program s memory When trying to investigate problematic behavior of a running program, inspecting memory behavior may be a good idea. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 33 Windows memory usage To monitor memory usage in Windows servers, use the "Mem Usage" statistic in the Task Manager. This statistic measures the working set size. "Mem Usage" is NOT a measure of overall memory usage, (only per program usage). Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 34 17

18 VM program size If overall memory usage needs to be checked periodically, use the "VM Size" column in the Task Manager. To view the "VM Size" column, make sure "Processes" is selected. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 35 Task manager Click on the "View" menu and choose "Select Columns". A dialog box will appear in which "VM Size" will be an option. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 36 18

19 VM size and page usage history Check your system Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 37 Exercise 5: Using system monitor Inspect how much page file (PF) does your system use? You should first find out how much memory you're using, and how much of it is on your disk. One accurate way is by monitoring the %Usage Peak counter in the System Monitor tool (The peak usage of the page file instance in percent): Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 38 19

20 Monitoring page file usage Open Performance console from the Administrative Tools. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 39 Monitoring page file usage Add new counter Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 40 20

21 Monitoring page file usage Browse list of performance system objects and select Paging File Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 41 Question 8: Monitoring page file usage What system parameters are aemonitored toednow? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 42 21

22 Question 9 What is your PF usage peak [%]? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 43 Question 10 Search the Web and find out why Windows XP x32 cannot use and report more than 3.5GB of physical memory. Try: Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 44 22

23 Question 11 Problem: My Task Manager shows I have 2.99 GB of physical memory when I just installed 2 2GB sticks in my notebook. How can I get it back? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 45 OS Memory Addressing Limits Windows programs are stuck with a 2 GB per program virtual memory limit due to the way OS handles virtual memory. The 2 GB limit is not a physical processor limit, but rather an implementation-in-windows limit Windows XP x64 Professional does not have that limit. It supports 128 GB of RAM and 16 terabytes t of virtual memory address space, as compared to theoretical 4 GB of both physical RAM and virtual memory address space for 32- bit Windows XP Professional." Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 46 23

24 Exercise 6: Logging PF usage Download custom PF usage logger utility: Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 47 WinXP page file monitor utility Save and un-archive the utility Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 48 24

25 Page file settings Read the text file and test each program. Get your page file settings Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 49 Utility desktop helpers Install two desktop helpers. Test both programs Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 50 25

26 Question 12 a) What is your exact PF size? a) What is your exact peak PF usage? Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 51 Page file log data inspection View the PF data log. Repeat the previous and this slide activity. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 52 26

27 Homework Describe purpose and function of standard and government bodies: The National Information Assurance Partnership (NIAP) is a U.S. Government initiative National Institute of Standards and Technology (NIST) and National Security Agency (NSA). Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 53 Homework Download tool: Verify if your hardware platform supports hardware/full virtualization? Present the tool printout. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 54 27

28 Homework Export tool print out to internal buffer, than paste it in NOTEPAD.EXE and copy to your homework. Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 55 The End Dr. R. A. Mihajlovic, 2012 CSCI-620 Operating Systems Security 56 28

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Week 02 Lecture 06 Virtual Memory Hello. In this video, we

More information

Lesson 1: Using Task Manager

Lesson 1: Using Task Manager 19-2 Chapter 19 Monitoring and Optimizing System Performance Lesson 1: Using Task Manager Task Manager provides information about the programs and processes running on your computer and the performance

More information

Exam : Title. : A+ OS Technologies

Exam : Title. : A+ OS Technologies Exam : 220-302 Title : A+ OS Technologies QUESTION 1 Under Windows 2000 you consistently receive out of memory messages when running multiple applications. To avoid having to upgrade RAM immediately you?

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 11: File System Implementation Prof. Alan Mislove (amislove@ccs.neu.edu) File-System Structure File structure Logical storage unit Collection

More information

10 MONITORING AND OPTIMIZING

10 MONITORING AND OPTIMIZING MONITORING AND OPTIMIZING.1 Introduction Objectives.2 Windows XP Task Manager.2.1 Monitor Running Programs.2.2 Monitor Processes.2.3 Monitor System Performance.2.4 Monitor Networking.2.5 Monitor Users.3

More information

LECTURE 12. Virtual Memory

LECTURE 12. Virtual Memory LECTURE 12 Virtual Memory VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a cache for magnetic disk. The mechanism by which this is accomplished

More information

Imagenation PX Series

Imagenation PX Series Imagenation PX Series Guide To Troubleshooting Frame Grabber Installations Imagenation PX Series Frame Grabbers PX500, PX510, PX610 & PX610A Covering all Microsoft Win32 Operating Systems Windows 95, 98,

More information

Paragon Exact Image. User Manual CONTENTS. Introduction. Key Features. Installation. Package Contents. Minimum System Requirements.

Paragon Exact Image. User Manual CONTENTS. Introduction. Key Features. Installation. Package Contents. Minimum System Requirements. Paragon Exact Image User Manual CONTENTS Introduction Key Features Installation Package Contents Minimum System Requirements Basic Concepts Backup Operations Scheduling Interface Overview General Layout

More information

CS399 New Beginnings. Jonathan Walpole

CS399 New Beginnings. Jonathan Walpole CS399 New Beginnings Jonathan Walpole Memory Management Memory Management Memory a linear array of bytes - Holds O.S. and programs (processes) - Each cell (byte) is named by a unique memory address Recall,

More information

BASIC OPERATIONS. Managing System Resources

BASIC OPERATIONS. Managing System Resources 48 PART 2 BASIC OPERATIONS C H A P T E R 5 Managing System Resources CHAPTER 5 MANAGING SYSTEM RESOURCES 49 THE part of Windows Vista that you see the Vista desktop is just part of the operating system.

More information

CS 5523 Operating Systems: Memory Management (SGG-8)

CS 5523 Operating Systems: Memory Management (SGG-8) CS 5523 Operating Systems: Memory Management (SGG-8) Instructor: Dr Tongping Liu Thank Dr Dakai Zhu, Dr Palden Lama, and Dr Tim Richards (UMASS) for providing their slides Outline Simple memory management:

More information

File System NTFS. Section Seven. NTFS, EFS, Partitioning, and Navigating Folders

File System NTFS. Section Seven. NTFS, EFS, Partitioning, and Navigating Folders 13 August 2002 File System Section Seven NTFS, EFS, Partitioning, and Navigating Folders NTFS DEFINITION New Technologies File System or NTFS was first applied in Windows NT 3.0 back in 1992. This technology

More information

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

Memory Management Topics. CS 537 Lecture 11 Memory. Virtualizing Resources Memory Management Topics CS 537 Lecture Memory Michael Swift Goals of memory management convenient abstraction for programming isolation between processes allocate scarce memory resources between competing

More information

Computer Organization and Architecture. OS Objectives and Functions Convenience Making the computer easier to use

Computer Organization and Architecture. OS Objectives and Functions Convenience Making the computer easier to use Computer Organization and Architecture Chapter 8 Operating System Support 1. Processes and Scheduling 2. Memory Management OS Objectives and Functions Convenience Making the computer easier to use Efficiency

More information

Part 2 (Disk Pane, Network Pane, Process Details & Troubleshooting)

Part 2 (Disk Pane, Network Pane, Process Details & Troubleshooting) Note: This discussion is based on MacOS, 10.12.5 (Sierra). Some illustrations may differ when using other versions of macos or OS X. Credits: See the list at the end of this presentation Part 2 (Disk Pane,

More information

CHAPTER 3 RESOURCE MANAGEMENT

CHAPTER 3 RESOURCE MANAGEMENT CHAPTER 3 RESOURCE MANAGEMENT SUBTOPIC Understand Memory Management Understand Processor Management INTRODUCTION Memory management is the act of managing computer memory. This involves providing ways to

More information

Lesson 2: Using the Performance Console

Lesson 2: Using the Performance Console Lesson 2 Lesson 2: Using the Performance Console Using the Performance Console 19-13 Windows XP Professional provides two tools for monitoring resource usage: the System Monitor snap-in and the Performance

More information

Virtual Memory. Chapter 8

Virtual Memory. Chapter 8 Chapter 8 Virtual Memory What are common with paging and segmentation are that all memory addresses within a process are logical ones that can be dynamically translated into physical addresses at run time.

More information

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

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science Virtual Memory CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition of the course text Operating

More information

Chapter 8 Memory Management

Chapter 8 Memory Management 1 Chapter 8 Memory Management The technique we will describe are: 1. Single continuous memory management 2. Partitioned memory management 3. Relocatable partitioned memory management 4. Paged memory management

More information

Introduction to Computer Systems and Operating Systems

Introduction to Computer Systems and Operating Systems Introduction to Computer Systems and Operating Systems Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered 1. Computer History 2. Computer System

More information

CS 31: Intro to Systems Virtual Memory. Kevin Webb Swarthmore College November 15, 2018

CS 31: Intro to Systems Virtual Memory. Kevin Webb Swarthmore College November 15, 2018 CS 31: Intro to Systems Virtual Memory Kevin Webb Swarthmore College November 15, 2018 Reading Quiz Memory Abstraction goal: make every process think it has the same memory layout. MUCH simpler for compiler

More information

IP Cam Secure Pre-Installation Notes

IP Cam Secure Pre-Installation Notes IP Cam Secure Pre-Installation Notes 1. The IP Cam Secure requires a dedicated server class computer, high level CPU, more memory, high volume Hard disk. Please refer to IP Cam Secure Minimum Hardware

More information

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

Move back and forth between memory and disk. Memory Hierarchy. Two Classes. Don t Memory Management Ch. 3 Memory Hierarchy Cache RAM Disk Compromise between speed and cost. Hardware manages the cache. OS has to manage disk. Memory Manager Memory Hierarchy Cache CPU Main Swap Area Memory

More information

Memory Management Ch. 3

Memory Management Ch. 3 Memory Management Ch. 3 Ë ¾¾ Ì Ï ÒÒØ Å ÔÔ ÓÐÐ 1 Memory Hierarchy Cache RAM Disk Compromise between speed and cost. Hardware manages the cache. OS has to manage disk. Memory Manager Ë ¾¾ Ì Ï ÒÒØ Å ÔÔ ÓÐÐ

More information

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems Instructor: Dr. Turgay Korkmaz Department Computer Science The University of Texas at San Antonio Office: NPB

More information

stack Two-dimensional logical addresses Fixed Allocation Binary Page Table

stack Two-dimensional logical addresses Fixed Allocation Binary Page Table Question # 1 of 10 ( Start time: 07:24:13 AM ) Total Marks: 1 LRU page replacement algorithm can be implemented by counter stack linked list all of the given options Question # 2 of 10 ( Start time: 07:25:28

More information

I. Ch 5 System Software

I. Ch 5 System Software I. Ch 5 System Software A. Competencies 1. Describe the differences between system software and application software 2. Discuss the four types of system software 3. Discuss the basic functions, features

More information

6 - Main Memory EECE 315 (101) ECE UBC 2013 W2

6 - Main Memory EECE 315 (101) ECE UBC 2013 W2 6 - Main Memory EECE 315 (101) ECE UBC 2013 W2 Acknowledgement: This set of slides is partly based on the PPTs provided by the Wiley s companion website (including textbook images, when not explicitly

More information

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

More information

Downloaded from various sources on the NET

Downloaded from various sources on the NET Overview Computers. Hardware components of a Computer. Purpose and functions of computer operating systems. Evolution of computer operating systems. Operating systems available today. Downloaded from various

More information

About the Presentations

About the Presentations About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning of each presentation. You may customize the presentations

More information

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1 Virtual Memory Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. L20-1 Reminder: Operating Systems Goals of OS: Protection and privacy: Processes cannot access each other s data Abstraction:

More information

Tutorial on Memory Management, Deadlock and Operating System Types

Tutorial on Memory Management, Deadlock and Operating System Types Operating Systems and Systems Integration Tutorial on Memory Management, Deadlock and Operating System Types 1 Background 1.1 Memory management Virtual memory: is a method of managing memory automatically

More information

Operating Systems, Fall

Operating Systems, Fall Policies and methods Virtual memory Operations and policies Chapters 3.4. 3.6 Week 2: 17.9.2009 Tiina Niklander 1 Fetch policy (Noutopolitiikka) When to load page to memory? Placement policy (Sijoituspolitiikka

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 23

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 23 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 208 Lecture 23 LAST TIME: VIRTUAL MEMORY Began to focus on how to virtualize memory Instead of directly addressing physical memory, introduce a level of indirection

More information

Some Basic Terminology

Some Basic Terminology Some Basic Terminology A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Here are a few terms you'll run into: A Application Files Program files environment where you can create and edit the kind of

More information

For The following Exercises, mark the answers True and False

For The following Exercises, mark the answers True and False 1 For The following Exercises, mark the answers True and False 1. An operating system is an example of application software. False 2. 3. 4. 6. 7. 9. 10. 12. 13. 14. 15. 16. 17. 18. An operating system

More information

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

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective Part I: Operating system overview: Memory Management 1 Hardware background The role of primary memory Program

More information

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

File Systems. OS Overview I/O. Swap. Management. Operations CPU. Hard Drive. Management. Memory. Hard Drive. CSI3131 Topics. Structure. File Systems I/O Management Hard Drive Management Virtual Memory Swap Memory Management Storage and I/O Introduction CSI3131 Topics Process Management Computing Systems Memory CPU Peripherals Processes

More information

Recall from Tuesday. Our solution to fragmentation is to split up a process s address space into smaller chunks. Physical Memory OS.

Recall from Tuesday. Our solution to fragmentation is to split up a process s address space into smaller chunks. Physical Memory OS. Paging 11/10/16 Recall from Tuesday Our solution to fragmentation is to split up a process s address space into smaller chunks. Physical Memory OS Process 3 Process 3 OS: Place Process 3 Process 1 Process

More information

PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18

PROCESS VIRTUAL MEMORY. CS124 Operating Systems Winter , Lecture 18 PROCESS VIRTUAL MEMORY CS124 Operating Systems Winter 2015-2016, Lecture 18 2 Programs and Memory Programs perform many interactions with memory Accessing variables stored at specific memory locations

More information

V. File System. SGG9: chapter 11. Files, directories, sharing FS layers, partitions, allocations, free space. TDIU11: Operating Systems

V. File System. SGG9: chapter 11. Files, directories, sharing FS layers, partitions, allocations, free space. TDIU11: Operating Systems V. File System SGG9: chapter 11 Files, directories, sharing FS layers, partitions, allocations, free space TDIU11: Operating Systems Ahmed Rezine, Linköping University Copyright Notice: The lecture notes

More information

The functionality. Managing more than Operating

The functionality. Managing more than Operating The functionality Managing more than Operating Remember This? What to Manage Processing CPU and Memory Storage Input and Output Devices Functions CPU - Process management RAM - Memory management Storage

More information

OPERATING SYSTEMS SECURITY CPU & BASIC COMPUTING HARDWARE

OPERATING SYSTEMS SECURITY CPU & BASIC COMPUTING HARDWARE OPERATING SYSTEMS SECURITY CPU & BASIC COMPUTING HARDWARE Homework 01 Addendum I Dr. Bill Mihajlovic NYIT 2012 1 Topics CPU and systems inspection utilities CPU Z utility download CPU Z utility installation

More information

CIS Operating Systems Memory Management Address Translation for Paging. Professor Qiang Zeng Spring 2018

CIS Operating Systems Memory Management Address Translation for Paging. Professor Qiang Zeng Spring 2018 CIS 3207 - Operating Systems Memory Management Address Translation for Paging Professor Qiang Zeng Spring 2018 Previous class What is logical address? Who use it? Describes a location in the logical memory

More information

Virtual Memory. CS61, Lecture 15. Prof. Stephen Chong October 20, 2011

Virtual Memory. CS61, Lecture 15. Prof. Stephen Chong October 20, 2011 Virtual Memory CS6, Lecture 5 Prof. Stephen Chong October 2, 2 Announcements Midterm review session: Monday Oct 24 5:3pm to 7pm, 6 Oxford St. room 33 Large and small group interaction 2 Wall of Flame Rob

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 23

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 23 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 205 Lecture 23 LAST TIME: VIRTUAL MEMORY! Began to focus on how to virtualize memory! Instead of directly addressing physical memory, introduce a level of

More information

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

More information

Memory Allocation. Copyright : University of Illinois CS 241 Staff 1

Memory Allocation. Copyright : University of Illinois CS 241 Staff 1 Memory Allocation Copyright : University of Illinois CS 241 Staff 1 Recap: Virtual Addresses A virtual address is a memory address that a process uses to access its own memory Virtual address actual physical

More information

IT ESSENTIALS V. 4.1 Module 5 Fundamental Operating Systems

IT ESSENTIALS V. 4.1 Module 5 Fundamental Operating Systems IT ESSENTIALS V. 4.1 Module 5 Fundamental Operating Systems 5.0 Introduction 1. What controls almost all functions on a computer? The operating system 5.1 Explain the purpose of an operating system 2.

More information

Chapter 8. Virtual Memory

Chapter 8. Virtual Memory Operating System Chapter 8. Virtual Memory Lynn Choi School of Electrical Engineering Motivated by Memory Hierarchy Principles of Locality Speed vs. size vs. cost tradeoff Locality principle Spatial Locality:

More information

Virtual Memory Paging

Virtual Memory Paging Virtual Memory Paging An important task of a virtual-memory system is to relocate pages from physical memory out to disk Early UNIX systems swapped out the entire process at once Modern UNIX systems relay

More information

Chapter 8. Operating System Support. Yonsei University

Chapter 8. Operating System Support. Yonsei University Chapter 8 Operating System Support Contents Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management 8-2 OS Objectives & Functions OS is a program that Manages the

More information

Chapter 8 Operating Systems and Utility Programs أ.أمل زهران

Chapter 8 Operating Systems and Utility Programs أ.أمل زهران Chapter 8 Operating Systems and Utility Programs Chapter 8 Objectives Identify the types of system software Summarize the startup process on a personal computer Summarize the features of several stand-alone

More information

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. April 12, 2018 L16-1

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. April 12, 2018 L16-1 Virtual Memory Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. L16-1 Reminder: Operating Systems Goals of OS: Protection and privacy: Processes cannot access each other s data Abstraction:

More information

Lab B: Configuring Disk Compression and Quotas

Lab B: Configuring Disk Compression and Quotas Module 6: Managing Data by Using NTFS 33 Lab B: Configuring Disk Compression and Quotas Topic Objective To introduce the lab. Lead-in In this lab, you will configure disk compression and quotas. *****************************ILLEGAL

More information

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

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1 Virtual Memory Patterson & Hennessey Chapter 5 ELEC 5200/6200 1 Virtual Memory Use main memory as a cache for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs

More information

14 May 2012 Virtual Memory. Definition: A process is an instance of a running program

14 May 2012 Virtual Memory. Definition: A process is an instance of a running program Virtual Memory (VM) Overview and motivation VM as tool for caching VM as tool for memory management VM as tool for memory protection Address translation 4 May 22 Virtual Memory Processes Definition: A

More information

Week 2: Tiina Niklander

Week 2: Tiina Niklander Virtual memory Operations and policies Chapters 3.4. 3.6 Week 2: 17.9.2009 Tiina Niklander 1 Policies and methods Fetch policy (Noutopolitiikka) When to load page to memory? Placement policy (Sijoituspolitiikka

More information

Operating Systems, Fall Lecture 5, Tiina Niklander 1

Operating Systems, Fall Lecture 5, Tiina Niklander 1 Paging: Design issues, Segmentation Page Fault Handling more details 1. Hardware traps to kernel 2. General registers saved 3. OS determines which virtual page needed 4. OS checks validity of address,

More information

Memory. Principle of Locality. It is impossible to have memory that is both. We create an illusion for the programmer. Employ memory hierarchy

Memory. Principle of Locality. It is impossible to have memory that is both. We create an illusion for the programmer. Employ memory hierarchy Datorarkitektur och operativsystem Lecture 7 Memory It is impossible to have memory that is both Unlimited (large in capacity) And fast 5.1 Intr roduction We create an illusion for the programmer Before

More information

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi Lecture - 13 Virtual memory and memory management unit In the last class, we had discussed

More information

Operating Systems. Memory Management. Lecture 9 Michael O Boyle

Operating Systems. Memory Management. Lecture 9 Michael O Boyle Operating Systems Memory Management Lecture 9 Michael O Boyle 1 Memory Management Background Logical/Virtual Address Space vs Physical Address Space Swapping Contiguous Memory Allocation Segmentation Goals

More information

Introduction to Operating Systems. Chapter Chapter

Introduction to Operating Systems. Chapter Chapter Introduction to Operating Systems Chapter 1 1.3 Chapter 1.5 1.9 Learning Outcomes High-level understand what is an operating system and the role it plays A high-level understanding of the structure of

More information

Distributed Systems Operation System Support

Distributed Systems Operation System Support Hajussüsteemid MTAT.08.009 Distributed Systems Operation System Support slides are adopted from: lecture: Operating System(OS) support (years 2016, 2017) book: Distributed Systems: Concepts and Design,

More information

Virtual Memory. Chapter 8

Virtual Memory. Chapter 8 Virtual Memory 1 Chapter 8 Characteristics of Paging and Segmentation Memory references are dynamically translated into physical addresses at run time E.g., process may be swapped in and out of main memory

More information

John Wawrzynek & Nick Weaver

John Wawrzynek & Nick Weaver CS 61C: Great Ideas in Computer Architecture Lecture 23: Virtual Memory John Wawrzynek & Nick Weaver http://inst.eecs.berkeley.edu/~cs61c From Previous Lecture: Operating Systems Input / output (I/O) Memory

More information

Memory Management. Memory

Memory Management. Memory Memory Management These slides are created by Dr. Huang of George Mason University. Students registered in Dr. Huang s courses at GMU can make a single machine readable copy and print a single copy of

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 32 Virtual Memory Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Questions for you What is

More information

With regard to operating systems the kernel consists of the most frequently used functions in the operating system and it kept in main memory.

With regard to operating systems the kernel consists of the most frequently used functions in the operating system and it kept in main memory. CS 320 Ch 8 Operating Systems An operating system controls execution of applications and acts as an interface between the user and the computer. A typical OS provides the following services: Program Creation

More information

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

Memory Management. Disclaimer: some slides are adopted from book authors slides with permission 1 Memory Management Disclaimer: some slides are adopted from book authors slides with permission 1 CPU management Roadmap Process, thread, synchronization, scheduling Memory management Virtual memory Disk

More information

CS450/550 Operating Systems

CS450/550 Operating Systems CS450/550 Operating Systems Lecture 4 memory Palden Lama Department of Computer Science CS450/550 Memory.1 Review: Summary of Chapter 3 Deadlocks and its modeling Deadlock detection Deadlock recovery Deadlock

More information

A+ Guide to Managing and Maintaining your PC, 6e. Chapter 2 Introducing Operating Systems

A+ Guide to Managing and Maintaining your PC, 6e. Chapter 2 Introducing Operating Systems A+ Guide to Managing and Maintaining your PC, 6e Chapter 2 Introducing Operating Systems Objectives Learn about the various operating systems and the differences between them Learn how an OS interfaces

More information

Operating Systems (2INC0) 2017/18

Operating Systems (2INC0) 2017/18 Operating Systems (2INC0) 2017/18 Memory Management (09) Dr. Courtesy of Dr. I. Radovanovic, Dr. R. Mak (figures from Bic & Shaw) System Architecture and Networking Group Agenda Reminder: OS & resources

More information

CS 134: Operating Systems

CS 134: Operating Systems CS 134: Operating Systems More Memory Management CS 134: Operating Systems More Memory Management 1 / 27 2 / 27 Overview Overview Overview Segmentation Recap Segmentation Recap Segmentation Recap Segmentation

More information

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

1. Creates the illusion of an address space much larger than the physical memory Virtual memory Main Memory Disk I P D L1 L2 M Goals Physical address space Virtual address space 1. Creates the illusion of an address space much larger than the physical memory 2. Make provisions for

More information

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. File-System Structure File structure Logical storage unit Collection of related information File

More information

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD OPERATING SYSTEMS #8 After A.S.Tanenbaum, Modern Operating Systems 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD MEMORY MANAGEMENT MEMORY MANAGEMENT The memory is one of

More information

Memory Management - Demand Paging and Multi-level Page Tables

Memory Management - Demand Paging and Multi-level Page Tables Memory Management - Demand Paging and Multi-level Page Tables CS 416: Operating Systems Design, Spring 2011 Department of Computer Science Rutgers Sakai: 01:198:416 Sp11 (https://sakai.rutgers.edu) Topics

More information

PARAGON ADAPTIVE RESTORE

PARAGON ADAPTIVE RESTORE PARAGON Technologie GmbH, Systemprogrammierung Heinrich-von-Stephan-Str. 5c 79100 Freiburg, Germany Tel. +49 (0) 761 59018201 Fax +49 (0) 761 59018130 Internet www.paragon-software.com Email sales@paragon-software.com

More information

Summer 2003 Lecture 27 07/28/03

Summer 2003 Lecture 27 07/28/03 Summer 2003 Lecture 27 07/28/03 Protected Mode Operation of Intel x86 Processors Protected Virtual Address Mode, commonly called Protected Mode, is an advanced mode of operation of 80x86 processors beginning

More information

Princeton University. Computer Science 217: Introduction to Programming Systems. The Memory/Storage Hierarchy and Virtual Memory

Princeton University. Computer Science 217: Introduction to Programming Systems. The Memory/Storage Hierarchy and Virtual Memory Princeton University Computer Science 27: Introduction to Programming Systems The Memory/Storage Hierarchy and Virtual Memory Goals of this Lecture Help you learn about: Locality and caching The memory

More information

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

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is to be in memory Memory management activities Keeping

More information

Virtual Memory. Stefanos Kaxiras. Credits: Some material and/or diagrams adapted from Hennessy & Patterson, Hill, online sources.

Virtual Memory. Stefanos Kaxiras. Credits: Some material and/or diagrams adapted from Hennessy & Patterson, Hill, online sources. Virtual Memory Stefanos Kaxiras Credits: Some material and/or diagrams adapted from Hennessy & Patterson, Hill, online sources. Caches Review & Intro Intended to make the slow main memory look fast by

More information

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2. BASIC ELEMENTS Simplified view: Processor Slide 1 Computer System Overview Operating Systems Slide 3 Main Memory referred to as real memory or primary memory volatile modules 2004/S2 secondary memory devices

More information

Install QlikView Expressor Standard and Enterprise Editions

Install QlikView Expressor Standard and Enterprise Editions Install QlikView Expressor Standard and Enterprise Editions The QlikView Expressor Full Installer installs both the Standard and Enterprise Editions. These two Editions consist of multiple components and

More information

Windows 2000 Computer Management

Windows 2000 Computer Management LAB PROCEDURE 17 Windows 2000 Computer Management OBJECTIVES 1. View various areas of Computer Management. 2. Use Task Manager. RESOURCES Operating System Technology 1. Marcraft 8000 Trainer running Windows

More information

Quick Start Guide. MotionDV STUDIO 5.6. Cover

Quick Start Guide. MotionDV STUDIO 5.6. Cover Cover Features Operating environment Editing procedures Let s start MotionDV STUDIO Let s capture the video from a tape Let s edit the video Let s arrange the video in the edit track Let s cut unnecessary

More information

DISK DEFRAG Professional

DISK DEFRAG Professional auslogics DISK DEFRAG Professional Help Manual www.auslogics.com / Contents Introduction... 5 Installing the Program... 7 System Requirements... 7 Installation... 7 Registering the Program... 9 Uninstalling

More information

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University

CS 333 Introduction to Operating Systems. Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University CS 333 Introduction to Operating Systems Class 11 Virtual Memory (1) Jonathan Walpole Computer Science Portland State University Virtual addresses Virtual memory addresses (what the process uses) Page

More information

Computer System Overview

Computer System Overview Computer System Overview Operating Systems 2005/S2 1 What are the objectives of an Operating System? 2 What are the objectives of an Operating System? convenience & abstraction the OS should facilitate

More information

Assembly Language. Lecture 2 x86 Processor Architecture

Assembly Language. Lecture 2 x86 Processor Architecture Assembly Language Lecture 2 x86 Processor Architecture Ahmed Sallam Slides based on original lecture slides by Dr. Mahmoud Elgayyar Introduction to the course Outcomes of Lecture 1 Always check the course

More information

Recent Operating System Class notes 10 Administrative Tools (Part three) April 21, 2004

Recent Operating System Class notes 10 Administrative Tools (Part three) April 21, 2004 Recent Operating System Class notes 10 Administrative Tools (Part three) April 21, 2004 System Applet There are many ways to open the system applet. The easiest method to opening the system applet is by

More information

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference

More information

Background. Contiguous Memory Allocation

Background. Contiguous Memory Allocation Operating System Lecture 8 2017.5.9 Chapter 8 (Main Memory) Background Swapping Contiguous Memory Allocation Segmentation - Paging Memory Management Selection of a memory-management method for a specific

More information

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

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1 Basic Memory Management Program must be brought into memory and placed within a process for it to be run Basic Memory Management CS 256/456 Dept. of Computer Science, University of Rochester Mono-programming

More information

Agilent Genomic Workbench 6.0

Agilent Genomic Workbench 6.0 Agilent Genomic Workbench 6.0 Standard Edition Installation Guide Notices Agilent Technologies, Inc. 2010 No part of this manual may be reproduced in any form or by any means (including electronic storage

More information

Chapter 8 & Chapter 9 Main Memory & Virtual Memory

Chapter 8 & Chapter 9 Main Memory & Virtual Memory Chapter 8 & Chapter 9 Main Memory & Virtual Memory 1. Various ways of organizing memory hardware. 2. Memory-management techniques: 1. Paging 2. Segmentation. Introduction Memory consists of a large array

More information

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

Processes and Tasks What comprises the state of a running program (a process or task)? Processes and Tasks What comprises the state of a running program (a process or task)? Microprocessor Address bus Control DRAM OS code and data special caches code/data cache EAXEBP EIP DS EBXESP EFlags

More information