CHAPTER 8 : VIRTUAL MEMORY. Introduction

Size: px
Start display at page:

Download "CHAPTER 8 : VIRTUAL MEMORY. Introduction"

Transcription

1 CHAPTER 8 : VIRTUAL MEMORY Introduction In simple paging and segmentation, we realised that we can : Load program pages or segments into frames that may not necessarily be contigous. Make memory address references in the loaded pages or segments to be dynamically calculated. Virtual memory is based on the above two things but we also realised that we do not need to load every part of the program into memory. Only a small portion of the whole program is first loaded into memory (this is called the resident portion), the rest of the program will be loaded when needed and swapped out to disk when other protion needs to be loaded but there are not enough space. Benefits of not loading all part of a program is : More processes can be in memory. A big program (bigger than available space) can be run by loading only a small portion of the program into available memory. The memory where programs are loaded is called real or physical memory. Programmer have a view of memory as big as in the hard disk. Programmers view of memory is called virtual memory. Principle of Locality What makes virtual memory possible is the fact that when a program is brought into memory to run, most of the time it confines to a certain area in the program and data. So, it is wasteful to load everything and use only a portion of it. Sometimes there are cases when portion of a program is loaded into memory to run and the loaded portion immediately need another module which is not in memory. So, it have to be loaded from disk. There will be a time when there are many processes loaded in memory that needs to do the swap in and the processor spends more time swapping in and out as compared to doing real processing. This is called thrashing. To avoid thrashing, OS will guess which part of a process is not needed in the near future and swap it out for new process to be loaded in. Only process that will be used in a short time will remain in memory. The selection is based on principle of locality (POL). Principle of locality states that program and data references tend to cluster which means that within a short period of time the same set of instructions and data will be repeatedly used. Abdul Rahim Ahmad page 1

2 For implementing virtual memory, 2 main things are needed : Hardware support for paging/segmentation OS software poprtion for managing movements of pages/segments from hard disk to memory. Virtual Memory using Paging Virtual memory can be implemented for system using paging or segmentation of combination of paging and segmentation. For virtual memory using paging, during initial loading of a proccess, some pages can be loaded into memory and a page table is created. The table contains the corresponding frame number in the memory. There will be a page table for each process. Each entry in the table contains : A present bit Used for protection Modified bit and sharing Control bits Frame number P M Control bits Frame Number Used to indicate whether corresponding page is in memory on not Used to indicate whether corresponding page have been modified since it was last loaded Address refered in the program (the logical address) will have two parts : Page number Offset Page Number Offset If a program refers to a memory location using logical address (or the virtual address), the logical address have to be translated to physical address using the following steps : For a running process, a register in CPU holds the starting address of the page table for the process. Page number in the virtual address is used to index into the page table and get the frame number. The frame number is combined with the offset portion of the logical address to form the physical address real address CPU register Frame # offset offset Page # offset Page table pointer program Logical address paging + P# Page table Frame # frame Main memory Abdul Rahim Ahmad page 2

3 Page table can itself reside in virtual memory for a system with large number of frames per processes and many processes can be running. There could be a two level page table scheme. At the first level, a logical address points to a page table directory of page table. From page table directory, there will be another pointer to the actual page table. Page # offset Level 1 Level 2 memory Page table directory Page table.. Page table Another method is to use an inverted page table where page number protion of virtual address is mapped into a hash table using a simple hashing funtion. The hash table contains a pointer to the inverted page table which contains the page table entries. So there is one antry in the hash table and in the inverted page tablefor each real memory page. Page # offset Virtual address Page# entry chain Frame# Hash table page table frame # physical address offset Every virtual memory reference actually require 2 memory access. One - to fetch appropriate page table entry for calculating physical memory. Two -to fetch the actual data/intruction. This will increase memory access time. To overcome this, we can cache (store temporarily) a group of page table entries that have been most recently used in a buffer called Translation Lookaside Buffer (TLB). TLB normally resides in main memory. Abdul Rahim Ahmad page 3

4 Using TLB, if a vitual address needs to be translated to physical addres, the following steps are done : TLB is first examined. If the page entry is present in the TLB then fine, go ahead as normal, calculate real address and execution jump to there. If page entry is not found in TLB, processor go to real page table and check if present bit is on. if yes, it means page is in memory. So we can calculate real address and execution jump to there. The TLB is also updated. If not, then page is in hard disk, so memory page fault interrupt is generated and OS will load the page in memory, and the page table entry is updated and the TLB is also updated. Real address is then calculate and execution jump to there. Diagram below, shows the use of TLB. Remember that there are many issues involved in using TLB plus the fact is that TLB is also use in conjunction with the cache memory in the processor itself. Abdul Rahim Ahmad page 4

5 Earlier we talked about cache memory where we said "the most recently used instruction that is possibly the next ones to be executed by CPU is stored in the cache. After calculating the real address, the virtual memory will first consult the cache if the referenced address content is in it. If not, it will seek in main memory, othger wise it will have to load from hard dik. In short the following issues are important : To calculate a real address, the TLB, the main memory and the hard disk might be involved as described above. To jump to the specific memory location indicated by the physical address calculated, the cache, the main memory and the hard disk might be involved. Another important issue is how big should the pages be? The size is influences by the following factors : Desire to reduce internal fragmentation require the pages to be small. Hard disk data transfer require block of transfer (pages) to be big. Page fault occur quite often if the size is of certain size according to the following graph: Page fault rate Page size As page size increase, page fault rate increase. Page fault rate drop as the page size reach certain limit Size of main memory determine the page size (and of course the frame size). Smaller main memory require small page size. Otherwise only a small number of process can be loaded into main memory. Wht about TLB size? TLB size is influenced by : Large TLB size means more page table entries and better hit rate for page table entries. Using larger page size also means that the TLB entry is referring to a large area of memory and reduce page fault. Some system support many different page sizes. This means pages of different sizes can accommodate different data structures. Program area of processes can be using lager page size while stack areas can use smaller page size. Abdul Rahim Ahmad page 5

6 Virtual Memory using Segmentation As stated earlier, segmentation is under the control of programmer. Programmer can segment their programs into segments of different sizes. Memory references in the segments will be logical addresses which have segment number and the offset. In using segmentation, each process have its own segment table, created when the program is loaded into memory. Segment table entry contains starting address of the corresponding segments in main memory, the length of the segment as well as the present, modify and control bits. A present bit Modified bit Control bits length. Frame number Used for protection and sharing P M Control bits length Segment base address Used to indicate whether corresponding segment is in memory on not Used to indicate whether corresponding segment have been modified since it was last loaded Address refered in the segments (the logical address) will have two parts : Page number Offset Segment Number Offset To calculate real address, the steps are almost the same as in paging except that the the length field in the segment table entry can be used to calculate the bound. real address Logical address CPU register Base + offset seg # offset Segment table ptr S# segment table d segment + base addr. program segmentation Main memory Abdul Rahim Ahmad page 6

7 Virtual Memory using combined paging and Segmentation Some processor hardware combined with OS capability can support both paging and segmentation. Here a user's address space is broken into a number of segments of unequal size at the descretion of the programmer. Each segment can be broken into a number of pages of equal size. From programmers's point of view, logical addres is still consisting of segment number and segment offset. In system point of view, segment offset is viewed as page number and page offset for a page within a segment. The segment table entry, page table entry and the logical address format are as follows : Control bits length Segment base address segment table entry P M Control bits Frame Number page table entry Segment Number Page Number Offset Logical address format To calculate real addres : processor uses the segment number portion of to index into process segment table to find the the page table for that segment. Page number portion of logical address is used to index into the page table of the segment to find the corresponding frame. The frame number is combined with the offset portion of the virtual addres to form the real address. Abdul Rahim Ahmad page 7

8 Abdul Rahim Ahmad page 8

9 OS Support for Virtual Memory Virtual memory using Paging and segmentation require hardware support. OS software support the various algorithm involved in managing the policies for : page fetching page placement page replacement after swap out. Management of resident set of pages. Cleaning of pages Load control. All the above policies rely on : Main memory size Relative speed of main and secondary memory Size of processes Number of processes Execution behaviour of individual program The nature of the application. The programming language it is written in. The compiler used. The style of the programmerwho wrote it. The behaviour of the user (in the case of interactive program). The OS designer must therefore choose a set of policies depending on the target users of the OS, based on the current knowledge. Most modern OS allow system administrators to configure the system or to tune the OS for the maximum performance. Fetch Policy Determines when a page should be brought into the main memory. Two common choices are : Demand paging - where a page is brought in only when a reference is made to the location on the page. Prepaging - where some pages are brought in even though it is not referenced. Placement Policy Determines where in real memory a piece of the process is to reside. Relacement Policy Determines which pages pages should be swap out to disk when a new page need to be place in memory or to be swap in from disk. The main objective is that a page to be removed should be the most unlikely to be replaced in the near future. The policy will predicyt future behaviour based on the past. Abdul Rahim Ahmad page 9

10 Frames in memory can be locked and they cannot be replaced. Those frames reserved for OS, I/O buffers and time critical areas are locked. Locking is done by associating a lock bit with each frame (in frame table and current page table). The followings are 4 algorithms used for selection of which page to replace : Optimal - select the page for which the time to the next reference is the longest. This can result in fewer page fault. This algorithm is not implemented but just merely used as a comparison. Least recently used (LRU) - select the page that has not been referenced for the longest time. Very difficult to implement and involve big overhead in the form of stack usage for keeping the page references.. First in first Out (FIFO) - remove pages in roud-robin cycle from the list of pages treated as a circular buffer. Very simple to implement but perform poorly. Clock - use an additional bit in the frame referred as use bit. List of pages that can be replaced is treated like a circular buffer with a pointer pointing to the page to be replaced. The diagram for this algorithm looks like a clock thus it is called clock algorithm. When a page is first loaded in main memory, its use bit is set to 0. When it is referenced again the use bit is set to 1. When a page needs to be replaced, the OS scans to find a frame that have use bit as 0. Along the way if it finds a frame with use bit as 1, it resets the use bit to 0. If all frames have use bit as 1, the system will scan all frames and set use bit to o and replace the one it first set to 1. The following graph shows a comparison of all the four policies using page size of 256 words, 250,000 references in a FORTRAN program with different number of frames allocated for the program : Page fault per 100 references FIFO Clock LRU 20 optimal Number of frames allocated. Another variation of clock algorithm by adding another bit called m (modify bit) is in Stallings page Abdul Rahim Ahmad page 10

11 A strategy that can improve paging performance is by using a simple replacement policy but on top of that employ page buffering. In page buffering, a replaced page is put into either one of the two lists : Free page list - page that have not been modified. Modified page list - page that have been modified. This page have to be written back to hard disk. When a page is to be read in, the page frame ahead in the free page list is overwritten. If the page is to be replaced is an unmodified page, the page frame is moved to the tail of the free page list. If the page is to be replaced is a modified page, the page frame is moved to the tail of the modified page list. The important fact here is that the replaced pages still remains in memory. The modified pages can later be written back to disk. Resident Set Management Resident set management deals with the followings issues : How many page frames are to be allocated to each active process Whether to limit the pages to replace to just the pages that cause the page fault or the whole pages that belong to the process. The following factors comes into play : Less amount of memory allocated to process means more process can be loaded, thus more ready process available. Rate of page fault is high if less memory frames allocated to process. Beyond certain size, even though more memory is allocated to process, the will be no noticable impact. Two different policies can be employed in resident set management : Fixed-allocation - fixing number of pages to allocate for a process at load time. Variable-allocation - let the number of pages allocated to be varied over the lifetime of the process. OS will have to assess the behaviour of each process. This require software overhead. The scope of replacement strategy can be Global - choose pages to replace among all unlocked pages in main memory from any processes at all. Local - choose pages to replace only among the resident pages of the process that generate page fault. The relationship between resident set size allocation and the scope can be one of the followings : Fixed allocation, local scope Variable allocation, local scope Variable allocation, global scope Abdul Rahim Ahmad page 11

12 Table below describe the relationship in more detail : Policy Fixed allocation Scope Local replacement Global replacement Number of frames allocated to Not possible process is fixed Pages to be replaced is chosen among frames allocated to that process Variable allocation Number of frames allocated to process may be changed from time to time. Pages to be replaced is chosen among frames allocated to that process More complex. Need to implement working set strategy. Pages to be replaced is chosen among available frames in main memory. Size of resident set will vary. Easiest to implement. Difficulty in replacement choice. Need also to implement page buffering. Working set is a concept introduced by Denning A working set W(t,Δ) at a virtual time t is the set of pages referenced in the last Δ virtual time units (virtual time can be taken as instruction cycles). Δ is the window of time over which process is observed. The larger Δ is, the larger is W. For any process, ther will time where W is stable and there will be times where it is changing rapidly. Algorithm that makes use of working set strategy are : page-fault frequency algorithm - require a use bit to be associated with each page in memory. Bit is set to 1 if page is accessed. When page fault occurs, OS will note the value of Δ and since last page fault for that process. A threshold F is defined, if Δ <F a page is added to the resident set. Otherwise discard all pages with use bit =0 and shrink resident set accordingly. At the same time reset the use bit of the remaining pages of the process to 0. Problem - during interlocality transition rapid page faults may occur causing undesirable switching and swappings. Variable-interval sampled working set (VSWS) algorithm. - The policy evaluates working set at sampling instancesbased on elapsed Δ. At the beginning of a sampling interval, the use bit of all resident pages for the process are reset to 0. At the end, only pages that have been referenced during the interval Δ have their use bit set to 1. These pages are retained in the resident setof the process throughout the next interval. Others are discarded. During each interval, any faulted pages are added to the resident set. Abdul Rahim Ahmad page 12

13 Cleaning Policy Cleaning policy determines when a modified page should be written to disk. 22 main alternatives are : Demand cleaning - a page is written out to disk only when selected for replacement. Precleaning - modified pages are written to disk in batches even before their page frames are needed. Using page buffering Load control Load control is concerned with determining the number of processes that will be resident in main memory. Also refered to as multiprogramming level. The objective is to avoid thrashing. If multiprogramming level is to be reduced, one or more of the currently resident process needs to be suspended (swapped out). There are 6 possibilities : Lowest-priority process. Faulting processlast process activated. Process with the smallest resident size Largest process Process with the largest remaining execution window. Abdul Rahim Ahmad page 13

Operating Systems, 6 th ed. Test Bank Chapter 7

Operating Systems, 6 th ed. Test Bank Chapter 7 True / False Questions: Chapter 7 Memory Management 1. T / F In a multiprogramming system, main memory is divided into multiple sections: one for the operating system (resident monitor, kernel) and one

More information

Chapter 7 Memory Management

Chapter 7 Memory Management Operating Systems: Internals and Design Principles Chapter 7 Memory Management Eighth Edition William Stallings Frame Page Segment A fixed-length block of main memory. A fixed-length block of data that

More information

Operating Systems. Virtual Memory

Operating Systems. Virtual Memory Operating Systems Virtual Memory Virtual Memory Topics. Memory Hierarchy. Why Virtual Memory. Virtual Memory Issues. Virtual Memory Solutions. Locality of Reference. Virtual Memory with Segmentation. Page

More information

OPERATING SYSTEM - VIRTUAL MEMORY

OPERATING SYSTEM - VIRTUAL MEMORY OPERATING SYSTEM - VIRTUAL MEMORY http://www.tutorialspoint.com/operating_system/os_virtual_memory.htm Copyright tutorialspoint.com A computer can address more memory than the amount physically installed

More information

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging

Memory Management Outline. Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging Memory Management Outline Background Swapping Contiguous Memory Allocation Paging Segmentation Segmented Paging 1 Background Memory is a large array of bytes memory and registers are only storage CPU can

More information

Lecture 17: Virtual Memory II. Goals of virtual memory

Lecture 17: Virtual Memory II. Goals of virtual memory Lecture 17: Virtual Memory II Last Lecture: Introduction to virtual memory Today Review and continue virtual memory discussion Lecture 17 1 Goals of virtual memory Make it appear as if each process has:

More information

Chapter 7 Memory Management

Chapter 7 Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 7 Memory Management Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Memory Management Subdividing

More information

Chapter 12. Paging an Virtual Memory Systems

Chapter 12. Paging an Virtual Memory Systems Chapter 12 Paging an Virtual Memory Systems Paging & Virtual Memory Virtual Memory - giving the illusion of more physical memory than there really is (via demand paging) Pure Paging - The total program

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ 2008, Prentice Hall I/O Devices Roadmap Organization

More information

Virtual vs Physical Addresses

Virtual vs Physical Addresses Virtual vs Physical Addresses Physical addresses refer to hardware addresses of physical memory. Virtual addresses refer to the virtual store viewed by the process. virtual addresses might be the same

More information

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Memory management basics (1) Requirements (1) Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Lecture 7: Memory Management I Memory management intends to satisfy the following

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operatin g Systems: Internals and Design Principle s Chapter 11 I/O Management and Disk Scheduling Seventh Edition By William Stallings Operating Systems: Internals and Design Principles An artifact can

More information

COS 318: Operating Systems. Virtual Memory and Address Translation

COS 318: Operating Systems. Virtual Memory and Address Translation COS 318: Operating Systems Virtual Memory and Address Translation Today s Topics Midterm Results Virtual Memory Virtualization Protection Address Translation Base and bound Segmentation Paging Translation

More information

Virtual Memory. Virtual Memory. Paging. CSE 380 Computer Operating Systems. Paging (1)

Virtual Memory. Virtual Memory. Paging. CSE 380 Computer Operating Systems. Paging (1) Virtual Memory CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note: Virtual Memory (revised version) 1 Recall: memory allocation with variable partitions

More information

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1 General Computer Architecture I/O Management COMP755 Advanced Operating Systems Goals for I/O Users should access all devices in a uniform manner. Devices should be named in a uniform manner. The OS, without

More information

Virtual Memory Paging

Virtual Memory Paging COS 318: Operating Systems Virtual Memory Paging Kai Li Computer Science Department Princeton University (http://www.cs.princeton.edu/courses/cos318/) Today s Topics Paging mechanism Page replacement algorithms

More information

OPERATING SYSTEM - MEMORY MANAGEMENT

OPERATING SYSTEM - MEMORY MANAGEMENT OPERATING SYSTEM - MEMORY MANAGEMENT http://www.tutorialspoint.com/operating_system/os_memory_management.htm Copyright tutorialspoint.com Memory management is the functionality of an operating system which

More information

Timing of a Disk I/O Transfer

Timing of a Disk I/O Transfer Disk Performance Parameters To read or write, the disk head must be positioned at the desired track and at the beginning of the desired sector Seek time Time it takes to position the head at the desired

More information

Memory unit sees only the addresses, and not how they are generated (instruction counter, indexing, direct)

Memory unit sees only the addresses, and not how they are generated (instruction counter, indexing, direct) Memory Management 55 Memory Management Multitasking without memory management is like having a party in a closet. Charles Petzold. Programming Windows 3.1 Programs expand to fill the memory that holds

More information

Computer Architecture

Computer Architecture Computer Architecture Slide Sets WS 2013/2014 Prof. Dr. Uwe Brinkschulte M.Sc. Benjamin Betting Part 11 Memory Management Computer Architecture Part 11 page 1 of 44 Prof. Dr. Uwe Brinkschulte, M.Sc. Benjamin

More information

& Data Processing 2. Exercise 3: Memory Management. Dipl.-Ing. Bogdan Marin. Universität Duisburg-Essen

& Data Processing 2. Exercise 3: Memory Management. Dipl.-Ing. Bogdan Marin. Universität Duisburg-Essen Folie a: Name & Data Processing 2 3: Memory Management Dipl.-Ing. Bogdan Marin Fakultät für Ingenieurwissenschaften Abteilung Elektro-und Informationstechnik -Technische Informatik- Objectives Memory Management

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

HY345 Operating Systems

HY345 Operating Systems HY345 Operating Systems Recitation 2 - Memory Management Solutions Panagiotis Papadopoulos panpap@csd.uoc.gr Problem 7 Consider the following C program: int X[N]; int step = M; //M is some predefined constant

More information

Board Notes on Virtual Memory

Board Notes on Virtual Memory Board Notes on Virtual Memory Part A: Why Virtual Memory? - Letʼs user program size exceed the size of the physical address space - Supports protection o Donʼt know which program might share memory at

More information

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

We r e going to play Final (exam) Jeopardy! Answers: Questions: - 1 - . (0 pts) We re going to play Final (exam) Jeopardy! Associate the following answers with the appropriate question. (You are given the "answers": Pick the "question" that goes best with each "answer".)

More information

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software

More information

Chapter 10: Virtual Memory. Lesson 08: Demand Paging and Page Swapping

Chapter 10: Virtual Memory. Lesson 08: Demand Paging and Page Swapping Chapter 10: Virtual Memory Lesson 08: Demand Paging and Page Swapping Objective Learn demand paging, pages of data are only brought into the main memory when a program accesses them Learn swapping technique

More information

The Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example

The Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example The Deadlock Problem Deadlocks A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 tape drives. P 1 and P 2 each

More information

OPERATING SYSTEMS MEMORY MANAGEMENT

OPERATING SYSTEMS MEMORY MANAGEMENT OPERATING SYSTEMS MEMORY MANAGEMENT Jerry Breecher 8: Memory Management 1 OPERATING SYSTEM Memory Management What Is In This Chapter? Just as processes share the CPU, they also share physical memory. This

More information

Chapter 1 Computer System Overview

Chapter 1 Computer System Overview Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Eighth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides

More information

CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont.

CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont. CS 61C: Great Ideas in Computer Architecture Virtual Memory Cont. Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/ 1 Bare 5-Stage Pipeline Physical Address PC Inst.

More information

The Classical Architecture. Storage 1 / 36

The Classical Architecture. Storage 1 / 36 1 / 36 The Problem Application Data? Filesystem Logical Drive Physical Drive 2 / 36 Requirements There are different classes of requirements: Data Independence application is shielded from physical storage

More information

Hardware Assisted Virtualization

Hardware Assisted Virtualization Hardware Assisted Virtualization G. Lettieri 21 Oct. 2015 1 Introduction In the hardware-assisted virtualization technique we try to execute the instructions of the target machine directly on the host

More information

System Virtual Machines

System Virtual Machines System Virtual Machines Introduction Key concepts Resource virtualization processors memory I/O devices Performance issues Applications 1 Introduction System virtual machine capable of supporting multiple

More information

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems Lecture Outline Operating Systems Objectives Describe the functions and layers of an operating system List the resources allocated by the operating system and describe the allocation process Explain how

More information

Memory Management CS 217. Two programs can t control all of memory simultaneously

Memory Management CS 217. Two programs can t control all of memory simultaneously Memory Management CS 217 Memory Management Problem 1: Two programs can t control all of memory simultaneously Problem 2: One program shouldn t be allowed to access/change the memory of another program

More information

Operating System Tutorial

Operating System Tutorial Operating System Tutorial OPERATING SYSTEM TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Operating System Tutorial An operating system (OS) is a collection

More information

Chapter 2: OS Overview

Chapter 2: OS Overview Chapter 2: OS Overview CmSc 335 Operating Systems 1. Operating system objectives and functions Operating systems control and support the usage of computer systems. a. usage users of a computer system:

More information

SYSTEM ecos Embedded Configurable Operating System

SYSTEM ecos Embedded Configurable Operating System BELONGS TO THE CYGNUS SOLUTIONS founded about 1989 initiative connected with an idea of free software ( commercial support for the free software ). Recently merged with RedHat. CYGNUS was also the original

More information

361 Computer Architecture Lecture 14: Cache Memory

361 Computer Architecture Lecture 14: Cache Memory 1 361 Computer Architecture Lecture 14 Memory cache.1 The Motivation for s Memory System Processor DRAM Motivation Large memories (DRAM) are slow Small memories (SRAM) are fast Make the average access

More information

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation Dynamic Storage Allocation CS 44 Operating Systems Fall 5 Presented By Vibha Prasad Memory Allocation Static Allocation (fixed in size) Sometimes we create data structures that are fixed and don t need

More information

Operating Systems 4 th Class

Operating Systems 4 th Class Operating Systems 4 th Class Lecture 1 Operating Systems Operating systems are essential part of any computer system. Therefore, a course in operating systems is an essential part of any computer science

More information

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University

Operating Systems CSE 410, Spring 2004. File Management. Stephen Wagner Michigan State University Operating Systems CSE 410, Spring 2004 File Management Stephen Wagner Michigan State University File Management File management system has traditionally been considered part of the operating system. Applications

More information

Kernel Optimizations for KVM. Rik van Riel Senior Software Engineer, Red Hat June 25 2010

Kernel Optimizations for KVM. Rik van Riel Senior Software Engineer, Red Hat June 25 2010 Kernel Optimizations for KVM Rik van Riel Senior Software Engineer, Red Hat June 25 2010 Kernel Optimizations for KVM What is virtualization performance? Benefits of developing both guest and host KVM

More information

COS 318: Operating Systems

COS 318: Operating Systems COS 318: Operating Systems File Performance and Reliability Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall10/cos318/ Topics File buffer cache

More information

Peter J. Denning, Naval Postgraduate School, Monterey, California

Peter J. Denning, Naval Postgraduate School, Monterey, California VIRTUAL MEMORY Peter J. Denning, Naval Postgraduate School, Monterey, California January 2008 Rev 6/5/08 Abstract: Virtual memory is the simulation of a storage space so large that users do not need to

More information

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study CS 377: Operating Systems Lecture 25 - Linux Case Study Guest Lecturer: Tim Wood Outline Linux History Design Principles System Overview Process Scheduling Memory Management File Systems A review of what

More information

Memory Management 1. Memory Management. Multitasking without memory management is like having a party in a closet.

Memory Management 1. Memory Management. Multitasking without memory management is like having a party in a closet. Memory Management 1 Memory Management Multitasking without memory management is like having a party in a closet. Charles Petzold. Programming Windows 3.1 Programs expand to fill the memory that holds them.

More information

Buffer Management 5. Buffer Management

Buffer Management 5. Buffer Management 5 Buffer Management Copyright 2004, Binnur Kurt A journey of a byte Buffer Management Content 156 A journey of a byte Suppose in our program we wrote: outfile

More information

Chapter 6, The Operating System Machine Level

Chapter 6, The Operating System Machine Level Chapter 6, The Operating System Machine Level 6.1 Virtual Memory 6.2 Virtual I/O Instructions 6.3 Virtual Instructions For Parallel Processing 6.4 Example Operating Systems 6.5 Summary Virtual Memory General

More information

Operating system Dr. Shroouq J.

Operating system Dr. Shroouq J. 3 OPERATING SYSTEM STRUCTURES An operating system provides the environment within which programs are executed. The design of a new operating system is a major task. The goals of the system must be well

More information

1 File Management. 1.1 Naming. COMP 242 Class Notes Section 6: File Management

1 File Management. 1.1 Naming. COMP 242 Class Notes Section 6: File Management COMP 242 Class Notes Section 6: File Management 1 File Management We shall now examine how an operating system provides file management. We shall define a file to be a collection of permanent data with

More information

W4118: segmentation and paging. Instructor: Junfeng Yang

W4118: segmentation and paging. Instructor: Junfeng Yang W4118: segmentation and paging Instructor: Junfeng Yang Outline Memory management goals Segmentation Paging TLB 1 Uni- v.s. multi-programming Simple uniprogramming with a single segment per process Uniprogramming

More information

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface File Management Two Parts Filesystem Interface Interface the user sees Organization of the files as seen by the user Operations defined on files Properties that can be read/modified Filesystem design Implementing

More information

OS OBJECTIVE QUESTIONS

OS OBJECTIVE QUESTIONS OS OBJECTIVE QUESTIONS Which one of the following is Little s formula Where n is the average queue length, W is the time that a process waits 1)n=Lambda*W 2)n=Lambda/W 3)n=Lambda^W 4)n=Lambda*(W-n) Answer:1

More information

Computer Organization and Architecture. Characteristics of Memory Systems. Chapter 4 Cache Memory. Location CPU Registers and control unit memory

Computer Organization and Architecture. Characteristics of Memory Systems. Chapter 4 Cache Memory. Location CPU Registers and control unit memory Computer Organization and Architecture Chapter 4 Cache Memory Characteristics of Memory Systems Note: Appendix 4A will not be covered in class, but the material is interesting reading and may be used in

More information

Operating System for the K computer

Operating System for the K computer Operating System for the K computer Jun Moroo Masahiko Yamada Takeharu Kato For the K computer to achieve the world s highest performance, Fujitsu has worked on the following three performance improvements

More information

ERserver. iseries. Work management

ERserver. iseries. Work management ERserver iseries Work management ERserver iseries Work management Copyright International Business Machines Corporation 1998, 2002. All rights reserved. US Government Users Restricted Rights Use, duplication

More information

Chapter 11: File System Implementation. Chapter 11: File System Implementation. Objectives. File-System Structure

Chapter 11: File System Implementation. Chapter 11: File System Implementation. Objectives. File-System Structure Chapter 11: File System Implementation Chapter 11: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

COS 318: Operating Systems. Virtual Machine Monitors

COS 318: Operating Systems. Virtual Machine Monitors COS 318: Operating Systems Virtual Machine Monitors Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall10/cos318/ Introduction Have been around

More information

Enhancing the Performance of Live Migration of Virtual Machine s with WSClock Replacement Algorithm

Enhancing the Performance of Live Migration of Virtual Machine s with WSClock Replacement Algorithm Enhancing the Performance of Live Migration of Virtual Machine s with WSClock Replacement Algorithm C.Sagana M.Geetha Dr R.C.Suganthe PG student, Assistant Professor, Professor, Dept of CSE, Dept of CSE

More information

1 Organization of Operating Systems

1 Organization of Operating Systems COMP 730 (242) Class Notes Section 10: Organization of Operating Systems 1 Organization of Operating Systems We have studied in detail the organization of Xinu. Naturally, this organization is far from

More information

General Purpose Operating System Support for Multiple Page Sizes

General Purpose Operating System Support for Multiple Page Sizes The following paper was originally published in the Proceedings of the USENIX Annual Technical Conference (NO 98) New Orleans, Louisiana, June 1998 General Purpose Operating System Support for Multiple

More information

In and Out of the PostgreSQL Shared Buffer Cache

In and Out of the PostgreSQL Shared Buffer Cache In and Out of the PostgreSQL Shared Buffer Cache 2ndQuadrant US 05/21/2010 About this presentation The master source for these slides is http://projects.2ndquadrant.com You can also find a machine-usable

More information

MS SQL Performance (Tuning) Best Practices:

MS SQL Performance (Tuning) Best Practices: MS SQL Performance (Tuning) Best Practices: 1. Don t share the SQL server hardware with other services If other workloads are running on the same server where SQL Server is running, memory and other hardware

More information

Linux Process Scheduling Policy

Linux Process Scheduling Policy Lecture Overview Introduction to Linux process scheduling Policy versus algorithm Linux overall process scheduling objectives Timesharing Dynamic priority Favor I/O-bound process Linux scheduling algorithm

More information

Memory management. Chapter 4: Memory Management. Memory hierarchy. In an ideal world. Basic memory management. Fixed partitions: multiple programs

Memory management. Chapter 4: Memory Management. Memory hierarchy. In an ideal world. Basic memory management. Fixed partitions: multiple programs Memory management Chater : Memory Management Part : Mechanisms for Managing Memory asic management Swaing Virtual Page relacement algorithms Modeling age relacement algorithms Design issues for aging systems

More information

Performance Monitoring User s Manual

Performance Monitoring User s Manual NEC Storage Software Performance Monitoring User s Manual IS025-15E NEC Corporation 2003-2010 No part of the contents of this book may be reproduced or transmitted in any form without permission of NEC

More information

find model parameters, to validate models, and to develop inputs for models. c 1994 Raj Jain 7.1

find model parameters, to validate models, and to develop inputs for models. c 1994 Raj Jain 7.1 Monitors Monitor: A tool used to observe the activities on a system. Usage: A system programmer may use a monitor to improve software performance. Find frequently used segments of the software. A systems

More information

An Implementation Of Multiprocessor Linux

An Implementation Of Multiprocessor Linux An Implementation Of Multiprocessor Linux This document describes the implementation of a simple SMP Linux kernel extension and how to use this to develop SMP Linux kernels for architectures other than

More information

Part III Storage Management. Chapter 11: File System Implementation

Part III Storage Management. Chapter 11: File System Implementation Part III Storage Management Chapter 11: File System Implementation 1 Layered File System 2 Overview: 1/4 A file system has on-disk and in-memory information. A disk may contain the following for implementing

More information

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note: Chapter 7 OBJECTIVES Operating Systems Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the concept of virtual memory. Understand the

More information

Midterm Exam #2 November 10, 1999 CS162 Operating Systems

Midterm Exam #2 November 10, 1999 CS162 Operating Systems Fall 1999 Your Name: SID: University of California, Berkeley College of Engineering Computer Science Division EECS Midterm Exam #2 November 10, 1999 CS162 Operating Systems Anthony D. Joseph Circle the

More information

ENHANCEMENTS TO SQL SERVER COLUMN STORES. Anuhya Mallempati #2610771

ENHANCEMENTS TO SQL SERVER COLUMN STORES. Anuhya Mallempati #2610771 ENHANCEMENTS TO SQL SERVER COLUMN STORES Anuhya Mallempati #2610771 CONTENTS Abstract Introduction Column store indexes Batch mode processing Other Enhancements Conclusion ABSTRACT SQL server introduced

More information

Chapter 1 13 Essay Question Review

Chapter 1 13 Essay Question Review Chapter 1 13 Essay Question Review Chapter 1 1. Explain why an operating system can be viewed as a resource allocator. Ans: A computer system has many resources that may be required to solve a problem:

More information

Chapter 12 File Management

Chapter 12 File Management Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 12 File Management Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Roadmap Overview File organisation and Access

More information

Midterm Exam #2 Solutions November 10, 1999 CS162 Operating Systems

Midterm Exam #2 Solutions November 10, 1999 CS162 Operating Systems Fall 1999 Your Name: SID: University of California, Berkeley College of Engineering Computer Science Division EECS Midterm Exam #2 November 10, 1999 CS162 Operating Systems Anthony D. Joseph Circle the

More information

Chapter 12 File Management. Roadmap

Chapter 12 File Management. Roadmap Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 12 File Management Dave Bremer Otago Polytechnic, N.Z. 2008, Prentice Hall Overview Roadmap File organisation and Access

More information

Recommended hardware system configurations for ANSYS users

Recommended hardware system configurations for ANSYS users Recommended hardware system configurations for ANSYS users The purpose of this document is to recommend system configurations that will deliver high performance for ANSYS users across the entire range

More information

UVA. Failure and Recovery. Failure and inconsistency. - transaction failures - system failures - media failures. Principle of recovery

UVA. Failure and Recovery. Failure and inconsistency. - transaction failures - system failures - media failures. Principle of recovery Failure and Recovery Failure and inconsistency - transaction failures - system failures - media failures Principle of recovery - redundancy - DB can be protected by ensuring that its correct state can

More information

OSes. Arvind Seshadri Mark Luk Ning Qu Adrian Perrig SOSP2007. CyLab of CMU. SecVisor: A Tiny Hypervisor to Provide

OSes. Arvind Seshadri Mark Luk Ning Qu Adrian Perrig SOSP2007. CyLab of CMU. SecVisor: A Tiny Hypervisor to Provide SecVisor: A Seshadri Mark Luk Ning Qu CyLab of CMU SOSP2007 Outline Introduction Assumption SVM Background Design Problems Implementation Kernel Porting Evaluation Limitation Introducion Why? Only approved

More information

WHITE PAPER. AMD-V Nested Paging. AMD-V Nested Paging. Issue Date: July, 2008 Revision: 1.0. Advanced Micro Devices, Inc.

WHITE PAPER. AMD-V Nested Paging. AMD-V Nested Paging. Issue Date: July, 2008 Revision: 1.0. Advanced Micro Devices, Inc. Issue Date: July, 2008 Revision: 1.0 2008 All rights reserved. The contents of this document are provided in connection with ( AMD ) products. AMD makes no representations or warranties with respect to

More information

A3 Computer Architecture

A3 Computer Architecture A3 Computer Architecture Engineering Science 3rd year A3 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/3co Michaelmas 2000 1 / 1 6. Stacks, Subroutines, and Memory

More information

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters COSC 6374 Parallel I/O (I) I/O basics Fall 2012 Concept of a clusters Processor 1 local disks Compute node message passing network administrative network Memory Processor 2 Network card 1 Network card

More information

Chapter 12 File Management

Chapter 12 File Management Operating Systems: Internals and Design Principles Chapter 12 File Management Eighth Edition By William Stallings Files Data collections created by users The File System is one of the most important parts

More information

Configuration and Utilization of the OLAP Cache to Improve the Query Response Time

Configuration and Utilization of the OLAP Cache to Improve the Query Response Time Configuration and Utilization of the OLAP Cache to Improve the Query Response Time Applies to: SAP NetWeaver BW 7.0 Summary This paper outlines the steps to improve the Query response time by using the

More information

File Management. Chapter 12

File Management. Chapter 12 File Management Chapter 12 File Management File management system is considered part of the operating system Input to applications is by means of a file Output is saved in a file for long-term storage

More information

Process Description and Control. 2004-2008 william stallings, maurizio pizzonia - sistemi operativi

Process Description and Control. 2004-2008 william stallings, maurizio pizzonia - sistemi operativi Process Description and Control 1 Process A program in execution (running) on a computer The entity that can be assigned to and executed on a processor A unit of activity characterized by a at least one

More information

Introduction. Scheduling. Types of scheduling. The basics

Introduction. Scheduling. Types of scheduling. The basics Introduction In multiprogramming systems, when there is more than one runable (i.e., ready), the operating system must decide which one to activate. The decision is made by the part of the operating system

More information

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization Lesson Objectives To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization AE3B33OSD Lesson 1 / Page 2 What is an Operating System? A

More information

Storage in Database Systems. CMPSCI 445 Fall 2010

Storage in Database Systems. CMPSCI 445 Fall 2010 Storage in Database Systems CMPSCI 445 Fall 2010 1 Storage Topics Architecture and Overview Disks Buffer management Files of records 2 DBMS Architecture Query Parser Query Rewriter Query Optimizer Query

More information

Comparison of Memory Management Systems of BSD, Windows, and Linux

Comparison of Memory Management Systems of BSD, Windows, and Linux Comparison of Memory Management Systems of BSD, Windows, and Linux Gaurang Khetan Graduate Student, Department of Computer Science, University of Southern California, Los Angeles, CA. gkhetan@usc.edu December

More information

Outline: Operating Systems

Outline: Operating Systems Outline: Operating Systems What is an OS OS Functions Multitasking Virtual Memory File Systems Window systems PC Operating System Wars: Windows vs. Linux 1 Operating System provides a way to boot (start)

More information

Virtual Memory. How is it possible for each process to have contiguous addresses and so many of them? A System Using Virtual Addressing

Virtual Memory. How is it possible for each process to have contiguous addresses and so many of them? A System Using Virtual Addressing How is it possible for each process to have contiguous addresses and so many of them? Computer Systems Organization (Spring ) CSCI-UA, Section Instructor: Joanna Klukowska Teaching Assistants: Paige Connelly

More information

Hyper ISE. Performance Driven Storage. XIO Storage. January 2013

Hyper ISE. Performance Driven Storage. XIO Storage. January 2013 Hyper ISE Performance Driven Storage January 2013 XIO Storage October 2011 Table of Contents Hyper ISE: Performance-Driven Storage... 3 The Hyper ISE Advantage... 4 CADP: Combining SSD and HDD Technologies...

More information

File Management. Chapter 12

File Management. Chapter 12 Chapter 12 File Management File is the basic element of most of the applications, since the input to an application, as well as its output, is usually a file. They also typically outlive the execution

More information

The Comeback of Batch Tuning

The Comeback of Batch Tuning The Comeback of Batch Tuning By Avi Kohn, Time Machine Software Introduction A lot of attention is given today by data centers to online systems, client/server, data mining, and, more recently, the Internet.

More information

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems 1 Any modern computer system will incorporate (at least) two levels of storage: primary storage: typical capacity cost per MB $3. typical access time burst transfer rate?? secondary storage: typical capacity

More information